[wg11] Extending enumeration datatypes and implicit interfacing
Andy Carpenter
Andy.Carpenter at manchester.ac.uk
Wed Aug 10 09:29:20 EDT 2005
Phil,
If the enumeration item i1 is present and named in e3
then it should not require a prefix. Although i1 is present in
e1, e2 and e3 these are related by extension, thus, there is
only one i1 (clause 8.4.1) and so there would be no
ambiguity if i1 was used without a prefix.
Andy.
p.s. do you know that were is no rule that disallows the same
enumeration item in a single enumeration_items construct.
----- Original Message -----
From: "Phil Spiby" <Phil.Spiby at Eurostep.com>
To: "'Andy Carpenter'" <Andy.Carpenter at manchester.ac.uk>; "'WG11'"
<wg11 at steptools.com>
Sent: 10 August 2005 10:43
Subject: RE: [wg11] Extending enumeration datatypes and implicit interfacing
> Andy,
>
> You have a point here which needs fixing!
> Enumeration items follow the visibility rules, in particular rule (f)
under
> 10.2. Which talks about the enumeration in which they were declared. This
> needs amendment to cover the extensible enumeration case like your example
> e1 is not visible in s3 (because it is implicitly interfaced) however i1
is
> a valid value in e1, e2 and e3 and therefore should be visible in s3.
>
> Based on this we may also need to add a note to 12.7.2 prefixed
identifiers
> to clarify that in s3 we can refer to e2.i1 and e3.i1.
>
> Phil
> schema s1;
> type e1 = enumeration of (i1);
> end_type;
> end_schema;
>
> schema s2;
> reference from s1 (e1);
> type e2 = enumeration based_on e1 with (i2);
> end_type;
> end_schema;
>
> schema s3;
> reference from s2(e2);
> type e3 = enumeration based_on e2 with (i3);
> end_type;
> procedure p1;
> local
> v1 : e3 := i1;
> v2 : e3 := i2;
> v3 : e3 := i3;
> end_local;
> end_procedure;
> end_schema;
More information about the wg11
mailing list