package datalog

  1. Overview
  2. Docs

Module Datalog_caml_interface.Rel2Source

Sourcetype ('a, 'b) t
Sourceval name : (_, _) t -> string
Sourceval create : ?k1:'a Univ.key -> ?k2:'b Univ.key -> string -> ('a, 'b) t
Sourceval get : ('a, 'b) t -> Logic.T.t -> ('a * 'b) option
Sourceval make : ('a, 'b) t -> 'a -> 'b -> Logic.T.t
Sourceval apply : (_, _) t -> Logic.T.t -> Logic.T.t -> Logic.T.t
Sourceval find : Logic.DB.t -> ('a, 'b) t -> ('a * 'b) list
Sourceval subset : Logic.DB.t -> ('a, 'b) t -> ('a, 'b) t -> unit

subset db r1 r2 adds to db the axiom that r2(X,Y) :- r1(X,Y); in other words, r1 is a subset of r2 as a relation

Sourceval transitive : Logic.DB.t -> ('a, 'a) t -> unit

Axioms for transitivity are added to the DB

Sourceval tc_of : Logic.DB.t -> tc:('a, 'a) t -> ('a, 'a) t -> unit

tc_of db ~tc r adds to db axioms that make the relation tc the transitive closure of the relation r.

Sourceval reflexive : Logic.DB.t -> ('a, 'a) t -> unit

reflexive db r makes r reflexive in db, ie for all X, r(X,X) holds in db.

Sourceval symmetry : Logic.DB.t -> ('a, 'a) t -> unit

Axiom for symmetry (ie "r(X,Y) <=> r(Y,X)") added to the DB

Sourceval from_fun : Logic.DB.t -> ('a, 'b) t -> ('a -> 'b -> bool) -> unit

The given function decides of the given relation (if it returns true for a couple of constants, then the relation holds for those constants)

Sourceval add_list : Logic.DB.t -> ('a, 'b) t -> ('a * 'b) list -> unit

Add given list of axioms

Sourceval to_string : (_, _) t -> string
Sourceval fmt : Format.formatter -> (_, _) t -> unit
OCaml

Innovation. Community. Security.