    (let [arch (Architecture. (.getValue Options/sslFilename))
          program (Program/createProgram arch)
          file (.getAbsoluteFile (File. binary-file))]
+     (-> "--cpa xs" ; s - call stack analysis
+         (string/split #" ")
+         into-array
+         Options/parseOptions)
      (.loadMainModule program file)
      (.installHarness program (DefaultHarness.))
      (let [cfr (ControlFlowReconstruction. program)]
        (.run cfr)
-       {:cfr cfr :program program}))))
+       (def ^:private global-loaded-binary {:cfr cfr :program program})))))
 
 (defn- get-statement
   [program location]

(ns cljakstab.core
  (:require [clojure.string :as string])
  (: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))

(defn init-options
  "Jakstab stores options in singleton Options class"

   reverse
   (map
    (fn [[lbl jumps]]
      (if (zero? (.getIndex lbl))
        (let [address (.getAddress lbl)
              instruction (.getInstruction program address)]
          (-> program
              (.getInstructionString address instruction)
              println)))
      (println
       (str
        lbl
        " "
        (.getStatement program lbl))
       (show-jumps jumps))))
   dorun)
  nil)

(defn with-loaded
  [fun & args]
  (if global-loaded-binary
    (apply fun global-loaded-binary args)
    :code-not-loaded))

(defn list-code
  ([] (with-loaded list-code))
  ([loaded]
    (let [program (:program loaded)]
      (-> program
          get-cfg
          cfg-to-stmt-map
          (show-stmt-map program)))))

(defn show-state
  ([state-num] (with-loaded show-state state-num))
  ([loaded state-num]))

(defmacro show-symbols
  [& forms]
  `(show-symbols-fn '~forms))

(defn get-symbols-map
  [loaded]
  {1 666})

(defn show-symbols-fn
  ([forms] (with-loaded show-symbols-fn forms))
  ([loaded forms]
     (let [symbols (get-symbols-map loaded)]
       (walk/walk
        #(if (symbol? %1)
           (get symbols %1 %1)
           %1)
        identity
        forms))))
