Structs

The following structs are available globally.

  • A statement whose head is true given that its body is true. When the body is empty, a clause is commonly called a fact. Otherwise, it is called a rule. Clause is often used with unification variables such that conditional truths can be expressed, such as grandparent(A, B) :- parent(A, X), parent(X, B).

    See more

    Declaration

    Swift

    public struct Clause<Atom: Hashable>
  • The data type used to represent atoms and compound terms. Takes the form bar or foo(bazz, buzz) for any arity. Note that an atom is just a special case of a compound term with 0 arguments.

    See more

    Declaration

    Swift

    public struct Term<Atom: Hashable>
  • A logic System, defined by a collection of Clauses, that provides a mechanism for querying to learn facts about the system.

    See more

    Declaration

    Swift

    public struct System<Atom: Hashable>
  • The name-arity signature of a Term. Defines a class of Terms that can potentially be unified with each other.

    See more

    Declaration

    Swift

    public struct Functor<Atom: Hashable>