                                         (let [moves-per-t (map
                                                             (fn [[tprev [tprevval _mprev]]
                                                                  [tnext [tnextval mnext]]]
+                                                              ;todo: translate witness edges and states back to their original versions
                                                               [[tprev tprevval] [tnext tnextval] mnext])
                                                             (butlast all-steps)
                                                             (rest all-steps))]

                          (map (fn [ha]
                                 [(:id ha) (:ha-type ha)])
                               (vals ha-vals))))
          ;ha-defs (ha/spy "linearize time" (time (desugar/linearize ha-defs)))
          ;z3 (update-ha-defs z3 ha-defs)
          entry-time (apply max (map :entry-time (vals ha-vals)))
          [ha-vals tr-caches] (heval/init-has ha-defs (vals ha-vals) entry-time)
          config {:objects    ha-vals

                                            (.mkTactic ctx "propagate-values")
                                            (.mkTactic ctx "solve-eqs")
                                            (.mkTactic ctx "tseitin-cnf")
                                            (.cond ctx (.mkProbe ctx "is-lia")
                                                   (.mkTactic ctx "qflia")
                                                   (.cond ctx (.mkProbe ctx "is-nra")
                                                          (.orElse ctx
                                                                   (.mkTactic ctx "qfnra")
                                                                   (.mkTactic ctx "qfnra-nlsat"))
                                                          (.fail ctx)))]))
        s (.mkSolver ctx stacs)
        oparams (.mkParams ctx)
        o nil #_(.mkOptimize ctx)
        z3 (assoc z3 :optimizer o :solver s :last-t nil :prev-last-t nil)
        ret (func z3)]
    (Global/setParameter "pp.decimal" "true")
    (Global/setParameter "verbose" "9")
    (when s
      (.setParameters s (map->params ctx
                                     {"smt.arith.nl"        false
                                      "smt.mbqi"            true})))
    (when o
      (.setParameters o oparams))
    (when (seq? ret)
