Skip to content
Snippets Groups Projects
Commit 41e20837 authored by erwan's avatar erwan
Browse files

Chore: minor enhancements

parent daed8cd9
No related branches found
No related tags found
No related merge requests found
...@@ -137,6 +137,7 @@ let (make_do: string array -> SasArg.t -> ...@@ -137,6 +137,7 @@ let (make_do: string array -> SasArg.t ->
step_dbg = step_dbg; step_dbg = step_dbg;
save_state = (fun i -> save_state = (fun i ->
let prgs = Random.get_state () in let prgs = Random.get_state () in
(* Printf.eprintf "Save state %i from sasa\n%!" i; *)
Hashtbl.replace ss_table i Hashtbl.replace ss_table i
(prgs, !sasa_env, !pre_enable_processes_opt) (prgs, !sasa_env, !pre_enable_processes_opt)
); );
...@@ -144,6 +145,7 @@ let (make_do: string array -> SasArg.t -> ...@@ -144,6 +145,7 @@ let (make_do: string array -> SasArg.t ->
match Hashtbl.find_opt ss_table i with match Hashtbl.find_opt ss_table i with
| Some (prgs, e, pepo) -> | Some (prgs, e, pepo) ->
Random.set_state prgs; Random.set_state prgs;
(* Printf.eprintf "Restore state %i from sasa\n%!" i; *)
sasa_env := e; pre_enable_processes_opt := pepo sasa_env := e; pre_enable_processes_opt := pepo
| None -> | None ->
Printf.eprintf "Cannot restore state %i from sasa\n" i; Printf.eprintf "Cannot restore state %i from sasa\n" i;
......
(* Time-stamp: <modified the 05/03/2020 (at 17:14) by Erwan Jahier> *) (* Time-stamp: <modified the 21/08/2020 (at 11:32) by Erwan Jahier> *)
(** {1 Topology: internal representation of Graphs } *) (** {1 Topology: internal representation of Graphs } *)
...@@ -20,7 +20,7 @@ type t = { ...@@ -20,7 +20,7 @@ type t = {
(** Parse a sasa dot file *) (** Parse a sasa dot file *)
val read: string -> t val read: string -> t
(** {1 Various eponymous util funtions } *) (** {1 Various eponymous util functions } *)
val to_adjacency: t -> bool array array val to_adjacency: t -> bool array array
val get_nb_link: t -> int val get_nb_link: t -> int
......
...@@ -22,6 +22,9 @@ clean: ...@@ -22,6 +22,9 @@ clean:
cd async-unison/ && make clean cd async-unison/ && make clean
cd coloring/ && make clean cd coloring/ && make clean
cd alea-coloring/ && make clean cd alea-coloring/ && make clean
cd alea-coloring-unif/ && make clean
cd alea-coloring-alt/ && make clean
cd alea-coloring/ && make clean
cd bfs-spanning-tree/ && make clean cd bfs-spanning-tree/ && make clean
cd dfs/ && make clean cd dfs/ && make clean
cd dfs-list/ && make clean cd dfs-list/ && make clean
......
...@@ -16,7 +16,7 @@ let _ = Hashtbl.add roundtbl 1 (1,true);; ...@@ -16,7 +16,7 @@ let _ = Hashtbl.add roundtbl 1 (1,true);;
(* BEWARE: The paths below are specific to sasa and to the sasa test directory *) (* BEWARE: The paths below are specific to sasa and to the sasa test directory *)
#mod_use "../../lib/algo/algo.ml";; (* #mod_use "../../lib/algo/algo.ml";; *)
#mod_use "../../lib/sasacore/register.ml";; #mod_use "../../lib/sasacore/register.ml";;
#mod_use "../../lib/sasacore/topology.ml";; #mod_use "../../lib/sasacore/topology.ml";;
#use "../rdbg-utils/dot.ml";; #use "../rdbg-utils/dot.ml";;
......
# Time-stamp: <modified the 24/03/2020 (at 11:12) by Erwan Jahier> # Time-stamp: <modified the 19/08/2020 (at 15:23) by Erwan Jahier>
test: test1 test2 lurette0 lurette1 rdbg_test test: test1 test2 lurette0 lurette1 rdbg_test
...@@ -40,6 +40,9 @@ lurette: lurette0 s g ...@@ -40,6 +40,9 @@ lurette: lurette0 s g
rdbg: ring.ml rdbg: ring.ml
rdbg -o unison.rif -sut "$(sasa) ring.dot -sd -rif" rdbg -o unison.rif -sut "$(sasa) ring.dot -sd -rif"
rdbg2: ring.ml
rdbg -o unison.rif -sut "sasa ring.dot -custd -rif"
rdbg_test: ring.ml rdbg_test: ring.ml
echo "\nn\ns\nsi 4\nn\nni 3\nq\n" | rdbg -o unison.rif \ echo "\nn\ns\nsi 4\nn\nni 3\nq\n" | rdbg -o unison.rif \
-sut "$(sasa) ring.dot -sd -rif" \ -sut "$(sasa) ring.dot -sd -rif" \
......
...@@ -10,6 +10,8 @@ let _ = ...@@ -10,6 +10,8 @@ let _ =
() ()
;; ;;
#use "rdbg-cmds.ml";; #use "rdbg-cmds.ml";;
#use "../sasa-rdbg-cmds.ml";; #use "../sasa-rdbg-cmds.ml";;
CAMPAIGN=nonreg_test_campaign.ml
CAMPAIGN=spanning_tree_campaign.ml CAMPAIGN=spanning_tree_campaign.ml
CAMPAIGN=coloring_campaign.ml CAMPAIGN=coloring_campaign.ml
CAMPAIGN=nonreg_test_campaign.ml
Makefile.expe-rules: $(CAMPAIGN) Makefile.expe-rules: $(CAMPAIGN)
echo "#use \"$(CAMPAIGN)\";;\n gen_make_rules ();;" | ocaml echo "#use \"$(CAMPAIGN)\";;\n gen_make_rules ();;" | ocaml
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment