| Home | - | Documentation | - | Sources | - | Contributors | - | Related Links |
There are three main directories:
For compiling and running all code, some environment variables need to be set up. There are three variables used by the makefiles: JCHR_JAVA, JCHR_JAVAC and CLASSPATH. Depending on the JDK used, several variations are possible:
JCHR_JAVA=/usr/lib/jdk1.1.8/bin/java JCHR_JAVAC=/usr/lib/jdk1.1.8/bin/javac CLASSPATH=
JCHR_JAVA=/usr/lib/jdk1.1.8/bin/java JCHR_JAVAC=''jikes +E +P'' CLASSPATH=/usr/lib/jdk1.1.8/lib/classes.zip
JCHR_JAVA=/usr/lib/jdk1.3/bin/java JCHR_JAVAC=/usr/lib/jdk1.3/bin/javac CLASSPATH=/usr/lib/jdk1.3/jre/lib/rt.jar
JCHR_JAVA=/usr/lib/jdk1.3/bin/java JCHR_JAVAC=''jikes +E +P'' CLASSPATH=/usr/lib/jdk1.3/jre/lib/rt.jar
These settings should be placed in the .bashrc file or similar, so they don't have to be typed in each time. Of course, instead of /usr/local/jdkXX/, the correct path should be substituted.
To build all the sources, the following steps are necessary:
cd evaluator make jar
This compiles all files and builds evaluator.jar in the top-level directory.
cd compiler make jar
This compiles all files and builds compiler.jar in the top-level directory.
cd examples make build-all
This creates all Java files from the JCHR handlers, and compile them.
cd examples make init-regress
The output should look like this:
Initializing regression tests... bool fd leq min nqueens snqueens primes fdsearch env schur alldiff
No error messages should appear here. For each of the examples, this command creates a file `` regress.<EXAMPLE>'' containing the output from the evaluator.
For all applications in the examples directory, there is one single makefile. If <APP> is the name of one example (for example, `` fd'' or `` schur'', then the following commands are available:
Additionally, there are a few commands that work on all examples in one single call:
E.g., these commands rebuild the Finite Domain handler and compile and run the n-Queens application:
~/jack> cd examples ~/jack/examples> make SAMPLE=fd handler compile run Queen1 = 3 Queen2 = 1 Queen3 = 4 Queen4 = 2 Search completed successfully.