heptagon/compiler
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
..
global Switch to non-deprecated String functions 2017-03-14 12:24:29 +01:00
heptagon Accept when-syntax for declaring clocks 2017-09-29 00:08:42 +02:00
main Accept .lus file extension 2017-09-29 00:08:42 +02:00
minils Enforce well-formedness of clocks 2017-09-29 00:08:42 +02:00
obc Passes optimization 2017-05-23 22:13:32 +02:00
utilities Version 1.03.04 2017-05-24 01:19:55 +02:00
.merlin Minor fix to Merlin improvements. 2017-09-29 00:08:42 +02:00
_tags.in Work better with merlin 2017-09-29 00:08:42 +02:00
Makefile Added bzreax script ; added uninstall target in Makefiles 2015-02-27 15:50:21 +01:00
myocamlbuild.ml Insertion of call to controller(s) when exporting to Controllable-Nbac node. 2014-10-28 16:43:13 +01:00
myocamlbuild_config.ml Clean up documentation comments 2017-03-03 11:41:57 +01:00
preproc.ml Fixed warnings & documentation comments. 2013-11-08 18:51:06 +01:00