evaluate-soft-work-set

clojure.contrib.datalog.softstrat

  • (evaluate-soft-work-set ws db)
  • (evaluate-soft-work-set ws db bindings)

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/datalog/softstrat.clj:144 top

(defn evaluate-soft-work-set
  ([ws db] (evaluate-soft-work-set ws db {}))
  ([ws db bindings]
     (let [query (:query ws)
           strat (:stratification ws)
           seed (seed-predicate-for-insertion query)
           seeded-db (project-literal db seed [bindings] is-query-var?)
           fun (fn [data]
                 (weak-consq-operator data strat))
           equal (fn [db1 db2]
                   (= (database-counts db1) (database-counts db2)))
           new-db (graph/fixed-point seeded-db fun nil equal)
           pt (build-partial-tuple query bindings)]
       (select new-db (literal-predicate query) pt))))
Vars in clojure.contrib.datalog.softstrat/evaluate-soft-work-set: defn let
Used in 0 other vars

Comments top

No comments for evaluate-soft-work-set. Log in to add a comment.