Liking cljdoc? Tell your friends :D

eva.query.dialect.translation.compile.pass1


$->?src*clj

($->?src* $s)

Takes a sequence of $* symbols and returns a map from them to ?src__ symbols.

Takes a sequence of $* symbols and returns a map from them to ?src__ symbols.
sourceraw docstring

->where-ruleclj

(->where-rule query)

Given a :find clause and :where clause, this generates a new rule by embedding all the expressions as the antecedents of a new rule, with a new rule consequent defined containing the variables designated of interest by the :find clause.

Given a :find clause and :where clause, this generates a new rule by
embedding all the expressions as the antecedents of a new rule, with a new rule
consequent defined containing the variables designated of interest by the :find
clause.
sourceraw docstring

->where-rule-varsclj

(->where-rule-vars find-lvars input-lvars)

Produce a datastructure of spec-conformant rule-vars given the find-lvars and input-lvars of a where clause.

Produce a datastructure of spec-conformant rule-vars given the find-lvars and
input-lvars of a where clause.
sourceraw docstring

create-?src-varsclj

(create-?src-vars rule-srcs default-src-var clauses-ast where-clause?)
source

default-src-varclj

(default-src-var query rule)
source

insist-no-$s-remainingclj

(insist-no-$s-remaining rule-name clauses)
source

lvar-is-src-var?clj

(lvar-is-src-var? lvar)

Is it a ?src__ lvar?

Is it a ?src__ lvar?
sourceraw docstring

pred-info->pred-gensclj

(pred-info->pred-gens sym->pred-info)

Pass in the map of predicate symbols to predicate information maps, and get out a map of predicate symbols to functions that generate the appropriate Predicate objects for the datalog engine.

Pass in the map of predicate symbols to predicate information maps,
and get out a map of predicate symbols to functions that generate the
appropriate Predicate objects for the datalog engine.
sourceraw docstring

pred-mergeclj

(pred-merge map-1 map-2)

As we process the query, we build up maps containing information about the predicates used in the query: which of its variables are required, how many arguments are given to the predicate, and whether the predicate is extensional, evaluable, or a rule reference. When distinct instances of the predicate are encountered, the maps are merged: the resulting map should be the same, but with the union of the required-args data from the original two. In addition, equality is insisted for the types in the two maps and the argument counts in the two maps.

As we process the query, we build up maps containing information about the
predicates used in the query: which of its variables are required, how many arguments
are given to the predicate, and whether the predicate is extensional, evaluable,
or a rule reference. When distinct instances of the predicate are encountered,
the maps are merged: the resulting map should be the same, but with the union
of the required-args data from the original two. In addition, equality is insisted
for the types in the two maps and the argument counts in the two maps.
sourceraw docstring

preprocess-where-with-rulesclj

(preprocess-where-with-rules query)

Handles the implicit '$ by checking the entire query and body of rules for any data patterns. If an implicit '$ is required, this makes it explicit, handles defining (or not) default src-vars for the where body and for the individual rules. Returns a (possibly modified) query-ast, a rule derived from the where body, and a map containing (possibly) default src vars; one for the where, one for the rules: {:keys [where rules]}.

Handles the implicit '$ by checking the entire query and body of rules for any data patterns.
If an implicit '$ is required, this makes it explicit, handles defining (or not) default
src-vars for the where body and for the individual rules. Returns a (possibly modified)
query-ast, a rule derived from the where body, and a map containing (possibly) default src vars;
one for the where, one for the rules: {:keys [where rules]}.
sourceraw docstring

process-clausecljmultimethod

source

process-clausesclj

(process-clauses clauses default-src-var datom-pred-sym)

Recursive depth-first pass of ast, generating a map with the keys :clauses, :rules, :sym->pred-info, and :sym->evals. :sym->pred-info is a map from predicate symbols to consistency-verified information maps (see pred-merge) for each predicate. :sym->evals is a map from predicate symbols to appropriate Evaluable objects. :rules is just a collection of expressions encoding all rule declarations created while traversing (for example, by processing an orjoin): [(rule-pred & args) [& clauses]].

Recursive depth-first pass of ast, generating a map with the keys :clauses,
:rules, :sym->pred-info, and :sym->evals. :sym->pred-info is a map from predicate
symbols to consistency-verified information maps (see pred-merge) for each predicate.
:sym->evals is a map from predicate symbols to appropriate Evaluable objects. :rules
is just a collection of expressions encoding all rule declarations created while traversing
(for example, by processing an orjoin): [(rule-pred & args) [& clauses]].
sourceraw docstring

process-queryclj

(process-query query)
source

process-ruleclj

(process-rule rule default-src-var datom-pred-sym)
source

src-lvarclj

(src-lvar)

Gensyms a new ?src__ lvar

Gensyms a new ?src__ lvar
sourceraw docstring

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

× close