View Source Guesswork.KnowledgeBase behaviour (Guesswork v0.6.0)

Represents a querable knowledge base.

Summary

Callbacks

Pulls all facts could match the supplied fact.

Pulls all falsehoods could match the supplied fact.

Pulls all rules could match the supplied fact.

Callbacks

Link to this callback

get_possible_facts(query)

View Source
@callback get_possible_facts(query :: Guesswork.Ast.Fact.t()) :: [Guesswork.Ast.Fact.t()]

Pulls all facts could match the supplied fact.

The only requirement is that all true matches be returned, so theoretically all the facts could simply be dumped by the this function.

Link to this callback

get_possible_falsehoods(query)

View Source
@callback get_possible_falsehoods(query :: Guesswork.Ast.Fact.t()) :: [
  Guesswork.Ast.Fact.t()
]

Pulls all falsehoods could match the supplied fact.

The only requirement is that all true matches be returned, so theoretically all the falsehoods could simply be dumped by the this function.

Link to this callback

get_possible_rules(query)

View Source
@callback get_possible_rules(query :: Guesswork.Ast.Fact.t()) :: [Guesswork.Ast.Rule.t()]

Pulls all rules could match the supplied fact.

The only requirement is that all true matches be returned, so theoretically all the rules could simply be dumped by the this function.