diff options
| author | Kathy Gray | 2015-10-07 15:01:12 +0100 |
|---|---|---|
| committer | Kathy Gray | 2015-10-07 15:01:12 +0100 |
| commit | 55eafc3dc845902d64ba6af3c03830ba67d18d30 (patch) | |
| tree | aac84b558ca23b7217ec9fb8280a90b43a481e6a | |
| parent | 09bee21b4390c82c4fa36ade46d67247e82c9546 (diff) | |
Start expanding annot for more refined effect tracking
| -rw-r--r-- | language/l2.lem | 1 | ||||
| -rw-r--r-- | language/l2.ml | 1 | ||||
| -rw-r--r-- | language/l2.ott | 1 | ||||
| -rw-r--r-- | src/type_internal.ml | 3 | ||||
| -rw-r--r-- | src/type_internal.mli | 5 |
5 files changed, 9 insertions, 2 deletions
diff --git a/language/l2.lem b/language/l2.lem index 54b31eb5..4d26f9b7 100644 --- a/language/l2.lem +++ b/language/l2.lem @@ -74,6 +74,7 @@ type base_effect_aux = (* effect *) | BE_undef (* undefined-instruction exception *) | BE_unspec (* unspecified values *) | BE_nondet (* nondeterminism from intra-instruction parallelism *) + | BE_lset (* Local mutation happend; not user-writable *) type base_effect = diff --git a/language/l2.ml b/language/l2.ml index d5ea7c33..faae6e3f 100644 --- a/language/l2.ml +++ b/language/l2.ml @@ -71,6 +71,7 @@ base_effect_aux = (* effect *) | BE_undef (* undefined-instruction exception *) | BE_unspec (* unspecified values *) | BE_nondet (* nondeterminism from intra-instruction parallelism *) + | BE_lset (* Local mutation happend; not user-writable *) type diff --git a/language/l2.ott b/language/l2.ott index eea0fba1..1dcc27da 100644 --- a/language/l2.ott +++ b/language/l2.ott @@ -193,6 +193,7 @@ base_effect :: 'BE_' ::= | undef :: :: undef {{ com undefined-instruction exception }} | unspec :: :: unspec {{ com unspecified values }} | nondet :: :: nondet {{ com nondeterminism from intra-instruction parallelism }} + | lset :: :: lset {{ com Local mutation happend; not user-writable }} effect :: 'Effect_' ::= diff --git a/src/type_internal.ml b/src/type_internal.ml index 6d697012..34d75943 100644 --- a/src/type_internal.ml +++ b/src/type_internal.ml @@ -185,7 +185,8 @@ type bounds_env = type t_params = (string * kind) list type tannot = | NoTyp - | Base of (t_params * t) * tag * nexp_range list * effect * bounds_env + (*See .mli for purpose of attributes *) + | Base of (t_params * t) * tag * nexp_range list * effect * effect * bounds_env (* First tannot is the most polymorphic version; the list includes all variants. All included t are Tfn *) | Overload of tannot * bool * tannot list diff --git a/src/type_internal.mli b/src/type_internal.mli index d1396367..64bcca14 100644 --- a/src/type_internal.mli +++ b/src/type_internal.mli @@ -155,7 +155,10 @@ type bounds_env = type t_params = (string * kind) list type tannot = | NoTyp - | Base of (t_params * t) * tag * nexp_range list * effect * bounds_env + (*A type of a function, variable, expression, etc, that is not overloaded: + the first effect is for local effects to the current expression or variable + the second effect is the cummulative effects of any contained subexpressions where applicable, pure otherwise *) + | Base of (t_params * t) * tag * nexp_range list * effect * effect * bounds_env (* First tannot is the most polymorphic version; the list includes all variants. All t to be Tfn *) | Overload of tannot * bool * tannot list |
