ClauseListener

interface ClauseListener

A visitor over Clauses, dispatching to a specific callback depending on the clause's concrete kind (onDirective/onFact/onRule/onClause for anything else), via listen.

See also

Inheritors

Functions

Link copied to clipboard
open fun listen(clause: Clause)

Dispatches clause to onDirective/onFact/onRule/onClause, depending on its concrete kind.

Link copied to clipboard
abstract fun onClause(clause: Clause)

Invoked when listening any Clause that is neither a Directive, Fact, nor Rule.

Link copied to clipboard
abstract fun onDirective(directive: Directive)

Invoked when listening a Directive (a :- Goal clause).

Link copied to clipboard
abstract fun onFact(fact: Fact)

Invoked when listening a Fact (a clause with an empty body).

Link copied to clipboard
abstract fun onRule(rule: Rule)

Invoked when listening a Rule (a clause with a non-empty body, other than a Directive).