GNU project

Java Expressions Library

What is JEL ?

JEL is the library for evaluating a simple single line expressions in Java. There is certain class of tasks where user should be given a possibility to enter an expression of his own into the program. Typical examples include : plotting user-defined functions, fitting the data by the arbitrary user-defined functions, calculation of integrals and solving differential equations involving the user-defined functions... and many many more.... The key term above is the "evaluation of the user-defined functions", which is exactly what JEL is supposed to do for You.

The key feature of JEL is the fact that it is a compiler !!! To write the interpreter for expressions is the task, close to trivial but incurs a HUGE perfomance penalty due to the fact that Java is interpreted language itself. JEL, in contrary, compiles expressions directly to Java bytecodes, allowing their fast evaluation. Moreover, if user's Java virtual mashine has JIT compiler, expressions are transparently compiled into the native machine code, resulting in performance HIGHER that for most C written interpreters (plus JEL do not require recompilation when transferred from platform to platform).

The complete list of JEL features is given in its manual.

New features in the last version 2.0.1

GPLv3 license; security context inheritance, allowing for seamless usage in signed Java Applets (or other environment with SecurityManager enabled).

Download JEL (Oct 12, 2007 version 2.0.1)

Be sure You have read and understand the terms of the GNU General Public License.

JEL is now (since the version 2.0.1) is licensed under GPLv3. JEL is available in two forms:

Contents of both archives is exactly the same.

Also available online : |README| MANUAL|RELEASE NOTES|

Old releases

2.0.0 (.tar.gz, zip); 0.9.11 (.tar.gz, zip); 0.9.10 (parser rewrite, .tar.gz, zip); 0.9.9 (.tar.gz, zip); 0.9.8 (.tar.gz, zip); 0.9.7 (.tar.gz, zip); 0.9.6 (.tar.gz, zip); 0.9.5 (.tar.gz, zip); 0.9.4 (.tar.gz, zip); 0.9.3 (buggy, .tar.gz, zip); 0.9.1 (.tar.gz, zip); 0.9.0 (code generator rewrite, .tar.gz, zip); 0.8.3 (.tar.gz, zip); 0.8.3-JDK1.2 (.tar.gz, zip); 0.8.1 (.tar.gz, zip); 0.8.1-JDK1.2 (.tar.gz, zip); 0.8 (.tar.gz, zip); 0.2 (.tar.gz, zip); 0.1 (.tar.gz, zip);

Mailing lists

If there is a need, don't hesitate to post to these lists. I (KLM) always monitor them.

Help-JEL
Please ask here about things JEL supposedly does, but You don't know how to make it to.
Bug-JEL
Please report bugs (anything that does not work as You expect it) to this list.

Other files related to JEL (unsupported)

lcomp_for_JEL.tar.gz
This is a prototype logical expressions compiler for JEL. The code of this prototype is now completely integrated into the main branch. However, if You would like to understand how logical expressions are compiled You may find useful to look at this prototype. The main logic occupies about 30 lines of code, don't be confused by relatively large archive size, it's parser which makes the archive heavier.
d2i_ms_bug.tar.gz
This archive holds the test case for "d2i instruction bug" in Microsoft JIT for Microsoft Java. This bug makes one of the tests in JEL testsuite fail when run on Microsoft Java VM with JIT compiler enabled. This bug is not fixed. As a workaround You may want to disable JIT when running JEL in MS Java VM. I did NOT submitted description of this bug to MS (You can do it). Use Microsoft products at Your own risk.

Other JVM's and JIT's tested (Blackdown Linux port of SUN's JDK with "tya" JIT, HP UX JDK with HP JIT, and most JVM's in interpreted mode) are free of this bug. The best way to see if JEL runs on Your JVM is to run JEL testsuite (now includes about 100 tests and instantiates close to 1000 different expressions). If some tests are failing -- tell me about it..

Legal

JEL is distributed to You under terms of the GNU General Public License. This means it is "free software" . However, any program, using JEL MUST be the "free software" as well.

I would be very happy to consider requests for JEL enchancements and modifications (to fit some particular purpose), syntax of the input language, for example, can be easily changed... Contact me directly if You need customized, supported version of JEL.