/////////////////////////////////////////////////////////////////////
// Papers on Thorn (scripting, dynamic PLs, gradual typing)
/////////////////////////////////////////////////////////////////////

Integration of Typed and Untyped Code in Thorn

Tobias Wrigstad, Francesco Zappa Nardelli, Sylvain Lebresne, Johan Östlund & Jan Vitek.

Submitted to OOPSLA'09.

ABSTRACT

Many large software systems originate from untyped scripting language code. While good for initial development, this can impact code-quality and performance in the long run. This paper presents an approach for integrating untyped and typed code in the same system in order to allow an initial script to be smoothly evolved into a more efficient and robust system.

Our approach adds a novel intermediate point, called like types, between dynamic and static types. Uses of variables of like type are checked statically, while conformance of a value to a like type is checked at run-time individually at each access.

We show that, in contrast to previous proposals, this approach captures common programmer mistakes, is compatible with object-orientation and can be implemented efficiently. The parts of a program annotated with concrete types enjoy the usual static safety guarantees and can be optimised, while like types improve local safety and integrate smoothly with untyped parts of a program without hindering performance.

We prove the soundness of our design, describe our implementation in the Thorn language, and evaluate our design and implementation by adding type information to pre-existing untyped code.

Download paper.

Download [EXTENDED] paper [WITH PROOFS].

Thorn---Robust, Concurrent, Extensible Scripting on the JVM

Tobias Wrigstad, Johan Östlund, Gregor Richards, Jan Vitek, Bard Bloom, John Field, Nate Nystrom & Rok Strnisa.

Submitted to OOPSLA'09.

ABSTRACT

Scripting languages enjoy great popularity due their support for rapid and exploratory development. They typically have lightweight syntax, weak data privacy, dynamic typing, powerful aggregate data types, and allow execution of the completed parts of incomplete programs. The price of these features comes later in the software life cycle. Scripts are notoriously hard to evolve and compose, and often perform poorly at run-time. An additional weakness of most current scripting languages is lack of support for concurrency---though concurrency is required by more and more applications for scalability on parallel architectures, for handling concurrent real-world events, or for interacting with remote distributed services.

This paper reports on the design and the implementation status of Thorn, a novel programming language targeting the JVM. Our principal design contributions are a careful selection of features that support the evolution of scripts into industrial grade programs---e.g., an expressive module system, an optional constraint annotation facility for declarations, and support for concurrency based on message passing between lightweight, isolated processes. On the implementation side, Thorn has been designed to accommodate the evolution of the language itself through a compiler plugin mechanism.

Download paper.