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.unix/Datalog_unix/Make/argument-1-TD/Subst/index.html

Module TD.Subst

type t
type scope = int
type renaming
val empty : t

Empty subst

val bind : t -> T.t -> scope -> T.t -> scope -> t

Bind a variable,scope to a term,scope

val deref : t -> T.t -> scope -> T.t * scope

While the term is a variable bound in subst, follow its binding. Returns the final term and scope

val create_renaming : unit -> renaming
val reset_renaming : renaming -> unit
val rename : renaming:renaming -> T.t -> scope -> T.t

Rename the given variable into a variable that is unique within variables known to the given renaming

val eval : t -> renaming:renaming -> T.t -> scope -> T.t

Apply the substitution to the term. Free variables are renamed using renaming

val eval_lit : t -> renaming:renaming -> Lit.t -> scope -> Lit.t
val eval_lits : t -> renaming:renaming -> Lit.t list -> scope -> Lit.t list
val eval_clause : t -> renaming:renaming -> C.t -> scope -> C.t
val fmt : Format.formatter -> t -> unit
OCaml

Innovation. Community. Security.