Commit ccb8b62b authored by erwan's avatar erwan

Fix: variables contraint to a value at declaration were buggy (close #2)

cf example/Bug/freevar.lut node ko
parent e53b6f05
Pipeline #26584 passed with stages
in 9 minutes and 43 seconds
-- ok works fine, but not ko:
node ko () returns (b: int [0; 0]; a: int) = a = b
node ok () returns (a: int [0; 0]; b: int) = a = b
\ No newline at end of file
node ok () returns (a: int [0; 0]; b: int) = a = b
......@@ -106,8 +106,8 @@ let (substl_to_string : subst list -> string) =
fun sl ->
(List.fold_left
(fun acc ((vn, a), ne) ->
(acc ^ " " ^ (Value.num_value_to_string a) ^ "." ^ vn ^
" -> " ^ to_string ne ^ "\n")
(acc ^ " " ^ (Value.num_value_to_string a) ^ "." ^ vn ^
" -> " ^ to_string ne ^ "\n")
)
""
sl
......@@ -369,7 +369,7 @@ let (split : t -> split_res) =
let divide c1 c2 =
match (c1,c2) with
| I i1, I i2 -> Num.eq_num (Num.mod_num i2 i1) (Num.Int 0)
| _ ,_ -> true
| _, _ -> assert false (* used to be "true" instead, but it looked weird! *)
in
let cl = (StringMap.fold (fun v c acc -> (c,v)::acc) ne []) in
let res =
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment