Liking cljdoc? Tell your friends :D

naga.rules

Defines rule structures and constructors to keep them consistent

Defines rule structures and constructors to keep them consistent
raw docstring

bindings?clj/s

(bindings? b)

check-symbolclj/s

(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.
raw docstring

collect-patternsclj/s

(collect-patterns body)

Inputs: [body :- Body] Returns: [EPVPattern]

Recurses through a rule body to find all EPV Patterns

Inputs: [body :- Body]
Returns: [EPVPattern]

Recurses through a rule body to find all EPV Patterns
raw docstring

compatibleclj/s

(compatible x y)

create-programclj/s≠

clj
(create-program rules)
(create-program rules axioms)
cljs
(create-program G__6860)
(create-program G__6864 G__6865)

Inputs: ([rules :- [Rule]] [rules :- [Rule] axioms :- (s/maybe [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]] [rules :- [Rule] axioms :- (s/maybe [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.
raw docstring

dbgclj/s

(dbg x)

epv-pattern?clj/s

(epv-pattern? pattern)

find-matchesclj/s

(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
raw docstring

get-varsclj/s

(get-vars [f & r :as pattern])

mark-unboundclj/s

(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.
raw docstring

match?clj/s

(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?
raw docstring

named-ruleclj/s

(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.
raw docstring

operatorsclj/s


rclj/smacro

(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.
raw docstring

regen-rewriteclj/s

(regen-rewrite head body)

Rewrites rules that are generating new entities to avoid them in future iterations. This requires the generated entities to be subtracted from the patterns in the rule body.

Rewrites rules that are generating new entities to avoid them in future iterations.
This requires the generated entities to be subtracted from the patterns in the rule
body.
raw docstring

ruleclj/s≠

clj
(rule head body)
(rule head body name)
cljs
(rule G__6796 G__6797)
(rule G__6801 G__6802 G__6803)

Inputs: ([head body] [head body name]) Returns: Rule

Creates a new rule

Inputs: ([head body] [head body name])
Returns: Rule

Creates a new rule
raw docstring

simple-varsclj/s

(simple-vars pattern)

specialsclj/s


strip-specialclj/s

(strip-special s)

var-for*clj/s

(var-for* fv)

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close