 (ns cljakstab.core
-  (:require [clojure.string :as string])
+  (:require [clojure.string :as string]
+            [clojure.walk   :as walk])
   (:import (org.jakstab Main Options Program AnalysisManager)
            (org.jakstab.ssl Architecture)
            (org.jakstab.loader DefaultHarness)
            (org.jakstab.analysis ControlFlowReconstruction)
            java.security.Permission
            java.io.File))
+
+(def ^:private global-loaded-binary nil)
 
 (defn init-options
   "Jakstab stores options in singleton Options class"

   reverse
   (map
    (fn [[lbl jumps]]
      (println lbl (.getStatement program lbl) (show-jumps jumps))))
   dorun)
  nil)

(defn show-program
  [binary-file]
  (let [program (-> binary-file
                    find-jumps
                    :program)]
    (-> program
        get-cfg
        cfg-to-stmt-map
        (show-stmt-map program))))

         ~@exprs)
       (finally (System/setSecurityManager old-mgr#)))))

(defn load-binary
  "find unresolved jumps in specified binary"
  [binary-file]
  (init-options {:mainFile binary-file})
