(antecedent-step program state gen-predicate)
Processes one particular antecedent of a rule, adding or removing from the current set of viable bindings. gen-predicate, as the name suggests, must be a generalized predicate. Returns the new state blob.
Processes one particular antecedent of a rule, adding or removing from the current set of viable bindings. gen-predicate, as the name suggests, must be a generalized predicate. Returns the new state blob.
(query program q)
(query program q init-bindings)
Entry to the QSQR algorithm. Defaults to no initial bindings, but a set may be passed in: #{ {'?lvar-1 some-value, ...} ...}. Returns, in vector form, derived relations for the query, respecting init-bindings constraints.
Entry to the QSQR algorithm. Defaults to no initial bindings, but a set may be passed in: #{ {'?lvar-1 some-value, ...} ...}. Returns, in vector form, derived relations for the query, respecting init-bindings constraints.
(query* program state q)
Top of the QSQR algorithm. Takes a snapshot of current state, runs query-step on the current predicate, and returns if no new relations have been derived. q must be a generalized predicate.
Top of the QSQR algorithm. Takes a snapshot of current state, runs query-step on the current predicate, and returns if no new relations have been derived. q must be a generalized predicate.
(query-step program state query)
Grabs all rules relevant to the current query, and iterates over them, returning a new state containing the union of the bindings given by processing each rule.
Grabs all rules relevant to the current query, and iterates over them, returning a new state containing the union of the bindings given by processing each rule.
(rule-step program query state rule)
Processes one particular rule whose head matches the current predicate, query. query should be a generalized predicate.
Processes one particular rule whose head matches the current predicate, query. query should be a generalized predicate.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close