/* File : part21_schema.pro Created : 11/8/97 Adaptation of example schema from IS0 10303:21 'Clear text encoding of the exchange structure */ /* EXPRESS TYPE definitions are handled using the xpr1_type/4 predicate. xpr1_type(Schema, Type_ID, Base_Type, Where_Rules) */ /* TYPE length_measure = NUMBER; END_TYPE; */ xpr1_type(part21, length_measure, number, []) . xpr1_type(part21, edge_or_logical, select(edge, edge_logical_structure), []) . /* EXPRESS ENTITY definitions are handled using the xpr1_entity/9 predicate. xpr1_entity(Schema, Entity_ID, Abstract, Super_Types, Sub_Types, Attributes, Inverse, Unique, Where). */ /* ENTITY cartesian_point; x_coordinate : length_measure; y_coordinate : length_measure; z_coordinate : OPTIONAL length_measure; END_ENTITY; */ xpr1_entity(part21, cartesian_point, not_abstract, [], [], [ (x_coordinate, self, not_optional, length_measure), % Explicit Attributes (y_coordinate, self, not_optional, length_measure), (z_coordinate, self, optional, length_measure) ] , [], % Inverse [], % Unique [] % Where ) . xpr1_entity(part21, topology, not_abstract, [], [oneof(vertex, edge, loop)], [], [], [], [] ) . /* ENTITY vertex SUBTYPE OF (topology); vertex_point : OPTIONAL cartesian_point; END_ENTITY; */ xpr1_entity(part21, vertex, not_abstract, [topology], [], [ (vertex_point, self, optional, point) ], [], [], [] ) . /* ENTITY edge SUBTYPE OF (topology); edge_start : vertex; edge_end : vertex; END_ENTITY; */ xpr1_entity(part21, edge, not_abstract, [topology], [], [ (edge_start, self, not_optional, vertex), (edge_end, self, not_optional, vertex) ], [], [], [] ) . /* ENTITY edge_logical_structure; edge_element : edge; flag : BOOLEAN; END_ENTITY; */ xpr1_entity(part21, edge_logical_structure, not_abstract, [topology], [], [ (edge_element, self, not_optional, edge), (flag, self, not_optional, boolean) ], [], [], [] ) . /* ENTITY loop SUPERTYPE OF (ONEOF(edge_loop)) SUBTYPE OF (topology); END_ENTITY; */ xpr1_entity(part21, loop, not_abstract, [topology], [oneof(edge_loop)], [], [], [], [] ) . /* ENTITY edge_loop SUBTYPE OF (loop); loop_edges : LIST [1:?] OF edge_or_logical; END_ENTITY; */ xpr1_entity(part21, edge_loop, not_abstract, [loop], [], [ (loop_edges, self, not_optional, list(1, '?', edge_or_logical)) ], [], [], [] ) .