New and Noteworthy in Epsilon v0.9.1

We've just released Epsilon v0.9.1, which contains many enhancements and new features, particularly to the core language (EOL), as well as the model-to-text (EGL) and model migration languages (Flock). We've also made significant improvements to the unit testing framework, EUnit.

Here's a summary of the changes.

Enhancements to EOL

As ever, this release of Epsilon contributes several incremental improvements to the core language, EOL, and its development tools. The new features in EOL, are also available in all of the other Epsilon languages.

More literals for built-in types

We've added support for more styles of literal values. For example, Maps can now be created using a more concise syntax. The following EOL v0.9.0 code:

var m = new Map;
m.put("a", 1);
m.put("b", 2);
m.put("c", 3);


can now be written as:

var m = Map {"a" = 1, "b" = 2, "c" = 3}


There's also support for different forms of literal for Reals (Java-like suffixes and exponents). See Section 3.4 of the free Epsilon Book for more details.

Debugger

Epsilon v0.9.1 includes an implementation of one of our most requested features: an interactive debugger for all of the Epsilon languages. The Epsilon debugger can be used to step through your program, while displaying the stack trace and the values of variables. Below is a screenshot of the debugger in action.



To invoke the debugger, ensure that a breakpoint is set somewhere in your Epsilon program (right-click a line in the editor and select Toggle Breakpoint), and then launch your program via Eclipse's Run → Debug menu.

Improvements to the Editors

To make it easier to navigate Epsilon programs, we've added support for jumping to the declaration of an operation from an invocation. Simply hold down the control key (or command key on Mac OS X) while hovering over an operation invocation, and click the hyperlink that appears.

We've also made some smaller improvements to the content assistance and syntax highlighting features of all of the Epsilon editors.

Enhancements to EUnit

