logo

JastAdd2 Release Notes

2.3.4 - 2019-07-25

Incremental Evaluation

Performance improvements and bugfixes were added for incremental evaluation. A very simplified summary of the changes:

Fluent Interface for AST Construction

The component setting methods (setChild, addChild, setX, etc.) now return the reference to the modified node so that AST construction calls can be chained together in a sequence of method calls.

This feature was contributed by Alexandru Dura in pull request 10.

Option to Optimizie Imports

JastAdd can now remove most unused imports in generated code. Enable this by adding the --optimize-imports option to the JastAdd command.

Bugfixes

2.3.3 - 2019-03-21

Collection Attributes

A collection attribute with implicit collection root can now be used in grammars with multiple root node types. The collection root will then be the root of the current AST (dynamically found). See issue 294.

Bugfixes

2.3.2 - 2018-04-04

2.3.1 - 2018-02-15

2.3.0 - 2017-09-08

Concurrent Attribute Evaluation

A new option to enable concurrent attribute evaluation has been added. This option makes the generated code for attributes safe to run in multiple threads concurrently. Automatic parallelization is also available via parallelized collection attributes. To be able to safely use circular attributes with concurrent evaluation, all generated code (except for the parallelized collection attributes) is lock-free.

To enable concurrent code generation, add the --concurrent option. Collection attributes can be parallelized by annotating the attribute declarations with @Parallel and/or @ParallelSurvey.

Empty Container Singletons

The new --emptyContainerSingletons option has been added to reduce runtime memory use. This option was developed by Axel Mårtensson for his Master Thesis. He found a 5-24% memory reduction using this option on ExtendJ and JModelica.

The option alters the setChild method for list and optional children so that it replaces empty lists and optionals by singleton objects representing these empty containers. The singleton objects are non-mutable, and they throw exceptions if you try to mutate them. This works well with the way JastAdd ASTs are usually constructed: they are typically only mutated during parsing via the setChild methods.

Circular Rewrite Equality Test

The way circular rewrites are evaluated has been changed: the Object.equals(Object) method is now used, instead of ASTNode.is$Equal(ASTNode,ASTNode), to test if the rewritten node is equal to the previous node. This means that it is possible to define a custom node comparison method. The previous way rewrite values were compared was to compare the AST structure and tokens. The old behaviour can easily be reimplemented if it is desired and if not then a simpler equality test can be used.

This change affects rewrites that don't have a rewrite condition and rewrite to the same node type.

Other Changes

Removed an obsolete variant of the refine statement.

The refinement syntax for methods and synthesized equations had a variation where the equation or code block was replaced by "to refine", for example:

refine Aspect1 eq A.x() to refine Aspect2 eq A.y() = ...;

This could be used to rename an attribute, however a similar effect can be achieved by simply creating a new attribute calling the old one. The only difference is that the old attribute remains.

2.2.3 - 2017-05-08

Attribute Tracing API

The tracing API has been redesigned to be more light-weight and flexible. Trace events are no longer filtered, stored, and processed by the tracing API. Instead, a listener model is used to handle tracing events. Users that need to listen to trace events should now register a class implementing the interface ASTState.Trace.Receiver by calling ASTState.Trace.setReceiver(Receiver).

Some benefits of the tracing API changes are:

Summary of tracing changes:

Bugfixes

Miscellaneous

Deprecation

2.2.2 - 2016-03-24

Bugfixes

2.2.1 - 2016-03-23

Rewrites

Collection attributes

Circular attributes

Code generation

2.2.0 - 2016-01-13

Bugfixes

Collection attributes

Aspect declarations

Code generation changes

Error reporting

2.1.13 - 2015-09-11

Bug Fixes

Parsing

2.1.12 - 2015-09-03

Bug Fixes

Parsing

Code Generation

Command-line Interface

2.1.11 - 2015-02-06

Bug Fixes

Code Generation

Command-line Interface

2.1.10 - 2014-10-10

Bug Fixes

2.1.9 - 2014-09-01

Bug Fixes

Code Generation

Command-line Interface

2.1.8 - 2014-06-11

Bug Fixes

2.1.7 - 2014-06-10

Code Generation

Bug Fixes

2.1.6 - 2013-11-29

Performance

Stability

Command-Line Interface

Code Generation

Flushing

2.1.5 - 2013-09-17

Tracing & Caching

Command-line Interface

2.1.4 - 2013-09-04

2.1.3 - 2013-08-27

2.1.2 - 2013-08-26

Newly Deprecated

Improvements and Additions

Internal Changes

2.1.1 - 2013-07-29

Bugfixes

Other

R20130412

General

Error handling

Performance

R20130312

Incremental evaluation

Removed obsolete features

Internals

R20130212

Bug fixes

Error handling

API changes

Performance

Other changes

R20121112

Bugfix Release

R20121026

Various bug fixes

R20121011

Various bug fixes

Improved output handling

Improved option handling

R20110902

JavaDoc support

JDK7 compliance