package datalog

  1. Overview
  2. Docs
An in-memory datalog implementation for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

v0.6.tar.gz
md5=4a2d12d630a5edd694968675a84a3ef5
sha512=685c0e186705837cb3ac66df6e8011d9f6a9629484b3a813b767df95348d5a41f37301f3e199ed6c91a42a87d1563e8355377269176785b123eb297a5ad022d7

doc/datalog.caml_interface/Datalog_caml_interface/Rel1/index.html

Module Datalog_caml_interface.Rel1Source

Sourcetype 'a t
Sourceval name : _ t -> string

Name of the relation

Sourceval create : ?k:'a Univ.key -> string -> 'a t

New relation, with given name and argument

Sourceval get : 'a t -> Logic.T.t -> 'a option

Check whether this term is a "R(t)" with t an object packed with the appropriate key, and "R" the name of the given relation

Sourceval make : 'a t -> 'a -> Logic.T.t

Create a term from this relation description

Sourceval apply : 'a t -> Logic.T.t -> Logic.T.t

apply the relation symbol to some term

Sourceval find : Logic.DB.t -> 'a t -> 'a list

Iterate on all instances of the relation present in the DB

Sourceval subset : Logic.DB.t -> 'a t -> 'a t -> unit

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

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

The given function decides of the given relation (if it returns true for a constant, then the relation holds for this constant)

Sourceval add_list : Logic.DB.t -> 'a t -> 'a list -> unit

Add given list of axioms

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

Innovation. Community. Security.