The Department of Computer Science & Engineering
cse@buffalo

CSE663: Advanced Knowledge Representation
Stuart C. Shapiro
Fall, 2004

Notes on Jess


Jess is a production system implemented in Java. The Manual for Jess Version 6.1p7, which is "the latest stable release version of Jess" [Online Jess Documentation web page], and the version we have installed on the CSE department computers is available on-line.
How to run Jess
From a shell command line, execute
      java -classpath /util/java/Jess61p7/jess.jar jess.Main

How to terminate Jess
From the Jess prompt, enter
      (exit)

Example Jess programs
Example Jess programs are available in the directory
      /util/java/Jess61p7/examples/

Running a prepared Jess program
If you have a Jess program in a file, you can execute it by entering the Unix shell command
      java -classpath /util/java/Jess61p7/jess.jar jess.Main file
      try
      java -classpath /util/java/Jess61p7/jess.jar jess.Main /util/java/Jess61p7/examples/hello.clp

A Jess alias
I recommend you create the following alias (in your .cshrc file):
      alias jess java -classpath /util/java/Jess61p7/jess.jar jess.Main \!\*
That way, you can run Jess interactively by executing the shell command
      jess
and you can run a prepared Jess program by executying the shell command
      jess file

Interacting with Jess
You interact with Jess by entering Lisp-like expressions at the Jess prompt, for example, try
      (printout t "Hello, world!" crlf)
           [from the example, /util/java/Jess61p7/examples/hello.clp]

Loading into interactive Jess
You can load (and run) a Jess file into an interactive Jess session by evaluating
      (batch file)

Another example
Another example Jess program is at
      /projects/shapiro/CSE663/birds.clp

Yet another example
A Jess version of the brick stacking program of B & L, Sect. 7.4 is at
      /projects/shapiro/CSE663/bricks.clp

Last modified: Thu Oct 14 13:27:41 EDT 2004
Stuart C. Shapiro <shapiro@cse.buffalo.edu>