diff --git a/tests/compiled.ml b/tests/compiled.ml index 6159a78e4e1cb761c6e6585ff6036150a37ea5c8..9ee4ff909d3d21beaa85cb4e6511f4a7d799e8ef 100644 --- a/tests/compiled.ml +++ b/tests/compiled.ml @@ -12,11 +12,15 @@ struct type state = int type ta = { - clocks : Varcontext.VarContext.t; init : state; + clocks : string array; } - let clocks t = t.clocks + (* /!\ clocks are numbered from 1 to nb_clocks *) + let nb_clocks t = (Array.length t.clocks) + let string_of_clock t c = + assert(c >= 1 && c <= (nb_clocks t)); + t.clocks.(c-1) let initial_state t = t.init @@ -37,18 +41,18 @@ struct let rate_of_state _ _ = 1 let lubounds t s = - Array.make (Varcontext.VarContext.size t.clocks) 10, - Array.make (Varcontext.VarContext.size t.clocks) 10 + Array.make (nb_clocks t) 10, + Array.make (nb_clocks t) 10 let global_mbounds t = - Array.make (Varcontext.VarContext.size t.clocks) 10 + Array.make (nb_clocks t) 10 let model = - let cl = Varcontext.VarContext.create () in - let _ = Varcontext.VarContext.add cl "c0" in (); + let cl = Array.make 1 "" in + cl.(0) <- "c0"; { - clocks = cl; init = 0; + clocks = cl; } let string_of_state _ _ = "state"