Octave language compilation into Java bytecode

David Bateman David.Bateman at motorola.com
Tue Sep 23 03:51:56 CDT 2008


Igor V. Burago wrote:
> Dear John Eaton, dear members of the maintainers mailing list,
>
> I am a third-year student of Far Eastern National University in
> Vladivostok, Russia. My major is Applied Mathematics (System
> Programming).
>
> I have an interest in high-level computational languages such as
> MATLAB-language. I searched the Internet for opensource languages of
> this kind which both would be efficient in execution and flexible in
> use. It looks like Octave is one of the most long-range computer
> languages in the field of computations because it's very similar to
> popular MATLAB-language and it has strong library of built-in
> functions and scripts.
>
> Unfortunately, still there is no way to compile Octave programs for
> faster execution that is very important sometimes. It seems to me that
> Java bytecode might be a good solution for this problem. Java bytecode
> is highly portable, fast, it has well optimized garbage collection
> and, in addition, it enables effective integration of mathematical
> computations with popular programming languages.
>
> So I've decided to start developing a compiler of Octave language into
> Java bytecode as my university project.
>
> In this connection I would wish to get answers to the following questions.
> 1) What is your attitude to this project? How could it be made in a
> rational way that would be helpful for community?
> 2) Is there a complete description of Octave language itself (not a
> user manual)?
> 3) Would it be useful to integrate my work into GNU/Octave developing?
>   
You should look at the following resources

http://www.ruena.de/publications.html

which includes a basic octave compiler and type estimator, though the 
type estimator isn't correctly implemented as in fact you can't treat 
double integer values as int32 due to overflow issues.

ftp://ftp.stratego-language.org/pub/stratego/SUD05/octave-compiler.pdf

Though this project seems to be dead. And you should check the thread

http://www.nabble.com/octave-and-LLVM-google-summer-of-code-project-to16565922.html

where the LLVM compiler is considered for use as the Octave JIT with 
links to a FreeMat implementation that might be used as a basis for 
this. My feeling is that LLVM might be a better choice that Java byte 
code, due to FreeMat's choice. See the discussion at

http://freemat-blog.blogspot.com/2008/02/why-jit-how-to-jit.html

In any case its also my opinion that the Octave tree walker class needs 
to be rewritten prior to the inclusion of a JIT so that the tree walker 
can be dynamically replaced within Octave. This would also be useful for 
a profiler and an Octave to C++ compiler.

Regards
David



-- 
David Bateman                                David.Bateman at motorola.com
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



More information about the Octave-maintainers mailing list