Definite Clause Deduction
Tutorial Five (Supplementary): Syntax
For the most part, the syntax that the applet uses is the syntax used by CILog. However, it does not implement all of CILog's built-in features and functionality. There are three components in the language: terms, atoms, and clauses.
Terms: A term is a variable, a constant, or a compound term. A variable is a sequence of alphanumeric characters that starts with an uppercase letter. The only exception is "_", which is a variable that can unify with anything. A constant is either a sequence of alphanumeric characters starting with a lowercase letter or an integer. Finally, a compound term has the form f(t1,...,tn), where f is a function symbol (a sequence of alphanumeric characters starting with a lowercase letter) and the ti are terms. However, arithmetic expressions are also considered to be compound terms. Some atoms require arithmetic expressions as arguments. The infix functions "+", "-", "*", and "mod" are implemented, with the usual interpretation.
Atoms: Atoms, also called goals, are almost identical in syntax to compound terms. They are of the form p(t1,...,tn), where p is a predicate symbol (a sequence of alphanumeric characters starting with a lowercase letter) and the ti are terms. It is also possible to have a goal with no terms and only a predicate symbol. As with compound terms, there are also (infix) built-in predicates:
Clauses: Clauses, which are also called rules, are made up of two parts. The first part, the head, is simply a goal. Every clause must have a head, and must end with a period. The body of a clause is a conjunction of atoms g1 & ... & gn. Thus, the clause is either of the form h. or h <- b where h is the head of the clause and b is the body.
|Main Tools: Graph Searching | Consistency for CSP | SLS for CSP | Deduction | Belief and Decision Networks | Decision Trees | Neural Networks | STRIPS to CSP|