View Source Guesswork.KnowledgeBase.Collection (Guesswork v0.4.4)

Allows for the easy creation of Guesswork.KnowledgeBase by using the deffact/1, deffalsehood/1, and defrule/2 macros in modules that invoke use Guesswork.KnowledgeBase.Collection.

Currently, everything is stored in the module's functions using a Guesswork.KnowledgeBase.Collection.Store that is created at compile time. As such, the collection is not mutable.

Summary

Functions

Adds a new Guesswork.Ast.Fact to the collection as a true fact using the supplied arguments. All arguments must concrete.

Adds a new Guesswork.Ast.Fact to the collection as a falsehood using the supplied arguments. All arguments must concrete.

Adds a new Guesswork.Ast.Rule to the collection.

Functions

Link to this macro

deffact(relationship, args)

View Source (macro)

Adds a new Guesswork.Ast.Fact to the collection as a true fact using the supplied arguments. All arguments must concrete.

Link to this macro

deffalsehood(relationship, args)

View Source (macro)

Adds a new Guesswork.Ast.Fact to the collection as a falsehood using the supplied arguments. All arguments must concrete.

Link to this macro

defrule(name, args, expr)

View Source (macro)

Adds a new Guesswork.Ast.Rule to the collection.