Defines rule structures and constructors to keep them consistent
Defines rule structures and constructors to keep them consistent
(check-symbol sym)
Asserts that symbols are unbound variables for a query. Return true if it passes.
Asserts that symbols are unbound variables for a query. Return true if it passes.
(create-program rules axioms)
Inputs: [rules :- [Rule] axioms :- [Axiom]] Returns: Program
Converts a sequence of rules into a program. A program consists of a map of rule names to rules, where the rules have dependencies.
Inputs: [rules :- [Rule] axioms :- [Axiom]] Returns: Program Converts a sequence of rules into a program. A program consists of a map of rule names to rules, where the rules have dependencies.
(find-matches a [nm sb])
Inputs: [a :- EPVPattern [nm sb] :- [(s/one s/Str "rule-name") (s/one Body "body")]] Returns: [RulePatternPair]
returns a sequence of name/pattern pairs where a matches a pattern in a named rule
Inputs: [a :- EPVPattern [nm sb] :- [(s/one s/Str "rule-name") (s/one Body "body")]] Returns: [RulePatternPair] returns a sequence of name/pattern pairs where a matches a pattern in a named rule
(mark-unbound head body)
Convert a head to use fresh vars for any vars that are unbound. Scans the vars in the body to identify which vars are unbound.
Convert a head to use fresh vars for any vars that are unbound. Scans the vars in the body to identify which vars are unbound.
(match? a b)
Inputs: [a :- EPVPattern b :- EPVPattern] Returns: s/Bool
Does pattern a match pattern b?
Inputs: [a :- EPVPattern b :- EPVPattern] Returns: s/Bool Does pattern a match pattern b?
(named-rule name {:keys [head body salience downstream]})
Inputs: [name :- Rule {:keys [head body salience downstream]} :- s/Str] Returns: Rule
Creates a rule the same as an existing rule, with a different name.
Inputs: [name :- Rule {:keys [head body salience downstream]} :- s/Str] Returns: Rule Creates a rule the same as an existing rule, with a different name.
(r & [f :as rs])
Create a rule, with an optional name. Var symbols need not be quoted.
Create a rule, with an optional name. Var symbols need not be quoted.
(rule head body)
(rule head body name)
(rule G__954 G__955)
(rule G__959 G__960 G__961)
Inputs: ([head body] [head body name]) Returns: Rule
Creates a new rule
Inputs: ([head body] [head body name]) Returns: Rule Creates a new rule
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close