Skip to content
Snippets Groups Projects
Commit cb891dc4 authored by Erwan Jahier's avatar Erwan Jahier
Browse files

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.
parent 4b9e886f
No related branches found
No related tags found
No related merge requests found
Loading
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