(defn add-instruction
"Appends an instruction to the current block. "
[inst]
(let [inst-id (with-meta (gensym "inst_")
{::instruction true})
inst (assoc inst :id inst-id)]
(gen-plan
[blk-id (get-block)
_ (update-in-plan [:blocks blk-id] (fnil conj []) inst)]
inst-id)))