EUnit, the unit testing framework for model management operations provided by Epsilon has been significantly enhanced in Epsilon v0.9.1. We've added many new features and improved existing functionality to EUnit, some of the highlights include:

  • A new, dedicated EUnit GUI, with a style that is consistent with Eclipse's JUnit GUI.
  • Several new types of assertion tailored for testing model management operations such as, assertEqualModels and assertEqualFiles for comparing models and files to expected values.
  • Data and model bindings for performing parameterised testing.
  • Exporting of JUnit-style reports for integration with JUnit tools, such as the Jenkins continuous integration server.
  • Support for extending EUnit for use with other model management languages, such as the Atlas Transformation Language (ATL).
  • These are just a few of the most significant changes to EUnit. Much more detail can be found in the new EUnit chapter of the free Epsilon book.

    Enhancements to Flock

    Epsilon v0.9.1 also includes enhancements to the newest Epsilon language, Flock.

    Flock is a language tailored for model migration: a special kind of model transformation where the source and target metamodel are very similar. Flock v0.9.1 adds support for re-using migration logic via the type hierarchy of your metamodels, and a new keyword for customising the automatic copying algorithm implemented in Flock.

    To illustrate these changes to Flock, suppose that we have the following source (original) metamodel, specified in Emfatic.

    class Animal {
      attr String name;
      attr Integer id;
      attr String owner;
    }
    
    class Cat extends Animal {}
    class Dog extends Animal {}
    


    Re-using migration logic over subtypes

    In previous versions of Flock, zero or one migrate rules were executed for each model element in the original (unmigrated) model. Furthermore, migrate rules were applicable only for direct instances of the type specified by the rule. For example, in the following Flock migration strategy, the second and third rules would be applied for all instances of Dog and Cat, respectively. The first rule, however, would not be applied for instances of Dog and Cat, even though Dog and Cat are subtypes of Animal.

    migrate Animal {
      // migration logic omitted
    }
    
    migrate Cat {
      // migration logic omitted
    }
    
    migrate Dog {
      // migration logic omitted
    }
    


    In Flock v0.9.1, migrate rules are now applied to model elements that instantiate the type specified by the rule OR any of its subtypes. For example, both the Animal and the Dog rules will now be applied for instances of Dog.

    A further consequence of this change is that the way in retypings are specified has changed. Previous versions of Flock used the syntax shown in the example below to change the type of model elements.

    migrate Animal {
      // migration logic omitted
    }
    
    migrate Cat to Gato {
      // migration logic omitted
    }
    
    migrate Dog to Perro {
      // migration logic omitted
    }
    


    In Flock v0.9.1, retypings are specified with a dedicated construct, as illustrated in the following example.

    retype Cat to Gato
    retype Dog to Perro
    
    migrate Animal {
      // migration logic omitted
    }
    
    migrate Cat {
      // migration logic omitted
    }
    
    migrate Dog {
      // migration logic omitted
    }
    


    The most immediate benefit of these changes is that migration logic can be more easily shared between related metamodel types. For example, the migration logic specified for an Animal is also re-used for and applied to all subtypes, such as Cat and Dog.

    Customising automatic copying behaviour with the ignoring keyword

    Flock automatically copies from original to migrated model elements any values that conform to both the source (original) and target (evolved) metamodel. In the majority of cases, this is precisely what is required during model migration.

    However, in some cases values need not be copied from source to target (perhaps they are going to be immediately overwritten). Flock v0.9.1 adds the ignoring keyword for specifying a set of features that should not be copied automatically. For example, the following rule will not automatically copy the values of the id and owner features of Animals. Note that the values for other features (such as name) will be automatically copied.

    migrate Animal ignoring id, owner {
      // migration logic omitted
    }
    


    Enhancements to EGL

    The model-to-text language of Epsilon, EGL, provides mechanisms for controlling the appearance and destination of generated text. In Epsilon v0.9.1, we have made it significantly easier to define custom formatters (for applying consistent formatting conventions to generated text) and custom template factories (for controlling the text generation process, including its eventual destination).

    The most noticeable result of these changes are that the EGL launch configuration settings and EGL ANT task now allow users to specify default values for formatters and template factories. For example, the screenshot below shows a new tab that has been added to the EGL launch configuration delegate.



    The Epsilon book chapter on EGL has been largely rewritten for this release, and includes much more detail on defining and using custom formatters and template factories.

    Enhancements to EuGENia

    EuGENia is an Epsilon tool for automatically generating graphical model editors from metamodels. Currently, EuGENia targets the Graphical Modeling Framework (GMF).

    In Epsilon v0.9.1, we've added support to EuGENia for generating standalone ("RCP") Eclipse applications. This means that you don't need to have your users download and install Eclipse, GMF and the plugins of your graphical editor. Instead, you can build an all-in-one package, which contains everything that your users need to use your EuGENia-generated graphical editors. Simply add the rcp="true" annotation value to the gmf.diagram annotation, and the next time EuGENia is invoked, the generated code will contain an RCP application.

    General Performance Improvements

    Continuing our efforts from the v0.9.0 and v0.8.x releases, we've been further reducing memory usage and execution times across all of the Epsilon languages and tools. Epsilon v0.9.1 provides incremental performance improvements to EOL Collection types, and to the assertion operations used in the Epsilon unit testing framework, EUnit.

    Complete list of changes in Epsilon v0.9.1

    Epsilon Model Connectivity (EMC):

  • Enhancement: Added re-usable CachedModel class to support memoization of all EMC drivers.
  • Enhancement: Most built-in drivers now support memoization to speed up model querying. EMC developers should refer to CachedModel for more details.
  • Bug fix: Standardised the way in which the EMF driver uses URIs.
  • Epsilon Object Language (EOL):

  • Enhancement: Added an interactive debugger.
  • Enhancement: Added "open declaration" support for the EOL editor.
  • Enhancement: Support for map and real literals.
  • Enhancement: Return types from user-defined operations are now checked.
  • Enhancement: All EOL types now support the format(pattern : String) operation.
  • Enhancement: Collection annotations and hence collection objects use less memory.
  • Bug fix: Collection#sortBy no longer returns an unordered collection when invoked on an unordered collection.
  • Bug fix: Accessing an ambiguous metamodel type now issues a warning.
  • Bug fix: Different instances of an empty sequence no longer share extended properties.
  • Bug fix: The EOL editor now correctly syntax highlights multiline comments.
  • Epsilon Validation Language (EVL):

  • Bug fix: The EVL development tools no longer wait for the application of fixes when the EVL program contains no fixes.
  • Epsilon Generation Language (EGL):

  • Enhancement: Majority of the EGL book chapter has been updated.
  • Enhancement: Operations in EGL programs can now use static and dynamic output sections.
  • Enhancement: Support for default text formatters.
  • Enhancement: Added support for provided custom text formatters and template factories.
  • Bug fix: EOL's built-in variables are now available for use in EGL programs.
  • Bug fix: Internal exceptions are now reported to the user.
  • Epsilon Wizard Language (EWL):

  • Enhancement: EWL programs that are integrated with EMF and GMF editors can now operate on models that instantiate classes from more than one EPackage. (See #335522 for details and usage instructions).
  • Epsilon Flock:

  • Enhancement: Support for re-use of migration logic between subtypes.
  • Enhancement: Support for specifying feature values to ignore during automatic copying.
  • EUnit:

  • Enhancement: New book chapter on EUnit.
  • Enhancement: Added a JUnit-like GUI, and support for exporting JUnit style reports.
  • Enhancement: Several new assertions for comparing models, files and directories.
  • Enhancement: Support for parametric testing via data and model bindings.
  • Bug fix: Comparing large numbers no longer fails.
  • Bug fix: Arguments to assertion operations are no longer evaluated twice.
  • EuGENia:

  • Enhancement: support for generating RCP apps.
  • Enhancement: support for metamodels that extend Ecore.
  • Bug fix: fixed a race condition during code generation.
  • Workflow:

  • Bug fix: The EVL ANT task now respects the failOnWarnings property.
  • Bug fix: The storeModel ANT task no longer fails for some valid types of path.