next up previous

5.4 LHS SYNTAX

This section describes the syntax used on the LHS of a rule. The LHS of a CLIPS rule is made up of a series of conditional elements (CEs) that must be satisfied for the rule to be placed on the agenda. There are eight types of conditional elements: CEs, CEs, CEs, CEs, CEs, CEs, CEs, and CEs. The pattern CE is the most basic and commonly used conditional element. Pattern CEs contain constraints which are used to determine if any pattern entities (facts or instances) satisfy the pattern. The test CE is used to evaluate expressions as part of the patternmatching process. The and CE is used to specify that an entire group of CEs must all be satisfied. The or CE is used to specify that only one of a group of CEs must be satisfied. The not CE is used to specify that a CE must not be satisfied. The exists CE is used to test for the occurence of at least one partial match for a set of CEs. The forall CE is used to test that a set of CEs is satisfied for every partial match of a specified CE. Finally, the logical CE allows assertions of facts and the creation of instances on the RHS of a rule to be logically dependent upon pattern entities matching patterns on the LHS of a rule (truth maintenance).

Syntax

<conditional-element> ::= <pattern-CE> |
                          <assigned-pattern-CE> |
                          <not-CE> |
                          <and-CE> |
                          <or-CE> |
                          <logical-CE> |
                          <test-CE> |
                          <exists-CE> |
                          <forall-CE>

5.4.1 Pattern Conditional Element

5.4.2 Test Conditional Element

5.4.3 Or Conditional Element

5.4.4 And Conditional Element

5.4.5 Not Conditional Element

5.4.6 Exists Conditional Element

5.4.7 Forall Conditional Element

5.4.8 Logical Conditional Element

5.4.9 Automatic Addition and Reordering of LHS CEs

5.4.10 Declaring Rule Properties



next up previous