April 9-11th 2014
Churchill College, Cambridge UK

Session

Session Title

End-to-end language composition

Session Type Tutorial
Duration 45 minutes
Session Description

We want better programming languages, but "better" invariably ends up becoming "bigger". Since we can't keep making our languages bigger, what alternatives do we have? In this tutorial, I propose language composition as a possible solution to this long standing problem. Language composition means merging two languages and allowing them to be used together. At its most fine-grained, this could allow multiple programming languages to be used together within a single source file.

However, language composition is not a new idea. It has failed in the past because editing composed programs was intolerably difficult and the resulting programs ran too slowly to be usable. Without good solutions to these problems, language composition will remain an unrealised ideal.

In this session, I will show how the work we are doing in the Software Development Team at King's College is beginning to address both aspects. We have built a prototype editor utilising a novel concept, 'language boxes', which allows one to edit composed programs in a natural way, without the limitations of traditional approaches. We are tackling the performance problem by composing together interpreters using meta-tracing, allowing us to build composed VMs with custom JITs that naturally optimise across different language's run-times. While we are much nearer the beginning of the journey than the end, our initial research has allowed us to build a simple composition of two very different languages: Python and Prolog. We thus have a complete -- albeit basic -- "end to end" language composition approach: users can write composed programs and have them run on efficient VMs custom built for the languages that are composed.

This session covers joint work with Edd Barrett, Carl Friedrich Bolz, Lukas Diekmann, and Krishnan Vasudevan. More details at http://soft-dev.org/

Speaker(s)

Laurence Tratt (King's College London)

Laurence leads the Software Development Team in the Department of Informatics at King's College London. His main research interests surround programming languages and domain specific languages. He created the Converge programming language which allows syntactically distinct domain specific languages to be embedded in normal program files and compiled out at compile-time.