package datalog

  1. Overview
  2. Docs
type set

mutable set of term lists

val ask : db -> ?neg:literal list -> int array -> literal list -> set

Given a list of variables, and a list of literals that contain those variables, return a set. Each element of the set is an instantiation of the variables such that all instantiated literals are facts of the db. neg is an optional list of literals that must be false for an instantiation to be an answer. This is lazy, and will only be evaluated upon calls to iter, to_list or other similar functions. The answers will be cached in the set and readily available thereafter.

val iter : set -> (term array -> unit) -> unit

Evaluate the set by iterating on it

val to_list : set -> term array list

Convert to a list

val cardinal : set -> int

Number of elements of the set

val pp_plan : Format.formatter -> set -> unit

Print query plan

OCaml

Innovation. Community. Security.