From Text to Models and Back Again

Frederic Jouault

Frameworks - Modeling · Long - one hour
Thursday, 13:30, 50 minutes | Room 206


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 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 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).


  1. Introduction
  2. Understanding TCS
    • Principles
    • Tools
    • Demonstration: JSON (JavaScript Object Notation)
  3. Common TCS Constructs
    • Templates
    • Properties
    • Separators
    • Conditionals
    • Functions
    • Lexical Issues
  4. Expressions and Operators
    • Problem Overview
    • Specifying an Operator Table
    • Using Operators
    • Demonstration: Calc (Java-like expressions)
  5. Symbol Table
    • Problem Overview
    • Defining and Referencing Identifiers
    • Scopes
    • Demonstration: adding variables to Calc
  6. Pretty Printing
    • Indentation Blocks
    • Blanks Insertion
    • Demonstration: revisiting previous exercises with proper pretty-printing
Frédéric is the architect and lead of M2M/ATL, and of TMF/TCS. He created these two languages, and tools as part of his Ph.D. thesis. Frédéric is continuing his research activities on model-to-model transformation, as well as on textual syntaxes. This notably results in continuous improvements of ATL and TCS. He is also using these tools for teaching purposes.

Gold sponsors

IBM Corporation

Windriver logo


Sun Microsystems



BIRT Exchange by Actuate

Silver sponsors

Innovations Software Technology






Innovent Solutions

SAP Business Objects

Hardware Sponsor


Lanyard Sponsor

Intel logo

report a problem with this page