Powered by
Conference Publishing Consulting

2016 ACM SIGPLAN International Conference on Software Language Engineering (SLE 2016), October 31 – November 1, 2016, Amsterdam, Netherlands

SLE 2016 – Proceedings

Contents - Abstracts - Authors


Title Page

Message from the Chairs

SLE 2016 Organization


Redex: A Language for Lightweight Semantics Engineering (Keynote)
Robby Findler
(Northwestern University, USA; PLT, USA)
Redex is a programming language designed to support semantics engineers as they experiment with programming language models. To explore a model, an engineer writes down grammars, type systems, and operational semantics in a notation inspired by the programming languages literature. Redex breathes life into the model, building typing derivations, running example expressions, and using random generation to falsify claims about the model. The talk first gives an overview of Redex, motivating its design choices and giving a sense of how programming in Redex feels. Then the talk dives into some of the techniques that Redex uses to generate random expressions.
Publisher's Version Article Search Info

Grammars and Parsing

Parsing and Reflective Printing, Bidirectionally
Zirun Zhu, Yongzhe Zhang, Hsiang-Shang Ko, Pedro Martins, João Saraiva, and Zhenjiang Hu
(National University SOKENDAI, Japan; National Institute of Informatics, Japan; University of California at Irvine, USA; University of Minho, Portugal)

Language designers usually need to implement parsers and printers. Despite being two intimately related programs, in practice they are often designed separately, and then need to be revised and kept consistent as the language evolves. It will be more convenient if the parser and printer can be unified and developed in one single program, with their consistency guaranteed automatically.

Furthermore, in certain scenarios (like showing compiler optimisation results to the programmer), it is desirable to have a more powerful reflective printer that, when an abstract syntax tree corresponding to a piece of program text is modified, can reflect the modification to the program text while preserving layouts, comments, and syntactic sugar.

To address these needs, we propose a domain-specific language BiYacc, whose programs denote both a parser and a reflective printer for an unambiguous context-free grammar. BiYacc is based on the theory of bidirectional transformations, which helps to guarantee by construction that the pairs of parsers and reflective printers generated by BiYacc are consistent. We show that BiYacc is capable of facilitating many tasks such as Pombrio and Krishnamurthi’s “resugaring”, simple refactoring, and language evolution.

Publisher's Version Article Search Artifacts Available
Taming Context-Sensitive Languages with Principled Stateful Parsing
Nicolas Laurent and Kim Mens
(Université Catholique de Louvain, Belgium)
Historically, true context-sensitive parsing has seldom been applied to programming languages, due to its inherent complexity. However, many mainstream programming and markup languages (C, Haskell, Python, XML, and more) possess context-sensitive features. These features are traditionally handled with ad-hoc code (e.g., custom lexers), outside of the scope of parsing theory. Current grammar formalisms struggle to express context-sensitive features. Most solutions lack context transparency: they make grammars hard to write, maintain and compose by hardwiring context through the entire grammar. Instead, we approach context-sensitive parsing through the idea that parsers may recall previously matched input (or data derived therefrom) in order to make parsing decisions. We make use of mutable parse state to enable this form of recall. We introduce principled stateful parsing as a new transactional discipline that makes state changes transparent to parsing mechanisms such as backtracking and memoization. To enforce this discipline, users specify parsers using formally specified primitive state manipulation operations. Our solution is available as a parsing library named Autumn. We illustrate our solution by implementing some practical context-sensitive grammar features such as significant whitespace handling and namespace classification.
Publisher's Version Article Search Artifacts Available
Efficient Development of Consistent Projectional Editors using Grammar Cells
Markus Voelter, Tamás Szabó, Sascha Lisson, Bernd Kolb, Sebastian Erdweg, and Thorsten Berger
(itemis, Germany; Delft University of Technology, Netherlands; Chalmers University of Technology, Sweden; University of Gothenburg, Sweden)
The definition of a projectional editor does not just specify the notation of a language, but also how users interact with the notation. Because of that it is easy to end up with different interaction styles within one and between multiple languages. The resulting inconsistencies have proven to be a major usability problem. To address this problem, we introduce grammar cells, an approach for declaratively specifying textual notations and their interactions for projectional editors. In the paper we motivate the problem, give a formal definition of grammar cells, and define their mapping to low-level editor behaviors. Our evaluation based on project experience shows that grammar cells improve editing experience by providing a consistent and intuitive ``text editor-like'' user experience for textual notations. At the same time they do not limit language composability and the use of non-textual notations, the primary benefits of projectional editors. We have implemented grammar cells for Jetbrains MPS, but they can also be used with other projectional editors.
Publisher's Version Article Search
MetaEdit+ for Collaborative Language Engineering and Language Use (Tool Demo)
Juha-Pekka Tolvanen
(MetaCase, Finland)
Almost all software development activities require collaboration and language engineering is no exception. First, there is a need for collaboration among language engineers as it is not realistic to expect one man to master all. Second, there is a natural need for collaboration among language users. Finally, there is a need for collaboration among language engineers and language users: Not only when languages are originally designed but more importantly when they are maintained along with the work already created with them. Unfortunately too often tools ignore collaboration by unnecessarily splitting the work into separate for-mats, tools and roles. We describe and demonstrate collaborative tool capabilities implemented into MetaEdit+ tool and describe experiences on their use in practice.
Publisher's Version Article Search Video Info

