package datalog

  1. Overview
  2. Docs

Module Logic.IndexSource

Parameters

Signature

Sourcetype t

A set of term->data bindings, for efficient retrieval by unification

Sourceval empty : unit -> t

new, empty index

Sourceval copy : t -> t

Recursive copy of the index

Sourceval clear : t -> unit
Sourceval add : t -> T.t -> Data.t -> t

Add the term->data binding. This modifies the index!

Sourceval remove : t -> T.t -> Data.t -> t

Remove the term->data binding. This modifies the index!

Sourceval generalizations : ?oc:bool -> t -> scope -> T.t -> scope -> (Data.t -> Subst.t -> unit) -> unit

Retrieve data associated with terms that are a generalization of the given query term

Sourceval unify : ?oc:bool -> t -> scope -> T.t -> scope -> (Data.t -> Subst.t -> unit) -> unit

Retrieve data associated with terms that unify with the given query term

Sourceval iter : t -> (T.t -> Data.t -> unit) -> unit

Iterate on bindings

Sourceval size : t -> int

Number of bindings

OCaml

Innovation. Community. Security.