[Next] [Up] [Previous] [Contents]
Next: Definite clause grammar bodies Up: Formulas Previous: Atomic formulas   Contents

Clauses

The syntax of $ \alpha $Prolog program clauses is summarized by the following grammar:
$\displaystyle P$ $\displaystyle ::=$ $\displaystyle A \mid A \mathrel{{:}{-}}G \mid A \longrightarrow D$  

The first two forms are Horn clauses (expressed in implicational form). That is, they are either a single predicate (a fact) or a predicate qualified by a condition $ G$ (a rule). The third form is a definite clause grammar rule, which says that the nonterminal synbol $ A$ can be rewritten to the DCG body $ D$.



James Cheney 2003-10-23