A Model-Based Approach to Language Integration

16
A Model-Based Approach to Language Integration Federico Tomassetti Antonio VetroMarco Torchiano Markus Völter, Bernd Kolb MiSE 2013

Transcript of A Model-Based Approach to Language Integration

Page 1: A Model-Based Approach to Language Integration

A Model-Based Approach to Language

Integration

Federico Tomassetti Antonio Vetro’

Marco Torchiano

Markus Völter,Bernd Kolb

MiSE 2013

Page 2: A Model-Based Approach to Language Integration

Problem

Page 3: A Model-Based Approach to Language Integration

Problem

Is my XML configuration file referring to an existing Java class?

Does the HTML and the CSS file specify the same selector or is there a typo?

Page 4: A Model-Based Approach to Language Integration

Most IDE do not guarantee consistency• Tools guarantee consistency at

intra-language level

• e.g. a java class extends another Java class which exists

• Tools do not check for global consistency: the editor of each language is not aware of the semantics of another language

• e.g., the XML editor does not know how to check for a Java class existence

Page 5: A Model-Based Approach to Language Integration

Existing solutions are very specific

An editor for Android configuration files

Page 6: A Model-Based Approach to Language Integration

Goal

Achieving language integration using

language workbenches

Page 7: A Model-Based Approach to Language Integration

Type of interactions

• There are different type of interactions (actually we are currently working on a classification system)

• Here we consider the most common: cross-reference

Page 8: A Model-Based Approach to Language Integration

Example: context

Consider a framework for logging.

In the configuration file we set the verbosity level for each class.

Page 9: A Model-Based Approach to Language Integration

Example: context

• Class could be misspelled•The class could be later renamed or deleted

Page 10: A Model-Based Approach to Language Integration

Example: MPS

We used the MetaProgramming System from Jetbrains.

It is a Language Workbench based on a projectional editor.

Page 11: A Model-Based Approach to Language Integration

Example: implementation

We create the new concept which represents a reference to a Java Class

inside an XML file.

Page 12: A Model-Based Approach to Language Integration

Example: implementation

Auto completion is provided

Page 13: A Model-Based Approach to Language Integration

Example: implementation

Broken reference are automatically recognized

Page 14: A Model-Based Approach to Language Integration

Example: implementation

Pure XML code can be generated at any time

Page 15: A Model-Based Approach to Language Integration

Future workEmpirical assessment: we performed some initial evaluation (see EASE’12) but more evidence on the effects of language interactions is needed.

Categorization of interactions: cross reference is the most common mechanism but there are others. Which types there are? How common they are?

Queries: inside a LW formulating queries about my system in a cross-language fashion (e.g., which XML files are referring to my Java class?)

Page 16: A Model-Based Approach to Language Integration

Thank you!

A Model-Based Approach to Language Integration

Federico Tomassetti, Antonio Vetro’, Marco Torchiano

Markus Völter, Bernd Kolb