Code: Select all
// Utillity type used throughout
TYPE ID1 POSSREP { VALUE CHARACTER CONSTRAINT LENGTH ( VALUE ) <= 36 };
// Lookup relvar
VAR lookup BASE RELATION { P ID1 } KEY { P };
// Lookup constrained type
TYPE LU IS { ID1 CONSTRAINT TUPLE { P ID1 } IN lookup { P } POSSREP { X = THE_VALUE ( ID1 ) } };
What I am trying to do is:
Code: Select all
// Define a relvar that partitions other definitions
VAR DU BASE RELATION { d1 ID, n1 ID } KEY { d1 };
// Define a type that is going to be used throughout the system, which appears in the above relvar
TYPE ident POSSREP { domain ID1, name ID1 CONSTRAINT TUPLE { domain ID1 } IN DU { d1 } };
What syntax is needed to achieve what I am trying to do?