Generating Interpreter and IDE for Modular Languages: Eclipse and Neverlang in Synergy

Vert.x + Kotlin – fuga dal callback-hell
July 17, 2017
How to make Data Science appealing with open source software
July 25, 2017

Generating Interpreter and IDE for Modular Languages: Eclipse and Neverlang in Synergy

Speakers:
Massimiliano Poggi, Nicola Pirritano Giampietro, Walter Cazzola (University of Milan)

Abstract:
Modular language development frameworks allow developers to quickly create new domain-specic programming languages (DSLs) by joining pre-existing components with newly-created ones in order to achieve maximum productivity. In a modular language development framework, a language is seen as a composition of language features that collaborate to provide a complete language implementation. Each feature represents a language construct and is specied in its own module(s), allowing for both decoupling and reuse of its syntax and behavior.

To be really productive with the new DSL, the programmer must have access to dedi-cated development-aiding tools such as editors and debuggers. A modular language development framework must therefore provide a way to generate such tools along with the interpreter/compiler for the language.
However, an integrated development environment (IDE) is generally built in a monolithic fashion and tailored to a specic programming language, both elements that work against the concept of modularity intrinsic in the idea of modularly developed language. The goal is thus to find a way to include enough information inside each module to allow the framework to generate an IDE for the language. To make it possible, each construct should provide meta-information about itself. Such meta-information are specified by the language designer, shipped with the related module and combined with those coming from other modules when needed to generate the IDE for the new DSL.

Neverlang is a JVM-based framework for modular language development that emphasizes code reuse through composition of language features: the language developer can specify syntax and evaluation of programming constructs independently in different modules and provide hooks for other modules, enabling the composition and reuse of previously written modules. The framework generates an interpreter for the language by collecting the different modules and
joining them into a complete language definition.

In our solution, the IDE for the DSL is developed by adapting a generic IDE plug-in that adapt an Eclipse instance with the meta-information provided by the language definition. The meta-information is separately specified in each single module and is therefore faithful to the modularity principle of the Neverlang philosophy. In particular, the language designer must specify which category a symbol belongs to in the syntax modules, what has to be considered an instruction for debugging purposes and how variables are to be handled. This information is then collected during the interpreter-generation phase and made available to the IDE plug-in, solving the duality between a modular language and a monolithic plug-in. In this presentation, we will show how to realize a working meta-model to define the required information and the implementation of an Eclipse plug-in that provides seamless IDE integration. Also we show how the provided model can be applied to real-world languages such as Javascript.

However, the implementation is currently only a proof-of-concept and can be improved in several ways: syntax highlighting is currently syntactic only, the Neverlang parser is not error-tolerant and the debugger currently does not support multiple stack frames or expression evaluation. Solutions to these problems have been laid out but are currently not implemented due to time constraints. Nevertheless, our work can be considered a first step towards the creation of a synergy between modular language development frameworks and tools such as Eclipse that are not generally built with language modularity in mind.

Notes:

Attachments:
abstract

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*