     (graphs/compute-reachable-nodes-and-necessary-predecessors
      (map reverse (util/safe-get *simple-dtgs* var-name)) to-val)))
 
-(defn get-possibly-acyclic-edges
+#_ (defn get-possibly-acyclic-edges
   "Return a list of edges, where those provably on no acyclic s-t path have been eliminated.
    Do so in polynomial time, possibly missing some always-cyclic edges."  
   [var from-val to-val]

              *hla-cache*     (HashMap.)
              *forward-reachability-cache* (HashMap.)
              *backward-reachability-cache* (HashMap.)
              ]
;      (println "VVS"  *var-val-sets*)
      (let [goal-action (util/safe-singleton (get-in *extended-dtgs* [sas/goal-var-name sas/goal-false-val sas/goal-true-val]))

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

#_ (defn get-possibly-acyclic-edges
  "Return a list of new edges, where those provably on no acyclic s-t path have been eliminated.
   Do so in polynomial time, possibly missing some always-cyclic edges.  Only returns new edges for
   a particular to-val."  
  [var from-val to-val]
  (let [forward-sets  (forward-reachable-nodes-and-necessary-predecessors var from-val)
        backward-sets (backward-reachable-nodes-and-necessary-predecessors var to-val)]
    (filter
     (fn [[a b]]
       (let [e [a b to-val]]
         (when-not (.contains *used-edge-cache* e)
           (let [f (forward-sets a)
                 b (backward-sets b)]
             (when (and f b (empty? (clojure.set/intersection f b)))
               (.add *used-edge-cache* e)
               true)))))
     (util/safe-get *simple-dtgs* var))))

(defn get-possibly-acyclic-edges
  "Return a list of new edges, where those provably on no acyclic s-t path have been eliminated.
   Do so in polynomial time, possibly missing some always-cyclic edges.  Only returns new edges for
   a particular to-val."  
  [var from-val to-val]
  (let [k         [var to-val]
        cache-val #^HashSet (or (.get *good-edge-cache* k)
                                (let [v (HashSet. #^Collection
                                          (remove #(= (first %) to-val) (util/safe-get *simple-dtgs* var)))]
                                  (.put *good-edge-cache* k v)
                                  v))]
    (when-not (empty? cache-val)
      (let [forward-sets  (forward-reachable-nodes-and-necessary-predecessors var from-val)
            backward-sets (backward-reachable-nodes-and-necessary-predecessors var to-val)]
        (filter
         (fn [[a b :as e]]
           (when (.contains cache-val e)
             (let [f (forward-sets a)
                   b (backward-sets b)]
               (when (and f b (empty? (clojure.set/intersection f b)))
                 (.remove cache-val e)
                 true))))
         (util/safe-get *simple-dtgs* var))))))


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