Embedding an interpreted language using higher-order functions and types

Using an embedded, interpreted language to control a complicated application can have significant software-engineering benefits. But existing interpreters are designed for embedding into C code. To embed an interpreter into a different language requires a suitable API. Lua-ML is a new API that uses higher-order functions and types to simplify the use of an embedded interpreter. A typical application-program function can be added to a Lua-ML interpreter simply by describing the function's type.

[1]  Simon L. Peyton Jones,et al.  A single intermediate language that supports multiple implementations of exceptions , 2000, PLDI '00.

[2]  Carsten Bormann,et al.  Elk: The Extension Language Kit , 1994, Comput. Syst..

[3]  Olivier Danvy,et al.  Type-directed partial evaluation , 1995, POPL '96.

[4]  Nick Benton,et al.  Under Consideration for Publication in J. Functional Programming Embedded Interpreters , 2022 .

[5]  Daan Leijen,et al.  Domain specific embedded compilers , 1999, DSL '99.

[6]  John K. Ousterhout,et al.  Tcl and the Tk Toolkit , 1994 .

[7]  Morten Rhiger,et al.  A foundation for embedded languages , 2002, TOPL.

[8]  David M. Beazley,et al.  SWIG: An Easy to Use Tool for Integrating Scripting Languages with C and C++ , 1996, Tcl/Tk Workshop.

[9]  Tim Jenness,et al.  Extending and Embedding Perl , 2002 .

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

[11]  John K. Ousterhout,et al.  Tcl: An Embeddable Command Language , 1989, USENIX Winter.

[12]  Paul Hudak,et al.  Monad transformers and modular interpreters , 1995, POPL '95.

[13]  Zhe Yang Encoding types in ML-like languages , 2004, Theor. Comput. Sci..

[14]  Reuben Olinsky,et al.  Staged Allocation : Engineering the Specification and Implementation of Procedure Calling Conventions , 2004 .

[15]  Jr. Brent W. Benson Libscheme: scheme as a C library , 1994 .

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

[17]  Olivier Danvy,et al.  A Simple Solution to Type Specialization , 1998, ICALP.

[18]  Guido Rossum,et al.  Extending and embedding the python interpreter , 1995 .

[19]  Roberto Ierusalimschy,et al.  Lua—An Extensible Extension Language , 1996 .

[20]  Jeroen D. Fokker,et al.  Functional Parsers , 1995, Advanced Functional Programming.

[21]  Matthias Blume No-Longer-Foreign: Teaching an ML compiler to speak C "natively" , 2001, Electron. Notes Theor. Comput. Sci..

[22]  William S. Yerazunis,et al.  Combining Winnow and Orthogonal Sparse Bigrams for Incremental Spam Filtering , 2004, PKDD.

[23]  Olivier Danvy A Simple Solution to Type Specialization , 1998 .

[24]  Roberto Ierusalimschy,et al.  Lua—An Extensible Extension Language , 1996, Softw. Pract. Exp..

[25]  Roberto Ierusalimschy,et al.  Programming in Lua , 2003 .

[26]  X. Leroy The Objective Caml system release 3.09 Documentation and user''s manual , 2005 .

[27]  Simon L. Peyton Jones,et al.  C--: A Portable Assembly Language that Supports Garbage Collection , 1999, PPDP.

[28]  Zhe Yang,et al.  Encoding types in ML-like languages , 1998, ICFP '98.