Java Expressions Library (JEL) home
Author: Konstantin Metlov
Description: JEL is a library, which allows to evaluate single-line arithmetic expressions. JEL is not an interpreter, it is a compiler. Expressions are compiled into Java bytecode, allowing to evaluate them fast. JEL supports all primitive Java types and allows to call both static and virtual methods of Java classes.
Keywords: Java, compiler, expression, single line, evaluate, JEL

# 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 Your 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 0.9.10

improved the size (by >30%, it is now <34k) and performance of the library, program is now represented by tree, new hand-written parser. For more details see RELEASE NOTES below. Because of massive changes this release may be unstable, in the case of problems please revert to JEL 0.9.9 (can be downloaded below), which is API compatible. Don't forget to report problems to mailing lists.

## Download JEL (Feb 13, 2002, version 0.9.10)

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

JEL is now compiled by JDK 1.2 compiler, but should work with JDK 1.1 VMs also. JEL is available in two forms:

- For UNIX download `jel-0.9.10.tar.gz` (329,118 bytes compressed, about 1.4 Mb uncompressed)
- For Windows download `jel-0_9_10.zip` (647,224 bytes compressed, about 1.4 Mb uncompressed)

Contents of both archives is exactly the same.

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

## Old releases

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 (rewrite of the code generator, .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.

JEL © 1998 — 2001 by Konstantin L. Metlov <metlov@fzu.cz>