![]() |
|||||
Model-driven semantic-oriented compiler compiler |
|||||
Under construction! |
|
GoalThe project should result in a compiler compiler by deriving parser from the abstract syntax and an abstract to concrete syntax mapping.
DescriptionA language is defined by a syntax and a semantic. The syntax, for textual languages, is often described as an EBNF (concrete syntax) while the semantic relies on a tree representing ideas expressed by the text (abstract syntax). The firsts layers of a compiler are responsible for translating the text into ideas. Two major philosophies are possible to realize this feature. In one hand, the syntax-oriented one organizes the text according to a grammar, then recognizes ideas. In the other hand, the semantic-oriented philosophy (or idea-oriented) try to recognize ideas inside the text (e.g. define a class) according to idea composition (e.g. define an attribute inside a class). Compiler compilers may automate the implementation of syntax-oriented compilers (see Lex/Yacc, JavaCC or ANTLR). But most of the time, you have to write by hand a semantic-oriented parser. The idea here is to build a tool to automate this second way. Such a tool would need two major information: the abstract syntax and a mapping from the abstract to the concrete syntax (A2C mapping). The first part would certainly be described as a UML class diagram. The second one is to be clearly defined in the project, based on already existing investigations (see OCL, chapter 4).Once this information collected, a parser generator should be implemented. It is proposed to use the model driven way just by considering the abstract syntax tree as a metamodel ; this implies to describe the A2C mapping the same way (as a model). The generation is then seen as a model transformation (see QVT). This would allow a bootstrap approach in that parsing a textual description of the A2C mapping may be done by the tool itself. It is proposed to work on examples such as the fondue textual use cases and operation schema descriptions.
RequiredMandatory: compilers (if possible syntax oriented and attribute grammars), modeling (fondue method), abstraction and creativity. Knowledge of model driven engineering would be a great plus. Knowledge of OCL or HUTN would be helpful.
Advantages for the student
|
| EPFL | IC | LGL Last modified |
||