[ebon-discuss] Possible grammar error in indirections in client relations.
Status: Alpha
Brought to you by:
kiniry
From: Joseph R. K. <ki...@ac...> - 2001-08-29 05:48:15
|
The BON grammar specifies indirections in client relations with the = following rules: Client_relation =3D Client client [ Client_entities ] [ Type_mark ] Supplier [ Semantic_label ] Client_entities =3D "{" Client_entity_expression "}" Client_entity_expression =3D Client_entity_list | Multiplicity Client_entity_list =3D { Client_entity "," ...} + Client_entity =3D Feature_name | Supplier_indirection | Parent_indirection Supplier_indirection =3D [ Indirection_feature_part ":" ] Generic_indirection Indirection_feature_part =3D Feature_name | Indirection_feature_list Indirection_feature_list =3D "(" Feature_name_list ")" Parent_indirection =3D "->" Generic_indirection Generic_indirection =3D Formal_generic_name | Named_indirection Named_indirection =3D Class_name "[" Indirection_list "]" Indirection_list =3D { Indirection_element "," ...} + Indirection_element =3D "..." | Named_indirection Type_mark =3D ":" | ":{" | Shared_mark Shared_mark =3D ":" "(" Multiplicity ")" But the textual examples from the Wald=E9n/Nerson text seemingly violate = this = grammar (from Figure B.8, pg. 371): NURSE client {patients: LIST[..., PATIENT_ID]} PATIENT Note that PATIENT_ID is a Class_name without any parameterized = Indirection_list. I suggest that the grammar is erroneous, not the = examples. At first blush, I take the meaning of the specification of the = classname in the parameter as a generic type-narrowing, kind of a type = currying. Of course, this leaves open the possible semantics for the = ellipses ("...") construct... I haven't yet re-read the appropriate parts of the text to understand the = intent of such constructs. Therefore, I'm not going to suggest a revised = grammar at this time. If anyone has input on this I'd appreciate hearing it. Note that, since we are extended the language anyway, if the extended BON = grammar covers (algebraically) the existing (possibly corrected) BON = grammar and doesn't violate the latter's semantics, then we can add = constructs like the above type currying if we choose. Joe -- Joseph R. Kiniry http://www.cs.caltech.edu/~kiniry/ California Institute of Technology ID 78860581 ICQ 4344804 |