diff --git a/src/evalClock.ml b/src/evalClock.ml index 5f9d61558d9bc10be49a9a075624a2073510b0af..9dd9ef592bb5f8138bb0afe5cee79c2c6f77ff9b 100644 --- a/src/evalClock.ml +++ b/src/evalClock.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 19/08/2008 (at 15:27) by Erwan Jahier> *) +(** Time-stamp: <modified the 19/08/2008 (at 15:55) by Erwan Jahier> *) open Predef @@ -201,7 +201,8 @@ let (val_exp_eff : val_exp_eff -> clock_eff list) = (* Some expressions migth be infered to be a variable clock (e.g., constants). In that case, it is ok to consider that such expression are on the base clock.*) - | ClockVar _ -> BaseEff + | ClockVar _ + | On(_,ClockVar _) -> BaseEff | x -> x in List.map var_clock_to_base res diff --git a/src/licDump.ml b/src/licDump.ml index 21e4077aa39bee651c0854e4a345bda175bdac21..e77b066158b457be940d5fe058f5a044db62d2b6 100644 --- a/src/licDump.ml +++ b/src/licDump.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 19/08/2008 (at 15:18) by Erwan Jahier> *) +(** Time-stamp: <modified the 19/08/2008 (at 15:58) by Erwan Jahier> *) open CompiledData open Printf @@ -457,10 +457,7 @@ and string_of_clock (ck : clock_eff) = | BaseEff -> "" | On(_,BaseEff) -> "" | On(v,On(id,_)) ->" when " ^ (Ident.to_string id) - | On(v,ClockVar i) -> " when _clock_var_" ^ (string_of_int i) - | ClockVar i -> -(* "_clock_var_" ^ (string_of_int i) *) - assert false + | _ -> assert false and string_of_clock_list cl = diff --git a/src/test/test.res.exp b/src/test/test.res.exp index 42a81a0c522420ecd667067d93a06fd43d40031d..af0f8e85ad9c5777246476961a376d657d61bf13 100644 --- a/src/test/test.res.exp +++ b/src/test/test.res.exp @@ -9739,7 +9739,7 @@ returns ( clock4_x:bool; clock4_y:bool when clock4_x); -*** oops: an internal error occurred in file evalClock.ml, line 273, column 31 +*** oops: an internal error occurred in file evalClock.ml, line 274, column 31 *** when compiling lustre program should_work/clock/when_not.lus ---------------------------------------------------------------------- @@ -10377,9 +10377,9 @@ tel -- end of node alias::aliasPredefNot node alias::alias(a:bool) returns (b:bool; c:int); var - _v3:A_int_3 when _clock_var_1; + _v3:A_int_3; _v1:A_int_3; - _v2:A_int_3 when _clock_var_1; + _v2:A_int_3; let b = (alias::aliasPredefNot(a)); c = (alias::aliasGivenNode(0, _v3)); @@ -11400,7 +11400,7 @@ tel -- end of node ex::id node ex::trueNode(x:bool) returns (y:bool); var - _v1:bool when _clock_var_1; + _v1:bool; let y = (x or _v1); _v1 = (ex::id(true, false)); @@ -17998,8 +17998,8 @@ var _v2:real; _v4:real; _v10:real; - _v8:real when _clock_var_5; - _v7:real when _clock_var_5; + _v8:real; + _v7:real; _v6:real; _v9:real; _v13:real;