PublicationsBelow is a list of my publications. Other lists can be found on Google Scholar and on DBLP. [show all abstracts]
Papers in Refereed Proceedings and Journals
- Maartje de Jonge, Lennart C. L. Kats, Emma Soderberg, Eelco Visser. Natural and Flexible Error Recovery for Generated Modular Language Environments. ACM Transactions on Programming Languages and Systems (TOPLAS), 2013. [draft] [bib] [abstract]
Abstract. Integrated development environments (IDEs) increase programmer productivity, providing rapid, interactive feedback based on the syntax and semantics of a language. Unlike conventional parsing algorithms, scannerless generalized-LR parsing supports the full set of context-free grammars, which is closed under composition, and hence can parse languages composed from separate grammar modules. To apply this algorithm in an interactive environment, this paper introduces a novel error recovery mechanism. Our approach is language-independent, and relies on automatic derivation of recovery rules from grammars. By taking layout information into consideration it can efficiently suggest natural recovery suggestions.
- Gabriël Konat, Lennart C. L. Kats, Guido Wachsmuth, Eelco Visser. Language-Parametric Name Resolution Based on Declarative Name Binding and Scope Rules. In International Conference on Software Language Engineering (SLE 2012), 2102. [pdf] [bib] [abstract]
Abstract. In textual software languages, names are used to reference elements like variables, methods, classes, etc. Name resolution analyses these names in order to establish references between definition and use sites of elements. In this paper, we identify recurring patterns for name bindings in programming languages and introduce a declarative metalanguage for the specification of name bindings in terms of name-spaces, definition sites, use sites, and scopes. Based on such declarative name binding specifications, we provide a language-parametric algorithm for static name resolution during compile-time. We discuss the integration of the algorithm into the Spoofax Language Workbench and show how its results can be employed in semantic editor services like reference resolution, constraint checking, and content completion.
- Anthony M. Sloane, Lennart C. L. Kats, Eelco Visser. A Pure Embedding of Attribute Grammars. Science of Computer Programming, In press, Elsevier, 2013. [pdf] [doi] [bib] [abstract]
Abstract. Attribute grammars are a powerful specification paradigm for many language processing tasks, particularly semantic analysis of programming languages. Recent attribute grammar systems use dynamic scheduling algorithms to evaluate attributes on demand. In this paper, we show how to remove the need for a generator, by embedding a dynamic approach in a modern, object-oriented and functional programming language. The result is a small, lightweight attribute grammar library that is part of our larger Kiama language processing library. Kiama’s attribute grammar library supports a range of advanced features including cached, uncached, higher order, parameterised and circular attributes. Forwarding is available to modularise higher order attributes and decorators abstract away from the details of attribute value propagation. Kiama also implements new techniques for dynamic extension and variation of attribute equations. We use the Scala programming language because of its support for domain-specific notations and emphasis on scalability. Unlike generators with specialised notation, Kiama attribute grammars use standard Scala notations such as pattern-matching functions for equations, traits and mixins for composition and implicit parameters for forwarding. A benchmarking exercise shows that our approach is practical for realistic language processing.
Papers in Refereed Proceedings
- Lennart C. L. Kats, Richard Vogelij, Karl T. Kalleberg, Eelco Visser. Software Development Environments on the Web: A Research Agenda. In Onward! 2012, in proceedings of the ACM international conference on object oriented programming systems languages and applications (OOPSLA 2012), ACM, 2012. [pdf] [bib] [abstract]
Abstract. Software is rapidly moving from the desktop to the Web. The Web provides a generic user interface that allows ubiquitous access, instant collaboration, integration with other online services, and avoids installation and configuration on desktop computers. For software development, the Web presents a shift away from developer workstations as a silo, and has the promise of closer collaboration and improved feedback through innovations in Web-based interactive development environments (IDEs). Moving IDEs to the Web is not just a matter of "porting" desktop IDEs; a fundamental reconsideration of the IDE architecture is necessary in order to realize the full potential that the combination of modern IDEs and the Web can offer. This paper discusses research challenges and opportunities in this area, guided by a pilot study of a web IDE implementation.
- Tobi Vollebregt, Lennart C. L. Kats, Eelco Visser. Declarative Specification of Template-Based Textual Editors. In International Workshop on Language Descriptions, Tools, and Applications (LDTA 2012). Electronic Notes in Theoretical Computer Science. Elsevier, 2012. [pdf] [bib] [abstract]
Abstract. Syntax discoverability has been a crucial advantage of structure editors for new users of a language. Despite this advantage, structure editors have not been widely adopted. Based on immediate parsing and analyses, modern textual code editors are also increasingly syntax-aware: structure and textual editors are converging into a new editing paradigm that combines text and templates. Current text-based language workbenches require redundant specification of the ingredients for a template-based editor, which is detrimental to the quality of syntactic completion, as consistency and completeness of the definition cannot be guaranteed. In this paper we describe the design and implementation of a specification language for syntax definition based on templates. It unifies the specification of parsers, unparsers and template-based editors. We evaluate the template language by application to to two domain-specific languages used for tax benefits and mobile applications.
- Ricky Lindeman, Lennart C. L. Kats, Eelco Visser. Declaratively Defining Domain-Specific Language Debuggers. In Generative Programming and Component Engineering, 7th International Conference (GPCE 2011). ACM, 2011. [pdf] [doi] [bib] [abstract]
Abstract. Tool support is vital to the effectiveness of domain-specific languages. With language workbenches, domain-specific languages and their tool support can be generated from a combined, high-level specification. This paper shows how such a specification can be extended to describe a debugger for a language. To realize this, we introduce a meta-language for coordinating the debugger that abstracts over the complexity of writing a debugger by hand. We describe the implementation of a language-parametric infrastructure for debuggers that can be instantiated based on this specification. The approach is implemented in the Spoofax language workbench and validated through realistic case studies with the Stratego transformation language and the WebDSL web programming language.
Papers in Refereed Proceedings and Journals
- Lennart C. L. Kats, Rob Vermaas, Eelco Visser. Integrated Language Definition Testing: Enabling Test-Driven Language Development. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2011). ACM, 2011. [pdf] [bib] [presentation] [abstract]
Abstract. The reliability of implementations of language definitions — compilers, interpreters, and development environments — is essential for effective software development and maintenance. They are often tested only as an afterthought. Languages with a smaller scope, such as domain-specific languages, often remain untested. General-purpose testing techniques and test case generation methods fall short in providing a low-threshold solution for test-driven language development. In this paper we introduce the notion of a language-parametric testing language (LPTL) that provides a reusable, generic basis for declaratively specifying language definition tests. We integrate the syntax, semantics, and editor services of a language under test into the LPTL for writing test inputs. This paper describes the design of an LPTL and the tool support provided for it, shows use cases using examples, and describes our implementation in the form of the Spoofax testing language.
- !!MISSING PDF!!testing-domain-specific-languages!!
- Sebastian Erdweg, Lennart C. L. Kats, Tilman Rendel, Christian Kästner, Klaus Ostermann, Eelco Visser. Growing a Language Environment with Editor Libraries. In Generative Programming and Component Engineering, 7th International Conference (GPCE 2011). ACM, 2011. [pdf] [doi] [bib] [abstract]
Abstract. 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.
- Sebastian Erdweg, Lennart C. L. Kats, Tilman Rendel, Christian Kästner, Klaus Ostermann, Eelco Visser. SugarJ: Library-based Language Extensibility. (Poster.) In Companion to the Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2011). ACM, 2011. [pdf] [doi] [bib] [abstract]
Abstract. SugarJ is a Java-based programming language that provides extensible surface syntax, static analyses, and IDE support. SugarJ extensions are organized as libraries; conventional import statements suffice to activate and compose language extensions. We illustrate how programmers can use SugarJ to modularly extend Java's syntax, semantic analyses and IDE support.
- Sebastian Erdweg, Lennart C. L. Kats, Tilman Rendel, Christian Kästner, Klaus Ostermann, Eelco Visser. Library-based Model-driven Software Development with SugarJ. (Demonstration.) In Companion to the Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2011). ACM, 2011. [pdf] [doi] [bib] [abstract]
Abstract. SugarJ is a Java-based programming language that provides extensible surface syntax, static analyses, and IDE support. SugarJ extensions are organized as libraries; conventional import statements suffice to activate and compose language extensions. We demonstrate how programmers can use SugarJ to modularly extend Java's syntax, semantic analyses and IDE support.
- Zef Hemel, Danny M. Groenewegen, Lennart C. L. Kats, Eelco Visser. Static Consistency Checking of Web Applications with WebDSL. Journal of Symbolic Computation, Volume 46, Issue 2, Elsevier, 2011. [pdf] [doi] [bib] [abstract]
Abstract. Modern web application development frameworks provide web application developers with high-level abstractions to improve their productivity. However, their support for static verification of applications is limited. Inconsistencies in an application are often not detected statically, but appear as errors at run-time. The reports about these errors are often obscure and hard to trace back to the source of the inconsistency. A major part of this inadequate consistency checking can be traced back to the lack of linguistic integration of these frameworks. Parts of an applications are defined with separate domain-specific languages, which are not checked for consistency with the rest of the application. Examples include regular expressions, query languages and XML-based languages for definition of user interfaces. We give an overview and analysis of typical problems arising in development with frameworks for web application development, with Ruby on Rails, Lift and Seam as representatives.
To remedy these problems, in this paper, we argue that domain-specific languages should be designed from the ground up with static verification and cross-aspect consistency checking in mind, providing linguistic integration of domain-specific sub-languages. We show how this approach is applied in the design of WebDSL, a domain-specific language for web applications, by examining how its compiler detects inconsistencies not caught by web frameworks, providing accurate and clear error messages. Furthermore, we show how this consistency analysis can be expressed with a declarative rule-based approach using the Stratego transformation language.
- Bob de Vos, Lennart C. L. Kats, Kees Pronk. EpiSpin: An Eclipse Plug-In for Promela/Spin Using Spoofax. In 18th International Workshop on Model Checking of Software (SPIN 2011), pages 177—182, Volume 6563 of Lecture Notes in Computer Science, Springer, 2011. [pdf] [bib] [abstract]
Abstract. This paper presents EpiSpin: an Eclipse plug-in for editing Promela models. It provides error markers as you type, various editor services and an interface to perform verification and simulation runs using Spin. An additional tool shows the static relations between channels, processes and global variables. These tools have been built using the Spoofax language workbench.
- Lennart C. L. Kats. Building Blocks for Language Workbenches, PhD thesis, Delft University of Technology, 2011. [pdf] [abstract]
Papers in Refereed Proceedings and Journals
- Lennart C. L. Kats, Eelco Visser. The Spoofax Language Workbench. Rules for Declarative Specification of Languages and IDEs. In Object-Oriented Programming, Systems, Languages, and Applications (SPLASH/OOPSLA 2010), pages 444—463, Best Student Paper Award, ACM, 2010. [pdf] [doi] [bib] [presentation] [abstract]
Abstract. Spoofax is a language workbench for efficient, agile development of textual domain-specific languages with state-of-the-art IDE support. Spoofax integrates language processing techniques for parser generation, meta-programming, and IDE development into a single environment. It uses concise, declarative specifications for languages and IDE services. In this paper we describe the architecture of Spoofax and introduce idioms for high-level specifications of language semantics using rewrite rules, showing how analyses can be reused for transformations, code generation, and editor services such as error marking, reference resolving, and content completion. The implementation of these services is supported by language-parametric editor service classes that can be dynamically loaded by the Eclipse IDE, allowing new languages to be developed and used side-by-side in the same Eclipse environment.
- Lennart C. L. Kats, Eelco Visser. The Spoofax Language Workbench. In Companion to the Conference on Systems, Programming, Languages, and Applications: Software for Humanity (SPLASH 2010), ACM, 2010. (Short companion version of the OOPSLA paper.) [pdf] [doi] [bib] [abstract]
Abstract. Spoofax is a language workbench for efficient, agile development of textual domain-specific languages with state-of-the-art IDE support. It provides a comprehensive environment that integrates syntax definition, program transformation, code generation, and declarative specification of IDE components.
- Lennart C. L. Kats, Eelco Visser, Guido Wachsmuth. Pure and Declarative Syntax Definition: Paradise Lost and Regained. In Onward! 2010, in proceedings of the ACM international conference on object oriented programming systems languages and applications (OOPSLA 2010), pages 918—932, ACM, 2010. [pdf] [doi] [bib] [abstract]
Abstract. Syntax definitions are pervasive in modern software systems, and serve as the basis for language processing tools like parsers and compilers. Mainstream parser generators pose restrictions on syntax definitions that follow from their implementation algorithm. They hamper evolution, maintainability, and compositionality of syntax definitions. The pureness and declarativity of syntax definitions is lost. We analyze how these problems arise for different aspects of syntax definitions, discuss their consequences for language engineers, and show how the pure and declarative nature of syntax definitions can be regained.
- Lennart C. L. Kats, Karl T. Kalleberg, Eelco Visser. Interactive Disambiguation of Meta Programs with Concrete Object Syntax. In International Conference on Software Language Engineering (SLE 2010), Volume 6563 of Lecture Notes in Computer Science, Springer, 2010. [pdf] [doi] [bib] [presentation] [abstract]
Abstract. In meta-programming with concrete object syntax, meta programs can be written using the concrete syntax of manipulated programs. Quotations of concrete syntax fragments and anti-quotations for meta-level expressions and variables are used to manipulate the abstract representation of programs. These small, isolated fragments are often ambiguous and must be explicitly disambiguated with quotation tags or types, using names from the non-terminals of the object language syntax. Discoverability of these names has been an open issue, as they depend on the (grammar) implementation and are not part of the concrete syntax of a language. Based on advances in interactive development environments, we introduce interactive disambiguation to address this issue, providing real-time feedback and proposing quick fixes in case of ambiguities.
- Francisco Durán, Manuel Roldán, Jean-Christophe Bach, Emilie Balland, Mark van den Brand, James R. Cordy, Steven Eker, Luc Engelen, Maartje de Jonge, Karl T. Kalleberg, Lennart C. L. Kats, Pierre-Etienne Moreau, Eelco Visser. The Third Rewrite Engines Competition. Volume 6381 of Lecture Notes in Computer Science, pages 243—261, Springer, 2010. [pdf] [doi] [bib] [abstract]
Abstract. This paper presents the main results and conclusions of the Third Rewrite Engines Competition (REC III). This edition of the competition took place as part of the 8th Workshop on Rewriting Logic and its Applications (WRLA 2010), and the systems ASF+SDF, Maude, Stratego/XT, Tom, and TXL participated in it.
- Lennart C. L. Kats, Eelco Visser. Encapsulating Software Platform Logic by Aspect-Oriented Programming: A Case Study in Using Aspects for Language Portability. In IEEE International Working Conference on Source Code Analysis and Manipulation 2010 (SCAM 2010), pages 147—157, IEEE, 2010. [pdf] [doi] [bib] [presentation] [abstract]
Abstract. Software platforms such as the Java Virtual Machine or the CLR .NET virtual machine have their own ecosystem of a core programming language or instruction set, libraries, and developer community. Programming languages can target multiple software platforms to increase interoperability or to boost performance. Introducing a new compiler backend for a language is the first step towards targeting a new platform, translating the language to the platform's language or instruction set. Programs written in modern languages generally make extensive use of APIs, based on the runtime system of the software platform, introducing additional portability concerns. They may use APIs that are implemented by platform-specific libraries. Libraries may perform platform-specific operations, make direct native calls, or make assumptions about performance characteristics of operations or about the file system. This paper proposes to use aspect weaving to invasively adapt programs and libraries to address such portability concerns, and identifies four classes of aspects for this purpose. We evaluate this approach through a case study where we retarget the Stratego program transformation language towards the Java Virtual Machine.
- Zef Hemel, Lennart C. L. Kats, Danny M. Groenewegen, Eelco Visser. Code Generation by Model Transformation. A Case Study in Transformation Modularity. Software and Systems Modeling, Volume 9, Issue 3, pages 375—402, Springer, 2010. [doi] [bib] [abstract]
Abstract. The realization of model-driven software development requires effective techniques for implementing code generators for domain-specific languages. This paper identifies techniques for improving separation of concerns in the implementation of generators. The core technique is code generation by model transformation, that is, the generation of a structured representation (model) of the target program instead of plain text. This approach enables the transformation of code after generation, which in turn enables the extension of the target language with features that allow better modularity in code generation rules. The technique can also be applied to 'internal code generation' for the translation of high-level extensions of a DSL to lower-level constructs within the same DSL using model-to-model transformations.
This paper refines our earlier description of code generation by model transformation with an improved architecture for the composition of model-to-model normalization rules, solving the problem of combining type analysis and transformation. Instead of coarse-grained stages that alternate between normalization and type analysis, we have developed a new style of type analysis that can be integrated with normalizing transformations in a fine-grained manner. The normalization strategy has a simple extension interface and integrates non-local, context-sensitive transformation rules.
We have applied the techniques in a realistic case study of domain-specific language engineering, i.e. the code generator for WebDSL, using Stratego, a high-level transformation language that integrates model-to-model, model-to-code, and code-to-code transformations.
Papers in Refereed Proceedings
- Maartje de Jonge, Emma Nilsson-Nyman, Lennart C. L. Kats, Eelco Visser. Natural and Flexible Error Recovery for Generated Parsers. In Software Language Engineering (SLE 2009), Volume 5969 of Lecture Notes in Computer Science, pages 204—223, Springer, 2010. [pdf] [doi] [bib] [abstract]
Abstract. Parser generators are an indispensable tool for rapid language development. However, they often fall short of the finesse of a hand-crafted parser, built with the language semantics in mind. One area where generated parsers have provided unsatisfactory results is that of error recovery. Good error recovery is both natural, giving recovery suggestions in line with the intention of the programmer; and flexible, allowing it to be adapted according to language insights and language changes. This paper describes a novel approach to error recovery, taking into account not only the context-free grammar, but also indentation usage. We base our approach on an extension of the SGLR parser that supports fine-grained error recovery rules and can be used to parse complex, composed languages. We take a divide-and-conquer approach to error recovery: using indentation, erroneous regions of code are identified. These regions constrain the search space for applying recovery rules, improving performance and ensuring recovery suggestions local to the error. As a last resort, erroneous regions can be discarded. Our approach also integrates bridge parsing to provide more accurate suggestions for indentation-sensitive language constructs such as scopes. We evaluate our approach by comparison with the JDT Java parser used in Eclipse.
- Lennart C. L. Kats, Maartje de Jonge, Emma Nilsson-Nyman, Eelco Visser. Providing Rapid Feedback in Generated Modular Language Environments. Adding Error Recovery to Scannerless Generalized-LR Parsing. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2009), pages 445—464, ACM, October 2009. [pdf] [doi] [bib] [presentation] [abstract]
Abstract. Integrated development environments (IDEs) increase programmer productivity, providing rapid, interactive feedback based on the syntax and semantics of a language. A heavy burden lies on developers of new languages to provide adequate IDE support. Code generation techniques provide a viable, efficient approach to semi-automatically produce IDE plugins. Key components for the realization of plugins are the language's grammar and parser. For embedded languages and language extensions, constituent IDE plugin modules and their grammars can be combined. Unlike conventional parsing algorithms, scannerless generalized-LR parsing supports the full set of context-free grammars, which is closed under composition, and hence can parse language embeddings and extensions composed from separate grammar modules. To apply this algorithm in an interactive environment, this paper introduces a novel error recovery mechanism, which allows it to be used with files with syntax errors -- common in interactive editing. Error recovery is vital for providing rapid feedback in case of syntax errors, as most IDE services depend on the parser -- from syntax highlighting to semantic analysis and cross-referencing. We base our approach on the principles of island grammars, and derive permissive grammars with error recovery productions from normal SDF grammars. To cope with the added complexity of these grammars, we adapt the parser to support backtracking. We evaluate the recovery quality and performance of our approach using a set of composed languages, based on Java and Stratego.
- Lennart C. L. Kats, Anthony M. Sloane, Eelco Visser. Decorated Attribute Grammars. Attribute Evaluation Meets Strategic Programming. In Compiler Construction
Volume 5501 of Lecture Notes in Computer Science, pages 142—157.
Springer, March 2009. [pdf] [doi] [bib] [presentation] [abstract]
Abstract. Attribute grammars are a powerful specification formalism for tree-based computation, particularly for software language processing. Various extensions have been proposed to abstract over common patterns in attribute grammar specifications. These include various forms of copy rules to support non-local dependencies, collection attributes, and expressing dependencies that are evaluated to a fixed point. Rather than implementing extensions natively in an attribute evaluator, we propose attribute decorators that describe an abstract evaluation mechanism for attributes, making it possible to provide such extensions as part of a library of decorators. Inspired by strategic programming, decorators are specified using generic traversal operators. To demonstrate their effectiveness, we describe how to employ decorators in name, type, and flow analysis.
- Lennart C. L. Kats, Karl T. Kalleberg, Eelco Visser. Domain-Specific Languages for Composable Editor Plugins. In T. Ekman and J. Vinju, editors, International Workshop on Language Descriptions, Tools, and Applications
(LDTA'09), Electronic Notes in Theoretical Computer Science 253(7):149-163.
Elsevier, March 2009. [pdf] [doi] [bib] [presentation] [abstract]
Abstract. Modern IDEs increase developer productivity by incorporating many different kinds of editor services. These can be purely syntactic, such as syntax highlighting, code folding, and an outline for navigation; or they can be based on the language semantics, such as in-line type error reporting and resolving identifier declarations. Building all these services from scratch requires both the extensive knowledge of the sometimes complicated and highly interdependent APIs and extension mechanisms of an IDE framework, and an in-depth understanding of the structure and semantics of the targeted language. This paper describes Spoofax/IMP, a meta-tooling suite that provides high-level domain-specific languages for describing editor services, relieving editor developers from much of the framework-specific programming. Editor services are defined as composable modules of rules coupled to a modular SDF grammar. The composability provided by the SGLR parser and the declaratively defined services allows embedded languages and language extensions to be easily formulated as additional rules extending an existing language definition. The service definitions are used to generate Eclipse editor plugins. We discuss two examples: an editor plugin for WebDSL, a domain-specific language for web applications, and the embedding of WebDSL in Stratego, used for expressing the (static) semantic rules of WebDSL.
- Anthony M. Sloane, Lennart C. L. Kats, Eelco Visser. A Pure Object-Oriented Embedding of Attribute Grammars. In T. Ekman and J. Vinju, editors, International Workshop on Language Descriptions, Tools, and Applications
(LDTA'09), Electronic Notes in Theoretical Computer Science 253(7):205-219.
Elsevier, March 2009. [pdf] [doi] [bib] [abstract]
Abstract. Attribute grammars are a powerful specification paradigm for many language processing tasks, particularly semantic analysis of programming languages. Recent attribute grammar systems use dynamic scheduling algorithms to evaluate attributes by need. In this paper, we show how to remove the need for a generator, by embedding a dynamic approach in a modern, object-oriented programming language to implement a small, lightweight attribute grammar library. The Kiama attribution library has similar features to current generators, including cached, uncached, circular, higher-order and parameterised attributes, and implements new techniques for dynamic extension and variation of attribute equations. We use the Scala programming language because of its combination of object-oriented and functional features, support for domain-specific notations and emphasis on scalability. Unlike generators with specialised notation, Kiama attribute grammars use standard Scala notations such as pattern-matching functions for equations and mixins for composition. A performance analysis shows that our approach is practical for realistic language processing.
- Francisco Durán, Manuel Roldán, Emilie Balland, Mark van den Brand, Steven Eker, Karl T. Kalleberg, Lennart C. L. Kats, Pierre-Etienne Moreau, Ruslan Shevchenko, Eelco Visser. The Second Rewrite Engines Competition. Volume 283 of Electronic Notes in Theoretical Computer Science, pages 281—291, Elsevier, May 2009. [pdf] [doi] [bib] [abstract]
Abstract. The 2nd Rewrite Engines Competition (REC) was celebrated as part of the 7th Workshop on Rewriting Logic and its Applications (WRLA 2008). In this edition of the competition participated five systems, namely ASF+SDF, Maude, Stratego/XT, Termware, and Tom. We explain here how the competition was organized and conducted, and present its main results and conclusions.
Papers in Refereed Proceedings
- Lennart C. L. Kats, Martin Bravenboer, Eelco Visser. Mixing Source and Bytecode. A Case for Compilation by Normalization. In Object-Oriented Programming, Systems, Languages, and Applications
ACM SIGPLAN Notices 43(10), pages 91—108.
ACM, October 2008. [pdf] [doi] [bib] [presentation] [abstract]
Abstract. Language extensions increase programmer productivity by providing concise, often domain-specific syntax, and support for static verification of correctness, security, and style constraints. Language extensions can often be realized through translation to the base language, supported by preprocessors and extensible compilers. However, various kinds of extensions require further adaptation of a base compiler's internal stages and components, for example to support separate compilation or to make use of low-level primitives of the platform (e.g., jump instructions or unbalanced synchronization). To allow for a more loosely coupled approach, we propose an open compiler model based on normalization steps from a high-level language to a subset of it, the core language. We developed such a compiler for a mixed Java and (core) bytecode language, and evaluate its effectiveness for composition mechanisms such as traits, as well as statement-level and expression-level language extensions.
- Zef Hemel, Lennart C. L. Kats, Eelco Visser. Code Generation by Model Transformation. A Case Study in Transformation Modularity. In International Conference on Model Transformation
volume 5063 of Lecture Notes in Computer Science, pages 183—198.
Springer, June 2008. (An updated, extended version was published in 2009 in SoSyM.) [pdf] [doi] [bib] [abstract]
Abstract. The realization of model-driven software development requires effective techniques for implementing code generators. In this paper, we present a case study of code generation by model transformation with Stratego, a high-level transformation language based on the paradigm of rewrite rules with programmable strategies that integrates model-to-model, model-to-code, and code-to-code transformations. The use of concrete object syntax guarantees syntactic correctness of code patterns, and enables the subsequent transformation of generated code. The composability of strategies supports two dimensions of transformation modularity. Vertical modularity is achieved by designing a generator as a pipeline of model-to-model transformations that gradually transforms a high-level input model to an implementation. Horizontal modularity is achieved by supporting the definition of plugins which implement all aspects of a language feature. We discuss the application of these techniques in the implementation of WebDSL, a domain-specific language for dynamic web applications with a rich data model.
- Lennart C. L. Kats, Karl T. Kalleberg, Eelco Visser. Generating Editors for Embedded Languages. Integrating SGLR into IMP. In A. Johnstone and J. Vinju, editors, International Workshop on Language Descriptions, Tools, and Applications
(LDTA'08), pages 168—173
April 2008. [pdf] [bib] [abstract]
Abstract. Integrated Development Environments (IDEs) increase productivity by providing a rich user interface and rapid feedback for a specific language. Creating an editor for a specific language is not a trivial undertaking, and is a cumbersome task even when working with an extensible framework such as Eclipse. A new IBM-guided effort, the IMP framework, relieves the IDE developer from a significant portion of the required work by providing various abstractions for this. For embedded languages, such as embedded regular expressions, SQL queries, or code generation templates, its LALR parser generator falls short, however. Scannerless parsing with SGLR enables concise, modular definition of such languages. In this paper, we present an integration of SGLR into IMP, demonstrating that a scannerless parser can be successfully integrated into an IDE. Given an SDF syntax definition, the sdf2imp tool automatically generates an editor plugin based on the IMP API, complete with syntax checking, syntax highlighting, outline view, and code folding. Using declarative domain-specific languages, these services can be customized, and using the IMP metatooling framework it can be extended with other features.
- Danny M. Groenewegen, Zef Hemel, Lennart C. L. Kats, Eelco Visser. When Frameworks Let You Down. Platform-Imposed Constraints on the Design and Evolution of Domain-Specific Languages. In Jeff Gray et al, editors, Eighth OOPSLA Workshop on Domain Specific Modeling
(DSM'08), pages 64—66.
October 2008. [pdf] [bib] [abstract]
Abstract. Application frameworks encapsulate domain knowledge in a reusable library, providing abstractions for a particular domain. As such, they can form the basis for domain-specific languages, which may offer notational constructs, static analysis, and optimizations specific for the domain. Additional abstractions can be incrementally added on top of a domain-specific, following an inductive approach towards its design, evolving the language as new domain insights are acquired. A problem arises when such additions do not align well with the underlying framework. In this paper, we provide different examples of this problem and describe scenarios of dealing with it.
- Danny M. Groenewegen, Zef Hemel, Lennart C. L. Kats, Eelco Visser. WebDSL: A Domain-Specific Language for Dynamic Web Applications. In Companion to the Conference on Object-Oriented Programming, Systems, Languages, and Applications
(OOPSLA 2008), pages 779—780,
ACM, October 2008. [pdf] [doi] [bib] [abstract]
Abstract. WebDSL is a domain-specific language for the implementation of dynamic web applications with a rich data model. It consists of a core language with constructs to define entities, pages and business logic. Higher-level abstractions, modeling access control and work flow, are defined in a modular fashion as extensions of the core language.
- Lennart C. L. Kats. Supporting Language Extension and Separate Compilation by Mixing Java and Bytecode. Master's Thesis INF/SCR-07-02, Institute of Information and Computing Sciences,
Utrecht University, 2007. [pdf] [bib] [abstract]
Abstract. Language extensions, such as embedded domain-specific languages, are often implemented by assimilating (rewriting) the extended language constructs to the host language. The result can then be compiled by a standard compiler. This approach is limited by the host language, which may not be designed with code generation in mind. An example of this is Java, which provides insufficient protection against name capture of host language identifiers, and does not provide the same low-level primitives that exist in the underlying Java Virtual Machine. For example, it does not provide equivalents for a jump or jump subroutine instruction, unbalanced synchronization, stack manipulation, or specification of debugging information. Code generated from a language that does not match Java's structure can therefore require inefficient or laborious alternatives instead.
We propose a new open compiler model to provide generators direct access to the underlying compiled code. With conventional open compilers, leveraging the bytecode-generating back-end is an intricate process, requiring adaptations tangled throughout the system. The result is hard to develop, understand, and maintain. By providing a mixed source language of Java and the underlying bytecode instruction language, we can provide access to the back-end at the source-level. Compiled instructions can be used in place of statements or expressions, which can aid language extensions but also applications of separate compilation. For example, it can simplify aspect weavers by enabling direct composition of source code aspects with compiled classes, or vice versa. As such, we also introduce a Java traits compiler that allows operation on classes and traits in both source and compiled form.