X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=blobdiff_plain;f=src%2Frun.ml;h=bd602640fbb3f58c06bad1d3465ecca193f033cc;hp=f6812e4878ec61d6c79cd622095f02e5eaf6d576;hb=cd25399e8ac95c48630a18000e797062db66be05;hpb=cfef2deaf1a17df7bcb153c3b92e28e14edd912b diff --git a/src/run.ml b/src/run.ml index f6812e4..bd60264 100644 --- a/src/run.ml +++ b/src/run.ml @@ -299,6 +299,7 @@ DEFINE AND_(t1,t2) = let cache2 = run.cache2 in let cache5 = run.cache5 in let unstable = run.unstable in + let init_todo = StateSet.diff (Ata.get_states auto) (Ata.get_starting_states auto) in let rec loop node = let node_id = T.preorder tree node in if node == T.nil || not (Bitvector.get unstable node_id) then false else begin @@ -316,9 +317,7 @@ DEFINE AND_(t1,t2) = (* first time we visit the node *) NodeStatus.make { sat = StateSet.empty; - todo = StateSet.diff - (Ata.get_states auto) - (Ata.get_starting_states auto); + todo = init_todo; summary = NodeSummary.make (node == T.first_child tree parent) (* is_left *) (node == T.next_sibling tree parent) (* is_right *) @@ -460,9 +459,9 @@ DEFINE AND_(t1,t2) = cache.(T.preorder tree node).NodeStatus.node.sat in loop (T.root tree); - StateSet.fold - (fun q acc -> (q, Hashtbl.find res_mapper q)::acc) - (Ata.get_selecting_states auto) [] + List.rev (StateSet.fold + (fun q acc -> (q, Hashtbl.find res_mapper q)::acc) + (Ata.get_selecting_states auto) []) let prepare_run run list = let tree = run.tree in