Structs
The following structs are available globally.
-
A statement whose
See morehead
is true given that itsbody
is true. When thebody
is empty, a clause is commonly called afact
. Otherwise, it is called arule
.Clause
is often used with unification variables such that conditional truths can be expressed, such asgrandparent(A, B) :- parent(A, X), parent(X, B)
.Declaration
Swift
public struct Clause<Atom: Hashable>
-
The data type used to represent atoms and compound terms. Takes the form
See morebar
orfoo(bazz, buzz)
for any arity. Note that an atom is just a special case of a compound term with 0 arguments.Declaration
Swift
public struct Term<Atom: Hashable>
-
A logic
See moreSystem
, defined by a collection ofClauses
, that provides a mechanism for querying to learn facts about the system.Declaration
Swift
public struct System<Atom: Hashable>