Fix several issues w.r.t. clocks during node expansion.
(1) equations such as (x,y,z)=[0,0,0]; were generated with -en unless -ec was specified. I've fixed that by always breaking tuples, even when global_opt.ec is false (this condition was strange anyway). (2) During node expansion, I create a fresh variable for each local var in the expanded node, but old var names were still appering in clock expression indeed, consider that example : var c:bool; x when c :bool; I was generating something equivalent to var c_fresh:bool; x_fresh when c :bool; bou... Of course, it was working because in -ec mode, I need to remove clock annotation when declaring local variables, which was hidding the problem. nb : because I've change test_lus2lic_no_node to use -lv4 instead of -ec to generate the lustre oracle, which exposes new pbs (cf above). (3) When expanding a node on the base clock with arguments on another clock, I was not propagating that information (let's keep the finger-crossed and hope the current fix is complete). nb : the number of failing test cases is the same (5 new pass, but 5 new fail!!), but it actually is a progression. Indeed, the new test failures ares due to the fact that this current change fixes a problem that expose yet another one! Actually, the newly exposed bug is not in the compliler, but in the oracle I generate via the --auto-test option ; indeed, for testing nodes which not all interface variables are one the base clock, I should generate oracle that do take them into account.
Showing
- src/l2lExpandArrays.ml 4 additions, 11 deletionssrc/l2lExpandArrays.ml
- src/l2lExpandNodes.ml 81 additions, 31 deletionssrc/l2lExpandNodes.ml
- src/main.ml 3 additions, 1 deletionsrc/main.ml
- test/lus2lic.sum 12 additions, 14 deletionstest/lus2lic.sum
- todo.org 0 additions, 22 deletionstodo.org
- todo.org_archive 30 additions, 0 deletionstodo.org_archive
- utils/test_lus2lic_no_node 1 addition, 1 deletionutils/test_lus2lic_no_node
Please register or sign in to comment