jon.recoil.org

Module Datalog.Schedule

type t
val saturate : rule list -> t

saturate rules is a schedule that repeatedly applies the rules in rules until reaching a fixpoint.

Note: saturate rules is equivalent to fixpoint (rules rules), but is (slightly) more efficient. It is not necessary to wrap a saturate schedule in a fixpoint.

val fixpoint : t list -> t

fixpoint schedules repeatedly runs the schedules in schedules until reaching a fixpoint.

Facts added by previous schedules in the list are visible.

type stats
val create_stats : ?with_provenance:bool -> database -> stats
val print_stats : Format.formatter -> stats -> unit
val run : ?stats:stats -> t -> database -> database

run schedule db runs the schedule schedule on the database db.

It returns a new database that contains all the facts in db, plus all the facts that were inferred by schedule.