Implementing a programming language with IDE tooling features poses several challenges even when using language workbenches like Xtext that provides Eclipse integration. A complex type system with powerful type inference mechanisms requires focusing carefully on performance issues that might undermine the effective usability of the IDE: the editor must be responsive even when type inference takes place in the background, otherwise the programmer will experience too many lags. In this paper, we will present a real-world case study: N4JS, a JavaScript dialect with a full-featured Java-like static type system (including generics) and present some evaluation results. We will concentrate on techniques to make the type system implementation of N4JS integrate efficiently with Eclipse. For the implementation of such a type system we use Xsemantics, a DSL for writing type systems, reduction rules and in general relation rules for languages implemented in Xtext. Xsemantics uses a syntax that resembles formal type system specifications, so that the implementation of formally defined type rules can be implemented easier and more directly than in Java.
Implementing the Type System for a Typed Javascript and its IDE / Bettini, Lorenzo; Pilgrim, Jens von; Reiser, Mark-Oliver. - STAMPA. - (2016), pp. 6-11. (Intervento presentato al convegno COMPUTATION TOOLS 2016, The Seventh International Conference on Computational Logics, Algebras, Programming, Tools, and Benchmarking tenutosi a Roma).
Implementing the Type System for a Typed Javascript and its IDE
BETTINI, LORENZO;
2016
Abstract
Implementing a programming language with IDE tooling features poses several challenges even when using language workbenches like Xtext that provides Eclipse integration. A complex type system with powerful type inference mechanisms requires focusing carefully on performance issues that might undermine the effective usability of the IDE: the editor must be responsive even when type inference takes place in the background, otherwise the programmer will experience too many lags. In this paper, we will present a real-world case study: N4JS, a JavaScript dialect with a full-featured Java-like static type system (including generics) and present some evaluation results. We will concentrate on techniques to make the type system implementation of N4JS integrate efficiently with Eclipse. For the implementation of such a type system we use Xsemantics, a DSL for writing type systems, reduction rules and in general relation rules for languages implemented in Xtext. Xsemantics uses a syntax that resembles formal type system specifications, so that the implementation of formally defined type rules can be implemented easier and more directly than in Java.I documenti in FLORE sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.