swipl

Bindings to SWI-Prolog for OCaml
IN THIS PACKAGE
Module Swipl . Syntax
val (/@) : string -> int -> fn

fn /@ arity mirrors the prolog syntax pred/arity and declares a prolog function named fn with arity arity.

Note: If you call this function before initialise you will segfault.

val (!) : string -> t

! atom creates a prolog term representing the atom atom.

Note: If you call this function before initialise you will segfault.

val app : ?module_:module_ -> fn -> t list -> t

app ?module_ fn args creates a prolog term that represents the symbolic expression module_:fn(args...).

val (&&) : t -> t -> t

t1 && t2 creates a prolog term that represents the conjunction of two prolog queries - i.e the prolog expression t1,t2.

val (||) : t -> t -> t

t1 || t2 creates a prolog term that represents the disjunction of two prolog queries - i.e the prolog expression t1; t2.