ExDatalog.Engine behaviour (ExDatalog v0.2.0)

Copy Markdown View Source

Behaviour for pluggable Datalog evaluation backends.

An engine takes a compiled IR program and evaluation options, then produces a result containing all derived facts. The default engine is ExDatalog.Engine.Naive, which implements semi-naive fixpoint evaluation.

Summary

Types

ir()

@type ir() :: ExDatalog.IR.t()

opts()

@type opts() :: keyword()

reply()

@type reply() :: {:ok, ExDatalog.Result.t()} | {:error, term()}

Callbacks

evaluate(ir, opts)

@callback evaluate(ir(), opts()) :: reply()

name()

@callback name() :: String.t()