Ed2 short to Ed1 long conversion

Ed Barkmeyer edbark at nist.gov
Wed May 15 11:08:09 EDT 2002


All,

Following Peter's line of thought, I believe it is possible to produce
SUBTYPE_CONSTRAINTS that will also fail to survive the recommended mapping. 
Consider:

  SCHEMA s1;
  ENTITY A; ... 
  ENTITY B SUBTYPE OF (A); ...
  ENTITY C SUBTYPE OF (A); ...
  SUBTYPE CONSTRAINT both-b-c FOR A;
    B AND C;
  END_SUBTYPE_CONSTRAINT;
  ...
  END_SCHEMA;

  SCHEMA s2;
  USE FROM s1 (A, B, C); (* implicitly interfaces the constraint *)
  ENTITY X SUBTYPE OF (A); ...
  SUBTYPE CONSTRAINT both-b-x FOR A;
    B AND X;
  END_SUBTYPE_CONSTRAINT;
  ...
  END_SCHEMA;  

The guideline says the mapping of s1 to Ed1 contains:
  ENTITY A SUPERTYPE OF (B AND C);
which is correct, and the mapping of s2 to Ed1 contains:
  ENTITY A SUPERTYPE OF ((B AND C) ANDOR (B AND X));
and I contend this is incorrect.

According to annex B, in the Ed1 version of s2, A has the evaluated set members:
  A, A&B&C, A&B&X, A&B&C&X
while the Ed2 interpretation has only the evaluted set members:
  A, A&B&C&X
That is, the interfaced both-b-c constraint requires B&C whenever B appears in
the member, and the s2 both-b-x constraint requires B&X whenever B appears in
the member.  So any member satisfying both constraints must contain B&C&X (and
of course it must also contain A because all of B, C, and X are subtypes of A).

So the guideline will produce this error in the long-form, even when converting
the s2 Ed2 long-form.  That is, it is *not* correct to combine subtype
constraints with ANDOR in all cases.
(I respectfully suggest we think of SUBTYPE_CONSTRAINTs as RULEs, and this whole
magilla vanishes.)

-Ed

-- 
Edward J. Barkmeyer                       Email: edbark at nist.gov
National Institute of Standards & Technology
Manufacturing Systems Integration Division
100 Bureau Drive, Mail Stop 8260          Tel: +1 301-975-3528
Gaithersburg, MD 20899-8260               FAX: +1 301-975-4482

"The opinions expressed above do not reflect consensus of NIST,
and have not been reviewed by any Government authority."



More information about the wg11 mailing list