View Source Wongi.Engine (Wongi.Engine v0.9.4)
A forward-chaining inference engine for Elixir.
A port of the Ruby library with the same name.
Summary
Functions
Returns an engine with the given fact added to the working memory.
Returns an engine with the given fact added to the working memory.
Returns an engine with the given rule installed.
Returns an engine with the given rule installed and the rule reference.
Returns a set of all facts matching the given template.
Returns a set of all facts matching the given template.
Creates a new engine instance.
Returns all production node references.
Returns an engine with the given fact removed from the working memory.
Returns an engine with the given fact removed from the working memory.
Returns a set of all tokens for the given production node reference.
Types
@type fact() :: {any(), any(), any()} | Wongi.Engine.WME.t()
@type rule() :: Wongi.Engine.DSL.Rule.t()
@type t() :: Wongi.Engine.Rete.t()
@type template() :: {any(), any(), any()} | Wongi.Engine.WME.t()
Functions
Returns an engine with the given fact added to the working memory.
Returns an engine with the given fact added to the working memory.
Returns an engine with the given rule installed.
See Wongi.Engine.DSL
for details on the rule definition DSL.
Returns an engine with the given rule installed and the rule reference.
The rule reference can be used to retrieve production tokens using tokens/2
.
See Wongi.Engine.DSL
for details on the rule definition DSL.
Returns a set of all facts matching the given template.
Returns a set of all facts matching the given template.
@spec new() :: t()
Creates a new engine instance.
Returns all production node references.
Returns an engine with the given fact removed from the working memory.
Returns an engine with the given fact removed from the working memory.
Returns a set of all tokens for the given production node reference.