This document should help you to get you started quickly with the Zilonis Rules Engine.

Installation

What do I need to use Zilonis?

You must have a JRE 1.6 installed on your system. The environment variable JAVA_HOME must be set to point to the proper JDK installation directory.

How do I install Zilonis

  • Download the Zilonis binary distribution file: zilonis-XXX.tar.gz
  • Extract the contents in your Zilonis Installation directory
  • After installation the directory layout will be:
    binThe Zilonis startup script is in here
    clpSome clp examples
    libLibraries that Zilonis uses
    log Location where the log files are going to be written too

  • Include the extracted bin directory in the PATH environment


  • Running Zilonis

    All you have to do is make sure that you followed the installation instructions in the previous section and just run the "zilonis.sh" script.

    Your First Rules

    From the Lobby click on the bottom-right icon "Zilonis Shell". It will take you to the Zilonis Shell Screen, where you will encounter the "$" prompt sign.

    In there you have access to the Zilonis interpreter. To get started we will create a fact, type:

      $ (deffact (it is raining))

    Now we will check what facts are in our Working Memory type:

      $ (facts)
      (it is raining)
      For a total of 1 Fact.

    It is time to create our first rule:

      
      $ (defrule rule1
                 (it is raining)
              =>
                 (assert (you are wet)))
      

    Try now

      $ (run)
      $ (facts)
      (it is raining)
      (you are wet)

    It asserted to the Working Memory that you are wet!
    Let's add another rule:

      
      $ (defrule rule3
                 (you are wet)
              =>
                 (printout t "You should buy an umbrella."))
      $ (run)
      You should buy an umbrella.
      

    You can continue learning more about Zilonis in the tutorial