From Text to Models and Back Again Frederic Jouault
Visual modeling languages like UML have some advantages like enabling readers to get a global understanding at a glance. However, some artefacts or elements are better represented as texts or programs. For instance, even UML embeds textual notations: to represent the attribute and operation fields of classes, as well as to capture constraints (in OCL). Tools supporting textual notations generally need to parse text (or programs) into models, as well as to pretty-print models into text.
The TMF/TCS Eclipse.org project aims at automating the creation of textual notation support tools. An abstract syntax is first specified in the form of a metamodel. Then, the concrete textual representation of each metaelement is detailed in a TCS model. Parsing programs into models (conforming to the specified metamodel) as well as pretty-printing models into programs (or texts) may then be performed manually, or in batch tranformations. Additionally, a rich editor is also available with features like: syntax highlighting, outline, content folding, completion, hyperlinks, and text hovers. A single specification of the textual syntax is thus enough to develop textual notation tools.
This technology is complementary to model-to-model tranformation (e.g., in ATL or QVT). A full transformation chain typically starts by parsing a program written in a high-level Domain-Specific Language. In a second step, model transformations are used in order to obtain a model of the target language. Finally, this model is pretty-printed into code, or documentation. TCS is also complementary to the Eclipse.org GMF project, which enables the definition of visual syntaxes.
During this talk, attendees will learn how to define textual modeling languages with Eclipse modeling tools. Advanced topics like operators, symbol table, and pretty-printing will be covered. Demonstrations of the tools will also be presented.
Remark: The presentation will be performed by a textual modeling expert and architect of TCS. The presenter has already given several lectures on TCS, notably in universities (U.S., and France).