Examples of Adaptive Languages
Next you can find a few examples of adaptive languages. The projects are available as zip files, which you need to unzip, and then import into your Eclipse workspace.
Adaptive Language for Class Diagrams
This language considers variants of class diagrams with/without interfaces, associations and methods, as well as variants with multiple, single, and no inheritance. The adaptation is useful when using the language in different project phases (e.g., analysis, design, detailed design), or within a learning scenario. For this purpose, the adapters we have designed explicitly bridge the different types of inheritance (creating interfaces and using delegation when moving from multiple to single inheritance, and interfaces are available), replace associations by simple references and vice versa, and substitute interfaces by abstract classes when the former are not available in the language variant.
Download the language here.
Adaptive Language for Petri Nets
This adaptive language is able to adapt to the modelling needs of the user, moving to Petri net variants with more sophisticated primitives when requiring a more expressive language, and to a simpler variant when analysis capabilities are required. It considers Petri net variants with tokens represented either as objects or as an integer attribute; arcs with/without weights; variants with/without inhibitor, read and reset arcs; transitions with/without priority; and variants with/without bounded places; and with/without hierarchy.
We have defined adapters that can be classified in three types. One set of adapters moves from a more complex variant to a simpler one, by expressing one primitive (e.g., read arcs) in terms of patterns of simpler primitives (e.g., parallel simple arcs in each direction). Hence, adapters in this category remove read arcs, weights from arcs, inhibitor arcs and bounded places, and the net hierarchy. A second type of adapters identifies patterns of a simple language version, substituting them by a primitive of a more sophisticated language version. They detect arc loops to create read arcs, and parallel arcs to create weighted arcs. Finally, the last adapter set moves between alternative language realizations: tokens as objects or as attributes.
Download the language here.
Adaptive Language for Process Modelling
We have designed an adaptive process modelling language to fit different modelling scenarios. The language permits
choosing the gateways available: parallel split, synchronization, simple merge, exclusive choice, multi-choice; different types of tasks: final (which can be mandatory or optional), initial (which can be mandatory or optional), and hierarchical; and the representation of flows between elements as an object or a reference. The adaptation capabilities enable moving between different language styles (with/without mandatory initial and final states, with flows represented as objects or relations), and with different level of support for gateways. Similar to the Petri nets case, there are adapters to move to simpler language versions by replacing a gateway (available in a more complex language version) by a pattern.
Download the language here.
Adaptive Language for Relational Databases
We have created an adaptive language to specifiy database schemas, and optionally, their content data. The language has variants with/without support for primary and foreign keys; indices; and default values, unique values, and value auto-increment for columns. In addition, the language considers variants with either a closed set of data types, or open sets of data types represented as objects or attributes. The adapters explicitly bridge variants with open and closed data types; infer whether a column can be null from the available data, or be declared as unique.
Download the language here.
Adaptive Language for State Machines
This adaptive language considers variants with a choice of the following features: transitions that are timed, have event triggers, or are immediate; guarded transitions and actions; hierarchical states, concurrent states, and states with entry, exit or do actions; pseudostates of types condition, (deep) history, and forks/joins; and executable machines. Hence, the adaptive language allows moving between different versions depending on the required expressive power. The adapters defined replace primitives by patterns: when states' exit actions are not available, these are moved to the output transitions (and similar for states' entry actions); condition pseudostates are replaced by standard transitions (concatenating the different incoming and ourgoing transitions); immediate transitions are replaced either by timed or event transitions depending on availability; and hierarchy is flattened when no longer available.
Download the language here.
Adaptive Language for Multi-level Modelling
Multi-level modelling permits modelling using several meta-levels, not necessarily two (the meta-model and model levels). This results in simpler models in some scenarios. Along the years, many multi-level modelling approaches have been proposed offering their own meta-modelling facilities, and variants of them. The adaptive language we have designed offers variants of the most common primitives within multi-level languages, provides different degrees of flexibility, and enables to move between variants as modelling progresses depending on the needs. For example, one may start using the primitives of one tool (e.g., Melanee) and then move to another language variant (e.g., with leap potency, as in MetaDepth) when needed. At any point, the language can be adapted back (e.g., to Melanee) and hence the adapters will express the unavailable primitives in terms of the available ones.
The language allows choosing different degrees of conformance flexibility (e.g., cardinality checks; objects with abstract type), mechanisms for information extension (e.g., untyped objects, links and fields; use of inheritance at the object level), different flavours of potency (e.g., range, leap), the possibility to have multiple classifiers for objects, the availability of abstract classifiers, and the possibility to assign levels to models. The adapters defined express abstract clabjects by using 0 potency; create appropriate subclasses to emulate multi-typing when multiple classification is no longer available; calculate model levels and element potencies when those features become available; express leap potency with normal potency; and create appropriate types for untyped elements if untyped elements are not possible any more.
Download the language here.
Support or Contact
If you have any trouble installing or using Merlin-A, you can contact
merlin at miso dot es