next up previous
Next: Commands Up: Program description Previous: Implementation language

Rules and facts

The sentences introduced to the system must be implications (formed by an antecedent- conjunction of atoms - and a consecuent) or facts. The consecuent is a atom. Atoms are atomic sentences. The terms may be constants or variables. The atomic sentences or atoms, are formed by a predicate name which must be formed with small letters and a set of parenthetical terms separated by commas. The constants will be written with small letters and the variables with upper case letters.

The grammar for the rules and facts accepted by the system is :

expresion ->  atom                  /* facts */
            | antecedent '->' consecuent   /* rules */

consecuent -> atom

atom -> predicate_name '(' terms ')'

predicate_name -> SMALL_LETTER_NAME

antecedent ->  atom
             | atom '^' antecedent

terms ->  SMALL_LETTER_NAME            /* constant */
        | UPPER_CASE_LETTER_NAME          /* variable */ 
        | SMALL_LETTER_NAME ',' terms
        | UPPER_CASE_LETTER_NAME ',' terms

So that the forward chaining works correctly you must insert the rules before the facts because these ones cause the forward chaining of the rules.



David E. Losada Carril
Thu Oct 10 11:33:47 MET 1996