Antonio Leitao

 

 

Title:  Translating Lisp Into Java

 

 

Abstract:  Java is widely used nowadays and is a frequent requirement in industry projects.  In spite of its great popularity, the Java language is not very expressive and is being extended to include useful features such as multiple inheritance, macros, and multiple
dispatch methods.


Most of these extensions look like a translation into the Java realm if some already developed and well understood features present in Lisp-like languages.
 
In this article we present a language and compiler that follows the opposite idea: we start by designing a restricted version of the Common Lisp language that can be translated into programmer-readable Java programs.  The resulting language is very similar to Common
Lisp, allowing the programmer to explore many useful features such is functions, macros, read-macros, optional and keyword arguments, and CLOS.
 
The compiler takes advantage of Java reflection to obtain type information from the Java libraries so that its type inferencer frees the programmer from writing down most type declarations.  The compiler is itself written in CLOS and has a protocol for further
extensions.