Paper

Type
ARTICLE  
Title
Implementing a Typed Javascript and its IDE: a case-study with Xsemantics  
Authors
Lorenzo Bettini, Jens von Pilgrim, Mark-Oliver Reiser 
Book
International Journal on Advances in Software  
Pages
283--303  
Abstract
Developing a compiler and an IDE for a programming language is time consuming and it poses several challenges, even when using language workbenches like Xtext that provides Eclipse integration. A complex type system with powerful type inference mechanisms needs to be implemented efficiently, otherwise its implementation will 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 describe the implementation of its type system and we will focus on techniques to make the type system implementation of N4JS integrate efficiently with Eclipse. For the implementation of the type system of N4JS we use Xsemantics, a DSL for writing type systems, reduction rules and in general relation rules for languages implemented in Xtext. Xsemantics is intended for developers who are familiar with formal type systems and operational semantics since it uses a syntax that resembles rules in a formal setting. This way, the implementation of formally defined type rules can be implemented easier and more directly in Xsemantics than in Java.  
Volume
9  
Number
3 \& 4  
Year
2016  
Bibtex key
XsemanticsN4JSJournal  
Paper Url1
http://www.iariajournals.org/software/tocv9n34.html  
Bibtex
@ARTICLE{XsemanticsN4JSJournal,
  title = {{Implementing a Typed Javascript and its IDE: a case-study with Xsemantics}},
  author = {Bettini, Lorenzo and von Pilgrim, Jens and Reiser, Mark-Oliver},
  journal = {International Journal on Advances in Software},
  pages = {283--303},
  abstract = {Developing a compiler and an IDE for a programming language is time consuming
      and it poses several challenges, even when using language workbenches like Xtext
      that provides Eclipse integration. A complex type system with powerful type
      inference mechanisms needs to be implemented efficiently, otherwise its
      implementation will 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 describe the implementation of its type system and we will
      focus on techniques to make the type system implementation of N4JS integrate
      efficiently with Eclipse. For the implementation of the type system of N4JS we
      use Xsemantics, a DSL for writing type systems, reduction rules and in general
      relation rules for languages implemented in Xtext. Xsemantics is intended for
      developers who are familiar with formal type systems and operational semantics
      since it uses a syntax that resembles rules in a formal setting. This way, the
      implementation of formally defined type rules can be implemented easier and more
      directly in Xsemantics than in Java.},
  volume = {9},
  number = {3 \& 4},
  year = {2016},
  url = {http://www.iariajournals.org/software/tocv9n34.html},
}
 
Created
2017-02-09 13:53:50  
Modified
2017-02-09 13:54:09