This page jumps into downloading and using Clara. Some new users may be interested in learning more about Clara’s approach to rules.
Let’s get started! The first thing you’ll need to do is bring Clara into your project. You can do this in Leiningen:
or to your Maven POM:
Your first rules
Clara rules live in a Clojure namespace and can be treated like any other code.
Let’s look at a simple, complete example using Clara:
Now let’s run those rules! We can do so from Clojure:
Or from Java:
This program will simply print the following:
Of course, a real rule set would infer new knowledge and offer ways to query it.