Growing a language environment with editor libraries

Large software projects consist of code written in a multitude of different (possibly domain-specific) languages, which are often deeply interspersed even in single files. While many proposals exist on how to integrate languages semantically and syntactically, the question of how to support this scenario in integrated development environments (IDEs) remains open: How can standard IDE services, such as syntax highlighting, outlining, or reference resolving, be provided in an extensible and compositional way, such that an open mix of languages is supported in a single file? Based on our library-based syntactic extension language for Java, SugarJ, we propose to make IDEs extensible by organizing editor services in editor libraries. Editor libraries are libraries written in the object language, SugarJ, and hence activated and composed through regular import statements on a file-by-file basis. We have implemented an IDE for editor libraries on top of SugarJ and the Eclipse-based Spoofax language workbench. We have validated editor libraries by evolving this IDE into a fully-fledged and schema-aware XML editor as well as an extensible Latex editor, which we used for writing this paper.

[1]  Mirko Seifert,et al.  Derivation and Refinement of Textual Syntax for Models , 2009, ECMDA-FA.

[2]  Arie van Deursen,et al.  The Asf+Sdf Meta-Environment: a Component-Based Language Development Environment , 2001, LDTA@ETAPS.

[3]  Eelco Visser,et al.  Stratego: A Language for Program Transformation Based on Rewriting Strategies , 2001, RTA.

[4]  Eelco Visser,et al.  The spoofax language workbench: rules for declarative specification of languages and IDEs , 2010, OOPSLA.

[5]  Sam Tobin-Hochstadt,et al.  Languages as libraries , 2011, PLDI '11.

[6]  Paul Klint,et al.  A meta-environment for generating programming environments , 1989, TSEM.

[7]  Eric Van Wyk,et al.  Attribute Grammar-Based Language Extensions for Java , 2007, ECOOP.

[8]  Markus Völter,et al.  Embedded software development with projectional language workbenches , 2010, MODELS'10.

[9]  Claus Brabrand,et al.  Growing languages with metamorphic syntax macros , 2000, PEPM '02.

[10]  Konstantin Solomatov,et al.  Language Modularization and Composition with Projectional Language Workbenches illustrated with MPS , 2010 .

[11]  Jonathan Bachrach,et al.  The Java syntactic extender (JSE) , 2001, OOPSLA '01.

[12]  Sebastian Erdweg,et al.  SugarJ: library-based syntactic language extensibility , 2011, OOPSLA '11.

[13]  Bernhard Rumpe,et al.  MontiCore: Modular Development of Textual Domain Specific Languages , 2008, TOOLS.

[14]  Martin P. Ward Language-Oriented Programming , 1994, Softw. Concepts Tools.

[15]  Andrew W. Appel,et al.  Hierarchical modularity , 1999, TOPL.

[16]  Oscar Nierstrasz,et al.  Embedding Languages without Breaking Tools , 2010, ECOOP.

[17]  Torbjörn Ekman,et al.  The jastadd extensible java compiler , 2007, OOPSLA.

[18]  S. Dmitriev Language Oriented Programming: The Next Programming Paradigm , 2004 .

[19]  Laurence Tratt,et al.  Domain specific language implementation via compile-time meta-programming , 2008, TOPL.

[20]  Gilad Bracha Pluggable Type Systems , 2004 .

[21]  van der,et al.  The Rascal Language Workbench , 2011 .

[22]  Michael R. Clarkson,et al.  Polyglot: An Extensible Compiler Framework for Java , 2003, CC.

[23]  Jean Bézivin,et al.  TCS:: a DSL for the specification of textual concrete syntaxes in model engineering , 2006, GPCE '06.

[24]  Paul Hudak,et al.  Modular domain specific languages and tools , 1998, Proceedings. Fifth International Conference on Software Reuse (Cat. No.98TB100203).

[25]  Thomas Leich,et al.  FeatureIDE: A tool framework for feature-oriented software development , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[26]  Shigeru Chiba,et al.  OpenJava: A Class-Based Macro System for Java , 1999, Reflection and Software Engineering.

[27]  Matthias Felleisen,et al.  DrScheme: a programming environment for Scheme , 2002, J. Funct. Program..