Skip to content

Project: DSL Semantics formalization

SimonCockx edited this page Aug 17, 2022 · 2 revisions

Phase 5: precise specification of the Rosetta language

Context: code generation

One of Rosetta's main aims is to be easily adoptable for any company. For example, a company that currently uses Scala to implement its infrastructure should be able to use Rosetta in production as easily as a company that currently uses Java. We achieve this goal by supporting code generators to a wide range of different languages to translate a Rosetta model into executable code.

Problem: Rosetta does not have a precise specification

When implementing a code generator to a language, an important goal is to make sure that the semantics of the generated code is the same as that of the source code written in Rosetta. Unfortunately, Rosetta currently lacks a precise specification, either formal or informal, that gives an unambiguous meaning to all of its language constructs. This means that developers working on code generators have to make their own interpretation, potentially leading to a divergence between the semantics of different code generators, as one interpretation might differ from another.

Solution

Simon argues in his thesis that giving a precise specification is doable and he shows an example of such a specification for a subset of the Rosetta language. Furthermore, he defines guidelines for translating this specification into an actual code generator. We intend to use this specification as a starting point and then extend it to the complete Rosetta language.