The Department of Computer Science & Engineering
cse@buffalo

CSE663: Advanced Knowledge Representation
Stuart C. Shapiro

Notes on Jess


Jess is a production system implemented in Java. The Manual for Jess Version 7.1p2, 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.
Setting JESS_HOME
You must set the environment variable JESS_HOME to /util/Jess71p2/

How to run Jess
From a shell command line, execute jess

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

Example Jess programs
Example Jess programs are available in the following directories:
In the Jess rule language:/util/Jess71p2/examples/jess
In XML:/util/Jess71p2/examples/xml
For embedding Jess in a Java program:/util/Jess71p2/examples/pricing_engine

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

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/Jess71p2/examples/jess/hello.clp]

Loading into interactive Jess
You can load (and run) a Jess file into an interactive Jess session by evaluating
      (batch file)
For example,
      (batch "/util/Jess71p2/examples/jess/hello.clp")

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

Yet another example
A Jess version of the brick stacking program of Ronald J. Brachman & Hector J. Levesque, Knowledge Representation and Reasoning, Morgan Kaufmann, 2004, Sect. 7.4 is at
      /projects/shapiro/CSE663/JessExamples/bricks.clp

Last modified: Wed Feb 3 18:25:14 2010
Stuart C. Shapiro <shapiro@cse.buffalo.edu>