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

Update: take into account user defined legitimate functions in simca

parent 8d765256
No related branches found
No related tags found
No related merge requests found
......@@ -36,13 +36,14 @@ let time f x =
let get_step str =
(* Printf.printf "get_step '%s'\n%!" str; *)
if
Str.string_match (Str.regexp "This algo is silent after \\(.+\\) moves, \\(.+\\) steps, \\(.+\\) rounds.$") str 0
Str.string_match
(Str.regexp "This algo \\(.+\\) after \\(.+\\) moves, \\(.+\\) steps, \\(.+\\) rounds.$") str 0
then
let moves = int_of_string (Str.matched_group 1 str) in
let step = int_of_string (Str.matched_group 2 str) in
let rounds = int_of_string (Str.matched_group 3 str) in
let moves = int_of_string (Str.matched_group 2 str) in
let step = int_of_string (Str.matched_group 3 str) in
let rounds = int_of_string (Str.matched_group 4 str) in
Some (moves, step, rounds)
else
else
(
Printf.printf "runSimu.ml get_step: Fail to parse '%s'\n%!" str;
None
......
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