Edit me

Facts are clauses that unconditional hold; they are rules with a head, but no rule body. In facts, all arguments must be constant terms.

In the example,

.decl A(x:number, y:number)  // declaration of relation A
A(1,2).                      // facts of relation A
.output A

the relation A has two facts: A(1,2). and A(2,3). Note that facts can also be loaded with the input directive.


In the following, we define facts more formally using syntax diagrams and EBNF. The syntax diagrams were produced with Bottlecaps.

Qualifier Name

A qualified name is a sequence of identifiers separated by . to disambiguate relations that are instantiated by components.

qualified_name ::= IDENT ( '.' IDENT )*


An atom is a relation name followed by its arguments. The arguments must be constants. Nullary relations have no arguments.


atom ::= qualified_name '(' ( argument ( ',' argument )* )? ')'


A fact is an atom followed by a dot.


fact ::= atom '.'