diff --git a/test/coloring/config.ml b/test/coloring/config.ml index 2c5a01377797e92ce421d60589af1653f0cf2701..b0466d31b2fd627fc023d7237ba468ce910bf95a 100644 --- a/test/coloring/config.ml +++ b/test/coloring/config.ml @@ -13,3 +13,4 @@ let potential = Some clash_number (* let potential = None *) let legitimate = None let fault = None +let for_init_search = None diff --git a/test/dijkstra-ring/ring.dot b/test/dijkstra-ring/ring.dot index 430ac0baa6dfa833227963a95b7d9faa13217a8f..b36f7cc71129a0d14531970abd5e63411b5ff1ea 100644 --- a/test/dijkstra-ring/ring.dot +++ b/test/dijkstra-ring/ring.dot @@ -1,14 +1,14 @@ digraph ring7 { graph [k=3] - root [algo="root.ml" init="{root=1;v=0}" ] - p2 [algo="p.ml" init="{root=0;v=0}" ] - p3 [algo="p.ml" init="{root=0;v=0}" ] - p4 [algo="p.ml" init="{root=0;v=0}" ] - p5 [algo="p.ml" init="{root=0;v=0}" ] - p6 [algo="p.ml" init="{root=0;v=0}" ] - p7 [algo="p.ml" init="{root=0;v=0}" ] - p8 [algo="p.ml" init="{root=0;v=0}" ] + root [algo="root.ml" init="{root=1;c=1}" ] + p2 [algo="p.ml" init="{root=0;c=3}" ] + p3 [algo="p.ml" init="{root=0;c=3}" ] + p4 [algo="p.ml" init="{root=0;c=2}" ] + p5 [algo="p.ml" init="{root=0;c=2}" ] + p6 [algo="p.ml" init="{root=0;c=1}" ] + p7 [algo="p.ml" init="{root=0;c=1}" ] + p8 [algo="p.ml" init="{root=0;c=0}" ] root -> p2 -> p3 -> p4 -> p5 -> p6 -> p7 -> p8 -> root } diff --git a/test/dijkstra-ring/state.ml b/test/dijkstra-ring/state.ml index 0a773f9ab9894f12b6db7a3f9d37afd36bef0b5f..55242149cd02056f213efecaf91dc0e73ae1aa33 100644 --- a/test/dijkstra-ring/state.ml +++ b/test/dijkstra-ring/state.ml @@ -1,23 +1,29 @@ - -type t = { root: bool ; v : int } (* semi-anonymous network: we know who is the root! *) +(* semi-anonymous network: each node knows if its neighbors is the root! *) +type t = { root: bool ; v : int } let to_string s = Printf.sprintf "c=%i" s.v let first = ref true let (of_string: (string -> t) option) = Some (fun s -> - try (* if the root node is not explicitly set in the dot file, we - consider the first one to be the root *) - Scanf.sscanf s "{root=%d;v=%d}" (fun i1 i2 -> { root = i1<>0; v = i2 } ) + let res = + try Scanf.sscanf s "{root=%d;c=%d}" (fun i1 i2 -> { root = i1<>0; v = i2 } ) with - _ -> - try + e1 -> + try (* if the root node is not explicitly set in the dot file, we + consider the first one to be the root *) let res = Scanf.sscanf s "c=%d" (fun i -> { root = !first; v = i } ) in first := false; res with - _ -> - Printf.printf "state.m: Unable to parse the initial state in the .dot: '%s'\n%!" s; + e2 -> + Printf.printf + "state.ml: can't parse the initial state in the .dot: '%s'\n%s\n%s\n%!" s + (Printexc.to_string e1) (Printexc.to_string_default e2) ; assert false + in + (* Printf.printf "state.ml: { root = %b ; c = %d }\n%!" res.root res.v; *) + res + ) let copy x = x diff --git a/test/k-clustering/config.ml b/test/k-clustering/config.ml index 3e8fabff253cbc2d859561c205f07c3aaafe42d4..e20253512d502b90e35ddd5469b0c38b94455df7 100644 --- a/test/k-clustering/config.ml +++ b/test/k-clustering/config.ml @@ -42,3 +42,4 @@ let potential = Some pf let legitimate = None (* None => only silent configuration are legitimate *) let fault = None (* None => the simulation stop once a legitimate configuration is reached *) +let for_init_search = None diff --git a/test/rsp-tree/config.ml b/test/rsp-tree/config.ml index 7dca13f682c0b89f1829fda8c2a5c19c4aecf71e..aa09e93d356cecb93d97d55a47c8f4c34cafebca 100644 --- a/test/rsp-tree/config.ml +++ b/test/rsp-tree/config.ml @@ -6,3 +6,4 @@ let potential = None (* None => only -sd, -cd, -lcd, -dd, or -custd are possible *) let legitimate = None (* None => only silent configuration are legitimate *) let fault = None (* None => the simulation stop once a legitimate configuration is reached *) +let for_init_search = None diff --git a/test/st-KK06-algo1/config.ml b/test/st-KK06-algo1/config.ml index 55f6451863103adc7e97ee5841716837464c710c..0ad60e2f7553382241800834c786c0768594e757 100644 --- a/test/st-KK06-algo1/config.ml +++ b/test/st-KK06-algo1/config.ml @@ -6,3 +6,4 @@ let potential = None (* None => only -sd, -cd, -lcd, -dd, or -custd are possible *) let legitimate = None (* None => only silent configuration are legitimate *) let fault = None (* None => the simulation stop once a legitimate configuration is reached *) +let for_init_search = None diff --git a/test/toy-example-a5sf/config.ml b/test/toy-example-a5sf/config.ml index c88eefac2eefdfa8121aa8ea2c4249e06d3d57f3..ca8ff2a21d3a3621eb020712a1d2427ced4eeca4 100644 --- a/test/toy-example-a5sf/config.ml +++ b/test/toy-example-a5sf/config.ml @@ -39,3 +39,4 @@ let potential = Some pf let legitimate = None (* None => only silent configuration are legitimate *) let fault = None (* None => the simulation stop once a legitimate configuration is reached *) +let for_init_search = None diff --git a/test/toy-example-sum/config.ml b/test/toy-example-sum/config.ml index ae53180bb02796e03c8734d11e81dae68696824f..c4e51f69efa4940090470504325aab699e217703 100644 --- a/test/toy-example-sum/config.ml +++ b/test/toy-example-sum/config.ml @@ -52,3 +52,4 @@ let potential_combined: State.t Algo.potential_fun = let potential = Some potential_combined let legitimate = None (* None => only silent configuration are legitimate *) let fault = None (* None => the simulation stop once a legitimate configuration is reached *) +let for_init_search = None