 ;; Memoized partial computations to speed up acylic edge generation.
 (def #^HashMap *forward-reachability-cache* nil)
 (def #^HashMap *backward-reachability-cache* nil)
+(def #^HashMap *good-edge-cache* nil) ; Map from [var, to-val] to HashSet of unused edges.
 
 (defn forward-reachable-nodes-and-necessary-predecessors [var-name from-val]
   (util/cache-with *forward-reachability-cache* [var-name from-val]

             b (backward-sets b)]
         (and f b (empty? (clojure.set/intersection f b)))))
     (util/safe-get *simple-dtgs* var))))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Action Protocol ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

  (:require [edu.berkeley.ai.util :as util]
            [edu.berkeley.ai.util  [graphs :as graphs] [graphviz :as gv]]
            [exp [env :as env]  [hierarchy :as hierarchy] [sas :as sas] [sas-analysis :as sas-analysis]])
  (:import [java.util HashMap HashSet Collection IdentityHashMap]))


;; Attempt to do simplest thing that works for cyclic graphs.
