ГОСТ Р ИСО 13584-42—2012
THEN RETURN(FALSE):
ENDJF;
("the cor.s.subclasses shall consist of subclasses for the class
that defined the initial domain of typ.’)
IF NOT (QUERY (sc <* cons.subclasses |
definition_avai!ableJmplies
(sc.definition_availabte_implies
(typ\class_reference_type.domain.is_subclass( sc.de fmition[1]
. typ\class_referenceJype.domain.definibon[1))))= false)
= (])
THEN RETURN(FALSE):
ENDJF;
RETURN (TRUE);
ENDJF;
(’case entity subtype constraint *)
IF ((’ISO13584_IEC61360_CLASS_CONSTRAINT_SCHEMA’
+’ENTITY_SUBTYPE_CONSTRAINT ) IN TYPEOF (CONS))
THEN
(* the data type is a class_referencejype*)
IF NOT ((’IS013584JEC61360_DICTIONARY_SCHEMA’
V.ENTITYJNSTANCEJ ’YPE’) IN TYPEOF (typ))
THEN RETURN(FALSE);
ENDJF;
(* the subtype_name shall define a subtype for the entityjnstancejype of the constrained*)
IF NOT (cons\entity_subtype_constraint.subtype_names
>= typ\entityjnstancejype.type_name)
THEN RETURN(FALSE);
ENDJF;
RETURN (TRUE);
ENDJF;
(’case enumeration_constraint‘)
IF (IS013584JEC61360JDLASS_CONSTRAINT_SCHEMA‘
+\ENUMERATION_CONSTRAlNT) IN TYPEOF (CONS)
THEN
(* all the values belonging to the subset of values shall be compatible with the
typ data type")
IF (QUERY (vaK’cons.subset |
NOT compatible_data type_and_value (typ. val))o [ ])
THEN RETURN(FALSE);
ENDJF;
RETURN (TRUE);
ENDJF;
(’case range_constraint’)
IF ( ISO13584_IEC61360_CLASS_CONSTRAINT_SCHEMA.RANGE_CONSTRAINT’
INTYPEOF (CONS))
THEN
(‘if the data type is an integerjype then min_value and max_value shall
be INTEGERS.’)
IF (-IS013584JEC61360_DICTIONARY_SCHEMA.INTEGER_TYPE’
IN TYPEOF (typ)) AND
NOT ( INTEGER1IN TYPEOF (cons.min_value))
THEN RETURN(FALSE);
ENDJF;
(*if the data type is a rationalJype then min_value and max_va!ue shall be rational.*)
IF (1S013584JEC61360_DICTIONARY_SCHEMA.RATIONAL_TYPE’
139