The Delta Dialect Language (.decoredialect)

The Delta Dialect Language defines the delta operations to be used for a specific source langauge. It binds to a specific meta model by giving its URI in the configuration section. After this, it is possible to use meta classes and types defined in the meta model of the source language along with standard types (Boolean, Integer, Double, String).

ToolSuite_ScreenshotDeltaEcoreDeltaDialect

Futhermore, the Delta Dialect language allows definition of the syntax of delta operations and their parameters in the deltaOperations section. Seven types of standard delta operations are supported:
  • Set: Assigns a new value to a single valued reference.
  • Unset: Assigns the default value to a single valued reference as defined in the meta model.
  • Add: Appends an element to the list of values of a specific many-valued reference of a container element.
  • Insert: Places an element at a certain position in the list of values of a specific many-valued reference of a container element.
  • Remove: Removes an element from the list of values of a specific many-valued reference of a container element.
  • Modify: Alters the value of an attribute.
  • Detach: Detaches an object from its container so that it can be deleted on save (but does not delete any incoming references).

Furthermore, user-defined delta operations may be specified using the customOperation keyword. Files of the Delta Dialect Language have an extension of .decoredialect and can either be specified manually or (partially) generated using the delta dialect derivation mechanism provided by DeltaEcore. The information supplied within a delta dialect is then used to generate or adapt a significant part of the infrastructure required for a custom delta language. Most notably, a significant part of a delta language’s semantics is generated from the specification of delta operations. For this purpose, DeltaEcore generates a partial interpreter of the delta dialect using the Generation Gap Pattern to separate purely generated code from manually created code. Thus, two classes for the delta dialect interpreter are generated: The AbstractDeltaDialectInterpreter containing the generated code and serving as abstract base class for its concrete sub class DeltaDialectInterpreter containing only those parts of the code that need manual implementation. Using the conventions for parameters of standard delta operations specified above, the implementation of set/unset, add/insert/remove and modify delta operations can be generated fully automatically. Merely custom delta operations require manual implementation. Through the delta dialect interpreter mechanism and the information supplied with a delta dialect file, it is possible to integrate a dialect into the delta modeling infrastructure supplied by DeltaEcore. Both the delta dialect as well as its dialect interpreter are registered automatically with DeltaEcore by means of an Eclipse extension point. As a result, features such as auto completion of required deltas, topological sorting of deltas to determine an application order and the subsequent application to derive variants of an artifact can be reused seamlessly and do not need any further work on the part of the creator of a custom delta language.