Integrated generic resource: State ISO 10303-56:2019(E)
© ISO

Cover page
Table of contents
Copyright
Foreword
Introduction
1 Scope
2 Normative references
3 Terms, definitions and abbreviated terms
    3.1 Terms and definitions
    3.2 Abbreviated terms

4 State type
   4.1 General
   4.2 Fundamental concepts and assumptions
   4.3 State type entity definitions
5 State observed
   5.1 General
   5.2 Fundamental concepts and assumptions
   5.3 State observed type definition
   5.4 State observed entity definitions
   5.5 State observed function definitions

A Short names of entities
B Information object registration
C Computer interpretable listings
D EXPRESS-G diagrams
E Change history
Index

(*
ISO/TC 184/SC 4/WG 12 N10245 - ISO 10303-56 State - EXPRESS
Supersedes ISO/TC 184/SC 4/WG 12 N3207
*)



SCHEMA state_observed_schema;

REFERENCE FROM basic_attribute_schema   -- ISO 10303-41
  (get_id_value,
   id_attribute,
   id_attribute_select);

REFERENCE FROM state_type_schema   -- ISO 10303-56
  (state_type);

REFERENCE FROM support_resource_schema   -- ISO 10303-41
  (bag_to_set,
   identifier,
   label,
   text);


TYPE sos_id_attribute_select = SELECT BASED_ON id_attribute_select WITH
   (ascribable_state_relationship);
END_TYPE;

ENTITY ascribable_state;
  name : label;
  description : OPTIONAL text;
  pertaining_state_type : state_type;
  ascribed_state_observed : state_observed;
END_ENTITY;

ENTITY ascribable_state_relationship;
  name : label;
  description : OPTIONAL text;
  relating_ascribable_state : ascribable_state;
  related_ascribable_state : ascribable_state;
DERIVE
  id : identifier := get_id_value(SELF);
WHERE
  WR1: SIZEOF(USEDIN(SELF, 'BASIC_ATTRIBUTE_SCHEMA.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
END_ENTITY;

ENTITY hypothesis_state_to_confirmation_state_relationship
  SUBTYPE OF (state_definition_to_state_assignment_relationship);
  confirmed_state : ascribable_state;
  hypothesized_state : ascribable_state;
WHERE
  WR1: acyclic_hypothesis_state_to_confirmation_state_relationship(SELF, [confirmed_state], 'STATE_OBSERVED_SCHEMA.HYPOTHESIS_STATE_TO_CONFIRMATION_STATE_RELATIONSHIP');
END_ENTITY;

ENTITY state_definition_to_state_assignment_relationship
  SUBTYPE OF (ascribable_state_relationship);
  relation_type : STRING;
WHERE
  WR1: acyclic_state_definition_to_state_assignment_relationship(SELF, [SELF\ascribable_state_relationship.related_ascribable_state], 'STATE_OBSERVED_SCHEMA.STATE_DEFINITION_TO_STATE_ASSIGNMENT_RELATIONSHIP');
END_ENTITY;

ENTITY state_observed;
  name : label;
  description : OPTIONAL text;
END_ENTITY;

ENTITY state_observed_assignment
  ABSTRACT SUPERTYPE ;
  assigned_state_observed : state_observed;
  role : state_observed_role;
END_ENTITY;

ENTITY state_observed_relationship;
  name : label;
  description : OPTIONAL text;
  relating_state_observed : SET[1:?] OF state_observed;
  related_state_observed : SET[1:?] OF state_observed;
END_ENTITY;

ENTITY state_observed_role;
  name : label;
  description : OPTIONAL text;
END_ENTITY;

FUNCTION acyclic_hypothesis_state_to_confirmation_state_relationship
 (relation : hypothesis_state_to_confirmation_state_relationship; relatives : SET[1:?] OF ascribable_state; specific_relation : STRING) : LOGICAL;
LOCAL
     x                : SET OF hypothesis_state_to_confirmation_state_relationship;
   END_LOCAL;
   IF relation.confirmed_state IN
             relatives THEN
     RETURN (FALSE);
   END_IF;             -- IN is based in instance equality
   x := QUERY (hstcsr <* bag_to_set (USEDIN
        (relation.confirmed_state,
         'STATE_OBSERVED_SCHEMA.' +
         'HYPOTHESIS_STATE_TO_CONFIRMATION_STATE_RELATIONSHIP.' +
         'HYPOTHESIZED_STATE')) |
          specific_relation IN TYPEOF (hstcsr));
   REPEAT I := 1 TO HIINDEX(x);             -- pre-checked loop
     IF NOT acyclic_hypothesis_state_to_confirmation_state_relationship
       (x[i],
        relatives + relation.confirmed_state,
        specific_relation) THEN
       RETURN(FALSE);
     END_IF;
   END_REPEAT;
   RETURN(TRUE);
END_FUNCTION;

FUNCTION acyclic_state_definition_to_state_assignment_relationship
 (relation : state_definition_to_state_assignment_relationship; relatives : SET[1:?] OF ascribable_state; specific_relation : STRING) : LOGICAL;
LOCAL
     x                : SET OF state_definition_to_state_assignment_relationship;
   END_LOCAL;
   IF relation.relating_ascribable_state IN
             relatives THEN
     RETURN (FALSE);
   END_IF;             -- IN is based in instance equality
   x := QUERY (sdtsar <* bag_to_set (USEDIN
        (relation.relating_ascribable_state,
         'STATE_OBSERVED_SCHEMA.' +
         'STATE_DEFINITION_TO_STATE_ASSIGNMENT_RELATIONSHIP.' +
         'RELATED_ASCRIBABLE_STATE')) |
          specific_relation IN TYPEOF (sdtsar));
   REPEAT I := 1 TO HIINDEX(x);             -- pre-checked loop
     IF NOT acyclic_state_definition_to_state_assignment_relationship
       (x[i],
        relatives + relation.relating_ascribable_state,
        specific_relation) THEN
       RETURN(FALSE);
     END_IF;
   END_REPEAT;
   RETURN(TRUE);
END_FUNCTION;

END_SCHEMA;  -- state_observed_schema


© ISO 2019 — All rights reserved