PIL: A Platform Independent Language for Retargetable DSLs

Intermediate languages are used in compiler construction to simplify retargeting compilers to multiple machine architectures. In the implementation of domain-specific languages (DSLs), compilers typically generate high-level source code, rather than low-level machine instructions. DSL compilers target a software platform, i.e. a programming language with a set of libraries, deployable on one or more operating systems. DSLs enable targeting multiple software platforms if its abstractions are platform independent. While transformations from DSL to each targeted platform are often conceptually very similar, there is little reuse between transformations due to syntactic and API differences of the target platforms, making supporting multiple platforms expensive. In this paper, we discuss the design and implementation of PIL, a Platform Independent Language, an intermediate language providing a layer of abstraction between DSL and target platform code, abstracting from syntactic and API differences between platforms, thereby removing the need for platform-specific transformations. We discuss the use of PIL in an implemementation of WebDSL, a DSL for building web applications.

[1]  Luigi Semenzato The High-Level Intermediate Language L , 1993 .

[2]  Martin Richards The portability of the BCPL compiler , 1971, Softw. Pract. Exp..

[3]  Eelco Visser,et al.  Declarative Access Control for WebDSL: Combining Language Integration and Separation of Concerns , 2008, 2008 Eighth International Conference on Web Engineering.

[4]  Eelco Visser,et al.  MetaBorg in Action: Examples of Domain-Specific Language Embedding and Assimilation Using Stratego/XT , 2005, GTTSE.

[5]  Russell W. Quong,et al.  ANTLR: A predicated‐LL(k) parser generator , 1995, Softw. Pract. Exp..

[6]  Mark van den Brand,et al.  TIDE: A Generic Debugging Framework - Tool Demonstration , 2005, Electron. Notes Theor. Comput. Sci..

[7]  Hui Wu,et al.  Grammar‐driven generation of domain‐specific language debuggers , 2008, Softw. Pract. Exp..

[8]  Volker Gruhn,et al.  Model-Driven Software Development , 2005 .

[9]  Eelco Visser,et al.  Code Generation by Model Transformation , 2008, ICMT@TOOLS.

[10]  Wilson C. Hsieh,et al.  Bigtable: A Distributed Storage System for Structured Data , 2006, TOCS.

[11]  João Saraiva,et al.  Generative and Transformational Techniques in Software Engineering II , 2007, Lecture Notes in Computer Science.

[12]  Simon L. Peyton Jones,et al.  C--: A Portable Assembly Language that Supports Garbage Collection , 1999, PPDP.

[13]  Christopher W. Fraser,et al.  Code selection through object code optimization , 1984, TOPL.

[14]  Perdita Stevens A Simple Game-Theoretic Approach to Checkonly QVT Relations , 2009, ICMT@TOOLS.

[15]  Eelco Visser,et al.  Concrete syntax for objects: domain-specific language embedding and assimilation without restrictions , 2004, OOPSLA '04.

[16]  Jean Bézivin,et al.  Platform Independent Web Application Modeling , 2003, UML.

[17]  Joaquin Miller,et al.  MDA Guide Version 1.0.1 , 2003 .

[18]  Eelco Visser,et al.  WebDSL: A Case Study in Domain-Specific Language Engineering , 2007, GTTSE.

[19]  Eelco Visser,et al.  When Frameworks Let You Down: Platform-Imposed Constraints on the Design and Evolution of Domain-Specific Languages , 2008, OOPSLA 2008.

[20]  Kevin Lano,et al.  Slicing of UML models using model transformations , 2010, MODELS'10.

[21]  Markus Völter,et al.  Model-Driven Software Development: Technology, Engineering, Management , 2006 .

[22]  Eelco Visser,et al.  Scannerless Generalized-LR Parsing , 1997 .

[23]  Eelco Visser,et al.  WebWorkFlow: An Object-Oriented Workflow Modeling Language for Web Applications , 2008, MoDELS.

[24]  Arie van Deursen,et al.  Domain-specific languages: an annotated bibliography , 2000, SIGP.

[25]  Walter F. Bauer,et al.  Papers presented at the May 9-11, 1961, western joint IRE-AIEE-ACM computer conference , 1961 .

[26]  Manuel E. Benitez,et al.  A portable global optimizer and linker , 1988, PLDI '88.

[27]  T. B. Steel A first version of UNCOL , 1961, IRE-AIEE-ACM '61 (Western).

[28]  Eelco Visser,et al.  Code generation by model transformation: a case study in transformation modularity , 2008, Software & Systems Modeling.

[29]  Arie van Deursen,et al.  Origin Tracking , 1993, J. Symb. Comput..

[30]  Jean Bézivin,et al.  Applying MDA approach for Web service platform , 2004, Proceedings. Eighth IEEE International Enterprise Distributed Object Computing Conference, 2004. EDOC 2004..

[31]  BravenboerMartin,et al.  Concrete syntax for objects , 2004 .