Thorn: robust, concurrent, extensible scripting on the JVM

Scripting languages enjoy great popularity due to 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 hard to evolve and compose, and often slow. An additional weakness of most scripting languages is lack of support for concurrency - though concurrency is required for scalability and interacting with remote services. This paper reports on the design and implementation of Thorn, a novel programming language targeting the JVM. Our principal 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 type 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 and target the Java virtual machine.

[1]  Craig Harris,et al.  Combining language and database advances in an object-oriented development environment , 1987, OOPSLA '87.

[2]  Jens Palsberg,et al.  Constrained types for object-oriented languages , 2008, OOPSLA.

[3]  James R. Douglass,et al.  Packrat parsers can support left recursion , 2008, PEPM '08.

[4]  Sam Tobin-Hochstadt,et al.  Interlanguage migration: from scripts to programs , 2006, OOPSLA '06.

[5]  Robin Milner,et al.  Definition of standard ML , 1990 .

[6]  Lutz Prechelt,et al.  An Empirical Comparison of Seven Programming Languages , 2000, Computer.

[7]  Vivek Sarkar,et al.  X10: an object-oriented approach to non-uniform cluster computing , 2005, OOPSLA '05.

[8]  Jeremy G. Siek Gradual Typing for Functional Languages , 2006 .

[9]  Oscar Nierstrasz,et al.  Traits: Composable Units of Behaviour , 2002, ECOOP.

[10]  John K. Ousterhout,et al.  Scripting: Higher-Level Programming for the 21st Century , 1998, Computer.

[11]  Edmond Schonberg,et al.  Programming with Sets: An Introduction to SETL , 1986 .

[12]  Martin Odersky,et al.  Matching Objects with Patterns , 2007, ECOOP.

[13]  Sophia Drossopoulou,et al.  BabyJ: from object based to class based programming via types , 2003, WOOD.

[14]  Jesse James Garrett Ajax: A New Approach to Web Applications , 2007 .

[15]  V. Stavridou,et al.  Abstraction and specification in program development , 1988 .

[16]  David F. Bacon Kava: a Java dialect with a uniform object model for lightweight classes , 2003, Concurr. Comput. Pract. Exp..

[17]  Guy L. Steele,et al.  The evolution of Lisp , 1993, HOPL-II.

[18]  Fred L. Drake,et al.  The Python Language Reference Manual , 1999 .

[19]  Oscar Nierstrasz,et al.  Practical, pluggable types for a dynamic language , 2009, Comput. Lang. Syst. Struct..

[20]  Jonathan Aldrich,et al.  CZ: multiple inheritance without diamonds , 2009, OOPSLA 2009.

[21]  Peyton Jones,et al.  Haskell 98 language and libraries : the revised report , 2003 .

[22]  Xavier Leroy The objective caml system release 3 , 2001 .

[23]  David Thomas,et al.  Programming Ruby: the pragmatic programmer's guide , 2000 .

[24]  Donald D. Chamberlin,et al.  SEQUEL: A structured English query language , 1974, SIGFIDET '74.

[25]  Walid Taha,et al.  Gradual Typing for Objects , 2007, ECOOP.

[26]  Michael R. Clarkson,et al.  Polyglot: An Extensible Compiler Framework for Java , 2003, CC.

[27]  William R. Cook,et al.  Mixin-based inheritance , 1990, OOPSLA/ECOOP '90.

[28]  Brian Beckman,et al.  LINQ: reconciling object, relations and XML in the .NET framework , 2006, SIGMOD Conference.

[29]  Philip Wadler,et al.  Views: a way for pattern matching to cohabit with data abstraction , 1987, POPL '87.

[30]  Martin Odersky,et al.  An Overview of the Scala Programming Language Second Edition , 2006 .

[31]  Shane Markstrum,et al.  A framework for implementing pluggable type systems , 2006, OOPSLA '06.

[32]  Sam Tobin-Hochstadt,et al.  The design and implementation of typed scheme , 2008, POPL '08.

[33]  Jan Vitek,et al.  Matchete: Paths through the Pattern Matching Jungle , 2008, PADL.

[34]  John H. Reppy,et al.  Specialization of CML message-passing primitives , 2007, POPL '07.

[35]  Rok Strniša Fixing the Java Module System , in Theory and in Practice , 2008 .

[36]  Gilad Bracha Pluggable Type Systems , 2004 .

[37]  Alan Mycroft,et al.  Kilim: Isolation-Typed Actors for Java , 2008, ECOOP.

[38]  Bradford L. Chamberlain,et al.  Parallel Programmability and the Chapel Language , 2007, Int. J. High Perform. Comput. Appl..

[39]  Bryan Ford,et al.  Parsing expression grammars: a recognition-based syntactic foundation , 2004, POPL '04.