Linux SoftwareProgrammingCompilersR2cl 0.1

R2cl 0.1


R2cl compiler is a minimal, proof of concept translator from the R or S language into Common Lisp. An increase in speed of over 10
Developer:   Dr. Alexandru Corlan
      more software by author →
Price:  0.00
License:   GPL (GNU General Public License)
File size:   5K
Language:   
OS:   
Rating:   0 /5 (0 votes)
Your vote:  
enlarge screenshot


R2cl compiler is a minimal, proof of concept translator from the R or S language into Common Lisp.

An increase in speed of over 1000 times can then be achieved using the free CMU Common Lisp native code compiler on the resulting code, making it comparable to FORTRAN, Ada or C.

Installation:

To install you need first to install cmucl (the CMU Common Lisp) and R. Both come with most Linux distributions by default but you must select them for installation. I think most recent (after 2000) versions will work. I have R 1.5.1 and cmucl x86-linux 3.0.8 18c+ running on Debian 3.0 (woody). You must be running the bash shell (which is the default) and have gnu make on your system (which you normally have).

Just untar the distribution archive:

tar xvzf R2cl-0.1.tgz

It will create the directory R2cl. Type:

cd R2cl
make

and watch translation, compilation and duration of execution of benchmarks. That's all, except if you want to have a look at the code.

R is a reimplementation of the S language for statistical processing. It is a free project, see r-project.org. R is a highly expressive 'matrix' language (it makes extensive use of matrix and vector operators) with a huge library of statistical functions. However, expressivity requires a dynamic execution engine based on an 'infinite memory' model which is slow.

It also requires that expressions and function can be constructed by a program or introduced by an operator at runtime thus enforcing the an interpreted approach. This makes strighforward implementations of it slow. For programs that might have an equivalent in FORTRAN, that FORTRAN equivalent would be over 1000 times faster.

Lisp is a language with the same execution model, except the that it is even more general, and include extensive macro and object oriented feature. There are may flavors, but the main currents are Scheme (which is reductionist, favoring simplicity) and Common Lisp (the ISO standard which is extensive and highly concerned with efficient compilation).

None of these languages would be easy to fully translate, say, in C. To have the complete language you need, at least in part, to have the intepreting engine and the 'infinite memory' machine intimately combined with the generated code.
However, there is no reason for pieces of code which make no use of the generality (such as source code generation and execution at runtime) not to be compilable to code as fast as FORTRAN. In practice, this is a huge task. Nevertheless, it was achieved in a free implementation, for example in CMU CommonLisp, as I was delighted to learn when trying these benchmarks.

The semantics of R is a subset of the semantics of Scheme. It also includes, of course, a wealth of data types suitable for statistics. The semantics (expressive mechanisms) of CommonLisp are probably a superset of Scheme. This means that R is easy to express in Scheme (actually the engine of the free implementation is a Scheme engine) and perhaps easy to translate in CommonLisp. This later is interesting because of the availability of the efficient compiler.

So I arrived at this toy project, to check if such a route for the efficient compilation of R is possible.

Many R applications don't need speed. You can describe the job you need done so quickly that you rarely mind to wait a couple of seconds for the system to do it. However, there are also whole classes of applications where speed is necessary and if a complete porting of R on CommonLisp (really big project) would be done they would all become feasible for R users like myself.
tags common lisp  you need  the semantics  however there  engine and  have the  free implementation  for the  the efficient  efficient compilation  with the  1000 times  over 1000  

Download R2cl 0.1


 http://dan.corlan.net/R_to_common_lisp_translator/R2cl-0.1.tgz


Authors software

R2cl 0.1 (by Dr. Alexandru Corlan)
R2cl compiler is a minimal, proof of concept translator from the R or S language into Common Lisp.

An increase in speed of over 10

Shelisp 2 (by Dr. Alexandru Corlan)
Shelisp is a very short program that provides mechanisms for composing and running Unix shell (particularly bash) commands and constr


Similar software

R2cl 0.1 (by Dr. Alexandru Corlan)
R2cl compiler is a minimal, proof of concept translator from the R or S language into Common Lisp.

An increase in speed of over 10

GCL 2.6.2 (by Camm Maguire)
GCL is a Compiler and interpreter for Common Lisp

Emacs Common Lisp 20061030 (by Lars Brinkhoff)
Emacs Common Lisp is an implementation of Common Lisp, written in Emacs Lisp

CMU Common Lisp 19d (by Eric Marsden)
CMU Common Lisp is a free implementation of the Common Lisp programming language which runs on most major Unix platforms

GNU CLISP 2.41 (by Bruno Haible)
GNU CLISP is an ANSI Common Lisp implementation with an interpreter, compiler, debugger, object system (CLOS, MOP), sockets, fast big

Lush 1.2 (by Yann)
Lush project is an object-oriented programming language designed for researchers, experimenters, and engineers interested in large-sc

Dylan 1.0 beta1 (by Gwydion Dylan Maintainers)
Dylan is an advanced, object-oriented, dynamic language which supports the rapid development of programs.

When needed, the programme

Elk 3.99.7 (by Sam Hocevar)
Elk is an implementation of the Scheme programming language

Chicken 1.92 (by Felix)
CHICKEN is a compiler for the Scheme programming language

NTW Lisp 0.2.1 (by Ian Larsen)
NTW Lisp project is a server written in Common Lisp for applications that use the NTW protocol to communicate with a GUI client.

N


Other software in this category

FreeBASIC Compiler 0.17b (by Andre Victor)

Free Pascal Compiler 2.0.2 (by Dani?l Mantione)
Free Pascal (aka FPK Pascal) is a 32 or 64 bit (from 1.9.6) pascal compiler

Octave 2.0.17 (by linux)
GNU Octave is a high-level language, primarily intended for numerical computations

motor 3.4.0 (by Konstantin Klyagin)
Motor is a text mode based programming environment for Linux

Eleven 1.0 (by Joe Morrison)
Eleven is a programming language for creating robust, scalable web applications quickly and easily.

It offers a 20x programmer pro

    search


Featured Software

jEdit 4.3 pre8
jEdit is an Open Source text editor written in Java

Opera 9.02
Surf the Internet in a safer, faster, and easier way with Opera browser

GNU Aspell 0.60.4
GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell


Subscribe in Rojo
Google Reader
Add to My Yahoo!

Add to My AOL
Subscribe with Bloglines
Subscribe in NewsGator Online
Add 'nixbit linux software' to Newsburst from CNET News.com
del.icio.us nixbit linux software


Top tags