heptagon/compiler/minils
Timothy Bourke 4dadf6b4d6 Enforce well-formedness of clocks
For a clock (ck on x) to be well-formed in an environment H, we must
have H x = ck, i.e., the clock of x is the same as the clock ck of the
stream being sampled.

This constraint is guaranteed by construction for fully inferred clocks
(by the rules for when and merge), but nothing guarantees that user
declarations be well-formed. This can lead to problems.

For instance, this invalid program is incorrectly accepted:

    node f (x : bool; a : bool :: . on b;
		      b : bool :: . on a) returns (y:bool);
    let
	y = true;
    tel

as is this one:

    node f(a: bool :: . on a; b: bool :: . on a)
    returns (z: bool);
    var w : bool;
    let
	w = a when b;
	z = false fby w;
    tel

This invalid program is incorrectly accepted and leads to an internal
compiler error:

    node f (x : bool) returns (y:bool);
    var a : bool :: . on b;
	b : bool :: . on a;
    let
	y = true;
	a = true;
	b = true;
    tel

This patch enforces the well-formedness constraint. It gives a sensible
error message when the constraint cannot be satisfied.
2017-09-29 00:08:42 +02:00
..
analysis Enforce well-formedness of clocks 2017-09-29 00:08:42 +02:00
ctrln Adapt to new interface of reatk.ctrlNbac (≥ 0.11) 2017-09-20 16:47:17 +01:00
main Added simple scheduler with -simple-scheduler option 2017-05-23 22:16:57 +02:00
sigali Switch to non-deprecated String functions 2017-03-14 12:24:29 +01:00
transformations Added simple scheduler with -simple-scheduler option 2017-05-23 22:16:57 +02:00
_tags Upgrading to new ReaTK API (>= 0.9.4). 2014-10-03 10:57:23 +02:00
minils.ml Added syntax for reachability and attractivity in contracts 2015-01-06 00:26:59 +01:00
mls_compare.ml Added Marc as co-author 2012-06-29 01:43:15 +02:00
mls_mapfold.ml Added syntax for reachability and attractivity in contracts 2015-01-06 00:26:59 +01:00
mls_printer.ml Added syntax for reachability and attractivity in contracts 2015-01-06 00:26:59 +01:00
mls_utils.ml Fixed warnings. 2014-03-18 11:01:56 +01:00