Runtime Techniques

Experiences of Models@run-time with EMF and CDO
Daniel Seybold, Jörg Domaschka, Alessandro Rossini, Christopher B. Hauser, Frank Griesinger, and Athanasios Tsitsipas
(Ulm University, Germany; SINTEF, Norway)
Model-drivenengineering promotes models and modeltrans- formations as the primary assets in software development. The models@run-time approach provides an abstract rep- resentation of a system at run-time, whereby changes in the model and the system are constantly reflected on each other. In this paper, we report on more than three years of experience with realising models@run-time in scalable cloud scenarios using a technology stack consisting of the Eclipse Modelling Framework (EMF) and Connected Data Objects(CDO).We establish requirements for the three roles domain-specific language (DSL) designer, developer, and operator, and compare them against the capabilities of EM- F/CDO. It turns out that this technology stack is well-suited for DSL designers, but less recommendable for developers and even less suited for operators. For these roles, we experi- enced a steep learning curve and several lacking features that hinder the implementation of models@run-time in scalable cloud scenarios. Performance experiences show limitations for write heavy scenarios with an increasing amount of total elements. While we do not discourage the use of EMF/CDO for such scenarios, we recommend that its adoption for sim- ilar use cases is carefully evaluated until this technology stack has realised our wish list of advanced features.
Publisher's Version Article Search
Runtime Support for Rule-Based Access-Control Evaluation through Model-Transformation
Salvador Martínez, Jokin García, and Jordi Cabot
(Open University of Catalonia, Spain; Inria, France; École des Mines de Nantes, France; LINA, France; IK4-IKERLAN Research Center, Spain; ICREA, Spain)
Access-control policies, often the mechanism of choice to implement the security requirements of confidentiality and integrity, can be found in a wide range of application scenarios. Although there are standard languages for access-control and a plethora of works devoted to assure the well-formedness of access-control policies, little attention has been paid to the problem of providing robust and adaptable runtime evaluation engines for the integration of access-control in new DSL's and platforms. Indeed, the integration of access-control requires the development of critical infrastructure facilities around it, so that the policies can be: 1) analyzed and validated and 2) efficiently evaluated against run-time access requests. In order to solve this problem, this paper explores the use of the already mature model transformation frameworks as modern, application-independent infrastructures for access-control languages i.e., following the Policy Enforcement Point(PEP)-Policy Decision Point(PDP) architecture. More specifically, we show how model-driven engineering and the ATL model-transformation framework can be used to lift the infrastructure development burden from developers by providing a robust, flexible and re-usable runtime evaluation engine for rule-based access-control policies.
Publisher's Version Article Search
Object-Oriented Design Pattern for DSL Program Monitoring
Zoé Drey and Ciprian Teodorov
(ENSTA Bretagne, France)
To ease domain-specific language (DSL) development, a range of language workbenches have been created, which provide language design facilities and programming tools, like editors and validators. In spite of these developments, there is a perceived lack of tool support for execution monitoring, which is the basic block for program validation and maintenance. To partially address this issue some language workbenches offer ad-hoc solutions for DSL debugging, but lack support for other monitoring features. In the literature, a number of domain-specific monitoring tools have been proposed. However, there is no clear way for integrating these developments in existing language workbenches. This paper presents ten requirements needed for creating a modular and composable DSL monitoring infrastructure and proposes an object-oriented design pattern for DSL program monitoring. This pattern provides a practical answer to the problem of interfacing the runtime of a DSL with concrete domain-specific monitoring tools. To show the practicability of our approach, we add monitoring support to a simple lambda calculus, without changing the standard interpreter. The ease of integrating monitoring tools is shown through the development of a tracer and the integration of an off-the-shelf domain-specific profiler.
Publisher's Version Article Search Artifacts Available
Execution Framework of the GEMOC Studio (Tool Demo)
Erwan Bousse, Thomas Degueule, Didier Vojtisek, Tanja Mayerhofer, Julien Deantoni, and Benoit Combemale
(TU Vienna, Austria; Inria, France; University of Côte d'Azur, France; University of Rennes 1, France)
The development and evolution of an advanced modeling environment for a Domain-Specific Modeling Language (DSML) is a tedious task, which becomes recurrent with the increasing number of DSMLs involved in the development and management of complex software-intensive systems. Recent efforts in language workbenches result in advanced frameworks that automatically provide syntactic tooling such as advanced editors. However, defining the execution semantics of languages and their tooling remains mostly hand crafted. Similarly to editors that share code completion or syntax highlighting, the development of advanced debuggers, animators, and others execution analysis tools shares common facilities, which should be reused among various DSMLs. In this tool demonstration paper, we present the execution framework offered by the GEMOC studio, an Eclipse-based language and modeling workbench. The framework provides a generic interface to plug in different execution engines associated to their specific metalanguages used to define the discrete-event operational semantics of DSMLs. It also integrates generic runtime services that are shared among the approaches used to implement the execution semantics, such as graphical animation or omniscient debugging.
Publisher's Version Article Search Artifacts Available

Domain-Specific Languages

Language Design and Implementation for the Domain of Coding Conventions
Boryana Goncharenko and Vadim Zaytsev
(University of Amsterdam, Netherlands; Raincode, Belgium)
Coding conventions are lexical, syntactic or semantic restrictions enforced on top of a software language for the sake of consistency within the source base. Specifying coding conventions is currently an open problem in software language engineering, addressed in practice by resorting to natural language descriptions which complicate conformance verification. In this paper we present an endeavour to solve this problem for the case of CSS — a ubiquitous software language used for specifying appearance of hypertextual content separately from the content itself. The paper contains the results of domain analysis, a short report on an empirically obtained catalogue of 143 unique CSS coding conventions, the domain-specific ontology for the domain of detecting violations, the design of CssCoco, a language for expressing coding conventions of CSS, as well as a description of the tool we developed to detect violations of conventions specified in this DSL.
Publisher's Version Article Search
BSML-mbeddr: Integrating Semantically Configurable State-Machine Models in a C Programming Environment
Zhaoyi Luo and Joanne M. Atlee
(University of Waterloo, Canada)
In model-driven engineering, developers express their solutions in domain-specific modelling languages (DSLs) that support domain-specific abstractions. Big-Step Modelling Languages (BSML) is a family of extended state-machine DSLs for creating executable models that have a complex execution semantics. In this paper, we present BSML-mbeddr, which imbeds a large subset of BSML within the mbeddr C programming environment, thereby extending mbeddr with language constructs for extended, semantically configurable state-machines. We also report on three case studies that exercise the expressiveness of BSML-mbeddr, assess the integrability of BSML-mbeddr into mbeddr, and demonstrate the need to provide support for state-machine models with different execution semantics.
Publisher's Version Article Search Info
Adding Uncertainty and Units to Quantity Types in Software Models
Tanja Mayerhofer, Manuel Wimmer, and Antonio Vallecillo
(TU Vienna, Austria; University of Málaga, Spain)
Although several software modeling languages permit the representation of key aspects of physical entities, such as units, precision or measurement uncertainty, these aspects are not typically incorporated into their type systems. Therefore, operating with such properties is normally cumbersome and contrived. This paper shows how both data uncertainty and units can be captured in software models and naturally incorporated into their type systems. In particular, we present extensions of the UML/OCL type Real and define a set of operations on values of these new types. Furthermore, we show how they can be used in software models to carry out computations that consider measurement uncertainty and permit the detection of unit mismatches when trying to operate with their values.
Publisher's Version Article Search
FRaMED: Full-Fledge Role Modeling Editor (Tool Demo)
Thomas Kühn, Kay Bierzynski, Sebastian Richly, and Uwe Aßmann
(TU Dresden, Germany)

Since the year 1977, role modeling has been continuously investigated as promising paradigm to model complex, dynamic systems. However, this research had almost no influence on the design of todays increasingly complex and context-sensitive software systems. The reason for that is twofold. First, most modeling languages focused either on the behavioral, relational or context-dependent nature of roles rather than combining them. Second, there is a lack of tool support for the design, validation, and generation of role-based software systems. In particular, there exists no graphical role modeling editor supporting the three natures as well as the various proposed constraints. To overcome this deficiency, we introduce the Full-fledged Role Modeling Editor (FRaMED), a graphical modeling editor embracing all natures of roles and modeling constraints featuring generators for a formal representation and source code of a role-based programming language. To show its applicability for the development of role-based software systems, an example from the banking domain is employed.

Publisher's Version Article Search Info Artifacts Available

Development Environments

Towards a Universal Code Formatter through Machine Learning
Terence Parr and Jurgen Vinju
(University of San Francisco, USA; CWI, Netherlands)
There are many declarative frameworks that allow us to implement code formatters relatively easily for any specific language, but constructing them is cumbersome. The first problem is that “everybody” wants to format their code differently, leading to either many formatter variants or a ridiculous number of configuration options. Second, the size of each implementation scales with a language’s grammar size, leading to hundreds of rules. In this paper, we solve the formatter construction problem using a novel approach, one that automatically derives formatters for any given language without intervention from a language expert. We introduce a code formatter called CodeBuff that uses machine learning to abstract formatting rules from a representative corpus, using a carefully designed feature set. Our experiments on Java, SQL, and ANTLR grammars show that CodeBuff is efficient, has excellent accuracy, and is grammar invariant for a given language. It also generalizes to a 4th language tested during manuscript preparation.
Publisher's Version Article Search Info Artifacts Available
The IDE Portability Problem and Its Solution in Monto
Sven Keidel, Wulf Pfeiffer, and Sebastian Erdweg
(Delft University of Technology, Netherlands; TU Darmstadt, Germany)
Modern IDEs support multiple programming languages via plug-ins, but developing a high-quality language plug-in is a huge development effort and individual plug-ins are not reusable in other IDEs. We call this the IDE portability problem. In this paper, we present a solution to the IDE portability problem based on a language-independent and IDE-independent intermediate representation (IR) for editor-service products. This IR enables IDE-independent language services to provide editor services for arbitrary IDEs, using language-independent IDE plug-ins. We combine the IR with a service-oriented architecture to facilitate the modular addition of language services, the decomposition of language services into smaller interdependent services, and the use of arbitrary implementation languages for services. To evaluate the feasibility of our design, we have implemented the IR and architecture in a framework called Monto. We demonstrate the generality of our design by constructing language services for Java, JavaScript, Python, and Haskell and show that they are reusable in the Eclipse IDE and in a web-based IDE. We also evaluate the performance of Monto and show that Monto is responsive and has admissible performance overhead.
Publisher's Version Article Search Info Artifacts Available
Principled Syntactic Code Completion using Placeholders
Luís Eduardo de Souza Amorim, Sebastian Erdweg, Guido Wachsmuth, and Eelco Visser
(Delft University of Technology, Netherlands)
Principled syntactic code completion enables developers to change source code by inserting code templates, thus increasing developer efficiency and supporting language exploration. However, existing code completion systems are ad-hoc and neither complete nor sound. They are not complete and only provide few code templates for selected programming languages. They also are not sound and propose code templates that yield invalid programs when inserted.This paper presents a generic framework that automatically derives complete and sound syntactic code completion from the syntax definition of arbitrary languages. A key insight of our work is to provide an explicit syntactic representation for incomplete programs using placeholders. This enables us to address the following challenges for code completion separately: (i) completing incomplete programs by replacing placeholders with code templates, (ii) injecting placeholders into complete programs to make them incomplete, and (iii) introducing lexemes and placeholders into incorrect programs through error-recovery parsing to make them correct so we can apply one of the previous strategies. We formalize our framework and provide an implementation in the Spoofax Language Workbench.
Publisher's Version Article Search Info
DrAST: An Inspection Tool for Attributed Syntax Trees (Tool Demo)
Joel Lindholm, Johan Thorsberg, and Görel Hedin
(Lund University, Sweden)
When implementing a language by means of attribute grammars, it is often useful to study example programs and their attributed trees, to understand the compiler structure, or for debugging. DrAST is a tool that allows interactive inspection of attributed trees. It is interfaced to the JastAdd metacompiler, and supports all JastAdd attribution mechanisms, such as demand evaluation, reference attributes (graph edges), and nonterminal attributes. A challenge in visualizing attributed trees is that they are large, even for small programs. To allow the user to focus on the aspects of interest, DrAST supports the interactive definition of filtered versions of the tree through a domain-specific language which allows conditional filtering based on the attributes themselves. We have used DrAST on a variety of language implementations, from tiny compilers used in teaching to a complete Java compiler.
Publisher's Version Article Search Artifacts Available

Language Validation

Automated Testing Support for Reactive Domain-Specific Modelling Languages
Bart Meyers, Joachim Denil, István Dávid, and Hans Vangheluwe
(University of Antwerp, Belgium; McGill University, Canada)
Domain-specific modelling languages (DSML) enable domain users to model systems in their problem domain, using concepts and notations they are familiar with. The process of domain-specific modelling (DSM) consists of two stages: a language engineering stage where a DSML is created, and a system modelling stage where the DSML is used. Because techniques such as metamodelling and model transformation allow for a efficient creation of DSMLs, and using DSMLs significantly increases productivity, DSM is very suitable for early prototyping. Many systems that are modelled using DSMLs are reactive, meaning that during their execution, they respond to external input. Because of the complexity of input and response behaviour of reactive systems, it is desirable to test models as early as possible. However, while dedicated testing support for specific DSMLs has been provided, no systematic support exists for testing DSML models according to DSM principles. In this paper, we introduce a technique to automatically generate a domain-specific testing framework from an annotated DSML definition. In our approach, the DSML definition consists of a metamodel, a concrete syntax definition and operational semantics described as a schedule of graph rewrite rules, thus covering a large class of DSMLs. Currently, DSMLs with deterministic behaviour are supported, but we provide an outlook to other (nondeterministic, real-time or continuous-time) DSMLs. We illustrate the approach with a DSML for describing an elevator controller. We evaluate the approach and conclude that compared to the state-of-the-art, our testing support is significantly less costly, and similar or better (according to DSM principles) testing support is achieved. Additionally, the generative nature of the approach makes testing support for DSMLs less error-prone while catering the need for early testing.
Publisher's Version Article Search
Side Effects Take the Blame
Felipe Bañados Schwerter
(University of British Columbia, Canada)
We introduce several blame strategies for gradual effect systems. Blame strategies are the part of a language semantics that aims to identify the cause of a runtime check failure. Gradual effect systems are a framework that combines static and dynamic checking of invariants about the side effects performed by a program. We present a minimal language that performs dynamic checks over an effect discipline, and we explore the design space of blame assignment strategies for effects in this language. We also present usefulness criteria against which we compare these strategies.
Publisher's Version Article Search
Symbolic Execution of High-Level Transformations
Ahmad Salim Al-Sibahi, Aleksandar S. Dimovski, and Andrzej Wąsowski
(IT University of Copenhagen, Denmark)
Transformations form an important part of developing domain specific languages, where they are used to provide semantics for typing and evaluation. Yet, few solutions exist for verifying transformations written in expressive high-level transformation languages. We take a step towards that goal, by developing a general symbolic execution technique that handles programs written in these high-level transformation languages. We use logical constraints to describe structured symbolic values, including containment, acyclicity, simple unordered collections (sets) and to handle deep type-based querying of syntax hierarchies. We evaluate this symbolic execution technique on a collection of refactoring and model transformation programs, showing that the white-box test generation tool based on symbolic execution obtains better code coverage than a black box test generator for such programs in almost all tested cases.
Publisher's Version Article Search Artifacts Available
Raincode Assembler Compiler (Tool Demo)
Volodymyr Blagodarov, Yves Jaradin, and Vadim Zaytsev
(Raincode, Belgium)
IBM's High Level Assembler (HLASM) is a low level programming language for z/Architecture mainframe computers. Many legacy codebases contain large subsets written in HLASM for various reasons, and such components usually had to be manually rewritten in COBOL or PL/I before a migration to a modern framework could take place. Now, the Raincode ASM370 compiler for .NET supports HLASM syntax and emulates the data types and behaviour of the original language, allowing one to port, maintain and interactively debug legacy mainframe assembler code under .NET.
Publisher's Version Article Search Info

Model Transformation

Efficient Model Partitioning for Distributed Model Transformations
Amine Benelallam, Massimo Tisi, Jesús Sánchez Cuadrado, Juan de Lara, and Jordi Cabot
(AtlanMod, France; Inria, France; École des Mines de Nantes, France; LINA, France; Autonomous University of Madrid, Spain; Open University of Catalonia, Spain)
As the models that need to be handled in model-driven engineering grow in scale, scalable algorithms for model transformation (MT) are becoming necessary. Programming models such as MapReduce or Pregel may simplify the development of distributed model transformations. However, because of the dense inter-connectivity of models and the complexity of transformation logics, scalability in distributed model processing is challenging. In this paper, we adapt existing formalization of uniform graph partitioning to the case of distributed MTs by means of binary linear programming. Moreover, we propose a data distribution algorithm for declarative model transformation based on static analysis of relational transformation rules. We first extract footprints from transformation rules. Then we propose a fast data distribution algorithm, driven by the extracted footprints, and based on recent results on balanced partitioning of streaming graphs. To validate our approach, we apply it to an existing distributed MT engine for the ATL language, built on top of MapReduce. We implement our heuristic as a custom split algorithm for ATL on MapReduce and we evaluate its impact on remote access to the underlying backend.
Publisher's Version Article Search Artifacts Available
Coupled Software Transformations — Revisited
Ralf Lämmel
(University of Koblenz-Landau, Germany)
We revisit the notion of coupled software transformations (CX) which is concerned with keeping collections of software artifacts consistent in response to changes of individual artifacts. We model scenarios of CX while we abstract from technological spaces and application domains. Our objective is to mediate between universal consistency properties of CX and test-driven validation of concrete (illustrative) CX implementations. To this end, we leverage an emerging megamodeling language LAL which is based on many- and order-sorted predicate logic with support for reuse by inlining modulo substitution. We provide a simple translation semantics for LAL so that formulae can be rendered as test cases on appropriate interpretations of the megamodel elements. Our approach has been implemented and validated in logic programming; this includes the executable language definition of LAL and test-case execution on top of illustrative CX implementations.
Publisher's Version Article Search Artifacts Available
Xdiagram: A Declarative Textual DSL for Describing Diagram Editors (Tool Demo)
André L. Santos and Eduardo Gomes
(University Institute of Lisbon, Portugal)
When compared to the realm of textual syntax, developing graphical syntax for a domain-specific modeling language (DSML) is still challenging. Xdiagram is a research prototype that consists of a textual domain-specific language (DSL) for specifying diagrammatic representations against abstract syntax defined in the Eclipse Modeling Framework (EMF). Specifications are written in Xdiagram against such models in a declarative fashion in order to obtain a diagram editor. We explain the main primitives of our DSL using conceptual modeling as an example domain for illustration.
Publisher's Version Article Search

proc time: 1.03