Integrated generic resource: Classification and set theory | ISO 10303-54:2005(E) © ISO |
*)
SCHEMA set_theory_schema;
REFERENCE FROM
classification_schema
--
ISO 10303-54
(class);
REFERENCE FROM
support_resource_schema
--
ISO 10303-41
(identifier,
label,
text);
(*
NOTE 1 The schemas referenced above are specified in the following part of ISO 10303:
classification_schema ISO 10303-54 support_resource_schema ISO 10303-41
NOTE 2 See Annex D for a graphical representation of this schema.
The set theory schema defines set theory relationship between classes or sets.
NOTE 1 In this part of ISO 10303, the terms class and set are synonyms.
In order to use this schema the entity that records the class or set shall be class or a subtype of class.
EXAMPLE 1 Consider the following instances of class:
An instance of the relationship subset indicates that each of the set of pumps enumerated in maintenance contract '98/1234' is of pump model 'XYZ_123'.
EXAMPLE 2 An organization has pumps of type A and type B. Some pumps handle radioactive fluids. There are the following classes of activity:
For workflow management purposes, the following derived class of activity is defined:
This class is the intersection of class DR with the union of classes SA and SB.
A complement is a relationship that is between
that indicates set S2 consists of all members of U that are not members of S1.
EXPRESS specification:
*)
ENTITY complement;
id : identifier;
name : label;
description :
OPTIONAL
text;
set_1 : class;
set_2 : class;
universe : class;
WHERE
complement_different: NOT identical_sets(set_1, set_2);
END_ENTITY;
(*
Attribute definitions:
id: the identifier for the complement relationship.
name: the label by which the complement relationship is known.
description: the text that characterizes the complement relationship. The value of this attribute need not be specified.
set_1: the class that has set_2 as its complement within universe.
set_2: the class that has set_1 as its complement within universe.
universe: the class that is the union of set_1 and set_2.
Formal propositions:
a class shall not be explicitly stated to be identical to its complement.An intersection is a relationship that is between
that indicates set R consists of each thing that is a member of each set within {Si}.
EXPRESS specification:
*)
ENTITY intersection;
id : identifier;
name : label;
description :
OPTIONAL
text;
operand : SET[2:?] OF class;
resultant : class;
END_ENTITY;
(*
Attribute definitions:
id: the identifier for the intersection relationship.
name: the label by which the intersection relationship is known..
description: the text that characterizes the intersection relationship. The value of this attribute need not be specified.
operand: the set of sets that have the resultant as their intersection.
resultant: the set that consists of each thing that is a member of each set within the operand.
A power_set is a relationship that is between
that indicates S* is the set of all subsets of S.
EXAMPLE Consider the following three instances of class:
'Pump commodity class' is the intersection of 'commodity class' and the power_set of 'pump'.
EXPRESS specification:
*)
ENTITY power_set;
id : identifier;
name : label;
description :
OPTIONAL
text;
base : class;
derived : class;
WHERE
derived_different: NOT identical_sets(base, derived);
END_ENTITY;
(*
Attribute definitions:
id: the identifier for the power_set relationship.
name: the label by which the power_set relationship is known.
description: the text that characterizes the power_set relationship. The value of this attribute need not be specified.
base: the set whose power_set is the derived set.
NOTE The base is the union of the derived.
derived: the set of all subsets of the base.
Formal propositions:
A class shall not be explicitly stated to be identical to the class from which it is derived as power set.A proper_subset is a type of subset that is a relationship between
that indicates the following:
EXPRESS specification:
*)
ENTITY proper_subset
SUBTYPE OF (subset);
WHERE
subset_different: NOT identical_sets(superset, subset);
END_ENTITY;
(*
Formal propositions:
a class that is a proper subset shall not be explicitly stated to be identical to its superset.A same_membership is a relationship that is between
that indicates the sets have the same members. Hence, set S1 and set S1 are the same set.
EXPRESS specification:
*)
ENTITY same_membership;
id : identifier;
name : label;
description :
OPTIONAL
text;
set_1 : class;
set_2 : class;
END_ENTITY;
(*
Attribute definitions:
id: the identifier for the same_membership relationship.
name: the label by which the same_membership relationship is known.
description: the text that characterizes the same_membership relationship. The value of this attribute need not be specified.
set_1: the class that contains the same members as set_2.
set_2: the class that contains the same members as set_1.
A subset is a relationship that is between
that indicates each member of set A is also a member of set B.
NOTE Set A may be equal to B.
EXPRESS specification:
*)
ENTITY subset;
id : identifier;
name : label;
description :
OPTIONAL
text;
subset : class;
superset : class;
END_ENTITY;
(*
Attribute definitions:
id: the identifier for the subset relationship.
name: the label by which the subset relationship is known.
description: the text that characterizes the subset relationship. The value of this attribute need not be specified.
subset: the class that contains only members of superset.
superset: the class that contains all members of subset.
A union is a relationship that is between
that indicates set R consists of each thing that is a member of a set within {Si}.
EXPRESS specification:
*)
ENTITY union;
id : identifier;
name : label;
description :
OPTIONAL
text;
operand : SET[2:?] OF class;
resultant : class;
END_ENTITY;
(*
Attribute definitions:
id: the identifier for the union relationship.
name: the label by which the union relationship is known.
description: the text that characterizes the union relationship. The value of this attribute need not be specified.
operand: the set of sets that have the resultant as their union.
resultant: the set that consists of each thing that is a member of a set within the operand.
A union_of_all_members is a relationship that is between
where each of the members of S is a set, that indicates set R consists of each thing that is a member of a set within S.
EXAMPLE Consider the class that is the temperature range 10 to 20 degrees Celsius. A temperature such as 15 degrees Celsius is a member of the range.
The temperature 15 degrees Celsius is a member of the class that is the temperature range 10 to 20 degrees Celsius.
The class that consists of all objects with a thermodynamic energy in the range 15 to 20 degrees Celsius is the union_of_all_members of the temperature range 10 to 20 degrees Celsius.
NOTE The entity union_of_all_members is equivalent to union, and is used where the operand set has a large or infinite number of members.
EXPRESS specification:
*)
ENTITY union_of_all_members;
id : identifier;
name : label;
description :
OPTIONAL
text;
operand : class;
resultant : class;
WHERE
resultant_different: NOT identical_sets(operand, resultant);
END_ENTITY;
(*
Attribute definitions:
id: the identifier for the union_of_all_members relationship.
name: the label by which the union_of_all_members relationship is known.
description: the text that characterizes the union_of_all_members relationship. The value of this attribute need not be specified.
operand: the set of sets that have the resultant as their union.
resultant: the set that consists of each thing that is a member of a set within the operand.
Formal propositions:
a class that is the union of a set of other classes shall not be explicitly stated to be identical to the set of classes.EXPRESS specification:
*)
FUNCTION identical_sets (set_a : class, set_b : class) :BOOLEAN;
LOCAL set_of_sets : SET OF class := []; END_LOCAL; IF (set_a = set_b) THEN RETURN (TRUE); END_IF; set_of_sets := set_of_sets + set_b; RETURN (identical_to_one_of_set_of_sets(set_a, set_of_sets));
END_FUNCTION;
(*
Argument definitions:
set_a: an instance of class that is tested against set_b.
set_b: an instance of class that is tested against set_a.
EXPRESS specification:
*)
FUNCTION identical_to_one_of_set_of_sets (set_a : class, set_of_sets : SET OF class) :BOOLEAN;
LOCAL i : INTEGER; initial_size : INTEGER; augmented_size : INTEGER; set_of_forward_equivalences : SET OF same_membership := []; set_of_backward_equivalences : SET OF same_membership := []; augmented_set_of_sets : SET OF class := []; END_LOCAL; -- test membership of the specified set of sets IF (set_a IN set_of_sets) THEN RETURN (TRUE); END_IF; -- extend the specified set to include all sets that have the same membership -- as an existing member initial_size := SIZEOF(set_of_sets); IF (initial_size = 0) THEN RETURN (FALSE); END_IF; REPEAT i := 1 TO initial_size; set_of_forward_equivalences := set_of_forward_equivalences + USEDIN(set_of_sets[i], 'SET_THEORY_SCHEMA.SAME_MEMBERSHIP.SET_1'); set_of_backward_equivalences := set_of_forward_equivalences + USEDIN(set_of_sets[i], 'SET_THEORY_SCHEMA.SAME_MEMBERSHIP.SET_2'); END_REPEAT; augmented_set_of_sets := set_of_sets; IF (SIZEOF(set_of_forward_equivalences) > 0) THEN REPEAT i := 1 to HIINDEX(set_of_forward_equivalences); augmented_set_of_sets := augmented_set_of_sets + set_of_forward_equivalences[i].set_2; END_REPEAT; END_IF; IF (SIZEOF(set_of_backward_equivalences) > 0) THEN REPEAT i := 1 to HIINDEX(set_of_backward_equivalences); augmented_set_of_sets := augmented_set_of_sets + set_of_backward_equivalences[i].set_1; END_REPEAT; END_IF; -- if the specified set of sets has been augmented, then test membership augmented_size := SIZEOF(augmented_set_of_sets); IF augmented_size = initial_size THEN RETURN (FALSE); END_IF; RETURN (identical_to_one_of_set_of_sets(set_a, augmented_set_of_sets));
END_FUNCTION;
(*
Argument definitions:
set_a: an instance of class that is tested against set_of_sets.
set_of_sets: a set of instances of class that are tested against set.
*)
END_SCHEMA; -- set_theory_schema
(*
© ISO 2005 — All rights reserved