Skip to content
Snippets Groups Projects
Commit 45a971d0 authored by erwan's avatar erwan
Browse files

Test: various enhancements in the exemples

parent 7cd70503
No related branches found
No related tags found
No related merge requests found
Pipeline #32768 failed
# Time-stamp: <modified the 23/10/2019 (at 15:41) by Erwan Jahier> # Time-stamp: <modified the 22/11/2019 (at 15:41) by Erwan Jahier>
test: test0 test2 lurette0 test: test0 test2 lurette0
...@@ -38,9 +38,7 @@ lurette: lurette0 ...@@ -38,9 +38,7 @@ lurette: lurette0
gnuplot-rif lurette.rif gnuplot-rif lurette.rif
rdbg: fig51_noinit.ml fig51_noinit.lut rdbg: fig51_noinit.ml fig51_noinit.lut
rdbg -o lurette.rif \ ledit rdbg -sut "sasa fig51_noinit.dot -dd "
-env "$(sasa) fig51_noinit.dot -custd -rif" \
-sut-nd "lutin fig51_noinit.lut -n distributed"
rdbg2: fig51.ml fig51.lut rdbg2: fig51.ml fig51.lut
rdbg -o lurette.rif \ rdbg -o lurette.rif \
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#use "../my-rdbg-tuning.ml";; #use "../my-rdbg-tuning.ml";;
let _ = let _ =
ci();
dot_view:=ci;; dot_view:=ci;;
......
# Time-stamp: <modified the 27/11/2019 (at 09:09) by Erwan Jahier> # Time-stamp: <modified the 01/12/2019 (at 16:17) by Erwan Jahier>
sasa=$(DIR)/bin/sasa -l 100 sasa=$(DIR)/bin/sasa -l 100
test: ring.cmxs coloring.rif lurette test: ring.cmxs coloring.rif coloring2.rif lurette
coloring.rif: ring.cmxs coloring.rif: ring.cmxs
$(sasa) -l 200 ring.dot > $@ $(sasa) -l 200 ring.dot > $@
coloring2.rif: grid4.cmxs
$(sasa) -l 200 grid4.dot > $@
sim2chrogtk: coloring.rif sim2chrogtk: coloring.rif
sim2chrogtk -ecran -in $< > /dev/null sim2chrogtk -screenrealheight 2000 -ecran -in $< > /dev/null
gnuplot: coloring.rif gnuplot: coloring.rif
gnuplot-rif $< gnuplot-rif $<
......
# Time-stamp: <modified the 23/10/2019 (at 12:21) by Erwan Jahier> # Time-stamp: <modified the 24/11/2019 (at 11:39) by Erwan Jahier>
test: test0 lurette0 rdbg_test test: test0 lurette0 rdbg_test
...@@ -23,6 +23,10 @@ lurette: lurette0 ...@@ -23,6 +23,10 @@ lurette: lurette0
rdbg: g.lut g.ml rdbg: g.lut g.ml
rdbg -o lurette.rif \ rdbg -o lurette.rif \
-env "$(sasa) g.dot -rif"
rdbg2: g.lut g.ml
rdbg -o lurette.rif \
-env "$(sasa) g.dot -rif" \ -env "$(sasa) g.dot -rif" \
-sut-nd "lutin g.lut -n dummy" -sut-nd "lutin g.lut -n dummy"
......
# Time-stamp: <modified the 23/10/2019 (at 15:41) by Erwan Jahier> # Time-stamp: <modified the 24/11/2019 (at 15:51) by Erwan Jahier>
test: ring.cmxs lurette1 test: ring.cmxs lurette1 rdbg_test
$(sasa) ring.dot $(sasa) ring.dot
...@@ -13,10 +13,15 @@ gnuplot: dijkstra-ring.rif ...@@ -13,10 +13,15 @@ gnuplot: dijkstra-ring.rif
rdbg: ring.ml ring.lut rdbg: ring.ml ring.lut
rdbg -o ring.rif \ ledit rdbg -o ring.rif -sut "$(sasa) ring.dot -dd -rif"
rdbg2: ring.ml ring.lut
ledit rdbg -o ring.rif \
-env "$(sasa) ring.dot -custd -rif" \ -env "$(sasa) ring.dot -custd -rif" \
-sut-nd "lutin ring.lut -n distributed"\ -sut-nd "lutin ring.lut -n distributed"\
rdbg_test: ring.ml
echo "\nnr\nsd\n" | rdbg -o ring.rif -l 10000 -sut "$(sasa) -vl 1 ring.dot -dd"
lurette1: ring.lut ring_oracle.lus lurette1: ring.lut ring_oracle.lus
lurette \ lurette \
......
(* Time-stamp: <modified the 25/09/2019 (at 13:50) by Erwan Jahier> *) (* Time-stamp: <modified the 27/11/2019 (at 06:40) by Erwan Jahier> *)
open Algo open Algo
let k = 42 let k = 42
let (init_state: int -> 's) = let (init_state: int -> 's) =
fun _ -> fun _ ->
(* let k = (card() - 1) in *) (* let k = (card() - 1) in *)
...@@ -14,7 +13,7 @@ let (init_state: int -> 's) = ...@@ -14,7 +13,7 @@ let (init_state: int -> 's) =
let (enable_f: 's -> 's neighbor list -> action list) = let (enable_f: 's -> 's neighbor list -> action list) =
fun e nl -> fun e nl ->
let pred = List.hd nl in let pred = List.hd nl in
if e <> state pred then ["a"] else [] if e <> state pred then ["T"] else []
let (step_f : 's -> 's neighbor list -> action -> 's) = let (step_f : 's -> 's neighbor list -> action -> 's) =
fun e nl a -> fun e nl a ->
...@@ -22,6 +21,6 @@ let (step_f : 's -> 's neighbor list -> action -> 's) = ...@@ -22,6 +21,6 @@ let (step_f : 's -> 's neighbor list -> action -> 's) =
match a with match a with
| _ -> state pred | _ -> state pred
let actions = Some ["a"] let actions = Some ["T"]
digraph ring7 { digraph ring7 {
graph [k=3] graph [k=3]
p1 [algo="root.ml" init="v=1" ] root [algo="root.ml" init="v=1" ]
p2 [algo="p.ml" init="v=3" ] p2 [algo="p.ml" init="v=3" ]
p3 [algo="p.ml" init="v=3" ] p3 [algo="p.ml" init="v=3" ]
p4 [algo="p.ml" init="v=2" ] p4 [algo="p.ml" init="v=2" ]
...@@ -11,6 +11,6 @@ digraph ring7 { ...@@ -11,6 +11,6 @@ digraph ring7 {
p8 [algo="p.ml" init="v=0" ] p8 [algo="p.ml" init="v=0" ]
p1 -> p2 -> p3 -> p4 -> p5 -> p6 -> p7 -> p8 -> p1 root -> p2 -> p3 -> p4 -> p5 -> p6 -> p7 -> p8 -> root
} }
(* Time-stamp: <modified the 25/09/2019 (at 13:50) by Erwan Jahier> *) (* Time-stamp: <modified the 27/11/2019 (at 06:40) by Erwan Jahier> *)
open Algo open Algo
...@@ -13,7 +13,7 @@ let (init_state: int -> 's) = ...@@ -13,7 +13,7 @@ let (init_state: int -> 's) =
let (enable_f: 's -> 's neighbor list -> action list) = let (enable_f: 's -> 's neighbor list -> action list) =
fun e nl -> fun e nl ->
let pred = List.hd nl in let pred = List.hd nl in
if e = state pred then ["a"] else [] if e = state pred then ["T"] else []
let (step_f : 's -> 's neighbor list -> action -> 's) = let (step_f : 's -> 's neighbor list -> action -> 's) =
fun e nl a -> fun e nl a ->
...@@ -21,6 +21,6 @@ let (step_f : 's -> 's neighbor list -> action -> 's) = ...@@ -21,6 +21,6 @@ let (step_f : 's -> 's neighbor list -> action -> 's) =
match a with match a with
| _ -> (e + 1) mod k | _ -> (e + 1) mod k
let actions = Some ["a"] let actions = Some ["T"]
type t = int type t = int
let to_string = string_of_int let to_string = Printf.sprintf "c=%i"
let of_string = None let of_string = None
let copy x = x let copy x = x
...@@ -24,6 +24,7 @@ let (is_parent: string -> string -> int -> Event.t -> bool) = ...@@ -24,6 +24,7 @@ let (is_parent: string -> string -> int -> Event.t -> bool) =
| Some (I j) -> j > -1 && i = j | Some (I j) -> j > -1 && i = j
| _ -> false | _ -> false
let (get_processes : Event.t -> process list) = let (get_processes : Event.t -> process list) =
fun e -> fun e ->
(* if e.kind <> Ltop then ( (* if e.kind <> Ltop then (
......
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