Last week I started teaching a new edition of @TI1220, the first year, second semester, course on concepts of programming languages. Last year I taught the course for the first time and modernized it. Instead of using Haskell to teach functional programming I decided to use Scala. This was partially based on the observation that master's students who took the Haskell-based course had no FP skills to speak of. As Scala ties in more easily with real world application programming than Haskell, I hope more students will come back to FP. In the second part of the semester I teach C, in order to discuss memory management, and JavaScript, for its prototype-based inheritance.

For this second year I have decided to develop a web application to support the lab exercises as well as the exam. Last year I did a multiple-choice exam, which was good for grading, but not a good medium for asking programming language questions. Thus, I want a system that allows me to ask programming questions, but that I can still grade efficiently, preferably automatically. Thus, this year I have introduced the WebLab application in the course. (Due to authentication policy the application is only available to people with a TU Delft netid at the moment.) In this blog post a discussion of the first version of the system that we launched last week.

Read more

Paper about refactoring support for Spoofax accepted at LDTA'12:

Maartje de Jonge, Eelco Visser. A Language Generic Solution for Name Binding Preservation in Refactorings. In Suzana Andova, Anthony M. Sloane, editors, Workshop on Language Descriptions, Tools, and Applications, Proceedings. 2012.

Abstract: The implementation of refactorings for new languages requires considerable effort from the language developer. We aim at reducing that effort by using language generic techniques. This paper focuses on behavior preservation, in particular the preservation of name bindings. Given an existing name analysis, we implement a language generic technique to detect name binding violations. Some languages offer the possibility to access global variables using qualified names. As a refinement to violation detection, we show that name analysis can be defined as a reusable traversal strategy that can be applied to restore name bindings by creating qualified names. These techniques offer an efficient and reliable solution; the semantics of the language is implemented only once, with the compiler being the single source of truth. We evaluate our approach by implementing a language generic rename refactoring, which we apply to different languages.

Paper based on work of master's thesis work of Tobi Vollebregt accepted at LDTA'12:

Tobi Vollebregt, Lennart C. L. Kats, and Eelco Visser. Declarative Specification of Template-Based Textual Editors. In Suzana Andova, Anthony M. Sloane, editors, Workshop on Language Descriptions, Tools, and Applications, Proceedings. 2012.

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.

Following the collaboration on SugarJ with the Marburg team of Klaus Ostermann, the Software Language Design and Engineering Group at TU Delft has an opening for a researcher (3 year postdoc or 4 year PhD).

Project Summary:

Domain-specific languages (DSLs) are emerging as mainstream technique to increase the level of abstraction in software engineering. We propose to develop techniques for deep integration of domain-specific languages into host languages through language libraries that define domain-specific extensions and can be imported into programs like regular libraries, enabling the definition and use of DSLs without deploying a new compiler or IDE. A language library describes all aspects of a language embedding, including syntax, static analysis, translation to the host language, and its integration into the IDE.

A key concern in the construction of an IDE is its responsiveness. Most language engineering tools have been designed around a dichotomy between meta-programming and programming, and rely on batch-based, whole-program compilation techniques, giving rise to full recompilation of language compositions and their editors in the context of language libraries. Ensuring a responsive IDE for language libraries, requires new techniques for online language composition.

Deep integration of DSLs raises various research questions from the perspective of language design. Classical issues of module systems, separate checking, information hiding, composability, self-applicability and recursion, need new answers when the modules to be composed are language libraries. Language libraries also enable the design of a minimal extensible core language from which a full language can be boot-strapped.

We will develop a language libraries framework by building on the Spoofax Language Workbench, validating it with a collection of language libraries for web programming.

If you are interested in the position please contact me.

Karl Kalleberg has ported the command-line interpreter for Stratego to Spoofax:

Good news, boys and girls! If you happen to be a Stratego and/or Spoofax user, you might appreciate that I finally took some time to piece together an interactive command line interpreter—-a REPL—-for Spoofax.

This should improve experimentation and debugging. It is not clear from Karl's post to what extent the REPL integrates with ones 'Spoofax code'. Is it possible to call the analysis function used in the editor, or use origin tracking to the text of an editor? Looking forward to further reports and experiments.

Update: It turns out I had mis-interpreted Karl's post. The REPL was an in-the-shell command line interpreter, much like the stratego-shell of yore, but now JVM-based. However, an integration of that shell in Eclipse-Spoofax is in the works.