Rule Languages

Language matters. Although some rule engines use flexible parsers that can read different rule languages, I suggest you choose one language suited for your organization and processes. Don't let anybody with a cool tool blend you...


What's Prolog?

Programming in logic - a programming language. A fine language, many free and commercial resources available. See the bibliography for details. Prolog is an ISO-standard!!

In Prolog programs, you define facts, relationsships between facts and rules. You then ask the Prolog system wether certain queries can be satisfied using those facts, relationships and rules. Look a simple family database:

person( bill ).
person( mary ).
father( bill, mary ).

?- father( X, mary)
X = bill

?- person( X )
X = bill
X = mary

The "?-" symbolizes a query, an upper case letter denotes a variable, which the Prolog system tries to instantiate with something it can derive from its facts, relationsships and rules.

Prolog uses backtracking, recursive definitions and instantiation as core concepts.

Some important links:

  • Clocksin-Mellish: Programming in Prolog. Old but still a milestone in programming literature. Springer Verlag, 2nd Edition 1984.
  • Learn Prolog Now. A cool online resource on Prolog.
  • The Prolog ISO Standard

Many more links in the bibliography!


What's OPS5?

OPS5 was the first production system language based on the Rete Algorithm and the first AI language to succeed in commercial application. A quote from a RuleWorks, a successor of OPS5:

It was created at Carnegie Mellon University in the late 1970s and early 1980s by Charles Forgy, John McDermott, the late Allen Newell, and Mike Rychener. Publication of Forgy's OPS5 User's Manual in 1981 established a commonly used standard for the language. OPS5 is characterized by:

  • A global database, called working memory.
  • Program statements called condition-action rules that match patterns in working memory and then perform actions that change working memory.
  • Execution order that is not procedural, but is driven by the data in working memory. The order in which rules are executed is controlled by the recognize-act cycle.

(Formerly quite famous) Dr. John McDermott once implemented a rule-based configurer for computer systems based in OPS5 - the first commercial expert system

Btw: I used OPS5 myself extensively to implement chemical expert systems. Believe me, VAX were really great machines...

Links:


What's CLIPS?

A former NASA project (you know NASA, don't you? Flying to the moon and back obviously needs expert systems...), C Language Integrated Production System.

CLIPS is currently maintained independently from NASA as public domain software.

Its key features are:

  • Knowledge Representation: CLIPS provides a cohesive tool for handling a wide variety of knowledge with support for three different programming paradigms: rule-based, object-oriented and procedural. Rule-based programming allows knowledge to be represented as heuristics, or "rules of thumb," which specify a set of actions to be performed for a given situation. Object-oriented programming allows complex systems to be modeled as modular components (which can be easily reused to model other systems or to create new components). The procedural programming capabilities provided by CLIPS are similar to capabilities found in languages such as C, Java, Ada, and LISP.
  • Portability: CLIPS is written in C for portability and speed and has been installed on many different operating systems without code changes. Operating systems on which CLIPS has been tested include Windows 95/98/NT, MacOS X, and Unix. CLIPS can be ported to any system which has an ANSI compliant C or C++ compiler. CLIPS comes with all source code which can be modified or tailored to meet a user's specific needs.
  • Integration/Extensibility: CLIPS can be embedded within procedural code, called as a subroutine, and integrated with languages such as C, Java, FORTRAN and ADA. CLIPS can be easily extended by a user through the use of several well-defined protocols.

Quoted from CLIPS Home (What is CLIPS?), for many more details.


What's JESS?

JESS is a Java version of CLIPS.

More on Rete History