package datalog

  1. Overview
  2. Docs

Module Logic.RewritingSource

Sourcetype rule = T.t * T.t
Sourcetype t

A rewriting system. It is basically a mutable set of rewrite rules.

Sourceval create : unit -> t

New rewriting system

Sourceval copy : t -> t

Copy the rewriting system

Sourceval add : t -> rule -> unit

Add a rule to the system

Sourceval add_list : t -> rule list -> unit
Sourceval to_list : t -> rule list

List of rules

Sourceval rewrite_root : t -> T.t -> T.t

rewrite the term, but only its root. Subterms are not rewritten at all.

Sourceval rewrite : t -> T.t -> T.t

Normalize the term recursively. The returned type cannot be rewritten any further, assuming the rewriting system is terminating

OCaml

Innovation. Community. Security.