In a declarative programming style, the raw material comprises mainly business rules and facts. A business rule is a statement derived from propositional and first-order logic (for example, if <conditions>, then <actions>) to express system knowledge. The inference engine applies pattern matching algorithms on rules and data facts present in the working memory to infer conclusions that lead to actions. Facts are mainly expressed as plain Java object models:
Rules reside in a space called the production memory, whereas facts are kept in the working memory. On applying pattern-matching algorithms, new facts can be generated, updated or removed from the working memory. Two rules are said to be in conflict when they both are true for the same fact assertion--an Agenda is important to manage execution orders in case of conflicts...