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

Test: factorize code in rdbg-session.ml

parent 474da75a
No related branches found
No related tags found
No related merge requests found
......@@ -14,11 +14,11 @@ open Data;;
#require "lutin";;
let plugin_0 =
let args = ["lutin";"g.lut";"-n";"synchronous"] in
let args = ["lutin";"g.lut";"-n";"distributed"] in
let aargs = Array.of_list args in
let plugin = LutinRun.make aargs in
let skip_dbg sl e cont = cont (plugin.step sl) e in
{ plugin with step_dbg = skip_dbg }
{ plugin with step_dbg = skip_dbg }
;;
let plugin_1 =
......@@ -30,46 +30,19 @@ let _ = args.envs <- [Ocaml(plugin_1)];;
let _ = args.oracles <- [];;
let _ =
args.display_gnuplot <- false;
args.display_sim2chro <- false;
args.rdbg <- true;
args.step_nb <- 1000;
args.output <- "g.rif";
args.cov_file <- "lurette.cov";
args.stop_on_oracle_error <- true;
args.debug_rdbg <- false;;
args.display_gnuplot <- false;
args.display_sim2chro <- false;
args.rdbg <- true;
args.step_nb <- 1000;
args.output <- "g.rif";
args.cov_file <- "lurette.cov";
args.stop_on_oracle_error <- true;
args.debug_rdbg <- false;;
#use "my-rdbg-tuning.ml";;
let _ = print_string "
--> type 'man' for online help
"
;;
(**********************************************************************)
#require "ocamlgraph";;
#mod_use "../../lib/algo/algo.ml";;
#mod_use "../../lib/sasacore/topology.ml";;
#use "../rdbg-utils/dot.ml";;
let dotfile = "g.dot";;
let p = Topology.read dotfile;;
let d () = dot p dotfile !e;;
let ne () = neato p dotfile !e;;
let tw () = twopi p dotfile !e;;
let ci () = circo p dotfile !e;;
let fd () = fdp p dotfile !e;;
let sf () = sfdp p dotfile !e;;
let pa () = patchwork p dotfile !e;;
let os () = osage p dotfile !e;;
#use "../my-rdbg-tuning.ml";;
let sd () = s();d();;
let nr () = e:=next_round p.nodes dotfile !e; osage p dotfile !e;;
let _ = n (); d (); ignore (Sys.command ("zathura sasa-g.dot.pdf&"))
(* Convergence is reached when data does not change *)
let rec go () =
let data = !e.data in
s(); if data = !e.data then ci () else go () ;;
let _ = time_travel true;;
let e = ref (RdbgStdLib.run());;
let s () = e:=step !e;;
let si i = e:=stepi !e i;;
let n () = e:=next !e ;;
let ni i = e:= nexti !e i;;
let g i = e:= goto !e i;;
let b () = e:= back !e ;;
let bi i = e:= backi !e i;;
let r () = e:=RdbgStdLib.run();;
let c () = e:= continue !e;;
let bt () = print_src !e;;
let finish () = loopforever !e;;
(**********************************************************************)
#require "ocamlgraph";;
#mod_use "../../lib/algo/algo.ml";;
#mod_use "../../lib/sasacore/topology.ml";;
#use "../rdbg-utils/dot.ml";;
let p = Topology.read dotfile;;
let d () = dot p dotfile !e;;
let ne () = neato p dotfile !e;;
let tw () = twopi p dotfile !e;;
let ci () = circo p dotfile !e;;
let fd () = fdp p dotfile !e;;
let sf () = sfdp p dotfile !e;;
let pa () = patchwork p dotfile !e;;
let os () = osage p dotfile !e;;
(* Convergence is reached when data does not change *)
let rec go () =
let data = !e.data in
s(); if data = !e.data then ci () else go () ;;
let sd () = s();d();;
let nr () = e:=next_round p.nodes dotfile !e; circo p dotfile !e;;
let _ = print_string "
--> type 'man' for online help
"
;;
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