View Source Guesswork.KnowledgeBase behaviour (Guesswork v0.8.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

get_possible_facts(query)

@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.

get_possible_falsehoods(query)

@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.

get_possible_rules(query)

@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.