ISO 10303-238:2022(E)

Annex A
(normative)

AIM EXPRESS expanded listing

The following EXPRESS is the expanded form of the short form schema given in 5.2. In the event of any discrepancy between the short form and this expanded listing, the expanded listing shall be used.

SCHEMA model_based_integrated_manufacturing_schema;
(*
    ISO TC184/SC4/WG15N196 (superceeds N158)
    ISO 10303-238 Edition 3
    AIM EXPRESS LONG FORM
 *)

CONSTANT
    dummy_gri                     : geometric_representation_item := 
                                       representation_item('') || 
                                       geometric_representation_item();
    dummy_tri                     : topological_representation_item := 
                                       representation_item('') || 
                                       topological_representation_item();
    schema_prefix                 : STRING := 
                                       'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.'
                                       ;
    the_binarys                   : elementary_space := 
                                       make_elementary_space(es_binarys);
    the_booleans                  : elementary_space := 
                                       make_elementary_space(es_booleans);
    the_complex_numbers           : elementary_space := 
                                       make_elementary_space(
                                       es_complex_numbers);
    the_complex_tuples            : extended_tuple_space := 
                                       make_extended_tuple_space(
                                       the_zero_tuple_space, 
                                       the_complex_numbers);
    the_empty_atom_based_tuple    : atom_based_tuple := [];
    the_empty_atom_based_value    : atom_based_value := 
                                       the_empty_atom_based_tuple;
    the_empty_maths_tuple         : maths_tuple := [];
    the_empty_maths_value         : maths_value := the_empty_maths_tuple;
    the_empty_space               : finite_space := make_finite_space([]);
    the_generics                  : elementary_space := 
                                       make_elementary_space(es_generics);
    the_integer_tuples            : extended_tuple_space := 
                                       make_extended_tuple_space(
                                       the_zero_tuple_space, the_integers);
    the_integers                  : elementary_space := 
                                       make_elementary_space(es_integers);
    the_logicals                  : elementary_space := 
                                       make_elementary_space(es_logicals);
    the_maths_spaces              : elementary_space := 
                                       make_elementary_space(
                                       es_maths_spaces);
    the_neg1_one_interval         : finite_real_interval := 
                                       make_finite_real_interval(-1, closed
                                       , 1, closed);
    the_neghalfpi_halfpi_interval : finite_real_interval := 
                                       make_finite_real_interval(-0.5 * PI,
                                        closed, 0.5 * PI, closed);
    the_negpi_pi_interval         : finite_real_interval := 
                                       make_finite_real_interval(-PI, open,
                                        PI, closed);
    the_nonnegative_reals         : real_interval_from_min := 
                                       make_real_interval_from_min(0, 
                                       closed);
    the_numbers                   : elementary_space := 
                                       make_elementary_space(es_numbers);
    the_real_tuples               : extended_tuple_space := 
                                       make_extended_tuple_space(
                                       the_zero_tuple_space, the_reals);
    the_reals                     : elementary_space := 
                                       make_elementary_space(es_reals);
    the_strings                   : elementary_space := 
                                       make_elementary_space(es_strings);
    the_tuples                    : extended_tuple_space := 
                                       make_extended_tuple_space(
                                       the_zero_tuple_space, the_generics);
    the_zero_one_interval         : finite_real_interval := 
                                       make_finite_real_interval(0, closed,
                                        1, closed);
    the_zero_pi_interval          : finite_real_interval := 
                                       make_finite_real_interval(0, closed,
                                        PI, closed);
    the_zero_tuple_space          : listed_product_space := 
                                       make_listed_product_space([]);
END_CONSTANT;

TYPE absorbed_dose_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE acceleration_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE action_items = SELECT 
  (action,
   action_method,
   action_property,
   action_relationship,
   action_request_solution,
   alternate_product_relationship,
   applied_action_assignment,
   applied_classification_assignment,
   applied_person_and_organization_assignment,
   approval_status,
   assembly_component_usage_substitute,
   certification,
   characterized_object,
   class,
   class_system,
   configuration_design,
   configuration_effectivity,
   configuration_item,
   configured_effectivity_assignment,
   contract,
   dimensional_location,
   dimensional_size,
   directed_dimensional_location,
   document_file,
   document_type,
   general_property,
   identification_item,
   material_designation,
   organization_relationship,
   organizational_project,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_feature_category,
   product_concept_feature_category_usage,
   product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   product_definition_substitute,
   property_definition,
   property_definition_relationship,
   security_classification,
   security_classification_level,
   shape_aspect,
   shape_representation,
   versioned_action_request);
END_TYPE; -- 10303-1047: activity_mim

TYPE action_method_items = SELECT 
  (action,
   action_method,
   action_property,
   applied_action_assignment,
   characterized_object,
   configuration_design,
   configuration_item,
   contract,
   dimensional_location,
   dimensional_size,
   document_file,
   event_occurrence,
   geometric_tolerance,
   machining_cutting_component,
   machining_execution_resource,
   machining_tool,
   organization,
   organizational_project,
   person,
   person_and_organization,
   product,
   product_concept,
   product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   property_definition,
   shape_aspect);
END_TYPE; -- 10303-1249: activity_method_assignment_mim

TYPE action_request_item = SELECT 
  (action,
   action_method,
   action_property,
   action_relationship,
   alternate_product_relationship,
   assembly_component_usage_substitute,
   configuration_design,
   configuration_effectivity,
   configuration_item,
   configured_effectivity_assignment,
   document_file,
   general_property,
   material_designation,
   organizational_project,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_feature_category,
   product_concept_feature_category_usage,
   product_definition,
   product_definition_formation,
   product_definition_relationship,
   product_definition_substitute,
   property_definition,
   shape_aspect,
   shape_representation,
   versioned_action_request);
END_TYPE; -- 10303-1042: work_request_mim

TYPE actuated_direction = ENUMERATION OF 
  (bidirectional,
   positive_only,
   negative_only,
   not_actuated);
END_TYPE; -- 10303-105: kinematic_structure_schema

TYPE ahead_or_behind = ENUMERATION OF 
  (ahead,
   exact,
   behind);
END_TYPE; -- 10303-41: date_time_schema

TYPE amount_of_substance_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE angle_relator = ENUMERATION OF 
  (equal,
   large,
   small);
END_TYPE; -- 10303-47: shape_dimension_schema

TYPE angular_deviation = positive_plane_angle_measure;
END_TYPE; -- 10303-42: geometric_model_schema

TYPE annotation_placeholder_occurrence_role = ENUMERATION OF 
  (annotation_text,
   gps_data);
END_TYPE; -- 10303-113: mechanical_design_schema

TYPE annotation_plane_element = SELECT 
  (draughting_callout,
   styled_item);
END_TYPE; -- 10303-101: draughting_element_schema

TYPE annotation_representation_select = SELECT 
  (draughting_model,
   presentation_area,
   presentation_view,
   symbol_representation);
END_TYPE; -- 10303-46: presentation_organization_schema

TYPE annotation_symbol_occurrence_item = SELECT 
  (annotation_symbol,
   defined_symbol);
END_TYPE; -- 10303-46: presentation_definition_schema

TYPE annotation_text_occurrence_item = SELECT 
  (annotation_text,
   composite_text,
   defined_character_glyph,
   text_literal);
END_TYPE; -- 10303-46: presentation_definition_schema

TYPE approval_item = SELECT 
  (action,
   action_directive,
   action_property,
   action_request_solution,
   applied_action_assignment,
   applied_classification_assignment,
   applied_usage_right,
   certification,
   class,
   class_system,
   configuration_design,
   configuration_effectivity,
   configuration_item,
   configured_effectivity_assignment,
   contract,
   date,
   directed_action,
   document,
   effectivity,
   executed_action,
   general_property,
   general_property_relationship,
   group,
   group_relationship,
   information_usage_right,
   material_designation,
   organizational_project,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_feature_category,
   product_concept_feature_category_usage,
   product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   product_definition_substitute,
   property_definition,
   representation,
   requirement_assignment,
   security_classification,
   shape_aspect_relationship,
   shape_representation,
   versioned_action_request);
END_TYPE; -- 10303-1012: approval_mim

TYPE area_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE area_or_view = SELECT 
  (presentation_area,
   presentation_view);
END_TYPE; -- 10303-46: presentation_organization_schema

TYPE area_unit_type = ENUMERATION OF 
  (spherical,
   cylindrical,
   rectangular,
   square,
   circular);
END_TYPE; -- 10303-47: shape_tolerance_schema

TYPE atom_based_tuple = LIST OF atom_based_value;
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE atom_based_value = SELECT 
  (atom_based_tuple,
   maths_atom);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE attribute_classification_item = SELECT 
  (action_directive,
   action_method,
   action_property,
   action_property_representation,
   action_relationship,
   action_request_solution,
   action_request_status,
   alternate_product_relationship,
   applied_action_assignment,
   applied_action_request_assignment,
   applied_approval_assignment,
   applied_certification_assignment,
   applied_document_reference,
   applied_document_usage_constraint_assignment,
   applied_effectivity_assignment,
   applied_event_occurrence_assignment,
   applied_external_identification_assignment,
   applied_identification_assignment,
   applied_organization_assignment,
   applied_organizational_project_assignment,
   applied_person_and_organization_assignment,
   approval,
   approval_person_organization,
   approval_relationship,
   approval_status,
   certification,
   context_dependent_unit,
   contract,
   date_and_time_assignment,
   date_assignment,
   derived_unit,
   descriptive_representation_item,
   document_file,
   document_relationship,
   effectivity,
   event_occurrence_relationship,
   executed_action,
   general_property,
   general_property_relationship,
   group,
   group_relationship,
   information_right,
   information_usage_right,
   language,
   measure_representation_item,
   measure_with_unit,
   named_unit,
   organization_relationship,
   organizational_address,
   organizational_project_relationship,
   person_and_organization,
   person_and_organization_address,
   product,
   product_category,
   product_concept,
   product_concept_context,
   product_definition,
   product_definition_context,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   property_definition,
   property_definition_relationship,
   property_definition_representation,
   representation,
   representation_context,
   representation_item,
   security_classification,
   time_interval_relationship,
   uncertainty_measure_with_unit,
   usage_association,
   versioned_action_request);
END_TYPE; -- 10303-1246: attribute_classification_mim

TYPE attribute_language_item = SELECT 
  (action,
   applied_document_reference,
   applied_document_usage_constraint_assignment,
   applied_external_identification_assignment,
   applied_organizational_project_assignment,
   approval,
   approval_relationship,
   approval_status,
   attribute_value_assignment,
   certification,
   certification_type,
   contract,
   data_environment,
   date_role,
   date_time_role,
   document_relationship,
   document_usage_role,
   external_source,
   group,
   group_relationship,
   identification_role,
   information_right,
   information_usage_right,
   multi_language_attribute_assignment,
   name_assignment,
   object_role,
   organization_relationship,
   organizational_project,
   organizational_project_relationship,
   organizational_project_role,
   person_and_organization,
   product,
   product_concept_feature,
   product_concept_feature_association,
   product_definition,
   product_definition_formation,
   product_definition_relationship,
   product_definition_substitute,
   property_definition_relationship,
   representation,
   representation_relationship,
   usage_association,
   versioned_action_request);
END_TYPE; -- 10303-1105: multi_linguism_mim

TYPE attribute_type = SELECT 
  (label,
   text);
END_TYPE; -- 10303-41: management_resources_schema

TYPE axis2_placement = SELECT 
  (axis2_placement_2d,
   axis2_placement_3d);
END_TYPE; -- 10303-42: geometry_schema

TYPE b_spline_curve_form = ENUMERATION OF 
  (polyline_form,
   circular_arc,
   elliptic_arc,
   parabolic_arc,
   hyperbolic_arc,
   unspecified);
END_TYPE; -- 10303-42: geometry_schema

TYPE b_spline_surface_form = ENUMERATION OF 
  (plane_surf,
   cylindrical_surf,
   conical_surf,
   spherical_surf,
   toroidal_surf,
   surf_of_revolution,
   ruled_surf,
   generalised_cone,
   quadric_surf,
   surf_of_linear_extrusion,
   unspecified);
END_TYPE; -- 10303-42: geometry_schema

TYPE boolean_operand = SELECT 
  (boolean_result,
   csg_primitive,
   half_space_solid,
   solid_model);
END_TYPE; -- 10303-42: geometric_model_schema

TYPE boolean_operator = ENUMERATION OF 
  (union,
   intersection,
   difference);
END_TYPE; -- 10303-42: geometric_model_schema

TYPE box_characteristic_select = SELECT 
  (box_height,
   box_rotate_angle,
   box_slant_angle,
   box_width);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE box_height = positive_ratio_measure;
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE box_rotate_angle = plane_angle_measure;
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE box_slant_angle = plane_angle_measure;
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE box_width = positive_ratio_measure;
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE camera_model_d3_multi_clipping_intersection_select = SELECT 
  (camera_model_d3_multi_clipping_union,
   plane);
END_TYPE; -- 10303-46: presentation_organization_schema

TYPE camera_model_d3_multi_clipping_union_select = SELECT 
  (camera_model_d3_multi_clipping_intersection,
   plane);
END_TYPE; -- 10303-46: presentation_organization_schema

TYPE capacitance_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE category_usage_item = SELECT 
  (product_class);
END_TYPE; -- 10303-1103: product_class_mim

TYPE celsius_temperature_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE central_or_parallel = ENUMERATION OF 
  (central,
   parallel);
END_TYPE; -- 10303-46: presentation_organization_schema

TYPE certification_item = SELECT 
  (alternate_product_relationship,
   make_from_usage_option,
   product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship);
END_TYPE; -- 10303-1044: certification_mim

TYPE chained_representation_link = SELECT 
  (mapped_item,
   representation_context,
   representation_relationship);
END_TYPE; -- 10303-41: product_property_representation_schema

TYPE character_spacing_select = SELECT 
  (descriptive_measure,
   length_measure,
   measure_with_unit,
   ratio_measure);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE character_style_select = SELECT 
  (character_glyph_style_outline,
   character_glyph_style_stroke,
   text_style_for_defined_font);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE characterized_action_definition = SELECT 
  (action,
   action_method,
   action_method_relationship,
   action_relationship);
END_TYPE; -- 10303-49: process_property_schema

TYPE characterized_definition = SELECT 
  (characterized_item,
   characterized_object,
   characterized_product_definition,
   shape_definition);
END_TYPE; -- 10303-41: product_property_definition_schema

TYPE characterized_item = SELECT 
  (dimensional_size,
   geometric_tolerance,
   item_identified_representation_usage);
END_TYPE; -- 10303-41: product_property_definition_schema

TYPE characterized_material_property = SELECT 
  (material_property_representation);
END_TYPE; -- 10303-45: material_property_definition_schema

TYPE characterized_product_definition = SELECT 
  (product_definition,
   product_definition_occurrence,
   product_definition_relationship);
END_TYPE; -- 10303-41: product_property_definition_schema

TYPE characterized_property_representation = SELECT 
  (action_property_representation,
   dimensional_characteristic_representation,
   property_definition_representation,
   resource_property_representation);
END_TYPE; -- 10303-45: material_property_representation_schema

TYPE characterized_resource_definition = SELECT 
  (action_resource,
   action_resource_relationship,
   action_resource_requirement);
END_TYPE; -- 10303-49: process_property_schema

TYPE chordal_deviation = positive_length_measure;
END_TYPE; -- 10303-42: geometric_model_schema

TYPE class_usage_effectivity_context_item = SELECT 
  (product_definition);
END_TYPE; -- 10303-1112: specification_control_mim

TYPE classification_item = SELECT 
  (action,
   action_directive,
   action_method,
   action_property,
   action_relationship,
   action_request_solution,
   action_request_status,
   action_resource,
   action_resource_relationship,
   address,
   alternate_product_relationship,
   applied_action_assignment,
   applied_action_request_assignment,
   applied_approval_assignment,
   applied_certification_assignment,
   applied_contract_assignment,
   applied_date_and_time_assignment,
   applied_date_assignment,
   applied_document_reference,
   applied_document_usage_constraint_assignment,
   applied_effectivity_assignment,
   applied_event_occurrence_assignment,
   applied_external_identification_assignment,
   applied_identification_assignment,
   applied_organization_assignment,
   applied_organizational_project_assignment,
   applied_person_and_organization_assignment,
   applied_security_classification_assignment,
   approval,
   approval_person_organization,
   approval_relationship,
   approval_status,
   assembly_component_usage_substitute,
   calendar_date,
   certification,
   characterized_object,
   class,
   classified_item,
   configuration_item,
   context_dependent_unit,
   contract,
   conversion_based_unit,
   date_and_time,
   date_and_time_assignment,
   date_assignment,
   derived_unit,
   descriptive_representation_item,
   directed_action,
   document_file,
   document_relationship,
   document_type,
   effectivity,
   event_occurrence,
   executed_action,
   externally_defined_representation_with_parameters,
   general_property,
   general_property_relationship,
   group,
   identification_assignment,
   information_right,
   information_usage_right,
   language,
   material_designation,
   measure_representation_item,
   measure_with_unit,
   multi_language_attribute_assignment,
   named_unit,
   organization,
   organization_relationship,
   organizational_address,
   organizational_project,
   organizational_project_relationship,
   person,
   person_and_organization_address,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_category,
   product_definition,
   product_definition_context,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   property_definition,
   property_definition_representation,
   representation,
   representation_context,
   representation_item,
   security_classification,
   security_classification_level,
   shape_aspect,
   uncertainty_measure_with_unit,
   usage_association,
   versioned_action_request);
END_TYPE; -- 10303-1114: classification_assignment_mim

TYPE classified_item = SELECT 
  (product,
   product_definition,
   product_definition_formation);
END_TYPE; -- 10303-1111: classification_with_attributes_mim

TYPE colour_type_enum = ENUMERATION OF 
  (rgb8,
   rgbt8);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE common_datum_list = LIST [2:?] OF datum_reference_element;
  WHERE
    WR1: SIZEOF(QUERY (dre <* SELF| (dre\shape_aspect.of_shape <> SELF[1]\
              shape_aspect.of_shape))) = 0;
END_TYPE; -- 10303-47: shape_aspect_definition_schema

TYPE compound_item_definition = SELECT 
  (list_representation_item,
   set_representation_item);
END_TYPE; -- 10303-43: representation_schema

TYPE conductance_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE configuration_design_item = SELECT 
  (product_definition,
   product_definition_formation,
   product_definition_occurrence);
END_TYPE; -- 10303-44: configuration_management_schema

TYPE configured_effectivity_context_item = SELECT 
  (product_concept_feature_association);
END_TYPE; -- 10303-1108: specification_based_configuration_mim

TYPE configured_effectivity_item = SELECT 
  (action_relationship,
   product_definition);
END_TYPE; -- 10303-1108: specification_based_configuration_mim

TYPE constructive_geometry_representation_or_shape_representation = SELECT 
  (constructive_geometry_representation,
   shape_representation);
END_TYPE; -- 10303-1131: construction_geometry_mim

TYPE context_dependent_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE contract_item = SELECT 
  (action_directive,
   alternate_product_relationship,
   directed_action,
   information_usage_right,
   organization,
   person_and_organization,
   product,
   product_definition_formation);
END_TYPE; -- 10303-1062: contract_mim

TYPE count_measure = NUMBER;
END_TYPE; -- 10303-41: measure_schema

TYPE csg_primitive = SELECT 
  (block,
   cyclide_segment_solid,
   eccentric_cone,
   ellipsoid,
   faceted_primitive,
   rectangular_pyramid,
   right_angular_wedge,
   right_circular_cone,
   right_circular_cylinder,
   sphere,
   torus);
END_TYPE; -- 10303-42: geometric_model_schema

TYPE csg_select = SELECT 
  (boolean_result,
   csg_primitive);
END_TYPE; -- 10303-42: geometric_model_schema

TYPE curve_font_or_scaled_curve_font_select = SELECT 
  (curve_style_font_and_scaling,
   curve_style_font_select);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE curve_on_surface = SELECT 
  (composite_curve_on_surface,
   pcurve,
   surface_curve);
END_TYPE; -- 10303-42: geometry_schema

TYPE curve_or_annotation_curve_occurrence = SELECT 
  (annotation_curve_occurrence,
   curve);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE curve_or_curve_set = SELECT 
  (curve,
   geometric_curve_set);
END_TYPE; -- 10303-46: presentation_definition_schema

TYPE curve_or_render = SELECT 
  (curve_style,
   curve_style_rendering);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE curve_style_font_select = SELECT 
  (curve_style_font,
   externally_defined_curve_font,
   pre_defined_curve_font);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE date_and_time_item = SELECT 
  (action,
   action_directive,
   action_method,
   action_property,
   action_relationship,
   action_request_solution,
   alternate_product_relationship,
   applied_action_assignment,
   applied_classification_assignment,
   applied_organization_assignment,
   applied_person_and_organization_assignment,
   applied_security_classification_assignment,
   approval_person_organization,
   approval_status,
   assembly_component_usage_substitute,
   certification,
   class,
   class_system,
   configuration_design,
   configuration_item,
   configured_effectivity_assignment,
   contract,
   directed_action,
   document,
   document_file,
   effectivity,
   event_occurrence,
   executed_action,
   general_property,
   information_usage_right,
   machining_operation,
   machining_process_executable,
   machining_toolpath,
   material_designation,
   organization_relationship,
   organizational_project,
   person_and_organization,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_feature_category,
   product_concept_feature_category_usage,
   product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   product_definition_substitute,
   property_definition,
   security_classification,
   security_classification_level,
   shape_representation,
   versioned_action_request);
END_TYPE; -- 10303-1014: date_time_assignment_mim

TYPE date_item = SELECT 
  (action,
   action_directive,
   action_method,
   action_property,
   action_relationship,
   action_request_solution,
   alternate_product_relationship,
   applied_action_assignment,
   applied_classification_assignment,
   applied_organization_assignment,
   applied_person_and_organization_assignment,
   applied_security_classification_assignment,
   approval_person_organization,
   approval_status,
   assembly_component_usage_substitute,
   certification,
   class,
   class_system,
   configuration_design,
   configuration_item,
   configured_effectivity_assignment,
   contract,
   directed_action,
   document,
   document_file,
   effectivity,
   event_occurrence,
   executed_action,
   general_property,
   information_usage_right,
   material_designation,
   organization_relationship,
   organizational_project,
   person_and_organization,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_feature_category,
   product_concept_feature_category_usage,
   product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   product_definition_substitute,
   property_definition,
   security_classification,
   security_classification_level,
   shape_representation,
   versioned_action_request);
END_TYPE; -- 10303-1014: date_time_assignment_mim

TYPE date_time_or_event_occurrence = SELECT 
  (date_time_select,
   event_occurrence);
END_TYPE; -- 10303-41: date_time_schema

TYPE date_time_select = SELECT 
  (date,
   date_and_time,
   local_time);
END_TYPE; -- 10303-41: date_time_schema

TYPE datum_or_common_datum = SELECT 
  (common_datum_list,
   datum);
END_TYPE; -- 10303-47: shape_aspect_definition_schema

TYPE datum_reference_modifier = SELECT 
  (datum_reference_modifier_with_value,
   simple_datum_reference_modifier);
END_TYPE; -- 10303-47: shape_aspect_definition_schema

TYPE datum_reference_modifier_type = ENUMERATION OF 
  (projected,
   distance,
   spherical,
   circular_or_cylindrical);
END_TYPE; -- 10303-47: shape_aspect_definition_schema

TYPE datum_system_or_reference = SELECT 
  (datum_reference,
   datum_system);
END_TYPE; -- 10303-47: shape_tolerance_schema

TYPE day_in_month_number = INTEGER;
  WHERE
    WR1: (1 <= SELF) AND (SELF <= 31);
END_TYPE; -- 10303-41: date_time_schema

TYPE day_in_week_number = INTEGER;
  WHERE
    WR1: (1 <= SELF) AND (SELF <= 7);
END_TYPE; -- 10303-41: date_time_schema

TYPE day_in_year_number = INTEGER;
  WHERE
    WR1: (1 <= SELF) AND (SELF <= 366);
END_TYPE; -- 10303-41: date_time_schema

TYPE defined_glyph_select = SELECT 
  (externally_defined_character_glyph,
   pre_defined_character_glyph);
END_TYPE; -- 10303-46: presentation_definition_schema

TYPE defined_symbol_select = SELECT 
  (externally_defined_symbol,
   pre_defined_symbol);
END_TYPE; -- 10303-46: presentation_definition_schema

TYPE derived_property_select = SELECT 
  (action_property,
   dimensional_location,
   dimensional_size,
   geometric_tolerance,
   property_definition,
   resource_property);
END_TYPE; -- 10303-41: product_property_definition_schema

TYPE des_apll_point_select = SELECT 
  (apll_point,
   apll_point_with_surface);
END_TYPE; -- 10303-101: draughting_element_schema

TYPE des_apll_point_symbol = ENUMERATION OF 
  (circle,
   dot,
   internal_pair_forward_arrowhead,
   internal_pair_reverse_arrowhead,
   none,
   positive_arrowhead,
   triangle);
END_TYPE; -- 10303-101: draughting_element_schema

TYPE description_attribute_select = SELECT 
  (action_request_solution,
   application_context,
   approval_role,
   configuration_design,
   context_dependent_shape_representation,
   date_role,
   date_time_role,
   effectivity,
   external_source,
   organization_role,
   organizational_project,
   person_and_organization,
   person_and_organization_role,
   property_definition_representation,
   representation);
END_TYPE; -- 10303-41: basic_attribute_schema

TYPE descriptive_measure = STRING;
END_TYPE; -- 10303-41: measure_schema

TYPE dimension_count = INTEGER;
  WHERE
    WR1: SELF > 0;
END_TYPE; -- 10303-42: geometry_schema

TYPE dimension_extent_usage = ENUMERATION OF 
  (origin,
   target);
END_TYPE; -- 10303-101: draughting_element_schema

TYPE dimensional_characteristic = SELECT 
  (dimensional_location,
   dimensional_size);
END_TYPE; -- 10303-47: shape_dimension_schema

TYPE directed_tolerance_zone_type = ENUMERATION OF 
  (perpendicular,
   parallel,
   including);
END_TYPE; -- 10303-47: shape_tolerance_schema

TYPE direction_count_select = SELECT 
  (u_direction_count,
   v_direction_count);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE document_identifier_assigned_item = SELECT 
  (document);
END_TYPE; -- 10303-1747: specification_document_mim

TYPE document_reference_item = SELECT 
  (action_directive,
   action_method,
   action_relationship,
   applied_action_assignment,
   applied_external_identification_assignment,
   approval,
   assembly_component_usage,
   certification,
   characterized_class,
   characterized_object,
   class,
   class_system,
   configuration_design,
   configuration_item,
   contract,
   descriptive_representation_item,
   dimensional_size,
   executed_action,
   externally_defined_dimension_definition,
   externally_defined_item,
   general_property,
   group,
   group_relationship,
   information_right,
   information_usage_right,
   material_designation,
   measure_representation_item,
   organization,
   organizational_project,
   person,
   product,
   product_category,
   product_concept,
   product_concept_feature,
   product_concept_feature_category,
   product_definition,
   product_definition_context,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_substitute,
   product_related_product_category,
   property_definition,
   representation,
   representation_item,
   security_classification,
   shape_aspect,
   shape_aspect_relationship,
   usage_association,
   versioned_action_request);
END_TYPE; -- 10303-1122: document_assignment_mim

TYPE dose_equivalent_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE dotted_express_identifier = STRING;
  WHERE
    SYNTAX: dotted_identifiers_syntax(SELF);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE draughting_callout_element = SELECT 
  (annotation_curve_occurrence,
   annotation_fill_area_occurrence,
   annotation_placeholder_occurrence,
   annotation_symbol_occurrence,
   annotation_text_occurrence,
   tessellated_annotation_occurrence);
END_TYPE; -- 10303-101: draughting_element_schema

TYPE draughting_model_item_association_select = SELECT 
  (annotation_occurrence,
   draughting_callout);
END_TYPE; -- 10303-101: draughting_element_schema

TYPE draughting_model_item_definition = SELECT 
  (angularity_tolerance,
   circular_runout_tolerance,
   coaxiality_tolerance,
   concentricity_tolerance,
   cylindricity_tolerance,
   dimensional_location,
   dimensional_size,
   flatness_tolerance,
   geometric_tolerance,
   geometric_tolerance_with_datum_reference,
   geometric_tolerance_with_defined_area_unit,
   geometric_tolerance_with_defined_unit,
   geometric_tolerance_with_maximum_tolerance,
   geometric_tolerance_with_modifiers,
   line_profile_tolerance,
   modified_geometric_tolerance,
   parallelism_tolerance,
   perpendicularity_tolerance,
   position_tolerance,
   product_definition_shape,
   property_definition,
   roundness_tolerance,
   shape_aspect,
   shape_aspect_relationship,
   straightness_tolerance,
   surface_profile_tolerance,
   symmetry_tolerance,
   total_runout_tolerance,
   unequally_disposed_geometric_tolerance);
END_TYPE; -- 10303-101: draughting_element_schema

TYPE draughting_model_item_select = SELECT 
  (axis2_placement,
   camera_model,
   draughting_callout,
   mapped_item,
   styled_item);
END_TYPE; -- 10303-101: draughting_element_schema

TYPE draughting_subfigure_representation_item = SELECT 
  (annotation_occurrence,
   axis2_placement,
   draughting_callout);
END_TYPE; -- 10303-504: aic_draughting_annotation

TYPE draughting_symbol_representation_item = SELECT 
  (annotation_curve_occurrence,
   annotation_fill_area_occurrence,
   annotation_symbol_occurrence,
   annotation_text_occurrence,
   axis2_placement);
END_TYPE; -- 10303-504: aic_draughting_annotation

TYPE edge_or_curve = SELECT 
  (curve,
   edge_curve);
END_TYPE; -- 10303-42: geometric_model_schema

TYPE effectivity_item = SELECT 
  (action,
   action_method,
   action_method_relationship,
   action_property,
   action_relationship,
   class,
   class_system,
   configuration_design,
   configuration_item,
   configured_effectivity_assignment,
   document_file,
   general_property,
   material_designation,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_feature_category,
   product_concept_feature_category_usage,
   product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   product_definition_substitute,
   property_definition,
   security_classification,
   shape_aspect,
   shape_representation);
END_TYPE; -- 10303-1059: effectivity_application_mim

TYPE electric_charge_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE electric_current_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE electric_potential_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE elementary_function_enumerators = ENUMERATION OF 
  (ef_and,
   ef_or,
   ef_not,
   ef_xor,
   ef_negate_i,
   ef_add_i,
   ef_subtract_i,
   ef_multiply_i,
   ef_divide_i,
   ef_mod_i,
   ef_exponentiate_i,
   ef_eq_i,
   ef_ne_i,
   ef_gt_i,
   ef_lt_i,
   ef_ge_i,
   ef_le_i,
   ef_abs_i,
   ef_max_i,
   ef_min_i,
   ef_if_i,
   ef_negate_r,
   ef_reciprocal_r,
   ef_add_r,
   ef_subtract_r,
   ef_multiply_r,
   ef_divide_r,
   ef_mod_r,
   ef_exponentiate_r,
   ef_exponentiate_ri,
   ef_eq_r,
   ef_ne_r,
   ef_gt_r,
   ef_lt_r,
   ef_ge_r,
   ef_le_r,
   ef_abs_r,
   ef_max_r,
   ef_min_r,
   ef_acos_r,
   ef_asin_r,
   ef_atan2_r,
   ef_cos_r,
   ef_exp_r,
   ef_ln_r,
   ef_log2_r,
   ef_log10_r,
   ef_sin_r,
   ef_sqrt_r,
   ef_tan_r,
   ef_if_r,
   ef_form_c,
   ef_rpart_c,
   ef_ipart_c,
   ef_negate_c,
   ef_reciprocal_c,
   ef_add_c,
   ef_subtract_c,
   ef_multiply_c,
   ef_divide_c,
   ef_exponentiate_c,
   ef_exponentiate_ci,
   ef_eq_c,
   ef_ne_c,
   ef_conjugate_c,
   ef_abs_c,
   ef_arg_c,
   ef_cos_c,
   ef_exp_c,
   ef_ln_c,
   ef_sin_c,
   ef_sqrt_c,
   ef_tan_c,
   ef_if_c,
   ef_subscript_s,
   ef_eq_s,
   ef_ne_s,
   ef_gt_s,
   ef_lt_s,
   ef_ge_s,
   ef_le_s,
   ef_subsequence_s,
   ef_concat_s,
   ef_size_s,
   ef_format,
   ef_value,
   ef_like,
   ef_if_s,
   ef_subscript_b,
   ef_eq_b,
   ef_ne_b,
   ef_gt_b,
   ef_lt_b,
   ef_ge_b,
   ef_le_b,
   ef_subsequence_b,
   ef_concat_b,
   ef_size_b,
   ef_if_b,
   ef_subscript_t,
   ef_eq_t,
   ef_ne_t,
   ef_concat_t,
   ef_size_t,
   ef_entuple,
   ef_detuple,
   ef_insert,
   ef_remove,
   ef_if_t,
   ef_sum_it,
   ef_product_it,
   ef_add_it,
   ef_subtract_it,
   ef_scalar_mult_it,
   ef_dot_prod_it,
   ef_sum_rt,
   ef_product_rt,
   ef_add_rt,
   ef_subtract_rt,
   ef_scalar_mult_rt,
   ef_dot_prod_rt,
   ef_norm_rt,
   ef_sum_ct,
   ef_product_ct,
   ef_add_ct,
   ef_subtract_ct,
   ef_scalar_mult_ct,
   ef_dot_prod_ct,
   ef_norm_ct,
   ef_if,
   ef_ensemble,
   ef_member_of);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE elementary_space_enumerators = ENUMERATION OF 
  (es_numbers,
   es_complex_numbers,
   es_reals,
   es_integers,
   es_logicals,
   es_booleans,
   es_strings,
   es_binarys,
   es_maths_spaces,
   es_maths_functions,
   es_generics);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE energy_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE event_occurrence_item = SELECT 
  (action,
   action_directive,
   action_method,
   action_property,
   action_request_solution,
   alternate_product_relationship,
   applied_action_assignment,
   applied_classification_assignment,
   assembly_component_usage_substitute,
   certification,
   class,
   class_system,
   configuration_design,
   configuration_effectivity,
   configuration_item,
   configured_effectivity_assignment,
   contract,
   executed_action,
   general_property,
   material_designation,
   organization_relationship,
   organizational_project,
   person_and_organization,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_feature_category,
   product_concept_feature_category_usage,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   product_definition_substitute,
   property_definition,
   security_classification_level,
   shape_representation);
END_TYPE; -- 10303-1364: event_assignment_mim

TYPE express_identifier = dotted_express_identifier;
  WHERE
    SYNTAX: dot_count(SELF) = 0;
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE expression_element = SELECT 
  (expression);
END_TYPE; -- 10303-61: systems_engineering_representation_schema

TYPE extension_options = ENUMERATION OF 
  (eo_none,
   eo_cont,
   eo_cont_right,
   eo_cont_left);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE extent_enumeration = ENUMERATION OF 
  (invalid,
   zero,
   finite_non_zero,
   infinite);
END_TYPE; -- 10303-42: geometry_schema

TYPE external_identification_item = SELECT 
  (action_relationship,
   action_request_status,
   applied_external_identification_assignment,
   applied_organization_assignment,
   applied_person_and_organization_assignment,
   approval,
   approval_status,
   date_and_time_assignment,
   date_assignment,
   document_file,
   external_source,
   externally_defined_class,
   externally_defined_general_property,
   externally_defined_representation_item,
   generic_product_definition_reference,
   organizational_address,
   product_definition,
   security_classification,
   trimmed_curve,
   versioned_action_request);
END_TYPE; -- 10303-1128: external_item_identification_assignment_mim

TYPE face_or_surface = SELECT 
  (face_surface,
   surface);
END_TYPE; -- 10303-42: geometric_model_schema

TYPE fill_area_style_tile_shape_select = SELECT 
  (externally_defined_tile,
   fill_area_style_tile_coloured_region,
   fill_area_style_tile_curve_with_style,
   fill_area_style_tile_symbol_with_style,
   pre_defined_tile);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE fill_style_select = SELECT 
  (externally_defined_hatch_style,
   externally_defined_tile_style,
   fill_area_style_colour,
   fill_area_style_hatching,
   fill_area_style_tiles);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE font_select = SELECT 
  (externally_defined_text_font,
   pre_defined_text_font);
END_TYPE; -- 10303-46: presentation_resource_schema

TYPE force_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE founded_item_select = SELECT 
  (founded_item,
   representation_item);
END_TYPE; -- 10303-43: representation_schema

TYPE frequency_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE generic_attribute_list_select = SELECT 
  (address,
   person);
END_TYPE; -- 10303-41: basic_attribute_schema

TYPE generic_attribute_select = SELECT 
  (address);
END_TYPE; -- 10303-41: basic_attribute_schema

TYPE geometric_item_specific_usage_select = SELECT 
  (shape_aspect,
   shape_aspect_relationship);
END_TYPE; -- 10303-1032: shape_property_assignment_mim

TYPE geometric_model_item = SELECT 
  (connected_face_set,
   edge_loop,
   geometric_representation_item);
END_TYPE; -- 10303-1032: shape_property_assignment_mim

TYPE geometric_set_select = SELECT 
  (annotation_text,
   curve,
   placement,
   planar_box,
   point,
   surface);
END_TYPE; -- 10303-42: geometric_model_schema

TYPE geometric_tolerance_auxiliary_classification_enum = ENUMERATION OF 
  (all_over,
   unless_otherwise_specified);
END_TYPE; -- 10303-47: shape_tolerance_schema

TYPE geometric_tolerance_modifier = ENUMERATION OF 
  (standard_deviation,
   valley_depth,
   peak_height,
   total_range_deviations,
   reference_maximum_inscribed_feature,
   reference_minimum_circumscribed_feature,
   reference_least_square_feature_with_internal_material_constraint,
   reference_least_square_feature_with_external_material_constraint,
   reference_least_square_feature_without_constraint,
   reference_minimax_feature_with_internal_material_constraint,
   reference_minimax_feature_with_external_material_constraint,
   reference_minimax_feature_without_constraint,
   associated_maximum_inscribed_feature,
   associated_tangent_feature,
   associated_minimum_inscribed_feature,
   associated_least_square_feature,
   associated_minmax_feature,
   united_feature,
   separate_requirement,
   each_radial_element,
   tangent_plane,
   statistical_tolerance,
   not_convex,
   line_element,
   pitch_diameter,
   major_diameter,
   minor_diameter,
   common_zone,
   free_state,
   any_cross_section,
   reciprocity_requirement,
   least_material_requirement,
   maximum_material_requirement,
   circle_a);
END_TYPE; -- 10303-47: shape_tolerance_schema

TYPE geometric_tolerance_target = SELECT 
  (dimensional_location,
   dimensional_size,
   product_definition_shape,
   shape_aspect);
END_TYPE; -- 10303-47: shape_tolerance_schema

TYPE gps_filtration_specification_target = SELECT 
  (geometric_tolerance);
END_TYPE; -- 10303-47: shape_tolerance_schema

TYPE gps_filtration_type = SELECT 
  (geometric_tolerance_modifier);
END_TYPE; -- 10303-47: shape_tolerance_schema

TYPE groupable_item = SELECT 
  (applied_identification_assignment,
   applied_name_assignment,
   group_relationship,
   instanced_feature,
   package_product_concept_feature,
   product_concept_feature,
   product_definition,
   product_definition_formation,
   property_definition_representation,
   replicate_feature,
   representation,
   representation_item,
   shape_aspect,
   shape_aspect_relationship,
   transition_feature);
  WHERE
    WR1: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GROUP' IN TYPEOF
              (SELF));
END_TYPE; -- 10303-1113: group_mim

TYPE hour_in_day = INTEGER;
  WHERE
    WR1: (0 <= SELF) AND (SELF < 24);
END_TYPE; -- 10303-41: date_time_schema

TYPE id_attribute_select = SELECT 
  (action,
   address,
   application_context,
   dimensional_size,
   geometric_tolerance,
   group,
   organizational_project,
   product_category,
   property_definition,
   representation,
   shape_aspect,
   shape_aspect_relationship,
   topological_representation_item);
END_TYPE; -- 10303-41: basic_attribute_schema

TYPE identification_item = SELECT 
  (action,
   action_directive,
   action_method,
   action_property,
   applied_identification_assignment,
   approval_status,
   class,
   class_system,
   configuration_item,
   contract,
   dimensional_size,
   document_file,
   document_type,
   effectivity,
   group,
   group_relationship,
   information_right,
   information_usage_right,
   material_designation,
   measure_representation_item,
   organization,
   organizational_project,
   person_and_organization,
   product,
   product_category,
   product_class,
   product_concept,
   product_concept_feature,
   product_concept_feature_category,
   product_definition,
   product_definition_formation,
   product_definition_relationship,
   product_identification,
   property_definition,
   property_definition_relationship,
   representation,
   security_classification,
   security_classification_level,
   shape_aspect_relationship,
   shape_representation,
   usage_association,
   versioned_action_request);
END_TYPE; -- 10303-1021: identification_assignment_mim

TYPE identifier = STRING;
END_TYPE; -- 10303-41: support_resource_schema

TYPE idrm_marked_item = SELECT 
  (document_file,
   product_definition);
END_TYPE; -- 10303-1349: incomplete_data_reference_mechanism_mim

TYPE illuminance_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE inductance_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE input_selector = positive_integer;
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE instance_usage_context_select = SELECT 
  (product_definition_relationship,
   product_definition_usage);
END_TYPE; -- 10303-1112: specification_control_mim

TYPE interpolation_type = ENUMERATION OF 
  (undefined_interpolation_type,
   discontinuous_interpolation_type,
   synchronous_interpolation_type,
   linear_interpolation_type);
END_TYPE; -- 10303-105: kinematic_motion_representation_schema

TYPE invisibility_context = SELECT 
  (draughting_model,
   presentation_representation,
   presentation_set);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE invisible_item = SELECT 
  (draughting_callout,
   presentation_layer_assignment,
   representation,
   styled_item);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE ir_usage_item = action_items;
END_TYPE; -- 10303-1241: information_rights_mim

TYPE item_identified_representation_usage_definition = SELECT 
  (characterized_object,
   dimensional_size,
   geometric_tolerance,
   represented_definition);
END_TYPE; -- 10303-41: product_property_representation_schema

TYPE item_identified_representation_usage_select = SELECT 
  (list_representation_item,
   representation_item,
   set_representation_item);
END_TYPE; -- 10303-41: product_property_representation_schema

TYPE kinematic_analysis_definition = SELECT 
  (interpolated_configuration_sequence,
   prescribed_path);
END_TYPE; -- 10303-105: kinematic_analysis_control_and_result_schema

TYPE kinematic_link_representation_items = SELECT 
  (curve,
   point,
   rigid_placement,
   surface);
END_TYPE; -- 10303-105: kinematic_structure_schema

TYPE kinematic_result = SELECT 
  (interpolated_configuration_sequence,
   resulting_path);
END_TYPE; -- 10303-105: kinematic_analysis_control_and_result_schema

TYPE kinematic_topology_representation_select = SELECT 
  (kinematic_topology_directed_structure,
   kinematic_topology_network_structure,
   kinematic_topology_structure);
END_TYPE; -- 10303-105: kinematic_topology_schema

TYPE knot_type = ENUMERATION OF 
  (uniform_knots,
   quasi_uniform_knots,
   piecewise_bezier_knots,
   unspecified);
END_TYPE; -- 10303-42: geometry_schema

TYPE label = STRING;
END_TYPE; -- 10303-41: support_resource_schema

TYPE layered_item = SELECT 
  (presentation_representation,
   representation_item);
END_TYPE; -- 10303-46: presentation_organization_schema

TYPE length_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE length_or_plane_angle_measure_with_unit_select = SELECT 
  (length_measure_with_unit,
   plane_angle_measure_with_unit);
END_TYPE; -- 10303-47: shape_tolerance_schema

TYPE length_to_height_ratio = ratio_measure;
END_TYPE; -- 10303-42: geometric_model_schema

TYPE limit_condition = ENUMERATION OF 
  (maximum_material_condition,
   least_material_condition,
   regardless_of_feature_size);
END_TYPE; -- 10303-47: shape_aspect_definition_schema

TYPE linearly_independent_enum = ENUMERATION OF 
  (independent,
   not_independent,
   not_tested);
END_TYPE; -- 10303-42: geometry_schema

TYPE link_or_shape_representation = SELECT 
  (kinematic_link_representation,
   shape_representation);
END_TYPE; -- 10303-105: kinematic_motion_representation_schema

TYPE list_of_reversible_topology_item = LIST [0:?] OF reversible_topology_item;
END_TYPE; -- 10303-42: topology_schema

TYPE list_representation_item = LIST [1:?] OF representation_item;
END_TYPE; -- 10303-43: representation_schema

TYPE locally_refined_spline_type_enum = ENUMERATION OF 
  (analysis_suitable_t_spline,
   hierarchical_b_spline,
   lr_b_spline,
   semi_standard_t_spline,
   standard_t_spline);
END_TYPE; -- 10303-42: geometry_schema

TYPE lower_upper = ENUMERATION OF 
  (lower,
   upper);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE luminous_flux_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE luminous_intensity_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE machining_feature_definition = SELECT 
  (boss,
   compound_feature,
   externally_defined_feature_definition,
   flat_face,
   gear,
   marking,
   outer_round,
   outside_profile,
   pocket,
   protrusion,
   removal_volume,
   replicate_feature,
   revolved_profile,
   rib_top,
   round_hole,
   rounded_end,
   slot,
   spherical_cap,
   step,
   thread,
   turned_knurl);
END_TYPE; -- 10303-113: machining_feature_schema

TYPE magnetic_flux_density_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE magnetic_flux_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE marker_select = SELECT 
  (marker_type,
   pre_defined_marker);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE marker_type = ENUMERATION OF 
  (dot,
   x,
   plus,
   asterisk,
   ring,
   square,
   triangle);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE mass_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE maths_atom = SELECT 
  (maths_enum_atom,
   maths_simple_atom);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE maths_binary = BINARY;
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE maths_boolean = BOOLEAN;
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE maths_enum_atom = SELECT 
  (elementary_function_enumerators,
   elementary_space_enumerators,
   extension_options,
   lower_upper,
   open_closed,
   ordering_type,
   repackage_options,
   space_constraint_type,
   symmetry_type);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE maths_expression = SELECT 
  (atom_based_value,
   generic_expression,
   maths_tuple);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE maths_function_select = SELECT 
  (elementary_function_enumerators,
   maths_function);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE maths_integer = INTEGER;
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE maths_logical = LOGICAL;
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE maths_number = NUMBER;
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE maths_real = REAL;
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE maths_simple_atom = SELECT 
  (maths_binary,
   maths_boolean,
   maths_integer,
   maths_logical,
   maths_number,
   maths_real,
   maths_string);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE maths_space_or_function = SELECT 
  (maths_function,
   maths_space);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE maths_string = STRING;
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE maths_tuple = LIST [0:?] OF maths_value;
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE maths_value = SELECT 
  (atom_based_value,
   generic_expression,
   maths_tuple);
  WHERE
    CONSTANCY: NOT ('GENERIC_EXPRESSION' IN stripped_typeof(SELF)) OR 
              expression_is_constant(SELF);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE maximum_edge_length = positive_length_measure;
END_TYPE; -- 10303-42: geometric_model_schema

TYPE measure_value = SELECT 
  (absorbed_dose_measure,
   acceleration_measure,
   amount_of_substance_measure,
   area_measure,
   capacitance_measure,
   celsius_temperature_measure,
   conductance_measure,
   context_dependent_measure,
   count_measure,
   descriptive_measure,
   dose_equivalent_measure,
   electric_charge_measure,
   electric_current_measure,
   electric_potential_measure,
   energy_measure,
   force_measure,
   frequency_measure,
   illuminance_measure,
   inductance_measure,
   length_measure,
   luminous_flux_measure,
   luminous_intensity_measure,
   magnetic_flux_density_measure,
   magnetic_flux_measure,
   mass_measure,
   non_negative_length_measure,
   numeric_measure,
   parameter_value,
   plane_angle_measure,
   positive_length_measure,
   positive_plane_angle_measure,
   positive_ratio_measure,
   power_measure,
   pressure_measure,
   radioactivity_measure,
   ratio_measure,
   resistance_measure,
   solid_angle_measure,
   thermodynamic_temperature_measure,
   time_measure,
   velocity_measure,
   volume_measure);
END_TYPE; -- 10303-41: measure_schema

TYPE mechanical_design_and_draughting_relationship_select = SELECT 
  (draughting_model,
   mechanical_design_geometric_presentation_representation,
   mechanical_design_presentation_representation_with_draughting,
   mechanical_design_shaded_presentation_representation,
   shape_representation);
END_TYPE; -- 10303-1315: mechanical_design_presentation_representation_with_draughting_mim

TYPE mechanical_design_geometric_presentation_area_items = SELECT 
  (axis2_placement,
   mapped_item);
END_TYPE; -- 10303-517: aic_mechanical_design_geometric_presentation

TYPE mechanical_design_geometric_presentation_representation_items = SELECT 
  (axis2_placement,
   camera_model_d3,
   mapped_item,
   styled_item);
END_TYPE; -- 10303-517: aic_mechanical_design_geometric_presentation

TYPE mechanical_design_shaded_presentation_area_items = SELECT 
  (axis2_placement,
   mapped_item);
END_TYPE; -- 10303-518: aic_mechanical_design_shaded_presentation

TYPE mechanical_design_shaded_presentation_representation_items = SELECT 
  (axis2_placement,
   camera_model_d3,
   mapped_item,
   styled_item);
END_TYPE; -- 10303-518: aic_mechanical_design_shaded_presentation

TYPE message = STRING;
END_TYPE; -- 10303-41: external_reference_schema

TYPE minute_in_hour = INTEGER;
  WHERE
    WR1: (0 <= SELF) AND (SELF <= 59);
END_TYPE; -- 10303-41: date_time_schema

TYPE month_in_year_number = INTEGER;
  WHERE
    WR1: (1 <= SELF) AND (SELF <= 12);
END_TYPE; -- 10303-41: date_time_schema

TYPE multi_language_attribute_item = SELECT 
  (action,
   action_directive,
   action_method,
   action_property,
   action_relationship,
   applied_document_reference,
   applied_document_usage_constraint_assignment,
   applied_external_identification_assignment,
   applied_organizational_project_assignment,
   approval,
   approval_relationship,
   approval_status,
   certification,
   certification_type,
   contract,
   data_environment,
   date_role,
   date_time_role,
   document_relationship,
   document_usage_role,
   external_source,
   group,
   group_relationship,
   identification_role,
   information_right,
   information_usage_right,
   name_assignment,
   object_role,
   organization_relationship,
   organizational_project,
   organizational_project_relationship,
   organizational_project_role,
   person_and_organization,
   product,
   product_concept_feature,
   product_concept_feature_association,
   product_definition,
   product_definition_formation,
   product_definition_relationship,
   product_definition_substitute,
   property_definition_relationship,
   uncertainty_qualifier,
   usage_association,
   versioned_action_request);
END_TYPE; -- 10303-1105: multi_linguism_mim

TYPE name_attribute_select = SELECT 
  (action_request_solution,
   address,
   configuration_design,
   context_dependent_shape_representation,
   derived_unit,
   effectivity,
   person_and_organization,
   product_definition,
   product_definition_substitute,
   property_definition_representation);
END_TYPE; -- 10303-41: basic_attribute_schema

TYPE name_item = SELECT 
  (assembly_component_usage,
   external_class_library,
   group,
   group_relationship,
   product,
   product_definition);
END_TYPE; -- 10303-1340: name_assignment_mim

TYPE non_negative_length_measure = length_measure;
  WHERE
    WR1: SELF >= 0.0;
END_TYPE; -- 10303-41: measure_schema

TYPE nonnegative_integer = INTEGER;
  WHERE
    NONNEGATIVITY: SELF >= 0;
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE null_style = ENUMERATION OF 
  (null);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE numeric_measure = NUMBER;
END_TYPE; -- 10303-41: measure_schema

TYPE one_or_two = positive_integer;
  WHERE
    IN_RANGE: (SELF = 1) OR (SELF = 2);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE open_closed = ENUMERATION OF 
  (open,
   closed);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE ordering_type = ENUMERATION OF 
  (by_rows,
   by_columns);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE organization_item = SELECT 
  (action,
   action_directive,
   action_method,
   action_property,
   action_relationship,
   action_request_solution,
   applied_action_assignment,
   applied_classification_assignment,
   applied_identification_assignment,
   applied_organization_assignment,
   applied_person_and_organization_assignment,
   applied_security_classification_assignment,
   approval,
   approval_status,
   class,
   class_system,
   configuration_design,
   configuration_effectivity,
   configuration_item,
   configured_effectivity_assignment,
   contract,
   document_file,
   document_type,
   effectivity,
   event_occurrence,
   executed_action,
   information_usage_right,
   material_designation,
   organization,
   organization_relationship,
   person_and_organization,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_feature_category,
   product_concept_feature_category_usage,
   product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   product_definition_substitute,
   security_classification,
   security_classification_level,
   versioned_action_request);
END_TYPE; -- 10303-1013: person_organization_assignment_mim

TYPE oriented_tolerance_zone_type = ENUMERATION OF 
  (perpendicular,
   parallel,
   angular);
END_TYPE; -- 10303-47: shape_tolerance_schema

TYPE parameter_value = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE path_or_composite_curve = SELECT 
  (composite_curve,
   path);
END_TYPE; -- 10303-42: geometric_model_schema

TYPE pcurve_or_surface = SELECT 
  (pcurve,
   surface);
END_TYPE; -- 10303-42: geometry_schema

TYPE person_and_organization_item = SELECT 
  (action,
   action_directive,
   action_method,
   action_property,
   action_relationship,
   action_request_solution,
   applied_action_assignment,
   applied_classification_assignment,
   applied_identification_assignment,
   applied_organization_assignment,
   applied_person_and_organization_assignment,
   applied_security_classification_assignment,
   approval,
   approval_status,
   class,
   class_system,
   configuration_design,
   configuration_effectivity,
   configuration_item,
   configured_effectivity_assignment,
   contract,
   document_file,
   document_type,
   event_occurrence,
   executed_action,
   information_usage_right,
   material_designation,
   organization,
   organization_relationship,
   person_and_organization,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_feature_category,
   product_concept_feature_category_usage,
   product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   product_definition_substitute,
   security_classification,
   security_classification_level,
   versioned_action_request);
END_TYPE; -- 10303-1013: person_organization_assignment_mim

TYPE person_organization_select = SELECT 
  (organization,
   person,
   person_and_organization);
END_TYPE; -- 10303-41: person_organization_schema

TYPE plane_angle_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE plane_or_planar_box = SELECT 
  (planar_box,
   plane);
END_TYPE; -- 10303-101: draughting_element_schema

TYPE point_cloud_set_or_superset = SELECT 
  (point_cloud_dataset,
   point_cloud_superdataset);
END_TYPE; -- 10303-42: scan_data_3d_shape_model_schema

TYPE positive_integer = nonnegative_integer;
  WHERE
    POSITIVITY: SELF > 0;
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE positive_length_measure = non_negative_length_measure;
  WHERE
    WR1: SELF > 0.0;
END_TYPE; -- 10303-41: measure_schema

TYPE positive_plane_angle_measure = plane_angle_measure;
  WHERE
    WR1: SELF > 0.0;
END_TYPE; -- 10303-41: measure_schema

TYPE positive_ratio_measure = ratio_measure;
  WHERE
    WR1: SELF > 0.0;
END_TYPE; -- 10303-41: measure_schema

TYPE power_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE preferred_surface_curve_representation = ENUMERATION OF 
  (curve_3d,
   pcurve_s1,
   pcurve_s2);
END_TYPE; -- 10303-42: geometry_schema

TYPE presentable_text = STRING;
  WHERE
    WR1: control_characters_free(SELF);
END_TYPE; -- 10303-46: presentation_definition_schema

TYPE presentation_representation_select = SELECT 
  (presentation_representation,
   presentation_set);
END_TYPE; -- 10303-46: presentation_organization_schema

TYPE presentation_size_assignment_select = SELECT 
  (area_in_set,
   presentation_area,
   presentation_view);
END_TYPE; -- 10303-46: presentation_organization_schema

TYPE presentation_style_select = SELECT 
  (curve_style,
   externally_defined_style,
   fill_area_style,
   null_style,
   point_style,
   surface_style_usage,
   symbol_style,
   text_style);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE presented_item_select = SELECT 
  (action,
   action_method,
   action_relationship,
   product_concept,
   product_concept_feature,
   product_concept_feature_category,
   product_definition,
   product_definition_formation,
   product_definition_relationship);
END_TYPE; -- 10303-1330: presentation_hierarchy_mim

TYPE pressure_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE product_definition_occurrence_or_reference = SELECT 
  (product_definition_occurrence,
   product_definition_occurrence_reference);
END_TYPE; -- 10303-44: product_structure_schema

TYPE product_definition_or_assembly_relationship = SELECT 
  (assembly_component_usage,
   product_definition);
END_TYPE; -- 10303-1063: product_occurrence_mim

TYPE product_definition_or_breakdown_element_usage = SELECT 
  (product_definition,
   product_definition_usage);
END_TYPE; -- 10303-1248: product_breakdown_mim

TYPE product_definition_or_product_definition_relationship = SELECT 
  (product_definition,
   product_definition_usage);
END_TYPE; -- 10303-1248: product_breakdown_mim

TYPE product_definition_or_reference = SELECT 
  (generic_product_definition_reference,
   product_definition,
   product_definition_occurrence);
END_TYPE; -- 10303-41: product_definition_schema

TYPE product_definition_or_reference_or_occurrence = product_definition_or_reference;
END_TYPE; -- 10303-44: product_structure_schema

TYPE product_or_formation_or_definition = SELECT 
  (product,
   product_definition,
   product_definition_formation);
END_TYPE; -- 10303-41: document_schema

TYPE product_space = SELECT 
  (listed_product_space,
   uniform_product_space);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE project_item = SELECT 
  (assembly_component_usage,
   configuration_item,
   executed_action,
   product,
   product_concept,
   product_definition,
   product_definition_formation);
END_TYPE; -- 10303-1061: project_mim

TYPE promissory_usage_in_product_model_assigned_item = SELECT 
  (product_concept,
   product_definition);
END_TYPE; -- 10303-1628: design_product_data_management_mim

TYPE property_or_shape_select = SELECT 
  (property_definition,
   shape_definition);
END_TYPE; -- 10303-49: process_property_schema

TYPE radioactivity_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE ratio_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE real_interval = SELECT 
  (elementary_space,
   finite_real_interval,
   real_interval_from_min,
   real_interval_to_max);
  WHERE
    WR1: NOT ('ELEMENTARY_SPACE' IN stripped_typeof(SELF)) OR (SELF\
              elementary_space.space_id = es_reals);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE rendering_properties_select = SELECT 
  (surface_style_reflectance_ambient,
   surface_style_transparent);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE repackage_options = ENUMERATION OF 
  (ro_nochange,
   ro_wrap_as_tuple,
   ro_unwrap_tuple);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE representation_or_representation_reference = SELECT 
  (representation,
   representation_reference);
END_TYPE; -- 10303-43: representation_schema

TYPE representation_proxy_select = SELECT 
  (action_method);
END_TYPE; -- 10303-61: systems_engineering_representation_schema

TYPE represented_definition = SELECT 
  (general_property,
   property_definition,
   property_definition_relationship,
   shape_aspect,
   shape_aspect_relationship);
END_TYPE; -- 10303-41: product_property_representation_schema

TYPE requirement_assigned_item = SELECT 
  (characterized_object,
   configuration_item,
   descriptive_representation_item,
   dimensional_location,
   dimensional_size,
   geometric_tolerance,
   product,
   product_class,
   product_definition,
   product_definition_formation,
   product_definition_relationship,
   representation,
   shape_aspect);
END_TYPE; -- 10303-1233: requirement_assignment_mim

TYPE requirement_satisfaction_item = SELECT 
  (requirement_assigned_item);
END_TYPE; -- 10303-1233: requirement_assignment_mim

TYPE requirement_source_item = SELECT 
  (characterized_object,
   dimensional_location,
   dimensional_size,
   geometric_tolerance,
   group,
   group_relationship,
   product,
   product_definition,
   product_definition_formation,
   product_definition_relationship,
   shape_aspect);
END_TYPE; -- 10303-1233: requirement_assignment_mim

TYPE resistance_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE reversible_topology = SELECT 
  (list_of_reversible_topology_item,
   reversible_topology_item,
   set_of_reversible_topology_item);
END_TYPE; -- 10303-42: topology_schema

TYPE reversible_topology_item = SELECT 
  (closed_shell,
   edge,
   face,
   face_bound,
   open_shell,
   path);
END_TYPE; -- 10303-42: topology_schema

TYPE rigid_placement = SELECT 
  (axis2_placement_3d,
   su_parameters);
END_TYPE; -- 10303-105: kinematic_structure_schema

TYPE role_select = SELECT 
  (action_assignment,
   action_request_assignment,
   approval_assignment,
   approval_date_time,
   certification_assignment,
   contract_assignment,
   directed_action_assignment,
   document_reference,
   effectivity_assignment,
   group_assignment,
   name_assignment,
   security_classification_assignment);
END_TYPE; -- 10303-41: basic_attribute_schema

TYPE second_in_minute = REAL;
  WHERE
    WR1: (0 <= SELF) AND (SELF < 60.0);
END_TYPE; -- 10303-41: date_time_schema

TYPE security_classification_item = SELECT 
  (action,
   action_directive,
   action_property,
   applied_action_assignment,
   assembly_component_usage,
   assembly_component_usage_substitute,
   class_system,
   configuration_design,
   configuration_effectivity,
   configured_effectivity_assignment,
   document,
   document_file,
   executed_action,
   general_property,
   machining_operation,
   machining_process_executable,
   machining_toolpath,
   make_from_usage_option,
   material_designation,
   organizational_project,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_category,
   product_definition,
   product_definition_formation,
   product_definition_relationship,
   property_definition,
   shape_representation,
   versioned_action_request);
END_TYPE; -- 10303-1015: security_classification_mim

TYPE set_of_reversible_topology_item = SET [0:?] OF reversible_topology_item;
END_TYPE; -- 10303-42: topology_schema

TYPE set_representation_item = SET [1:?] OF representation_item;
END_TYPE; -- 10303-43: representation_schema

TYPE shading_curve_method = ENUMERATION OF 
  (constant_colour,
   linear_colour);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE shading_surface_method = ENUMERATION OF 
  (constant_shading,
   colour_shading,
   dot_shading,
   normal_shading);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE shape_aspect_or_characterized_object = SELECT 
  (characterized_object,
   shape_aspect);
END_TYPE; -- 10303-41: product_property_definition_schema

TYPE shape_definition = SELECT 
  (product_definition_shape,
   shape_aspect,
   shape_aspect_relationship);
END_TYPE; -- 10303-41: product_property_definition_schema

TYPE shape_dimension_representation_item = SELECT 
  (compound_representation_item,
   descriptive_representation_item,
   measure_representation_item,
   placement);
END_TYPE; -- 10303-47: shape_dimension_schema

TYPE shape_model = SELECT 
  (constructive_geometry_representation,
   shape_representation);
END_TYPE; -- 10303-1032: shape_property_assignment_mim

TYPE shape_representation_with_parameters_items = SELECT 
  (descriptive_representation_item,
   direction,
   measure_representation_item,
   placement);
END_TYPE; -- 10303-47: shape_aspect_definition_schema

TYPE shell = SELECT 
  (closed_shell,
   open_shell,
   vertex_shell,
   wire_shell);
END_TYPE; -- 10303-42: topology_schema

TYPE si_prefix = ENUMERATION OF 
  (exa,
   peta,
   tera,
   giga,
   mega,
   kilo,
   hecto,
   deca,
   deci,
   centi,
   milli,
   micro,
   nano,
   pico,
   femto,
   atto);
END_TYPE; -- 10303-41: measure_schema

TYPE si_unit_name = ENUMERATION OF 
  (metre,
   gram,
   second,
   ampere,
   kelvin,
   mole,
   candela,
   radian,
   steradian,
   hertz,
   newton,
   pascal,
   joule,
   watt,
   coulomb,
   volt,
   farad,
   ohm,
   siemens,
   weber,
   tesla,
   henry,
   degree_celsius,
   lumen,
   lux,
   becquerel,
   gray,
   sievert);
END_TYPE; -- 10303-41: measure_schema

TYPE simple_datum_reference_modifier = ENUMERATION OF 
  (pitch_diameter,
   major_diameter,
   minor_diameter,
   degree_of_freedom_constraint_w,
   degree_of_freedom_constraint_v,
   degree_of_freedom_constraint_u,
   degree_of_freedom_constraint_z,
   degree_of_freedom_constraint_y,
   degree_of_freedom_constraint_x,
   distance_variable,
   contacting_feature,
   any_longitudinal_section,
   any_cross_section,
   orientation,
   plane,
   line,
   point,
   maximum_material_requirement,
   least_material_requirement,
   translation,
   basic,
   free_state);
END_TYPE; -- 10303-47: shape_aspect_definition_schema

TYPE size_select = SELECT 
  (descriptive_measure,
   measure_with_unit,
   positive_length_measure);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE solid_angle_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE source = ENUMERATION OF 
  (made,
   bought,
   not_known);
END_TYPE; -- 10303-41: product_definition_schema

TYPE source_item = SELECT 
  (identifier,
   message);
END_TYPE; -- 10303-41: external_reference_schema

TYPE space_constraint_type = ENUMERATION OF 
  (sc_equal,
   sc_subspace,
   sc_member);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE spatial_rotation = SELECT 
  (rotation_about_direction,
   ypr_rotation);
END_TYPE; -- 10303-105: kinematic_state_schema

TYPE spherical_pair_select = SELECT 
  (spherical_pair,
   spherical_pair_with_pin);
END_TYPE; -- 10303-105: kinematic_state_schema

TYPE spline_knot_values = LIST [2:?] OF REAL;
  WHERE
    WR1: increasing_values_in_list(SELF);
END_TYPE; -- 10303-42: geometry_schema

TYPE string_representation_item_select = SELECT 
  (descriptive_representation_item,
   included_text_block,
   structured_text_composition);
END_TYPE; -- 10303-1366: tagged_text_representation_mim

TYPE style_context_select = SELECT 
  (context_dependent_shape_representation,
   group,
   presentation_layer_assignment,
   presentation_set,
   representation,
   representation_item,
   representation_relationship);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE styled_item_target = SELECT 
  (geometric_representation_item,
   mapped_item,
   representation_or_representation_reference,
   topological_representation_item);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE supported_item = SELECT 
  (action,
   action_directive,
   action_method);
END_TYPE; -- 10303-41: action_schema

TYPE surface_boundary = SELECT 
  (boundary_curve,
   degenerate_pcurve);
END_TYPE; -- 10303-42: geometry_schema

TYPE surface_side = ENUMERATION OF 
  (positive,
   negative,
   both);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE surface_side_style_select = SELECT 
  (pre_defined_surface_side_style,
   surface_side_style);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE surface_style_element_select = SELECT 
  (surface_style_boundary,
   surface_style_control_grid,
   surface_style_fill_area,
   surface_style_parameter_line,
   surface_style_rendering,
   surface_style_segmentation_curve,
   surface_style_silhouette);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE symbol_style_select = SELECT 
  (symbol_colour);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE symmetry_type = ENUMERATION OF 
  (identity,
   skew,
   hermitian,
   skew_hermitian);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE terminator = SELECT 
  (externally_defined_terminator_symbol,
   pre_defined_terminator_symbol,
   user_defined_terminator_symbol);
END_TYPE; -- 10303-1003: curve_appearance_mim

TYPE tessellated_edge_or_vertex = SELECT 
  (tessellated_edge,
   tessellated_vertex);
END_TYPE; -- 10303-42: geometric_model_schema

TYPE tessellated_facet_long_short_edge_ratio = ratio_measure;
END_TYPE; -- 10303-42: geometric_model_schema

TYPE tessellated_surface_item = SELECT 
  (tessellated_face,
   tessellated_shell,
   tessellated_solid,
   tessellated_surface_set);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE tessellation_accuracy_parameter_item = SELECT 
  (angular_deviation,
   chordal_deviation,
   length_to_height_ratio,
   maximum_edge_length,
   tessellated_facet_long_short_edge_ratio);
END_TYPE; -- 10303-42: geometric_model_schema

TYPE text = STRING;
END_TYPE; -- 10303-41: support_resource_schema

TYPE text_alignment = label;
END_TYPE; -- 10303-46: presentation_definition_schema

TYPE text_delineation = label;
END_TYPE; -- 10303-46: presentation_definition_schema

TYPE text_or_character = SELECT 
  (annotation_text,
   composite_text,
   defined_character_glyph,
   text_literal);
END_TYPE; -- 10303-46: presentation_definition_schema

TYPE text_path = ENUMERATION OF 
  (left,
   right,
   up,
   down);
END_TYPE; -- 10303-46: presentation_definition_schema

TYPE text_string_representation_item = SELECT 
  (annotation_text,
   axis2_placement,
   composite_text,
   defined_character_glyph,
   text_literal);
END_TYPE; -- 10303-46: presentation_definition_schema

TYPE thermodynamic_temperature_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE time_interval_item = SELECT 
  (action,
   action_directive,
   action_method,
   action_property,
   action_relationship,
   action_request_solution,
   alternate_product_relationship,
   applied_action_assignment,
   applied_classification_assignment,
   applied_person_and_organization_assignment,
   approval_status,
   assembly_component_usage_substitute,
   certification,
   class,
   class_system,
   configuration_design,
   configuration_effectivity,
   configuration_item,
   configured_effectivity_assignment,
   contract,
   document_file,
   executed_action,
   general_property,
   material_designation,
   organization_relationship,
   organizational_project,
   person_and_organization,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_feature_category,
   product_concept_feature_category_usage,
   product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   product_definition_substitute,
   property_definition,
   security_classification,
   security_classification_level,
   shape_representation,
   versioned_action_request);
END_TYPE; -- 10303-1365: time_interval_assignment_mim

TYPE time_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE tolerance_method_definition = SELECT 
  (limits_and_fits,
   tolerance_value);
END_TYPE; -- 10303-47: shape_tolerance_schema

TYPE tolerance_value_or_limits_and_fits = SELECT 
  (limits_and_fits,
   tolerance_value);
END_TYPE; -- 10303-113: counterbore_countersink_schema

TYPE tolerance_zone_target = SELECT 
  (dimensional_location,
   dimensional_size,
   general_datum_reference,
   geometric_tolerance);
END_TYPE; -- 10303-47: shape_tolerance_schema

TYPE transformation = SELECT 
  (functionally_defined_transformation,
   item_defined_transformation);
END_TYPE; -- 10303-43: representation_schema

TYPE transition_code = ENUMERATION OF 
  (discontinuous,
   continuous,
   cont_same_gradient,
   cont_same_gradient_same_curvature);
END_TYPE; -- 10303-42: geometry_schema

TYPE trimming_preference = ENUMERATION OF 
  (cartesian,
   parameter,
   unspecified);
END_TYPE; -- 10303-42: geometry_schema

TYPE trimming_select = SELECT 
  (cartesian_point,
   parameter_value);
END_TYPE; -- 10303-42: geometry_schema

TYPE tuple_space = SELECT 
  (extended_tuple_space,
   product_space);
END_TYPE; -- 10303-50: mathematical_functions_schema

TYPE u_direction_count = INTEGER;
  WHERE
    WR1: SELF > 1;
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE unit = SELECT 
  (derived_unit,
   named_unit);
END_TYPE; -- 10303-41: measure_schema

TYPE unsigned_8_bit_integer = INTEGER;
  WHERE
    WR1: (0 <= SELF) AND (SELF <= 255);
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE v_direction_count = INTEGER;
  WHERE
    WR1: SELF > 1;
END_TYPE; -- 10303-46: presentation_appearance_schema

TYPE value_format_type = identifier;
  WHERE
    WR1: LENGTH(SELF) <= 80;
END_TYPE; -- 10303-45: qualified_measure_schema

TYPE value_qualifier = SELECT 
  (maths_value_precision_qualifier,
   precision_qualifier,
   type_qualifier,
   uncertainty_qualifier,
   value_format_type_qualifier);
END_TYPE; -- 10303-45: qualified_measure_schema

TYPE vector_or_direction = SELECT 
  (direction,
   vector);
END_TYPE; -- 10303-42: geometry_schema

TYPE velocity_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE volume_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

TYPE week_in_year_number = INTEGER;
  WHERE
    WR1: (1 <= SELF) AND (SELF <= 53);
END_TYPE; -- 10303-41: date_time_schema

TYPE year_number = INTEGER;
  WHERE
    WR1: SELF > 1581;
END_TYPE; -- 10303-41: date_time_schema

TYPE ypr_enumeration = ENUMERATION OF 
  (yaw,
   pitch,
   roll);
END_TYPE; -- 10303-105: kinematic_state_schema

TYPE ypr_rotation = ARRAY [ypr_index
  (yaw):ypr_index
  (roll)] OF plane_angle_measure;
END_TYPE; -- 10303-105: kinematic_state_schema

TYPE zero_or_one = nonnegative_integer;
  WHERE
    IN_RANGE: (SELF = 0) OR (SELF = 1);
END_TYPE; -- 10303-50: mathematical_functions_schema

ENTITY abs_function
  SUBTYPE OF (unary_function_call);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY absorbed_dose_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ABSORBED_DOSE_UNIT' 
              IN TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY absorbed_dose_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensions_for_si_unit(
              si_unit_name.gray);
END_ENTITY; -- 10303-41: measure_schema

ENTITY abstracted_expression_function
  SUBTYPE OF (maths_function, quantifier_expression);
  DERIVE
    SELF\quantifier_expression.variables : LIST [1:?] OF UNIQUE 
                   generic_variable := remove_first(SELF\
                   multiple_arity_generic_expression.operands);
    expr      : generic_expression := SELF\
                   multiple_arity_generic_expression.operands[1];
  WHERE
    WR1: SIZEOF(QUERY (operand <* SELF\multiple_arity_generic_expression.
              operands| NOT has_values_space(operand))) = 0;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY acceleration_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACCELERATION_UNIT' IN
               TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY acceleration_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensional_exponents(1.0, 
              0.0, -2.0, 0.0, 0.0, 0.0, 0.0);
END_ENTITY; -- 10303-41: measure_schema

ENTITY acos_function
  SUBTYPE OF (unary_function_call);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY action;
    name          : label;
    description   : OPTIONAL text;
    chosen_method : action_method;
  DERIVE
    id : identifier := get_id_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ID_ATTRIBUTE.IDENTIFIED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: action_schema

ENTITY action_assignment
  ABSTRACT SUPERTYPE OF (ONEOF(applied_usage_right, 
      applied_action_assignment));
    assigned_action : action;
  DERIVE
    role : object_role := get_role(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROLE_ASSOCIATION.ITEM_WITH_ROLE'
              )) <= 1;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY action_directive;
    name        : label;
    description : OPTIONAL text;
    analysis    : text;
    comment     : text;
    requests    : SET [1:?] OF versioned_action_request;
END_ENTITY; -- 10303-41: action_schema

ENTITY action_method;
    name        : label;
    description : OPTIONAL text;
    consequence : text;
    purpose     : text;
END_ENTITY; -- 10303-41: action_schema

ENTITY action_method_assignment
  ABSTRACT SUPERTYPE;
    assigned_action_method : action_method;
    role                   : action_method_role;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY action_method_relationship;
    name            : label;
    description     : OPTIONAL text;
    relating_method : action_method;
    related_method  : action_method;
END_ENTITY; -- 10303-41: action_schema

ENTITY action_method_role;
    name        : label;
    description : OPTIONAL text;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY action_method_with_associated_documents
  SUBTYPE OF (action_method);
    documents : SET [1:?] OF document;
END_ENTITY; -- 10303-49: method_definition_schema

ENTITY action_property;
    name        : label;
    description : text;
    definition  : characterized_action_definition;
END_ENTITY; -- 10303-49: process_property_schema

ENTITY action_property_representation;
    name           : label;
    description    : text;
    property       : action_property;
    representation : representation;
END_ENTITY; -- 10303-49: process_property_representation_schema

ENTITY action_relationship;
    name            : label;
    description     : OPTIONAL text;
    relating_action : action;
    related_action  : action;
END_ENTITY; -- 10303-41: action_schema

ENTITY action_request_assignment
  ABSTRACT SUPERTYPE;
    assigned_action_request : versioned_action_request;
  DERIVE
    role : object_role := get_role(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROLE_ASSOCIATION.ITEM_WITH_ROLE'
              )) <= 1;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY action_request_solution;
    method  : action_method;
    request : versioned_action_request;
  DERIVE
    description : text := get_description_value(SELF);
    name        : label := get_name_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM'
              )) <= 1;
    WR2: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NAME_ATTRIBUTE.NAMED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: action_schema

ENTITY action_request_status;
    status           : label;
    assigned_request : versioned_action_request;
END_ENTITY; -- 10303-41: action_schema

ENTITY action_resource;
    name        : label;
    description : OPTIONAL text;
    usage       : SET [1:?] OF supported_item;
    kind        : action_resource_type;
END_ENTITY; -- 10303-41: action_schema

ENTITY action_resource_relationship;
    name              : label;
    description       : OPTIONAL text;
    relating_resource : action_resource;
    related_resource  : action_resource;
END_ENTITY; -- 10303-41: action_schema

ENTITY action_resource_requirement;
    name        : label;
    description : text;
    kind        : resource_requirement_type;
    operations  : SET [1:?] OF characterized_action_definition;
END_ENTITY; -- 10303-49: process_property_schema

ENTITY action_resource_type;
    name : label;
END_ENTITY; -- 10303-41: action_schema

ENTITY action_status;
    status          : label;
    assigned_action : executed_action;
END_ENTITY; -- 10303-41: action_schema

ENTITY actuated_kinematic_pair
  SUBTYPE OF (kinematic_pair);
    t_x : OPTIONAL actuated_direction;
    t_y : OPTIONAL actuated_direction;
    t_z : OPTIONAL actuated_direction;
    r_x : OPTIONAL actuated_direction;
    r_y : OPTIONAL actuated_direction;
    r_z : OPTIONAL actuated_direction;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY additive_manufacturing_atom
  SUBTYPE OF (shape_aspect);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY additive_manufacturing_build_plate_relationship
  SUBTYPE OF (additive_manufacturing_setup_relationship);
END_ENTITY; -- 10303-1835: additive_manufacturing_part_and_build_information_mim

ENTITY additive_manufacturing_construction
  SUBTYPE OF (shape_aspect);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY additive_manufacturing_feature
  SUBTYPE OF (feature_definition);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY additive_manufacturing_setup
  SUBTYPE OF (product);
END_ENTITY; -- 10303-1835: additive_manufacturing_part_and_build_information_mim

ENTITY additive_manufacturing_setup_relationship
  ABSTRACT SUPERTYPE OF (ONEOF(
      additive_manufacturing_build_plate_relationship, 
      additive_manufacturing_support_structure_geometry_relationship, 
      additive_manufacturing_setup_workpiece_relationship))
  SUBTYPE OF (next_assembly_usage_occurrence);
END_ENTITY; -- 10303-1835: additive_manufacturing_part_and_build_information_mim

ENTITY additive_manufacturing_setup_workpiece_relationship
  SUBTYPE OF (additive_manufacturing_setup_relationship);
END_ENTITY; -- 10303-1835: additive_manufacturing_part_and_build_information_mim

ENTITY additive_manufacturing_support_structure_geometry_relationship
  SUBTYPE OF (additive_manufacturing_setup_relationship);
END_ENTITY; -- 10303-1835: additive_manufacturing_part_and_build_information_mim

ENTITY additive_type_operation
  SUBTYPE OF (machining_operation);
  WHERE
    WR1: SELF.description IN [ 'oned', 'twod' ];
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY address;
    internal_location       : OPTIONAL label;
    street_number           : OPTIONAL label;
    street                  : OPTIONAL label;
    postal_box              : OPTIONAL label;
    town                    : OPTIONAL label;
    region                  : OPTIONAL label;
    postal_code             : OPTIONAL label;
    country                 : OPTIONAL label;
    facsimile_number        : OPTIONAL label;
    telephone_number        : OPTIONAL label;
    electronic_mail_address : OPTIONAL label;
    telex_number            : OPTIONAL label;
  DERIVE
    name : label := get_name_value(SELF);
    url  : identifier := get_id_value(SELF);
  WHERE
    WR1: ((((((((((EXISTS(internal_location) OR EXISTS(street_number)) OR 
              EXISTS(street)) OR EXISTS(postal_box)) OR EXISTS(town)) OR 
              EXISTS(region)) OR EXISTS(postal_code)) OR EXISTS(country)) 
              OR EXISTS(facsimile_number)) OR EXISTS(telephone_number)) OR 
              EXISTS(electronic_mail_address)) OR EXISTS(telex_number);
END_ENTITY; -- 10303-41: person_organization_schema

ENTITY advanced_brep_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(QUERY (it <* SELF.items| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MANIFOLD_SOLID_BREP'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACETED_BREP',
               'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               ] * TYPEOF(it)) = 1))) = 0;
    WR2: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MANIFOLD_SOLID_BREP'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' ]
               * TYPEOF(it)) = 1))) > 0;
    WR3: SIZEOF(QUERY (msb <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MANIFOLD_SOLID_BREP'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (csh <* msb_shells(msb)| 
              NOT (SIZEOF(QUERY (fcs <* csh\connected_face_set.cfs_faces| 
              NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' 
              IN TYPEOF(fcs)))) = 0))) = 0))) = 0;
    WR4: SIZEOF(QUERY (msb <* QUERY (it <* items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MANIFOLD_SOLID_BREP'
               IN TYPEOF(it)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORIENTED_CLOSED_SHELL'
               IN TYPEOF(msb\manifold_solid_brep.outer)))) = 0;
    WR5: SIZEOF(QUERY (brv <* QUERY (it <* items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BREP_WITH_VOIDS'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (csh <* brv\
              brep_with_voids.voids| csh\oriented_closed_shell.orientation)
              ) = 0))) = 0;
    WR6: SIZEOF(QUERY (mi <* QUERY (it <* items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(it)))| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_BREP_SHAPE_REPRESENTATION'
               IN TYPEOF(mi\mapped_item.mapping_source.
              mapped_representation)))) = 0;
END_ENTITY; -- 10303-514: aic_advanced_brep

ENTITY advanced_face
  SUBTYPE OF (face_surface);
  WHERE
    WR1: SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ELEMENTARY_SURFACE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_SURFACE'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SWEPT_SURFACE'
               ] * TYPEOF(face_geometry)) = 1;
    WR2: SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds.
              bound\path.edge_list| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_CURVE' IN 
              TYPEOF(oe\oriented_edge.edge_element)))) = 0))) = 0;
    WR3: SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds.
              bound\path.edge_list| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONIC', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_CURVE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_CURVE' 
              ] * TYPEOF(oe.edge_element\edge_curve.edge_geometry)) = 1))) 
              = 0))) = 0;
    WR4: SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds.
              bound\path.edge_list| NOT (((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_POINT' IN
               TYPEOF(oe\edge.edge_start)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CARTESIAN_POINT'
               IN TYPEOF(oe\edge.edge_start\vertex_point.vertex_geometry)))
               AND ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_POINT' IN
               TYPEOF(oe\edge.edge_end)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CARTESIAN_POINT'
               IN TYPEOF(oe\edge.edge_end\vertex_point.vertex_geometry)))))
              ) = 0))) = 0;
    WR5: SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORIENTED_PATH' 
              IN TYPEOF(elp_fbnds.bound)))) = 0;
    WR6: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SWEPT_SURFACE' 
              IN TYPEOF(face_geometry)) OR (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONIC', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_CURVE' 
              ] * TYPEOF(face_geometry\swept_surface.swept_curve)) = 1);
    WR7: SIZEOF(QUERY (vlp_fbnds <* QUERY (bnds <* bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_POINT' IN
               TYPEOF(vlp_fbnds\face_bound.bound\vertex_loop.loop_vertex)) 
              AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CARTESIAN_POINT'
               IN TYPEOF(vlp_fbnds\face_bound.bound\vertex_loop.loop_vertex
              \vertex_point.vertex_geometry))))) = 0;
    WR8: SIZEOF(QUERY (bnd <* bounds| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_LOOP' ] *
               TYPEOF(bnd.bound)) = 1))) = 0;
    WR9: SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds.
              bound\path.edge_list| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_CURVE' 
              IN TYPEOF(oe\oriented_edge.edge_element\edge_curve.
              edge_geometry)) AND NOT (SIZEOF(QUERY (sc_ag <* oe.
              edge_element\edge_curve.edge_geometry\surface_curve.
              associated_geometry| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PCURVE' IN 
              TYPEOF(sc_ag)))) = 0))) = 0))) = 0;
    WR10: (NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SWEPT_SURFACE'
               IN TYPEOF(face_geometry)) OR (NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE' IN 
              TYPEOF(face_geometry\swept_surface.swept_curve)) OR (SIZEOF(
              face_geometry\swept_surface.swept_curve\polyline.points) >= 3
              ))) AND (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds.
              bound\path.edge_list| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE' IN 
              TYPEOF(oe\oriented_edge.edge_element\edge_curve.edge_geometry
              )) AND NOT (SIZEOF(oe\oriented_edge.edge_element\edge_curve.
              edge_geometry\polyline.points) >= 3))) = 0))) = 0);
END_ENTITY; -- 10303-511: aic_topologically_bounded_surface

ENTITY aggregate_id_attribute;
    attribute_value : identifier;
    identified_item : SET [1:?] OF id_attribute_select;
END_ENTITY; -- 10303-41: basic_attribute_schema

ENTITY all_around_shape_aspect
  SUBTYPE OF (continuous_shape_aspect);
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY alternate_product_relationship;
    name       : label;
    definition : OPTIONAL text;
    alternate  : product;
    base       : product;
    basis      : text;
  UNIQUE
    UR1: alternate, base;
  WHERE
    WR1: alternate :<>: base;
END_ENTITY; -- 10303-44: product_structure_schema

ENTITY amount_of_substance_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AMOUNT_OF_SUBSTANCE_UNIT'
               IN TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY amount_of_substance_unit
  SUBTYPE OF (named_unit);
  WHERE
    WR1: ((((((SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\
              named_unit.dimensions.mass_exponent = 0.0)) AND (SELF\
              named_unit.dimensions.time_exponent = 0.0)) AND (SELF\
              named_unit.dimensions.electric_current_exponent = 0.0)) AND (
              SELF\named_unit.dimensions.thermodynamic_temperature_exponent
               = 0.0)) AND (SELF\named_unit.dimensions.
              amount_of_substance_exponent = 1.0)) AND (SELF\named_unit.
              dimensions.luminous_intensity_exponent = 0.0);
END_ENTITY; -- 10303-41: measure_schema

ENTITY and_expression
  SUBTYPE OF (multiple_arity_boolean_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY angular_dimension
  SUBTYPE OF (dimension_curve_directed_callout);
END_ENTITY; -- 10303-506: aic_draughting_elements

ENTITY angular_location
  SUBTYPE OF (dimensional_location);
    angle_selection : angle_relator;
END_ENTITY; -- 10303-47: shape_dimension_schema

ENTITY angular_size
  SUBTYPE OF (dimensional_size);
    angle_selection : angle_relator;
END_ENTITY; -- 10303-47: shape_dimension_schema

ENTITY angularity_tolerance
  SUBTYPE OF (geometric_tolerance_with_datum_reference);
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY annotation_curve_occurrence
  SUPERTYPE OF (ONEOF(dimension_curve, leader_curve, projection_curve))
  SUBTYPE OF (annotation_occurrence);
    SELF\styled_item.item : curve_or_curve_set;
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY annotation_fill_area
  SUBTYPE OF (geometric_representation_item);
    boundaries : SET [1:?] OF curve;
  WHERE
    WR1: (SELF\geometric_representation_item.dim = 3) OR (SIZEOF(QUERY (
              curve <* boundaries| NOT (((((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCLE' IN 
              TYPEOF(curve)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ELLIPSE' IN 
              TYPEOF(curve))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_CURVE' 
              IN TYPEOF(curve)) AND (curve\b_spline_curve.closed_curve = 
              TRUE)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_CURVE'
               IN TYPEOF(curve)) AND (curve\composite_curve.closed_curve = 
              TRUE)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE' IN 
              TYPEOF(curve)) AND (curve\polyline.points[LOINDEX(curve\
              polyline.points)] = curve\polyline.points[HIINDEX(curve\
              polyline.points)])))) = 0);
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY annotation_fill_area_occurrence
  SUBTYPE OF (annotation_occurrence);
    fill_style_target : point;
    SELF\styled_item.item : annotation_fill_area;
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY annotation_occurrence
  SUPERTYPE OF (ONEOF(annotation_point_occurrence, 
      annotation_curve_occurrence, annotation_fill_area_occurrence, 
      annotation_text_occurrence, annotation_symbol_occurrence))
  SUBTYPE OF (styled_item);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_REPRESENTATION_ITEM'
               IN TYPEOF(SELF);
    WR2: SIZEOF(QUERY (reps <* using_representations(SELF)| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_REPRESENTATION_SELECT'
               IN TYPEOF(reps)))) = 0;
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY annotation_occurrence_associativity
  SUBTYPE OF (annotation_occurrence_relationship);
  WHERE
    WR1: SIZEOF(TYPEOF(SELF.related_annotation_occurrence) * [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_FILL_AREA_OCCURRENCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROJECTION_CURVE'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LEADER_CURVE' 
              ]) = 1;
END_ENTITY; -- 10303-520: aic_associative_draughting_elements

ENTITY annotation_occurrence_relationship;
    name                           : label;
    description                    : text;
    relating_annotation_occurrence : annotation_occurrence;
    related_annotation_occurrence  : annotation_occurrence;
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY annotation_placeholder_leader_line
  ABSTRACT SUPERTYPE OF (ONEOF(annotation_to_annotation_leader_line, 
      annotation_to_model_leader_line, auxiliary_leader_line))
  SUBTYPE OF (geometric_representation_item);
    geometric_elements : LIST [2:?] OF UNIQUE des_apll_point_select;
  DERIVE
    model_end : des_apll_point_select := geometric_elements[HIINDEX(
                   geometric_elements)];
  INVERSE
    container : annotation_placeholder_occurrence_with_leader_line FOR 
                   leader_line;
  UNIQUE
    UR1: geometric_elements;
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY annotation_placeholder_occurrence
  SUBTYPE OF (annotation_occurrence, geometric_representation_item);
    SELF\styled_item.item : geometric_set;
    role         : annotation_placeholder_occurrence_role;
    line_spacing : positive_length_measure;
  INVERSE
    the_callout                                             : 
                                                                 draughting_callout
                                                                  FOR 
                                                                 contents;
    the_draughting_model_item_association_with_placeholders : SET [0:1] OF 
                                                                 draughting_model_item_association_with_placeholder
                                                                  FOR 
                                                                 annotation_placeholder
                                                                 ;
  WHERE
    WR1: md_valid_content_in_geometric_set_for_placeholder(item);
    WR2: NOT (role = annotation_placeholder_occurrence_role.gps_data) OR (
              SIZEOF(
              the_draughting_model_item_association_with_placeholders) = 1)
               AND md_pmi_name_and_type_correlation(SELF);
END_ENTITY; -- 10303-113: mechanical_design_schema

ENTITY annotation_placeholder_occurrence_with_leader_line
  SUBTYPE OF (annotation_placeholder_occurrence);
    leader_line : SET [1:?] OF annotation_placeholder_leader_line;
  UNIQUE
    UR1: leader_line;
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY annotation_plane
  SUBTYPE OF (annotation_occurrence, geometric_representation_item);
    elements : OPTIONAL SET [1:?] OF annotation_plane_element;
    SELF\styled_item.item : plane_or_planar_box;
  WHERE
    WR1: SELF\geometric_representation_item.dim = 3;
    WR2: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_BOX' IN 
              TYPEOF(SELF\styled_item.item)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               IN TYPEOF(SELF\styled_item.item\planar_box.placement));
    WR3: ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_BOX' IN 
              TYPEOF(SELF\styled_item.item)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE' IN 
              TYPEOF(SELF\styled_item.styles[1]\
              presentation_style_assignment.styles[1])) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE' IN TYPEOF
              (SELF\styled_item.item)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FILL_AREA_STYLE'
               IN TYPEOF(SELF\styled_item.styles[1]\
              presentation_style_assignment.styles[1]));
    WR4: (SIZEOF(SELF\styled_item.styles) = 1) AND (SIZEOF(SELF\styled_item
              .styles[1]\presentation_style_assignment.styles) = 1);
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY annotation_point_occurrence
  SUBTYPE OF (annotation_occurrence);
    SELF\styled_item.item : point;
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY annotation_subfigure_occurrence
  SUBTYPE OF (annotation_symbol_occurrence);
  WHERE
    WR1: SIZEOF(QUERY (sty <* SELF.styles| NOT (SIZEOF(sty.styles) = 1))) =
               0;
    WR2: SIZEOF(QUERY (sty <* SELF.styles| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NULL_STYLE' IN 
              TYPEOF(sty.styles[1])))) = 0;
    WR3: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_SYMBOL' IN
               TYPEOF(SELF.item);
    WR4: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_SUBFIGURE_REPRESENTATION'
               IN TYPEOF(SELF.item\mapped_item.mapping_source.
              mapped_representation);
END_ENTITY; -- 10303-504: aic_draughting_annotation

ENTITY annotation_symbol
  SUBTYPE OF (mapped_item);
    SELF\mapped_item.mapping_source : symbol_representation_map;
    SELF\mapped_item.mapping_target : symbol_target;
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_REPRESENTATION_ITEM'
               IN TYPEOF(SELF);
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY annotation_symbol_occurrence
  SUBTYPE OF (annotation_occurrence);
    SELF\styled_item.item : annotation_symbol_occurrence_item;
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY annotation_text
  SUBTYPE OF (mapped_item);
    SELF\mapped_item.mapping_target : axis2_placement;
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEXT_STRING_REPRESENTATION'
               IN TYPEOF(SELF\mapped_item.mapping_source.
              mapped_representation);
    WR2: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_REPRESENTATION_ITEM'
               IN TYPEOF(SELF);
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY annotation_text_occurrence
  SUBTYPE OF (annotation_occurrence);
    SELF\styled_item.item : annotation_text_occurrence_item;
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY annotation_to_annotation_leader_line
  SUBTYPE OF (annotation_placeholder_leader_line);
  DERIVE
    start_end : des_apll_point_select := SELF\
                   annotation_placeholder_leader_line.geometric_elements[1]
                   ;
  WHERE
    WR1: (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APLL_POINT_WITH_SURFACE'
               ] * TYPEOF(SELF\annotation_placeholder_leader_line.model_end
              )) = 0) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APLL_POINT_WITH_SURFACE'
               ] * TYPEOF(start_end)) = 0);
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY annotation_to_model_leader_line
  SUBTYPE OF (annotation_placeholder_leader_line);
  DERIVE
    start_end : des_apll_point_select := SELF\
                   annotation_placeholder_leader_line.geometric_elements[1]
                   ;
  WHERE
    WR1: SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APLL_POINT_WITH_SURFACE'
               ] * TYPEOF(SELF\annotation_placeholder_leader_line.model_end
              )) = 1;
    WR2: SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APLL_POINT_WITH_SURFACE'
               ] * TYPEOF(start_end)) = 0;
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY apex
  SUBTYPE OF (derived_shape_aspect);
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY apll_point
  SUBTYPE OF (cartesian_point);
    symbol_applied : des_apll_point_symbol;
  INVERSE
    container : annotation_placeholder_leader_line FOR geometric_elements;
  WHERE
    WR1: SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APLL_POINT_WITH_SURFACE'
               ] * TYPEOF(SELF)) = 0;
    WR2: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_SET.ELEMENTS'
              )) = 0;
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY apll_point_with_surface
  SUBTYPE OF (cartesian_point);
    symbol_applied     : des_apll_point_symbol;
    associated_surface : face_surface;
  INVERSE
    container : annotation_placeholder_leader_line FOR geometric_elements;
  WHERE
    WR1: SIZEOF([ 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APLL_POINT' 
              ] * TYPEOF(SELF)) = 0;
    WR2: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_SET.ELEMENTS'
              )) = 0;
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY application_context;
    application : label;
  DERIVE
    description : text := get_description_value(SELF);
    id          : identifier := get_id_value(SELF);
  INVERSE
    context_elements : SET [1:?] OF application_context_element FOR 
                          frame_of_reference;
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM'
              )) <= 1;
    WR2: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ID_ATTRIBUTE.IDENTIFIED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: application_context_schema

ENTITY application_context_element
  SUPERTYPE OF (ONEOF(product_concept_context, product_context, 
      product_definition_context));
    name               : label;
    frame_of_reference : application_context;
END_ENTITY; -- 10303-41: application_context_schema

ENTITY application_defined_function
  SUBTYPE OF (maths_function);
    explicit_domain : tuple_space;
    explicit_range  : tuple_space;
    parameters      : LIST OF maths_value;
  WHERE
    WR1: expression_is_constant(explicit_domain);
    WR2: expression_is_constant(explicit_range);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY application_protocol_definition;
    status                                    : label;
    application_interpreted_model_schema_name : label;
    application_protocol_year                 : year_number;
    application                               : application_context;
END_ENTITY; -- 10303-41: application_context_schema

ENTITY applied_action_assignment
  SUBTYPE OF (action_assignment);
    items : SET [1:?] OF action_items;
END_ENTITY; -- 10303-1047: activity_mim

ENTITY applied_action_method_assignment
  SUBTYPE OF (action_method_assignment);
    items : SET [1:?] OF action_method_items;
END_ENTITY; -- 10303-1249: activity_method_assignment_mim

ENTITY applied_action_request_assignment
  SUBTYPE OF (action_request_assignment);
    items : SET [1:?] OF action_request_item;
END_ENTITY; -- 10303-1042: work_request_mim

ENTITY applied_approval_assignment
  SUBTYPE OF (approval_assignment);
    items : SET [1:?] OF approval_item;
END_ENTITY; -- 10303-1012: approval_mim

ENTITY applied_area
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(SELF.of_shape);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT ((2 <= SIZEOF(
              impl_rep.used_representation.items)) AND (SIZEOF(impl_rep.
              used_representation.items) <= 3)))) = 0))) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND (SIZEOF(QUERY (
              srwp_i <* pdr.used_representation.items| NOT (srwp_i.name IN 
              [ 'orientation', 'effective length', 'maximum length' ]))) > 
              0))) = 0))) = 0;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'effective length'))) = 
              1))) = 0))) <= 1;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'maximum length'))) <= 1
              ))) = 0))) = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN 
              TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0))) = 0
              ;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY applied_attribute_classification_assignment
  SUBTYPE OF (attribute_classification_assignment);
    SELF\attribute_classification_assignment.assigned_class : class;
    items          : SET [1:?] OF attribute_classification_item;
END_ENTITY; -- 10303-1246: attribute_classification_mim

ENTITY applied_certification_assignment
  SUBTYPE OF (certification_assignment);
    items : SET [1:?] OF certification_item;
END_ENTITY; -- 10303-1044: certification_mim

ENTITY applied_classification_assignment
  SUBTYPE OF (classification_assignment);
    items : SET [1:?] OF classification_item;
END_ENTITY; -- 10303-1114: classification_assignment_mim

ENTITY applied_classification_assignment_relationship
  SUBTYPE OF (classification_assignment_relationship);
    SELF\classification_assignment_relationship.related : 
                  applied_classification_assignment;
    SELF\classification_assignment_relationship.relating : 
                  applied_classification_assignment;
END_ENTITY; -- 10303-1114: classification_assignment_mim

ENTITY applied_contract_assignment
  SUBTYPE OF (contract_assignment);
    items : SET [1:?] OF contract_item;
END_ENTITY; -- 10303-1062: contract_mim

ENTITY applied_date_and_time_assignment
  SUBTYPE OF (date_and_time_assignment);
    items : SET [1:?] OF date_and_time_item;
END_ENTITY; -- 10303-1014: date_time_assignment_mim

ENTITY applied_date_assignment
  SUBTYPE OF (date_assignment);
    items : SET [1:?] OF date_item;
END_ENTITY; -- 10303-1014: date_time_assignment_mim

ENTITY applied_directed_action_assignment
  SUBTYPE OF (directed_action_assignment);
    items : SET [1:?] OF action_request_item;
END_ENTITY; -- 10303-1043: work_order_mim

ENTITY applied_document_reference
  SUBTYPE OF (document_reference);
    items : SET [1:?] OF document_reference_item;
END_ENTITY; -- 10303-1122: document_assignment_mim

ENTITY applied_document_usage_constraint_assignment
  SUBTYPE OF (document_usage_constraint_assignment);
    items : SET [1:?] OF document_reference_item;
END_ENTITY; -- 10303-1122: document_assignment_mim

ENTITY applied_effectivity_assignment
  SUBTYPE OF (effectivity_assignment);
    items : SET [1:?] OF effectivity_item;
END_ENTITY; -- 10303-1059: effectivity_application_mim

ENTITY applied_event_occurrence_assignment
  SUBTYPE OF (event_occurrence_assignment);
    items : SET [1:?] OF event_occurrence_item;
END_ENTITY; -- 10303-1364: event_assignment_mim

ENTITY applied_external_identification_assignment
  SUBTYPE OF (external_identification_assignment);
    items : SET [1:?] OF external_identification_item;
END_ENTITY; -- 10303-1128: external_item_identification_assignment_mim

ENTITY applied_external_identification_assignment_relationship
  SUBTYPE OF (external_identification_assignment_relationship);
    SELF\external_identification_assignment_relationship.related : 
                  applied_external_identification_assignment;
    SELF\external_identification_assignment_relationship.relating : 
                  applied_external_identification_assignment;
END_ENTITY; -- 10303-1128: external_item_identification_assignment_mim

ENTITY applied_group_assignment
  SUBTYPE OF (group_assignment);
    items : SET [1:?] OF groupable_item;
END_ENTITY; -- 10303-1113: group_mim

ENTITY applied_identification_assignment
  SUBTYPE OF (identification_assignment);
    items : SET [1:?] OF identification_item;
END_ENTITY; -- 10303-1021: identification_assignment_mim

ENTITY applied_ineffectivity_assignment
  SUBTYPE OF (effectivity_assignment);
    items : SET [1:?] OF effectivity_item;
  WHERE
    WR1: SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LOT_EFFECTIVITY'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SERIAL_NUMBERED_EFFECTIVITY'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_EFFECTIVITY'
               ] * TYPEOF(SELF.assigned_effectivity)) = 0;
END_ENTITY; -- 10303-1059: effectivity_application_mim

ENTITY applied_name_assignment
  SUBTYPE OF (name_assignment);
    item : name_item;
END_ENTITY; -- 10303-1340: name_assignment_mim

ENTITY applied_organization_assignment
  SUBTYPE OF (organization_assignment);
    items : SET [1:?] OF organization_item;
END_ENTITY; -- 10303-1013: person_organization_assignment_mim

ENTITY applied_organizational_project_assignment
  SUBTYPE OF (organizational_project_assignment);
    items : SET [1:?] OF project_item;
END_ENTITY; -- 10303-1061: project_mim

ENTITY applied_person_and_organization_assignment
  SUBTYPE OF (person_and_organization_assignment);
    items : SET [1:?] OF person_and_organization_item;
END_ENTITY; -- 10303-1013: person_organization_assignment_mim

ENTITY applied_presented_item
  SUBTYPE OF (presented_item);
    items : SET [1:?] OF presented_item_select;
END_ENTITY; -- 10303-1330: presentation_hierarchy_mim

ENTITY applied_security_classification_assignment
  SUBTYPE OF (security_classification_assignment);
    items : SET [1:?] OF security_classification_item;
END_ENTITY; -- 10303-1015: security_classification_mim

ENTITY applied_time_interval_assignment
  SUBTYPE OF (time_interval_assignment);
    items : SET [0:?] OF time_interval_item;
END_ENTITY; -- 10303-1365: time_interval_assignment_mim

ENTITY applied_usage_right
  SUBTYPE OF (action_assignment);
    items : SET [1:?] OF ir_usage_item;
END_ENTITY; -- 10303-1241: information_rights_mim

ENTITY approval;
    status : approval_status;
    level  : label;
END_ENTITY; -- 10303-41: approval_schema

ENTITY approval_assignment
  ABSTRACT SUPERTYPE;
    assigned_approval : approval;
  DERIVE
    role : object_role := get_role(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROLE_ASSOCIATION.ITEM_WITH_ROLE'
              )) <= 1;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY approval_date_time;
    date_time      : date_time_select;
    dated_approval : approval;
  DERIVE
    role : object_role := get_role(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROLE_ASSOCIATION.ITEM_WITH_ROLE'
              )) <= 1;
END_ENTITY; -- 10303-41: approval_schema

ENTITY approval_person_organization;
    person_organization : person_organization_select;
    authorized_approval : approval;
    role                : approval_role;
END_ENTITY; -- 10303-41: approval_schema

ENTITY approval_relationship;
    name              : label;
    description       : OPTIONAL text;
    relating_approval : approval;
    related_approval  : approval;
END_ENTITY; -- 10303-41: approval_schema

ENTITY approval_role;
    role : label;
  DERIVE
    description : text := get_description_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: approval_schema

ENTITY approval_status;
    name : label;
END_ENTITY; -- 10303-41: approval_schema

ENTITY area_in_set;
    area   : presentation_area;
    in_set : presentation_set;
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY area_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AREA_UNIT' IN TYPEOF(
              SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY area_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensional_exponents(2.0, 
              0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
END_ENTITY; -- 10303-41: measure_schema

ENTITY asin_function
  SUBTYPE OF (unary_function_call);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY assembly_component_usage
  SUPERTYPE OF (quantified_assembly_component_usage ANDOR ONEOF(
      multi_level_reference_designator, next_assembly_usage_occurrence, 
      promissory_usage_occurrence, specified_higher_usage_occurrence))
  SUBTYPE OF (product_definition_usage);
    reference_designator : OPTIONAL identifier;
END_ENTITY; -- 10303-44: product_structure_schema

ENTITY assembly_component_usage_substitute;
    name       : label;
    definition : OPTIONAL text;
    base       : assembly_component_usage;
    substitute : assembly_component_usage;
  UNIQUE
    UR1: base, substitute;
  WHERE
    WR1: base.relating_product_definition :=: substitute.
              relating_product_definition;
    WR2: base :<>: substitute;
END_ENTITY; -- 10303-44: product_structure_schema

ENTITY assigned_requirement
  SUBTYPE OF (group_assignment);
    SELF\group_assignment.assigned_group : requirement_assignment;
    items          : SET [1:1] OF product_definition;
END_ENTITY; -- 10303-1233: requirement_assignment_mim

ENTITY atan_function
  SUBTYPE OF (binary_function_call);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY atom_based_literal
  SUBTYPE OF (generic_literal);
    lit_value : atom_based_value;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY attribute_classification_assignment
  ABSTRACT SUPERTYPE;
    assigned_class : group;
    attribute_name : label;
    role           : classification_role;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY attribute_language_assignment
  SUBTYPE OF (attribute_classification_assignment);
    SELF\attribute_classification_assignment.assigned_class : language;
    items          : SET [1:?] OF attribute_language_item;
  WHERE
    WR1: SELF\attribute_classification_assignment.role.name IN [ 'primary',
               'translated' ];
    WR2: SELF\attribute_classification_assignment.attribute_name <> '';
END_ENTITY; -- 10303-1105: multi_linguism_mim

ENTITY attribute_value_assignment
  ABSTRACT SUPERTYPE;
    attribute_name  : label;
    attribute_value : attribute_type;
    role            : attribute_value_role;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY attribute_value_role;
    name        : label;
    description : OPTIONAL text;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY auxiliary_leader_line
  SUBTYPE OF (annotation_placeholder_leader_line);
    controlling_leader_line : annotation_to_model_leader_line;
  DERIVE
    free_space_end : des_apll_point_select := SELF\
                        annotation_placeholder_leader_line.
                        geometric_elements[1];
  WHERE
    WR1: SELF\annotation_placeholder_leader_line.container :=: 
              controlling_leader_line\annotation_placeholder_leader_line.
              container;
    WR2: SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APLL_POINT_WITH_SURFACE'
               ] * TYPEOF(free_space_end)) = 0;
    WR3: SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APLL_POINT_WITH_SURFACE'
               ] * TYPEOF(SELF\annotation_placeholder_leader_line.model_end
              )) = 1;
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY axis1_placement
  SUBTYPE OF (placement);
    axis : OPTIONAL direction;
  DERIVE
    z : direction := NVL(normalise(axis), dummy_gri || direction([ 0.0, 0.0
           , 1.0 ]));
  WHERE
    WR1: SELF\geometric_representation_item.dim = 3;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY axis2_placement_2d
  SUBTYPE OF (placement);
    ref_direction : OPTIONAL direction;
  DERIVE
    p : LIST [2:2] OF direction := build_2axes(ref_direction);
  WHERE
    WR1: SELF\geometric_representation_item.dim = 2;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY axis2_placement_3d
  SUBTYPE OF (placement);
    axis          : OPTIONAL direction;
    ref_direction : OPTIONAL direction;
  DERIVE
    p : LIST [3:3] OF direction := build_axes(axis, ref_direction);
  WHERE
    WR1: SELF\placement.location.dim = 3;
    WR2: NOT EXISTS(axis) OR (axis.dim = 3);
    WR3: NOT EXISTS(ref_direction) OR (ref_direction.dim = 3);
    WR4: (NOT EXISTS(axis) OR NOT EXISTS(ref_direction)) OR (cross_product(
              axis, ref_direction).magnitude > 0.0);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY b_spline_basis
  SUBTYPE OF (maths_function, generic_literal);
    degree         : nonnegative_integer;
    repeated_knots : LIST [2:?] OF REAL;
  DERIVE
    order     : positive_integer := degree + 1;
    num_basis : positive_integer := SIZEOF(repeated_knots) - order;
  WHERE
    WR1: num_basis >= order;
    WR2: nondecreasing(repeated_knots);
    WR3: repeated_knots[order] < repeated_knots[(num_basis + 1)];
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY b_spline_curve
  SUPERTYPE OF (ONEOF(uniform_curve, b_spline_curve_with_knots, 
      quasi_uniform_curve, bezier_curve) ANDOR rational_b_spline_curve)
  SUBTYPE OF (bounded_curve);
    degree              : INTEGER;
    control_points_list : LIST [2:?] OF cartesian_point;
    curve_form          : b_spline_curve_form;
    closed_curve        : LOGICAL;
    self_intersect      : LOGICAL;
  DERIVE
    upper_index_on_control_points : INTEGER := SIZEOF(control_points_list) 
                                       - 1;
    control_points                : ARRAY [0:upper_index_on_control_points]
                                        OF cartesian_point := list_to_array
                                       (control_points_list, 0, 
                                       upper_index_on_control_points);
  WHERE
    WR1: ((('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.UNIFORM_CURVE' IN 
              TYPEOF(SELF)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.QUASI_UNIFORM_CURVE'
               IN TYPEOF(SELF))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BEZIER_CURVE' IN
               TYPEOF(SELF))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_CURVE_WITH_KNOTS'
               IN TYPEOF(SELF));
END_ENTITY; -- 10303-42: geometry_schema

ENTITY b_spline_curve_with_knots
  SUBTYPE OF (b_spline_curve);
    knot_multiplicities : LIST [2:?] OF INTEGER;
    knots               : LIST [2:?] OF parameter_value;
    knot_spec           : knot_type;
  DERIVE
    upper_index_on_knots : INTEGER := SIZEOF(knots);
  WHERE
    WR1: constraints_param_b_spline(degree, upper_index_on_knots, 
              upper_index_on_control_points, knot_multiplicities, knots);
    WR2: SIZEOF(knot_multiplicities) = upper_index_on_knots;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY b_spline_function
  SUBTYPE OF (maths_function, unary_generic_expression);
    SELF\unary_generic_expression.operand : maths_function;
    basis   : LIST [1:?] OF b_spline_basis;
  DERIVE
    coef : maths_function := SELF\unary_generic_expression.operand;
  WHERE
    WR1: function_is_table(coef);
    WR2: (space_dimension(coef.range) = 1) AND (number_superspace_of(
              factor1(coef.range)) = the_reals);
    WR3: SIZEOF(basis) <= SIZEOF(shape_of_array(coef));
    WR4: compare_basis_and_coef(basis, coef);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY b_spline_surface
  SUPERTYPE OF (ONEOF(b_spline_surface_with_knots, uniform_surface, 
      quasi_uniform_surface, bezier_surface) ANDOR 
      rational_b_spline_surface)
  SUBTYPE OF (bounded_surface);
    u_degree            : INTEGER;
    v_degree            : INTEGER;
    control_points_list : LIST [2:?] OF LIST [2:?] OF cartesian_point;
    surface_form        : b_spline_surface_form;
    u_closed            : LOGICAL;
    v_closed            : LOGICAL;
    self_intersect      : LOGICAL;
  DERIVE
    u_upper        : INTEGER := SIZEOF(control_points_list) - 1;
    v_upper        : INTEGER := SIZEOF(control_points_list[1]) - 1;
    control_points : ARRAY [0:u_upper] OF ARRAY [0:v_upper] OF 
                        cartesian_point := make_array_of_array(
                        control_points_list, 0, u_upper, 0, v_upper);
  WHERE
    WR1: ((('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.UNIFORM_SURFACE' 
              IN TYPEOF(SELF)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.QUASI_UNIFORM_SURFACE'
               IN TYPEOF(SELF))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BEZIER_SURFACE' 
              IN TYPEOF(SELF))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_SURFACE_WITH_KNOTS'
               IN TYPEOF(SELF));
END_ENTITY; -- 10303-42: geometry_schema

ENTITY b_spline_surface_with_knots
  SUBTYPE OF (b_spline_surface);
    u_multiplicities : LIST [2:?] OF INTEGER;
    v_multiplicities : LIST [2:?] OF INTEGER;
    u_knots          : LIST [2:?] OF parameter_value;
    v_knots          : LIST [2:?] OF parameter_value;
    knot_spec        : knot_type;
  DERIVE
    knot_u_upper : INTEGER := SIZEOF(u_knots);
    knot_v_upper : INTEGER := SIZEOF(v_knots);
  WHERE
    WR1: constraints_param_b_spline(SELF\b_spline_surface.u_degree, 
              knot_u_upper, SELF\b_spline_surface.u_upper, u_multiplicities
              , u_knots);
    WR2: constraints_param_b_spline(SELF\b_spline_surface.v_degree, 
              knot_v_upper, SELF\b_spline_surface.v_upper, v_multiplicities
              , v_knots);
    WR3: SIZEOF(u_multiplicities) = knot_u_upper;
    WR4: SIZEOF(v_multiplicities) = knot_v_upper;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY b_spline_volume
  SUPERTYPE OF (ONEOF(b_spline_volume_with_knots, uniform_volume, 
      quasi_uniform_volume, bezier_volume) ANDOR rational_b_spline_volume)
  SUBTYPE OF (volume);
    u_degree            : INTEGER;
    v_degree            : INTEGER;
    w_degree            : INTEGER;
    control_points_list : LIST [2:?] OF LIST [2:?] OF LIST [2:?] OF 
                             cartesian_point;
  DERIVE
    u_upper        : INTEGER := SIZEOF(control_points_list) - 1;
    v_upper        : INTEGER := SIZEOF(control_points_list[1]) - 1;
    w_upper        : INTEGER := SIZEOF(control_points_list[1][1]) - 1;
    control_points : ARRAY [0:u_upper] OF ARRAY [0:v_upper] OF ARRAY [0:
                        w_upper] OF cartesian_point := 
                        make_array_of_array_of_array(control_points_list, 0
                        , u_upper, 0, v_upper, 0, w_upper);
  WHERE
    WR1: ((('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BEZIER_VOLUME' IN 
              TYPEOF(SELF)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.UNIFORM_VOLUME' 
              IN TYPEOF(SELF))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.QUASI_UNIFORM_VOLUME'
               IN TYPEOF(SELF))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_VOLUME_WITH_KNOTS'
               IN TYPEOF(SELF));
END_ENTITY; -- 10303-42: geometry_schema

ENTITY b_spline_volume_with_knots
  SUBTYPE OF (b_spline_volume);
    u_multiplicities : LIST [2:?] OF INTEGER;
    v_multiplicities : LIST [2:?] OF INTEGER;
    w_multiplicities : LIST [2:?] OF INTEGER;
    u_knots          : LIST [2:?] OF parameter_value;
    v_knots          : LIST [2:?] OF parameter_value;
    w_knots          : LIST [2:?] OF parameter_value;
  DERIVE
    knot_u_upper : INTEGER := SIZEOF(u_knots);
    knot_v_upper : INTEGER := SIZEOF(v_knots);
    knot_w_upper : INTEGER := SIZEOF(w_knots);
  WHERE
    WR1: constraints_param_b_spline(SELF\b_spline_volume.u_degree, 
              knot_u_upper, SELF\b_spline_volume.u_upper, u_multiplicities,
               u_knots);
    WR2: constraints_param_b_spline(SELF\b_spline_volume.v_degree, 
              knot_v_upper, SELF\b_spline_volume.v_upper, v_multiplicities,
               v_knots);
    WR3: constraints_param_b_spline(SELF\b_spline_volume.w_degree, 
              knot_w_upper, SELF\b_spline_volume.w_upper, w_multiplicities,
               w_knots);
    WR4: SIZEOF(u_multiplicities) = knot_u_upper;
    WR5: SIZEOF(v_multiplicities) = knot_v_upper;
    WR6: SIZEOF(w_multiplicities) = knot_w_upper;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY back_boring_operation
  SUBTYPE OF (drilling_type_operation);
  WHERE
    WR1: 0 = SIZEOF(QUERY (amr <* get_relating_amr(SELF)| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FUNCTIONS_RELATIONSHIP'
               IN TYPEOF(amr)) AND NOT verify_required_action_property(amr.
              related_method, 'oriented spindle stop')));
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY background_colour
  SUBTYPE OF (colour);
    presentation : area_or_view;
  UNIQUE
    UR1: presentation;
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY banded_matrix
  SUBTYPE OF (linearized_table_function);
    default_entry : maths_value;
    below         : INTEGER;
    above         : INTEGER;
    order         : ordering_type;
  WHERE
    WR1: SIZEOF(SELF\explicit_table_function.shape) = 2;
    WR2: -below <= above;
    WR3: member_of(default_entry, factor1(SELF\linearized_table_function.
              source.range));
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY basic_round_hole
  SUBTYPE OF (round_hole);
    depth              : OPTIONAL positive_length_measure_with_unit;
    depth_tolerance    : OPTIONAL tolerance_value;
    diameter           : positive_length_measure_with_unit;
    diameter_tolerance : OPTIONAL tolerance_value_or_limits_and_fits;
    placement          : shape_representation;
    through_hole       : BOOLEAN;
  WHERE
    WR1: SIZEOF(placement\representation.items) = 1;
    WR2: SIZEOF(QUERY (ri <* placement\representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               IN TYPEOF(ri)))) = 1;
    WR3: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(depth_tolerance\tolerance_value.lower_bound);
    WR4: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(depth_tolerance\tolerance_value.upper_bound);
    WR5: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TOLERANCE_VALUE'
               IN TYPEOF(diameter_tolerance)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(diameter_tolerance\tolerance_value.lower_bound));
    WR6: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TOLERANCE_VALUE'
               IN TYPEOF(diameter_tolerance)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(diameter_tolerance\tolerance_value.upper_bound));
    WR7: through_hole XOR EXISTS(depth);
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY basic_round_hole_occurrence
  SUBTYPE OF (shape_aspect_occurrence);
    SELF\shape_aspect_occurrence.definition : basic_round_hole;
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION' 
              IN TYPEOF(SELF\shape_aspect.of_shape\property_definition.
              definition);
    WR2: SELF\shape_aspect.product_definitional = TRUE;
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY basic_round_hole_occurrence_in_assembly
  SUBTYPE OF (basic_round_hole_occurrence);
    modified_components : LIST [1:?] OF UNIQUE 
                             multi_level_reference_designator;
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY basic_sparse_matrix
  SUBTYPE OF (explicit_table_function, multiple_arity_generic_expression);
    SELF\multiple_arity_generic_expression.operands : LIST [3:3] OF 
                       maths_function;
    default_entry : maths_value;
    order         : ordering_type;
  DERIVE
    index : maths_function := SELF\multiple_arity_generic_expression.
               operands[1];
    loc   : maths_function := SELF\multiple_arity_generic_expression.
               operands[2];
    val   : maths_function := SELF\multiple_arity_generic_expression.
               operands[3];
  WHERE
    WR1: function_is_1d_table(index);
    WR2: function_is_1d_table(loc);
    WR3: function_is_1d_table(val);
    WR4: check_sparse_index_domain(index.domain, index_base, shape, order);
    WR5: check_sparse_index_to_loc(index.range, loc.domain);
    WR6: loc.domain = val.domain;
    WR7: check_sparse_loc_range(loc.range, index_base, shape, order);
    WR8: member_of(default_entry, val.range);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY between_shape_aspect
  SUBTYPE OF (continuous_shape_aspect);
  WHERE
    WR1: SIZEOF(QUERY (sar <* SELF\composite_shape_aspect.
              component_relationships| (sar\shape_aspect_relationship.name 
              = 'start feature'))) = 1;
    WR2: SIZEOF(QUERY (sar <* SELF\composite_shape_aspect.
              component_relationships| (sar\shape_aspect_relationship.name 
              = 'end feature'))) = 1;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY bezier_curve
  SUBTYPE OF (b_spline_curve);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY bezier_surface
  SUBTYPE OF (b_spline_surface);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY bezier_volume
  SUBTYPE OF (b_spline_volume);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY binary_boolean_expression
  ABSTRACT SUPERTYPE OF (ONEOF(xor_expression, equals_expression))
  SUBTYPE OF (boolean_expression, binary_generic_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY binary_function_call
  ABSTRACT SUPERTYPE OF (ONEOF(atan_function))
  SUBTYPE OF (binary_numeric_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY binary_generic_expression
  ABSTRACT SUPERTYPE
  SUBTYPE OF (generic_expression);
    operands : LIST [2:2] OF generic_expression;
END_ENTITY; -- 13584-20: iso13584_generic_expressions_schema

ENTITY binary_literal
  SUBTYPE OF (generic_literal);
    lit_value : BINARY;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY binary_numeric_expression
  ABSTRACT SUPERTYPE OF (ONEOF(minus_expression, div_expression, 
      mod_expression, slash_expression, power_expression, 
      binary_function_call))
  SUBTYPE OF (numeric_expression, binary_generic_expression);
    SELF\binary_generic_expression.operands : LIST [2:2] OF 
                  numeric_expression;
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY block
  SUBTYPE OF (geometric_representation_item);
    position : axis2_placement_3d;
    x        : positive_length_measure;
    y        : positive_length_measure;
    z        : positive_length_measure;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY block_shape_representation
  SUBTYPE OF (shape_representation_with_parameters);
  WHERE
    WR1: SIZEOF(SELF.items) = 4;
    WR2: SIZEOF(QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN 
              TYPEOF(it)) AND (it.name = 'orientation'))) = 1;
    WR3: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'length'))) = 1;
    WR4: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'width'))) = 1;
    WR5: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'height'))) = 1;
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY block_volume
  SUBTYPE OF (volume);
    position : axis2_placement_3d;
    x        : positive_length_measure;
    y        : positive_length_measure;
    z        : positive_length_measure;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY boolean_defined_function
  ABSTRACT SUPERTYPE
  SUBTYPE OF (defined_function, boolean_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY boolean_expression
  ABSTRACT SUPERTYPE OF (ONEOF(simple_boolean_expression, 
      unary_boolean_expression, binary_boolean_expression, 
      multiple_arity_boolean_expression, comparison_expression, 
      interval_expression, boolean_defined_function))
  SUBTYPE OF (expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY boolean_literal
  SUBTYPE OF (simple_boolean_expression, generic_literal);
    the_value : BOOLEAN;
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY boolean_representation_item
  SUBTYPE OF (representation_item, boolean_literal);
END_ENTITY; -- 10303-1773: basic_data_representation_mim

ENTITY boolean_result
  SUBTYPE OF (geometric_representation_item);
    operator       : boolean_operator;
    first_operand  : boolean_operand;
    second_operand : boolean_operand;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY boolean_variable
  SUBTYPE OF (simple_boolean_expression, variable);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY boring_operation
  SUBTYPE OF (drilling_type_operation);
  WHERE
    WR1: SELF.description IN [ 'boring', 'reaming' ];
    WR2: verify_optional_action_property(SELF, 'spindle stop') AND 
              verify_enumeration_action_property(SELF, 'spindle stop', [ 
              'spindle stop at bottom', 'spindle nonstop' ]);
    WR3: verify_optional_action_property(SELF, 'testcut depth') AND 
              verify_length_measure_action_property(SELF, 'testcut depth');
    WR4: verify_optional_action_property(SELF, 'waiting position') AND 
              verify_rep_item_for_action_property(SELF, 'waiting position',
               [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CARTESIAN_POINT'
               ]);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY boss
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SELF\characterized_object.description IN [ 'circular', 'complex', 
              'rectangular' ];
    WR2: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'boss height occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'path feature component usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PATH_FEATURE_COMPONENT'
               IN TYPEOF(sdr.relating_shape_aspect)) AND (sdr.
              relating_shape_aspect.description = 'linear')) AND (sdr.name 
              = 'boss height'))) = 1))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND ((1 <= SIZEOF(pdr.
              used_representation.items)) AND (SIZEOF(pdr.
              used_representation.items) <= 2)))) = 1))) = 1;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND (SIZEOF(QUERY (
              srwp_i <* pdr.used_representation.items| (srwp_i.name = 
              'orientation') OR (srwp_i.name = 'fillet radius'))) = SIZEOF(
              pdr.used_representation.items)))) = 1))) = 1;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'fillet radius'))) <= 1)
              )) = 0))) = 0;
    WR6: NOT (SELF\characterized_object.description = 'circular') OR (
              SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'circular profile occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_CLOSED_PROFILE'
               IN TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0);
    WR7: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'top condition occurrence') AND (
              SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'boss top usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOSS_TOP' IN 
              TYPEOF(fcr.relating_shape_aspect)))) = 1))) = 1))) = 0;
    WR8: NOT (SELF\characterized_object.description = 'circular') OR (
              SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'change in diameter occurrence') AND
               (SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'taper usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TAPER' IN TYPEOF
              (fcr.related_shape_aspect)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOSS' IN TYPEOF(
              fcr.relating_shape_aspect)))) = 1))) <= 1))) = 0);
    WR9: NOT (SELF\characterized_object.description = 'complex') OR (SIZEOF
              (QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'enclosed boundary occurrence') AND 
              (SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NGON_CLOSED_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CLOSED_PATH_PROFILE'
               ] * TYPEOF(sdr.relating_shape_aspect)) = 1))) = 1))) = 1))) 
              = 0);
    WR10: NOT (SELF\characterized_object.description IN [ 'complex', 
              'rectangular' ]) OR (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN
              (SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'change in boundary occurrence') AND
               (SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (sar.description = 'taper usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TAPER' IN TYPEOF
              (fcr.related_shape_aspect)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOSS' IN TYPEOF(
              fcr.relating_shape_aspect))) AND (fcr.related_shape_aspect.
              description IN [ 'angle taper', 'directed taper' ]))) = 1))) 
              <= 1))) = 0);
    WR11: NOT (SELF\characterized_object.description = 'rectangular') OR (
              SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'rectangular profile occurrence') 
              AND (SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_CLOSED_PROFILE'
               IN TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0);
    WR12: SIZEOF(QUERY (pdr <* get_property_definition_representations(SELF
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'maximum feature limit'))) >= 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY boss_top
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_DEFINITION'
               IN TYPEOF(SELF.of_shape.definition);
    WR2: SELF.description IN [ 'planar', 'complex' ];
    WR3: NOT (SELF.description = 'planar') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0);
    WR4: NOT (SELF.description = 'planar') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LOCATION_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0);
    WR5: NOT (SELF.description = 'complex') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0);
    WR6: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| ((sar.description = 'boss top usage') AND (sar.name IN [ 
              'boss height start', 'boss height end' ])) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| ((fcr.related_shape_aspect.description = 
              'top condition occurrence') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOSS' IN TYPEOF(
              fcr.related_shape_aspect.of_shape.definition))) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOSS_TOP' IN 
              TYPEOF(fcr.relating_shape_aspect)))) >= 1;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) <= 1))) = 0;
    WR8: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 1))) = 0))) = 0;
    WR9: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'top radius'))) <= 1))) 
              = 0))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY bottom_and_side_milling_operation
  SUBTYPE OF (milling_type_operation);
  WHERE
    WR1: SELF.description IN [ 'roughing', 'finishing' ];
    WR2: verify_optional_action_property(SELF, 'axial cutting depth') AND 
              verify_length_measure_action_property(SELF, 
              'axial cutting depth');
    WR3: verify_optional_action_property(SELF, 'radial cutting depth') AND 
              verify_length_measure_action_property(SELF, 
              'radial cutting depth');
    WR4: verify_optional_action_property(SELF, 'allowance side') AND 
              verify_length_measure_action_property(SELF, 'allowance side')
              ;
    WR5: verify_optional_action_property(SELF, 'allowance bottom') AND 
              verify_length_measure_action_property(SELF, 
              'allowance bottom');
    WR6: NOT (SELF.description = 'roughing') OR 
              verify_required_action_property(SELF, 'allowance side') AND 
              verify_required_action_property(SELF, 'allowance bottom');
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY bound_variable_semantics
  SUBTYPE OF (variable_semantics);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY boundary_curve
  SUBTYPE OF (composite_curve_on_surface);
  WHERE
    WR1: SELF\composite_curve.closed_curve;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY bounded_curve
  SUPERTYPE OF (ONEOF(polyline, b_spline_curve, trimmed_curve, 
      bounded_pcurve, bounded_surface_curve, composite_curve, 
      locally_refined_spline_curve))
  SUBTYPE OF (curve);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY bounded_pcurve
  SUBTYPE OF (pcurve, bounded_curve);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOUNDED_CURVE' IN 
              TYPEOF(SELF\pcurve.reference_to_curve.items[1]);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY bounded_surface
  SUPERTYPE OF (ONEOF(b_spline_surface, rectangular_trimmed_surface, 
      curve_bounded_surface, rectangular_composite_surface, 
      locally_refined_spline_surface))
  SUBTYPE OF (surface);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY bounded_surface_curve
  SUBTYPE OF (surface_curve, bounded_curve);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOUNDED_CURVE' IN 
              TYPEOF(SELF\surface_curve.curve_3d);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY box_domain
  SUBTYPE OF (founded_item);
    corner  : cartesian_point;
    xlength : positive_length_measure;
    ylength : positive_length_measure;
    zlength : positive_length_measure;
  WHERE
    WR1: SIZEOF(QUERY (item <* USEDIN(SELF, '')| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOXED_HALF_SPACE'
               IN TYPEOF(item)))) = 0;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY boxed_half_space
  SUBTYPE OF (half_space_solid);
    enclosure : box_domain;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY breakdown_context
  SUBTYPE OF (product_definition_relationship);
END_ENTITY; -- 10303-1248: product_breakdown_mim

ENTITY breakdown_element_group_assignment
  SUBTYPE OF (group_assignment);
    SELF\group_assignment.assigned_group : 
                        product_definition_element_relationship;
    items          : SET [1:1] OF 
                        product_definition_or_breakdown_element_usage;
END_ENTITY; -- 10303-1248: product_breakdown_mim

ENTITY breakdown_element_realization
  SUBTYPE OF (characterized_object, product_definition_element_relationship
      );
END_ENTITY; -- 10303-1248: product_breakdown_mim

ENTITY breakdown_element_usage
  SUBTYPE OF (product_definition_relationship);
END_ENTITY; -- 10303-1248: product_breakdown_mim

ENTITY breakdown_of
  SUBTYPE OF (product_definition_relationship);
END_ENTITY; -- 10303-1248: product_breakdown_mim

ENTITY brep_with_voids
  SUBTYPE OF (manifold_solid_brep);
    voids : SET [1:?] OF oriented_closed_shell;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY calendar_date
  SUBTYPE OF (date);
    day_component   : day_in_month_number;
    month_component : month_in_year_number;
  WHERE
    WR1: valid_calendar_date(SELF);
END_ENTITY; -- 10303-41: date_time_schema

ENTITY camera_image
  SUPERTYPE OF (ONEOF(camera_image_3d_with_scale))
  SUBTYPE OF (mapped_item);
    SELF\mapped_item.mapping_source : camera_usage;
    SELF\mapped_item.mapping_target : planar_box;
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_REPRESENTATION_ITEM'
               IN TYPEOF(SELF);
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY camera_image_3d_with_scale
  SUBTYPE OF (camera_image);
  DERIVE
    scale : positive_ratio_measure := SELF\mapped_item.mapping_target\
               planar_extent.size_in_x / SELF\mapped_item.mapping_source.
               mapping_origin\camera_model_d3.perspective_of_volume.
               view_window.size_in_x;
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CAMERA_MODEL_D3' IN 
              TYPEOF(SELF\mapped_item.mapping_source.mapping_origin);
    WR2: aspect_ratio(SELF\mapped_item.mapping_target) = aspect_ratio(SELF\
              mapped_item.mapping_source.mapping_origin\camera_model_d3.
              perspective_of_volume.view_window);
    WR3: SELF\mapped_item.mapping_source.mapping_origin\camera_model_d3.
              perspective_of_volume.front_plane_clipping AND SELF\
              mapped_item.mapping_source.mapping_origin\camera_model_d3.
              perspective_of_volume.view_volume_sides_clipping;
    WR4: (SELF\mapped_item.mapping_target\planar_extent.size_in_x > 0) AND 
              (SELF\mapped_item.mapping_target\planar_extent.size_in_y > 0)
              ;
    WR5: (SELF\mapped_item.mapping_source.mapping_origin\camera_model_d3.
              perspective_of_volume.view_window.size_in_x > 0) AND (SELF\
              mapped_item.mapping_source.mapping_origin\camera_model_d3.
              perspective_of_volume.view_window.size_in_y > 0);
    WR6: ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_2D' 
              IN TYPEOF(SELF\mapped_item.mapping_target\planar_box.
              placement)) AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               IN TYPEOF(SELF\mapped_item.mapping_target\planar_box.
              placement));
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY camera_model
  ABSTRACT SUPERTYPE OF (ONEOF(camera_model_d3))
  SUBTYPE OF (geometric_representation_item);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ITEM_DEFINED_TRANSFORMATION.TRANSFORM_ITEM_1'
              )) + SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_MAP.MAPPING_ORIGIN'
              )) > 0;
    WR2: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM.ITEM'
              )) = 0;
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY camera_model_d3
  SUBTYPE OF (camera_model);
    view_reference_system : axis2_placement_3d;
    perspective_of_volume : view_volume;
  WHERE
    WR1: SELF\geometric_representation_item.dim = 3;
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY camera_model_d3_multi_clipping
  SUBTYPE OF (camera_model_d3);
    shape_clipping : SET [1:?] OF 
                        camera_model_d3_multi_clipping_intersection_select;
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY camera_model_d3_multi_clipping_intersection
  SUBTYPE OF (geometric_representation_item);
    shape_clipping : SET [2:?] OF 
                        camera_model_d3_multi_clipping_intersection_select;
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY camera_model_d3_multi_clipping_union
  SUBTYPE OF (geometric_representation_item);
    shape_clipping : SET [2:?] OF 
                        camera_model_d3_multi_clipping_union_select;
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY camera_model_d3_with_hlhsr
  SUBTYPE OF (camera_model_d3);
    hidden_line_surface_removal : BOOLEAN;
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY camera_model_with_light_sources
  SUBTYPE OF (camera_model_d3);
    sources : SET [1:?] OF light_source;
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY camera_usage
  SUBTYPE OF (representation_map);
    SELF\representation_map.mapping_origin : camera_model;
  WHERE
    WR1: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_REPRESENTATION'
               IN TYPEOF(SELF\representation_map.mapped_representation));
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY capacitance_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CAPACITANCE_UNIT' IN 
              TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY capacitance_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensions_for_si_unit(
              si_unit_name.farad);
END_ENTITY; -- 10303-41: measure_schema

ENTITY cartesian_complex_number_region
  SUBTYPE OF (maths_space, generic_literal);
    real_constraint : real_interval;
    imag_constraint : real_interval;
  WHERE
    WR1: ((min_exists(real_constraint) OR max_exists(real_constraint)) OR 
              min_exists(imag_constraint)) OR max_exists(imag_constraint);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY cartesian_point
  SUPERTYPE OF (ONEOF(cylindrical_point, polar_point, spherical_point))
  SUBTYPE OF (point);
    coordinates : LIST [1:3] OF length_measure;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY cartesian_transformation_operator
  SUPERTYPE OF (ONEOF(cartesian_transformation_operator_2d, 
      cartesian_transformation_operator_3d))
  SUBTYPE OF (geometric_representation_item, 
      functionally_defined_transformation);
    axis1        : OPTIONAL direction;
    axis2        : OPTIONAL direction;
    local_origin : cartesian_point;
    scale        : OPTIONAL REAL;
  DERIVE
    scl : REAL := NVL(scale, 1.0);
  WHERE
    WR1: scl > 0.0;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY cartesian_transformation_operator_2d
  SUBTYPE OF (cartesian_transformation_operator);
  DERIVE
    u : LIST [2:2] OF direction := base_axis(2, SELF\
           cartesian_transformation_operator.axis1, SELF\
           cartesian_transformation_operator.axis2, ?);
  WHERE
    WR1: SELF\geometric_representation_item.dim = 2;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY cartesian_transformation_operator_3d
  SUBTYPE OF (cartesian_transformation_operator);
    axis3 : OPTIONAL direction;
  DERIVE
    u : LIST [3:3] OF direction := base_axis(3, SELF\
           cartesian_transformation_operator.axis1, SELF\
           cartesian_transformation_operator.axis2, axis3);
  WHERE
    WR1: SELF\geometric_representation_item.dim = 3;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY celsius_temperature_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.THERMODYNAMIC_TEMPERATURE_UNIT'
               IN TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY centre_of_symmetry
  SUBTYPE OF (derived_shape_aspect);
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY certification;
    name    : label;
    purpose : text;
    kind    : certification_type;
END_ENTITY; -- 10303-41: certification_schema

ENTITY certification_assignment
  ABSTRACT SUPERTYPE;
    assigned_certification : certification;
  DERIVE
    role : object_role := get_role(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROLE_ASSOCIATION.ITEM_WITH_ROLE'
              )) <= 1;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY certification_type;
    description : label;
END_ENTITY; -- 10303-41: certification_schema

ENTITY chain_based_geometric_item_specific_usage
  SUBTYPE OF (geometric_item_specific_usage, 
      chain_based_item_identified_representation_usage);
END_ENTITY; -- 10303-1032: shape_property_assignment_mim

ENTITY chain_based_item_identified_representation_usage
  SUBTYPE OF (item_identified_representation_usage);
    nodes           : LIST [2:?] OF UNIQUE representation;
    undirected_link : LIST [1:?] OF chained_representation_link;
  DERIVE
    root                : representation := nodes[1];
    SELF\item_identified_representation_usage.used_representation : 
                             representation := nodes[HIINDEX(nodes)];
    leaf                : representation := used_representation;
    directed_link       : LIST [1:?] OF representation_relationship := 
                             get_directed_link(nodes, undirected_link);
  WHERE
    WR1: EXISTS(directed_link);
END_ENTITY; -- 10303-41: product_property_representation_schema

ENTITY chamfer
  SUBTYPE OF (transition_feature);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'chamfer face'))) <= 1))) = 0;
    WR2: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CHAMFER_OFFSET' 
              IN TYPEOF(fcr.related_shape_aspect)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CHAMFER' IN 
              TYPEOF(fcr.relating_shape_aspect))) AND (fcr.
              related_shape_aspect.description = 'first offset'))) = 1;
    WR3: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CHAMFER_OFFSET' 
              IN TYPEOF(fcr.related_shape_aspect)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CHAMFER' IN 
              TYPEOF(fcr.relating_shape_aspect))) AND (fcr.
              related_shape_aspect.description = 'second offset'))) = 1;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY chamfer_offset
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: SELF.description IN [ 'first offset', 'second offset' ];
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 1))) = 0))) = 0;
    WR4: NOT (SELF.description = 'first offset') OR (SIZEOF(QUERY (pd <* 
              USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'offset amount'))) = 1))
              ) = 0))) = 0);
    WR5: NOT (SELF.description = 'first offset') OR (SIZEOF(QUERY (pd <* 
              USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'first face shape'))) <= 1))) = 0)
              ;
    WR6: NOT (SELF.description = 'second offset') OR (SIZEOF(QUERY (pd <* 
              USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'offset amount') OR (
              SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'offset angle'))) = 1)))
               = 0))) = 0);
    WR7: NOT (SELF.description = 'second offset') OR (SIZEOF(QUERY (pd <* 
              USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'second face shape'))) <= 1))) = 0
              );
    WR8: SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CHAMFER' IN 
              TYPEOF(sdr.relating_shape_aspect)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CHAMFER_OFFSET' 
              IN TYPEOF(sdr.related_shape_aspect)))) = 1;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY character_glyph_style_outline
  SUBTYPE OF (founded_item);
    outline_style : curve_style;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY character_glyph_style_stroke
  SUBTYPE OF (founded_item);
    stroke_style : curve_style;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY characteristic_data_column_header
  SUBTYPE OF (general_property);
END_ENTITY; -- 10303-1654: characteristic_mim

ENTITY characteristic_data_column_header_link
  SUBTYPE OF (general_property_relationship);
END_ENTITY; -- 10303-1654: characteristic_mim

ENTITY characteristic_data_table_header
  SUBTYPE OF (general_property);
END_ENTITY; -- 10303-1654: characteristic_mim

ENTITY characteristic_data_table_header_decomposition
  SUBTYPE OF (general_property_relationship);
END_ENTITY; -- 10303-1654: characteristic_mim

ENTITY characteristic_type
  SUBTYPE OF (group);
END_ENTITY; -- 10303-1654: characteristic_mim

ENTITY characterized_chain_based_item_within_representation
  SUBTYPE OF (characterized_item_within_representation);
    nodes           : LIST [2:?] OF UNIQUE representation;
    undirected_link : LIST [1:?] OF chained_representation_link;
  DERIVE
    root          : representation := nodes[1];
    SELF\characterized_item_within_representation.rep : representation := 
                       nodes[HIINDEX(nodes)];
    leaf          : representation := rep;
    directed_link : LIST [1:?] OF representation_relationship := 
                       get_directed_link(nodes, undirected_link);
  WHERE
    WR1: EXISTS(directed_link);
END_ENTITY; -- 10303-41: product_property_representation_schema

ENTITY characterized_class
  SUBTYPE OF (characterized_object, class);
END_ENTITY; -- 10303-1111: classification_with_attributes_mim

ENTITY characterized_item_within_representation
  SUBTYPE OF (characterized_object);
    item : representation_item;
    rep  : representation;
  UNIQUE
    UR1: item, rep;
  WHERE
    WR1: rep IN using_representations(item);
END_ENTITY; -- 10303-41: product_property_representation_schema

ENTITY characterized_object;
    name        : label;
    description : OPTIONAL text;
END_ENTITY; -- 10303-41: product_property_definition_schema

ENTITY characterized_object_relationship;
    name            : label;
    description     : OPTIONAL text;
    relating_object : characterized_object;
    related_object  : characterized_object;
END_ENTITY; -- 10303-41: product_property_definition_schema

ENTITY characterized_product_concept_feature
  SUBTYPE OF (product_concept_feature, characterized_object);
END_ENTITY; -- 10303-1103: product_class_mim

ENTITY characterized_product_concept_feature_category
  SUBTYPE OF (product_concept_feature_category, characterized_object);
END_ENTITY; -- 10303-1103: product_class_mim

ENTITY characterized_representation
  SUBTYPE OF (representation, characterized_object);
  DERIVE
    SELF\characterized_object.name : label := SELF\representation.name;
    SELF\characterized_object.description : text := SELF\representation.
                     description;
END_ENTITY; -- 10303-1805: characterized_representation_mim

ENTITY circle
  SUBTYPE OF (conic);
    radius : positive_length_measure;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY circular_closed_profile
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_DEFINITION'
               IN TYPEOF(SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 2))) = 0))) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN 
              TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0))) = 0
              ;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'diameter'))) = 1))) = 0
              ))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY circular_involute
  SUBTYPE OF (curve);
    position    : axis2_placement;
    base_radius : positive_length_measure;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY circular_path
  SUBTYPE OF (path_node);
    via_point : cartesian_point;
END_ENTITY; -- 10303-105: kinematic_motion_representation_schema

ENTITY circular_pattern
  SUBTYPE OF (replicate_feature);
  WHERE
    WR1: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT' IN
               TYPEOF(sdr.related_shape_aspect)))) = 1))) <= 3))) = 0;
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT ((SIZEOF(impl_rep.
              used_representation.items) >= 3) AND (SIZEOF(impl_rep.
              used_representation.items) <= 5)))) = 0))) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'diameter'))) <= 1))) = 
              0))) = 0;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'base feature rotation')
              )) <= 1))) = 0))) = 0;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COUNT_MEASURE' 
              IN TYPEOF(it\measure_with_unit.value_component))) AND (it.
              name = 'number of features'))) = 1))) = 0))) = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'angular spacing'))) = 1
              ))) = 0))) = 0;
    WR8: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN 
              TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0))) = 0
              ;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY circular_runout_tolerance
  SUBTYPE OF (geometric_tolerance_with_datum_reference);
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY class
  SUBTYPE OF (group);
END_ENTITY; -- 10303-54: classification_schema

ENTITY class_by_extension
  SUBTYPE OF (class);
END_ENTITY; -- 10303-54: classification_schema

ENTITY class_by_intension
  SUBTYPE OF (class);
END_ENTITY; -- 10303-54: classification_schema

ENTITY class_system
  SUBTYPE OF (group);
END_ENTITY; -- 10303-1111: classification_with_attributes_mim

ENTITY class_usage_effectivity_context_assignment
  SUBTYPE OF (effectivity_context_assignment);
    items : SET [1:?] OF class_usage_effectivity_context_item;
  WHERE
    WR1: SELF.role.name = 'class usage influence';
    WR2: SIZEOF(QUERY (i <* SELF.items| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION'
               IN TYPEOF(i)))) = 0;
    WR3: (((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APPLIED_EFFECTIVITY_ASSIGNMENT'
               IN TYPEOF(SELF.assigned_effectivity_assignment)) AND (SIZEOF
              (TYPEOF(SELF.assigned_effectivity_assignment.
              assigned_effectivity)) = 1)) AND (SELF.
              assigned_effectivity_assignment.assigned_effectivity.id = 
              'class usage')) AND (SIZEOF(QUERY (i <* SELF.
              assigned_effectivity_assignment\
              applied_effectivity_assignment.items| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_CONCEPT_FEATURE_CATEGORY_USAGE'
               IN TYPEOF(i)))) = 0);
END_ENTITY; -- 10303-1112: specification_control_mim

ENTITY classification_assignment
  ABSTRACT SUPERTYPE;
    assigned_class : group;
    role           : classification_role;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY classification_assignment_relationship;
    id            : OPTIONAL identifier;
    description   : OPTIONAL text;
    relating      : classification_assignment;
    related       : classification_assignment;
    relation_type : STRING;
  WHERE
    WR1: acyclic_classification_assignment_relationship(SELF, [ related ], 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CLASSIFICATION_ASSIGNMENT_RELATIONSHIP'
              );
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY classification_role;
    name        : label;
    description : OPTIONAL text;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY closed_path_profile
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_DEFINITION'
               IN TYPEOF(SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 1))) = 0))) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN 
              TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0))) = 0
              ;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PATH_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY closed_shell
  SUBTYPE OF (connected_face_set);
END_ENTITY; -- 10303-42: topology_schema

ENTITY clothoid
  SUBTYPE OF (curve);
    position          : axis2_placement;
    clothoid_constant : length_measure;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY coaxiality_tolerance
  SUBTYPE OF (geometric_tolerance_with_datum_reference);
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY colour;
END_ENTITY; -- 10303-46: presentation_resource_schema

ENTITY colour_rgb
  SUBTYPE OF (colour_specification);
    red   : REAL;
    green : REAL;
    blue  : REAL;
  WHERE
    WR1: (0.0 <= red) AND (red <= 1.0);
    WR2: (0.0 <= green) AND (green <= 1.0);
    WR3: (0.0 <= blue) AND (blue <= 1.0);
END_ENTITY; -- 10303-46: presentation_resource_schema

ENTITY colour_specification
  SUBTYPE OF (colour);
    name : label;
END_ENTITY; -- 10303-46: presentation_resource_schema

ENTITY common_datum
  SUBTYPE OF (composite_shape_aspect, datum);
  WHERE
    WR1: SIZEOF(SELF\composite_shape_aspect.component_relationships) = 2;
    WR2: SIZEOF(QUERY (sar <* SELF\composite_shape_aspect.
              component_relationships| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DATUM' IN TYPEOF
              (sar.related_shape_aspect)) AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMMON_DATUM' IN
               TYPEOF(sar.related_shape_aspect))))) = 0;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY comparison_equal
  SUBTYPE OF (comparison_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY comparison_expression
  ABSTRACT SUPERTYPE OF (ONEOF(comparison_equal, comparison_greater, 
      comparison_greater_equal, comparison_less, comparison_less_equal, 
      comparison_not_equal, like_expression))
  SUBTYPE OF (boolean_expression, binary_generic_expression);
    SELF\binary_generic_expression.operands : LIST [2:2] OF expression;
  WHERE
    WR1: (('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NUMERIC_EXPRESSION'
               IN TYPEOF(SELF\binary_generic_expression.operands[1])) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NUMERIC_EXPRESSION'
               IN TYPEOF(SELF\binary_generic_expression.operands[2])) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOOLEAN_EXPRESSION'
               IN TYPEOF(SELF\binary_generic_expression.operands[1])) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOOLEAN_EXPRESSION'
               IN TYPEOF(SELF\binary_generic_expression.operands[2]))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STRING_EXPRESSION'
               IN TYPEOF(SELF\binary_generic_expression.operands[1])) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STRING_EXPRESSION'
               IN TYPEOF(SELF\binary_generic_expression.operands[2]));
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY comparison_greater
  SUBTYPE OF (comparison_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY comparison_greater_equal
  SUBTYPE OF (comparison_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY comparison_less
  SUBTYPE OF (comparison_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY comparison_less_equal
  SUBTYPE OF (comparison_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY comparison_not_equal
  SUBTYPE OF (comparison_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY complex_number_literal
  SUBTYPE OF (generic_literal);
    real_part : REAL;
    imag_part : REAL;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY complex_number_literal_polar
  SUBTYPE OF (complex_number_literal);
    modulus  : REAL;
    argument : REAL;
  DERIVE
    SELF\complex_number_literal.real_part : REAL := modulus * COS(argument)
                   ;
    SELF\complex_number_literal.imag_part : REAL := modulus * SIN(argument)
                   ;
  WHERE
    WR1: modulus >= 0;
    WR2: (0 <= argument) AND (argument <= 2 * PI);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY complex_triangulated_face
  SUBTYPE OF (tessellated_face);
    pnindex         : LIST [0:?] OF INTEGER;
    triangle_strips : LIST [0:?] OF LIST [3:?] OF INTEGER;
    triangle_fans   : LIST [0:?] OF LIST [3:?] OF INTEGER;
  WHERE
    WR1: (SIZEOF(pnindex) = 0) OR (SIZEOF(pnindex) = SELF\tessellated_face.
              pnmax);
    WR2: NOT ((SIZEOF(pnindex) = 0) AND (SELF\tessellated_face.pnmax <> 
              coordinates.npoints));
    WR3: NOT ((SIZEOF(triangle_strips) = 0) AND (SIZEOF(triangle_fans) = 0)
              );
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY complex_triangulated_surface_set
  SUBTYPE OF (tessellated_surface_set);
    pnindex         : LIST [0:?] OF INTEGER;
    triangle_strips : LIST [0:?] OF LIST [3:?] OF INTEGER;
    triangle_fans   : LIST [0:?] OF LIST [3:?] OF INTEGER;
  WHERE
    WR1: (SIZEOF(pnindex) = 0) OR (SIZEOF(pnindex) = SELF\
              tessellated_surface_set.pnmax);
    WR2: NOT ((SIZEOF(pnindex) = 0) AND (SELF\tessellated_surface_set.pnmax
               <> coordinates.npoints));
    WR3: NOT ((SIZEOF(triangle_strips) = 0) AND (SIZEOF(triangle_fans) = 0)
              );
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY composite_curve
  SUBTYPE OF (bounded_curve);
    segments       : LIST [1:?] OF composite_curve_segment;
    self_intersect : LOGICAL;
  DERIVE
    n_segments   : INTEGER := SIZEOF(segments);
    closed_curve : LOGICAL := segments[n_segments].transition <> 
                      discontinuous;
  WHERE
    WR1: NOT closed_curve AND (SIZEOF(QUERY (temp <* segments| (temp.
              transition = discontinuous))) = 1) OR closed_curve AND (
              SIZEOF(QUERY (temp <* segments| (temp.transition = 
              discontinuous))) = 0);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY composite_curve_on_surface
  SUPERTYPE OF (boundary_curve)
  SUBTYPE OF (composite_curve);
  DERIVE
    basis_surface : SET [0:2] OF surface := get_basis_surface(SELF);
  WHERE
    WR1: SIZEOF(basis_surface) > 0;
    WR2: constraints_composite_curve_on_surface(SELF);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY composite_curve_segment
  SUBTYPE OF (founded_item);
    transition   : transition_code;
    same_sense   : BOOLEAN;
    parent_curve : curve;
  INVERSE
    using_curves : BAG [1:?] OF composite_curve FOR segments;
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOUNDED_CURVE' IN 
              TYPEOF(parent_curve);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY composite_group_shape_aspect
  SUBTYPE OF (composite_shape_aspect);
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY composite_hole
  SUBTYPE OF (compound_feature);
  WHERE
    WR1: (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPLICIT_COMPOSITE_HOLE'
               IN TYPEOF(SELF)) XOR (SELF\characterized_object.description 
              IN [ 'counterbore', 'countersunk' ]);
    WR2: (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPLICIT_COMPOSITE_HOLE'
               IN TYPEOF(SELF)) XOR (SIZEOF(QUERY (pds <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pds)) AND (SIZEOF(QUERY (csa <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_SHAPE_ASPECT'
               IN TYPEOF(csa)) AND (SIZEOF(QUERY (sar <* csa.
              component_relationships| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROUND_HOLE' IN 
              TYPEOF(sar.related_shape_aspect)))) = 2))) = 1))) = 1);
    WR3: (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPLICIT_COMPOSITE_HOLE'
               IN TYPEOF(SELF)) XOR (NOT (SELF\characterized_object.
              description = 'countersunk') OR (SIZEOF(QUERY (pds <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pds)) AND (SIZEOF(QUERY (csa <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_SHAPE_ASPECT'
               IN TYPEOF(csa)) AND (SIZEOF(QUERY (sar <* csa.
              component_relationships| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROUND_HOLE' IN 
              TYPEOF(sar.related_shape_aspect)) AND NOT (SIZEOF(QUERY (pds 
              <* QUERY (pd <* USEDIN(sar.related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'change in diameter occurrence') AND
               (SIZEOF(QUERY (fcr2 <* QUERY (sar2 <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (sar2.description = 'taper usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar2)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TAPER' IN TYPEOF
              (fcr2.related_shape_aspect)))) = 1))) = 0))) = 0))) = 1))) = 
              1))) = 1));
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY composite_shape_aspect
  SUPERTYPE OF (ONEOF(continuous_shape_aspect, common_datum, 
      composite_group_shape_aspect))
  SUBTYPE OF (shape_aspect);
  INVERSE
    component_relationships : SET [2:?] OF shape_aspect_relationship FOR 
                                 relating_shape_aspect;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY composite_text
  SUBTYPE OF (geometric_representation_item);
    collected_text : SET [2:?] OF text_or_character;
  WHERE
    WR1: acyclic_composite_text(SELF, collected_text);
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY composite_text_with_associated_curves
  SUBTYPE OF (composite_text);
    associated_curves : SET [1:?] OF curve;
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY composite_text_with_blanking_box
  SUBTYPE OF (composite_text);
    blanking : planar_box;
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY composite_text_with_delineation
  SUBTYPE OF (composite_text);
    delineation : text_delineation;
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY composite_text_with_extent
  SUBTYPE OF (composite_text);
    extent : planar_extent;
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY composite_unit_shape_aspect
  SUBTYPE OF (composite_shape_aspect);
END_ENTITY; -- 10303-1742: shape_composition_mim

ENTITY compound_feature
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPLICIT_COMPOSITE_HOLE'
               IN TYPEOF(SELF)) XOR (SIZEOF(QUERY (pds <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pds)) AND (SIZEOF(QUERY (csa <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (csa.name = 'compound feature in solid') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_SHAPE_ASPECT'
               IN TYPEOF(csa)))) = 1))) = 1);
    WR2: (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPLICIT_COMPOSITE_HOLE'
               IN TYPEOF(SELF)) XOR (SIZEOF(QUERY (pds <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pds)) AND (SIZEOF(QUERY (csa <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_SHAPE_ASPECT'
               IN TYPEOF(csa)))) = 1))) = 1);
    WR3: (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPLICIT_COMPOSITE_HOLE'
               IN TYPEOF(SELF)) XOR (SIZEOF(QUERY (pds <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pds)) AND (SIZEOF(QUERY (csa <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_SHAPE_ASPECT'
               IN TYPEOF(csa)) AND (SIZEOF(QUERY (fcr <* csa.
              component_relationships| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(fcr)))) = 0))) = 1))) = 1);
    WR4: (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPLICIT_COMPOSITE_HOLE'
               IN TYPEOF(SELF)) XOR (SIZEOF(QUERY (pds <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pds)) AND (SIZEOF(QUERY (csa <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_SHAPE_ASPECT'
               IN TYPEOF(csa)))) = 1))) = 1);
    WR5: (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPLICIT_COMPOSITE_HOLE'
               IN TYPEOF(SELF)) XOR (SIZEOF(QUERY (pds <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pds)) AND (SIZEOF(QUERY (csa <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_SHAPE_ASPECT'
               IN TYPEOF(csa)) AND (SIZEOF(QUERY (sar <* csa.
              component_relationships| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.THREAD' IN 
              TYPEOF(sar.related_shape_aspect)))) = 0))) = 1))) = 1);
    WR6: (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPLICIT_COMPOSITE_HOLE'
               IN TYPEOF(SELF)) XOR (SIZEOF(QUERY (pds <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pds)) AND (SIZEOF(QUERY (csa <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_SHAPE_ASPECT'
               IN TYPEOF(csa)) AND (SIZEOF(QUERY (sar <* csa.
              component_relationships| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOUND_FEATURE'
               IN TYPEOF(sar.related_shape_aspect)) AND (sar.
              related_shape_aspect\characterized_object.name <> SELF\
              characterized_object.name))) = 0))) = 1))) = 1);
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY compound_representation_item
  SUPERTYPE OF (ONEOF(row_representation_item, table_representation_item))
  SUBTYPE OF (representation_item);
    item_element : compound_item_definition;
END_ENTITY; -- 10303-43: representation_schema

ENTITY compound_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_REPRESENTATION_CONTEXT'
               IN TYPEOF(SELF.context_of_items)) AND (SELF.context_of_items
              \geometric_representation_context.coordinate_space_dimension 
              = 3);
    WR2: SIZEOF(QUERY (cbsr_i <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_BASED_WIREFRAME_MODEL'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_BASED_SURFACE_MODEL'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               ] * TYPEOF(cbsr_i)) <> 1))) = 0;
    WR3: SIZEOF(QUERY (cbsr_i <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_BASED_WIREFRAME_MODEL'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_BASED_SURFACE_MODEL'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' ]
               * TYPEOF(cbsr_i)) = 1))) > 0;
    WR4: SIZEOF(QUERY (cbsr_i <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(cbsr_i)) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOUND_SHAPE_REPRESENTATION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_BASED_WIREFRAME_SHAPE_REPRESENTATION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NON_MANIFOLD_SURFACE_SHAPE_REPRESENTATION'
               ] * TYPEOF(cbsr_i\mapped_item.mapping_source)) <> 1))) = 0;
END_ENTITY; -- 10303-1327: compound_shape_representation_mim

ENTITY concat_expression
  SUBTYPE OF (string_expression, multiple_arity_generic_expression);
    SELF\multiple_arity_generic_expression.operands : LIST [2:?] OF 
                  string_expression;
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY concentricity_tolerance
  SUBTYPE OF (geometric_tolerance_with_datum_reference);
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY concept_feature_operator;
    name        : label;
    description : OPTIONAL text;
END_ENTITY; -- 10303-44: product_concept_schema

ENTITY concept_feature_relationship;
    name                             : label;
    description                      : OPTIONAL text;
    relating_product_concept_feature : product_concept_feature;
    related_product_concept_feature  : product_concept_feature;
END_ENTITY; -- 10303-44: product_concept_schema

ENTITY concept_feature_relationship_with_condition
  SUBTYPE OF (concept_feature_relationship);
    conditional_operator : concept_feature_operator;
END_ENTITY; -- 10303-44: product_concept_schema

ENTITY concurrent_action_method
  SUBTYPE OF (action_method_relationship);
END_ENTITY; -- 10303-49: method_definition_schema

ENTITY conditional_concept_feature
  SUBTYPE OF (product_concept_feature);
    condition : concept_feature_relationship_with_condition;
END_ENTITY; -- 10303-44: product_concept_schema

ENTITY conductance_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONDUCTANCE_UNIT' IN 
              TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY conductance_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensions_for_si_unit(
              si_unit_name.siemens);
END_ENTITY; -- 10303-41: measure_schema

ENTITY configurable_item
  SUBTYPE OF (configuration_item);
    item_concept_feature : SET [1:?] OF product_concept_feature_association
                              ;
END_ENTITY; -- 10303-44: configuration_management_schema

ENTITY configuration_design;
    configuration : configuration_item;
    design        : configuration_design_item;
  DERIVE
    name        : label := get_name_value(SELF);
    description : text := get_description_value(SELF);
  UNIQUE
    UR1: configuration, design;
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NAME_ATTRIBUTE.NAMED_ITEM'
              )) <= 1;
    WR2: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-44: configuration_management_schema

ENTITY configuration_effectivity
  SUBTYPE OF (product_definition_effectivity);
    configuration : configuration_design;
  UNIQUE
    UR1: configuration, SELF\product_definition_effectivity.usage,
         SELF\effectivity.id;
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_USAGE'
               IN TYPEOF(SELF\product_definition_effectivity.usage);
END_ENTITY; -- 10303-44: configuration_management_schema

ENTITY configuration_item;
    id           : identifier;
    name         : label;
    description  : OPTIONAL text;
    item_concept : product_concept;
    purpose      : OPTIONAL label;
END_ENTITY; -- 10303-44: configuration_management_schema

ENTITY configuration_item_hierarchical_relationship
  SUBTYPE OF (configuration_item_relationship);
END_ENTITY; -- 10303-1056: configuration_item_mim

ENTITY configuration_item_relationship;
    name                        : label;
    description                 : OPTIONAL text;
    relating_configuration_item : configuration_item;
    related_configuration_item  : configuration_item;
END_ENTITY; -- 10303-44: configuration_management_schema

ENTITY configuration_item_revision_sequence
  SUBTYPE OF (configuration_item_relationship);
END_ENTITY; -- 10303-1056: configuration_item_mim

ENTITY configured_effectivity_assignment
  SUBTYPE OF (effectivity_assignment);
    items : SET [1:?] OF configured_effectivity_item;
  WHERE
    WR1: (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EFFECTIVITY' ] *
               TYPEOF(SELF.assigned_effectivity)) = 1) AND (SELF.
              assigned_effectivity.id = 'configuration validity');
    WR2: SIZEOF(SELF.items) = 1;
    WR3: SIZEOF(QUERY (i <* SELF.items| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION'
               IN TYPEOF(i)) OR NOT (i\product_definition.
              frame_of_reference.name IN [ 'conceptual definition', 
              'part occurrence', 'functional definition', 
              'alternative definition' ]))) = 0;
    WR4: SELF.role.name IN [ 'design', 'usage' ];
    WR5: (SELF.role.name <> 'design') OR (SIZEOF(QUERY (i <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION'
               IN TYPEOF(i)) AND (i\product_definition.frame_of_reference.
              name = 'part occurrence'))) = 0);
    WR6: (SELF.role.name <> 'usage') OR (SIZEOF(QUERY (i <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION'
               IN TYPEOF(i)) AND (i\product_definition.frame_of_reference.
              name = 'conceptual definition'))) = 0);
    WR7: SELF.role.description IN [ 'exception', 'inherited', 'local' ];
    WR8: SIZEOF(QUERY (x <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EFFECTIVITY_CONTEXT_ASSIGNMENT.ASSIGNED_EFFECTIVITY_ASSIGNMENT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONFIGURED_EFFECTIVITY_CONTEXT_ASSIGNMENT'
               IN TYPEOF(x)))) = 1;
END_ENTITY; -- 10303-1108: specification_based_configuration_mim

ENTITY configured_effectivity_context_assignment
  SUBTYPE OF (effectivity_context_assignment);
    SELF\effectivity_context_assignment.assigned_effectivity_assignment : 
                                         configured_effectivity_assignment;
    items                           : SET [1:?] OF 
                                         configured_effectivity_context_item
                                         ;
  WHERE
    WR1: SIZEOF(SELF.items) = 1;
END_ENTITY; -- 10303-1108: specification_based_configuration_mim

ENTITY conic
  SUPERTYPE OF (ONEOF(circle, ellipse, hyperbola, parabola))
  SUBTYPE OF (curve);
    position : axis2_placement;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY conical_surface
  SUBTYPE OF (elementary_surface);
    radius     : length_measure;
    semi_angle : plane_angle_measure;
  WHERE
    WR1: radius >= 0.0;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY connected_edge_set
  SUBTYPE OF (topological_representation_item);
    ces_edges : SET [1:?] OF edge;
END_ENTITY; -- 10303-42: topology_schema

ENTITY connected_edge_sub_set
  SUBTYPE OF (connected_edge_set);
    parent_edge_set : connected_edge_set;
  WHERE
    WR1: SELF :<>: parent_edge_set;
END_ENTITY; -- 10303-42: topology_schema

ENTITY connected_face_set
  SUPERTYPE OF (ONEOF(closed_shell, open_shell))
  SUBTYPE OF (topological_representation_item);
    cfs_faces : SET [1:?] OF face;
END_ENTITY; -- 10303-42: topology_schema

ENTITY connected_face_sub_set
  SUBTYPE OF (connected_face_set);
    parent_face_set : connected_face_set;
  WHERE
    WR1: SELF :<>: parent_face_set;
END_ENTITY; -- 10303-42: topology_schema

ENTITY connected_volume_set
  SUBTYPE OF (topological_representation_item);
    cvs_volumes : SET [1:?] OF volume_with_faces;
END_ENTITY; -- 10303-42: topology_schema

ENTITY connected_volume_sub_set
  SUBTYPE OF (connected_volume_set);
    parent_volume_set : connected_volume_set;
  WHERE
    WR1: SELF :<>: parent_volume_set;
END_ENTITY; -- 10303-42: topology_schema

ENTITY connection_zone_interface_plane_relationship
  SUBTYPE OF (shape_aspect, shape_aspect_relationship);
  UNIQUE
    UR1: SELF\shape_aspect_relationship.name;
END_ENTITY; -- 10303-1671: feature_and_connection_zone_mim

ENTITY constant_function
  SUBTYPE OF (maths_function, generic_literal);
    sole_output      : maths_value;
    source_of_domain : maths_space_or_function;
  WHERE
    WR1: no_cyclic_domain_reference(source_of_domain, [ SELF ]);
    WR2: expression_is_constant(domain_from(source_of_domain));
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY constituent_shape_aspect
  SUBTYPE OF (shape_aspect);
    parent : shape_aspect;
  DERIVE
    SELF\shape_aspect.of_shape : product_definition_shape := 
                  get_product_definition_shape(SELF);
END_ENTITY; -- 10303-41: product_property_definition_schema

ENTITY constructive_geometry_representation
  SUBTYPE OF (representation);
  WHERE
    WR1: (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_REPRESENTATION_CONTEXT'
               IN TYPEOF(SELF\representation.context_of_items)) AND ((2 <= 
              SELF\representation.context_of_items\
              geometric_representation_context.coordinate_space_dimension) 
              AND (SELF\representation.context_of_items\
              geometric_representation_context.coordinate_space_dimension 
              <= 3));
    WR2: SIZEOF(QUERY (cgr_i <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONNECTED_FACE_SET'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONNECTED_EDGE_SET'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_POINT' 
              ] * TYPEOF(cgr_i)) <> 1))) = 0;
    WR3: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_RELATIONSHIP.REP_2'
              )) > 0;
END_ENTITY; -- 10303-1131: construction_geometry_mim

ENTITY constructive_geometry_representation_relationship
  SUBTYPE OF (representation_relationship);
    SELF\representation_relationship.rep_1 : 
               constructive_geometry_representation_or_shape_representation
               ;
    SELF\representation_relationship.rep_2 : 
               constructive_geometry_representation;
  WHERE
    WR1: (SELF.rep_1.context_of_items :=: SELF.rep_2.context_of_items) AND 
              (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_REPRESENTATION_CONTEXT'
               IN TYPEOF(SELF.rep_1.context_of_items));
    WR2: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION'
               IN TYPEOF(SELF));
END_ENTITY; -- 10303-1131: construction_geometry_mim

ENTITY contact_ratio_representation
  SUBTYPE OF (representation);
  WHERE
    WR1: (SIZEOF(SELF.items) = 1) AND (SIZEOF(QUERY (i <* SELF.items| (
              SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VALUE_RANGE' ]
               * TYPEOF(i)) = 1) AND (i.name = 'ratio value'))) = 1);
    WR2: (SIZEOF(QUERY (pdr <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION'
              )| (pdr\property_definition_representation.name = 
              'contact ratio reference'))) = 1) AND (SIZEOF(QUERY (pdr <* 
              USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION'
              )| (pdr\property_definition_representation.name = 
              'contact ratio reference') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION'
               IN TYPEOF(pdr\property_definition_representation.definition\
              property_definition.definition)))) = 1);
    WR3: (SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION'
              )) = 1) AND (SIZEOF(QUERY (pdr <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION'
              )| (SIZEOF(QUERY (gpa <* USEDIN(pdr.definition, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GENERAL_PROPERTY_ASSOCIATION.DERIVED_DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GENERAL_PROPERTY'
               IN TYPEOF(gpa\general_property_association.base_definition))
               AND (gpa\general_property_association.base_definition\
              general_property.name = 'surface_condition'))) = 1))) = 1);
END_ENTITY; -- 10303-1110: surface_conditions_mim

ENTITY contacting_feature
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: SELF\shape_aspect.product_definitional = FALSE;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY context_dependent_invisibility
  SUBTYPE OF (invisibility);
    presentation_context : invisibility_context;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY context_dependent_kinematic_link_representation;
    representation_relation      : 
                                      kinematic_link_representation_association
                                      ;
    represented_product_relation : 
                                      product_definition_relationship_kinematics
                                      ;
END_ENTITY; -- 10303-105: kinematic_property_schema

ENTITY context_dependent_over_riding_styled_item
  SUBTYPE OF (over_riding_styled_item);
    style_context : LIST [1:?] OF style_context_select;
  WHERE
    WR1: (SIZEOF(QUERY (sc <* style_context| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_ITEM'
               IN TYPEOF(sc)))) = 1) OR (SIZEOF(QUERY (sc <* style_context|
               (('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' 
              IN TYPEOF(sc)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONTEXT_DEPENDENT_SHAPE_REPRESENTATION'
               IN TYPEOF(sc))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_RELATIONSHIP'
               IN TYPEOF(sc)))) = SIZEOF(style_context));
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY context_dependent_shape_representation;
    representation_relation      : shape_representation_relationship;
    represented_product_relation : product_definition_shape;
  DERIVE
    description : text := get_description_value(SELF);
    name        : label := get_name_value(SELF);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_RELATIONSHIP'
               IN TYPEOF(represented_product_relation\property_definition.
              definition);
    WR2: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM'
              )) <= 1;
    WR3: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NAME_ATTRIBUTE.NAMED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: product_property_representation_schema

ENTITY context_dependent_unit
  SUBTYPE OF (named_unit);
    name : label;
END_ENTITY; -- 10303-41: measure_schema

ENTITY continuous_shape_aspect
  SUPERTYPE OF (ONEOF(between_shape_aspect, all_around_shape_aspect))
  SUBTYPE OF (composite_shape_aspect);
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY contouring_turning_operation
  SUBTYPE OF (turning_type_operation);
  WHERE
    WR1: SELF.description IN [ 'roughing', 'finishing' ];
    WR2: verify_optional_action_property(SELF, 'allowance') AND 
              verify_length_measure_action_property(SELF, 'allowance');
    WR3: NOT (SELF.description = 'roughing') OR 
              verify_required_action_property(SELF, 'allowance');
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY contract;
    name    : label;
    purpose : text;
    kind    : contract_type;
END_ENTITY; -- 10303-41: contract_schema

ENTITY contract_assignment
  ABSTRACT SUPERTYPE;
    assigned_contract : contract;
  DERIVE
    role : object_role := get_role(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROLE_ASSOCIATION.ITEM_WITH_ROLE'
              )) <= 1;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY contract_relationship;
    id                : identifier;
    name              : label;
    description       : OPTIONAL text;
    relating_contract : contract;
    related_contract  : contract;
END_ENTITY; -- 10303-41: contract_schema

ENTITY contract_type;
    description : label;
END_ENTITY; -- 10303-41: contract_schema

ENTITY conversion_based_unit
  SUBTYPE OF (named_unit);
    name              : label;
    conversion_factor : measure_with_unit;
  WHERE
    WR1: SELF\named_unit.dimensions = derive_dimensional_exponents(
              conversion_factor\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY convex_hexahedron
  SUBTYPE OF (faceted_primitive);
  WHERE
    WR1: SIZEOF(points) = 8;
    WR2: above_plane(points[1], points[2], points[3], points[4]) = 0.0;
    WR3: above_plane(points[5], points[8], points[7], points[6]) = 0.0;
    WR4: above_plane(points[1], points[4], points[8], points[5]) = 0.0;
    WR5: above_plane(points[4], points[3], points[7], points[8]) = 0.0;
    WR6: above_plane(points[3], points[2], points[6], points[7]) = 0.0;
    WR7: above_plane(points[1], points[5], points[6], points[2]) = 0.0;
    WR8: same_side([ points[1], points[2], points[3] ], [ points[5], points
              [6], points[7], points[8] ]);
    WR9: same_side([ points[1], points[4], points[8] ], [ points[3], points
              [7], points[6], points[2] ]);
    WR10: same_side([ points[1], points[2], points[5] ], [ points[3], 
              points[7], points[8], points[4] ]);
    WR11: same_side([ points[5], points[6], points[7] ], [ points[1], 
              points[2], points[3], points[4] ]);
    WR12: same_side([ points[3], points[7], points[6] ], [ points[1], 
              points[4], points[8], points[5] ]);
    WR13: same_side([ points[3], points[7], points[8] ], [ points[1], 
              points[5], points[6], points[2] ]);
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY coordinated_universal_time_offset;
    hour_offset   : INTEGER;
    minute_offset : OPTIONAL INTEGER;
    sense         : ahead_or_behind;
  DERIVE
    actual_minute_offset : INTEGER := NVL(minute_offset, 0);
  WHERE
    WR1: (0 <= hour_offset) AND (hour_offset < 24);
    WR2: (0 <= actual_minute_offset) AND (actual_minute_offset <= 59);
    WR3: NOT (((hour_offset <> 0) OR (actual_minute_offset <> 0)) AND (
              sense = exact));
END_ENTITY; -- 10303-41: date_time_schema

ENTITY coordinates_list
  SUBTYPE OF (tessellated_item);
    npoints         : INTEGER;
    position_coords : LIST [1:?] OF LIST [3:3] OF REAL;
  WHERE
    WR1: npoints = SIZEOF(position_coords);
    WR2: SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPOSITIONED_TESSELLATED_ITEM'
               ] * TYPEOF(SELF)) = 0;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY cos_function
  SUBTYPE OF (unary_function_call);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY counterbore_hole_definition
  SUBTYPE OF (explicit_composite_hole);
    counterbore                     : LIST [1:?] OF UNIQUE 
                                         explicit_round_hole;
    drilled_hole_depth              : OPTIONAL 
                                         positive_length_measure_with_unit;
    drilled_hole_depth_tolerance    : OPTIONAL tolerance_value;
    drilled_hole_diameter           : positive_length_measure_with_unit;
    drilled_hole_diameter_tolerance : OPTIONAL 
                                         tolerance_value_or_limits_and_fits
                                         ;
    through_hole                    : BOOLEAN;
  WHERE
    WR1: through_hole XOR EXISTS(drilled_hole_depth);
    WR2: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(drilled_hole_depth_tolerance\tolerance_value.
              lower_bound);
    WR3: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(drilled_hole_depth_tolerance\tolerance_value.
              upper_bound);
    WR4: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TOLERANCE_VALUE'
               IN TYPEOF(drilled_hole_diameter_tolerance)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(drilled_hole_diameter_tolerance\tolerance_value.
              lower_bound));
    WR5: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TOLERANCE_VALUE'
               IN TYPEOF(drilled_hole_diameter_tolerance)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(drilled_hole_diameter_tolerance\tolerance_value.
              upper_bound));
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY counterbore_hole_occurrence
  SUBTYPE OF (shape_aspect_occurrence);
    SELF\shape_aspect_occurrence.definition : counterbore_hole_definition;
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION' 
              IN TYPEOF(SELF\shape_aspect.of_shape\property_definition.
              definition);
    WR2: SELF\shape_aspect.product_definitional = TRUE;
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY counterbore_hole_occurrence_in_assembly
  SUBTYPE OF (counterbore_hole_occurrence);
    modified_components : LIST [1:?] OF UNIQUE 
                             multi_level_reference_designator;
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY counterdrill_hole_definition
  SUBTYPE OF (explicit_composite_hole);
    counterbore                     : explicit_round_hole;
    counterdrill_angle              : 
                                         positive_plane_angle_measure_with_unit
                                         ;
    counterdrill_angle_tolerance    : OPTIONAL tolerance_value;
    drilled_hole_depth              : OPTIONAL 
                                         positive_length_measure_with_unit;
    drilled_hole_depth_tolerance    : OPTIONAL tolerance_value;
    drilled_hole_diameter           : positive_length_measure_with_unit;
    drilled_hole_diameter_tolerance : OPTIONAL 
                                         tolerance_value_or_limits_and_fits
                                         ;
    through_hole                    : BOOLEAN;
  WHERE
    WR1: through_hole XOR EXISTS(drilled_hole_depth);
    WR2: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               IN TYPEOF(counterdrill_angle_tolerance\tolerance_value.
              lower_bound);
    WR3: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               IN TYPEOF(counterdrill_angle_tolerance\tolerance_value.
              upper_bound);
    WR4: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(drilled_hole_depth_tolerance\tolerance_value.
              lower_bound);
    WR5: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(drilled_hole_depth_tolerance\tolerance_value.
              upper_bound);
    WR6: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TOLERANCE_VALUE'
               IN TYPEOF(drilled_hole_diameter_tolerance)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(drilled_hole_diameter_tolerance\tolerance_value.
              lower_bound));
    WR7: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TOLERANCE_VALUE'
               IN TYPEOF(drilled_hole_diameter_tolerance)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(drilled_hole_diameter_tolerance\tolerance_value.
              upper_bound));
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY counterdrill_hole_occurrence
  SUBTYPE OF (shape_aspect_occurrence);
    SELF\shape_aspect_occurrence.definition : counterdrill_hole_definition;
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION' 
              IN TYPEOF(SELF\shape_aspect.of_shape\property_definition.
              definition);
    WR2: SELF\shape_aspect.product_definitional = TRUE;
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY counterdrill_hole_occurrence_in_assembly
  SUBTYPE OF (counterdrill_hole_occurrence);
    modified_components : LIST [1:?] OF UNIQUE 
                             multi_level_reference_designator;
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY countersink_hole_definition
  SUBTYPE OF (explicit_composite_hole);
    countersink_angle               : 
                                         positive_plane_angle_measure_with_unit
                                         ;
    countersink_angle_tolerance     : OPTIONAL tolerance_value;
    countersink_diameter            : positive_length_measure_with_unit;
    countersink_diameter_tolerance  : OPTIONAL 
                                         tolerance_value_or_limits_and_fits
                                         ;
    drilled_hole_depth              : OPTIONAL 
                                         positive_length_measure_with_unit;
    drilled_hole_depth_tolerance    : OPTIONAL tolerance_value;
    drilled_hole_diameter           : positive_length_measure_with_unit;
    drilled_hole_diameter_tolerance : OPTIONAL 
                                         tolerance_value_or_limits_and_fits
                                         ;
    through_hole                    : BOOLEAN;
  WHERE
    WR1: through_hole XOR EXISTS(drilled_hole_depth);
    WR2: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               IN TYPEOF(countersink_angle_tolerance\tolerance_value.
              lower_bound);
    WR3: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               IN TYPEOF(countersink_angle_tolerance\tolerance_value.
              upper_bound);
    WR4: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TOLERANCE_VALUE'
               IN TYPEOF(countersink_diameter_tolerance)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(countersink_diameter_tolerance\tolerance_value.
              lower_bound));
    WR5: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TOLERANCE_VALUE'
               IN TYPEOF(countersink_diameter_tolerance)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(countersink_diameter_tolerance\tolerance_value.
              upper_bound));
    WR6: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(drilled_hole_depth_tolerance\tolerance_value.
              lower_bound);
    WR7: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(drilled_hole_depth_tolerance\tolerance_value.
              upper_bound);
    WR8: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TOLERANCE_VALUE'
               IN TYPEOF(drilled_hole_diameter_tolerance)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(drilled_hole_diameter_tolerance\tolerance_value.
              lower_bound));
    WR9: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TOLERANCE_VALUE'
               IN TYPEOF(drilled_hole_diameter_tolerance)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(drilled_hole_diameter_tolerance\tolerance_value.
              upper_bound));
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY countersink_hole_occurrence
  SUBTYPE OF (shape_aspect_occurrence);
    SELF\shape_aspect_occurrence.definition : countersink_hole_definition;
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION' 
              IN TYPEOF(SELF\shape_aspect.of_shape\property_definition.
              definition);
    WR2: SELF\shape_aspect.product_definitional = TRUE;
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY countersink_hole_occurrence_in_assembly
  SUBTYPE OF (countersink_hole_occurrence);
    modified_components : LIST [1:?] OF UNIQUE 
                             multi_level_reference_designator;
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY csg_solid
  SUBTYPE OF (solid_model);
    tree_root_expression : csg_select;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY cubic_bezier_tessellated_edge
  SUBTYPE OF (tessellated_edge);
    SELF\tessellated_edge.line_strip : LIST [4:?] OF INTEGER;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY cubic_bezier_triangulated_face
  SUBTYPE OF (tessellated_face);
    ctriangles : LIST [1:?] OF LIST [10:10] OF INTEGER;
  WHERE
    WR1: SIZEOF(SELF\tessellated_face.normals) = 0;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY cubic_tessellated_connecting_edge
  SUBTYPE OF (cubic_bezier_tessellated_edge);
    smooth : LOGICAL;
    face1  : cubic_bezier_triangulated_face;
    face2  : cubic_bezier_triangulated_face;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY curve
  SUPERTYPE OF (ONEOF(line, conic, clothoid, circular_involute, pcurve, 
      surface_curve, offset_curve_2d, offset_curve_3d, curve_replica))
  SUBTYPE OF (geometric_representation_item);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY curve_based_path
  SUBTYPE OF (path_node);
    path_curve : curve;
END_ENTITY; -- 10303-105: kinematic_motion_representation_schema

ENTITY curve_based_path_with_orientation
  SUBTYPE OF (kinematic_path_segment);
    position_curve    : bounded_curve;
    orientation_curve : bounded_curve;
  WHERE
    WR1: TYPEOF(position_curve) = TYPEOF(orientation_curve);
END_ENTITY; -- 10303-105: kinematic_motion_representation_schema

ENTITY curve_based_path_with_orientation_and_parameters
  SUBTYPE OF (curve_based_path_with_orientation);
    parameters : path_parameter_representation;
END_ENTITY; -- 10303-105: kinematic_motion_representation_schema

ENTITY curve_bounded_surface
  SUBTYPE OF (bounded_surface);
    basis_surface  : surface;
    boundaries     : SET [1:?] OF boundary_curve;
    implicit_outer : BOOLEAN;
  WHERE
    WR1: NOT implicit_outer OR (SIZEOF(QUERY (temp <* boundaries| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OUTER_BOUNDARY_CURVE'
               IN TYPEOF(temp)))) = 0);
    WR2: NOT implicit_outer OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOUNDED_SURFACE'
               IN TYPEOF(basis_surface));
    WR3: SIZEOF(QUERY (temp <* boundaries| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OUTER_BOUNDARY_CURVE'
               IN TYPEOF(temp)))) <= 1;
    WR4: SIZEOF(QUERY (temp <* boundaries| (temp\composite_curve_on_surface
              .basis_surface[1] <> basis_surface))) = 0;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY curve_dimension
  SUBTYPE OF (dimension_curve_directed_callout);
END_ENTITY; -- 10303-506: aic_draughting_elements

ENTITY curve_replica
  SUBTYPE OF (curve);
    parent_curve   : curve;
    transformation : cartesian_transformation_operator;
  WHERE
    WR1: transformation.dim = parent_curve.dim;
    WR2: acyclic_curve_replica(SELF, parent_curve);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY curve_style
  SUBTYPE OF (founded_item);
    name         : label;
    curve_font   : OPTIONAL curve_font_or_scaled_curve_font_select;
    curve_width  : OPTIONAL size_select;
    curve_colour : OPTIONAL colour;
  WHERE
    WR1: (EXISTS(curve_font) OR EXISTS(curve_width)) OR EXISTS(curve_colour
              );
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY curve_style_font
  SUBTYPE OF (founded_item);
    name         : label;
    pattern_list : LIST [1:?] OF curve_style_font_pattern;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY curve_style_font_and_scaling
  SUBTYPE OF (founded_item);
    name               : label;
    curve_font         : curve_style_font_select;
    curve_font_scaling : REAL;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY curve_style_font_pattern
  SUBTYPE OF (founded_item);
    visible_segment_length   : positive_length_measure;
    invisible_segment_length : positive_length_measure;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY curve_style_rendering;
    rendering_method     : shading_curve_method;
    rendering_properties : surface_rendering_properties;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY curve_swept_solid_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(QUERY (it <* SELF.items| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SWEPT_AREA_SOLID'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SWEPT_DISK_SOLID'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               ] * TYPEOF(it)) = 1))) = 0;
    WR2: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SWEPT_AREA_SOLID'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SWEPT_DISK_SOLID'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' ]
               * TYPEOF(it)) = 1))) > 0;
    WR3: SIZEOF(QUERY (mi <* QUERY (it <* items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(it)))| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_SWEPT_SOLID_SHAPE_REPRESENTATION'
               IN TYPEOF(mi\mapped_item.mapping_source.
              mapped_representation)))) = 0;
    WR4: SIZEOF(QUERY (scsas <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_CURVE_SWEPT_AREA_SOLID'
               IN TYPEOF(it)))| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_CURVE' 
              IN TYPEOF(scsas\surface_curve_swept_area_solid.directrix)) OR
               ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PCURVE' IN 
              TYPEOF(scsas\surface_curve_swept_area_solid.directrix))))) = 
              0;
END_ENTITY; -- 10303-523: aic_curve_swept_solid

ENTITY cyclide_segment_solid
  SUBTYPE OF (geometric_representation_item);
    position    : axis2_placement_3d;
    radius1     : positive_length_measure;
    radius2     : positive_length_measure;
    cone_angle1 : plane_angle_measure;
    cone_angle2 : plane_angle_measure;
    turn_angle  : plane_angle_measure;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY cylindrical_pair
  SUBTYPE OF (low_order_kinematic_pair);
  DERIVE
    SELF\low_order_kinematic_pair.t_x : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.t_y : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.t_z : BOOLEAN := TRUE;
    SELF\low_order_kinematic_pair.r_x : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.r_y : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.r_z : BOOLEAN := TRUE;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY cylindrical_pair_value
  SUBTYPE OF (pair_value);
    SELF\pair_value.applies_to_pair : cylindrical_pair;
    actual_translation : length_measure;
    actual_rotation    : plane_angle_measure;
END_ENTITY; -- 10303-105: kinematic_state_schema

ENTITY cylindrical_pair_with_range
  SUBTYPE OF (cylindrical_pair);
    lower_limit_actual_translation : OPTIONAL length_measure;
    upper_limit_actual_translation : OPTIONAL length_measure;
    lower_limit_actual_rotation    : OPTIONAL plane_angle_measure;
    upper_limit_actual_rotation    : OPTIONAL plane_angle_measure;
  WHERE
    WR1: (NOT EXISTS(lower_limit_actual_translation) OR NOT EXISTS(
              upper_limit_actual_translation)) XOR (
              lower_limit_actual_translation < 
              upper_limit_actual_translation);
    WR2: (NOT EXISTS(lower_limit_actual_rotation) OR NOT EXISTS(
              upper_limit_actual_rotation)) XOR (
              lower_limit_actual_rotation < upper_limit_actual_rotation);
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY cylindrical_point
  SUBTYPE OF (cartesian_point);
    r     : length_measure;
    theta : plane_angle_measure;
    z     : length_measure;
  DERIVE
    SELF\cartesian_point.coordinates : LIST [3:3] OF length_measure := [ r 
                     * COS(theta), r * SIN(theta), z ];
  WHERE
    WR1: r >= 0.0;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY cylindrical_shape_representation
  SUBTYPE OF (shape_representation_with_parameters);
  WHERE
    WR1: SIZEOF(SELF.items) = 3;
    WR2: SIZEOF(QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN 
              TYPEOF(it)) AND (it.name = 'orientation'))) = 1;
    WR3: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'length'))) = 1;
    WR4: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'diameter'))) = 1;
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY cylindrical_surface
  SUBTYPE OF (elementary_surface);
    radius : positive_length_measure;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY cylindrical_volume
  SUBTYPE OF (volume);
    position : axis2_placement_3d;
    radius   : positive_length_measure;
    height   : positive_length_measure;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY cylindricity_tolerance
  SUBTYPE OF (geometric_tolerance);
  WHERE
    WR1: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE'
               IN TYPEOF(SELF));
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY data_environment;
    name        : label;
    description : text;
    elements    : SET [1:?] OF characterized_property_representation;
END_ENTITY; -- 10303-45: material_property_representation_schema

ENTITY date
  SUPERTYPE OF (ONEOF(calendar_date, ordinal_date, 
      week_of_year_and_day_date, year_month));
    year_component : year_number;
END_ENTITY; -- 10303-41: date_time_schema

ENTITY date_and_time;
    date_component : date;
    time_component : local_time;
END_ENTITY; -- 10303-41: date_time_schema

ENTITY date_and_time_assignment
  ABSTRACT SUPERTYPE;
    assigned_date_and_time : date_and_time;
    role                   : date_time_role;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY date_assignment
  ABSTRACT SUPERTYPE;
    assigned_date : date;
    role          : date_role;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY date_representation_item
  SUBTYPE OF (representation_item, date);
END_ENTITY; -- 10303-1773: basic_data_representation_mim

ENTITY date_role;
    name : label;
  DERIVE
    description : text := get_description_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: date_time_schema

ENTITY date_time_representation_item
  SUBTYPE OF (representation_item, date_and_time);
END_ENTITY; -- 10303-1773: basic_data_representation_mim

ENTITY date_time_role;
    name : label;
  DERIVE
    description : text := get_description_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: date_time_schema

ENTITY dated_effectivity
  SUBTYPE OF (effectivity);
    effectivity_end_date   : OPTIONAL date_time_or_event_occurrence;
    effectivity_start_date : OPTIONAL date_time_or_event_occurrence;
  WHERE
    WR1: EXISTS(effectivity_end_date) OR EXISTS(effectivity_start_date);
END_ENTITY; -- 10303-41: effectivity_schema

ENTITY datum
  SUBTYPE OF (shape_aspect);
    identification : identifier;
  INVERSE
    established_by_relationships : SET [1:?] OF shape_aspect_relationship 
                                      FOR related_shape_aspect;
  UNIQUE
    UR1: identification, SELF\shape_aspect.of_shape;
  WHERE
    WR1: ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMMON_DATUM' IN 
              TYPEOF(SELF)) XOR (SIZEOF(QUERY (x <* SELF\datum.
              established_by_relationships| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DATUM_FEATURE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DATUM_TARGET' ] 
              * TYPEOF(x\shape_aspect_relationship.relating_shape_aspect)) 
              = 1))) >= 1);
    WR2: SIZEOF(QUERY (x <* SELF\datum.established_by_relationships| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DATUM_FEATURE' 
              IN TYPEOF(x\shape_aspect_relationship.relating_shape_aspect))
              )) <= 1;
    WR3: SELF\shape_aspect.product_definitional = FALSE;
    WR4: SELF\shape_aspect.name = '';
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY datum_feature
  SUPERTYPE OF (ONEOF(dimensional_location_with_datum_feature, 
      dimensional_size_with_datum_feature))
  SUBTYPE OF (shape_aspect);
  INVERSE
    feature_basis_relationship : SET [1:?] OF shape_aspect_relationship FOR
                                     relating_shape_aspect;
  WHERE
    WR1: SIZEOF(QUERY (sar <* SELF\datum_feature.feature_basis_relationship
              | ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DATUM' IN 
              TYPEOF(sar\shape_aspect_relationship.related_shape_aspect))))
               = 1;
    WR2: SELF\shape_aspect.product_definitional = TRUE;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY datum_feature_callout
  SUBTYPE OF (draughting_callout);
END_ENTITY; -- 10303-506: aic_draughting_elements

ENTITY datum_reference;
    precedence       : INTEGER;
    referenced_datum : datum;
  WHERE
    WR1: precedence > 0;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY datum_reference_compartment
  SUBTYPE OF (general_datum_reference);
  INVERSE
    owner : datum_system FOR constituents;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY datum_reference_element
  SUBTYPE OF (general_datum_reference);
  DERIVE
    owner : general_datum_reference := sts_get_general_datum_reference(SELF
               );
  WHERE
    WR1: SELF <> owner;
    WR2: EXISTS(owner);
    WR3: SELF\shape_aspect.of_shape = owner\shape_aspect.of_shape;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY datum_reference_modifier_with_value;
    modifier_type  : datum_reference_modifier_type;
    modifier_value : length_measure_with_unit;
  WHERE
    WR1: modifier_value\measure_with_unit.value_component > 0.0;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY datum_system
  SUBTYPE OF (shape_aspect);
    constituents : LIST [1:3] OF UNIQUE datum_reference_compartment;
  UNIQUE
    UR1: SELF\shape_aspect.of_shape, SELF\shape_aspect.name;
  WHERE
    WR1: SELF\shape_aspect.product_definitional = FALSE;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY datum_target
  SUBTYPE OF (shape_aspect);
    target_id : identifier;
  INVERSE
    target_basis_relationship : SET [1:?] OF shape_aspect_relationship FOR 
                                   relating_shape_aspect;
  WHERE
    WR1: SIZEOF(QUERY (sar <* SELF\datum_target.target_basis_relationship| 
              ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DATUM' IN 
              TYPEOF(sar\shape_aspect_relationship.related_shape_aspect))))
               = 1;
    WR2: SELF\shape_aspect.product_definitional = TRUE;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY datum_target_callout
  SUBTYPE OF (draughting_callout);
END_ENTITY; -- 10303-506: aic_draughting_elements

ENTITY default_model_geometric_view
  SUBTYPE OF (model_geometric_view, shape_aspect);
  DERIVE
    SELF\shape_aspect.product_definitional : LOGICAL := FALSE;
  UNIQUE
    UR1: of_shape;
  WHERE
    WR1: SELF\characterized_object.name = SELF\shape_aspect.name;
    WR2: NOT EXISTS(SELF\characterized_object.description);
    WR3: NOT EXISTS(SELF\shape_aspect.description);
END_ENTITY; -- 10303-1315: mechanical_design_presentation_representation_with_draughting_mim

ENTITY default_tolerance_table
  SUBTYPE OF (representation);
  WHERE
    WR1: SIZEOF(QUERY (i <* SELF.items| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DEFAULT_TOLERANCE_TABLE_CELL'
               IN TYPEOF(i)))) = 0;
    WR2: ((SIZEOF(QUERY (rr <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_RELATIONSHIP.REP_1'
              )| (rr.name < 'general tolerance definition'))) = 0) AND (
              SIZEOF(QUERY (rr <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_RELATIONSHIP.REP_1'
              )| (rr.name = 'general tolerance definition') AND (rr.rep_2.
              name < 'default tolerance'))) = 0)) AND (SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_RELATIONSHIP.REP_2'
              )) = 0);
END_ENTITY; -- 10303-1052: default_tolerance_mim

ENTITY default_tolerance_table_cell
  SUBTYPE OF (compound_representation_item);
  WHERE
    WR1: SIZEOF(QUERY (x <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION.ITEMS'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DEFAULT_TOLERANCE_TABLE'
               IN TYPEOF(x)))) = 1;
    WR2: default_tolerance_table_cell_wr2(SELF\compound_representation_item
              .item_element);
    WR3: default_tolerance_table_cell_wr3(SELF\compound_representation_item
              .item_element);
    WR4: default_tolerance_table_cell_wr4(SELF\compound_representation_item
              .item_element);
    WR5: default_tolerance_table_cell_wr5(SELF\compound_representation_item
              .item_element);
END_ENTITY; -- 10303-1052: default_tolerance_mim

ENTITY defined_character_glyph
  SUBTYPE OF (geometric_representation_item);
    definition : defined_glyph_select;
    placement  : axis2_placement;
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY defined_function
  ABSTRACT SUPERTYPE OF (ONEOF(numeric_defined_function, 
      string_defined_function, boolean_defined_function) ANDOR 
      sql_mappable_defined_function);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY defined_symbol
  SUBTYPE OF (geometric_representation_item);
    definition : defined_symbol_select;
    target     : symbol_target;
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY definite_integral_expression
  SUBTYPE OF (quantifier_expression);
    lower_limit_neg_infinity : BOOLEAN;
    upper_limit_pos_infinity : BOOLEAN;
  DERIVE
    integrand               : generic_expression := SELF\
                                 multiple_arity_generic_expression.operands
                                 [1];
    variable_of_integration : maths_variable := SELF\
                                 multiple_arity_generic_expression.operands
                                 [2];
    SELF\quantifier_expression.variables : LIST [1:1] OF UNIQUE 
                                 generic_variable := [ 
                                 variable_of_integration ];
  WHERE
    WR1: has_values_space(integrand);
    WR2: space_is_continuum(values_space_of(integrand));
    WR3: definite_integral_expr_check(SELF\
              multiple_arity_generic_expression.operands, 
              lower_limit_neg_infinity, upper_limit_pos_infinity);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY definite_integral_function
  SUBTYPE OF (maths_function, unary_generic_expression);
    SELF\unary_generic_expression.operand : maths_function;
    variable_of_integration  : input_selector;
    lower_limit_neg_infinity : BOOLEAN;
    upper_limit_pos_infinity : BOOLEAN;
  DERIVE
    integrand : maths_function := SELF\unary_generic_expression.operand;
  WHERE
    WR1: space_is_continuum(integrand.range);
    WR2: definite_integral_check(integrand.domain, variable_of_integration,
               lower_limit_neg_infinity, upper_limit_pos_infinity);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY definitional_product_definition_usage
  SUBTYPE OF (product_definition_usage);
  UNIQUE
    UR1: relating_product_definition, related_product_definition;
END_ENTITY; -- 10303-1055: part_definition_relationship_mim

ENTITY definitional_representation
  SUBTYPE OF (representation);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PARAMETRIC_REPRESENTATION_CONTEXT'
               IN TYPEOF(SELF\representation.context_of_items);
END_ENTITY; -- 10303-43: representation_schema

ENTITY definitional_representation_relationship
  SUBTYPE OF (representation_relationship);
  WHERE
    WR1: acyclic_representation_relationship(SELF, [ SELF\
              representation_relationship.rep_2 ], 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION')
              ;
END_ENTITY; -- 10303-43: representation_schema

ENTITY definitional_representation_relationship_with_same_context
  SUBTYPE OF (definitional_representation_relationship);
  WHERE
    WR1: SELF\representation_relationship.rep_1.context_of_items :=: SELF\
              representation_relationship.rep_2.context_of_items;
END_ENTITY; -- 10303-43: representation_schema

ENTITY degenerate_pcurve
  SUBTYPE OF (point);
    basis_surface      : surface;
    reference_to_curve : definitional_representation;
  WHERE
    WR1: SIZEOF(reference_to_curve\representation.items) = 1;
    WR2: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE' IN TYPEOF(
              reference_to_curve\representation.items[1]);
    WR3: reference_to_curve\representation.items[1]\
              geometric_representation_item.dim = 2;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY degenerate_toroidal_surface
  SUBTYPE OF (toroidal_surface);
    select_outer : BOOLEAN;
  WHERE
    WR1: major_radius < minor_radius;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY dependent_variable_definition
  SUBTYPE OF (unary_generic_expression);
    name        : label;
    description : text;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY derived_shape_aspect
  SUPERTYPE OF (ONEOF(apex, centre_of_symmetry, geometric_alignment, 
      geometric_contact, geometric_intersection, parallel_offset, 
      perpendicular_to, extension, tangent))
  SUBTYPE OF (shape_aspect);
  INVERSE
    deriving_relationships : SET [1:?] OF 
                                shape_aspect_deriving_relationship FOR 
                                relating_shape_aspect;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY derived_unit
  SUPERTYPE OF (ONEOF(absorbed_dose_unit, acceleration_unit, 
      radioactivity_unit, area_unit, capacitance_unit, dose_equivalent_unit
      , electric_charge_unit, conductance_unit, electric_potential_unit, 
      energy_unit, magnetic_flux_density_unit, force_unit, frequency_unit, 
      illuminance_unit, inductance_unit, magnetic_flux_unit, power_unit, 
      pressure_unit, resistance_unit, velocity_unit, volume_unit));
    elements : SET [1:?] OF derived_unit_element;
  DERIVE
    name : label := get_name_value(SELF);
  WHERE
    WR1: (SIZEOF(elements) > 1) OR (SIZEOF(elements) = 1) AND (elements[1].
              exponent <> 1.0);
    WR2: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NAME_ATTRIBUTE.NAMED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: measure_schema

ENTITY derived_unit_element;
    unit     : named_unit;
    exponent : REAL;
END_ENTITY; -- 10303-41: measure_schema

ENTITY description_attribute;
    attribute_value : text;
    described_item  : description_attribute_select;
END_ENTITY; -- 10303-41: basic_attribute_schema

ENTITY descriptive_representation_item
  SUPERTYPE OF (ONEOF(tagged_text_item, uniform_resource_identifier))
  SUBTYPE OF (representation_item);
    description : text;
END_ENTITY; -- 10303-45: qualified_measure_schema

ENTITY diameter_dimension
  SUBTYPE OF (dimension_curve_directed_callout);
END_ENTITY; -- 10303-506: aic_draughting_elements

ENTITY dielectric_constant_measure_with_unit
  SUBTYPE OF (ratio_measure_with_unit);
END_ENTITY; -- 10303-1753: value_with_unit_extension_mim

ENTITY dimension_callout
  SUBTYPE OF (draughting_callout);
  WHERE
    WR1: (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LEADER_DIRECTED_CALLOUT'
               IN TYPEOF(SELF)) XOR (SIZEOF(QUERY (dce_1 <* SELF\
              draughting_callout.contents| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LEADER_CURVE' IN
               TYPEOF(dce_1)))) = 0);
    WR2: (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROJECTION_DIRECTED_CALLOUT'
               IN TYPEOF(SELF)) XOR (SIZEOF(QUERY (dce_1 <* SELF\
              draughting_callout.contents| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROJECTION_CURVE'
               IN TYPEOF(dce_1)))) = 0);
    WR3: (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CURVE_DIRECTED_CALLOUT'
               IN TYPEOF(SELF)) XOR (SIZEOF(QUERY (dce_1 <* SELF\
              draughting_callout.contents| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CURVE'
               IN TYPEOF(dce_1)))) = 0);
END_ENTITY; -- 10303-101: draughting_dimension_schema

ENTITY dimension_callout_component_relationship
  SUBTYPE OF (draughting_callout_relationship);
  WHERE
    WR1: SELF.name IN [ 'prefix', 'suffix' ];
    WR2: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STRUCTURED_DIMENSION_CALLOUT'
               IN TYPEOF(SELF.relating_draughting_callout);
    WR3: SIZEOF(TYPEOF(SELF.related_draughting_callout) * [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LEADER_DIRECTED_CALLOUT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROJECTION_DIRECTED_CALLOUT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CURVE_DIRECTED_CALLOUT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STRUCTURED_DIMENSION_CALLOUT'
               ]) = 0;
    WR4: SELF.related_draughting_callout.contents * SELF.
              relating_draughting_callout.contents = SELF.
              related_draughting_callout.contents;
    WR5: (SELF.name = 'prefix') AND (SIZEOF(QUERY (ato <* QUERY (con <* 
              SELF.related_draughting_callout.contents| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT_OCCURRENCE'
               IN TYPEOF(con)))| NOT (ato.name = 'prefix text'))) = 0);
    WR6: (SELF.name = 'suffix') AND (SIZEOF(QUERY (ato <* QUERY (con <* 
              SELF.related_draughting_callout.contents| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT_OCCURRENCE'
               IN TYPEOF(con)))| NOT (ato.name = 'suffix text'))) = 0);
END_ENTITY; -- 10303-506: aic_draughting_elements

ENTITY dimension_callout_relationship
  SUBTYPE OF (draughting_callout_relationship);
  WHERE
    WR1: SELF.name IN [ 'primary', 'secondary' ];
    WR2: SIZEOF(TYPEOF(SELF.relating_draughting_callout) * [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANGULAR_DIMENSION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_DIMENSION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIAMETER_DIMENSION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LEADER_DIRECTED_DIMENSION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINEAR_DIMENSION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORDINATE_DIMENSION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RADIUS_DIMENSION'
               ]) >= 1;
    WR3: SIZEOF(TYPEOF(SELF.related_draughting_callout) * [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CURVE_DIRECTED_CALLOUT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROJECTION_DIRECTED_CALLOUT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LEADER_DIRECTED_CALLOUT'
               ]) = 0;
    WR4: SELF.related_draughting_callout.contents * SELF.
              relating_draughting_callout.contents = SELF.
              related_draughting_callout.contents;
END_ENTITY; -- 10303-506: aic_draughting_elements

ENTITY dimension_curve
  SUBTYPE OF (annotation_curve_occurrence);
  WHERE
    WR1: SIZEOF(QUERY (dct <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TERMINATOR_SYMBOL.ANNOTATED_CURVE'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CURVE_TERMINATOR'
               IN TYPEOF(dct)))) <= 2;
    WR2: SIZEOF(QUERY (dcdc <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_CALLOUT.CONTENTS'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CURVE_DIRECTED_CALLOUT'
               IN TYPEOF(dcdc)))) >= 1;
    WR3: (SIZEOF(QUERY (dct1 <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TERMINATOR_SYMBOL.ANNOTATED_CURVE'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CURVE_TERMINATOR'
               IN TYPEOF(dct1)) AND (dct1\dimension_curve_terminator.role =
               dimension_extent_usage.origin))) <= 1) AND (SIZEOF(QUERY (
              dct2 <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TERMINATOR_SYMBOL.ANNOTATED_CURVE'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CURVE_TERMINATOR'
               IN TYPEOF(dct2)) AND (dct2\dimension_curve_terminator.role =
               dimension_extent_usage.target))) <= 1);
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY dimension_curve_directed_callout
  SUBTYPE OF (draughting_callout);
  WHERE
    WR1: SIZEOF(QUERY (d_c <* SELF\draughting_callout.contents| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CURVE'
               IN TYPEOF(d_c)))) <= 2;
    WR2: SIZEOF(SELF\draughting_callout.contents) >= 2;
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY dimension_curve_terminator
  SUBTYPE OF (terminator_symbol);
    role : dimension_extent_usage;
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CURVE' IN 
              TYPEOF(SELF\terminator_symbol.annotated_curve);
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY dimension_curve_terminator_to_projection_curve_associativity
  SUBTYPE OF (annotation_occurrence_associativity);
    SELF\annotation_occurrence_relationship.relating_annotation_occurrence 
                                        : dimension_curve_terminator;
    SELF\annotation_occurrence_relationship.related_annotation_occurrence :
                                         projection_curve;
END_ENTITY; -- 10303-1362: dimension_and_tolerance_callouts_mim

ENTITY dimension_pair
  SUBTYPE OF (draughting_callout_relationship);
  WHERE
    WR1: SELF.name IN [ 'chained', 'parallel' ];
    WR2: SIZEOF(TYPEOF(SELF.relating_draughting_callout) * [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANGULAR_DIMENSION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_DIMENSION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIAMETER_DIMENSION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINEAR_DIMENSION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORDINATE_DIMENSION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RADIUS_DIMENSION'
               ]) = 1;
    WR3: SIZEOF(TYPEOF(SELF.related_draughting_callout) * [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANGULAR_DIMENSION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_DIMENSION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIAMETER_DIMENSION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINEAR_DIMENSION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORDINATE_DIMENSION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RADIUS_DIMENSION'
               ]) = 1;
END_ENTITY; -- 10303-506: aic_draughting_elements

ENTITY dimension_related_tolerance_zone_element;
    related_dimension : dimensional_location;
    related_element   : tolerance_zone_definition;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY dimension_text_associativity
  SUBTYPE OF (text_literal, mapped_item);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DIMENSION_REPRESENTATION'
               IN TYPEOF(SELF\mapped_item.mapping_source.
              mapped_representation);
    WR2: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_CALLOUT' 
              IN TYPEOF(SELF\mapped_item.mapping_target);
    WR3: SIZEOF(QUERY (ato <* QUERY (si <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM.ITEM'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT_OCCURRENCE'
               IN TYPEOF(si)))| NOT (SIZEOF(QUERY (dc <* USEDIN(ato, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_CALLOUT.CONTENTS'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_CALLOUT'
               IN TYPEOF(dc))) * [ SELF\mapped_item.mapping_target ]) = 1))
              ) = 0;
END_ENTITY; -- 10303-520: aic_associative_draughting_elements

ENTITY dimensional_characteristic_representation;
    dimension      : dimensional_characteristic;
    representation : shape_dimension_representation;
END_ENTITY; -- 10303-47: shape_dimension_schema

ENTITY dimensional_exponents;
    length_exponent                    : REAL;
    mass_exponent                      : REAL;
    time_exponent                      : REAL;
    electric_current_exponent          : REAL;
    thermodynamic_temperature_exponent : REAL;
    amount_of_substance_exponent       : REAL;
    luminous_intensity_exponent        : REAL;
END_ENTITY; -- 10303-41: measure_schema

ENTITY dimensional_location
  SUPERTYPE OF (ONEOF(angular_location, dimensional_location_with_path))
  SUBTYPE OF (shape_aspect_relationship);
  WHERE
    WR1: SELF\shape_aspect_relationship.relating_shape_aspect :<>: SELF\
              shape_aspect_relationship.related_shape_aspect;
    WR2: SELF\shape_aspect_relationship.relating_shape_aspect.of_shape :=: 
              SELF\shape_aspect_relationship.related_shape_aspect.of_shape;
END_ENTITY; -- 10303-47: shape_dimension_schema

ENTITY dimensional_location_with_datum_feature
  SUBTYPE OF (datum_feature, dimensional_location);
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY dimensional_location_with_path
  SUBTYPE OF (dimensional_location);
    path : shape_aspect;
END_ENTITY; -- 10303-47: shape_dimension_schema

ENTITY dimensional_size
  SUPERTYPE OF (ONEOF(angular_size, dimensional_size_with_path));
    applies_to : shape_aspect;
    name       : label;
  DERIVE
    id : identifier := get_id_value(SELF);
  UNIQUE
    UR1: id, applies_to;
  WHERE
    WR1: applies_to.product_definitional = TRUE;
    WR2: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ID_ATTRIBUTE.IDENTIFIED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-47: shape_dimension_schema

ENTITY dimensional_size_with_datum_feature
  SUBTYPE OF (datum_feature, dimensional_size);
  WHERE
    WR1: SELF\dimensional_size.applies_to :=: SELF;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY dimensional_size_with_path
  SUBTYPE OF (dimensional_size);
    path : shape_aspect;
END_ENTITY; -- 10303-47: shape_dimension_schema

ENTITY directed_action
  SUBTYPE OF (executed_action);
    directive : action_directive;
END_ENTITY; -- 10303-41: action_schema

ENTITY directed_action_assignment
  ABSTRACT SUPERTYPE;
    assigned_directed_action : directed_action;
  DERIVE
    role : object_role := get_role(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROLE_ASSOCIATION.ITEM_WITH_ROLE'
              )) <= 1;
END_ENTITY; -- 10303-41: action_schema

ENTITY directed_dimensional_location
  SUBTYPE OF (dimensional_location);
END_ENTITY; -- 10303-47: shape_dimension_schema

ENTITY directed_tolerance_zone
  SUBTYPE OF (tolerance_zone_with_datum);
    direction : directed_tolerance_zone_type;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY direction
  SUBTYPE OF (geometric_representation_item);
    direction_ratios : LIST [2:3] OF REAL;
  WHERE
    WR1: SIZEOF(QUERY (tmp <* direction_ratios| (tmp <> 0.0))) > 0;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY direction_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(SELF.items) = 1;
    WR2: SIZEOF(QUERY (it <* SELF.items| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' IN 
              TYPEOF(it)))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY div_expression
  SUBTYPE OF (binary_numeric_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY document;
    id          : identifier;
    name        : label;
    description : OPTIONAL text;
    kind        : document_type;
  INVERSE
    representation_types : SET [0:?] OF document_representation_type FOR 
                              represented_document;
END_ENTITY; -- 10303-41: document_schema

ENTITY document_file
  SUBTYPE OF (document, characterized_object);
  WHERE
    WR1: SELF\characterized_object.name = '';
    WR2: NOT EXISTS(SELF\characterized_object.description);
    WR3: SIZEOF(QUERY (drt <* SELF\document.representation_types| (drt.name
               IN [ 'digital', 'physical' ]))) = 1;
END_ENTITY; -- 10303-1127: file_identification_mim

ENTITY document_identifier
  SUBTYPE OF (group);
  UNIQUE
    UR1: SELF\group.name, SELF\group.description;
END_ENTITY; -- 10303-1747: specification_document_mim

ENTITY document_identifier_assignment
  SUBTYPE OF (group_assignment);
    SELF\group_assignment.assigned_group : document_identifier;
    items          : SET [1:?] OF document_identifier_assigned_item;
END_ENTITY; -- 10303-1747: specification_document_mim

ENTITY document_product_association
  ABSTRACT SUPERTYPE;
    name              : label;
    description       : OPTIONAL text;
    relating_document : document;
    related_product   : product_or_formation_or_definition;
END_ENTITY; -- 10303-41: document_schema

ENTITY document_product_equivalence
  SUBTYPE OF (document_product_association);
  WHERE
    WR1: SELF\document_product_association.name = 'equivalence';
    WR2: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT' IN 
              TYPEOF(SELF\document_product_association.related_product)) OR
               (SELF\document_product_association.relating_document.kind.
              product_data_type = 'configuration controlled document') AND 
              (SIZEOF(QUERY (prpc <* USEDIN(SELF\
              document_product_association.related_product, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
              )| (prpc.name = 'document'))) = 1);
    WR3: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_FORMATION'
               IN TYPEOF(SELF.related_product)) OR (SELF\
              document_product_association.relating_document.kind.
              product_data_type = 
              'configuration controlled document version') AND (SIZEOF(
              QUERY (prpc <* USEDIN(SELF.related_product\
              product_definition_formation.of_product, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
              )| (prpc.name = 'document'))) = 1);
    WR4: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION'
               IN TYPEOF(SELF.related_product)) OR (SELF\
              document_product_association.relating_document.kind.
              product_data_type = 
              'configuration controlled document definition') AND (SIZEOF(
              QUERY (prpc <* USEDIN(SELF\document_product_association.
              related_product\product_definition.formation.of_product, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
              )| (prpc.name = 'document'))) = 1);
END_ENTITY; -- 10303-1122: document_assignment_mim

ENTITY document_reference
  ABSTRACT SUPERTYPE;
    assigned_document : document;
    source            : label;
  DERIVE
    role : object_role := get_role(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROLE_ASSOCIATION.ITEM_WITH_ROLE'
              )) <= 1;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY document_relationship;
    name              : label;
    description       : OPTIONAL text;
    relating_document : document;
    related_document  : document;
END_ENTITY; -- 10303-41: document_schema

ENTITY document_representation_type;
    name                 : label;
    represented_document : document;
END_ENTITY; -- 10303-41: document_schema

ENTITY document_type;
    product_data_type : label;
END_ENTITY; -- 10303-41: document_schema

ENTITY document_usage_constraint;
    source                : document;
    subject_element       : label;
    subject_element_value : text;
END_ENTITY; -- 10303-41: document_schema

ENTITY document_usage_constraint_assignment
  ABSTRACT SUPERTYPE;
    assigned_document_usage : document_usage_constraint;
    role                    : document_usage_role;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY document_usage_role;
    name        : label;
    description : OPTIONAL text;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY dose_equivalent_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DOSE_EQUIVALENT_UNIT'
               IN TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY dose_equivalent_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensions_for_si_unit(
              si_unit_name.sievert);
END_ENTITY; -- 10303-41: measure_schema

ENTITY draughting_annotation_occurrence
  SUBTYPE OF (annotation_occurrence);
  WHERE
    WR1: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_CURVE_OCCURRENCE'
               IN TYPEOF(SELF)) OR (SIZEOF(QUERY (sty <* SELF.styles| NOT (
              (SIZEOF(sty.styles) = 1) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE' IN 
              TYPEOF(sty.styles[1]))))) = 0);
    WR2: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_FILL_AREA_OCCURRENCE'
               IN TYPEOF(SELF)) OR (SIZEOF(QUERY (sty <* SELF.styles| NOT (
              (SIZEOF(sty.styles) = 1) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FILL_AREA_STYLE'
               IN TYPEOF(sty.styles[1]))))) = 0);
    WR3: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_FILL_AREA_OCCURRENCE'
               IN TYPEOF(SELF)) OR (SIZEOF(QUERY (bound <* SELF.item\
              annotation_fill_area.boundaries| NOT (SIZEOF(QUERY (si <* 
              USEDIN(bound, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM.ITEM'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_CURVE_OCCURRENCE'
               IN TYPEOF(si)))) > 0))) = 0);
    WR4: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_SYMBOL_OCCURRENCE'
               IN TYPEOF(SELF)) OR (SIZEOF(QUERY (sty <* SELF.styles| NOT (
              (SIZEOF(sty.styles) = 1) AND (SIZEOF(TYPEOF(sty.styles[1]) * 
              [ 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SYMBOL_STYLE',
               'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NULL_STYLE' ]) 
              = 1)))) = 0);
    WR5: NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_SYMBOL_OCCURRENCE'
               IN TYPEOF(SELF)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_SYMBOL'
               IN TYPEOF(SELF.item))) OR (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_SYMBOL_REPRESENTATION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_SUBFIGURE_REPRESENTATION'
               ] * TYPEOF(SELF.item\mapped_item.mapping_source.
              mapped_representation)) = 1);
    WR6: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT_OCCURRENCE'
               IN TYPEOF(SELF)) OR (SIZEOF(QUERY (sty <* SELF.styles| NOT (
              (SIZEOF(sty.styles) = 1) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEXT_STYLE' IN 
              TYPEOF(sty.styles[1]))))) = 0);
    WR7: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT_OCCURRENCE'
               IN TYPEOF(SELF)) OR (SIZEOF(TYPEOF(SELF.item) * [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_TEXT',
               'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEXT_LITERAL' ]
              ) = 1);
    WR8: NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT_OCCURRENCE'
               IN TYPEOF(SELF)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_TEXT' 
              IN TYPEOF(SELF.item))) OR (SIZEOF(QUERY (tl <* SELF.item\
              composite_text.collected_text| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEXT_LITERAL' IN
               TYPEOF(tl)))) = 0);
    WR9: NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT_OCCURRENCE'
               IN TYPEOF(SELF)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEXT_LITERAL' IN
               TYPEOF(SELF.item))) OR (SELF.item\text_literal.alignment IN 
              [ 'baseline left', 'baseline centre', 'baseline right' ]);
    WR10: NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT_OCCURRENCE'
               IN TYPEOF(SELF)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_TEXT' 
              IN TYPEOF(SELF.item))) OR (SIZEOF(QUERY (tl <* QUERY (text <*
               SELF.item\composite_text.collected_text| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEXT_LITERAL' IN
               TYPEOF(text)))| NOT (tl\text_literal.alignment IN [ 
              'baseline left', 'baseline centre', 'baseline right' ]))) = 0
              );
    WR11: NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT_OCCURRENCE'
               IN TYPEOF(SELF)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_TEXT' 
              IN TYPEOF(SELF.item))) OR check_text_alignment(SELF.item);
    WR12: NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT_OCCURRENCE'
               IN TYPEOF(SELF)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_TEXT' 
              IN TYPEOF(SELF.item))) OR check_text_font(SELF.item);
    WR13: NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT_OCCURRENCE'
               IN TYPEOF(SELF)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_TEXT' 
              IN TYPEOF(SELF.item))) OR (SIZEOF(QUERY (tl <* QUERY (text <*
               SELF.item\composite_text.collected_text| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEXT_LITERAL' IN
               TYPEOF(text)))| NOT (SIZEOF(TYPEOF(tl) * [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEXT_LITERAL_WITH_BLANKING_BOX'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEXT_LITERAL_WITH_ASSOCIATED_CURVES'
               ]) = 0))) = 0);
    WR14: NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT_OCCURRENCE'
               IN TYPEOF(SELF)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEXT_LITERAL_WITH_ASSOCIATED_CURVES'
               IN TYPEOF(SELF.item))) OR (SIZEOF(QUERY (crv <* SELF.item\
              text_literal_with_associated_curves.associated_curves| NOT (
              SIZEOF(QUERY (si <* USEDIN(crv, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM.ITEM'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_CURVE_OCCURRENCE'
               IN TYPEOF(si)))) > 0))) = 0);
    WR15: NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT_OCCURRENCE'
               IN TYPEOF(SELF)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_TEXT_WITH_ASSOCIATED_CURVES'
               IN TYPEOF(SELF.item))) OR (SIZEOF(QUERY (crv <* SELF.item\
              composite_text_with_associated_curves.associated_curves| NOT 
              (SIZEOF(QUERY (si <* USEDIN(crv, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM.ITEM'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_CURVE_OCCURRENCE'
               IN TYPEOF(si)))) > 0))) = 0);
    WR16: SIZEOF(QUERY (cs <* QUERY (sty <* SELF.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE' IN 
              TYPEOF(sty.styles[1])))| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(cs.styles[1]\curve_style.curve_width)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITIVE_LENGTH_MEASURE'
               IN TYPEOF(cs.styles[1]\curve_style.curve_width\
              measure_with_unit.value_component))))) = 0;
    WR17: SIZEOF(QUERY (fas <* QUERY (sty <* SELF.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FILL_AREA_STYLE'
               IN TYPEOF(sty.styles[1])))| NOT ((SIZEOF(QUERY (fs <* fas.
              styles[1]\fill_area_style.fill_styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FILL_AREA_STYLE_TILES'
               IN TYPEOF(fs)))) <= 1) AND (SIZEOF(QUERY (fst <* QUERY (fs 
              <* fas.styles[1]\fill_area_style.fill_styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FILL_AREA_STYLE_TILES'
               IN TYPEOF(fs)))| NOT (SIZEOF(fst\fill_area_style_tiles.tiles
              ) = 1))) = 0)))) = 0;
    WR18: SIZEOF(QUERY (fas <* QUERY (sty <* SELF.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FILL_AREA_STYLE'
               IN TYPEOF(sty.styles[1])))| NOT (SIZEOF(QUERY (fsh <* QUERY 
              (fs <* fas.styles[1]\fill_area_style.fill_styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FILL_AREA_STYLE_HATCHING'
               IN TYPEOF(fs)))| NOT (fsh\fill_area_style_hatching.
              point_of_reference_hatch_line :=: fsh\
              fill_area_style_hatching.pattern_start))) = 0))) = 0;
    WR19: SIZEOF(QUERY (ts <* QUERY (sty <* SELF.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEXT_STYLE' IN 
              TYPEOF(sty.styles[1])))| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEXT_STYLE_WITH_BOX_CHARACTERISTICS'
               IN TYPEOF(ts.styles[1])))) = 0;
    WR20: SIZEOF(QUERY (ts <* QUERY (sty <* SELF.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEXT_STYLE_WITH_BOX_CHARACTERISTICS'
               IN TYPEOF(sty.styles[1])))| NOT (SIZEOF(ts.styles[1]\
              text_style_with_box_characteristics.characteristics) = 4))) =
               0;
END_ENTITY; -- 10303-504: aic_draughting_annotation

ENTITY draughting_callout
  SUBTYPE OF (geometric_representation_item);
    contents : SET [1:?] OF draughting_callout_element;
  WHERE
    WR1: (((SIZEOF(QUERY (l_1 <* SELF\draughting_callout.contents| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LEADER_CURVE' IN
               TYPEOF(l_1)))) = 0) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LEADER_DIRECTED_CALLOUT'
               IN TYPEOF(SELF)) AND (SIZEOF(QUERY (l_1 <* SELF\
              draughting_callout.contents| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROJECTION_CURVE'
               IN TYPEOF(l_1)))) = 0)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROJECTION_DIRECTED_CALLOUT'
               IN TYPEOF(SELF)) AND (SIZEOF(QUERY (l_1 <* SELF\
              draughting_callout.contents| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CURVE'
               IN TYPEOF(l_1)))) = 0)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CURVE_DIRECTED_CALLOUT'
               IN TYPEOF(SELF));
    WR2: SIZEOF(QUERY (apo <* contents| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_PLACEHOLDER_OCCURRENCE'
               IN TYPEOF(apo)))) < 2;
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY draughting_callout_relationship;
    name                        : label;
    description                 : text;
    relating_draughting_callout : draughting_callout;
    related_draughting_callout  : draughting_callout;
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY draughting_elements
  SUBTYPE OF (draughting_callout);
  WHERE
    WR1: SIZEOF(QUERY (l_c <* QUERY (con <* SELF.contents| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LEADER_CURVE' IN
               TYPEOF(con)))| NOT (SIZEOF(QUERY (ldc <* USEDIN(l_c, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_CALLOUT.CONTENTS'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LEADER_DIRECTED_CALLOUT'
               IN TYPEOF(ldc)))) <= 1))) = 0;
    WR2: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CURVE_DIRECTED_CALLOUT'
               IN TYPEOF(SELF)) OR (SIZEOF(QUERY (con <* SELF.contents| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROJECTION_CURVE'
               IN TYPEOF(con)))) <= 2);
    WR3: SIZEOF(QUERY (rc <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_CALLOUT_RELATIONSHIP.RELATING_DRAUGHTING_CALLOUT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CALLOUT_RELATIONSHIP'
               IN TYPEOF(rc)) AND (rc.name = 'primary'))) <= 1;
    WR4: SIZEOF(QUERY (rc <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_CALLOUT_RELATIONSHIP.RELATING_DRAUGHTING_CALLOUT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CALLOUT_RELATIONSHIP'
               IN TYPEOF(rc)) AND (rc.name = 'secondary'))) <= 1;
    WR5: SIZEOF(QUERY (sec <* QUERY (rc <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_CALLOUT_RELATIONSHIP.RELATING_DRAUGHTING_CALLOUT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CALLOUT_RELATIONSHIP'
               IN TYPEOF(rc)) AND (rc.name = 'secondary'))| NOT (SIZEOF(
              QUERY (prim <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_CALLOUT_RELATIONSHIP.RELATING_DRAUGHTING_CALLOUT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CALLOUT_RELATIONSHIP'
               IN TYPEOF(prim)) AND (prim.name = 'primary'))) = 1))) = 0;
END_ENTITY; -- 10303-506: aic_draughting_elements

ENTITY draughting_model
  SUBTYPE OF (representation);
    SELF\representation.items : SET [1:?] OF draughting_model_item_select;
  UNIQUE
    UR1: SELF\representation.name;
  WHERE
    WR1: SIZEOF(QUERY (mi <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_MODEL'
               ] * TYPEOF(mi\mapped_item.mapping_source.
              mapped_representation)) = 1))) = 0;
    WR2: SIZEOF(QUERY (smi <* QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(si\styled_item.item)))| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION'
               IN TYPEOF(smi\styled_item.item\mapped_item.mapping_source.
              mapped_representation)) AND (SIZEOF(QUERY (sty <* smi\
              styled_item.styles| NOT (SIZEOF(QUERY (psa <* sty.styles| NOT
               ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE' 
              IN TYPEOF(psa)))) = 1))) = 1)))) = 0;
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY draughting_model_item_association
  SUBTYPE OF (item_identified_representation_usage);
    SELF\item_identified_representation_usage.definition : 
                             draughting_model_item_definition;
    SELF\item_identified_representation_usage.used_representation : 
                             annotation_representation_select;
    SELF\item_identified_representation_usage.identified_item : 
                             draughting_model_item_association_select;
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY draughting_model_item_association_with_placeholder
  SUBTYPE OF (draughting_model_item_association);
    SELF\draughting_model_item_association.used_representation : 
                                draughting_model;
    SELF\item_identified_representation_usage.identified_item : 
                                draughting_callout;
    annotation_placeholder : annotation_placeholder_occurrence;
END_ENTITY; -- 10303-113: mechanical_design_schema

ENTITY draughting_pre_defined_colour
  SUBTYPE OF (pre_defined_colour);
  WHERE
    WR1: SELF\pre_defined_item.name IN [ 'red', 'green', 'blue', 'yellow', 
              'magenta', 'cyan', 'black', 'white' ];
END_ENTITY; -- 10303-46: presentation_resource_schema

ENTITY draughting_pre_defined_curve_font
  SUBTYPE OF (pre_defined_curve_font);
  WHERE
    WR1: SELF\pre_defined_item.name IN [ 'continuous', 'chain', 
              'chain double dash', 'dashed', 'dotted' ];
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY draughting_pre_defined_text_font
  SUBTYPE OF (pre_defined_text_font);
  WHERE
    WR1: SELF\pre_defined_item.name[ 1 : 8 ] = 'ISO 3098';
END_ENTITY; -- 10303-46: presentation_resource_schema

ENTITY draughting_subfigure_representation
  SUBTYPE OF (symbol_representation);
    SELF\representation.items : SET [1:?] OF 
               draughting_subfigure_representation_item;
  WHERE
    WR1: SIZEOF(QUERY (item <* SELF\representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_OCCURRENCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_CALLOUT'
               ] * TYPEOF(item)) = 1))) >= 1;
    WR2: SIZEOF(QUERY (srm <* QUERY (rm <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_MAP.MAPPED_REPRESENTATION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SYMBOL_REPRESENTATION_MAP'
               IN TYPEOF(rm)))| NOT (SIZEOF(QUERY (a_s <* QUERY (mi <* srm.
              map_usage| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_SYMBOL'
               IN TYPEOF(mi)))| NOT (SIZEOF(QUERY (aso <* USEDIN(a_s, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM.ITEM'
              )| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_SUBFIGURE_OCCURRENCE'
               IN TYPEOF(aso)))) = 0))) = 0))) > 0;
    WR3: SIZEOF(SELF.context_of_items.representations_in_context) = 1;
END_ENTITY; -- 10303-504: aic_draughting_annotation

ENTITY draughting_symbol_representation
  SUBTYPE OF (symbol_representation);
    SELF\representation.items : SET [1:?] OF 
               draughting_symbol_representation_item;
  UNIQUE
    UR1: SELF\representation.name;
  WHERE
    WR1: SIZEOF(QUERY (item <* SELF\representation.items| (SIZEOF(TYPEOF(
              item) * [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_CURVE_OCCURRENCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_SYMBOL_OCCURRENCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_FILL_AREA_OCCURRENCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT_OCCURRENCE'
               ]) = 1))) >= 1;
    WR2: SIZEOF(QUERY (item <* SELF\representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_SUBFIGURE_OCCURRENCE'
               IN TYPEOF(item)))) = 0;
    WR3: SIZEOF(QUERY (rm <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_MAP.MAPPED_REPRESENTATION'
              )| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SYMBOL_REPRESENTATION_MAP'
               IN TYPEOF(rm)))) = 0;
    WR4: SIZEOF(SELF.context_of_items.representations_in_context) = 1;
END_ENTITY; -- 10303-504: aic_draughting_annotation

ENTITY draughting_text_literal_with_delineation
  SUBTYPE OF (text_literal_with_delineation);
  WHERE
    WR1: SELF.delineation IN [ 'underline', 'overline' ];
END_ENTITY; -- 10303-504: aic_draughting_annotation

ENTITY drilling_operation
  SUBTYPE OF (drilling_type_operation);
  WHERE
    WR1: SELF.description IN [ 'drilling', 'counter sinking', 
              'center drilling', 'multistep drilling' ];
    WR2: NOT (SELF.description = 'multistep drilling') OR (((((((
              verify_required_action_property(SELF, 'retract distance') AND
               verify_length_measure_action_property(SELF, 
              'retract distance')) AND verify_required_action_property(SELF
              , 'first depth')) AND verify_length_measure_action_property(
              SELF, 'first depth')) AND verify_required_action_property(
              SELF, 'depth of step')) AND 
              verify_length_measure_action_property(SELF, 'depth of step'))
               AND verify_optional_action_property(SELF, 'dwell time step')
              ) AND verify_rep_type_for_action_property(SELF, 
              'dwell time step', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_DWELL_TIME_REPRESENTATION'
               ])) AND verify_rep_name_for_action_property(SELF, 
              'dwell time step', [ 'dwell time' ]);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY drilling_type_operation
  SUBTYPE OF (machining_operation);
  WHERE
    WR1: verify_optional_action_property(SELF, 'overcut length') AND 
              verify_length_measure_action_property(SELF, 'overcut length')
              ;
    WR2: verify_optional_action_property(SELF, 'cutting depth') AND 
              verify_length_measure_action_property(SELF, 'cutting depth');
    WR3: verify_optional_action_property(SELF, 'previous diameter') AND 
              verify_length_measure_action_property(SELF, 
              'previous diameter');
    WR4: (verify_optional_action_property(SELF, 'dwell time bottom') AND 
              verify_rep_type_for_action_property(SELF, 'dwell time bottom'
              , [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_DWELL_TIME_REPRESENTATION'
               ])) AND verify_rep_name_for_action_property(SELF, 
              'dwell time bottom', [ 'dwell time' ]);
    WR5: (verify_optional_action_property(SELF, 'feedrate on retract') AND 
              verify_rep_type_for_action_property(SELF, 
              'feedrate on retract', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'
               ])) AND verify_rep_name_for_action_property(SELF, 
              'feedrate on retract', [ 'relative speed' ]);
    WR6: verify_optional_relating_amr_with_name(SELF, 'machining', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'
               ]) AND verify_related_type_for_amr_with_name(SELF, 
              'machining', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRILLING_TYPE_STRATEGY'
               ]);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY drilling_type_strategy
  SUBTYPE OF (machining_strategy);
  WHERE
    WR1: (verify_optional_action_property(SELF, 'reduced cut at start') AND
               verify_rep_type_for_action_property(SELF, 
              'reduced cut at start', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_SPINDLE_SPEED_REPRESENTATION'
               ])) AND verify_rep_name_for_action_property(SELF, 
              'reduced cut at start', [ 'relative speed' ]);
    WR2: (verify_optional_action_property(SELF, 'reduced feedrate at start'
              ) AND verify_rep_type_for_action_property(SELF, 
              'reduced feedrate at start', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'
               ])) AND verify_rep_name_for_action_property(SELF, 
              'reduced feedrate at start', [ 'relative speed' ]);
    WR3: verify_optional_action_property(SELF, 'depth of start') AND 
              verify_length_measure_action_property(SELF, 'depth of start')
              ;
    WR4: (verify_optional_action_property(SELF, 'reduced cut at end') AND 
              verify_rep_type_for_action_property(SELF, 
              'reduced cut at end', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_SPINDLE_SPEED_REPRESENTATION'
               ])) AND verify_rep_name_for_action_property(SELF, 
              'reduced cut at end', [ 'relative speed' ]);
    WR5: (verify_optional_action_property(SELF, 'reduced feedrate at end') 
              AND verify_rep_type_for_action_property(SELF, 
              'reduced feedrate at end', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'
               ])) AND verify_rep_name_for_action_property(SELF, 
              'reduced feedrate at end', [ 'relative speed' ]);
    WR6: verify_optional_action_property(SELF, 'depth of end') AND 
              verify_length_measure_action_property(SELF, 'depth of end');
    WR7: verify_required_action_property(SELF, 'depth of start') OR (0 = 
              SIZEOF(get_action_property(SELF, 'reduced cut at start'))) 
              AND (0 = SIZEOF(get_action_property(SELF, 
              'reduced feedrate at start')));
    WR8: verify_required_action_property(SELF, 'depth of end') OR (0 = 
              SIZEOF(get_action_property(SELF, 'reduced cut at end'))) AND 
              (0 = SIZEOF(get_action_property(SELF, 
              'reduced feedrate at end')));
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY dupin_cyclide_surface
  SUBTYPE OF (elementary_surface);
    generalised_major_radius : positive_length_measure;
    generalised_minor_radius : positive_length_measure;
    skewness                 : length_measure;
  WHERE
    WR1: skewness >= 0.0;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY eccentric_cone
  SUBTYPE OF (geometric_representation_item);
    position    : axis2_placement_3d;
    semi_axis_1 : positive_length_measure;
    semi_axis_2 : positive_length_measure;
    height      : positive_length_measure;
    x_offset    : length_measure;
    y_offset    : length_measure;
    ratio       : REAL;
  WHERE
    WR1: ratio >= 0.0;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY eccentric_conical_volume
  SUBTYPE OF (volume);
    position    : axis2_placement_3d;
    semi_axis_1 : positive_length_measure;
    semi_axis_2 : positive_length_measure;
    height      : positive_length_measure;
    x_offset    : length_measure;
    y_offset    : length_measure;
    ratio       : REAL;
  WHERE
    WR1: ratio >= 0.0;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY edge
  SUPERTYPE OF (ONEOF(edge_curve, oriented_edge, subedge))
  SUBTYPE OF (topological_representation_item);
    edge_start : vertex;
    edge_end   : vertex;
END_ENTITY; -- 10303-42: topology_schema

ENTITY edge_based_wireframe_model
  SUBTYPE OF (geometric_representation_item);
    ebwm_boundary : SET [1:?] OF connected_edge_set;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY edge_based_wireframe_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(QUERY (it <* SELF.items| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_BASED_WIREFRAME_MODEL'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               ] * TYPEOF(it)) = 1))) = 0;
    WR2: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_BASED_WIREFRAME_MODEL'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' ]
               * TYPEOF(it)) = 1))) >= 1;
    WR3: SIZEOF(QUERY (ebwm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_BASED_WIREFRAME_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (eb <* ebwm\
              edge_based_wireframe_model.ebwm_boundary| NOT (SIZEOF(QUERY (
              edges <* eb.ces_edges| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_CURVE' IN 
              TYPEOF(edges)))) = 0))) = 0))) = 0;
    WR4: SIZEOF(QUERY (ebwm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_BASED_WIREFRAME_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (eb <* ebwm\
              edge_based_wireframe_model.ebwm_boundary| NOT (SIZEOF(QUERY (
              pline_edges <* QUERY (edges <* eb.ces_edges| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE' IN 
              TYPEOF(edges\edge_curve.edge_geometry)))| NOT (SIZEOF(
              pline_edges\edge_curve.edge_geometry\polyline.points) > 2))) 
              = 0))) = 0))) = 0;
    WR5: SIZEOF(QUERY (ebwm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_BASED_WIREFRAME_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (eb <* ebwm\
              edge_based_wireframe_model.ebwm_boundary| NOT (SIZEOF(QUERY (
              edges <* eb.ces_edges| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_POINT' IN
               TYPEOF(edges.edge_start)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_POINT' IN
               TYPEOF(edges.edge_end))))) = 0))) = 0))) = 0;
    WR6: SIZEOF(QUERY (ebwm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_BASED_WIREFRAME_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (eb <* ebwm\
              edge_based_wireframe_model.ebwm_boundary| NOT (SIZEOF(QUERY (
              edges <* eb.ces_edges| NOT valid_wireframe_edge_curve(edges\
              edge_curve.edge_geometry))) = 0))) = 0))) = 0;
    WR7: SIZEOF(QUERY (ebwm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_BASED_WIREFRAME_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (eb <* ebwm\
              edge_based_wireframe_model.ebwm_boundary| NOT (SIZEOF(QUERY (
              edges <* eb.ces_edges| NOT (valid_wireframe_vertex_point(
              edges.edge_start\vertex_point.vertex_geometry) AND 
              valid_wireframe_vertex_point(edges.edge_end\vertex_point.
              vertex_geometry)))) = 0))) = 0))) = 0;
    WR8: SIZEOF(QUERY (mi <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(it)))| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_BASED_WIREFRAME_SHAPE_REPRESENTATION'
               IN TYPEOF(mi\mapped_item.mapping_source.
              mapped_representation)))) = 0;
    WR9: SELF.context_of_items\geometric_representation_context.
              coordinate_space_dimension = 3;
END_ENTITY; -- 10303-501: aic_edge_based_wireframe

ENTITY edge_curve
  SUBTYPE OF (edge, geometric_representation_item);
    edge_geometry : curve;
    same_sense    : BOOLEAN;
END_ENTITY; -- 10303-42: topology_schema

ENTITY edge_loop
  SUBTYPE OF (loop, path);
  DERIVE
    ne : INTEGER := SIZEOF(SELF\path.edge_list);
  WHERE
    WR1: SELF\path.edge_list[1].edge_start :=: SELF\path.edge_list[ne].
              edge_end;
END_ENTITY; -- 10303-42: topology_schema

ENTITY edge_round
  SUBTYPE OF (transition_feature);
  WHERE
    WR1: NOT (SELF\shape_aspect.description = 'constant radius') OR (SIZEOF
              (QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0);
    WR2: NOT (SELF\shape_aspect.description = 'constant radius') OR (SIZEOF
              (QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) >= 1) AND (SIZEOF(impl_rep.
              used_representation.items) <= 3))) = 0))) = 0);
    WR3: NOT (SELF.description = 'constant radius') OR (SIZEOF(QUERY (pd <*
               USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'radius'))) = 1))) = 0))
              ) = 0);
    WR4: NOT (SELF.description = 'constant radius') OR (SIZEOF(QUERY (pd <*
               USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'first offset'))) <= 1))
              ) = 0))) = 0);
    WR5: NOT (SELF.description = 'constant radius') OR (SIZEOF(QUERY (pd <*
               USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'second offset'))) <= 1)
              )) = 0))) = 0);
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'edge round face'))) <= 1))) = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'first face shape'))) <= 1))) = 0;
    WR8: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'second face shape'))) <= 1))) = 0
              ;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY effectivity
  SUPERTYPE OF (ONEOF(serial_numbered_effectivity, dated_effectivity, 
      lot_effectivity, time_interval_based_effectivity));
    id : identifier;
  DERIVE
    name        : label := get_name_value(SELF);
    description : text := get_description_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NAME_ATTRIBUTE.NAMED_ITEM'
              )) <= 1;
    WR2: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: effectivity_schema

ENTITY effectivity_assignment
  ABSTRACT SUPERTYPE;
    assigned_effectivity : effectivity;
  DERIVE
    role : object_role := get_role(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROLE_ASSOCIATION.ITEM_WITH_ROLE'
              )) <= 1;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY effectivity_context_assignment
  ABSTRACT SUPERTYPE;
    assigned_effectivity_assignment : effectivity_assignment;
    role                            : effectivity_context_role;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY effectivity_context_role;
    name        : label;
    description : OPTIONAL text;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY effectivity_relationship;
    name                 : label;
    description          : OPTIONAL text;
    related_effectivity  : effectivity;
    relating_effectivity : effectivity;
END_ENTITY; -- 10303-41: effectivity_schema

ENTITY electric_charge_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ELECTRIC_CHARGE_UNIT'
               IN TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY electric_charge_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensions_for_si_unit(
              si_unit_name.coulomb);
END_ENTITY; -- 10303-41: measure_schema

ENTITY electric_current_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ELECTRIC_CURRENT_UNIT'
               IN TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY electric_current_unit
  SUBTYPE OF (named_unit);
  WHERE
    WR1: ((((((SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\
              named_unit.dimensions.mass_exponent = 0.0)) AND (SELF\
              named_unit.dimensions.time_exponent = 0.0)) AND (SELF\
              named_unit.dimensions.electric_current_exponent = 1.0)) AND (
              SELF\named_unit.dimensions.thermodynamic_temperature_exponent
               = 0.0)) AND (SELF\named_unit.dimensions.
              amount_of_substance_exponent = 0.0)) AND (SELF\named_unit.
              dimensions.luminous_intensity_exponent = 0.0);
END_ENTITY; -- 10303-41: measure_schema

ENTITY electric_potential_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ELECTRIC_POTENTIAL_UNIT'
               IN TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY electric_potential_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensions_for_si_unit(
              si_unit_name.volt);
END_ENTITY; -- 10303-41: measure_schema

ENTITY elementary_brep_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(QUERY (it <* SELF.items| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MANIFOLD_SOLID_BREP'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACETED_BREP',
               'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               ] * TYPEOF(it)) = 1))) = 0;
    WR2: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MANIFOLD_SOLID_BREP'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' ]
               * TYPEOF(it)) = 1))) > 0;
    WR3: SIZEOF(QUERY (msb <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MANIFOLD_SOLID_BREP'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (csh <* msb_shells(msb)| 
              NOT (SIZEOF(QUERY (fcs <* csh.cfs_faces| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SURFACE' IN
               TYPEOF(fcs)))) = 0))) = 0))) = 0;
    WR4: SIZEOF(QUERY (msb <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MANIFOLD_SOLID_BREP'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (csh <* msb_shells(msb)| 
              NOT (SIZEOF(QUERY (fcs <* csh\connected_face_set.cfs_faces| 
              NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ELEMENTARY_SURFACE'
               IN TYPEOF(fcs\face_surface.face_geometry)))) = 0))) = 0))) =
               0;
    WR5: SIZEOF(QUERY (msb <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MANIFOLD_SOLID_BREP'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (csh <* msb_shells(msb)| 
              NOT (SIZEOF(QUERY (fcs <* csh\connected_face_set.cfs_faces| 
              NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds.
              bound\path.edge_list| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_CURVE' IN 
              TYPEOF(oe.edge_element)))) = 0))) = 0))) = 0))) = 0))) = 0;
    WR6: SIZEOF(QUERY (msb <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MANIFOLD_SOLID_BREP'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (csh <* msb_shells(msb)| 
              NOT (SIZEOF(QUERY (fcs <* csh\connected_face_set.cfs_faces| 
              NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds.
              bound\path.edge_list| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONIC', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE' ] * 
              TYPEOF(oe.edge_element\edge_curve.edge_geometry)) = 1))) = 0)
              )) = 0))) = 0))) = 0))) = 0;
    WR7: SIZEOF(QUERY (msb <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MANIFOLD_SOLID_BREP'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (csh <* msb_shells(msb)| 
              NOT (SIZEOF(QUERY (fcs <* csh\connected_face_set.cfs_faces| 
              NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds.
              bound\path.edge_list| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_POINT' IN
               TYPEOF(oe.edge_start)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_POINT' IN
               TYPEOF(oe.edge_end))))) = 0))) = 0))) = 0))) = 0))) = 0;
    WR8: SIZEOF(QUERY (msb <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MANIFOLD_SOLID_BREP'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (csh <* msb_shells(msb)| 
              NOT (SIZEOF(QUERY (fcs <* csh\connected_face_set.cfs_faces| 
              NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fcs.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds.
              bound\path.edge_list| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE' IN 
              TYPEOF(oe.edge_element\edge_curve.edge_geometry)) AND NOT (
              SIZEOF(oe\oriented_edge.edge_element\edge_curve.edge_geometry
              \polyline.points) >= 3))) = 0))) = 0))) = 0))) = 0))) = 0;
    WR9: SIZEOF(QUERY (msb <* QUERY (it <* items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MANIFOLD_SOLID_BREP'
               IN TYPEOF(it)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORIENTED_CLOSED_SHELL'
               IN TYPEOF(msb\manifold_solid_brep.outer)))) = 0;
    WR10: SIZEOF(QUERY (brv <* QUERY (it <* items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BREP_WITH_VOIDS'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (csh <* brv\
              brep_with_voids.voids| csh\oriented_closed_shell.orientation)
              ) = 0))) = 0;
    WR11: SIZEOF(QUERY (mi <* QUERY (it <* items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(it)))| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ELEMENTARY_BREP_SHAPE_REPRESENTATION'
               IN TYPEOF(mi\mapped_item.mapping_source.
              mapped_representation)))) = 0;
    WR12: SIZEOF(QUERY (msb <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MANIFOLD_SOLID_BREP'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (csh <* msb_shells(msb)| 
              NOT (SIZEOF(QUERY (fcs <* csh\connected_face_set.cfs_faces| 
              NOT (SIZEOF(QUERY (vlp_fbnds <* QUERY (bnds <* fcs.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_POINT' IN
               TYPEOF(vlp_fbnds\face_bound.bound\vertex_loop.loop_vertex)) 
              AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CARTESIAN_POINT'
               IN TYPEOF(vlp_fbnds\face_bound.bound\vertex_loop.loop_vertex
              \vertex_point.vertex_geometry))))) = 0))) = 0))) = 0))) = 0;
END_ENTITY; -- 10303-513: aic_elementary_brep

ENTITY elementary_function
  SUBTYPE OF (maths_function, generic_literal);
    func_id : elementary_function_enumerators;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY elementary_space
  SUBTYPE OF (maths_space, generic_literal);
    space_id : elementary_space_enumerators;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY elementary_surface
  SUPERTYPE OF (ONEOF(plane, cylindrical_surface, conical_surface, 
      spherical_surface, toroidal_surface))
  SUBTYPE OF (surface);
    position : axis2_placement_3d;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY ellipse
  SUBTYPE OF (conic);
    semi_axis_1 : positive_length_measure;
    semi_axis_2 : positive_length_measure;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY ellipsoid
  SUBTYPE OF (geometric_representation_item);
    position    : axis2_placement_3d;
    semi_axis_1 : positive_length_measure;
    semi_axis_2 : positive_length_measure;
    semi_axis_3 : positive_length_measure;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY ellipsoid_volume
  SUBTYPE OF (volume);
    position    : axis2_placement_3d;
    semi_axis_1 : positive_length_measure;
    semi_axis_2 : positive_length_measure;
    semi_axis_3 : positive_length_measure;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY energy_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ENERGY_UNIT' IN 
              TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY energy_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensions_for_si_unit(
              si_unit_name.joule);
END_ENTITY; -- 10303-41: measure_schema

ENTITY environment;
    syntactic_representation : generic_variable;
    semantics                : variable_semantics;
END_ENTITY; -- 13584-20: iso13584_generic_expressions_schema

ENTITY equals_expression
  SUBTYPE OF (binary_boolean_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY evaluated_degenerate_pcurve
  SUBTYPE OF (degenerate_pcurve);
    equivalent_point : cartesian_point;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY event_occurrence;
    id          : identifier;
    name        : label;
    description : OPTIONAL text;
END_ENTITY; -- 10303-41: date_time_schema

ENTITY event_occurrence_assignment
  ABSTRACT SUPERTYPE;
    assigned_event_occurrence : event_occurrence;
    role                      : event_occurrence_role;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY event_occurrence_relationship;
    name           : label;
    description    : OPTIONAL text;
    relating_event : event_occurrence;
    related_event  : event_occurrence;
END_ENTITY; -- 10303-41: date_time_schema

ENTITY event_occurrence_role;
    name        : label;
    description : OPTIONAL text;
END_ENTITY; -- 10303-41: date_time_schema

ENTITY exclusive_product_concept_feature_category
  SUBTYPE OF (product_concept_feature_category);
END_ENTITY; -- 10303-1103: product_class_mim

ENTITY executed_action
  SUBTYPE OF (action);
END_ENTITY; -- 10303-41: action_schema

ENTITY exp_function
  SUBTYPE OF (unary_function_call);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY expanded_uncertainty
  SUBTYPE OF (standard_uncertainty);
    coverage_factor : REAL;
END_ENTITY; -- 10303-45: qualified_measure_schema

ENTITY explicit_composite_hole
  SUBTYPE OF (composite_hole);
    placement : shape_representation;
  INVERSE
    explicit_shape : SET [0:?] OF item_identified_representation_usage FOR 
                        definition;
  WHERE
    WR1: SIZEOF(QUERY (ri <* placement\representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               IN TYPEOF(ri)))) = 1;
    WR2: (SIZEOF(explicit_shape) = 0) OR (SIZEOF(QUERY (es <* 
              explicit_shape| NOT (placement = es\
              item_identified_representation_usage.used_representation))) =
               0);
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY explicit_round_hole
  SUBTYPE OF (round_hole);
    depth              : positive_length_measure_with_unit;
    depth_tolerance    : OPTIONAL tolerance_value;
    diameter           : positive_length_measure_with_unit;
    diameter_tolerance : OPTIONAL tolerance_value_or_limits_and_fits;
    placement          : shape_representation;
  WHERE
    WR1: SIZEOF(QUERY (ri <* placement\representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               IN TYPEOF(ri)))) = 1;
    WR2: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(depth_tolerance\tolerance_value.lower_bound);
    WR3: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(depth_tolerance\tolerance_value.upper_bound);
    WR4: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TOLERANCE_VALUE'
               IN TYPEOF(diameter_tolerance)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(diameter_tolerance\tolerance_value.lower_bound));
    WR5: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TOLERANCE_VALUE'
               IN TYPEOF(diameter_tolerance)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(diameter_tolerance\tolerance_value.upper_bound));
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY explicit_table_function
  ABSTRACT SUPERTYPE OF (ONEOF(listed_real_data, listed_integer_data, 
      listed_logical_data, listed_string_data, listed_complex_number_data, 
      listed_data, externally_listed_data, linearized_table_function, 
      basic_sparse_matrix))
  SUBTYPE OF (maths_function);
    index_base : zero_or_one;
    shape      : LIST [1:?] OF positive_integer;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY expression
  ABSTRACT SUPERTYPE OF (ONEOF(numeric_expression, boolean_expression, 
      string_expression))
  SUBTYPE OF (generic_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY expression_conversion_based_unit
  SUBTYPE OF (context_dependent_unit, variable_semantics);
  INVERSE
    associated_variable_environment : environment FOR semantics;
END_ENTITY; -- 10303-1753: value_with_unit_extension_mim

ENTITY expression_denoted_function
  SUBTYPE OF (maths_function, unary_generic_expression);
  DERIVE
    expr : generic_expression := SELF\unary_generic_expression.operand;
  WHERE
    WR1: schema_prefix + 'FUNCTION_SPACE' IN TYPEOF(values_space_of(expr));
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY expression_item_representation_item
  SUBTYPE OF (representation_item);
    item : expression_element;
END_ENTITY; -- 10303-61: systems_engineering_representation_schema

ENTITY expression_representation_item
  SUBTYPE OF (representation_item, generic_expression);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY extended_tuple_space
  SUBTYPE OF (maths_space, generic_literal);
    base     : tuple_space;
    extender : maths_space;
  WHERE
    WR1: expression_is_constant(base) AND expression_is_constant(extender);
    WR2: no_cyclic_space_reference(SELF, []);
    WR3: extender <> the_empty_space;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY extended_type_operation
  SUBTYPE OF (machining_operation);
  WHERE
    WR1: EXISTS(SELF.description);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY extension
  SUBTYPE OF (derived_shape_aspect);
  WHERE
    WR1: SIZEOF(SELF\derived_shape_aspect.deriving_relationships) = 1;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY external_class_library
  SUBTYPE OF (external_source);
END_ENTITY; -- 10303-1275: external_class_mim

ENTITY external_identification_assignment
  ABSTRACT SUPERTYPE
  SUBTYPE OF (identification_assignment);
    source : external_source;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY external_identification_assignment_relationship;
    id            : OPTIONAL identifier;
    description   : OPTIONAL text;
    relating      : external_identification_assignment;
    related       : external_identification_assignment;
    relation_type : STRING;
  WHERE
    WR1: acyclic_external_identification_assignment_relationship(SELF, [ 
              related ], 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXTERNAL_IDENTIFICATION_ASSIGNMENT_RELATIONSHIP'
              );
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY external_source;
    source_id : source_item;
  DERIVE
    description : text := get_description_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: external_reference_schema

ENTITY external_source_relationship;
    name            : label;
    description     : OPTIONAL text;
    relating_source : external_source;
    related_source  : external_source;
END_ENTITY; -- 10303-41: external_reference_schema

ENTITY externally_defined_character_glyph
  SUBTYPE OF (externally_defined_item);
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY externally_defined_class
  SUBTYPE OF (class, externally_defined_item);
END_ENTITY; -- 10303-1275: external_class_mim

ENTITY externally_defined_colour
  SUBTYPE OF (colour_specification, externally_defined_item);
END_ENTITY; -- 10303-1002: colour_mim

ENTITY externally_defined_curve_font
  SUBTYPE OF (externally_defined_item);
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY externally_defined_dimension_definition
  SUBTYPE OF (dimensional_size, externally_defined_item);
  WHERE
    WR1: (SELF\externally_defined_item.item_id = 'external size dimension')
               AND (SELF\externally_defined_item.source.source_id = 
              'external size dimension specification');
    WR2: 1 >= SIZEOF(QUERY (adr <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APPLIED_DOCUMENT_REFERENCE.ITEMS'
              )| (adr.assigned_document.description = 
              'external size dimension specification')));
END_ENTITY; -- 10303-1050: dimension_tolerance_mim

ENTITY externally_defined_feature_definition
  SUBTYPE OF (feature_definition, externally_defined_item);
  WHERE
    WR1: ((((SELF\characterized_object.description = 'thread') AND (SELF\
              externally_defined_item.item_id = 'external thread')) AND (
              SELF\externally_defined_item.source.source_id = 
              'external feature specification') OR ((SELF\
              characterized_object.description = 'gear') AND (SELF\
              externally_defined_item.item_id = 'external gear')) AND (SELF
              \externally_defined_item.source.source_id = 
              'external feature specification')) OR ((SELF\
              characterized_object.description = 'marking') AND (SELF\
              externally_defined_item.item_id = 'external marking')) AND (
              SELF\externally_defined_item.source.source_id = 
              'external feature specification')) OR ((SELF\
              characterized_object.description = 'knurl') AND (SELF\
              externally_defined_item.item_id = 'external knurl')) AND (
              SELF\externally_defined_item.source.source_id = 
              'external feature specification');
    WR2: NOT (SELF\characterized_object.description = 'thread') OR (SIZEOF(
              QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND ((5 <= SIZEOF(pdr.
              used_representation.items)) AND (SIZEOF(pdr.
              used_representation.items) <= 10)))) = 1))) = 1);
    WR3: NOT (SELF\characterized_object.description = 'marking') OR (SIZEOF
              (QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND (SIZEOF(pdr.
              used_representation.items) = 2))) = 1))) = 1);
    WR4: NOT (SELF\characterized_object.description = 'knurl') OR (SIZEOF(
              QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND (SIZEOF(pdr.
              used_representation.items) = 1))) = 1))) = 1);
    WR5: NOT (SELF\characterized_object.description IN [ 'knurl', 'thread' 
              ]) OR (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'partial area occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'applied area usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APPLIED_AREA' IN
               TYPEOF(sdr.relating_shape_aspect)))) = 1))) <= 1))) = 0);
    WR6: NOT (SELF\characterized_object.description = 'marking') OR (SIZEOF
              (QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'marking text'))) = 1))) = 0))
              ) = 0);
    WR7: NOT (SELF\characterized_object.description = 'thread') OR (SIZEOF(
              QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'removal direction')) AND ((it
              .description = 'internal') OR (it.description = 'external')))
              ) = 1))) = 0))) = 0);
    WR8: NOT (SELF\characterized_object.description = 'thread') OR (SIZEOF(
              QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'qualifier'))) <= 1))) = 0))) 
              = 0);
    WR9: NOT (SELF\characterized_object.description = 'thread') OR (SIZEOF(
              QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'hand'))) = 1))) = 0))) = 0);
    WR10: NOT (SELF\characterized_object.description = 'thread') OR (SIZEOF
              (QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'fit class'))) = 1))) = 0))) =
               0);
    WR11: NOT (SELF\characterized_object.description = 'thread') OR (SIZEOF
              (QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'form'))) = 1))) = 0))) = 0);
    WR12: NOT (SELF\characterized_object.description = 'thread') OR (SIZEOF
              (QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'major diameter'))) <= 1
              ))) = 0))) = 0);
    WR13: NOT (SELF\characterized_object.description = 'thread') OR (SIZEOF
              (QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RATIO_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'number of threads'))) =
               1))) = 0))) = 0);
    WR14: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'fit class 2'))) <= 1))) = 0))
              ) = 0;
    WR15: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'nominal size'))) <= 1))
              ) = 0))) = 0;
    WR16: NOT (SELF\characterized_object.description IN [ 'knurl', 'gear', 
              'thread' ]) OR (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'applied shape') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT' IN
               TYPEOF(sdr.relating_shape_aspect)))) = 1))) <= 1))) = 0);
    WR17: NOT (SELF\characterized_object.description IN [ 'gear' ]) OR (
              SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND (10 <= SIZEOF(pdr.
              used_representation.items))) AND (SIZEOF(pdr.
              used_representation.items) >= 11))) = 1))) = 1);
    WR18: NOT (SELF\characterized_object.description IN [ 'gear' ]) OR (
              SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RATIO_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'number of teeth'))) = 1
              ))) = 0))) = 0);
    WR19: NOT (SELF\characterized_object.description IN [ 'gear' ]) OR (
              SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 
              'reference pressure angle'))) = 1))) = 0))) = 0);
    WR20: NOT (SELF\characterized_object.description IN [ 'gear' ]) OR (
              SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'rake shift factor'))) =
               1))) = 0))) = 0);
    WR21: NOT (SELF\characterized_object.description IN [ 'gear' ]) OR (
              SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'nominal tooth depth')))
               = 1))) = 0))) = 0);
    WR22: NOT (SELF\characterized_object.description IN [ 'gear' ]) OR (
              SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'face width'))) = 1))) =
               0))) = 0);
    WR23: NOT (SELF\characterized_object.description IN [ 'gear' ]) OR (
              SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'tip diameter'))) = 1)))
               = 0))) = 0);
    WR24: NOT (SELF\characterized_object.description IN [ 'gear' ]) OR (
              SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'module or diametral pitch')) 
              AND ((it.description = 'module') OR (it.description = 
              'diametral pitch')))) = 1))) = 0))) = 0);
    WR25: NOT (SELF\characterized_object.description IN [ 'gear' ]) OR (
              SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'normal attribute'))) = 
              1))) = 0))) = 0);
    WR26: NOT (SELF\characterized_object.description IN [ 'gear' ]) OR (
              SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'internal or external gear')) 
              AND ((it.description = 'internal') OR (it.description = 
              'external')))) = 1))) = 0))) = 0);
    WR27: NOT (SELF\characterized_object.description IN [ 'gear' ]) OR (
              SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'root fillet radius'))) 
              <= 1))) = 0))) = 0);
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY externally_defined_general_property
  SUBTYPE OF (general_property, externally_defined_item);
END_ENTITY; -- 10303-1129: external_properties_mim

ENTITY externally_defined_hatch_style
  SUBTYPE OF (externally_defined_item, geometric_representation_item);
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY externally_defined_item;
    item_id : source_item;
    source  : external_source;
END_ENTITY; -- 10303-41: external_reference_schema

ENTITY externally_defined_item_relationship;
    name          : label;
    description   : OPTIONAL text;
    relating_item : externally_defined_item;
    related_item  : externally_defined_item;
END_ENTITY; -- 10303-41: external_reference_schema

ENTITY externally_defined_item_with_multiple_references
  SUBTYPE OF (externally_defined_item);
    references : LIST [1:?] OF UNIQUE source_item;
  UNIQUE
    UR1: references;
  WHERE
    WR1: NOT (SELF\externally_defined_item.item_id IN references);
END_ENTITY; -- 10303-41: external_reference_schema

ENTITY externally_defined_marker
  SUBTYPE OF (externally_defined_symbol, pre_defined_marker);
END_ENTITY; -- 10303-1003: curve_appearance_mim

ENTITY externally_defined_representation
  SUBTYPE OF (representation, externally_defined_item);
    SELF\representation.items : SET [1:?] OF 
               externally_defined_representation_item;
END_ENTITY; -- 10303-1779: external_representation_item_mim

ENTITY externally_defined_representation_item
  SUBTYPE OF (representation_item, externally_defined_item);
END_ENTITY; -- 10303-1779: external_representation_item_mim

ENTITY externally_defined_representation_with_parameters
  SUBTYPE OF (representation);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APPLIED_CLASSIFICATION_ASSIGNMENT.ITEMS'
              )) = 1;
    WR2: SIZEOF(QUERY (adr <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN 
              TYPEOF(adr)))) <= 1;
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY externally_defined_string
  SUBTYPE OF (externally_defined_representation_item);
END_ENTITY; -- 10303-1779: external_representation_item_mim

ENTITY externally_defined_style
  SUBTYPE OF (externally_defined_item, founded_item);
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY externally_defined_symbol
  SUBTYPE OF (externally_defined_item);
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY externally_defined_terminator_symbol
  SUBTYPE OF (externally_defined_symbol);
END_ENTITY; -- 10303-1003: curve_appearance_mim

ENTITY externally_defined_text_font
  SUBTYPE OF (externally_defined_item);
END_ENTITY; -- 10303-46: presentation_resource_schema

ENTITY externally_defined_tile
  SUBTYPE OF (externally_defined_item);
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY externally_defined_tile_style
  SUBTYPE OF (externally_defined_item, geometric_representation_item);
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY externally_listed_data
  SUBTYPE OF (explicit_table_function, generic_literal, 
      externally_defined_item);
    value_range : maths_space;
  WHERE
    WR1: expression_is_constant(value_range);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY extruded_area_solid
  SUBTYPE OF (swept_area_solid);
    extruded_direction : direction;
    depth              : positive_length_measure;
  WHERE
    WR1: dot_product(SELF\swept_area_solid.swept_area.basis_surface\
              elementary_surface.position.p[3], extruded_direction) <> 0.0;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY extruded_face_solid
  SUBTYPE OF (swept_face_solid);
    extruded_direction : direction;
    depth              : positive_length_measure;
  WHERE
    WR1: dot_product(SELF\swept_face_solid.swept_face.face_geometry\
              elementary_surface.position.p[3], extruded_direction) <> 0.0;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY face
  SUPERTYPE OF (ONEOF(face_surface, subface, oriented_face))
  SUBTYPE OF (topological_representation_item);
    bounds : SET [1:?] OF face_bound;
  WHERE
    WR1: NOT mixed_loop_type_set(list_to_set(list_face_loops(SELF)));
    WR2: SIZEOF(QUERY (temp <* bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_OUTER_BOUND'
               IN TYPEOF(temp)))) <= 1;
END_ENTITY; -- 10303-42: topology_schema

ENTITY face_based_surface_model
  SUBTYPE OF (geometric_representation_item);
    fbsm_faces : SET [1:?] OF connected_face_set;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY face_bound
  SUBTYPE OF (topological_representation_item);
    bound       : loop;
    orientation : BOOLEAN;
END_ENTITY; -- 10303-42: topology_schema

ENTITY face_outer_bound
  SUBTYPE OF (face_bound);
END_ENTITY; -- 10303-42: topology_schema

ENTITY face_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(SELF.items) >= 1;
    WR2: SIZEOF(QUERY (it <* SELF.items| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SURFACE' IN
               TYPEOF(it)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORIENTED_FACE' 
              IN TYPEOF(it))))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY face_shape_representation_relationship
  SUBTYPE OF (representation_relationship);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SHAPE_REPRESENTATION'
               IN TYPEOF(SELF.rep_1);
    WR2: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SHAPE_REPRESENTATION'
               IN TYPEOF(SELF.rep_2);
END_ENTITY; -- 10303-1814: machining_features_mim

ENTITY face_surface
  SUBTYPE OF (face, geometric_representation_item);
    face_geometry : surface;
    same_sense    : BOOLEAN;
  WHERE
    WR1: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORIENTED_SURFACE'
               IN TYPEOF(face_geometry));
END_ENTITY; -- 10303-42: topology_schema

ENTITY faceted_brep
  SUBTYPE OF (manifold_solid_brep);
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY faceted_brep_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(QUERY (it <* items| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACETED_BREP', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               ] * TYPEOF(it)) = 1))) = 0;
    WR2: SIZEOF(QUERY (it <* items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACETED_BREP', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' ] *
               TYPEOF(it)) = 1))) > 0;
    WR3: SIZEOF(QUERY (fbrep <* QUERY (it <* items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACETED_BREP' IN
               TYPEOF(it)))| NOT (SIZEOF(QUERY (csh <* msb_shells(fbrep)| 
              NOT (SIZEOF(QUERY (fcs <* csh\connected_face_set.cfs_faces| 
              NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SURFACE' IN
               TYPEOF(fcs)) AND ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE' IN TYPEOF
              (fcs\face_surface.face_geometry)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CARTESIAN_POINT'
               IN TYPEOF(fcs\face_surface.face_geometry\elementary_surface.
              position.location)))))) = 0))) = 0))) = 0;
    WR4: SIZEOF(QUERY (fbrep <* QUERY (it <* items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACETED_BREP' IN
               TYPEOF(it)))| NOT (SIZEOF(QUERY (csh <* msb_shells(fbrep)| 
              NOT (SIZEOF(QUERY (fcs <* csh\connected_face_set.cfs_faces| 
              NOT (SIZEOF(QUERY (bnds <* fcs.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_OUTER_BOUND'
               IN TYPEOF(bnds)))) = 1))) = 0))) = 0))) = 0;
    WR5: SIZEOF(QUERY (msb <* QUERY (it <* items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MANIFOLD_SOLID_BREP'
               IN TYPEOF(it)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORIENTED_CLOSED_SHELL'
               IN TYPEOF(msb\manifold_solid_brep.outer)))) = 0;
    WR6: SIZEOF(QUERY (brv <* QUERY (it <* items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BREP_WITH_VOIDS'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (csh <* brv\
              brep_with_voids.voids| csh\oriented_closed_shell.orientation)
              ) = 0))) = 0;
    WR7: SIZEOF(QUERY (mi <* QUERY (it <* items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(it)))| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACETED_BREP_SHAPE_REPRESENTATION'
               IN TYPEOF(mi\mapped_item.mapping_source.
              mapped_representation)))) = 0;
END_ENTITY; -- 10303-512: aic_faceted_brep

ENTITY faceted_primitive
  SUPERTYPE OF (ONEOF(tetrahedron, convex_hexahedron))
  SUBTYPE OF (geometric_representation_item);
    points : LIST [4:?] OF UNIQUE cartesian_point;
  WHERE
    WR1: points[1].dim = 3;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY facing_turning_operation
  SUBTYPE OF (turning_type_operation);
  WHERE
    WR1: SELF.description IN [ 'roughing', 'finishing' ];
    WR2: verify_optional_action_property(SELF, 'allowance') AND 
              verify_length_measure_action_property(SELF, 'allowance');
    WR3: NOT (SELF.description = 'roughing') OR 
              verify_required_action_property(SELF, 'allowance');
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY feature_component_definition
  SUBTYPE OF (characterized_object);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )) = 1))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY feature_component_relationship
  SUPERTYPE OF (ONEOF(pattern_omit_membership, pattern_offset_membership))
  SUBTYPE OF (shape_aspect_relationship);
  WHERE
    WR1: ((SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_SHAPE_ASPECT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPLICATE_FEATURE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TRANSITION_FEATURE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MODIFIED_PATTERN'
               ] * TYPEOF(SELF.relating_shape_aspect)) = 1) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEATURE_DEFINITION'
               IN TYPEOF(SELF.relating_shape_aspect.of_shape.definition))) 
              OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_DEFINITION'
               IN TYPEOF(SELF.relating_shape_aspect.of_shape.definition));
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY feature_definition
  SUPERTYPE OF (ONEOF(boss, compound_feature, 
      externally_defined_feature_definition, flat_face, gear, marking, 
      outer_round, outside_profile, pocket, protrusion, removal_volume, 
      replicate_feature, revolved_profile, rib_top, round_hole, rounded_end
      , spherical_cap, step, slot, thread, turned_knurl))
  SUBTYPE OF (characterized_object);
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY feature_definition_with_connection_area
  SUBTYPE OF (shape_feature_definition);
END_ENTITY; -- 10303-1671: feature_and_connection_zone_mim

ENTITY feature_for_datum_target_relationship
  SUBTYPE OF (shape_aspect_relationship);
    SELF\shape_aspect_relationship.related_shape_aspect : datum_target;
  UNIQUE
    UR1: related_shape_aspect;
  WHERE
    WR1: relating_shape_aspect.of_shape :=: related_shape_aspect.of_shape;
    WR2: relating_shape_aspect\shape_aspect.product_definitional = TRUE;
END_ENTITY; -- 10303-1051: geometric_tolerance_mim

ENTITY feature_pattern
  SUBTYPE OF (replicate_feature);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND (SIZEOF(QUERY (
              srwp_i <* pdr.used_representation.items| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN 
              TYPEOF(srwp_i)))) > 0))) > 0))) = 0;
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN 
              TYPEOF(it)) AND (it.name = 'base feature placement'))) > 1)))
               = 0))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY fill_area_style
  SUBTYPE OF (founded_item);
    name        : label;
    fill_styles : SET [1:?] OF fill_style_select;
  WHERE
    WR1: SIZEOF(QUERY (fill_style <* fill_styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FILL_AREA_STYLE_COLOUR'
               IN TYPEOF(fill_style)))) <= 1;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY fill_area_style_colour;
    name        : label;
    fill_colour : colour;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY fill_area_style_hatching
  SUBTYPE OF (geometric_representation_item);
    hatch_line_appearance         : curve_style;
    start_of_next_hatch_line      : one_direction_repeat_factor;
    point_of_reference_hatch_line : cartesian_point;
    pattern_start                 : cartesian_point;
    hatch_line_angle              : plane_angle_measure;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY fill_area_style_tile_coloured_region
  SUBTYPE OF (geometric_representation_item);
    closed_curve  : curve_or_annotation_curve_occurrence;
    region_colour : colour;
  WHERE
    WR1: ((((NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE' IN 
              TYPEOF(closed_curve)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCLE' IN 
              TYPEOF(closed_curve))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ELLIPSE' IN 
              TYPEOF(closed_curve))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_CURVE' 
              IN TYPEOF(closed_curve)) AND (closed_curve\b_spline_curve.
              closed_curve = TRUE)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_CURVE'
               IN TYPEOF(closed_curve)) AND (closed_curve\composite_curve.
              closed_curve = TRUE)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE' IN 
              TYPEOF(closed_curve)) AND (closed_curve\polyline.points[
              LOINDEX(closed_curve\polyline.points)] = closed_curve\
              polyline.points[HIINDEX(closed_curve\polyline.points)]);
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY fill_area_style_tile_curve_with_style
  SUBTYPE OF (geometric_representation_item);
    styled_curve : annotation_curve_occurrence;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY fill_area_style_tile_symbol_with_style
  SUBTYPE OF (geometric_representation_item);
    symbol : annotation_symbol_occurrence;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY fill_area_style_tiles
  SUBTYPE OF (geometric_representation_item);
    tiling_pattern : two_direction_repeat_factor;
    tiles          : SET [1:?] OF fill_area_style_tile_shape_select;
    tiling_scale   : positive_ratio_measure;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY fillet
  SUBTYPE OF (transition_feature);
  WHERE
    WR1: NOT (SELF\shape_aspect.description = 'constant radius') OR (SIZEOF
              (QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0);
    WR2: NOT (SELF\shape_aspect.description = 'constant radius') OR (SIZEOF
              (QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) >= 1) AND (SIZEOF(impl_rep.
              used_representation.items) <= 3))) = 0))) = 0);
    WR3: NOT (SELF.description = 'constant radius') OR (SIZEOF(QUERY (pd <*
               USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'radius'))) = 1))) = 0))
              ) = 0);
    WR4: NOT (SELF.description = 'constant radius') OR (SIZEOF(QUERY (pd <*
               USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'first offset'))) <= 1))
              ) = 0))) = 0);
    WR5: NOT (SELF.description = 'constant radius') OR (SIZEOF(QUERY (pd <*
               USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'second offset'))) <= 1)
              )) = 0))) = 0);
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'fillet face'))) = 1))) = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'first face shape'))) = 1))) = 0;
    WR8: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'second face shape'))) = 1))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY final_solution
  SUBTYPE OF (product_definition_formation);
    status : STRING;
  INVERSE
    specification : SET [1:?] OF product_definition FOR formation;
END_ENTITY; -- 10303-41: product_definition_schema

ENTITY finite_function
  SUBTYPE OF (maths_function, generic_literal);
    pairs : SET [1:?] OF LIST [2:2] OF maths_value;
  WHERE
    WR1: VALUE_UNIQUE(list_selected_components(pairs, 1));
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY finite_integer_interval
  SUBTYPE OF (maths_space, generic_literal);
    min : INTEGER;
    max : INTEGER;
  DERIVE
    size : positive_integer := max - min + 1;
  WHERE
    WR1: min <= max;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY finite_real_interval
  SUBTYPE OF (maths_space, generic_literal);
    min         : REAL;
    min_closure : open_closed;
    max         : REAL;
    max_closure : open_closed;
  WHERE
    WR1: min < max;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY finite_space
  SUBTYPE OF (maths_space, generic_literal);
    members : SET OF maths_value;
  WHERE
    WR1: VALUE_UNIQUE(members);
    WR2: SIZEOF(QUERY (expr <* QUERY (member <* members| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GENERIC_EXPRESSION'
               IN TYPEOF(member)))| NOT expression_is_constant(expr))) = 0;
    WR3: no_cyclic_space_reference(SELF, []);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY fixed_reference_swept_surface
  SUBTYPE OF (swept_surface);
    directrix       : curve;
    fixed_reference : direction;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY flat_face
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'removal direction'))) = 1))) = 0;
    WR2: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'course of travel occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'path feature component usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PATH_FEATURE_COMPONENT'
               IN TYPEOF(sdr.relating_shape_aspect)) AND (sdr.
              relating_shape_aspect.description = 'linear')) AND (sdr.name 
              = 'course of travel'))) = 1))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'removal boundary occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINEAR_PROFILE' 
              IN TYPEOF(sdr.relating_shape_aspect)) AND (sdr.name = 
              'removal boundary'))) = 1))) = 1))) = 0;
    WR4: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'enclosed boundary occurrence') AND 
              (SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_CLOSED_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NGON_CLOSED_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_CLOSED_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CLOSED_PATH_PROFILE'
               ] * TYPEOF(sdr.relating_shape_aspect)) = 1) AND (sdr.
              relating_shape_aspect.description = 'boundary'))) = 1))) <= 1
              ))) = 0;
    WR5: SIZEOF(QUERY (pdr <* get_property_definition_representations(SELF)
              | (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'maximum feature limit'))) >= 0;
    WR6: SIZEOF(QUERY (pds <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pds)) AND (SIZEOF(QUERY (csa <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_SHAPE_ASPECT'
               IN TYPEOF(csa)) AND (csa.name = 'uncut volume')) AND (SIZEOF
              (QUERY (sar <* csa.component_relationships| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOSS', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROTRUSION' ] * 
              TYPEOF(sar.related_shape_aspect)) = 1))) = 1))) <= 1))) = 1;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'removal depth'))) <= 1)
              )) = 0))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY flatness_tolerance
  SUBTYPE OF (geometric_tolerance);
  WHERE
    WR1: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE'
               IN TYPEOF(SELF));
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY force_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FORCE_UNIT' IN TYPEOF
              (SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY force_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensions_for_si_unit(
              si_unit_name.newton);
END_ENTITY; -- 10303-41: measure_schema

ENTITY format_function
  SUBTYPE OF (string_expression, binary_generic_expression);
  DERIVE
    value_to_format : generic_expression := SELF\binary_generic_expression.
                         operands[1];
    format_string   : generic_expression := SELF\binary_generic_expression.
                         operands[2];
  WHERE
    WR1: ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NUMERIC_EXPRESSION' 
              IN TYPEOF(value_to_format)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STRING_EXPRESSION'
               IN TYPEOF(format_string));
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY founded_item
  SUPERTYPE OF (ONEOF(character_glyph_style_outline, 
      character_glyph_style_stroke, curve_style, curve_style_font, 
      curve_style_font_and_scaling, curve_style_font_pattern, 
      externally_defined_style, fill_area_style, point_style, 
      presentation_style_assignment, surface_side_style, 
      surface_style_boundary, surface_style_control_grid, 
      surface_style_fill_area, surface_style_parameter_line, 
      surface_style_segmentation_curve, surface_style_silhouette, 
      surface_style_usage, symbol_style, text_style));
  DERIVE
    users : SET [0:?] OF founded_item_select := using_items(SELF, []);
  WHERE
    WR1: SIZEOF(users) > 0;
    WR2: NOT (SELF IN users);
END_ENTITY; -- 10303-43: representation_schema

ENTITY free_variable_semantics
  SUBTYPE OF (variable_semantics);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY freeform_milling_operation
  SUBTYPE OF (milling_type_operation);
  WHERE
    WR1: verify_optional_relating_amr_with_name(SELF, 'machining', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'
               ]) AND verify_related_type_for_amr_with_name(SELF, 
              'machining', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FREEFORM_MILLING_STRATEGY'
               ]);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY freeform_milling_strategy
  SUBTYPE OF (milling_type_strategy);
  WHERE
    WR1: NOT (SELF.description IN [ 'leading line', 'plane cutter contact',
               'plane cutter location', 'uv' ]) OR ((((((
              verify_required_action_property(SELF, 'pathmode') AND 
              verify_enumeration_action_property(SELF, 'pathmode', [ 
              'forward', 'zigzag' ])) AND verify_required_action_property(
              SELF, 'cutmode')) AND verify_enumeration_action_property(SELF
              , 'cutmode', [ 'climb', 'conventional' ])) AND 
              verify_required_action_property(SELF, 'milling tolerances')) 
              AND verify_rep_type_for_action_property(SELF, 
              'milling tolerances', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FREEFORM_MILLING_TOLERANCE_REPRESENTATION'
               ])) AND verify_optional_action_property(SELF, 
              'stepover length')) AND verify_length_measure_action_property
              (SELF, 'stepover length');
    WR2: NOT (SELF.description = 'leading line') OR 
              verify_required_action_property(SELF, 'leading line') AND 
              verify_rep_item_for_action_property(SELF, 'leading line', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOUNDED_CURVE' ]
              );
    WR3: NOT (SELF.description IN [ 'plane cutter contact', 
              'plane cutter location' ]) OR verify_required_action_property
              (SELF, 'plane normal') AND 
              verify_rep_item_for_action_property(SELF, 'plane normal', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ]);
    WR4: NOT (SELF.description = 'uv') OR ((verify_required_action_property
              (SELF, 'forward direction') AND 
              verify_rep_item_for_action_property(SELF, 'forward direction'
              , [ 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ]
              )) AND verify_required_action_property(SELF, 
              'sideward direction')) AND 
              verify_rep_item_for_action_property(SELF, 
              'sideward direction', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ]);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY freeform_milling_tolerance_representation
  SUBTYPE OF (representation);
  WHERE
    WR1: verify_required_rep_item(SELF, 'chordal tolerance') AND 
              verify_length_measure_rep_item(SELF, 'chordal tolerance');
    WR2: verify_required_rep_item(SELF, 'scallop height') AND 
              verify_length_measure_rep_item(SELF, 'scallop height');
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY frequency_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FREQUENCY_UNIT' IN 
              TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY frequency_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensions_for_si_unit(
              si_unit_name.hertz);
END_ENTITY; -- 10303-41: measure_schema

ENTITY fully_constrained_pair
  SUBTYPE OF (low_order_kinematic_pair);
  DERIVE
    SELF\low_order_kinematic_pair.t_x : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.t_y : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.t_z : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.r_x : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.r_y : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.r_z : BOOLEAN := FALSE;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY function_application
  SUBTYPE OF (multiple_arity_generic_expression);
    func      : maths_function_select;
    arguments : LIST [1:?] OF maths_expression;
  DERIVE
    SELF\multiple_arity_generic_expression.operands : LIST [2:?] OF 
                  generic_expression := [ convert_to_maths_function(func) ]
                   + convert_to_operands(arguments);
  WHERE
    WR1: function_applicability(func, arguments);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY function_space
  SUBTYPE OF (maths_space, generic_literal);
    domain_constraint : space_constraint_type;
    domain_argument   : maths_space;
    range_constraint  : space_constraint_type;
    range_argument    : maths_space;
  WHERE
    WR1: expression_is_constant(domain_argument) AND expression_is_constant
              (range_argument);
    WR2: (domain_argument <> the_empty_space) AND (range_argument <> 
              the_empty_space);
    WR3: (domain_constraint <> sc_member) OR NOT member_of(the_empty_space,
               domain_argument);
    WR4: (range_constraint <> sc_member) OR NOT member_of(the_empty_space, 
              range_argument);
    WR5: NOT (any_space_satisfies(domain_constraint, domain_argument) AND 
              any_space_satisfies(range_constraint, range_argument));
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY functional_breakdown_context
  SUBTYPE OF (breakdown_context);
END_ENTITY; -- 10303-1216: functional_breakdown_mim

ENTITY functional_element_usage
  SUBTYPE OF (breakdown_element_usage);
END_ENTITY; -- 10303-1216: functional_breakdown_mim

ENTITY functionally_defined_transformation;
    name        : label;
    description : OPTIONAL text;
END_ENTITY; -- 10303-43: representation_schema

ENTITY gear
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND (10 <= SIZEOF(pdr.
              used_representation.items))) AND (SIZEOF(pdr.
              used_representation.items) <= 13))) = 1))) = 1;
    WR2: NOT (SELF\characterized_object.description IN [ 
              'straight bevel gear', 'helical bevel gear', 'spur gear', 
              'helical gear' ]) OR (SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RATIO_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'number of teeth'))) = 1
              ))) = 0))) = 0);
    WR3: NOT (SELF\characterized_object.description IN [ 
              'straight bevel gear', 'helical bevel gear', 'spur gear', 
              'helical gear' ]) OR (SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 
              'reference pressure angle'))) = 1))) = 0))) = 0);
    WR4: NOT (SELF\characterized_object.description IN [ 
              'straight bevel gear', 'helical bevel gear', 'spur gear', 
              'helical gear' ]) OR (SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'rake shift factor'))) =
               1))) = 0))) = 0);
    WR5: NOT (SELF\characterized_object.description IN [ 
              'straight bevel gear', 'helical bevel gear', 'spur gear', 
              'helical gear' ]) OR (SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'nominal tooth depth')))
               = 1))) = 0))) = 0);
    WR6: NOT (SELF\characterized_object.description IN [ 
              'straight bevel gear', 'helical bevel gear', 'spur gear', 
              'helical gear' ]) OR (SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'face width'))) = 1))) =
               0))) = 0);
    WR7: NOT (SELF\characterized_object.description IN [ 
              'straight bevel gear', 'helical bevel gear', 'spur gear', 
              'helical gear' ]) OR (SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'tip diameter'))) = 1)))
               = 0))) = 0);
    WR8: NOT (SELF\characterized_object.description IN [ 
              'straight bevel gear', 'helical bevel gear', 'spur gear', 
              'helical gear' ]) OR (SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'module or diametral pitch')) 
              AND ((it.description = 'module') OR (it.description = 
              'diametral pitch')))) = 1))) = 0))) = 0);
    WR9: NOT (SELF\characterized_object.description IN [ 
              'straight bevel gear', 'helical bevel gear', 'spur gear', 
              'helical gear' ]) OR (SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'internal or external gear')) 
              AND ((it.description = 'internal') OR (it.description = 
              'external')))) = 1))) = 0))) = 0);
    WR10: NOT (SELF\characterized_object.description IN [ 
              'straight bevel gear', 'helical bevel gear', 'spur gear', 
              'helical gear' ]) OR (SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'normal attribute'))) = 
              1))) = 0))) = 0);
    WR11: NOT (SELF\characterized_object.description IN [ 
              'straight bevel gear', 'helical bevel gear', 'spur gear', 
              'helical gear' ]) OR (SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'root fillet radius'))) 
              <= 1))) = 0))) = 0);
    WR12: NOT (SELF\characterized_object.description IN [ 'helix gear', 
              'helical bevel gear' ]) OR (SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'reference helix angle')
              )) = 1))) = 0))) = 0);
    WR13: NOT (SELF\characterized_object.description IN [ 'helix gear', 
              'helical bevel gear' ]) OR (SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'gear tooth')) AND ((it.
              description = 'left hand tooth') OR (it.description = 
              'right hand tooth')))) = 1))) = 0))) = 0);
    WR14: NOT (SELF\characterized_object.description IN [ 
              'straight bevel gear', 'helical bevel gear' ]) OR (SIZEOF(
              QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'tip angle'))) = 1))) = 
              0))) = 0);
    WR15: NOT (SELF\characterized_object.description IN [ 
              'straight bevel gear', 'helical bevel gear' ]) OR (SIZEOF(
              QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'root angle'))) = 1))) =
               0))) = 0);
    WR16: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'applied shape') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT' IN
               TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY gear_pair
  SUBTYPE OF (low_order_kinematic_pair_with_motion_coupling);
    radius_first_link  : length_measure;
    radius_second_link : length_measure;
    bevel              : plane_angle_measure;
    helical_angle      : plane_angle_measure;
    gear_ratio         : REAL;
  WHERE
    WR1: SIZEOF(QUERY (lr <* SELF\kinematic_pair.
              associated_link_representations_1| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RIGID_LINK_REPRESENTATION'
               IN TYPEOF(lr)))) = 0;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY gear_pair_value
  SUBTYPE OF (pair_value);
    SELF\pair_value.applies_to_pair : gear_pair;
    actual_rotation_1 : plane_angle_measure;
  DERIVE
    actual_rotation_2 : plane_angle_measure := -actual_rotation_1 * SELF\
                           pair_value.applies_to_pair\gear_pair.gear_ratio;
END_ENTITY; -- 10303-105: kinematic_state_schema

ENTITY gear_pair_with_range
  SUBTYPE OF (gear_pair);
    lower_limit_actual_rotation_1 : OPTIONAL plane_angle_measure;
    upper_limit_actual_rotation_1 : OPTIONAL plane_angle_measure;
  WHERE
    WR1: (NOT EXISTS(lower_limit_actual_rotation_1) OR NOT EXISTS(
              upper_limit_actual_rotation_1)) XOR (
              lower_limit_actual_rotation_1 < upper_limit_actual_rotation_1
              );
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY general_datum_reference
  ABSTRACT SUPERTYPE OF (ONEOF(datum_reference_compartment, 
      datum_reference_element))
  SUBTYPE OF (shape_aspect);
    base      : datum_or_common_datum;
    modifiers : OPTIONAL SET [1:?] OF datum_reference_modifier;
  WHERE
    WR1: SELF\shape_aspect.name = '';
    WR2: NOT EXISTS(SELF\shape_aspect.description);
    WR3: NOT EXISTS(SELF\shape_aspect.id);
    WR4: SELF\shape_aspect.product_definitional = FALSE;
    WR5: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DATUM' IN TYPEOF
              (base)) OR (SELF\shape_aspect.of_shape = base\shape_aspect.
              of_shape);
    WR6: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMMON_DATUM_LIST'
               IN TYPEOF(base)) OR (SELF\shape_aspect.of_shape = base[1]\
              shape_aspect.of_shape);
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY general_feature
  SUBTYPE OF (shape_feature_definition);
  WHERE
    WR1: (SIZEOF(get_property_definition_representations(SELF)) <= 1) AND (
              SIZEOF(QUERY (pdr <* get_property_definition_representations(
              SELF)| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) <= 1);
    WR2: SIZEOF(QUERY (sa <* get_shape_aspects(SELF)| (sa.description = 
              'course of travel occurrence'))) = SIZEOF(QUERY (sa <* 
              get_shape_aspects(SELF)| (sa.description = 
              'course of travel occurrence') AND (SIZEOF(QUERY (sar <* 
              USEDIN(sa, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)) AND (sar.name = 'course of travel'))) = 1)))
              ;
    WR3: SIZEOF(QUERY (sa <* get_shape_aspects(SELF)| (sa.description = 
              'course of travel occurrence'))) = SIZEOF(QUERY (sa <* 
              get_shape_aspects(SELF)| (sa.description = 
              'course of travel occurrence') AND (SIZEOF(QUERY (sar <* 
              USEDIN(sa, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PATH_FEATURE_COMPONENT'
               IN TYPEOF(sar.relating_shape_aspect)))) = 1)));
    WR4: SIZEOF(QUERY (sa <* get_shape_aspects(SELF)| (sa.description = 
              'boundary occurrence'))) = SIZEOF(QUERY (sa <* 
              get_shape_aspects(SELF)| (sa.description = 
              'boundary occurrence') AND (SIZEOF(QUERY (sar <* USEDIN(sa, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)) AND (sar.description = 'profile usage'))) = 
              1)));
    WR5: (SIZEOF(QUERY (sa <* get_shape_aspects(SELF)| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_SHAPE_ASPECT'
               IN TYPEOF(sa)))) <= 1) AND (SIZEOF(QUERY (sa <* 
              get_shape_aspects(SELF)| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_SHAPE_ASPECT'
               IN TYPEOF(sa)) AND (sa.name = 'general compound feature')) 
              AND (SIZEOF(QUERY (sar <* USEDIN(sa, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.INSTANCED_FEATURE'
               IN TYPEOF(sar.related_shape_aspect)))) >= 2))) <= 1);
END_ENTITY; -- 10303-1764: shape_feature_mim

ENTITY general_linear_function
  SUBTYPE OF (maths_function, unary_generic_expression);
    SELF\unary_generic_expression.operand : maths_function;
    sum_index : one_or_two;
  DERIVE
    mat : maths_function := SELF\unary_generic_expression.operand;
  WHERE
    WR1: function_is_2d_table(mat);
    WR2: (space_dimension(mat.range) = 1) AND subspace_of_es(factor1(mat.
              range), es_numbers);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY general_material_property
  SUBTYPE OF (general_property);
  WHERE
    WR1: SIZEOF(QUERY (gpa <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GENERAL_PROPERTY_ASSOCIATION.BASE_DEFINITION'
              )| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MATERIAL_PROPERTY'
               IN TYPEOF(gpa\general_property_association.
              derived_definition)))) = 0;
END_ENTITY; -- 10303-1681: generic_material_aspects_mim

ENTITY general_property;
    id          : identifier;
    name        : label;
    description : OPTIONAL text;
END_ENTITY; -- 10303-41: product_property_definition_schema

ENTITY general_property_association;
    name               : label;
    description        : OPTIONAL text;
    base_definition    : general_property;
    derived_definition : derived_property_select;
  WHERE
    WR1: (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSIONAL_LOCATION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSIONAL_SIZE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_TOLERANCE'
               ] * TYPEOF(derived_definition)) > 0) OR (SIZEOF(USEDIN(
              derived_definition, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GENERAL_PROPERTY_ASSOCIATION.DERIVED_DEFINITION'
              )) = 1);
    WR2: (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSIONAL_LOCATION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSIONAL_SIZE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_TOLERANCE'
               ] * TYPEOF(derived_definition)) > 0) OR (derived_definition.
              name = base_definition.name);
END_ENTITY; -- 10303-41: product_property_definition_schema

ENTITY general_property_relationship;
    name              : label;
    description       : OPTIONAL text;
    relating_property : general_property;
    related_property  : general_property;
END_ENTITY; -- 10303-41: product_property_definition_schema

ENTITY generic_expression
  ABSTRACT SUPERTYPE OF (ONEOF(simple_generic_expression, 
      unary_generic_expression, binary_generic_expression, 
      multiple_arity_generic_expression));
  WHERE
    WR1: is_acyclic(SELF);
END_ENTITY; -- 13584-20: iso13584_generic_expressions_schema

ENTITY generic_literal
  ABSTRACT SUPERTYPE
  SUBTYPE OF (simple_generic_expression);
END_ENTITY; -- 13584-20: iso13584_generic_expressions_schema

ENTITY generic_product_definition_reference
  ABSTRACT SUPERTYPE OF (ONEOF(product_definition_reference, 
      product_definition_reference_with_local_representation));
    source : external_source;
END_ENTITY; -- 10303-41: product_definition_schema

ENTITY generic_variable
  ABSTRACT SUPERTYPE
  SUBTYPE OF (simple_generic_expression);
  INVERSE
    interpretation : environment FOR syntactic_representation;
END_ENTITY; -- 13584-20: iso13584_generic_expressions_schema

ENTITY geometric_alignment
  SUBTYPE OF (derived_shape_aspect);
  WHERE
    WR1: SIZEOF(SELF\derived_shape_aspect.deriving_relationships) > 1;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY geometric_contact
  SUBTYPE OF (derived_shape_aspect);
  WHERE
    WR1: SIZEOF(SELF\derived_shape_aspect.deriving_relationships) = 2;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY geometric_curve_set
  SUBTYPE OF (geometric_set);
  WHERE
    WR1: SIZEOF(QUERY (temp <* SELF\geometric_set.elements| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE' IN TYPEOF
              (temp)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT' IN TYPEOF
              (temp))))) = 0;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY geometric_intersection
  SUBTYPE OF (derived_shape_aspect);
  WHERE
    WR1: SIZEOF(SELF\derived_shape_aspect.deriving_relationships) > 1;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY geometric_item_specific_usage
  SUBTYPE OF (item_identified_representation_usage);
    SELF\item_identified_representation_usage.definition : 
                             geometric_item_specific_usage_select;
    SELF\item_identified_representation_usage.used_representation : 
                             shape_model;
    SELF\item_identified_representation_usage.identified_item : 
                             geometric_model_item;
END_ENTITY; -- 10303-1032: shape_property_assignment_mim

ENTITY geometric_model_element_relationship
  SUBTYPE OF (geometric_representation_item, 
      representation_item_relationship);
    SELF\representation_item_relationship.relating_representation_item : 
                                      geometric_representation_item;
    SELF\representation_item_relationship.related_representation_item : 
                                      geometric_representation_item;
  UNIQUE
    UR1: SELF\representation_item_relationship.relating_representation_item,
         SELF\representation_item_relationship.related_representation_item;
  WHERE
    WR1: SELF\representation_item_relationship.relating_representation_item
               :<>: SELF\representation_item_relationship.
              related_representation_item;
END_ENTITY; -- 10303-1667: extended_basic_geometry_mim

ENTITY geometric_representation_context
  SUPERTYPE OF (ONEOF(geometric_representation_context_with_parameter, 
      path_parameter_representation_context))
  SUBTYPE OF (representation_context);
    coordinate_space_dimension : dimension_count;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY geometric_representation_context_with_parameter
  SUBTYPE OF (geometric_representation_context);
    parameter_unit : OPTIONAL unit;
END_ENTITY; -- 10303-105: kinematic_motion_representation_schema

ENTITY geometric_representation_item
  SUPERTYPE OF ((((((ONEOF(kinematic_path, placement) ANDOR ONEOF(
      rotation_about_direction, su_parameters)) ANDOR ONEOF(curve, 
      externally_defined_hatch_style, externally_defined_tile_style, 
      fill_area_style_hatching, fill_area_style_tile_coloured_region, 
      fill_area_style_tile_curve_with_style, 
      fill_area_style_tile_symbol_with_style, fill_area_style_tiles, 
      one_direction_repeat_factor, point, vector)) ANDOR ONEOF(
      annotation_fill_area, composite_text, curve, defined_character_glyph,
       defined_symbol, point, symbol_target, text_literal)) ANDOR ONEOF(
      camera_model, camera_model_d3_multi_clipping_intersection, 
      camera_model_d3_multi_clipping_union, curve, direction, light_source)
      ) ANDOR ONEOF(point, direction, vector, placement, 
      cartesian_transformation_operator, curve, surface, edge_curve, 
      face_surface, poly_loop, vertex_point, solid_model, boolean_result, 
      sphere, right_circular_cone, right_circular_cylinder, torus, block, 
      right_angular_wedge, ellipsoid, faceted_primitive, 
      rectangular_pyramid, cyclide_segment_solid, volume, half_space_solid,
       shell_based_surface_model, face_based_surface_model, 
      shell_based_wireframe_model, edge_based_wireframe_model, 
      geometric_set, tessellated_item, volume_with_faces, scanned_data_item
      )) ANDOR ONEOF(curve, planar_extent))
  SUBTYPE OF (representation_item);
  DERIVE
    dim : dimension_count := dimension_of(SELF);
  WHERE
    WR1: SIZEOF(QUERY (using_rep <* using_representations(SELF)| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_REPRESENTATION_CONTEXT'
               IN TYPEOF(using_rep.context_of_items)))) = 0;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY geometric_set
  SUPERTYPE OF (ONEOF(geometric_curve_set))
  SUBTYPE OF (geometric_representation_item);
    elements : SET [1:?] OF geometric_set_select;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY geometric_tolerance
  ABSTRACT SUPERTYPE OF ((((geometric_tolerance_with_datum_reference ANDOR 
      geometric_tolerance_with_defined_unit) ANDOR ONEOF(
      geometric_tolerance_with_modifiers, modified_geometric_tolerance)) 
      ANDOR unequally_disposed_geometric_tolerance) ANDOR ONEOF(
      cylindricity_tolerance, flatness_tolerance, line_profile_tolerance, 
      position_tolerance, roundness_tolerance, straightness_tolerance, 
      surface_profile_tolerance));
    name                    : label;
    description             : OPTIONAL text;
    magnitude               : OPTIONAL length_measure_with_unit;
    toleranced_shape_aspect : geometric_tolerance_target;
  DERIVE
    controlling_shape : product_definition_shape := 
                           sts_get_product_definition_shape(
                           toleranced_shape_aspect);
    id                : identifier := get_id_value(SELF);
  INVERSE
    auxiliary_classification : SET [0:?] OF 
                                  geometric_tolerance_auxiliary_classification
                                   FOR described_item;
    tolerance_relationship   : SET [0:?] OF 
                                  geometric_tolerance_relationship FOR 
                                  relating_geometric_tolerance;
  UNIQUE
    UR1: id, controlling_shape;
  WHERE
    WR1: magnitude\measure_with_unit.value_component >= 0.0;
    WR2: EXISTS(controlling_shape);
    WR3: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP'
               IN TYPEOF(toleranced_shape_aspect)) OR (
              toleranced_shape_aspect\shape_aspect_relationship.
              relating_shape_aspect.of_shape :=: toleranced_shape_aspect\
              shape_aspect_relationship.related_shape_aspect.of_shape);
    WR4: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ID_ATTRIBUTE.IDENTIFIED_ITEM'
              )) <= 1;
    WR5: SIZEOF(QUERY (tr <* tolerance_relationship| (tr.name = 
              'composite tolerance'))) <= 1;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY geometric_tolerance_auxiliary_classification;
    attribute_value : geometric_tolerance_auxiliary_classification_enum;
    described_item  : geometric_tolerance;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY geometric_tolerance_relationship;
    name                         : label;
    description                  : text;
    relating_geometric_tolerance : geometric_tolerance;
    related_geometric_tolerance  : geometric_tolerance;
  WHERE
    WR1: ((NOT (name = 'composite tolerance') OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITION_TOLERANCE'
               IN TYPEOF(relating_geometric_tolerance)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITION_TOLERANCE'
               IN TYPEOF(related_geometric_tolerance))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINE_PROFILE_TOLERANCE'
               IN TYPEOF(relating_geometric_tolerance)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINE_PROFILE_TOLERANCE'
               IN TYPEOF(related_geometric_tolerance))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_PROFILE_TOLERANCE'
               IN TYPEOF(relating_geometric_tolerance)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_PROFILE_TOLERANCE'
               IN TYPEOF(related_geometric_tolerance));
    WR2: NOT (name = 'composite tolerance') OR (
              relating_geometric_tolerance\geometric_tolerance.
              toleranced_shape_aspect :=: related_geometric_tolerance\
              geometric_tolerance.toleranced_shape_aspect);
    WR3: acyclic_geometric_tolerance_relationship(SELF, [ 
              related_geometric_tolerance ], 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_TOLERANCE'
              );
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY geometric_tolerance_with_datum_reference
  SUPERTYPE OF (ONEOF(angularity_tolerance, circular_runout_tolerance, 
      coaxiality_tolerance, concentricity_tolerance, parallelism_tolerance,
       perpendicularity_tolerance, symmetry_tolerance, 
      total_runout_tolerance))
  SUBTYPE OF (geometric_tolerance);
    datum_system : SET [1:?] OF datum_system_or_reference;
  WHERE
    WR1: (SIZEOF(QUERY (ds <* datum_system| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DATUM_SYSTEM' IN
               TYPEOF(ds)))) = 0) OR (SIZEOF(datum_system) = 1);
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY geometric_tolerance_with_defined_area_unit
  SUBTYPE OF (geometric_tolerance_with_defined_unit);
    area_type        : area_unit_type;
    second_unit_size : OPTIONAL 
                          length_or_plane_angle_measure_with_unit_select;
  WHERE
    WR1: NOT (EXISTS(second_unit_size) XOR (area_type IN [ area_unit_type.
              rectangular, area_unit_type.cylindrical, area_unit_type.
              spherical ]));
    WR2: NOT (area_type = area_unit_type.cylindrical) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(unit_size)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               IN TYPEOF(second_unit_size));
    WR3: NOT (area_type = area_unit_type.rectangular) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(unit_size)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(second_unit_size));
    WR4: NOT (area_type = area_unit_type.spherical) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               IN TYPEOF(unit_size)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               IN TYPEOF(second_unit_size));
    WR5: NOT (area_type = area_unit_type.spherical) OR (SIZEOF(QUERY (tz <*
               USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TOLERANCE_ZONE.DEFINING_TOLERANCE'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORIENTED_TOLERANCE_ZONE'
               IN TYPEOF(tz)))) <> 0);
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY geometric_tolerance_with_defined_unit
  SUBTYPE OF (geometric_tolerance);
    unit_size : length_or_plane_angle_measure_with_unit_select;
  WHERE
    WR1: ('NUMBER' IN TYPEOF(unit_size\measure_with_unit.value_component)) 
              AND (unit_size\measure_with_unit.value_component > 0.0);
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY geometric_tolerance_with_maximum_tolerance
  SUBTYPE OF (geometric_tolerance_with_modifiers);
    maximum_upper_tolerance : length_measure_with_unit;
  WHERE
    WR1: (geometric_tolerance_modifier.maximum_material_requirement IN SELF
              \geometric_tolerance_with_modifiers.modifiers) OR (
              geometric_tolerance_modifier.least_material_requirement IN 
              SELF\geometric_tolerance_with_modifiers.modifiers);
    WR2: (maximum_upper_tolerance\measure_with_unit.unit_component = SELF\
              geometric_tolerance.magnitude\measure_with_unit.
              unit_component) AND (maximum_upper_tolerance\
              measure_with_unit.value_component > SELF\geometric_tolerance.
              magnitude\measure_with_unit.value_component);
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY geometric_tolerance_with_modifiers
  SUBTYPE OF (geometric_tolerance);
    modifiers : SET [1:?] OF geometric_tolerance_modifier;
  WHERE
    WR1: NOT (geometric_tolerance_modifier.circle_a IN modifiers) OR ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT' IN
               TYPEOF(SELF\geometric_tolerance.toleranced_shape_aspect)) 
              AND (SELF\geometric_tolerance.toleranced_shape_aspect\
              shape_aspect.product_definitional = TRUE) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSIONAL_SIZE'
               IN TYPEOF(SELF\geometric_tolerance.toleranced_shape_aspect))
              );
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY geometrical_tolerance_callout
  SUBTYPE OF (draughting_callout);
END_ENTITY; -- 10303-506: aic_draughting_elements

ENTITY geometrically_bounded_surface_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(QUERY (it <* SELF.items| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_SET', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               ] * TYPEOF(it)) = 1))) = 0;
    WR2: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_SET', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' ] *
               TYPEOF(it)) = 1))) > 0;
    WR3: SIZEOF(QUERY (mi <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(it)))| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRICALLY_BOUNDED_SURFACE_SHAPE_REPRESENTATION'
               IN TYPEOF(mi\mapped_item.mapping_source.
              mapped_representation)) AND (SIZEOF(QUERY (mr_it <* mi\
              mapped_item.mapping_source.mapped_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_SET' 
              IN TYPEOF(mr_it)))) > 0)))) = 0;
    WR4: SIZEOF(QUERY (gs <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_SET' 
              IN TYPEOF(it)))| NOT (SIZEOF(QUERY (pnt <* QUERY (gsel <* gs\
              geometric_set.elements| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT' IN TYPEOF
              (gsel)))| NOT gbsf_check_point(pnt))) = 0))) = 0;
    WR5: SIZEOF(QUERY (gs <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_SET' 
              IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cv <* QUERY (gsel <* gs\
              geometric_set.elements| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE' IN TYPEOF
              (gsel)))| NOT gbsf_check_curve(cv))) = 0))) = 0;
    WR6: SIZEOF(QUERY (gs <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_SET' 
              IN TYPEOF(it)))| NOT (SIZEOF(QUERY (sf <* QUERY (gsel <* gs\
              geometric_set.elements| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE' IN 
              TYPEOF(gsel)))| NOT gbsf_check_surface(sf))) = 0))) = 0;
    WR7: SIZEOF(QUERY (gs <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_SET' 
              IN TYPEOF(it)))| (SIZEOF(QUERY (gsel <* gs\geometric_set.
              elements| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE' IN 
              TYPEOF(gsel)))) > 0))) > 0;
END_ENTITY; -- 10303-507: aic_geometrically_bounded_surface

ENTITY geometrically_bounded_wireframe_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(QUERY (it <* SELF.items| NOT (SIZEOF(TYPEOF(it) * [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_CURVE_SET'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' ]
              ) = 1))) = 0;
    WR2: SIZEOF(QUERY (it <* SELF.items| (SIZEOF(TYPEOF(it) * [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_CURVE_SET'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' ]
              ) = 1))) >= 1;
    WR3: SIZEOF(QUERY (gcs <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_CURVE_SET'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (crv <* QUERY (elem <* 
              gcs\geometric_set.elements| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE' IN TYPEOF
              (elem)))| NOT valid_geometrically_bounded_wf_curve(crv))) = 0
              ))) = 0;
    WR4: SIZEOF(QUERY (gcs <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_CURVE_SET'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (pnts <* QUERY (elem <* 
              gcs\geometric_set.elements| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT' IN TYPEOF
              (elem)))| NOT valid_geometrically_bounded_wf_point(pnts))) = 
              0))) = 0;
    WR5: SIZEOF(QUERY (gcs <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_CURVE_SET'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cnc <* QUERY (elem <* 
              gcs\geometric_set.elements| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONIC' IN TYPEOF
              (elem)))| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               IN TYPEOF(cnc\conic.position)))) = 0))) = 0;
    WR6: SIZEOF(QUERY (gcs <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_CURVE_SET'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (pline <* QUERY (elem <* 
              gcs\geometric_set.elements| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE' IN 
              TYPEOF(elem)))| NOT (SIZEOF(pline\polyline.points) > 2))) = 0
              ))) = 0;
    WR7: SIZEOF(QUERY (mi <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(it)))| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRICALLY_BOUNDED_WIREFRAME_SHAPE_REPRESENTATION'
               IN TYPEOF(mi\mapped_item.mapping_source.
              mapped_representation)))) = 0;
END_ENTITY; -- 10303-510: aic_geometrically_bounded_wireframe

ENTITY global_uncertainty_assigned_context
  SUBTYPE OF (representation_context);
    uncertainty : SET [1:?] OF uncertainty_measure_with_unit;
END_ENTITY; -- 10303-43: representation_schema

ENTITY global_unit_assigned_context
  SUBTYPE OF (representation_context);
    units : SET [1:?] OF unit;
END_ENTITY; -- 10303-41: measure_schema

ENTITY gps_filter;
    filter_type : gps_filtration_type;
    filter_data : LIST [1:?] OF measure_with_unit;
  INVERSE
    owner : gps_filtration_specification FOR filter_data;
  WHERE
    WR1: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_TOLERANCE_WITH_MODIFIERS'
               IN TYPEOF(owner\gps_filtration_specification.base_target)) 
              OR (SIZEOF([ geometric_tolerance_modifier.
              reference_minimax_feature_without_constraint, 
              geometric_tolerance_modifier.
              reference_minimax_feature_with_external_material_constraint, 
              geometric_tolerance_modifier.
              reference_minimax_feature_with_internal_material_constraint, 
              geometric_tolerance_modifier.
              reference_least_square_feature_without_constraint, 
              geometric_tolerance_modifier.
              reference_least_square_feature_with_external_material_constraint
              , geometric_tolerance_modifier.
              reference_least_square_feature_with_internal_material_constraint
              , geometric_tolerance_modifier.
              reference_minimum_circumscribed_feature, 
              geometric_tolerance_modifier.
              reference_maximum_inscribed_feature, 
              geometric_tolerance_modifier.total_range_deviations, 
              geometric_tolerance_modifier.peak_height, 
              geometric_tolerance_modifier.valley_depth, 
              geometric_tolerance_modifier.standard_deviation ] * owner\
              gps_filtration_specification.base_target\
              geometric_tolerance_with_modifiers.modifiers) <> 0);
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY gps_filtration_specification;
    base_target : gps_filtration_specification_target;
    filter_data : LIST [1:?] OF gps_filter;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY grooving_turning_operation
  SUBTYPE OF (turning_type_operation);
  WHERE
    WR1: SELF.description IN [ 'roughing', 'finishing', 'cutting in' ];
    WR2: verify_optional_action_property(SELF, 'dwell') AND 
              verify_rep_type_for_action_property(SELF, 'dwell', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_DWELL_TIME_REPRESENTATION'
               ]);
    WR3: verify_optional_action_property(SELF, 'allowance') AND 
              verify_length_measure_action_property(SELF, 'allowance');
    WR4: NOT (SELF.description = 'roughing') OR 
              verify_required_action_property(SELF, 'allowance');
    WR5: NOT (SELF.description = 'cutting in') OR (0 = SIZEOF(
              get_action_property(SELF, 'allowance')));
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY group;
    name        : label;
    description : OPTIONAL text;
  DERIVE
    id : identifier := get_id_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ID_ATTRIBUTE.IDENTIFIED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: group_schema

ENTITY group_assignment
  ABSTRACT SUPERTYPE;
    assigned_group : group;
  DERIVE
    role : object_role := get_role(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROLE_ASSOCIATION.ITEM_WITH_ROLE'
              )) <= 1;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY group_relationship;
    name           : label;
    description    : OPTIONAL text;
    relating_group : group;
    related_group  : group;
END_ENTITY; -- 10303-41: group_schema

ENTITY half_space_solid
  SUBTYPE OF (geometric_representation_item);
    base_surface   : surface;
    agreement_flag : BOOLEAN;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY hardness_representation
  SUBTYPE OF (representation);
  WHERE
    WR1: ((2 <= SIZEOF(SELF.items)) AND (SIZEOF(SELF.items) <= 4)) AND (
              SIZEOF(QUERY (i <* items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(i)) AND (i.name IN [ 'measuring method', 
              'measuring position' ]))) + SIZEOF(QUERY (i <* items| (SIZEOF
              ([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VALUE_RANGE' ]
               * TYPEOF(i)) = 1) AND (i.name IN [ 'depth', 'hardness' ]))) 
              = SIZEOF(SELF.items));
    WR2: SIZEOF(QUERY (i <* SELF.items| (i.name = 'measuring method'))) = 1
              ;
    WR3: SIZEOF(QUERY (i <* SELF.items| (i.name = 'hardness'))) = 1;
    WR4: SIZEOF(QUERY (i <* SELF.items| (i.name = 'measuring position'))) 
              <= 1;
    WR5: SIZEOF(QUERY (i <* SELF.items| (i.name = 'depth'))) <= 1;
    WR6: (SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION'
              )) = 1) AND (SIZEOF(QUERY (pdr <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION'
              )| (SIZEOF(QUERY (gpa <* USEDIN(pdr.definition, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GENERAL_PROPERTY_ASSOCIATION.DERIVED_DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GENERAL_PROPERTY'
               IN TYPEOF(gpa.base_definition)) AND (gpa\
              general_property_association.base_definition\general_property
              .name = 'surface_condition'))) = 1))) = 1);
END_ENTITY; -- 10303-1110: surface_conditions_mim

ENTITY hexahedron_volume
  SUBTYPE OF (volume);
    points : LIST [8:8] OF cartesian_point;
  WHERE
    WR1: above_plane(points[1], points[2], points[3], points[4]) = 0.0;
    WR2: above_plane(points[5], points[8], points[7], points[6]) = 0.0;
    WR3: above_plane(points[1], points[4], points[8], points[5]) = 0.0;
    WR4: above_plane(points[4], points[3], points[7], points[8]) = 0.0;
    WR5: above_plane(points[3], points[2], points[6], points[7]) = 0.0;
    WR6: above_plane(points[1], points[5], points[6], points[2]) = 0.0;
    WR7: same_side([ points[1], points[2], points[3] ], [ points[5], points
              [6], points[7], points[8] ]);
    WR8: same_side([ points[1], points[4], points[8] ], [ points[3], points
              [7], points[6], points[2] ]);
    WR9: same_side([ points[1], points[2], points[5] ], [ points[3], points
              [7], points[8], points[4] ]);
    WR10: same_side([ points[5], points[6], points[7] ], [ points[1], 
              points[2], points[3], points[4] ]);
    WR11: same_side([ points[3], points[7], points[6] ], [ points[1], 
              points[4], points[8], points[5] ]);
    WR12: same_side([ points[3], points[7], points[8] ], [ points[1], 
              points[5], points[6], points[2] ]);
    WR13: points[1].dim = 3;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY hidden_element_over_riding_styled_item
  SUBTYPE OF (context_dependent_over_riding_styled_item);
    SELF\context_dependent_over_riding_styled_item.style_context : LIST [1:
                       1] OF presentation_view;
    SELF\styled_item.item : camera_image;
  INVERSE
    container : SET [1:?] OF presentation_view FOR items;
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CAMERA_MODEL_D3_WITH_HLHSR'
               IN TYPEOF(SELF.item\mapped_item.mapping_source.
              mapping_origin);
END_ENTITY; -- 10303-1316: camera_view_3d_mim

ENTITY high_order_kinematic_pair
  ABSTRACT SUPERTYPE OF (ONEOF(linear_flexible_and_planar_curve_pair, 
      point_on_surface_pair, point_on_planar_curve_pair, planar_curve_pair,
       surface_pair))
  SUBTYPE OF (kinematic_pair);
  WHERE
    WR1: SIZEOF(QUERY (lr <* SELF\kinematic_pair.
              associated_link_representations_2| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RIGID_LINK_REPRESENTATION'
               IN TYPEOF(lr)))) = 0;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY hole_bottom
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_DEFINITION'
               IN TYPEOF(SELF.of_shape.definition);
    WR2: SELF.description IN [ 'through', 'flat', 'flat with radius', 
              'flat with taper', 'spherical', 'conical' ];
    WR3: NOT (SELF.description = 'through') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )) = 0))) = 0);
    WR4: NOT (SELF.description IN [ 'flat with radius', 'flat with taper', 
              'spherical', 'conical' ]) OR (SIZEOF(QUERY (pd <* USEDIN(SELF
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0);
    WR5: NOT (SELF.description = 'flat') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 0))) = 0))) = 0);
    WR6: NOT (SELF.description IN [ 'flat with radius', 'spherical' ]) OR (
              SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 1))) = 0))) = 0);
    WR7: NOT (SELF.description = 'flat with taper') OR (SIZEOF(QUERY (pd <*
               USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 2))) = 0))) = 0);
    WR8: NOT (SELF.description = 'conical') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) >= 1) AND (SIZEOF(impl_rep.
              used_representation.items) <= 2))) = 0))) = 0);
    WR9: (SELF.description = 'through') OR (SIZEOF(QUERY (fcr <* QUERY (sar
               <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (sar.description = 'hole bottom usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| (fcr.name IN [ 'hole depth start', 
              'hole depth end' ]))) >= 1);
    WR10: NOT (SELF.description = 'flat with radius') OR (SIZEOF(QUERY (pd 
              <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'corner radius'))) = 1))
              ) = 0))) = 0);
    WR11: NOT (SELF.description = 'spherical') OR (SIZEOF(QUERY (pd <* 
              USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'radius'))) = 1))) = 0))
              ) = 0);
    WR12: NOT (SELF.description = 'conical') OR (SIZEOF(QUERY (pd <* USEDIN
              (SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'tip radius'))) <= 1))) 
              = 0))) = 0);
    WR13: NOT (SELF.description = 'conical') OR (SIZEOF(QUERY (pd <* USEDIN
              (SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'tip angle'))) = 1))) = 
              0))) = 0);
    WR14: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (sar.description = 'hole bottom usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| ((fcr.related_shape_aspect.description = 
              'bottom condition occurrence') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROUND_HOLE' IN 
              TYPEOF(fcr.related_shape_aspect.of_shape.definition))) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.HOLE_BOTTOM' IN 
              TYPEOF(fcr.relating_shape_aspect)))) >= 1;
    WR15: NOT (SELF.description = 'flat with taper') OR (SIZEOF(QUERY (pd 
              <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'final diameter'))) = 1)
              )) = 0))) = 0);
    WR16: NOT (SELF.description = 'flat with taper') OR (SIZEOF(QUERY (pd 
              <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'taper diameter'))) = 1)
              )) = 0))) = 0);
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY homogeneous_linear_function
  SUBTYPE OF (maths_function, unary_generic_expression);
    SELF\unary_generic_expression.operand : maths_function;
    sum_index : one_or_two;
  DERIVE
    mat : maths_function := SELF\unary_generic_expression.operand;
  WHERE
    WR1: function_is_2d_table(mat);
    WR2: (space_dimension(mat.range) = 1) AND subspace_of_es(factor1(mat.
              range), es_numbers);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY homokinetic_pair
  SUBTYPE OF (universal_pair);
  WHERE
    WR1: NOT EXISTS(SELF.input_skew_angle);
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY hyperbola
  SUBTYPE OF (conic);
    semi_axis      : positive_length_measure;
    semi_imag_axis : positive_length_measure;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY id_attribute;
    attribute_value : identifier;
    identified_item : id_attribute_select;
END_ENTITY; -- 10303-41: basic_attribute_schema

ENTITY identification_assignment
  ABSTRACT SUPERTYPE;
    assigned_id : identifier;
    role        : identification_role;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY identification_role;
    name        : label;
    description : OPTIONAL text;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY idrm_classification_assignment
  SUBTYPE OF (classification_assignment);
    items : SET [1:?] OF idrm_marked_item;
END_ENTITY; -- 10303-1349: incomplete_data_reference_mechanism_mim

ENTITY illuminance_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ILLUMINANCE_UNIT' IN 
              TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY illuminance_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensions_for_si_unit(
              si_unit_name.lux);
END_ENTITY; -- 10303-41: measure_schema

ENTITY imported_curve_function
  SUBTYPE OF (maths_function, generic_literal);
    geometry          : curve;
    parametric_domain : tuple_space;
  WHERE
    WR1: expression_is_constant(parametric_domain);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY imported_point_function
  SUBTYPE OF (maths_function, generic_literal);
    geometry : point;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY imported_surface_function
  SUBTYPE OF (maths_function, generic_literal);
    geometry          : surface;
    parametric_domain : tuple_space;
  WHERE
    WR1: expression_is_constant(parametric_domain);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY imported_volume_function
  SUBTYPE OF (maths_function, generic_literal);
    geometry          : volume;
    parametric_domain : tuple_space;
  WHERE
    WR1: expression_is_constant(parametric_domain);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY included_text_block
  SUBTYPE OF (mapped_item);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STRUCTURED_TEXT_REPRESENTATION'
               IN TYPEOF(SELF\mapped_item.mapping_source.
              mapped_representation);
END_ENTITY; -- 10303-1366: tagged_text_representation_mim

ENTITY inclusion_product_concept_feature
  SUBTYPE OF (conditional_concept_feature);
  WHERE
    WR1: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PACKAGE_PRODUCT_CONCEPT_FEATURE'
               IN TYPEOF(SELF));
    WR2: SIZEOF(QUERY (cfr <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONCEPT_FEATURE_RELATIONSHIP.RELATING_PRODUCT_CONCEPT_FEATURE'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONCEPT_FEATURE_RELATIONSHIP_WITH_CONDITION'
               IN TYPEOF(cfr)))) + SIZEOF(QUERY (cfr <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONCEPT_FEATURE_RELATIONSHIP.RELATED_PRODUCT_CONCEPT_FEATURE'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONCEPT_FEATURE_RELATIONSHIP_WITH_CONDITION'
               IN TYPEOF(cfr)))) = 0;
    WR3: SELF.condition.conditional_operator.name = 'implication';
END_ENTITY; -- 10303-1103: product_class_mim

ENTITY index_expression
  SUBTYPE OF (string_expression, binary_generic_expression);
  DERIVE
    operand : generic_expression := SELF\binary_generic_expression.operands
                 [1];
    index   : generic_expression := SELF\binary_generic_expression.operands
                 [2];
  WHERE
    WR1: ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STRING_EXPRESSION' 
              IN TYPEOF(operand)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NUMERIC_EXPRESSION'
               IN TYPEOF(index));
    WR2: is_int_expr(index);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY inductance_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.INDUCTANCE_UNIT' IN 
              TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY inductance_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensions_for_si_unit(
              si_unit_name.henry);
END_ENTITY; -- 10303-41: measure_schema

ENTITY information_right
  SUBTYPE OF (action_method);
END_ENTITY; -- 10303-1241: information_rights_mim

ENTITY information_usage_right
  SUBTYPE OF (action_method);
END_ENTITY; -- 10303-1241: information_rights_mim

ENTITY instance_usage_context_assignment
  SUBTYPE OF (product_definition_context);
    items : SET [1:?] OF instance_usage_context_select;
END_ENTITY; -- 10303-1112: specification_control_mim

ENTITY instanced_feature
  SUBTYPE OF (feature_definition, shape_aspect);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION' 
              IN TYPEOF(SELF.of_shape.definition);
    WR2: SELF.product_definitional;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY int_literal
  SUBTYPE OF (literal_number);
    SELF\literal_number.the_value : INTEGER;
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY int_numeric_variable
  SUBTYPE OF (numeric_variable);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY int_value_function
  SUBTYPE OF (value_function);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY integer_defined_function
  ABSTRACT SUPERTYPE
  SUBTYPE OF (numeric_defined_function);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY integer_interval_from_min
  SUBTYPE OF (maths_space, generic_literal);
    min : INTEGER;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY integer_interval_to_max
  SUBTYPE OF (maths_space, generic_literal);
    max : INTEGER;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY integer_representation_item
  SUBTYPE OF (representation_item, int_literal);
END_ENTITY; -- 10303-1773: basic_data_representation_mim

ENTITY integer_tuple_literal
  SUBTYPE OF (generic_literal);
    lit_value : LIST [1:?] OF INTEGER;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY interpolated_configuration_representation
  SUBTYPE OF (representation);
    SELF\representation.context_of_items : 
                          geometric_representation_context_with_parameter;
    SELF\representation.items : SET [1:?] OF 
                          interpolated_configuration_sequence;
END_ENTITY; -- 10303-105: kinematic_motion_representation_schema

ENTITY interpolated_configuration_segment
  SUBTYPE OF (founded_item);
    state         : mechanism_state_representation;
    t_parameter   : parameter_value;
    interpolation : interpolation_type;
END_ENTITY; -- 10303-105: kinematic_motion_representation_schema

ENTITY interpolated_configuration_sequence
  SUBTYPE OF (geometric_representation_item);
    segments : LIST [2:?] OF interpolated_configuration_segment;
  DERIVE
    n_segments           : INTEGER := SIZEOF(segments);
    closed_interpolation : LOGICAL := segments[n_segments].interpolation <>
                               discontinuous_interpolation_type;
    configured_mechanism : mechanism_representation := segments[1].state.
                              represented_mechanism;
  WHERE
    WR1: SIZEOF(QUERY (ics <* segments| (ics.state.represented_mechanism 
              :<>: configured_mechanism))) = 0;
END_ENTITY; -- 10303-105: kinematic_motion_representation_schema

ENTITY intersection_curve
  SUBTYPE OF (surface_curve);
  WHERE
    WR1: SIZEOF(SELF\surface_curve.associated_geometry) = 2;
    WR2: associated_surface(SELF\surface_curve.associated_geometry[1]) <> 
              associated_surface(SELF\surface_curve.associated_geometry[2])
              ;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY interval_expression
  SUBTYPE OF (boolean_expression, multiple_arity_generic_expression);
  DERIVE
    interval_low  : generic_expression := SELF\
                       multiple_arity_generic_expression.operands[1];
    interval_item : generic_expression := SELF\
                       multiple_arity_generic_expression.operands[2];
    interval_high : generic_expression := SELF\
                       multiple_arity_generic_expression.operands[3];
  WHERE
    WR1: (('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPRESSION' IN 
              TYPEOF(interval_low)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPRESSION' IN 
              TYPEOF(interval_item))) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPRESSION' IN 
              TYPEOF(interval_high));
    WR2: (('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STRING_EXPRESSION' 
              IN TYPEOF(SELF.interval_low)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STRING_EXPRESSION'
               IN TYPEOF(SELF.interval_high))) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STRING_EXPRESSION'
               IN TYPEOF(SELF.interval_item)) OR ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NUMERIC_EXPRESSION'
               IN TYPEOF(SELF.interval_low)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NUMERIC_EXPRESSION'
               IN TYPEOF(SELF.interval_item))) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NUMERIC_EXPRESSION'
               IN TYPEOF(SELF.interval_high));
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY invisibility;
    invisible_items : SET [1:?] OF invisible_item;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY item_defined_transformation;
    name             : label;
    description      : OPTIONAL text;
    transform_item_1 : representation_item;
    transform_item_2 : representation_item;
END_ENTITY; -- 10303-43: representation_schema

ENTITY item_identified_representation_usage;
    name                : label;
    description         : OPTIONAL text;
    definition          : item_identified_representation_usage_definition;
    used_representation : representation;
    identified_item     : item_identified_representation_usage_select;
  UNIQUE
    UR1: used_representation, identified_item;
    UR2: used_representation, definition;
  WHERE
    WR1: valid_identified_item_in_representation(identified_item, 
              used_representation);
END_ENTITY; -- 10303-41: product_property_representation_schema

ENTITY item_link_motion_relationship
  SUBTYPE OF (link_motion_relationship);
    SELF\representation_relationship.rep_1 : shape_representation;
    item  : geometric_representation_item;
END_ENTITY; -- 10303-105: kinematic_motion_representation_schema

ENTITY kinematic_analysis_consistency;
    control : kinematic_control;
    result  : kinematic_analysis_result;
  WHERE
    WR1: control.controlled_mechanism :=: result.analysed_mechanism;
END_ENTITY; -- 10303-105: kinematic_analysis_control_and_result_schema

ENTITY kinematic_analysis_result;
    analysed_mechanism : mechanism_representation;
    result             : kinematic_result;
END_ENTITY; -- 10303-105: kinematic_analysis_control_and_result_schema

ENTITY kinematic_control;
    controlled_mechanism         : mechanism_representation;
    contained_kinematic_programs : kinematic_analysis_definition;
END_ENTITY; -- 10303-105: kinematic_analysis_control_and_result_schema

ENTITY kinematic_joint
  SUBTYPE OF (edge);
    SELF\edge.edge_start : kinematic_link;
    SELF\edge.edge_end : kinematic_link;
  UNIQUE
    UR1: edge_start, edge_end;
  WHERE
    WR1: edge_start :<>: edge_end;
END_ENTITY; -- 10303-105: kinematic_topology_schema

ENTITY kinematic_link
  SUBTYPE OF (vertex);
END_ENTITY; -- 10303-105: kinematic_topology_schema

ENTITY kinematic_link_representation
  ABSTRACT SUPERTYPE OF (ONEOF(linear_flexible_link_representation, 
      rigid_link_representation))
  SUBTYPE OF (representation);
    SELF\representation.context_of_items : geometric_representation_context
                          ;
    SELF\representation.items : SET [1:?] OF 
                          kinematic_link_representation_items;
    represented_link : kinematic_link;
  INVERSE
    associated_shape_representation : SET [0:1] OF 
                                         kinematic_link_representation_association
                                          FOR rep_1;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY kinematic_link_representation_association
  SUBTYPE OF (representation_relationship);
    SELF\representation_relationship.rep_1 : kinematic_link_representation;
    SELF\representation_relationship.rep_2 : shape_representation;
  WHERE
    WR1: (SELF\representation_relationship.rep_2.context_of_items :=: SELF\
              representation_relationship.rep_1.context_of_items) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION'
               IN TYPEOF(SELF));
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY kinematic_loop
  SUBTYPE OF (edge_loop);
    SELF\path.edge_list : LIST [1:?] OF UNIQUE oriented_joint;
END_ENTITY; -- 10303-105: kinematic_topology_schema

ENTITY kinematic_pair
  ABSTRACT SUPERTYPE OF (ONEOF(high_order_kinematic_pair, 
      low_order_kinematic_pair_with_motion_coupling, 
      low_order_kinematic_pair) ANDOR actuated_kinematic_pair)
  SUBTYPE OF (geometric_representation_item, item_defined_transformation);
    joint            : kinematic_joint;
    SELF\item_defined_transformation.transform_item_1 : rigid_placement;
    SELF\item_defined_transformation.transform_item_2 : rigid_placement;
  DERIVE
    associated_link_representations_1 : SET [1:?] OF 
                                           kinematic_link_representation :=
                                            sort_link_associations(
                                           link_representation_associations
                                           , TRUE);
    associated_link_representations_2 : SET [1:?] OF 
                                           kinematic_link_representation :=
                                            sort_link_associations(
                                           link_representation_associations
                                           , FALSE);
    SELF\item_defined_transformation.name : label := SELF\
                                           representation_item.name;
  INVERSE
    link_representation_associations : SET [1:?] OF 
                                          pair_representation_relationship 
                                          FOR transformation_operator;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY kinematic_path
  ABSTRACT SUPERTYPE OF (ONEOF(kinematic_path_defined_by_nodes, 
      kinematic_path_defined_by_curves))
  SUBTYPE OF (geometric_representation_item);
    segments : LIST [1:?] OF kinematic_path_segment;
    t_start  : parameter_value;
  DERIVE
    n_segments  : INTEGER := SIZEOF(segments);
    closed_path : LOGICAL := segments[n_segments].transition <> 
                     discontinuous;
  WHERE
    WR1: SIZEOF(QUERY (using_rep <* using_representations(SELF)| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_REPRESENTATION_CONTEXT_WITH_PARAMETER'
               IN TYPEOF(using_rep.context_of_items)))) = 0;
END_ENTITY; -- 10303-105: kinematic_motion_representation_schema

ENTITY kinematic_path_defined_by_curves
  SUBTYPE OF (kinematic_path);
    SELF\kinematic_path.segments : LIST [1:?] OF 
                  curve_based_path_with_orientation;
END_ENTITY; -- 10303-105: kinematic_motion_representation_schema

ENTITY kinematic_path_defined_by_nodes
  SUBTYPE OF (kinematic_path);
    SELF\kinematic_path.segments : LIST [1:?] OF path_node;
    placement_start : placement;
END_ENTITY; -- 10303-105: kinematic_motion_representation_schema

ENTITY kinematic_path_segment
  ABSTRACT SUPERTYPE OF (ONEOF(path_node, curve_based_path_with_orientation
      ))
  SUBTYPE OF (founded_item);
    t_end      : parameter_value;
    transition : transition_code;
END_ENTITY; -- 10303-105: kinematic_motion_representation_schema

ENTITY kinematic_property_definition_representation
  ABSTRACT SUPERTYPE OF (ONEOF(kinematic_property_topology_representation, 
      kinematic_property_mechanism_representation))
  SUBTYPE OF (property_definition_representation);
    SELF\property_definition_representation.definition : 
                    product_definition_kinematics;
END_ENTITY; -- 10303-105: kinematic_property_schema

ENTITY kinematic_property_mechanism_representation
  SUBTYPE OF (kinematic_property_definition_representation);
    SELF\property_definition_representation.used_representation : 
                             mechanism_representation;
    base                : kinematic_link_representation;
  WHERE
    WR1: SIZEOF(QUERY (i <* used_representation.items| (base :=: i\
              representation_relationship.rep_1) OR (base :=: i\
              representation_relationship.rep_2))) > 0;
END_ENTITY; -- 10303-105: kinematic_property_schema

ENTITY kinematic_property_topology_representation
  SUBTYPE OF (kinematic_property_definition_representation);
    SELF\property_definition_representation.used_representation : 
                             kinematic_topology_representation_select;
    base                : kinematic_link;
  WHERE
    WR1: used_representation IN using_representations(base);
END_ENTITY; -- 10303-105: kinematic_property_schema

ENTITY kinematic_topology_directed_structure
  SUBTYPE OF (representation);
    SELF\representation.items : SET [1:?] OF oriented_joint;
    parent : kinematic_topology_structure;
  WHERE
    WR1: context_of_items :=: parent.context_of_items;
    WR2: get_kinematic_joints_from_oriented_joints(items) <= parent.items;
END_ENTITY; -- 10303-105: kinematic_topology_schema

ENTITY kinematic_topology_network_structure
  SUBTYPE OF (representation);
    SELF\representation.items : SET [1:?] OF kinematic_loop;
    parent : kinematic_topology_structure;
  WHERE
    WR1: context_of_items :=: parent.context_of_items;
    WR2: get_kinematic_joints_from_kinematic_loops(items) <= parent.items;
END_ENTITY; -- 10303-105: kinematic_topology_schema

ENTITY kinematic_topology_structure
  SUBTYPE OF (representation);
    SELF\representation.items : SET [1:?] OF kinematic_joint;
  WHERE
    WR1: SIZEOF(QUERY (item <* items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORIENTED_EDGE' 
              IN TYPEOF(item)))) = 0;
END_ENTITY; -- 10303-105: kinematic_topology_schema

ENTITY kinematic_topology_substructure
  SUBTYPE OF (kinematic_topology_structure);
    parent : kinematic_topology_structure;
  WHERE
    WR1: context_of_items :=: parent.context_of_items;
    WR2: SELF\kinematic_topology_structure.items <= parent\
              kinematic_topology_structure.items;
END_ENTITY; -- 10303-105: kinematic_topology_schema

ENTITY kinematic_topology_tree_structure
  SUBTYPE OF (kinematic_topology_directed_structure);
END_ENTITY; -- 10303-105: kinematic_topology_schema

ENTITY known_source
  SUBTYPE OF (external_source, pre_defined_item);
END_ENTITY; -- 10303-1291: plib_class_reference_mim

ENTITY knurling_turning_operation
  SUBTYPE OF (turning_type_operation);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY language
  SUBTYPE OF (group);
  WHERE
    WR1: SELF\group.name <> '';
END_ENTITY; -- 10303-41: language_schema

ENTITY leader_curve
  SUBTYPE OF (annotation_curve_occurrence);
  WHERE
    WR1: SIZEOF(QUERY (ldc <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_CALLOUT.CONTENTS'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LEADER_DIRECTED_CALLOUT'
               IN TYPEOF(ldc)))) >= 1;
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY leader_directed_callout
  SUBTYPE OF (draughting_callout);
  WHERE
    WR1: SIZEOF(QUERY (l_1 <* SELF\draughting_callout.contents| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LEADER_CURVE' IN
               TYPEOF(l_1)))) >= 1;
    WR2: SIZEOF(SELF\draughting_callout.contents) >= 2;
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY leader_directed_dimension
  SUBTYPE OF (leader_directed_callout);
  WHERE
    WR1: SIZEOF(QUERY (con <* SELF.contents| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LEADER_CURVE' IN
               TYPEOF(con)))) = 1;
END_ENTITY; -- 10303-506: aic_draughting_elements

ENTITY leader_terminator
  SUBTYPE OF (terminator_symbol);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LEADER_CURVE' IN 
              TYPEOF(SELF\terminator_symbol.annotated_curve);
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY length_function
  SUBTYPE OF (numeric_expression, unary_generic_expression);
    SELF\unary_generic_expression.operand : string_expression;
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY length_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_UNIT' IN 
              TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY length_unit
  SUBTYPE OF (named_unit);
  WHERE
    WR1: ((((((SELF\named_unit.dimensions.length_exponent = 1.0) AND (SELF\
              named_unit.dimensions.mass_exponent = 0.0)) AND (SELF\
              named_unit.dimensions.time_exponent = 0.0)) AND (SELF\
              named_unit.dimensions.electric_current_exponent = 0.0)) AND (
              SELF\named_unit.dimensions.thermodynamic_temperature_exponent
               = 0.0)) AND (SELF\named_unit.dimensions.
              amount_of_substance_exponent = 0.0)) AND (SELF\named_unit.
              dimensions.luminous_intensity_exponent = 0.0);
END_ENTITY; -- 10303-41: measure_schema

ENTITY light_source
  SUPERTYPE OF (ONEOF(light_source_ambient, light_source_directional, 
      light_source_positional, light_source_spot))
  SUBTYPE OF (geometric_representation_item);
    light_colour : colour;
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM.ITEM'
              )) = 0;
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY light_source_ambient
  SUBTYPE OF (light_source);
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY light_source_directional
  SUBTYPE OF (light_source);
    orientation : direction;
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY light_source_positional
  SUBTYPE OF (light_source);
    position             : cartesian_point;
    constant_attenuation : REAL;
    distance_attenuation : REAL;
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY light_source_spot
  SUBTYPE OF (light_source);
    position               : cartesian_point;
    orientation            : direction;
    concentration_exponent : REAL;
    constant_attenuation   : REAL;
    distance_attenuation   : REAL;
    spread_angle           : positive_plane_angle_measure;
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY like_expression
  SUBTYPE OF (comparison_expression);
  WHERE
    WR1: ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STRING_EXPRESSION' 
              IN TYPEOF(SELF\binary_generic_expression.operands[1])) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STRING_EXPRESSION'
               IN TYPEOF(SELF\binary_generic_expression.operands[2]));
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY limits_and_fits;
    form_variance : label;
    zone_variance : label;
    grade         : label;
    source        : text;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY line
  SUBTYPE OF (curve);
    pnt : cartesian_point;
    dir : vector;
  WHERE
    WR1: dir.dim = pnt.dim;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY line_profile_tolerance
  SUBTYPE OF (geometric_tolerance);
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY linear_dimension
  SUBTYPE OF (dimension_curve_directed_callout);
END_ENTITY; -- 10303-506: aic_draughting_elements

ENTITY linear_flexible_and_pinion_pair
  SUBTYPE OF (low_order_kinematic_pair_with_motion_coupling);
    pinion_radius : length_measure;
  WHERE
    WR1: SIZEOF(QUERY (lr <* SELF\kinematic_pair.
              associated_link_representations_1| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINEAR_FLEXIBLE_LINK_REPRESENTATION'
               IN TYPEOF(lr)))) = 0;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY linear_flexible_and_planar_curve_pair
  SUBTYPE OF (high_order_kinematic_pair);
    pair_curve  : curve;
    orientation : BOOLEAN;
  WHERE
    WR1: SIZEOF(QUERY (r <* SELF\kinematic_pair.
              associated_link_representations_1| NOT (pair_curve IN r.items
              ))) = 0;
    WR2: SIZEOF(QUERY (lr <* SELF\kinematic_pair.
              associated_link_representations_1| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINEAR_FLEXIBLE_LINK_REPRESENTATION'
               IN TYPEOF(lr)))) = 0;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY linear_flexible_link_representation
  SUBTYPE OF (kinematic_link_representation);
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY linear_path
  SUBTYPE OF (path_node);
  DERIVE
    SELF\kinematic_path_segment.transition : transition_code := continuous;
END_ENTITY; -- 10303-105: kinematic_motion_representation_schema

ENTITY linear_profile
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_DEFINITION'
               IN TYPEOF(SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 2))) = 0))) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN 
              TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0))) = 0
              ;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'profile length'))) = 1)
              )) = 0))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY linearized_table_function
  SUPERTYPE OF (ONEOF(standard_table_function, regular_table_function, 
      triangular_matrix, symmetric_matrix, banded_matrix))
  SUBTYPE OF (explicit_table_function, unary_generic_expression);
    SELF\unary_generic_expression.operand : maths_function;
    first   : INTEGER;
  DERIVE
    source : maths_function := SELF\unary_generic_expression.operand;
  WHERE
    WR1: function_is_1d_array(source);
    WR2: member_of(first, source\maths_function.domain);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY link_motion_relationship
  SUBTYPE OF (definitional_representation_relationship, 
      representation_relationship_with_transformation);
    SELF\representation_relationship.rep_1 : link_or_shape_representation;
    SELF\representation_relationship.rep_2 : 
                                 link_motion_representation_along_path;
    SELF\representation_relationship_with_transformation.
                                 transformation_operator : 
                                 link_motion_transformation;
  WHERE
    WR1: transformation_operator\item_defined_transformation.
              transform_item_1 IN rep_1.items;
    WR2: transformation_operator\item_defined_transformation.
              transform_item_2 IN rep_2.items;
END_ENTITY; -- 10303-105: kinematic_motion_representation_schema

ENTITY link_motion_representation_along_path
  SUPERTYPE OF (ONEOF(prescribed_path, resulting_path))
  SUBTYPE OF (representation);
    SELF\representation.items : SET [1:?] OF kinematic_path;
    SELF\representation.context_of_items : 
                          geometric_representation_context_with_parameter;
END_ENTITY; -- 10303-105: kinematic_motion_representation_schema

ENTITY link_motion_transformation
  SUBTYPE OF (item_defined_transformation);
    SELF\item_defined_transformation.transform_item_1 : rigid_placement;
    SELF\item_defined_transformation.transform_item_2 : kinematic_path;
END_ENTITY; -- 10303-105: kinematic_motion_representation_schema

ENTITY listed_complex_number_data
  SUBTYPE OF (explicit_table_function, generic_literal);
    values : LIST [2:?] OF REAL;
  DERIVE
    SELF\explicit_table_function.shape : LIST [1:?] OF positive_integer := 
               [ SIZEOF(values) DIV 2 ];
  WHERE
    WR1: NOT ODD(SIZEOF(values));
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY listed_data
  SUBTYPE OF (explicit_table_function, generic_literal);
    values      : LIST [1:?] OF maths_value;
    value_range : maths_space;
  DERIVE
    SELF\explicit_table_function.shape : LIST [1:?] OF positive_integer := 
               [ SIZEOF(values) ];
  WHERE
    WR1: expression_is_constant(value_range);
    WR2: SIZEOF(QUERY (val <* values| NOT member_of(val, value_range))) = 0
              ;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY listed_integer_data
  SUBTYPE OF (explicit_table_function, generic_literal);
    values : LIST [1:?] OF INTEGER;
  DERIVE
    SELF\explicit_table_function.shape : LIST [1:?] OF positive_integer := 
               [ SIZEOF(values) ];
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY listed_logical_data
  SUBTYPE OF (explicit_table_function, generic_literal);
    values : LIST [1:?] OF LOGICAL;
  DERIVE
    SELF\explicit_table_function.shape : LIST [1:?] OF positive_integer := 
               [ SIZEOF(values) ];
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY listed_product_space
  SUBTYPE OF (maths_space, generic_literal);
    factors : LIST OF maths_space;
  WHERE
    WR1: SIZEOF(QUERY (space <* factors| NOT expression_is_constant(space))
              ) = 0;
    WR2: no_cyclic_space_reference(SELF, []);
    WR3: NOT (the_empty_space IN factors);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY listed_real_data
  SUBTYPE OF (explicit_table_function, generic_literal);
    values : LIST [1:?] OF REAL;
  DERIVE
    SELF\explicit_table_function.shape : LIST [1:?] OF positive_integer := 
               [ SIZEOF(values) ];
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY listed_string_data
  SUBTYPE OF (explicit_table_function, generic_literal);
    values : LIST [1:?] OF STRING;
  DERIVE
    SELF\explicit_table_function.shape : LIST [1:?] OF positive_integer := 
               [ SIZEOF(values) ];
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY literal_number
  ABSTRACT SUPERTYPE OF (ONEOF(int_literal, real_literal))
  SUBTYPE OF (simple_numeric_expression, generic_literal);
    the_value : NUMBER;
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY local_b_spline
  SUBTYPE OF (representation_item);
    degree         : INTEGER;
    knots          : LIST [2:?] OF INTEGER;
    multiplicities : LIST [2:?] OF INTEGER;
  WHERE
    WR1: degree > 0;
    WR2: SIZEOF(knots) = SIZEOF(multiplicities);
    WR3: constraints_param_local_b_spline(degree, knots, multiplicities);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY local_time;
    hour_component   : hour_in_day;
    minute_component : OPTIONAL minute_in_hour;
    second_component : OPTIONAL second_in_minute;
    zone             : coordinated_universal_time_offset;
  WHERE
    WR1: valid_time(SELF);
END_ENTITY; -- 10303-41: date_time_schema

ENTITY locally_refined_spline_curve
  SUBTYPE OF (bounded_curve);
    b_splines                   : LIST [2:?] OF local_b_spline;
    knot_values                 : spline_knot_values;
    control_points_list         : LIST [2:?] OF cartesian_point;
    scaling_factors             : LIST [2:?] OF REAL;
    closed_curve                : LOGICAL;
    locally_refined_spline_type : locally_refined_spline_type_enum;
    self_intersect              : LOGICAL;
    domain                      : LIST [2:2] OF REAL;
  WHERE
    WR1: SIZEOF(b_splines) = SIZEOF(control_points_list);
    WR2: SIZEOF(scaling_factors) = SIZEOF(control_points_list);
    WR3: constraints_scaling(scaling_factors);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY locally_refined_spline_surface
  SUBTYPE OF (bounded_surface);
    u_b_splines                 : LIST [4:?] OF local_b_spline;
    v_b_splines                 : LIST [4:?] OF local_b_spline;
    u_knots                     : spline_knot_values;
    v_knots                     : spline_knot_values;
    control_points_list         : LIST [4:?] OF cartesian_point;
    scaling_factors             : LIST [4:?] OF REAL;
    linearly_independent        : linearly_independent_enum;
    locally_refined_spline_type : locally_refined_spline_type_enum;
    self_intersect              : LOGICAL;
    u_closed                    : LOGICAL;
    v_closed                    : LOGICAL;
    domain                      : LIST [2:2] OF LIST [2:2] OF REAL;
  WHERE
    WR1: SIZEOF(u_b_splines) = SIZEOF(control_points_list);
    WR2: SIZEOF(v_b_splines) = SIZEOF(control_points_list);
    WR3: SIZEOF(scaling_factors) = SIZEOF(control_points_list);
    WR4: constraints_scaling(scaling_factors);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY locally_refined_spline_volume
  SUBTYPE OF (volume);
    u_b_splines                 : LIST [8:?] OF local_b_spline;
    v_b_splines                 : LIST [8:?] OF local_b_spline;
    w_b_splines                 : LIST [8:?] OF local_b_spline;
    u_knots                     : spline_knot_values;
    v_knots                     : spline_knot_values;
    w_knots                     : spline_knot_values;
    control_points_list         : LIST [8:?] OF cartesian_point;
    scaling_factors             : LIST [8:?] OF REAL;
    linearly_independent        : linearly_independent_enum;
    locally_refined_spline_type : locally_refined_spline_type_enum;
    domain                      : LIST [3:3] OF LIST [2:2] OF REAL;
  WHERE
    WR1: SIZEOF(u_b_splines) = SIZEOF(control_points_list);
    WR2: SIZEOF(v_b_splines) = SIZEOF(control_points_list);
    WR3: SIZEOF(w_b_splines) = SIZEOF(control_points_list);
    WR4: SIZEOF(scaling_factors) = SIZEOF(control_points_list);
    WR5: constraints_scaling(scaling_factors);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY location_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(SELF.items) = 1;
    WR2: SIZEOF(QUERY (it <* SELF.items| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT' IN TYPEOF
              (it)))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY log10_function
  SUBTYPE OF (unary_function_call);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY log2_function
  SUBTYPE OF (unary_function_call);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY log_function
  SUBTYPE OF (unary_function_call);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY logical_literal
  SUBTYPE OF (generic_literal);
    lit_value : LOGICAL;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY logical_representation_item
  SUBTYPE OF (representation_item, logical_literal);
END_ENTITY; -- 10303-1773: basic_data_representation_mim

ENTITY loop
  SUPERTYPE OF (ONEOF(vertex_loop, edge_loop, poly_loop))
  SUBTYPE OF (topological_representation_item);
END_ENTITY; -- 10303-42: topology_schema

ENTITY loss_tangent_measure_with_unit
  SUBTYPE OF (ratio_measure_with_unit);
END_ENTITY; -- 10303-1753: value_with_unit_extension_mim

ENTITY lot_effectivity
  SUBTYPE OF (effectivity);
    effectivity_lot_id   : identifier;
    effectivity_lot_size : measure_with_unit;
END_ENTITY; -- 10303-41: effectivity_schema

ENTITY low_order_kinematic_pair
  SUPERTYPE OF (ONEOF(revolute_pair, cylindrical_pair, spherical_pair, 
      spherical_pair_with_pin, planar_pair, unconstrained_pair, 
      fully_constrained_pair, prismatic_pair, universal_pair, 
      low_order_kinematic_pair_with_range))
  SUBTYPE OF (kinematic_pair);
    t_x : BOOLEAN;
    t_y : BOOLEAN;
    t_z : BOOLEAN;
    r_x : BOOLEAN;
    r_y : BOOLEAN;
    r_z : BOOLEAN;
  WHERE
    WR1: SIZEOF(QUERY (lr <* SELF\kinematic_pair.
              associated_link_representations_1| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RIGID_LINK_REPRESENTATION'
               IN TYPEOF(lr)))) = 0;
    WR2: SIZEOF(QUERY (lr <* SELF\kinematic_pair.
              associated_link_representations_2| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RIGID_LINK_REPRESENTATION'
               IN TYPEOF(lr)))) = 0;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY low_order_kinematic_pair_value
  SUBTYPE OF (pair_value);
    SELF\pair_value.applies_to_pair : low_order_kinematic_pair;
    actual_translation_x : length_measure;
    actual_translation_y : length_measure;
    actual_translation_z : length_measure;
    actual_rotation_x    : plane_angle_measure;
    actual_rotation_y    : plane_angle_measure;
    actual_rotation_z    : plane_angle_measure;
END_ENTITY; -- 10303-105: kinematic_state_schema

ENTITY low_order_kinematic_pair_with_motion_coupling
  ABSTRACT SUPERTYPE OF (ONEOF(gear_pair, linear_flexible_and_pinion_pair, 
      rack_and_pinion_pair, screw_pair))
  SUBTYPE OF (kinematic_pair);
  WHERE
    WR1: SIZEOF(QUERY (lr <* SELF\kinematic_pair.
              associated_link_representations_2| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RIGID_LINK_REPRESENTATION'
               IN TYPEOF(lr)))) = 0;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY low_order_kinematic_pair_with_range
  SUBTYPE OF (low_order_kinematic_pair);
    lower_limit_actual_rotation_x    : OPTIONAL plane_angle_measure;
    upper_limit_actual_rotation_x    : OPTIONAL plane_angle_measure;
    lower_limit_actual_rotation_y    : OPTIONAL plane_angle_measure;
    upper_limit_actual_rotation_y    : OPTIONAL plane_angle_measure;
    lower_limit_actual_rotation_z    : OPTIONAL plane_angle_measure;
    upper_limit_actual_rotation_z    : OPTIONAL plane_angle_measure;
    lower_limit_actual_translation_x : OPTIONAL length_measure;
    upper_limit_actual_translation_x : OPTIONAL length_measure;
    lower_limit_actual_translation_y : OPTIONAL length_measure;
    upper_limit_actual_translation_y : OPTIONAL length_measure;
    lower_limit_actual_translation_z : OPTIONAL length_measure;
    upper_limit_actual_translation_z : OPTIONAL length_measure;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY luminous_flux_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LUMINOUS_FLUX_UNIT' 
              IN TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY luminous_flux_unit
  SUBTYPE OF (named_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensions_for_si_unit(
              si_unit_name.lumen);
END_ENTITY; -- 10303-41: measure_schema

ENTITY luminous_intensity_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LUMINOUS_INTENSITY_UNIT'
               IN TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY luminous_intensity_unit
  SUBTYPE OF (named_unit);
  WHERE
    WR1: ((((((SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\
              named_unit.dimensions.mass_exponent = 0.0)) AND (SELF\
              named_unit.dimensions.time_exponent = 0.0)) AND (SELF\
              named_unit.dimensions.electric_current_exponent = 0.0)) AND (
              SELF\named_unit.dimensions.thermodynamic_temperature_exponent
               = 0.0)) AND (SELF\named_unit.dimensions.
              amount_of_substance_exponent = 0.0)) AND (SELF\named_unit.
              dimensions.luminous_intensity_exponent = 1.0);
END_ENTITY; -- 10303-41: measure_schema

ENTITY machining_adaptive_control_relationship
  SUBTYPE OF (action_method_relationship);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_approach_retract_strategy
  SUBTYPE OF (machining_strategy);
  WHERE
    WR1: SELF.description IN [ 'along path', 'approach retract angle', 
              'approach retract tangent', 'plunge helix', 'plunge ramp', 
              'plunge toolaxis', 'plunge zigzag' ];
    WR2: verify_optional_action_property(SELF, 'tool orientation') AND 
              verify_rep_item_for_action_property(SELF, 'tool orientation',
               [ 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ])
              ;
    WR3: NOT (SELF.description = 'along path') OR (1 <= 
              get_count_of_relating_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TOOLPATH_SEQUENCE_RELATIONSHIP'
               ])) AND verify_related_type_for_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TOOLPATH_SEQUENCE_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TOOLPATH'
               ]);
    WR4: NOT (SELF.description = 'approach retract angle') OR ((
              verify_required_action_property(SELF, 'travel angle') AND 
              verify_angle_measure_action_property(SELF, 'travel angle')) 
              AND verify_required_action_property(SELF, 'travel length')) 
              AND verify_length_measure_action_property(SELF, 
              'travel length');
    WR5: NOT (SELF.description = 'approach retract tangent') OR 
              verify_required_action_property(SELF, 'travel radius') AND 
              verify_length_measure_action_property(SELF, 'travel radius');
    WR6: NOT (SELF.description IN [ 'plunge helix', 'plunge ramp', 
              'plunge zigzag' ]) OR verify_required_action_property(SELF, 
              'plunge angle') AND verify_angle_measure_action_property(SELF
              , 'plunge angle');
    WR7: NOT (SELF.description = 'plunge helix') OR 
              verify_required_action_property(SELF, 'plunge radius') AND 
              verify_length_measure_action_property(SELF, 'plunge radius');
    WR8: NOT (SELF.description = 'plunge zigzag') OR 
              verify_required_action_property(SELF, 'plunge width') AND 
              verify_length_measure_action_property(SELF, 'plunge width');
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_cutting_component
  SUBTYPE OF (action_resource, characterized_object);
  WHERE
    WR1: 1 >= SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MATERIAL_DESIGNATION.DEFINITIONS'
              ));
    WR2: 1 >= SIZEOF(QUERY (arr <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE.RESOURCES'
              )| (arr.kind.name = 'cutting component') AND (0 < SIZEOF(
              QUERY (mt <* arr.operations| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TECHNOLOGY'
               IN TYPEOF(mt)))))));
    WR3: verify_optional_resource_property(SELF, 'expected life') AND 
              verify_time_measure_resource_property(SELF, 'expected life');
    WR4: NOT (SELF.kind.name = 'milling cutting edge') OR 
              verify_required_resource_property(SELF, 'functional length') 
              AND verify_length_measure_resource_property(SELF, 
              'functional length');
    WR5: NOT (SELF.kind.name = 'turning cutting edge') OR (((((((((((
              verify_optional_resource_property(SELF, 'cutting edge length'
              ) AND verify_length_measure_resource_property(SELF, 
              'cutting edge length')) AND verify_optional_resource_property
              (SELF, 'cutting edge angle')) AND 
              verify_angle_measure_resource_property(SELF, 
              'cutting edge angle')) AND verify_optional_resource_property(
              SELF, 'cutting edge angle type')) AND 
              verify_rep_item_for_resource_property(SELF, 
              'cutting edge angle type', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               ])) AND verify_optional_resource_property(SELF, 
              'tool included angle')) AND 
              verify_angle_measure_resource_property(SELF, 
              'tool included angle')) AND 
              verify_rep_type_for_resource_property(SELF, 
              'corner transitions', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_CUTTING_CORNER_REPRESENTATION'
               ])) AND verify_optional_resource_property(SELF, 
              'maximum side cutting depth')) AND 
              verify_length_measure_resource_property(SELF, 
              'maximum side cutting depth')) AND 
              verify_optional_resource_property(SELF, 
              'maximum end cutting depth')) AND 
              verify_length_measure_resource_property(SELF, 
              'maximum end cutting depth');
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_cutting_corner_representation
  SUBTYPE OF (representation);
  WHERE
    WR1: verify_required_rep_item(SELF, 'corner identity') AND 
              verify_count_measure_rep_item(SELF, 'corner identity');
    WR2: NOT (SELF.name = 'chamfered corner') OR ((((
              verify_required_rep_item(SELF, 'chamfer angle') AND 
              verify_angle_measure_rep_item(SELF, 'chamfer angle')) AND 
              verify_optional_rep_item(SELF, 'chamfer length')) AND 
              verify_length_measure_rep_item(SELF, 'chamfer length')) AND 
              verify_optional_rep_item(SELF, 'chamfer width')) AND 
              verify_length_measure_rep_item(SELF, 'chamfer width');
    WR3: NOT (SELF.name = 'rounded corner') OR verify_required_rep_item(
              SELF, 'radius') AND verify_length_measure_rep_item(SELF, 
              'radius');
    WR4: NOT (SELF.name = 'profiled corner') OR (1 = SIZEOF(QUERY (prep <* 
              USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION'
              )| ((((((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINEAR_PROFILE' 
              IN TYPEOF(prep.definition)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OPEN_PATH_PROFILE'
               IN TYPEOF(prep.definition))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PARTIAL_CIRCULAR_PROFILE'
               IN TYPEOF(prep.definition))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROUNDED_U_PROFILE'
               IN TYPEOF(prep.definition))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SQUARE_U_PROFILE'
               IN TYPEOF(prep.definition))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEE_PROFILE' IN 
              TYPEOF(prep.definition))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VEE_PROFILE' IN 
              TYPEOF(prep.definition)))));
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_dwell_time_representation
  SUBTYPE OF (representation);
  WHERE
    WR1: SELF.name IN [ 'dwell time', 'dwell revolution' ];
    WR2: NOT (SELF.name = 'dwell time') OR verify_required_rep_item(SELF, 
              'dwell time') AND verify_time_measure_rep_item(SELF, 
              'dwell time');
    WR3: NOT (SELF.name = 'dwell revolution') OR verify_required_rep_item(
              SELF, 'dwell revolution') AND verify_count_measure_rep_item(
              SELF, 'dwell revolution');
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_execution_resource
  SUBTYPE OF (action_resource);
  WHERE
    WR1: verify_optional_resource_property(SELF, 'feedrate') AND 
              verify_rep_type_for_resource_property(SELF, 'feedrate', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'
               ]);
    WR2: verify_optional_resource_property(SELF, 'spindle') AND 
              verify_rep_type_for_resource_property(SELF, 'spindle', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_SPINDLE_SPEED_REPRESENTATION'
               ]);
    WR3: verify_optional_resource_property(SELF, 'spindle power') AND 
              verify_rep_item_for_resource_property(SELF, 'spindle power', 
              [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
               ]);
    WR4: verify_optional_resource_property(SELF, 'spindle torque') AND 
              verify_rep_item_for_resource_property(SELF, 'spindle torque',
               [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
               ]);
    WR5: verify_optional_resource_property(SELF, 'number of control axis') 
              AND verify_count_measure_resource_property(SELF, 
              'number of control axis');
    WR6: verify_optional_resource_property(SELF, 
              'number of simultaneous axis') AND 
              verify_count_measure_resource_property(SELF, 
              'number of simultaneous axis');
    WR7: verify_optional_resource_property(SELF, 'positioning accuracy') 
              AND verify_length_measure_resource_property(SELF, 
              'positioning accuracy');
    WR8: verify_optional_resource_property(SELF, 'table indexing') AND 
              verify_enumeration_resource_property(SELF, 'table indexing', 
              [ 'required', 'not required' ]);
    WR9: ((verify_optional_resource_property(SELF, 'table length') AND 
              verify_length_measure_resource_property(SELF, 'table length')
              ) AND verify_optional_resource_property(SELF, 'table width'))
               AND verify_length_measure_resource_property(SELF, 
              'table width');
    WR10: verify_optional_resource_property(SELF, 'axis travel') AND (0 = 
              SIZEOF(QUERY (prop <* get_resource_property(SELF, 
              'axis travel')| NOT (0 < SIZEOF(QUERY (prep <* USEDIN(prop, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY'
              )| (1 <= SIZEOF(QUERY (it <* prep.representation.items| (
              SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2))))))))));
    WR11: ((((verify_optional_resource_property(SELF, 'work volume length')
               AND verify_length_measure_resource_property(SELF, 
              'work volume length')) AND verify_optional_resource_property(
              SELF, 'work volume width')) AND 
              verify_length_measure_resource_property(SELF, 
              'work volume width')) AND verify_optional_resource_property(
              SELF, 'work volume height')) AND 
              verify_length_measure_resource_property(SELF, 
              'work volume height');
    WR12: (0 = SIZEOF(get_resource_property(SELF, 'axis travel'))) OR ((0 =
               SIZEOF(get_resource_property(SELF, 'work volume length'))) 
              AND (0 = SIZEOF(get_resource_property(SELF, 
              'work volume width')))) AND (0 = SIZEOF(get_resource_property
              (SELF, 'work volume height')));
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_feature_process
  SUBTYPE OF (machining_process_executable);
  WHERE
    WR1: (1 = SIZEOF(QUERY (act <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION.CHOSEN_METHOD'
              )| (act.name = 'machining')))) AND (0 = SIZEOF(QUERY (act <* 
              USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION.CHOSEN_METHOD'
              )| (act.name = 'machining') AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_PROCESS'
               IN TYPEOF(act)))));
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_feature_relationship
  SUBTYPE OF (action_method_relationship);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_feature_sequence_relationship
  SUBTYPE OF (machining_feature_relationship, sequential_method);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_feed_speed_representation
  SUBTYPE OF (representation);
  WHERE
    WR1: SELF.name IN [ 'feed speed', 'feed per revolution', 
              'feed per tooth', 'relative speed' ];
    WR2: NOT (SELF.name = 'feed speed') OR verify_required_rep_item(SELF, 
              'feed speed') AND verify_linear_speed_measure_rep_item(SELF, 
              'feed speed');
    WR3: NOT (SELF.name = 'feed per revolution') OR 
              verify_required_rep_item(SELF, 'feed per revolution') AND (0 
              = SIZEOF(QUERY (it <* SELF.items| (it.name = 
              'feed per revolution') AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
               IN TYPEOF(it)))));
    WR4: NOT (SELF.name = 'feed per tooth') OR verify_required_rep_item(
              SELF, 'feed per tooth') AND (0 = SIZEOF(QUERY (it <* SELF.
              items| (it.name = 'feed per tooth') AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
               IN TYPEOF(it)))));
    WR5: NOT (SELF.name = 'relative speed') OR verify_required_rep_item(
              SELF, 'relative speed') AND verify_ratio_measure_rep_item(
              SELF, 'relative speed');
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_final_feature_relationship
  SUBTYPE OF (action_method_relationship);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_fixture_usage
  SUBTYPE OF (action_method);
  WHERE
    WR1: (1 >= SIZEOF(QUERY (act <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION.CHOSEN_METHOD'
              )| (act.name = 'fixture workpiece')))) AND (0 = SIZEOF(QUERY 
              (act <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION.CHOSEN_METHOD'
              )| (act.name = 'fixture workpiece') AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_PROCESS'
               IN TYPEOF(act)))));
    WR2: verify_optional_action_property(SELF, 'mount reference') AND 
              verify_rep_item_for_action_property(SELF, 'mount reference', 
              [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               ]);
    WR3: verify_optional_action_property(SELF, 'workpiece reference') AND 
              verify_rep_item_for_action_property(SELF, 
              'workpiece reference', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               ]);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_functions
  SUBTYPE OF (action_method);
  WHERE
    WR1: NOT (SELF.description = 'milling') OR (((((((((
              verify_required_action_property(SELF, 'coolant') AND 
              verify_enumeration_action_property(SELF, 'coolant', [ 
              'coolant on', 'coolant off' ])) AND 
              verify_optional_action_property(SELF, 'coolant pressure')) 
              AND verify_pressure_measure_action_property(SELF, 
              'coolant pressure')) AND verify_optional_action_property(SELF
              , 'mist')) AND verify_enumeration_action_property(SELF, 
              'mist', [ 'mist on', 'mist off' ])) AND 
              verify_optional_action_property(SELF, 
              'through spindle coolant')) AND 
              verify_enumeration_action_property(SELF, 
              'through spindle coolant', [ 'through spindle coolant on', 
              'through spindle coolant off' ])) AND 
              verify_optional_action_property(SELF, 
              'through spindle pressure')) AND 
              verify_pressure_measure_action_property(SELF, 
              'through spindle pressure')) AND (0 = SIZEOF(QUERY (prop <* 
              get_action_property(SELF, 'axis constraints')| NOT (0 < 
              SIZEOF(QUERY (prep <* USEDIN(prop, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY'
              )| (0 <= SIZEOF(QUERY (it <* prep.representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VALUE_RANGE' IN 
              TYPEOF(it)))))))))));
    WR2: NOT (SELF.description = 'turning') OR ((((((((((
              verify_required_action_property(SELF, 'coolant') AND 
              verify_enumeration_action_property(SELF, 'coolant', [ 
              'coolant on', 'coolant off' ])) AND 
              verify_optional_action_property(SELF, 'coolant type')) AND 
              verify_enumeration_action_property(SELF, 'coolant type', [ 
              'flood', 'mist', 'through tool' ])) AND 
              verify_optional_action_property(SELF, 'coolant pressure')) 
              AND verify_pressure_measure_action_property(SELF, 
              'coolant pressure')) AND verify_optional_action_property(SELF
              , 'tail stock')) AND verify_enumeration_action_property(SELF,
               'tail stock', [ 'tail stock used', 'tail stock not used' ]))
               AND verify_optional_action_property(SELF, 'steady rest')) 
              AND verify_enumeration_action_property(SELF, 'steady rest', [
               'steady rest used', 'steady rest not used' ])) AND 
              verify_optional_action_property(SELF, 'follow rest')) AND 
              verify_enumeration_action_property(SELF, 'follow rest', [ 
              'follow rest used', 'follow rest not used' ]);
    WR3: NOT (SELF.description IN [ 'milling', 'turning' ]) OR (((((
              verify_optional_action_property(SELF, 'axis clamping') AND (0
               = SIZEOF(QUERY (prop <* get_action_property(SELF, 
              'axis clamping')| NOT (0 < SIZEOF(QUERY (prep <* USEDIN(prop,
               
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY'
              )| (1 = SIZEOF(QUERY (it <* prep.representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOUND_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LIST_REPRESENTATION_ITEM'
               IN TYPEOF(it.item_element))) AND (0 = SIZEOF(QUERY (ie <* it
              .item_element| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(ie))))))))))))))) AND 
              verify_optional_action_property(SELF, 'chip removal')) AND 
              verify_enumeration_action_property(SELF, 'chip removal', [ 
              'chip removal on', 'chip removal off' ])) AND 
              verify_optional_action_property(SELF, 'oriented spindle stop'
              )) AND verify_rep_item_for_action_property(SELF, 
              'oriented spindle stop', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ])) 
              AND verify_related_type_for_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_MODEL_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_MODEL'
               ]);
    WR4: verify_optional_action_property(SELF, 'other functions');
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_functions_relationship
  SUBTYPE OF (action_method_relationship);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_machine_usage
  SUBTYPE OF (action_method);
  WHERE
    WR1: (1 >= SIZEOF(QUERY (act <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION.CHOSEN_METHOD'
              )| (act.name = 'machine usage')))) AND (0 = SIZEOF(QUERY (act
               <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION.CHOSEN_METHOD'
              )| (act.name = 'machine usage') AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_PROCESS'
               IN TYPEOF(act)))));
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_nc_function
  SUBTYPE OF (machining_process_executable);
  WHERE
    WR1: SELF.description IN [ 'display message', 'optional stop', 
              'program stop', 'set mark', 'wait for mark', 
              'exchange pallet', 'index pallet', 'index table', 'load tool'
              , 'unload tool', 'legacy function' ];
    WR2: NOT (SELF.description = 'display message') OR 
              verify_required_action_property(SELF, 'message text') AND 
              verify_descriptive_action_property(SELF, 'message text');
    WR3: NOT (SELF.description = 'wait for mark') OR 
              verify_required_action_property(SELF, 'channel');
    WR4: NOT (SELF.description = 'index pallet') OR 
              verify_required_action_property(SELF, 'pallet index') AND 
              verify_count_measure_action_property(SELF, 'pallet index');
    WR5: NOT (SELF.description = 'index table') OR 
              verify_required_action_property(SELF, 'table index') AND 
              verify_count_measure_action_property(SELF, 'table index');
    WR6: NOT (SELF.description = 'load tool') OR (1 = SIZEOF(QUERY (mt <* 
              USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_RESOURCE.USAGE'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TOOL' 
              IN TYPEOF(mt)))));
    WR7: NOT (SELF.description = 'unload tool') OR (1 >= SIZEOF(QUERY (mt 
              <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_RESOURCE.USAGE'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TOOL' 
              IN TYPEOF(mt)))));
    WR8: NOT (SELF.description = 'legacy function') OR 
              verify_required_action_property(SELF, 'function text') AND 
              verify_descriptive_action_property(SELF, 'function text');
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_offset_vector_representation
  SUBTYPE OF (representation);
  WHERE
    WR1: (1 = SIZEOF(QUERY (it <* SELF.items| (it.name = 'translate')))) 
              AND (0 = SIZEOF(QUERY (it <* SELF.items| (it.name = 
              'translate') AND NOT ((((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOUND_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LIST_REPRESENTATION_ITEM'
               IN TYPEOF(it.item_element))) AND (SIZEOF(it.item_element) = 
              3)) AND (0 = SIZEOF(QUERY (ie <* it.item_element| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPRESSION_REPRESENTATION_ITEM'
               IN TYPEOF(ie)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NUMERIC_VARIABLE'
               IN TYPEOF(ie))))))))));
    WR2: (1 >= SIZEOF(QUERY (it <* SELF.items| (it.name = 'rotate')))) AND 
              (0 = SIZEOF(QUERY (it <* SELF.items| (it.name = 'rotate') AND
               NOT ((((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOUND_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LIST_REPRESENTATION_ITEM'
               IN TYPEOF(it.item_element))) AND (SIZEOF(it.item_element) = 
              3)) AND (0 = SIZEOF(QUERY (ie <* it.item_element| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPRESSION_REPRESENTATION_ITEM'
               IN TYPEOF(ie)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NUMERIC_VARIABLE'
               IN TYPEOF(ie))))))))));
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_operation
  SUBTYPE OF (action_method);
  WHERE
    WR1: verify_related_type_for_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TOOLPATH_SEQUENCE_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TOOLPATH'
               ]);
    WR2: verify_optional_action_property(SELF, 'tool direction') AND 
              verify_rep_type_for_action_property(SELF, 'tool direction', [
               
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TOOL_DIRECTION_REPRESENTATION'
               ]);
    WR3: ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_RAPID_MOVEMENT'
               IN TYPEOF(SELF)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TOUCH_PROBING'
               IN TYPEOF(SELF))) OR (((((((verify_optional_action_property(
              SELF, 'retract plane') AND 
              verify_length_measure_action_property(SELF, 'retract plane'))
               AND verify_optional_action_property(SELF, 'cut start point')
              ) AND verify_rep_item_for_action_property(SELF, 
              'cut start point', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CARTESIAN_POINT'
               ])) AND (1 = SIZEOF(QUERY (mt <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_RESOURCE.USAGE'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TOOL' 
              IN TYPEOF(mt)))))) AND verify_required_relating_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TECHNOLOGY_RELATIONSHIP'
               ])) AND verify_related_type_for_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TECHNOLOGY_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TECHNOLOGY'
               ])) AND verify_required_relating_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FUNCTIONS_RELATIONSHIP'
               ])) AND verify_related_type_for_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FUNCTIONS_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FUNCTIONS'
               ]);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_operation_relationship
  SUBTYPE OF (action_method_relationship);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_operator_instruction
  SUBTYPE OF (action_method_with_associated_documents);
  WHERE
    WR1: EXISTS(SELF.description) OR (0 < SIZEOF(SELF.documents));
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_operator_instruction_relationship
  SUBTYPE OF (sequential_method);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_process_body_relationship
  SUBTYPE OF (action_method_relationship);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_process_branch_relationship
  SUBTYPE OF (machining_process_body_relationship);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_process_concurrent_relationship
  SUBTYPE OF (machining_process_body_relationship, concurrent_action_method
      );
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_process_executable
  SUBTYPE OF (process_operation);
  WHERE
  WR1:  NOT (0 = SIZEOF (TYPEOF (SELF) *
            ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEATURE_PROCESS',
             'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_NC_FUNCTION',
             'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_WORKINGSTEP',
             'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_WORKPLAN']
        )) OR
        (SELF.description IN ['assignment', 'if statement',
                'non-sequential', 'parallel', 'selective',
                'while statement', 'setup instructions']);

  WR2:  NOT (SELF.description = 'assignment') OR
        ((verify_required_action_property       (SELF, 'lvalue')) AND
         (verify_rep_item_for_action_property   (SELF, 'lvalue',
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPRESSION_REPRESENTATION_ITEM',
           'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NUMERIC_VARIABLE'])) AND

         (verify_required_action_property       (SELF, 'rvalue')) AND
         (verify_rep_item_for_action_property   (SELF, 'rvalue',
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPRESSION_REPRESENTATION_ITEM'])));

  WR3:  NOT (SELF.description = 'if statement') OR
        ((verify_required_action_property       (SELF, 'condition')) AND
         (verify_rep_item_for_action_property   (SELF, 'condition',
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPRESSION_REPRESENTATION_ITEM',
           'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOOLEAN_EXPRESSION'])) AND

         (verify_required_relating_amr_with_name  (SELF, 'true branch',
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_BRANCH_RELATIONSHIP'])) AND
         (verify_related_type_for_amr_with_name   (SELF, 'true branch',
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_BRANCH_RELATIONSHIP'],
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_EXECUTABLE'])) AND

         (verify_optional_relating_amr_with_name  (SELF, 'false branch',
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_BRANCH_RELATIONSHIP'])) AND
         (verify_related_type_for_amr_with_name   (SELF, 'false branch',
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_BRANCH_RELATIONSHIP'],
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_EXECUTABLE']))
        );

  WR4:  NOT (SELF.description = 'while statement') OR
        ((verify_required_action_property       (SELF, 'condition')) AND
         (verify_rep_item_for_action_property   (SELF, 'condition',
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPRESSION_REPRESENTATION_ITEM',
           'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOOLEAN_EXPRESSION'])) AND

         (verify_required_relating_amr  (SELF,
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_BODY_RELATIONSHIP'])) AND
         (verify_related_type_for_amr   (SELF,
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_BODY_RELATIONSHIP'],
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_EXECUTABLE']))
        );

  WR5:  NOT (SELF.description = 'parallel') OR
        ((2 <= get_count_of_relating_amr (SELF,
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_CONCURRENT_RELATIONSHIP']))
        AND
         (verify_related_type_for_amr   (SELF,
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_CONCURRENT_RELATIONSHIP'],
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_EXECUTABLE']))
        );

  WR6:  NOT (SELF.description = 'non-sequential') OR
        ((2 <= get_count_of_relating_amr (SELF,
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_BODY_RELATIONSHIP'])) AND
         (verify_related_type_for_amr   (SELF,
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_BODY_RELATIONSHIP'],
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_EXECUTABLE']))
        );

  WR7:  NOT (SELF.description = 'selective') OR
        ((2 <= get_count_of_relating_amr (SELF,
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_BRANCH_RELATIONSHIP'])) AND
         (verify_related_type_for_amr   (SELF,
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_BRANCH_RELATIONSHIP'],
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_EXECUTABLE']))
        );

  WR8:  NOT (SELF.description = 'setup instructions') OR
        ((verify_related_type_for_amr   (SELF,
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_OPERATOR_INSTRUCTION_RELATIONSHIP'],
          ['MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_OPERATOR_INSTRUCTION']))
        );
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_process_model
  SUBTYPE OF (action_method);
  WHERE
    WR1: verify_required_action_property(SELF, 'initialization data') AND 
              verify_descriptive_action_property(SELF, 
              'initialization data');
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_process_model_relationship
  SUBTYPE OF (sequential_method);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_process_property
  SUBTYPE OF (action_property);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_process_sequence_relationship
  SUBTYPE OF (machining_process_body_relationship, sequential_method);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_project
  SUBTYPE OF (product);
  WHERE
    WR1: 0 = SIZEOF(QUERY (pdf <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_FORMATION.OF_PRODUCT'
              )| NOT (1 >= SIZEOF(QUERY (poa <* USEDIN(pdf, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APPLIED_PERSON_AND_ORGANIZATION_ASSIGNMENT.ITEMS'
              )| (poa.role.name = 'owner'))))));
    WR2: 0 = SIZEOF(QUERY (pdf <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_FORMATION.OF_PRODUCT'
              )| NOT (1 >= SIZEOF(QUERY (dta <* USEDIN(pdf, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APPLIED_DATE_AND_TIME_ASSIGNMENT.ITEMS'
              )| (dta.role.name = 'release date'))))));
    WR3: 0 = SIZEOF(QUERY (pdf <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_FORMATION.OF_PRODUCT'
              )| NOT (0 = SIZEOF(QUERY (pd <* USEDIN(pdf, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION.FORMATION'
              )| NOT (1 = SIZEOF(QUERY (ppa <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROCESS_PRODUCT_ASSOCIATION.DEFINED_PRODUCT'
              )| (ppa.process.name = 'machining') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_WORKPLAN'
               IN TYPEOF(ppa.process.chosen_method))))))))));
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_project_workpiece_relationship
  SUBTYPE OF (product_definition_relationship);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_rapid_movement
  SUBTYPE OF (machining_operation);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_setup
  SUBTYPE OF (product);
  WHERE
    WR1: 0 = SIZEOF(QUERY (pdf <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_FORMATION.OF_PRODUCT'
              )| NOT (0 = SIZEOF(QUERY (pd <* USEDIN(pdf, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION.FORMATION'
              )| NOT (1 = SIZEOF(QUERY (prop <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (prop.name = 'security plane')))))))));
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_setup_workpiece_relationship
  SUBTYPE OF (product_definition_relationship);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_spindle_speed_representation
  SUBTYPE OF (representation);
  WHERE
    WR1: SELF.name IN [ 'spindle speed', 'cutting speed', 'relative speed' 
              ];
    WR2: NOT (SELF.name = 'spindle speed') OR verify_required_rep_item(SELF
              , 'rotational speed') AND 
              verify_rotary_speed_measure_rep_item(SELF, 'rotational speed'
              );
    WR3: NOT (SELF.name = 'cutting speed') OR ((verify_required_rep_item(
              SELF, 'surface speed') AND 
              verify_linear_speed_measure_rep_item(SELF, 'surface speed')) 
              AND verify_optional_rep_item(SELF, 'maximum rotational speed'
              )) AND verify_rotary_speed_measure_rep_item(SELF, 
              'maximum rotational speed');
    WR4: NOT (SELF.name = 'relative speed') OR verify_required_rep_item(
              SELF, 'relative speed') AND verify_ratio_measure_rep_item(
              SELF, 'relative speed');
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_strategy
  SUBTYPE OF (action_method);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_strategy_relationship
  SUBTYPE OF (action_method_relationship);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_technology
  SUBTYPE OF (action_method);
  WHERE
    WR1: verify_optional_action_property(SELF, 'feedrate') AND 
              verify_rep_type_for_action_property(SELF, 'feedrate', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'
               ]);
    WR2: verify_optional_action_property(SELF, 'feedrate reference') AND 
              verify_enumeration_action_property(SELF, 'feedrate reference'
              , [ 'tool center point', 'cutter contact point' ]);
    WR3: NOT (SELF.description = 'milling') OR ((((((((
              verify_optional_action_property(SELF, 'spindle') AND 
              verify_rep_type_for_action_property(SELF, 'spindle', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_SPINDLE_SPEED_REPRESENTATION'
               ])) AND verify_optional_action_property(SELF, 
              'synchronize spindle with feed')) AND 
              verify_enumeration_action_property(SELF, 
              'synchronize spindle with feed', [ 'synchronized', 
              'not synchronized' ])) AND verify_optional_action_property(
              SELF, 'inhibit feedrate override')) AND 
              verify_enumeration_action_property(SELF, 
              'inhibit feedrate override', [ 'override allowed', 
              'override not allowed' ])) AND 
              verify_optional_action_property(SELF, 
              'inhibit spindle override')) AND 
              verify_enumeration_action_property(SELF, 
              'inhibit spindle override', [ 'override allowed', 
              'override not allowed' ])) AND verify_optional_relating_amr(
              SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_ADAPTIVE_CONTROL_RELATIONSHIP'
               ])) AND verify_related_type_for_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_ADAPTIVE_CONTROL_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TECHNOLOGY'
               ]);
    WR4: NOT (SELF.description = 'milling') OR (
              verify_required_relating_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_ADAPTIVE_CONTROL_RELATIONSHIP'
               ]) OR verify_required_action_property(SELF, 'spindle') AND 
              verify_rep_name_for_action_property(SELF, 'spindle', [ 
              'spindle speed', 'cutting speed' ]));
    WR5: NOT (SELF.description = 'milling') OR (
              verify_required_relating_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_ADAPTIVE_CONTROL_RELATIONSHIP'
               ]) OR verify_required_action_property(SELF, 'feedrate') AND 
              verify_rep_name_for_action_property(SELF, 'feedrate', [ 
              'feed speed', 'feed per tooth' ]));
    WR6: NOT (SELF.description = 'turning') OR ((((((((((
              verify_optional_action_property(SELF, 'spindle') AND 
              verify_rep_type_for_action_property(SELF, 'spindle', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_SPINDLE_SPEED_REPRESENTATION'
               ])) AND verify_rep_name_for_action_property(SELF, 'spindle',
               [ 'spindle speed', 'cutting speed' ])) AND 
              verify_rep_name_for_action_property(SELF, 'feedrate', [ 
              'feed speed', 'feed per revolution' ])) AND 
              verify_optional_action_property(SELF, 
              'synchronize spindle with z feed')) AND 
              verify_enumeration_action_property(SELF, 
              'synchronize spindle with z feed', [ 'synchronized', 
              'not synchronized' ])) AND verify_optional_action_property(
              SELF, 'inhibit feedrate override')) AND 
              verify_enumeration_action_property(SELF, 
              'inhibit feedrate override', [ 'override allowed', 
              'override not allowed' ])) AND 
              verify_optional_action_property(SELF, 
              'inhibit spindle override')) AND 
              verify_enumeration_action_property(SELF, 
              'inhibit spindle override', [ 'override allowed', 
              'override not allowed' ])) AND verify_optional_relating_amr(
              SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_ADAPTIVE_CONTROL_RELATIONSHIP'
               ])) AND verify_related_type_for_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_ADAPTIVE_CONTROL_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TECHNOLOGY'
               ]);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_technology_relationship
  SUBTYPE OF (action_method_relationship);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_tool
  SUBTYPE OF (action_resource);
  WHERE
    WR1: NOT (SELF.kind.name = 'milling cutting tool') OR ((((((((((0 <= 
              SIZEOF(QUERY (arr <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_RESOURCE_RELATIONSHIP.RELATING_RESOURCE'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_CUTTING_COMPONENT'
               IN TYPEOF(arr.related_resource)) AND (arr.related_resource.
              kind.name = 'milling cutting edge')))) AND 
              verify_optional_tool_body_item(SELF, 
              'overall assembly length')) AND 
              verify_length_measure_tool_body_item(SELF, 
              'overall assembly length')) AND 
              verify_optional_tool_body_item(SELF, 
              'effective cutting diameter')) AND 
              verify_length_measure_tool_body_item(SELF, 
              'effective cutting diameter')) AND 
              verify_optional_tool_body_item(SELF, 'maximum depth of cut'))
               AND verify_length_measure_tool_body_item(SELF, 
              'maximum depth of cut')) AND verify_optional_tool_body_item(
              SELF, 'hand of cut')) AND verify_enumeration_tool_body_item(
              SELF, 'hand of cut', [ 'left', 'right', 'neutral' ])) AND 
              verify_optional_tool_body_item(SELF, 'coolant through tool'))
               AND verify_enumeration_tool_body_item(SELF, 
              'coolant through tool', [ 'supported', 'not supported' ]);
    WR2: NOT ((SELF.kind.name = 'milling cutting tool') AND (SELF.
              description IN [ 'counterbore', 'countersink', 'spade drill',
               'spot drill', 'step drill', 'tapered drill', 'twist drill', 
              'drill' ])) OR verify_optional_tool_body_item(SELF, 
              'point angle') AND verify_angle_measure_tool_body_item(SELF, 
              'point angle');
    WR3: NOT ((SELF.kind.name = 'milling cutting tool') AND (SELF.
              description = 'countersink')) OR ((
              verify_optional_tool_body_item(SELF, 
              'minimum cutting diameter') AND 
              verify_length_measure_tool_body_item(SELF, 
              'minimum cutting diameter')) AND 
              verify_required_tool_body_item(SELF, 'maximum usable length')
              ) AND verify_length_measure_tool_body_item(SELF, 
              'maximum usable length');
    WR4: NOT ((SELF.kind.name = 'milling cutting tool') AND (SELF.
              description = 'tapered drill')) OR 
              verify_required_tool_body_item(SELF, 'taper angle') AND 
              verify_angle_measure_tool_body_item(SELF, 'taper angle');
    WR5: NOT ((SELF.kind.name = 'milling cutting tool') AND (SELF.
              description = 'step drill')) OR ((
              verify_required_tool_body_item(SELF, 'step diameters') AND 
              verify_rep_item_for_tool_body(SELF, 'step diameters', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOUND_REPRESENTATION_ITEM'
               ])) AND verify_required_tool_body_item(SELF, 'step lengths')
              ) AND verify_rep_item_for_tool_body(SELF, 'step lengths', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOUND_REPRESENTATION_ITEM'
               ]);
    WR6: NOT ((SELF.kind.name = 'milling cutting tool') AND (SELF.
              description IN [ 'ballnose endmill', 'bullnose endmill', 
              'dovetail mill', 'endmill', 'facemill', 'profiled endmill', 
              'shoulder mill', 'tee slot mill', 'thread mill', 'side mill' 
              ])) OR ((verify_optional_tool_body_item(SELF, 
              'number of effective teeth') AND 
              verify_count_measure_tool_body_item(SELF, 
              'number of effective teeth')) AND 
              verify_optional_tool_body_item(SELF, 'edge radius')) AND 
              verify_length_measure_tool_body_item(SELF, 'edge radius');
    WR7: NOT ((SELF.kind.name = 'milling cutting tool') AND (SELF.
              description IN [ 'ballnose endmill', 'bullnose endmill', 
              'endmill', 'facemill', 'profiled endmill' ])) OR 
              verify_optional_tool_body_item(SELF, 
              'tool cutting edge angle') AND 
              verify_angle_measure_tool_body_item(SELF, 
              'tool cutting edge angle');
    WR8: NOT ((SELF.kind.name = 'milling cutting tool') AND (SELF.
              description = 'ballnose endmill')) OR 
              verify_ballnose_endmill_dimensions(SELF);
    WR9: NOT ((SELF.kind.name = 'milling cutting tool') AND (SELF.
              description = 'bullnose endmill')) OR 
              verify_bullnose_endmill_dimensions(SELF);
    WR10: NOT ((SELF.kind.name = 'milling cutting tool') AND (SELF.
              description = 'tee slot mill')) OR 
              verify_optional_tool_body_item(SELF, 'cutting width') AND 
              verify_length_measure_tool_body_item(SELF, 'cutting width');
    WR11: NOT ((SELF.kind.name = 'milling cutting tool') AND (SELF.
              description = 'dovetail mill')) OR 
              verify_optional_tool_body_item(SELF, 'included angle') AND 
              verify_angle_measure_tool_body_item(SELF, 'included angle');
    WR12: NOT ((SELF.kind.name = 'milling cutting tool') AND (SELF.
              description = 'side mill')) OR verify_optional_tool_body_item
              (SELF, 'cutter width') AND 
              verify_length_measure_tool_body_item(SELF, 'cutter width');
    WR13: NOT ((SELF.kind.name = 'milling cutting tool') AND (SELF.
              description IN [ 'thread mill', 'tapping tool', 
              'combined drill and tap' ])) OR ((((
              verify_required_tool_body_item(SELF, 'thread form type') AND 
              verify_rep_item_for_tool_body(SELF, 'thread form type', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               ])) AND verify_required_tool_body_item(SELF, 'thread size'))
               AND verify_length_measure_tool_body_item(SELF, 'thread size'
              )) AND verify_required_tool_body_item(SELF, 'thread pitch')) 
              AND verify_length_measure_tool_body_item(SELF, 'thread pitch'
              );
    WR14: NOT ((SELF.kind.name = 'milling cutting tool') AND (SELF.
              description IN [ 'tapping tool', 'combined drill and tap' ]))
               OR verify_required_tool_body_item(SELF, 'taper thread count'
              ) AND verify_count_measure_tool_body_item(SELF, 
              'taper thread count');
    WR15: NOT ((SELF.kind.name = 'milling cutting tool') AND (SELF.
              description IN [ 'reamer', 'combined drill and reamer', 
              'tapered reamer' ])) OR verify_required_tool_body_item(SELF, 
              'taper length') AND verify_length_measure_tool_body_item(SELF
              , 'taper length');
    WR16: NOT ((SELF.kind.name = 'milling cutting tool') AND (SELF.
              description = 'tapered reamer')) OR 
              verify_required_tool_body_item(SELF, 'taper angle') AND 
              verify_angle_measure_tool_body_item(SELF, 'taper angle');
    WR17: NOT ((SELF.kind.name = 'milling cutting tool') AND (SELF.
              description IN [ 'combined drill and reamer', 
              'combined drill and tap' ])) OR 
              verify_required_tool_body_item(SELF, 'drill length') AND 
              verify_length_measure_tool_body_item(SELF, 'drill length');
    WR18: NOT ((SELF.kind.name = 'milling cutting tool') AND (SELF.
              description = 'boring tool')) OR 
              verify_required_tool_body_item(SELF, 'retract movement') AND 
              verify_enumeration_tool_body_item(SELF, 'retract movement', [
               'permitted', 'forbidden' ]);
    WR19: NOT ((SELF.kind.name = 'milling cutting tool') AND (SELF.
              description = 'user defined milling tool')) OR ((((((((((
              verify_optional_tool_body_item(SELF, 'tool description') AND 
              verify_rep_item_for_tool_body(SELF, 'tool description', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               ])) AND verify_optional_tool_body_item(SELF, 'corner radius'
              )) AND verify_length_measure_tool_body_item(SELF, 
              'corner radius')) AND verify_optional_tool_body_item(SELF, 
              'corner radius center horizontal')) AND 
              verify_length_measure_tool_body_item(SELF, 
              'corner radius center horizontal')) AND 
              verify_optional_tool_body_item(SELF, 
              'corner radius center vertical')) AND 
              verify_length_measure_tool_body_item(SELF, 
              'corner radius center vertical')) AND 
              verify_optional_tool_body_item(SELF, 'taper angle')) AND 
              verify_angle_measure_tool_body_item(SELF, 'taper angle')) AND
               verify_optional_tool_body_item(SELF, 'tip outer angle')) AND
               verify_angle_measure_tool_body_item(SELF, 'tip outer angle')
              ;
    WR20: NOT (SELF.kind.name = 'turning cutting tool') OR (((((((((((
              verify_required_tool_body_item(SELF, 'functional length') AND
               verify_length_measure_tool_body_item(SELF, 
              'functional length')) AND verify_required_tool_body_item(SELF
              , 'f dimension')) AND verify_length_measure_tool_body_item(
              SELF, 'f dimension')) AND verify_optional_tool_body_item(SELF
              , 'minimum cutting diameter')) AND 
              verify_length_measure_tool_body_item(SELF, 
              'minimum cutting diameter')) AND 
              verify_optional_tool_body_item(SELF, 'a dimension on f')) AND
               verify_length_measure_tool_body_item(SELF, 
              'a dimension on f')) AND verify_optional_tool_body_item(SELF,
               'a dimension on lf')) AND 
              verify_length_measure_tool_body_item(SELF, 
              'a dimension on lf')) AND verify_optional_tool_body_item(SELF
              , 'hand of cut')) AND verify_enumeration_tool_body_item(SELF,
               'hand of cut', [ 'left', 'right', 'neutral' ])) AND (0 <= 
              SIZEOF(QUERY (arr <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_RESOURCE_RELATIONSHIP.RELATING_RESOURCE'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_CUTTING_COMPONENT'
               IN TYPEOF(arr.related_resource)) AND (arr.related_resource.
              kind.name = 'turning cutting edge'))));
    WR21: NOT ((SELF.kind.name = 'turning cutting tool') AND (SELF.
              description = 'turning threading tool')) OR ((((((((
              verify_required_tool_body_item(SELF, 'thread pitch') AND 
              verify_length_measure_tool_body_item(SELF, 'thread pitch')) 
              AND verify_required_tool_body_item(SELF, 'thread hand')) AND 
              verify_enumeration_tool_body_item(SELF, 'thread hand', [ 
              'left', 'right' ])) AND verify_required_tool_body_item(SELF, 
              'thread type')) AND verify_enumeration_tool_body_item(SELF, 
              'thread type', [ 'internal', 'external' ])) AND 
              verify_required_tool_body_item(SELF, 'thread profile')) AND 
              verify_enumeration_tool_body_item(SELF, 'thread profile', [ 
              'full', 'partial' ])) AND verify_required_tool_body_item(SELF
              , 'thread form type')) AND verify_rep_item_for_tool_body(SELF
              , 'thread form type', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               ]);
    WR22: NOT ((SELF.kind.name = 'turning cutting tool') AND (SELF.
              description = 'grooving tool')) OR ((((((((
              verify_required_tool_body_item(SELF, 'cutting width') AND 
              verify_length_measure_tool_body_item(SELF, 'cutting width')) 
              AND verify_required_tool_body_item(SELF, 
              'maximum grooving depth')) AND 
              verify_length_measure_tool_body_item(SELF, 
              'maximum grooving depth')) AND verify_optional_tool_body_item
              (SELF, 'corner radius')) AND 
              verify_length_measure_tool_body_item(SELF, 'corner radius')) 
              AND verify_optional_tool_body_item(SELF, 
              'maximum axial grooving diameter')) AND 
              verify_length_measure_tool_body_item(SELF, 
              'maximum axial grooving diameter')) AND 
              verify_optional_tool_body_item(SELF, 
              'minimum axial grooving diameter')) AND 
              verify_length_measure_tool_body_item(SELF, 
              'minimum axial grooving diameter');
    WR23: NOT ((SELF.kind.name = 'turning cutting tool') AND (SELF.
              description = 'knurling tool')) OR ((((((
              verify_required_tool_body_item(SELF, 'knurl pattern') AND 
              verify_enumeration_tool_body_item(SELF, 'knurl pattern', [ 
              'straight', 'diagonal', 'diamond' ])) AND 
              verify_optional_tool_body_item(SELF, 'cutting length')) AND 
              verify_length_measure_tool_body_item(SELF, 'cutting length'))
               AND verify_optional_tool_body_item(SELF, 'cutting angle')) 
              AND verify_angle_measure_tool_body_item(SELF, 'cutting angle'
              )) AND verify_optional_tool_body_item(SELF, 'cutting pitch'))
               AND verify_length_measure_tool_body_item(SELF, 
              'cutting pitch');
    WR24: NOT ((SELF.kind.name = 'turning cutting tool') AND (SELF.
              description = 'user defined turning tool')) OR 
              verify_required_tool_body_item(SELF, 'tool identifier') AND 
              verify_rep_item_for_tool_body(SELF, 'tool identifier', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               ]);
    WR25: 1 >= SIZEOF(QUERY (rar <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE.RESOURCES'
              )| (1 = SIZEOF(rar.operations)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TOOL_USAGE'
               IN TYPEOF(rar\action_resource_requirement.operations[1]))));
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_tool_body_representation
  SUBTYPE OF (representation);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_tool_direction_representation
  SUBTYPE OF (representation);
  WHERE
    WR1: SELF.name IN [ 'two axes', 'three axes', 'three axes tilted tool',
               'five axes const tilt yaw', 'five axes var tilt yaw' ];
    WR2: NOT (SELF.name = 'three axes tilted tool') OR 
              verify_required_rep_item(SELF, 'tool direction orientation') 
              AND (0 = SIZEOF(QUERY (it <* SELF.items| (it.name = 
              'tool direction orientation') AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' IN 
              TYPEOF(it)))));
    WR3: NOT (SELF.name = 'five axes const tilt yaw') OR ((
              verify_required_rep_item(SELF, 'tool direction tilt angle') 
              AND verify_angle_measure_rep_item(SELF, 
              'tool direction tilt angle')) AND verify_required_rep_item(
              SELF, 'tool direction yaw angle')) AND 
              verify_angle_measure_rep_item(SELF, 
              'tool direction yaw angle');
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_tool_usage
  SUBTYPE OF (action_method);
  WHERE
    WR1: verify_optional_action_property(SELF, 'tool position') AND 
              verify_descriptive_action_property(SELF, 'tool position');
    WR2: verify_optional_action_property(SELF, 'tool carousel') AND 
              verify_descriptive_action_property(SELF, 'tool carousel');
    WR3: (1 >= SIZEOF(QUERY (act <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION.CHOSEN_METHOD'
              )| (act.name = 'tool usage')))) AND (0 = SIZEOF(QUERY (act <*
               USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION.CHOSEN_METHOD'
              )| (act.name = 'tool usage') AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_PROCESS'
               IN TYPEOF(act)))));
    WR4: verify_optional_action_property(SELF, 'gage placement') AND 
              verify_rep_item_for_action_property(SELF, 'gage placement', [
               
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               ]);
    WR5: verify_optional_action_property(SELF, 'tool end placement') AND 
              verify_rep_item_for_action_property(SELF, 
              'tool end placement', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               ]);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_toolpath
  SUBTYPE OF (action_method);
  WHERE
    WR1: SELF.description IN [ 'feedstop', 'axis trajectory', 
              'cutter location trajectory', 'cutter contact trajectory', 
              'approach lift path angle', 'approach lift path tangent', 
              'connect security plane', 'connect direct' ];
    WR2: verify_optional_action_property(SELF, 'priority') AND 
              verify_enumeration_action_property(SELF, 'priority', [ 
              'required', 'suggested' ]);
    WR3: verify_optional_action_property(SELF, 'trajectory type') AND 
              verify_enumeration_action_property(SELF, 'trajectory type', [
               'approach', 'lift', 'connect', 'non-contact', 'contact', 
              'trajectory path' ]);
    WR4: verify_optional_action_property(SELF, 'speed profile') AND (0 = 
              SIZEOF(QUERY (prop <* get_action_property(SELF, 
              'speed profile')| NOT (0 < SIZEOF(QUERY (prep <* USEDIN(prop,
               
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TOOLPATH_SPEED_PROFILE_REPRESENTATION'
               IN TYPEOF(prep.representation))))))));
    WR5: verify_optional_relating_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TECHNOLOGY_RELATIONSHIP'
               ]) AND verify_related_type_for_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TECHNOLOGY_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TECHNOLOGY'
               ]);
    WR6: verify_optional_relating_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FUNCTIONS_RELATIONSHIP'
               ]) AND verify_related_type_for_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FUNCTIONS_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FUNCTIONS'
               ]);
    WR7: NOT (SELF.description IN [ 'axis trajectory', 
              'cutter location trajectory', 'cutter contact trajectory' ]) 
              OR verify_optional_action_property(SELF, 'direction') AND 
              verify_enumeration_action_property(SELF, 'direction', [ 
              'beginning to end', 'end to beginning' ]);
    WR8: NOT (SELF.description = 'connect security plane') OR ((
              verify_optional_action_property(SELF, 'up direction') AND 
              verify_rep_item_for_action_property(SELF, 'up direction', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ])) 
              AND verify_optional_action_property(SELF, 'down direction')) 
              AND verify_rep_item_for_action_property(SELF, 
              'down direction', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ]);
    WR9: NOT (SELF.description = 'feedstop') OR 
              verify_required_action_property(SELF, 'dwell') AND 
              verify_time_measure_action_property(SELF, 'dwell');
    WR10: NOT (SELF.description = 'axis trajectory') OR 
              verify_required_action_property(SELF, 'axis commands') AND (0
               = SIZEOF(QUERY (prop <* get_action_property(SELF, 
              'axis commands')| NOT (0 < SIZEOF(QUERY (prep <* USEDIN(prop,
               
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY'
              )| (1 <= SIZEOF(QUERY (it <* prep.representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOUNDED_CURVE' 
              IN TYPEOF(it)))))))))));
    WR11: NOT (SELF.description IN [ 'approach lift path angle', 
              'approach lift path tangent' ]) OR ((
              verify_required_action_property(SELF, 'fix point') AND 
              verify_rep_item_for_action_property(SELF, 'fix point', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CARTESIAN_POINT'
               ])) AND verify_optional_action_property(SELF, 
              'fix point direction')) AND 
              verify_rep_item_for_action_property(SELF, 
              'fix point direction', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ]);
    WR12: NOT (SELF.description = 'approach lift path angle') OR ((
              verify_required_action_property(SELF, 'angle') AND 
              verify_angle_measure_action_property(SELF, 'angle')) AND 
              verify_required_action_property(SELF, 'bend distance')) AND 
              verify_length_measure_action_property(SELF, 'bend distance');
    WR13: NOT (SELF.description = 'approach lift path tangent') OR 
              verify_required_action_property(SELF, 'radius') AND 
              verify_length_measure_action_property(SELF, 'radius');
    WR14: NOT (SELF.description = 'cutter location trajectory') OR ((((((((
              verify_required_action_property(SELF, 'basic curve') AND 
              verify_rep_item_for_action_property(SELF, 'basic curve', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOUNDED_CURVE' ]
              )) AND verify_optional_action_property(SELF, 'surface normal'
              )) AND verify_rep_item_for_action_property(SELF, 
              'surface normal', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOUNDED_CURVE' ]
              )) AND verify_optional_action_property(SELF, 'tool axis')) 
              AND verify_rep_item_for_action_property(SELF, 'tool axis', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOUNDED_CURVE' ]
              )) AND verify_optional_action_property(SELF, 
              'path maximum deviation')) AND 
              verify_length_measure_action_property(SELF, 
              'path maximum deviation')) AND 
              verify_optional_action_property(SELF, 
              'tool axis maximum deviation')) AND 
              verify_angle_measure_action_property(SELF, 
              'tool axis maximum deviation');
    WR15: NOT (SELF.description = 'cutter contact trajectory') OR ((((((((
              verify_required_action_property(SELF, 'basic curve') AND 
              verify_rep_item_for_action_property(SELF, 'basic curve', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOUNDED_PCURVE' 
              ]) OR ((verify_required_action_property(SELF, 'basic curve') 
              AND verify_rep_item_for_action_property(SELF, 'basic curve', 
              [ 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOUNDED_CURVE'
               ])) AND verify_required_action_property(SELF, 
              'surface normal')) AND verify_rep_item_for_action_property(
              SELF, 'surface normal', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOUNDED_CURVE' ]
              )) AND verify_optional_action_property(SELF, 'tool axis')) 
              AND verify_rep_item_for_action_property(SELF, 'tool axis', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOUNDED_CURVE' ]
              )) AND verify_optional_action_property(SELF, 'contact type'))
               AND verify_enumeration_action_property(SELF, 'contact type',
               [ 'side', 'front' ])) AND verify_optional_action_property(
              SELF, 'path maximum deviation')) AND 
              verify_length_measure_action_property(SELF, 
              'path maximum deviation')) AND 
              verify_optional_action_property(SELF, 
              'tool axis maximum deviation')) AND 
              verify_angle_measure_action_property(SELF, 
              'tool axis maximum deviation');
    WR16: NOT (SELF.description IN [ 'axis trajectory', 
              'cutter location trajectory', 'cutter contact trajectory' ]) 
              OR ((((verify_optional_action_property(SELF, 
              'material removal depth') AND (
              verify_length_measure_action_property(SELF, 
              'material removal depth') OR 
              verify_rep_item_for_action_property(SELF, 
              'material removal depth', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOUNDED_CURVE' ]
              ))) AND verify_optional_action_property(SELF, 
              'material removal overcut')) AND (
              verify_length_measure_action_property(SELF, 
              'material removal overcut') OR 
              verify_rep_item_for_action_property(SELF, 
              'material removal overcut', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOUNDED_CURVE' ]
              ))) AND verify_optional_action_property(SELF, 
              'material removal total volume')) AND 
              verify_rep_item_for_action_property(SELF, 
              'material removal total volume', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
               ]);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_toolpath_sequence_relationship
  SUBTYPE OF (sequential_method);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_toolpath_speed_profile_representation
  SUBTYPE OF (representation);
  WHERE
    WR1: 1 = SIZEOF(QUERY (it <* SELF.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOUNDED_CURVE' 
              IN TYPEOF(it)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.description IN [ 'rapid' ])) OR (
              SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RATIO_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2)));
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_touch_probing
  SUBTYPE OF (machining_operation);
  WHERE
    WR1: SELF.description IN [ 'feature complete probing', 
              'tool length probing', 'tool radius probing', 
              'workpiece probing', 'workpiece complete probing' ];
    WR2: verify_required_action_property(SELF, 'security plane') AND 
              verify_rep_item_for_action_property(SELF, 'security plane', [
               
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ELEMENTARY_SURFACE'
               ]);
    WR3: verify_required_action_property(SELF, 'measured offset') AND 
              verify_rep_item_for_action_property(SELF, 'measured offset', 
              [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPRESSION_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NUMERIC_VARIABLE'
               ]);
    WR4: NOT (SELF.description = 'workpiece probing') OR (((((((
              verify_required_action_property(SELF, 'start position') AND 
              verify_rep_item_for_action_property(SELF, 'start position', [
               
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               ])) AND (1 = SIZEOF(QUERY (act <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION.CHOSEN_METHOD'
              )| (act.name = 'workpiece probing'))))) AND (0 = SIZEOF(QUERY
               (act <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION.CHOSEN_METHOD'
              )| (act.name = 'workpiece probing') AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_PROCESS'
               IN TYPEOF(act)))))) AND verify_required_action_property(SELF
              , 'direction')) AND verify_rep_item_for_action_property(SELF,
               'direction', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ])) 
              AND verify_required_action_property(SELF, 'expected value')) 
              AND verify_rep_item_for_action_property(SELF, 
              'expected value', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.QUALIFIED_REPRESENTATION_ITEM'
               ])) AND verify_required_action_property(SELF, 'probe');
    WR5: NOT (SELF.description = 'workpiece complete probing') OR ((((((1 =
               SIZEOF(QUERY (act <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION.CHOSEN_METHOD'
              )| (act.name = 'workpiece complete probing')))) AND (0 = 
              SIZEOF(QUERY (act <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION.CHOSEN_METHOD'
              )| (act.name = 'workpiece complete probing') AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_PROCESS'
               IN TYPEOF(act)))))) AND verify_required_action_property(SELF
              , 'probing distance')) AND 
              verify_rep_item_for_action_property(SELF, 'probing distance',
               [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.QUALIFIED_REPRESENTATION_ITEM'
               ])) AND verify_required_action_property(SELF, 'probe')) AND 
              verify_required_action_property(SELF, 'computed offset')) AND
               verify_rep_type_for_action_property(SELF, 'computed offset',
               [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_OFFSET_VECTOR_REPRESENTATION'
               ]);
    WR6: NOT (SELF.description IN [ 'tool length probing', 
              'tool radius probing' ]) OR (((
              verify_required_action_property(SELF, 'offset') AND 
              verify_rep_item_for_action_property(SELF, 'offset', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CARTESIAN_POINT'
               ])) AND verify_required_action_property(SELF, 'maximum wear'
              )) AND verify_length_measure_action_property(SELF, 
              'maximum wear')) AND (1 = SIZEOF(QUERY (mt <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_RESOURCE.USAGE'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TOOL' 
              IN TYPEOF(mt)))));
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_twin_relationship
  SUBTYPE OF (action_method_relationship);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_usage_relationship
  SUBTYPE OF (action_method_relationship);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_workingstep
  SUBTYPE OF (machining_process_executable);
  WHERE
    WR1: verify_optional_action_property(SELF, 'security plane') AND 
              verify_rep_item_for_action_property(SELF, 'security plane', [
               
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ELEMENTARY_SURFACE'
               ]);
    WR2: NOT (SELF.description = 'machining') OR (((
              verify_required_relating_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEATURE_RELATIONSHIP'
               ]) AND verify_related_type_for_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEATURE_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEATURE_PROCESS'
               ])) AND verify_related_type_for_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FINAL_FEATURE_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEATURE_PROCESS'
               ])) AND verify_required_relating_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_OPERATION_RELATIONSHIP'
               ])) AND verify_related_type_for_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_OPERATION_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_OPERATION'
               ]);
    WR3: NOT (SELF.description = 'turning') OR (((2 <= 
              get_count_of_relating_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEATURE_SEQUENCE_RELATIONSHIP'
               ])) AND verify_related_type_for_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEATURE_SEQUENCE_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEATURE_PROCESS'
               ])) AND verify_required_relating_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_OPERATION_RELATIONSHIP'
               ])) AND verify_related_type_for_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_OPERATION_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TURNING_TYPE_OPERATION'
               ]);
    WR4: NOT (SELF.description IN [ 'machining', 'turning' ]) OR 
              verify_optional_in_process_geometry(SELF);
    WR5: verify_optional_action_property(SELF, 'toolpath orientation') AND 
              verify_rep_item_for_action_property(SELF, 
              'toolpath orientation', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               ]);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY machining_workplan
  SUBTYPE OF (machining_process_executable);
  WHERE
    WR1: (1 <= get_count_of_relating_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_SEQUENCE_RELATIONSHIP'
               ])) AND verify_related_type_for_amr(SELF, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_SEQUENCE_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_PROCESS_EXECUTABLE'
               ]);
    WR2: verify_optional_action_property(SELF, 'channel');
    WR3: (1 >= SIZEOF(QUERY (act <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION.CHOSEN_METHOD'
              )| (act.name = 'setup')))) AND (0 = SIZEOF(QUERY (act <* 
              USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION.CHOSEN_METHOD'
              )| (act.name = 'setup') AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_PROCESS'
               IN TYPEOF(act)))));
    WR4: verify_optional_in_process_geometry(SELF);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY magnetic_flux_density_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAGNETIC_FLUX_DENSITY_UNIT'
               IN TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY magnetic_flux_density_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensions_for_si_unit(
              si_unit_name.tesla);
END_ENTITY; -- 10303-41: measure_schema

ENTITY magnetic_flux_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAGNETIC_FLUX_UNIT' 
              IN TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY magnetic_flux_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensions_for_si_unit(
              si_unit_name.weber);
END_ENTITY; -- 10303-41: measure_schema

ENTITY make_from_usage_option
  SUBTYPE OF (product_definition_usage);
    ranking           : INTEGER;
    ranking_rationale : text;
    quantity          : measure_with_unit;
  WHERE
    WR1: NOT ('NUMBER' IN TYPEOF(quantity.value_component)) OR (quantity.
              value_component > 0);
END_ENTITY; -- 10303-44: product_structure_schema

ENTITY manifold_solid_brep
  SUBTYPE OF (solid_model);
    outer : closed_shell;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY manifold_subsurface_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(QUERY (it <* SELF.items| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONNECTED_FACE_SUB_SET'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               ] * TYPEOF(it)) = 1))) = 0;
    WR2: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONNECTED_FACE_SUB_SET'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' ]
               * TYPEOF(it)) = 1))) > 0;
    WR3: SIZEOF(QUERY (mi <* QUERY (it <* items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(it)))| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MANIFOLD_SUBSURFACE_SHAPE_REPRESENTATION'
               IN TYPEOF(mi\mapped_item.mapping_source.
              mapped_representation)))) = 0;
    WR4: SIZEOF(QUERY (cfss <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONNECTED_FACE_SUB_SET'
               IN TYPEOF(it)))| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OPEN_SHELL' IN 
              TYPEOF(cfss)))) = 0;
    WR5: SIZEOF(QUERY (cfss <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONNECTED_FACE_SUB_SET'
               IN TYPEOF(it)))| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONNECTED_FACE_SUB_SET'
               IN TYPEOF(cfss\connected_face_sub_set.parent_face_set)) AND 
              (SIZEOF(QUERY (fac <* cfss\connected_face_sub_set.
              parent_face_set\connected_face_set.cfs_faces| NOT 
              advanced_face_properties(fac))) = 0) OR (SIZEOF(QUERY (fac <*
               cfss\connected_face_sub_set.parent_face_set\
              connected_face_set.cfs_faces| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' 
              IN TYPEOF(fac)))) = 0)))) = 0;
    WR6: SIZEOF(QUERY (cfss <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONNECTED_FACE_SUB_SET'
               IN TYPEOF(it)))| (SIZEOF(QUERY (fac <* cfss\
              connected_face_set.cfs_faces| NOT advanced_face_properties(
              fac))) = 0))) = 0;
    WR7: SIZEOF(QUERY (cfss <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONNECTED_FACE_SUB_SET'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (fcs <* cfss\
              connected_face_set.cfs_faces| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SUBFACE' IN 
              TYPEOF(fcs)) AND NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds 
              <* fcs.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds.
              bound\path.edge_list| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_CURVE' IN 
              TYPEOF(oe.edge_element)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SUBEDGE' IN 
              TYPEOF(oe.edge_element))))) = 0))) = 0))) = 0))) = 0;
    WR8: SIZEOF(QUERY (cfss <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONNECTED_FACE_SUB_SET'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (fcs <* cfss\
              connected_face_set.cfs_faces| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SUBFACE' IN 
              TYPEOF(fcs)) AND NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds 
              <* fcs.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds.
              bound\path.edge_list| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_POINT' IN
               TYPEOF(oe.edge_start)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_POINT' IN
               TYPEOF(oe.edge_end))))) = 0))) = 0))) = 0))) = 0;
    WR9: SIZEOF(QUERY (cfss <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONNECTED_FACE_SUB_SET'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (fcs <* cfss\
              connected_face_set.cfs_faces| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SUBFACE' IN 
              TYPEOF(fcs)) AND NOT (SIZEOF(QUERY (bnds <* fcs.bounds| NOT (
              SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_LOOP' ] *
               TYPEOF(bnds.bound)) = 1))) = 0))) = 0))) = 0;
    WR10: SIZEOF(QUERY (cfss <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONNECTED_FACE_SUB_SET'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (fcs <* cfss\
              connected_face_set.cfs_faces| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SUBFACE' IN 
              TYPEOF(fcs)) AND NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds 
              <* fcs.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds.
              bound\path.edge_list| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONIC', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_CURVE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_CURVE' 
              ] * TYPEOF(oe.edge_element\edge_curve.edge_geometry)) = 1))) 
              = 0))) = 0))) = 0))) = 0;
    WR11: SIZEOF(QUERY (cfss <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONNECTED_FACE_SUB_SET'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (fcs <* cfss\
              connected_face_set.cfs_faces| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SUBFACE' IN 
              TYPEOF(fcs)) AND NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds 
              <* fcs.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds.
              bound\path.edge_list| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_CURVE' 
              IN TYPEOF(oe.edge_element\edge_curve.edge_geometry)) AND NOT 
              (SIZEOF(QUERY (sc_ag <* oe.edge_element\edge_curve.
              edge_geometry\surface_curve.associated_geometry| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PCURVE' IN 
              TYPEOF(sc_ag)))) = 0))) = 0))) = 0))) = 0))) = 0;
    WR12: SIZEOF(QUERY (cfss <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONNECTED_FACE_SUB_SET'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (fcs <* cfss\
              connected_face_set.cfs_faces| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SUBFACE' IN 
              TYPEOF(fcs)) AND NOT (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds 
              <* fcs.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds.
              bound\path.edge_list| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE' IN 
              TYPEOF(oe.edge_element\edge_curve.edge_geometry)) AND NOT (
              SIZEOF(oe\oriented_edge.edge_element\edge_curve.edge_geometry
              \polyline.points) >= 3))) = 0))) = 0))) = 0))) = 0;
END_ENTITY; -- 10303-521: aic_manifold_subsurface

ENTITY manifold_surface_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(QUERY (it <* SELF.items| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_SURFACE_MODEL'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               ] * TYPEOF(it)) = 1))) = 0;
    WR2: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_SURFACE_MODEL'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' ]
               * TYPEOF(it)) = 1))) > 0;
    WR3: SIZEOF(QUERY (mi <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(it)))| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MANIFOLD_SURFACE_SHAPE_REPRESENTATION'
               IN TYPEOF(mi\mapped_item.mapping_source.
              mapped_representation)) AND (SIZEOF(QUERY (mr_it <* mi\
              mapped_item.mapping_source.mapped_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_SURFACE_MODEL'
               IN TYPEOF(mr_it)))) > 0)))) = 0;
    WR4: SIZEOF(QUERY (sbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (sh <* sbsm\
              shell_based_surface_model.sbsm_boundary| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OPEN_SHELL', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORIENTED_CLOSED_SHELL'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CLOSED_SHELL' 
              ] * TYPEOF(sh)) = 1))) = 0))) = 0;
    WR5: SIZEOF(QUERY (sbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cfs <* sbsm\
              shell_based_surface_model.sbsm_boundary| NOT (SIZEOF(QUERY (
              fa <* cfs\connected_face_set.cfs_faces| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SURFACE' IN
               TYPEOF(fa)))) = 0))) = 0))) = 0;
    WR6: SIZEOF(QUERY (sbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cfs <* sbsm\
              shell_based_surface_model.sbsm_boundary| NOT (SIZEOF(QUERY (
              fa <* cfs\connected_face_set.cfs_faces| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' 
              IN TYPEOF(fa)) OR msf_surface_check(fa\face_surface.
              face_geometry)))) = 0))) = 0))) = 0;
    WR7: SIZEOF(QUERY (sbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cfs <* sbsm\
              shell_based_surface_model.sbsm_boundary| NOT (SIZEOF(QUERY (
              fa <* cfs\connected_face_set.cfs_faces| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' 
              IN TYPEOF(fa)) OR (SIZEOF(QUERY (bnds <* fa.bounds| NOT (
              SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_LOOP' ] *
               TYPEOF(bnds.bound)) = 1))) = 0)))) = 0))) = 0))) = 0;
    WR8: SIZEOF(QUERY (sbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cfs <* sbsm\
              shell_based_surface_model.sbsm_boundary| NOT (SIZEOF(QUERY (
              fa <* cfs\connected_face_set.cfs_faces| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' 
              IN TYPEOF(fa)) OR (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* 
              fa.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds\path
              .edge_list| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_CURVE' IN 
              TYPEOF(oe.edge_element)))) = 0))) = 0)))) = 0))) = 0))) = 0;
    WR9: SIZEOF(QUERY (sbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cfs <* sbsm\
              shell_based_surface_model.sbsm_boundary| NOT (SIZEOF(QUERY (
              fa <* cfs\connected_face_set.cfs_faces| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' 
              IN TYPEOF(fa)) OR (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* 
              fa.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe_cv <* QUERY (oe 
              <* elp_fbnds\path.edge_list| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_CURVE' IN 
              TYPEOF(oe.edge_element)))| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_CURVE',
               'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONIC', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_REPLICA', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OFFSET_CURVE_3D'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PCURVE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_CURVE' ]
               * TYPEOF(oe_cv.edge_element\edge_curve.edge_geometry)) = 1))
              ) = 0))) = 0)))) = 0))) = 0))) = 0;
    WR10: SIZEOF(QUERY (sbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cfs <* sbsm\
              shell_based_surface_model.sbsm_boundary| NOT (SIZEOF(QUERY (
              fa <* cfs\connected_face_set.cfs_faces| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' 
              IN TYPEOF(fa)) OR (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* 
              fa.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds\path
              .edge_list| NOT msf_curve_check(oe.edge_element\edge_curve.
              edge_geometry))) = 0))) = 0)))) = 0))) = 0))) = 0;
    WR11: SIZEOF(QUERY (sbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cfs <* sbsm\
              shell_based_surface_model.sbsm_boundary| NOT (SIZEOF(QUERY (
              fa <* cfs\connected_face_set.cfs_faces| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' 
              IN TYPEOF(fa)) OR (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* 
              fa.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds\path
              .edge_list| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_POINT' IN
               TYPEOF(oe.edge_element.edge_start)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_POINT' IN
               TYPEOF(oe.edge_element.edge_end))))) = 0))) = 0)))) = 0))) =
               0))) = 0;
    WR12: SIZEOF(QUERY (sbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cfs <* sbsm\
              shell_based_surface_model.sbsm_boundary| NOT (SIZEOF(QUERY (
              fa <* cfs\connected_face_set.cfs_faces| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' 
              IN TYPEOF(fa)) OR (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* 
              fa.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds\path
              .edge_list| NOT ((SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CARTESIAN_POINT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DEGENERATE_PCURVE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_ON_CURVE',
               
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_ON_SURFACE'
               ] * TYPEOF(oe.edge_element.edge_start\vertex_point.
              vertex_geometry)) = 1) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CARTESIAN_POINT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DEGENERATE_PCURVE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_ON_CURVE',
               
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_ON_SURFACE'
               ] * TYPEOF(oe.edge_element.edge_end\vertex_point.
              vertex_geometry)) = 1)))) = 0))) = 0)))) = 0))) = 0))) = 0;
    WR13: SIZEOF(QUERY (sbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cfs <* sbsm\
              shell_based_surface_model.sbsm_boundary| NOT (SIZEOF(QUERY (
              fa <* cfs\connected_face_set.cfs_faces| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' 
              IN TYPEOF(fa)) OR (SIZEOF(QUERY (vlp_fbnds <* QUERY (bnds <* 
              fa.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_POINT' IN
               TYPEOF(vlp_fbnds\vertex_loop.loop_vertex)))) = 0)))) = 0))) 
              = 0))) = 0;
    WR14: SIZEOF(QUERY (sbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cfs <* sbsm\
              shell_based_surface_model.sbsm_boundary| NOT (SIZEOF(QUERY (
              fa <* cfs\connected_face_set.cfs_faces| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' 
              IN TYPEOF(fa)) OR (SIZEOF(QUERY (vlp_fbnds <* QUERY (bnds <* 
              fa.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CARTESIAN_POINT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DEGENERATE_PCURVE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_ON_CURVE',
               
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_ON_SURFACE'
               ] * TYPEOF(vlp_fbnds\vertex_loop.loop_vertex\vertex_point.
              vertex_geometry)) = 1))) = 0)))) = 0))) = 0))) = 0;
END_ENTITY; -- 10303-509: aic_manifold_surface

ENTITY mapped_item
  SUBTYPE OF (representation_item);
    mapping_source : representation_map;
    mapping_target : representation_item;
  WHERE
    WR1: acyclic_mapped_representation(SELF);
END_ENTITY; -- 10303-43: representation_schema

ENTITY marking
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND ((2 <= SIZEOF(pdr.
              used_representation.items)) AND (SIZEOF(pdr.
              used_representation.items) <= 6)))) = 1))) = 1;
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'marking text'))) = 1))) = 0))
              ) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'special instructions'))) <= 1
              ))) = 0))) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'font name'))) <= 1))) = 0))) 
              = 0;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'character height'))) <=
               1))) = 0))) = 0;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'character spacing'))) 
              <= 1))) = 0))) = 0;
    WR7: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'applied shape') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT' IN
               TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY mass_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MASS_UNIT' IN TYPEOF(
              SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY mass_unit
  SUBTYPE OF (named_unit);
  WHERE
    WR1: ((((((SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\
              named_unit.dimensions.mass_exponent = 1.0)) AND (SELF\
              named_unit.dimensions.time_exponent = 0.0)) AND (SELF\
              named_unit.dimensions.electric_current_exponent = 0.0)) AND (
              SELF\named_unit.dimensions.thermodynamic_temperature_exponent
               = 0.0)) AND (SELF\named_unit.dimensions.
              amount_of_substance_exponent = 0.0)) AND (SELF\named_unit.
              dimensions.luminous_intensity_exponent = 0.0);
END_ENTITY; -- 10303-41: measure_schema

ENTITY material_designation;
    name        : label;
    definitions : SET [1:?] OF characterized_definition;
END_ENTITY; -- 10303-45: material_property_definition_schema

ENTITY material_designation_characterization;
    name        : label;
    description : text;
    designation : material_designation;
    property    : characterized_material_property;
END_ENTITY; -- 10303-45: material_property_definition_schema

ENTITY material_property
  SUBTYPE OF (property_definition);
  UNIQUE
    UR1: SELF\property_definition.name, SELF\property_definition.definition;
  WHERE
    WR1: (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CHARACTERIZED_OBJECT'
               IN TYPEOF(SELF\property_definition.definition)) OR (SIZEOF(
              bag_to_set(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )) - QUERY (temp <* bag_to_set(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              ))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MATERIAL_PROPERTY_REPRESENTATION'
               IN TYPEOF(temp)))) = 0);
END_ENTITY; -- 10303-45: material_property_definition_schema

ENTITY material_property_representation
  SUBTYPE OF (property_definition_representation);
    dependent_environment : data_environment;
END_ENTITY; -- 10303-45: material_property_representation_schema

ENTITY mathematical_description;
    described  : maths_expression;
    describing : STRING;
    encoding   : label;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY maths_boolean_variable
  SUBTYPE OF (maths_variable, boolean_variable);
  WHERE
    WR1: subspace_of_es(SELF\maths_variable.values_space, es_booleans);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY maths_enum_literal
  SUBTYPE OF (generic_literal);
    lit_value : maths_enum_atom;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY maths_function
  ABSTRACT SUPERTYPE OF (ONEOF(finite_function, constant_function, 
      selector_function, elementary_function, restriction_function, 
      repackaging_function, reindexed_array_function, 
      series_composed_function, parallel_composed_function, 
      explicit_table_function, homogeneous_linear_function, 
      general_linear_function, b_spline_basis, b_spline_function, 
      rationalize_function, partial_derivative_function, 
      definite_integral_function, abstracted_expression_function, 
      expression_denoted_function, imported_point_function, 
      imported_curve_function, imported_surface_function, 
      imported_volume_function, application_defined_function))
  SUBTYPE OF (generic_expression);
  DERIVE
    domain : tuple_space := derive_function_domain(SELF);
    range  : tuple_space := derive_function_range(SELF);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY maths_integer_variable
  SUBTYPE OF (maths_variable, int_numeric_variable);
  WHERE
    WR1: subspace_of_es(SELF\maths_variable.values_space, es_integers);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY maths_real_variable
  SUBTYPE OF (maths_variable, real_numeric_variable);
  WHERE
    WR1: subspace_of_es(SELF\maths_variable.values_space, es_reals);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY maths_space
  ABSTRACT SUPERTYPE OF (ONEOF(elementary_space, finite_integer_interval, 
      integer_interval_from_min, integer_interval_to_max, 
      finite_real_interval, real_interval_from_min, real_interval_to_max, 
      cartesian_complex_number_region, polar_complex_number_region, 
      finite_space, uniform_product_space, listed_product_space, 
      extended_tuple_space, function_space))
  SUBTYPE OF (generic_expression);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY maths_string_variable
  SUBTYPE OF (maths_variable, string_variable);
  WHERE
    WR1: subspace_of_es(SELF\maths_variable.values_space, es_strings);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY maths_tuple_literal
  SUBTYPE OF (generic_literal);
    lit_value : LIST OF maths_value;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY maths_value_precision_qualifier;
    precision_value : maths_value;
END_ENTITY; -- 10303-45: qualified_measure_schema

ENTITY maths_variable
  SUBTYPE OF (generic_variable);
    values_space : maths_space;
    name         : label;
  WHERE
    WR1: expression_is_constant(values_space);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY maximum_function
  SUBTYPE OF (multiple_arity_function_call);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY measure_qualification;
    name              : label;
    description       : text;
    qualified_measure : measure_with_unit;
    qualifiers        : SET [1:?] OF value_qualifier;
  WHERE
    WR1: SIZEOF(QUERY (temp <* qualifiers| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRECISION_QUALIFIER'
               IN TYPEOF(temp)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MATHS_VALUE_PRECISION_QUALIFIER'
               IN TYPEOF(temp)))) < 2;
    WR2: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_ITEM'
               IN TYPEOF(SELF\measure_qualification.qualified_measure));
END_ENTITY; -- 10303-45: qualified_measure_schema

ENTITY measure_representation_item
  SUBTYPE OF (representation_item, measure_with_unit);
END_ENTITY; -- 10303-45: qualified_measure_schema

ENTITY measure_with_unit
  SUPERTYPE OF (ONEOF(length_measure_with_unit, mass_measure_with_unit, 
      time_measure_with_unit, electric_current_measure_with_unit, 
      thermodynamic_temperature_measure_with_unit, 
      celsius_temperature_measure_with_unit, 
      amount_of_substance_measure_with_unit, 
      luminous_intensity_measure_with_unit, plane_angle_measure_with_unit, 
      solid_angle_measure_with_unit, area_measure_with_unit, 
      volume_measure_with_unit, ratio_measure_with_unit, 
      acceleration_measure_with_unit, capacitance_measure_with_unit, 
      electric_charge_measure_with_unit, conductance_measure_with_unit, 
      electric_potential_measure_with_unit, energy_measure_with_unit, 
      magnetic_flux_density_measure_with_unit, force_measure_with_unit, 
      frequency_measure_with_unit, illuminance_measure_with_unit, 
      inductance_measure_with_unit, luminous_flux_measure_with_unit, 
      magnetic_flux_measure_with_unit, power_measure_with_unit, 
      pressure_measure_with_unit, resistance_measure_with_unit, 
      velocity_measure_with_unit, absorbed_dose_measure_with_unit, 
      radioactivity_measure_with_unit, dose_equivalent_measure_with_unit));
    value_component : measure_value;
    unit_component  : unit;
  WHERE
    WR1: valid_units(SELF);
END_ENTITY; -- 10303-41: measure_schema

ENTITY mechanical_design_and_draughting_relationship
  SUBTYPE OF (definitional_representation_relationship_with_same_context);
    SELF\representation_relationship.rep_1 : 
               mechanical_design_and_draughting_relationship_select;
    SELF\representation_relationship.rep_2 : 
               mechanical_design_and_draughting_relationship_select;
  WHERE
    WR1: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_MODEL'
               IN TYPEOF(rep_2)) OR ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_MODEL'
               IN TYPEOF(rep_1)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION'
               IN TYPEOF(rep_1)));
    WR2: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION'
               IN TYPEOF(rep_2)) OR ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION'
               IN TYPEOF(rep_1)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION'
               IN TYPEOF(rep_1)));
    WR3: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MECHANICAL_DESIGN_SHADED_PRESENTATION_REPRESENTATION'
               IN TYPEOF(rep_2)) OR ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MECHANICAL_DESIGN_SHADED_PRESENTATION_REPRESENTATION'
               IN TYPEOF(rep_1)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION'
               IN TYPEOF(rep_1)));
END_ENTITY; -- 10303-1315: mechanical_design_presentation_representation_with_draughting_mim

ENTITY mechanical_design_geometric_presentation_area
  SUBTYPE OF (presentation_area);
    SELF\representation.items : SET [1:?] OF 
               mechanical_design_geometric_presentation_area_items;
  WHERE
    WR1: SIZEOF(QUERY (it1 <* SELF.items| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(it1)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_VIEW'
               IN TYPEOF(it1\mapped_item.mapping_source.
              mapped_representation)))) = 0;
    WR2: SIZEOF(QUERY (pv <* QUERY (mi1 <* QUERY (it1 <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(it1)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_VIEW'
               IN TYPEOF(mi1\mapped_item.mapping_source.
              mapped_representation)))| NOT (SIZEOF(QUERY (it2 <* pv\
              mapped_item.mapping_source.mapped_representation\
              representation.items| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT'
               IN TYPEOF(it2)) OR ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(it2)) AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CAMERA_IMAGE_3D_WITH_SCALE'
               IN TYPEOF(it2))) AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_VIEW'
               IN TYPEOF(it2\mapped_item.mapping_source.
              mapped_representation))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CAMERA_IMAGE_3D_WITH_SCALE'
               IN TYPEOF(it2)) AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION'
               IN TYPEOF(it2\mapped_item.mapping_source.
              mapped_representation)))) = 0))) = 0;
    WR3: (SIZEOF(QUERY (ps <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_SIZE.UNIT'
              )| (ps\presentation_size.size.size_in_x <= 0) OR (ps\
              presentation_size.size.size_in_y <= 0))) = 0) AND (SIZEOF(
              QUERY (ais <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AREA_IN_SET.AREA'
              )| (SIZEOF(QUERY (ps <* USEDIN(ais, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_SIZE.UNIT'
              )| (ps\presentation_size.size.size_in_x <= 0) OR (ps\
              presentation_size.size.size_in_y <= 0))) > 0))) = 0);
    WR4: (SIZEOF(QUERY (ps <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_SIZE.UNIT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_2D'
               IN TYPEOF(ps.size.placement)))) = 1) AND (SIZEOF(QUERY (ps 
              <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_SIZE.UNIT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               IN TYPEOF(ps.size.placement)))) = 0) OR (SIZEOF(QUERY (ais 
              <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AREA_IN_SET.AREA'
              )| (SIZEOF(QUERY (ps <* USEDIN(ais, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_SIZE.UNIT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_2D'
               IN TYPEOF(ps.size.placement)))) = 1))) = 1) AND (SIZEOF(
              QUERY (ais <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AREA_IN_SET.AREA'
              )| (SIZEOF(QUERY (ps <* USEDIN(ais, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_SIZE.UNIT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               IN TYPEOF(ps.size.placement)))) = 0))) = 1);
END_ENTITY; -- 10303-517: aic_mechanical_design_geometric_presentation

ENTITY mechanical_design_geometric_presentation_representation
  SUBTYPE OF (representation);
    SELF\representation.items : SET [1:?] OF 
               mechanical_design_geometric_presentation_representation_items
               ;
  WHERE
    WR1: SIZEOF(QUERY (mi <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION'
               ] * TYPEOF(mi\mapped_item.mapping_source.
              mapped_representation)) = 1))) = 0;
    WR2: SIZEOF(QUERY (smi <* QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(si\styled_item.item)))| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION'
               IN TYPEOF(smi\styled_item.item\mapped_item.mapping_source.
              mapped_representation)))) = 0;
    WR3: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (pss <* psa.styles| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_STYLE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
               ] * TYPEOF(pss)) = 1))) = 0))) = 0))) = 0;
    WR4: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psbc <* QUERY (psa <* si\
              styled_item.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_STYLE_BY_CONTEXT'
               IN TYPEOF(psa)))| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION' 
              ] * TYPEOF(psbc\presentation_style_by_context.style_context))
               = 1))) = 0))) = 0;
    WR5: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (ps <* QUERY (pss <* psa.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_STYLE' IN 
              TYPEOF(pss)))| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITIVE_LENGTH_MEASURE'
               IN TYPEOF(ps\point_style.marker_size)) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COLOUR_RGB', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_COLOUR'
               ] * TYPEOF(ps\point_style.marker_colour)) = 1)))) = 0))) = 0
              ))) = 0;
    WR6: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (cs <* QUERY (pss <* psa.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE' IN 
              TYPEOF(pss)))| NOT (((SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COLOUR_RGB', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_COLOUR'
               ] * TYPEOF(cs\curve_style.curve_colour)) = 1) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITIVE_LENGTH_MEASURE'
               IN TYPEOF(cs\curve_style.curve_width))) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE_FONT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_CURVE_FONT'
               ] * TYPEOF(cs\curve_style.curve_font)) = 1)))) = 0))) = 0)))
               = 0;
    WR7: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (ssu <* QUERY (pss <* psa.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
               IN TYPEOF(pss)))| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_SIDE_STYLE'
               IN TYPEOF(ssu\surface_style_usage.style)))) = 0))) = 0))) = 
              0;
    WR8: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (ssu <* QUERY (pss <* psa.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
               IN TYPEOF(pss)))| NOT (SIZEOF(QUERY (sses <* ssu\
              surface_style_usage.style\surface_side_style.styles| NOT (
              SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_PARAMETER_LINE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_CONTROL_GRID'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_SILHOUETTE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_SEGMENTATION_CURVE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_FILL_AREA'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_BOUNDARY'
               ] * TYPEOF(sses)) = 1))) = 0))) = 0))) = 0))) = 0;
    WR9: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (ssu <* QUERY (pss <* psa.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
               IN TYPEOF(pss)))| NOT (SIZEOF(QUERY (sspl <* QUERY (sses <* 
              ssu\surface_style_usage.style\surface_side_style.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_PARAMETER_LINE'
               IN TYPEOF(sses)))| NOT ((((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE' IN 
              TYPEOF(sspl\surface_style_parameter_line.
              style_of_parameter_lines)) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COLOUR_RGB', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_COLOUR'
               ] * TYPEOF(sspl\surface_style_parameter_line.
              style_of_parameter_lines\curve_style.curve_colour)) = 1)) AND
               (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITIVE_LENGTH_MEASURE'
               IN TYPEOF(sspl\surface_style_parameter_line.
              style_of_parameter_lines\curve_style.curve_width))) AND (
              SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE_FONT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_CURVE_FONT'
               ] * TYPEOF(sspl\surface_style_parameter_line.
              style_of_parameter_lines\curve_style.curve_font)) = 1)))) = 0
              ))) = 0))) = 0))) = 0;
    WR10: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (ssu <* QUERY (pss <* psa.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
               IN TYPEOF(pss)))| NOT (SIZEOF(QUERY (sscg <* QUERY (sses <* 
              ssu\surface_style_usage.style\surface_side_style.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_CONTROL_GRID'
               IN TYPEOF(sses)))| NOT ((((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE' IN 
              TYPEOF(sscg\surface_style_control_grid.style_of_control_grid)
              ) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COLOUR_RGB', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_COLOUR'
               ] * TYPEOF(sscg\surface_style_control_grid.
              style_of_control_grid\curve_style.curve_colour)) = 1)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITIVE_LENGTH_MEASURE'
               IN TYPEOF(sscg\surface_style_control_grid.
              style_of_control_grid\curve_style.curve_width))) AND (SIZEOF(
              [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE_FONT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_CURVE_FONT'
               ] * TYPEOF(sscg\surface_style_control_grid.
              style_of_control_grid\curve_style.curve_font)) = 1)))) = 0)))
               = 0))) = 0))) = 0;
    WR11: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (ssu <* QUERY (pss <* psa.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
               IN TYPEOF(pss)))| NOT (SIZEOF(QUERY (sssh <* QUERY (sses <* 
              ssu\surface_style_usage.style\surface_side_style.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_SILHOUETTE'
               IN TYPEOF(sses)))| NOT ((((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE' IN 
              TYPEOF(sssh\surface_style_silhouette.style_of_silhouette)) 
              AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COLOUR_RGB', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_COLOUR'
               ] * TYPEOF(sssh\surface_style_silhouette.style_of_silhouette
              \curve_style.curve_colour)) = 1)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITIVE_LENGTH_MEASURE'
               IN TYPEOF(sssh\surface_style_silhouette.style_of_silhouette\
              curve_style.curve_width))) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE_FONT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_CURVE_FONT'
               ] * TYPEOF(sssh\surface_style_silhouette.style_of_silhouette
              \curve_style.curve_font)) = 1)))) = 0))) = 0))) = 0))) = 0;
    WR12: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (ssu <* QUERY (pss <* psa.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
               IN TYPEOF(pss)))| NOT (SIZEOF(QUERY (sssc <* QUERY (sses <* 
              ssu\surface_style_usage.style\surface_side_style.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_SEGMENTATION_CURVE'
               IN TYPEOF(sses)))| NOT ((((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE' IN 
              TYPEOF(sssc\surface_style_segmentation_curve.
              style_of_segmentation_curve)) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COLOUR_RGB', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_COLOUR'
               ] * TYPEOF(sssc\surface_style_segmentation_curve.
              style_of_segmentation_curve\curve_style.curve_colour)) = 1)) 
              AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITIVE_LENGTH_MEASURE'
               IN TYPEOF(sssc\surface_style_segmentation_curve.
              style_of_segmentation_curve\curve_style.curve_width))) AND (
              SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE_FONT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_CURVE_FONT'
               ] * TYPEOF(sssc\surface_style_segmentation_curve.
              style_of_segmentation_curve\curve_style.curve_font)) = 1)))) 
              = 0))) = 0))) = 0))) = 0;
    WR13: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (ssu <* QUERY (pss <* psa.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
               IN TYPEOF(pss)))| NOT (SIZEOF(QUERY (ssbd <* QUERY (sses <* 
              ssu\surface_style_usage.style\surface_side_style.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_BOUNDARY'
               IN TYPEOF(sses)))| NOT ((((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE' IN 
              TYPEOF(ssbd\surface_style_boundary.style_of_boundary)) AND (
              SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COLOUR_RGB', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_COLOUR'
               ] * TYPEOF(ssbd\surface_style_boundary.style_of_boundary\
              curve_style.curve_colour)) = 1)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITIVE_LENGTH_MEASURE'
               IN TYPEOF(ssbd\surface_style_boundary.style_of_boundary\
              curve_style.curve_width))) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE_FONT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_CURVE_FONT'
               ] * TYPEOF(ssbd\surface_style_boundary.style_of_boundary\
              curve_style.curve_font)) = 1)))) = 0))) = 0))) = 0))) = 0;
END_ENTITY; -- 10303-517: aic_mechanical_design_geometric_presentation

ENTITY mechanical_design_presentation_representation_with_draughting
  SUBTYPE OF (representation);
    SELF\representation.items : SET [1:?] OF camera_model_d3;
END_ENTITY; -- 10303-1315: mechanical_design_presentation_representation_with_draughting_mim

ENTITY mechanical_design_requirement_item_association
  SUBTYPE OF (pmi_requirement_item_association);
    SELF\pmi_requirement_item_association.requirement : 
                     requirement_assignment;
END_ENTITY; -- 10303-1846: mechanical_design_features_and_requirements_mim

ENTITY mechanical_design_shaded_presentation_area
  SUBTYPE OF (presentation_area);
    SELF\representation.items : SET [1:?] OF 
               mechanical_design_shaded_presentation_area_items;
  WHERE
    WR1: SIZEOF(QUERY (it1 <* SELF.items| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT'
               IN TYPEOF(it1)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(it1)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_VIEW'
               IN TYPEOF(it1\mapped_item.mapping_source.
              mapped_representation))))) = 0;
    WR2: SIZEOF(QUERY (pv <* QUERY (mi1 <* QUERY (it1 <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(it1)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_VIEW'
               IN TYPEOF(mi1\mapped_item.mapping_source.
              mapped_representation)))| NOT (SIZEOF(QUERY (it2 <* pv\
              mapped_item.mapping_source.mapped_representation\
              representation.items| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT'
               IN TYPEOF(it2)) OR ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(it2)) AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CAMERA_IMAGE_3D_WITH_SCALE'
               IN TYPEOF(it2))) AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_VIEW'
               IN TYPEOF(it2\mapped_item.mapping_source.
              mapped_representation))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CAMERA_IMAGE_3D_WITH_SCALE'
               IN TYPEOF(it2)) AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MECHANICAL_DESIGN_SHADED_PRESENTATION_REPRESENTATION'
               IN TYPEOF(it2\mapped_item.mapping_source.
              mapped_representation)))) = 0))) = 0;
    WR3: (SIZEOF(QUERY (ps <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_SIZE.UNIT'
              )| NOT ((ps\presentation_size.size.size_in_x > 0) AND (ps\
              presentation_size.size.size_in_y > 0)))) = 0) AND (SIZEOF(
              QUERY (pset <* QUERY (ais <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AREA_IN_SET.AREA'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_SET'
               IN TYPEOF(ais.in_set)))| (SIZEOF(QUERY (ps <* USEDIN(pset, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_SIZE.UNIT'
              )| NOT ((ps\presentation_size.size.size_in_x > 0) AND (ps\
              presentation_size.size.size_in_y > 0)))) = 0))) = 0);
    WR4: (SIZEOF(QUERY (psize <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_SIZE.UNIT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_2D'
               IN TYPEOF(psize.size.placement)))) = 1) AND (SIZEOF(QUERY (
              pset <* QUERY (ais <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AREA_IN_SET.AREA'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_SET'
               IN TYPEOF(ais.in_set)))| (SIZEOF(QUERY (psize <* USEDIN(pset
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_SIZE.UNIT'
              )| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_2D'
               IN TYPEOF(psize.size.placement)))) = 0))) = 0);
    WR5: SIZEOF(QUERY (pv <* QUERY (mi1 <* QUERY (it1 <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(it1)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_VIEW'
               IN TYPEOF(mi1\mapped_item.mapping_source.
              mapped_representation)))| NOT (SIZEOF(QUERY (ci <* pv\
              mapped_item.mapping_source.mapped_representation\
              representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CAMERA_IMAGE_3D_WITH_SCALE'
               IN TYPEOF(ci)) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CAMERA_MODEL_D3'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CAMERA_MODEL_D3_WITH_HLHSR'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CAMERA_MODEL_WITH_LIGHT_SOURCES'
               ] * TYPEOF(ci\mapped_item.mapping_source.mapping_origin)) = 
              1))) = 0))) = 0;
END_ENTITY; -- 10303-518: aic_mechanical_design_shaded_presentation

ENTITY mechanical_design_shaded_presentation_representation
  SUBTYPE OF (representation);
    SELF\representation.items : SET [1:?] OF 
               mechanical_design_shaded_presentation_representation_items;
  WHERE
    WR1: SIZEOF(QUERY (mi <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MECHANICAL_DESIGN_SHADED_PRESENTATION_REPRESENTATION'
               ] * TYPEOF(mi\mapped_item.mapping_source.
              mapped_representation)) = 1))) = 0;
    WR2: SIZEOF(QUERY (smi <* QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(si\styled_item.item)))| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION'
               IN TYPEOF(smi\styled_item.item\mapped_item.mapping_source.
              mapped_representation)))) = 0;
    WR3: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (pss <* psa.styles| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_STYLE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
               ] * TYPEOF(pss)) = 1))) = 0))) = 0))) = 0;
    WR4: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psbc <* QUERY (psa <* si\
              styled_item.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_STYLE_BY_CONTEXT'
               IN TYPEOF(psa)))| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION' 
              ] * TYPEOF(psbc\presentation_style_by_context.style_context))
               = 1))) = 0))) = 0;
    WR5: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (ps <* QUERY (pss <* psa.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_STYLE' IN 
              TYPEOF(pss)))| NOT (((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MARKER_TYPE' IN 
              TYPEOF(ps\point_style.marker)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITIVE_LENGTH_MEASURE'
               IN TYPEOF(ps\point_style.marker_size))) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COLOUR_RGB', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_COLOUR'
               ] * TYPEOF(ps\point_style.marker_colour)) = 1)))) = 0))) = 0
              ))) = 0;
    WR6: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (cs <* QUERY (pss <* psa.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE' IN 
              TYPEOF(pss)))| NOT (((SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COLOUR_RGB', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_COLOUR'
               ] * TYPEOF(cs\curve_style.curve_colour)) = 1) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITIVE_LENGTH_MEASURE'
               IN TYPEOF(cs\curve_style.curve_width))) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE_FONT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_CURVE_FONT'
               ] * TYPEOF(cs\curve_style.curve_font)) = 1)))) = 0))) = 0)))
               = 0;
    WR7: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (ssu <* QUERY (pss <* psa.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
               IN TYPEOF(pss)))| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_SIDE_STYLE'
               IN TYPEOF(ssu\surface_style_usage.style)))) = 0))) = 0))) = 
              0;
    WR8: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (ssu <* QUERY (pss <* psa.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
               IN TYPEOF(pss)))| NOT (SIZEOF(QUERY (sses <* ssu\
              surface_style_usage.style\surface_side_style.styles| NOT (
              SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_PARAMETER_LINE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_CONTROL_GRID'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_SILHOUETTE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_SEGMENTATION_CURVE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_BOUNDARY'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_FILL_AREA'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_RENDERING'
               ] * TYPEOF(sses)) = 1))) = 0))) = 0))) = 0))) = 0;
    WR9: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (ssu <* QUERY (pss <* psa.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
               IN TYPEOF(pss)))| NOT (SIZEOF(QUERY (ssfa <* QUERY (sses <* 
              ssu\surface_style_usage.style\surface_side_style.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_FILL_AREA'
               IN TYPEOF(sses)))| NOT (SIZEOF(QUERY (fss <* ssfa\
              surface_style_fill_area.fill_area.fill_styles| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FILL_AREA_STYLE_COLOUR'
               IN TYPEOF(fss)) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COLOUR_RGB', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_COLOUR'
               ] * TYPEOF(fss\fill_area_style_colour.fill_colour)) = 1)))) 
              = 0))) = 0))) = 0))) = 0))) = 0;
    WR10: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (ssu <* QUERY (pss <* psa.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
               IN TYPEOF(pss)))| NOT (SIZEOF(QUERY (sspl <* QUERY (sses <* 
              ssu\surface_style_usage.style\surface_side_style.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_PARAMETER_LINE'
               IN TYPEOF(sses)))| NOT ((((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE' IN 
              TYPEOF(sspl\surface_style_parameter_line.
              style_of_parameter_lines)) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COLOUR_RGB', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_COLOUR'
               ] * TYPEOF(sspl\surface_style_parameter_line.
              style_of_parameter_lines\curve_style.curve_colour)) = 1)) AND
               (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITIVE_LENGTH_MEASURE'
               IN TYPEOF(sspl\surface_style_parameter_line.
              style_of_parameter_lines\curve_style.curve_width))) AND (
              SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE_FONT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_CURVE_FONT'
               ] * TYPEOF(sspl\surface_style_parameter_line.
              style_of_parameter_lines\curve_style.curve_font)) = 1) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE_RENDERING'
               IN TYPEOF(sspl\surface_style_parameter_line.
              style_of_parameter_lines)) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COLOUR_RGB', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_COLOUR'
               ] * TYPEOF(sspl\surface_style_parameter_line.
              style_of_parameter_lines\curve_style_rendering.
              rendering_properties.rendered_colour)) = 1)))) = 0))) = 0))) 
              = 0))) = 0;
    WR11: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (ssu <* QUERY (pss <* psa.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
               IN TYPEOF(pss)))| NOT (SIZEOF(QUERY (sscg <* QUERY (sses <* 
              ssu\surface_style_usage.style\surface_side_style.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_CONTROL_GRID'
               IN TYPEOF(sses)))| NOT ((((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE' IN 
              TYPEOF(sscg\surface_style_control_grid.style_of_control_grid)
              ) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COLOUR_RGB', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_COLOUR'
               ] * TYPEOF(sscg\surface_style_control_grid.
              style_of_control_grid\curve_style.curve_colour)) = 1)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITIVE_LENGTH_MEASURE'
               IN TYPEOF(sscg\surface_style_control_grid.
              style_of_control_grid\curve_style.curve_width))) AND (SIZEOF(
              [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE_FONT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_CURVE_FONT'
               ] * TYPEOF(sscg\surface_style_control_grid.
              style_of_control_grid\curve_style.curve_font)) = 1) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE_RENDERING'
               IN TYPEOF(sscg\surface_style_control_grid.
              style_of_control_grid)) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COLOUR_RGB', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_COLOUR'
               ] * TYPEOF(sscg\surface_style_control_grid.
              style_of_control_grid\curve_style_rendering.
              rendering_properties.rendered_colour)) = 1)))) = 0))) = 0))) 
              = 0))) = 0;
    WR12: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (ssu <* QUERY (pss <* psa.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
               IN TYPEOF(pss)))| NOT (SIZEOF(QUERY (sssh <* QUERY (sses <* 
              ssu\surface_style_usage.style\surface_side_style.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_SILHOUETTE'
               IN TYPEOF(sses)))| NOT ((((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE' IN 
              TYPEOF(sssh\surface_style_silhouette.style_of_silhouette)) 
              AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COLOUR_RGB', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_COLOUR'
               ] * TYPEOF(sssh\surface_style_silhouette.style_of_silhouette
              \curve_style.curve_colour)) = 1)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITIVE_LENGTH_MEASURE'
               IN TYPEOF(sssh\surface_style_silhouette.style_of_silhouette\
              curve_style.curve_width))) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE_FONT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_CURVE_FONT'
               ] * TYPEOF(sssh\surface_style_silhouette.style_of_silhouette
              \curve_style.curve_font)) = 1) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE_RENDERING'
               IN TYPEOF(sssh\surface_style_silhouette.style_of_silhouette)
              ) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COLOUR_RGB', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_COLOUR'
               ] * TYPEOF(sssh\surface_style_silhouette.style_of_silhouette
              \curve_style_rendering.rendering_properties.rendered_colour))
               = 1)))) = 0))) = 0))) = 0))) = 0;
    WR13: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (ssu <* QUERY (pss <* psa.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
               IN TYPEOF(pss)))| NOT (SIZEOF(QUERY (sssc <* QUERY (sses <* 
              ssu\surface_style_usage.style\surface_side_style.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_SEGMENTATION_CURVE'
               IN TYPEOF(sses)))| NOT ((((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE' IN 
              TYPEOF(sssc\surface_style_segmentation_curve.
              style_of_segmentation_curve)) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COLOUR_RGB', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_COLOUR'
               ] * TYPEOF(sssc\surface_style_segmentation_curve.
              style_of_segmentation_curve\curve_style.curve_colour)) = 1)) 
              AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITIVE_LENGTH_MEASURE'
               IN TYPEOF(sssc\surface_style_segmentation_curve.
              style_of_segmentation_curve\curve_style.curve_width))) AND (
              SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE_FONT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_CURVE_FONT'
               ] * TYPEOF(sssc\surface_style_segmentation_curve.
              style_of_segmentation_curve\curve_style.curve_font)) = 1) OR 
              (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE_RENDERING'
               IN TYPEOF(sssc\surface_style_segmentation_curve.
              style_of_segmentation_curve)) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COLOUR_RGB', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_COLOUR'
               ] * TYPEOF(sssc\surface_style_segmentation_curve.
              style_of_segmentation_curve\curve_style_rendering.
              rendering_properties.rendered_colour)) = 1)))) = 0))) = 0))) 
              = 0))) = 0;
    WR14: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (ssu <* QUERY (pss <* psa.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
               IN TYPEOF(pss)))| NOT (SIZEOF(QUERY (ssbd <* QUERY (sses <* 
              ssu\surface_style_usage.style\surface_side_style.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_BOUNDARY'
               IN TYPEOF(sses)))| NOT ((((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE' IN 
              TYPEOF(ssbd\surface_style_boundary.style_of_boundary)) AND (
              SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COLOUR_RGB', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_COLOUR'
               ] * TYPEOF(ssbd\surface_style_boundary.style_of_boundary\
              curve_style.curve_colour)) = 1)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITIVE_LENGTH_MEASURE'
               IN TYPEOF(ssbd\surface_style_boundary.style_of_boundary\
              curve_style.curve_width))) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE_FONT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_CURVE_FONT'
               ] * TYPEOF(ssbd\surface_style_boundary.style_of_boundary\
              curve_style.curve_font)) = 1) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE_RENDERING'
               IN TYPEOF(ssbd\surface_style_boundary.style_of_boundary)) 
              AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COLOUR_RGB', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_COLOUR'
               ] * TYPEOF(ssbd\surface_style_boundary.style_of_boundary\
              curve_style_rendering.rendering_properties.rendered_colour)) 
              = 1)))) = 0))) = 0))) = 0))) = 0;
    WR15: SIZEOF(QUERY (si <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(it)))| NOT (SIZEOF(QUERY (psa <* si\styled_item.styles
              | NOT (SIZEOF(QUERY (ssu <* QUERY (pss <* psa.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
               IN TYPEOF(pss)))| NOT (SIZEOF(QUERY (ssre <* QUERY (sses <* 
              ssu\surface_style_usage.style\surface_side_style.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_RENDERING'
               IN TYPEOF(sses)))| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COLOUR_RGB', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_PRE_DEFINED_COLOUR'
               ] * TYPEOF(ssre\surface_style_rendering.surface_colour)) = 1
              ))) = 0))) = 0))) = 0))) = 0;
END_ENTITY; -- 10303-518: aic_mechanical_design_shaded_presentation

ENTITY mechanism_representation
  SUBTYPE OF (representation);
    SELF\representation.context_of_items : geometric_representation_context
                              ;
    SELF\representation.items : SET [1:?] OF 
                              pair_representation_relationship;
    represented_topology : kinematic_topology_representation_select;
  DERIVE
    represented_joints : SET [1:?] OF kinematic_joint := collect_joints(
                            items);
  WHERE
    WR1: ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.KINEMATIC_TOPOLOGY_STRUCTURE'
               IN TYPEOF(represented_topology)) AND (represented_joints :=:
               represented_topology.items) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.KINEMATIC_TOPOLOGY_DIRECTED_STRUCTURE'
               IN TYPEOF(represented_topology)) AND (represented_joints :=:
               get_kinematic_joints_from_oriented_joints(
              represented_topology.items))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.KINEMATIC_TOPOLOGY_NETWORK_STRUCTURE'
               IN TYPEOF(represented_topology)) AND (represented_joints :=:
               get_kinematic_joints_from_kinematic_loops(
              represented_topology.items));
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY mechanism_state_representation
  SUBTYPE OF (representation);
    SELF\representation.items : SET [1:?] OF pair_value;
    represented_mechanism : mechanism_representation;
  DERIVE
    SELF\representation.context_of_items : geometric_representation_context
                           := represented_mechanism.context_of_items;
END_ENTITY; -- 10303-105: kinematic_state_schema

ENTITY milling_type_operation
  SUBTYPE OF (machining_operation);
  WHERE
    WR1: verify_optional_action_property(SELF, 'overcut length') AND 
              verify_length_measure_action_property(SELF, 'overcut length')
              ;
    WR2: verify_optional_relating_amr_with_name(SELF, 'approach', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'
               ]) AND verify_related_type_for_amr_with_name(SELF, 
              'approach', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_APPROACH_RETRACT_STRATEGY'
               ]);
    WR3: verify_optional_relating_amr_with_name(SELF, 'retract', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'
               ]) AND verify_related_type_for_amr_with_name(SELF, 'retract'
              , [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_APPROACH_RETRACT_STRATEGY'
               ]);
    WR4: verify_optional_relating_amr_with_name(SELF, 'machining', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'
               ]) AND verify_related_type_for_amr_with_name(SELF, 
              'machining', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MILLING_TYPE_STRATEGY'
               ]);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY milling_type_strategy
  SUBTYPE OF (machining_strategy);
  WHERE
    WR1: NOT (SELF.description IN [ 'bidirectional', 
              'bidirectional contour', 'center milling', 
              'contour bidirectional', 'contour parallel', 'contour spiral'
              , 'explicit', 'unidirectional' ]) OR ((
              verify_optional_action_property(SELF, 'overlap ratio') AND 
              verify_ratio_measure_action_property(SELF, 'overlap ratio')) 
              AND verify_optional_action_property(SELF, 'multiple passes'))
               AND verify_enumeration_action_property(SELF, 
              'multiple passes', [ 'multiple passes allowed', 
              'multiple passes not allowed' ]);
    WR2: NOT (SELF.description = 'bidirectional') OR ((((
              verify_optional_action_property(SELF, 'feed direction') AND 
              verify_rep_item_for_action_property(SELF, 'feed direction', [
               'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ])) 
              AND verify_optional_action_property(SELF, 
              'stepover direction')) AND verify_enumeration_action_property
              (SELF, 'stepover direction', [ 'left', 'right' ])) AND 
              verify_optional_action_property(SELF, 'connection strategy'))
               AND verify_enumeration_action_property(SELF, 
              'connection strategy', [ 'straight line', 'lift shift plunge'
              , 'degouge', 'loop back' ]);
    WR3: NOT (SELF.description IN [ 'bidirectional contour', 
              'contour bidirectional' ]) OR ((((((
              verify_optional_action_property(SELF, 'feed direction') AND 
              verify_rep_item_for_action_property(SELF, 'feed direction', [
               'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ])) 
              AND verify_optional_action_property(SELF, 
              'stepover direction')) AND verify_enumeration_action_property
              (SELF, 'stepover direction', [ 'left', 'right' ])) AND 
              verify_optional_action_property(SELF, 'rotation direction')) 
              AND verify_enumeration_action_property(SELF, 
              'rotation direction', [ 'clockwise', 'counterclockwise' ])) 
              AND verify_optional_action_property(SELF, 'spiral cutmode')) 
              AND verify_enumeration_action_property(SELF, 'spiral cutmode'
              , [ 'climb', 'conventional' ]);
    WR4: NOT (SELF.description IN [ 'contour parallel', 'contour spiral' ])
               OR ((verify_optional_action_property(SELF, 
              'rotation direction') AND verify_enumeration_action_property(
              SELF, 'rotation direction', [ 'clockwise', 'counterclockwise'
               ])) AND verify_optional_action_property(SELF, 'cutmode')) 
              AND verify_enumeration_action_property(SELF, 'cutmode', [ 
              'climb', 'conventional' ]);
    WR5: NOT (SELF.description = 'unidirectional') OR ((
              verify_optional_action_property(SELF, 'feed direction') AND 
              verify_rep_item_for_action_property(SELF, 'feed direction', [
               'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ])) 
              AND verify_optional_action_property(SELF, 'cutmode')) AND 
              verify_enumeration_action_property(SELF, 'cutmode', [ 'climb'
              , 'conventional' ]);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY minimum_function
  SUBTYPE OF (multiple_arity_function_call);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY minus_expression
  SUBTYPE OF (binary_numeric_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY minus_function
  SUBTYPE OF (unary_function_call);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY mod_expression
  SUBTYPE OF (binary_numeric_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY model_geometric_view
  SUBTYPE OF (characterized_item_within_representation);
    SELF\characterized_item_within_representation.rep : draughting_model;
    SELF\characterized_item_within_representation.item : camera_model;
END_ENTITY; -- 10303-1315: mechanical_design_presentation_representation_with_draughting_mim

ENTITY modified_geometric_tolerance
  SUBTYPE OF (geometric_tolerance);
    modifier : limit_condition;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY modified_pattern
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPLICATE_FEATURE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.INSTANCED_FEATURE'
               ] * TYPEOF(fcr.related_shape_aspect.of_shape.definition)) >=
               1) AND (fcr.description = 'base shape'))) = 1;
    WR2: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_PATTERN'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_PATTERN'
               ] * TYPEOF(fcr.related_shape_aspect.of_shape.definition)) = 
              1) AND (fcr.description = 'base pattern'))) = 1;
    WR3: SIZEOF(QUERY (sar <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (SIZEOF(QUERY (msar <* USEDIN(sar.related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| ((SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PATTERN_OFFSET_MEMBERSHIP'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PATTERN_OMIT_MEMBERSHIP'
               ] * TYPEOF(sar)) = 1) AND (sar.description = 
              'modified pattern')) AND (sar :<>: msar))) >= 1))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY mult_expression
  SUBTYPE OF (multiple_arity_numeric_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY multi_language_attribute_assignment
  SUBTYPE OF (attribute_value_assignment);
    items : SET [1:?] OF multi_language_attribute_item;
  DERIVE
    translation_language : language := language_indication[1]\
                              attribute_classification_assignment.
                              assigned_class;
  INVERSE
    language_indication : SET [1:1] OF attribute_language_assignment FOR 
                             items;
  WHERE
    WR1: SELF\attribute_value_assignment.role.name = 'alternate language';
    WR2: SIZEOF(QUERY (ala <* language_indication| (ala\
              attribute_classification_assignment.attribute_name = 
              'attribute_value') AND (ala\
              attribute_classification_assignment.role.name = 'translated')
              )) = 1;
    WR3: SELF\attribute_value_assignment.attribute_name <> '';
    WR4: SIZEOF(QUERY (ci <* items| (SIZEOF(QUERY (ata <* USEDIN(ci, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.ITEMS'
              )| (ata\attribute_value_assignment.attribute_name = SELF\
              attribute_value_assignment.attribute_name) AND (ata.
              translation_language :=: translation_language))) > 1))) = 0;
    WR5: SIZEOF(QUERY (ci <* items| (SIZEOF(QUERY (ata <* USEDIN(ci, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ATTRIBUTE_LANGUAGE_ASSIGNMENT.ITEMS'
              )| ((ata\attribute_classification_assignment.role.name = 
              'primary') AND (ata\attribute_classification_assignment.
              attribute_name = SELF\attribute_value_assignment.
              attribute_name)) AND (ata\attribute_classification_assignment
              .assigned_class :=: translation_language))) > 0))) = 0;
END_ENTITY; -- 10303-1105: multi_linguism_mim

ENTITY multi_level_reference_designator
  SUBTYPE OF (assembly_component_usage);
    location : LIST [1:?] OF UNIQUE next_assembly_usage_occurrence;
  DERIVE
    SELF\product_definition_relationship.relating_product_definition : 
                                     product_definition := location[1]\
                                     product_definition_relationship.
                                     relating_product_definition;
    root                        : product_definition := 
                                     relating_product_definition;
    SELF\product_definition_relationship.related_product_definition : 
                                     product_definition_or_reference := 
                                     location[HIINDEX(location)]\
                                     product_definition_relationship.
                                     related_product_definition;
    leaf                        : product_definition_or_reference := 
                                     related_product_definition;
  UNIQUE
    UR1: location;
  WHERE
    WR1: unambiguously_specified_multi_level_reference_designator(location)
              ;
    WR2: SIZEOF(QUERY (cp <* location| NOT EXISTS(cp\
              assembly_component_usage.reference_designator))) = 0;
END_ENTITY; -- 10303-44: product_structure_schema

ENTITY multiple_arity_boolean_expression
  ABSTRACT SUPERTYPE OF (ONEOF(and_expression, or_expression))
  SUBTYPE OF (boolean_expression, multiple_arity_generic_expression);
    SELF\multiple_arity_generic_expression.operands : LIST [2:?] OF 
                  boolean_expression;
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY multiple_arity_function_call
  ABSTRACT SUPERTYPE OF (ONEOF(maximum_function, minimum_function))
  SUBTYPE OF (multiple_arity_numeric_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY multiple_arity_generic_expression
  ABSTRACT SUPERTYPE
  SUBTYPE OF (generic_expression);
    operands : LIST [2:?] OF generic_expression;
END_ENTITY; -- 13584-20: iso13584_generic_expressions_schema

ENTITY multiple_arity_numeric_expression
  ABSTRACT SUPERTYPE OF (ONEOF(plus_expression, mult_expression, 
      multiple_arity_function_call))
  SUBTYPE OF (numeric_expression, multiple_arity_generic_expression);
    SELF\multiple_arity_generic_expression.operands : LIST [2:?] OF 
                  numeric_expression;
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY name_assignment
  ABSTRACT SUPERTYPE;
    assigned_name : label;
  DERIVE
    role : object_role := get_role(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROLE_ASSOCIATION.ITEM_WITH_ROLE'
              )) <= 1;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY name_attribute;
    attribute_value : label;
    named_item      : name_attribute_select;
END_ENTITY; -- 10303-41: basic_attribute_schema

ENTITY named_unit
  SUPERTYPE OF (ONEOF(si_unit, conversion_based_unit, 
      context_dependent_unit) ANDOR ONEOF(length_unit, mass_unit, time_unit
      , electric_current_unit, thermodynamic_temperature_unit, 
      amount_of_substance_unit, luminous_flux_unit, luminous_intensity_unit
      , plane_angle_unit, solid_angle_unit, ratio_unit));
    dimensions : dimensional_exponents;
END_ENTITY; -- 10303-41: measure_schema

ENTITY next_assembly_usage_occurrence
  SUBTYPE OF (assembly_component_usage);
  DERIVE
    product_definition_occurrence_id : identifier := SELF\
                                          product_definition_relationship.
                                          related_product_definition\
                                          product_definition_occurrence.id;
  UNIQUE
    UR1: SELF\assembly_component_usage.reference_designator,
         SELF\product_definition_relationship.relating_product_definition;
    UR2: product_definition_occurrence_id,
         SELF\product_definition_relationship.relating_product_definition;
END_ENTITY; -- 10303-44: product_structure_schema

ENTITY ngon_closed_profile
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_DEFINITION'
               IN TYPEOF(SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT ((SIZEOF(impl_rep.
              used_representation.items) >= 3) AND (SIZEOF(impl_rep.
              used_representation.items) <= 4)))) = 0))) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND (SIZEOF(QUERY (
              srwp_i <* pdr.used_representation.items| ((((srwp_i.name = 
              'orientation') OR (srwp_i.name = 'number of sides')) OR (
              srwp_i.name = 'circumscribed diameter')) OR (srwp_i.name = 
              'corner radius')) OR (srwp_i.name = 'diameter across flats'))
              ) = SIZEOF(pdr.used_representation.items)))) = 1))) = 1;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN 
              TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0))) = 0
              ;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COUNT_MEASURE' 
              IN TYPEOF(it\measure_with_unit.value_component))) AND (it.
              name = 'number of sides'))) = 1))) = 0))) = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name IN [ 
              'circumscribed diameter', 'diameter across flats' ]))) = 1)))
               = 0))) = 0;
    WR8: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'corner radius'))) <= 1)
              )) = 0))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY ngon_shape_representation
  SUBTYPE OF (shape_representation_with_parameters);
  WHERE
    WR1: SIZEOF(SELF.items) = 5;
    WR2: SIZEOF(QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN 
              TYPEOF(it)) AND (it.name = 'orientation'))) = 1;
    WR3: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'length'))) = 1;
    WR4: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'corner radius'))) = 1;
    WR5: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name IN [ 
              'circumscribed diameter', 'diameter across flats' ]))) = 1;
    WR6: SIZEOF(QUERY (it <* SELF.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COUNT_MEASURE' 
              IN TYPEOF(it\measure_with_unit.value_component))) AND (it.
              name = 'number of sides'))) = 1;
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY non_manifold_surface_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(QUERY (it <* SELF.items| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_BASED_SURFACE_MODEL'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               ] * TYPEOF(it)) = 1))) = 0;
    WR2: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_BASED_SURFACE_MODEL'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' ]
               * TYPEOF(it)) = 1))) > 0;
    WR3: SIZEOF(QUERY (mi <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(it)))| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NON_MANIFOLD_SURFACE_SHAPE_REPRESENTATION'
               IN TYPEOF(mi\mapped_item.mapping_source.
              mapped_representation)) AND (SIZEOF(QUERY (mr_it <* mi\
              mapped_item.mapping_source.mapped_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_BASED_SURFACE_MODEL'
               IN TYPEOF(mr_it)))) > 0)))) = 0;
    WR4: SIZEOF(QUERY (fbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cfs <* fbsm\
              face_based_surface_model.fbsm_faces| NOT (SIZEOF(QUERY (fa <*
               cfs.cfs_faces| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SURFACE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORIENTED_FACE' ]
               * TYPEOF(fa)) = 1))) = 0))) = 0))) = 0;
    WR5: SIZEOF(QUERY (fbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cfs <* fbsm\
              face_based_surface_model.fbsm_faces| NOT (SIZEOF(QUERY (f_sf 
              <* QUERY (fa <* cfs.cfs_faces| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SURFACE' IN
               TYPEOF(fa)))| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' 
              IN TYPEOF(f_sf)) OR nmsf_surface_check(f_sf\face_surface.
              face_geometry)))) = 0))) = 0))) = 0;
    WR6: SIZEOF(QUERY (fbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cfs <* fbsm\
              face_based_surface_model.fbsm_faces| NOT (SIZEOF(QUERY (o_fa 
              <* QUERY (fa <* cfs.cfs_faces| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORIENTED_FACE' 
              IN TYPEOF(fa)))| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' 
              IN TYPEOF(o_fa\oriented_face.face_element)) OR 
              nmsf_surface_check(o_fa\oriented_face.face_element\
              face_surface.face_geometry)))) = 0))) = 0))) = 0;
    WR7: SIZEOF(QUERY (fbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cfs <* fbsm\
              face_based_surface_model.fbsm_faces| NOT (SIZEOF(QUERY (fa <*
               cfs.cfs_faces| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' 
              IN TYPEOF(fa)) OR (SIZEOF(QUERY (bnds <* fa.bounds| NOT (
              SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_LOOP' ] *
               TYPEOF(bnds.bound)) = 1))) = 0)))) = 0))) = 0))) = 0;
    WR8: SIZEOF(QUERY (fbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cfs <* fbsm\
              face_based_surface_model.fbsm_faces| NOT (SIZEOF(QUERY (fa <*
               cfs.cfs_faces| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' 
              IN TYPEOF(fa)) OR (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* 
              fa.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds\path
              .edge_list| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_CURVE' IN 
              TYPEOF(oe.edge_element)))) = 0))) = 0)))) = 0))) = 0))) = 0;
    WR9: SIZEOF(QUERY (fbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cfs <* fbsm\
              face_based_surface_model.fbsm_faces| NOT (SIZEOF(QUERY (fa <*
               cfs.cfs_faces| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' 
              IN TYPEOF(fa)) OR (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* 
              fa.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe_cv <* QUERY (oe 
              <* elp_fbnds\path.edge_list| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_CURVE' IN 
              TYPEOF(oe.edge_element)))| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_CURVE',
               'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONIC', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_REPLICA', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OFFSET_CURVE_3D'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PCURVE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_CURVE' ]
               * TYPEOF(oe_cv.edge_element\edge_curve.edge_geometry)) = 1))
              ) = 0))) = 0)))) = 0))) = 0))) = 0;
    WR10: SIZEOF(QUERY (fbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cfs <* fbsm\
              face_based_surface_model.fbsm_faces| NOT (SIZEOF(QUERY (fa <*
               cfs.cfs_faces| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' 
              IN TYPEOF(fa)) OR (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* 
              fa.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds\path
              .edge_list| NOT nmsf_curve_check(oe.edge_element\edge_curve.
              edge_geometry))) = 0))) = 0)))) = 0))) = 0))) = 0;
    WR11: SIZEOF(QUERY (fbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cfs <* fbsm\
              face_based_surface_model.fbsm_faces| NOT (SIZEOF(QUERY (fa <*
               cfs.cfs_faces| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' 
              IN TYPEOF(fa)) OR (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* 
              fa.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds\path
              .edge_list| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_POINT' IN
               TYPEOF(oe.edge_element.edge_start)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_POINT' IN
               TYPEOF(oe.edge_element.edge_end))))) = 0))) = 0)))) = 0))) =
               0))) = 0;
    WR12: SIZEOF(QUERY (fbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cfs <* fbsm\
              face_based_surface_model.fbsm_faces| NOT (SIZEOF(QUERY (fa <*
               cfs.cfs_faces| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' 
              IN TYPEOF(fa)) OR (SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* 
              fa.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF(QUERY (oe <* elp_fbnds\path
              .edge_list| NOT ((SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CARTESIAN_POINT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DEGENERATE_PCURVE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_ON_CURVE',
               
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_ON_SURFACE'
               ] * TYPEOF(oe.edge_element.edge_start\vertex_point.
              vertex_geometry)) = 1) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CARTESIAN_POINT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DEGENERATE_PCURVE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_ON_CURVE',
               
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_ON_SURFACE'
               ] * TYPEOF(oe.edge_element.edge_end\vertex_point.
              vertex_geometry)) = 1)))) = 0))) = 0)))) = 0))) = 0))) = 0;
    WR13: SIZEOF(QUERY (fbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cfs <* fbsm\
              face_based_surface_model.fbsm_faces| NOT (SIZEOF(QUERY (fa <*
               cfs.cfs_faces| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' 
              IN TYPEOF(fa)) OR (SIZEOF(QUERY (vlp_fbnds <* QUERY (bnds <* 
              fa.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_POINT' IN
               TYPEOF(vlp_fbnds\vertex_loop.loop_vertex)))) = 0)))) = 0))) 
              = 0))) = 0;
    WR14: SIZEOF(QUERY (fbsm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_BASED_SURFACE_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (cfs <* fbsm\
              face_based_surface_model.fbsm_faces| NOT (SIZEOF(QUERY (fa <*
               cfs.cfs_faces| NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' 
              IN TYPEOF(fa)) OR (SIZEOF(QUERY (vlp_fbnds <* QUERY (bnds <* 
              fa.bounds| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_LOOP' IN 
              TYPEOF(bnds.bound)))| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CARTESIAN_POINT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DEGENERATE_PCURVE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_ON_CURVE',
               
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_ON_SURFACE'
               ] * TYPEOF(vlp_fbnds\vertex_loop.loop_vertex\vertex_point.
              vertex_geometry)) = 1))) = 0)))) = 0))) = 0))) = 0;
END_ENTITY; -- 10303-508: aic_non_manifold_surface

ENTITY non_uniform_zone_definition
  SUBTYPE OF (tolerance_zone_definition);
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY not_expression
  SUBTYPE OF (unary_boolean_expression);
    SELF\unary_generic_expression.operand : boolean_expression;
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY null_representation_item
  SUBTYPE OF (representation_item);
END_ENTITY; -- 10303-1654: characteristic_mim

ENTITY numeric_defined_function
  ABSTRACT SUPERTYPE OF (ONEOF(integer_defined_function, 
      real_defined_function))
  SUBTYPE OF (numeric_expression, defined_function);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY numeric_expression
  ABSTRACT SUPERTYPE OF (ONEOF(simple_numeric_expression, 
      unary_numeric_expression, binary_numeric_expression, 
      multiple_arity_numeric_expression, length_function, value_function, 
      numeric_defined_function))
  SUBTYPE OF (expression);
  DERIVE
    is_int       : BOOLEAN := is_int_expr(SELF);
    sql_mappable : BOOLEAN := is_sql_mappable(SELF);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY numeric_variable
  SUPERTYPE OF (ONEOF(int_numeric_variable, real_numeric_variable))
  SUBTYPE OF (simple_numeric_expression, variable);
  WHERE
    WR1: (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.INT_NUMERIC_VARIABLE'
               IN TYPEOF(SELF)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REAL_NUMERIC_VARIABLE'
               IN TYPEOF(SELF));
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY object_role;
    name        : label;
    description : OPTIONAL text;
END_ENTITY; -- 10303-41: basic_attribute_schema

ENTITY odd_function
  SUBTYPE OF (unary_boolean_expression);
    SELF\unary_generic_expression.operand : numeric_expression;
  WHERE
    WR1: is_int_expr(operand);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY offset_curve_2d
  SUBTYPE OF (curve);
    basis_curve    : curve;
    distance       : length_measure;
    self_intersect : LOGICAL;
  WHERE
    WR1: basis_curve.dim = 2;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY offset_curve_3d
  SUBTYPE OF (curve);
    basis_curve    : curve;
    distance       : length_measure;
    self_intersect : LOGICAL;
    ref_direction  : direction;
  WHERE
    WR1: (basis_curve.dim = 3) AND (ref_direction.dim = 3);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY offset_surface
  SUBTYPE OF (surface);
    basis_surface  : surface;
    distance       : length_measure;
    self_intersect : LOGICAL;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY one_direction_repeat_factor
  SUBTYPE OF (geometric_representation_item);
    repeat_factor : vector;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY open_path
  SUBTYPE OF (path);
  DERIVE
    ne : INTEGER := SIZEOF(SELF\path.edge_list);
  WHERE
    WR1: SELF\path.edge_list[1].edge_element.edge_start :<>: SELF\path.
              edge_list[ne].edge_element.edge_end;
END_ENTITY; -- 10303-42: topology_schema

ENTITY open_path_profile
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_DEFINITION'
               IN TYPEOF(SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 1))) = 0))) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN 
              TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0))) = 0
              ;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PATH_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'profile limit'))) <= 1))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY open_shell
  SUBTYPE OF (connected_face_set);
END_ENTITY; -- 10303-42: topology_schema

ENTITY or_expression
  SUBTYPE OF (multiple_arity_boolean_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY ordinal_date
  SUBTYPE OF (date);
    day_component : day_in_year_number;
  WHERE
    WR1: NOT leap_year(SELF.year_component) AND ((1 <= day_component) AND (
              day_component <= 365)) OR leap_year(SELF.year_component) AND 
              ((1 <= day_component) AND (day_component <= 366));
END_ENTITY; -- 10303-41: date_time_schema

ENTITY ordinate_dimension
  SUBTYPE OF (projection_directed_callout);
END_ENTITY; -- 10303-506: aic_draughting_elements

ENTITY organization;
    id          : OPTIONAL identifier;
    name        : label;
    description : OPTIONAL text;
END_ENTITY; -- 10303-41: person_organization_schema

ENTITY organization_assignment
  ABSTRACT SUPERTYPE;
    assigned_organization : organization;
    role                  : organization_role;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY organization_relationship;
    name                  : label;
    description           : OPTIONAL text;
    relating_organization : organization;
    related_organization  : organization;
END_ENTITY; -- 10303-41: person_organization_schema

ENTITY organization_role;
    name : label;
  DERIVE
    description : text := get_description_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: person_organization_schema

ENTITY organizational_address
  SUBTYPE OF (address);
    organizations : SET [1:?] OF organization;
    description   : OPTIONAL text;
END_ENTITY; -- 10303-41: person_organization_schema

ENTITY organizational_project;
    name                      : label;
    description               : OPTIONAL text;
    responsible_organizations : SET [1:?] OF organization;
  DERIVE
    id : identifier := get_id_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ID_ATTRIBUTE.IDENTIFIED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: person_organization_schema

ENTITY organizational_project_assignment
  ABSTRACT SUPERTYPE;
    assigned_organizational_project : organizational_project;
    role                            : organizational_project_role;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY organizational_project_relationship;
    name                            : label;
    description                     : OPTIONAL text;
    relating_organizational_project : organizational_project;
    related_organizational_project  : organizational_project;
END_ENTITY; -- 10303-41: person_organization_schema

ENTITY organizational_project_role;
    name        : label;
    description : OPTIONAL text;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY oriented_closed_shell
  SUBTYPE OF (closed_shell);
    closed_shell_element : closed_shell;
    orientation          : BOOLEAN;
  DERIVE
    SELF\connected_face_set.cfs_faces : SET [1:?] OF face := 
                   conditional_reverse(SELF.orientation, SELF.
                   closed_shell_element.cfs_faces);
  WHERE
    WR1: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORIENTED_CLOSED_SHELL'
               IN TYPEOF(SELF.closed_shell_element));
END_ENTITY; -- 10303-42: topology_schema

ENTITY oriented_edge
  SUBTYPE OF (edge);
    edge_element : edge;
    orientation  : BOOLEAN;
  DERIVE
    SELF\edge.edge_start : vertex := boolean_choose(SELF.orientation, SELF.
                    edge_element.edge_start, SELF.edge_element.edge_end);
    SELF\edge.edge_end : vertex := boolean_choose(SELF.orientation, SELF.
                    edge_element.edge_end, SELF.edge_element.edge_start);
  WHERE
    WR1: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORIENTED_EDGE' 
              IN TYPEOF(SELF.edge_element));
END_ENTITY; -- 10303-42: topology_schema

ENTITY oriented_face
  SUBTYPE OF (face);
    face_element : face;
    orientation  : BOOLEAN;
  DERIVE
    SELF\face.bounds : SET [1:?] OF face_bound := conditional_reverse(SELF.
                orientation, SELF.face_element.bounds);
  WHERE
    WR1: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORIENTED_FACE' 
              IN TYPEOF(SELF.face_element));
END_ENTITY; -- 10303-42: topology_schema

ENTITY oriented_joint
  SUBTYPE OF (oriented_edge);
    SELF\oriented_edge.edge_element : kinematic_joint;
END_ENTITY; -- 10303-105: kinematic_topology_schema

ENTITY oriented_open_shell
  SUBTYPE OF (open_shell);
    open_shell_element : open_shell;
    orientation        : BOOLEAN;
  DERIVE
    SELF\connected_face_set.cfs_faces : SET [1:?] OF face := 
                   conditional_reverse(SELF.orientation, SELF.
                   open_shell_element.cfs_faces);
  WHERE
    WR1: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORIENTED_OPEN_SHELL'
               IN TYPEOF(SELF.open_shell_element));
END_ENTITY; -- 10303-42: topology_schema

ENTITY oriented_path
  SUBTYPE OF (path);
    path_element : path;
    orientation  : BOOLEAN;
  DERIVE
    SELF\path.edge_list : LIST [1:?] OF UNIQUE oriented_edge := 
                   conditional_reverse(SELF.orientation, SELF.path_element.
                   edge_list);
  WHERE
    WR1: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORIENTED_PATH' 
              IN TYPEOF(SELF.path_element));
END_ENTITY; -- 10303-42: topology_schema

ENTITY oriented_surface
  SUBTYPE OF (surface);
    orientation : BOOLEAN;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY oriented_tolerance_zone
  SUBTYPE OF (tolerance_zone_with_datum);
    orientation : oriented_tolerance_zone_type;
    angle       : OPTIONAL plane_angle_measure_with_unit;
  WHERE
    WR1: (orientation <> oriented_tolerance_zone_type.angular) XOR EXISTS(
              angle);
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY outer_boundary_curve
  SUBTYPE OF (boundary_curve);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY outer_round
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: NOT (SELF\characterized_object.description = 'outer diameter') OR 
              (SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND (SIZEOF(pdr.
              used_representation.items) = 3))) = 1))) = 1);
    WR2: NOT (SELF\characterized_object.description = 
              'outer diameter to shoulder') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND ((2 <= SIZEOF(pdr.
              used_representation.items)) AND (SIZEOF(pdr.
              used_representation.items) <= 3)))) = 1))) = 1);
    WR3: SELF\characterized_object.description IN [ 'outer diameter', 
              'outer diameter to shoulder' ];
    WR4: NOT (SELF\characterized_object.description = 'outer diameter') OR 
              (SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'length'))) = 1))) = 0))
              ) = 0);
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'diameter'))) = 1))) = 0
              ))) = 0;
    WR6: NOT (SELF\characterized_object.description = 
              'outer diameter to shoulder') OR (SIZEOF(QUERY (pds <* QUERY 
              (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'v-shape boundary occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VEE_PROFILE' IN 
              TYPEOF(sdr.relating_shape_aspect)) AND (sdr.
              relating_shape_aspect.description = 'v-shape'))) = 1))) = 1))
              ) = 0);
    WR7: NOT (SELF\characterized_object.description = 'outer diameter') OR 
              (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'reduced size occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'taper usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TAPER' IN TYPEOF
              (sdr.relating_shape_aspect)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OUTER_ROUND' IN 
              TYPEOF(sdr.related_shape_aspect.of_shape.definition))) AND (
              sdr.name = 'reduced size'))) = 1))) <= 1))) = 0);
    WR8: NOT (SELF\characterized_object.description = 
              'outer diameter to shoulder') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'length'))) <= 1))) = 0)
              )) = 0);
    WR9: NOT (SELF\characterized_object.description = 
              'outer diameter to shoulder') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'feature length'))) <= 1
              ))) = 0))) = 0);
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY outside_profile
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND (SIZEOF(pdr.
              used_representation.items) = 1))) = 1))) = 1;
    WR2: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description IN [ 'boundary occurrence', 
              'non-planar boundary occurrence', 
              'partial circular boundary occurrence', 
              'closed circular boundary occurrence', 
              'open rectangular boundary occurrence', 
              'closed rectangular boundary occurrence' ]))) = 1))) = 0;
    WR3: NOT (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'boundary occurrence'))) = 1))) = 0)
               OR (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_CLOSED_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NGON_CLOSED_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_CLOSED_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CLOSED_PATH_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SQUARE_U_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PARTIAL_CIRCULAR_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROUNDED_U_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINEAR_PROFILE',
               'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VEE_PROFILE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEE_PROFILE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OPEN_PATH_PROFILE'
               ] * TYPEOF(sdr.relating_shape_aspect)) = 1) AND (sdr.
              relating_shape_aspect.description = 'outside boundary'))) = 1
              ))) = 1))) = 0);
    WR4: NOT (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description IN [ 'complex boundary occurrence', 
              'partial circular boundary occurrence', 
              'closed circular boundary occurrence', 
              'open rectangular boundary occurrence', 
              'closed rectangular boundary occurrence' ]))) = 1))) = 0) OR 
              (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| NOT (SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile floor usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROFILE_FLOOR' 
              IN TYPEOF(sdr.relating_shape_aspect)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OUTSIDE_PROFILE'
               IN TYPEOF(sdr.related_shape_aspect.of_shape.definition)))) =
               1))) = 0))) = 0);
    WR5: NOT (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description IN [ 'outside boundary', 
              'complex boundary occurrence', 
              'partial circular boundary occurrence', 
              'closed circular boundary occurrence', 
              'open rectangular boundary occurrence', 
              'closed rectangular boundary occurrence' ]))) = 1))) = 0) OR 
              (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'path feature component usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| ((SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PATH_FEATURE_COMPONENT'
               ] * TYPEOF(sdr.relating_shape_aspect)) = 1) AND (sdr.name = 
              'profile swept shape')) AND (sdr.relating_shape_aspect.
              description = 'linear'))) = 1))) = 1))) = 0);
    WR6: NOT (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'complex boundary occurrence'))) = 1
              ))) = 0) OR (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_CLOSED_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NGON_CLOSED_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_CLOSED_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CLOSED_PATH_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SQUARE_U_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PARTIAL_CIRCULAR_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROUNDED_U_PROFILE'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VEE_PROFILE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEE_PROFILE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINEAR_PROFILE',
               
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OPEN_PATH_PROFILE'
               ] * TYPEOF(sdr.relating_shape_aspect)) = 1))) = 1))) = 1))) 
              = 0);
    WR7: NOT (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 
              'partial circular boundary occurrence'))) = 1))) = 0) OR (
              SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PARTIAL_CIRCULAR_PROFILE'
               IN TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0);
    WR8: NOT (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 
              'closed circular boundary occurrence'))) = 1))) = 0) OR (
              SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_CLOSED_PROFILE'
               IN TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0);
    WR9: NOT (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 
              'open rectangular boundary occurrence'))) = 1))) = 0) OR (
              SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SQUARE_U_PROFILE'
               IN TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0);
    WR10: NOT (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 
              'closed rectangular boundary occurrence'))) = 1))) = 0) OR (
              SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_CLOSED_PROFILE'
               IN TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0);
    WR11: (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description IN [ 'boundary occurrence', 
              'complex boundary occurrence', 
              'partial circular boundary occurrence', 
              'closed circular boundary occurrence', 
              'open rectangular boundary occurrence', 
              'closed rectangular boundary occurrence' ]))) = 1))) = 0) OR 
              (SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'removal direction'))) = 1))) = 0)
              ;
    WR12: SIZEOF(QUERY (pdr <* get_property_definition_representations(SELF
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'maximum feature limit'))) >= 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY over_riding_styled_item
  SUBTYPE OF (styled_item);
    over_ridden_style : styled_item;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY package_product_concept_feature
  SUBTYPE OF (product_concept_feature);
  WHERE
    WR1: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONDITIONAL_CONCEPT_FEATURE'
               IN TYPEOF(SELF));
    WR2: SIZEOF(QUERY (cfr <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONCEPT_FEATURE_RELATIONSHIP.RELATING_PRODUCT_CONCEPT_FEATURE'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONCEPT_FEATURE_RELATIONSHIP_WITH_CONDITION'
               IN TYPEOF(cfr)) AND (SIZEOF(QUERY (ipcf <* USEDIN(cfr, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONDITIONAL_CONCEPT_FEATURE.CONDITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.INCLUSION_PRODUCT_CONCEPT_FEATURE'
               IN TYPEOF(ipcf)))) = 1))) > 0;
END_ENTITY; -- 10303-1103: product_class_mim

ENTITY pair_representation_relationship
  SUBTYPE OF (geometric_representation_item, 
      representation_relationship_with_transformation);
    SELF\representation_relationship.rep_1 : kinematic_link_representation;
    SELF\representation_relationship.rep_2 : kinematic_link_representation;
    SELF\representation_relationship_with_transformation.
                                 transformation_operator : kinematic_pair;
  WHERE
    WR1: transformation_operator\item_defined_transformation.
              transform_item_1 IN rep_1.items;
    WR2: transformation_operator\item_defined_transformation.
              transform_item_2 IN rep_2.items;
    WR3: rep_1\kinematic_link_representation.represented_link = 
              transformation_operator\kinematic_pair.joint.edge_start;
    WR4: rep_2\kinematic_link_representation.represented_link = 
              transformation_operator\kinematic_pair.joint.edge_end;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY pair_value
  ABSTRACT SUPERTYPE OF (ONEOF(sliding_surface_pair_value, 
      rolling_surface_pair_value, revolute_pair_value, prismatic_pair_value
      , screw_pair_value, cylindrical_pair_value, spherical_pair_value, 
      sliding_curve_pair_value, rolling_curve_pair_value, gear_pair_value, 
      rack_and_pinion_pair_value, universal_pair_value, planar_pair_value, 
      unconstrained_pair_value, point_on_surface_pair_value, 
      point_on_planar_curve_pair_value, low_order_kinematic_pair_value))
  SUBTYPE OF (geometric_representation_item);
    applies_to_pair : kinematic_pair;
END_ENTITY; -- 10303-105: kinematic_state_schema

ENTITY parabola
  SUBTYPE OF (conic);
    focal_dist : length_measure;
  WHERE
    WR1: focal_dist <> 0.0;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY parallel_composed_function
  SUBTYPE OF (maths_function, multiple_arity_generic_expression);
    source_of_domain : maths_space_or_function;
    prep_functions   : LIST [1:?] OF maths_function;
    final_function   : maths_function_select;
  DERIVE
    SELF\multiple_arity_generic_expression.operands : LIST [2:?] OF 
                  generic_expression := convert_to_operands_prcmfn(
                  source_of_domain, prep_functions, final_function);
  WHERE
    WR1: no_cyclic_domain_reference(source_of_domain, [ SELF ]);
    WR2: expression_is_constant(domain_from(source_of_domain));
    WR3: parallel_composed_function_domain_check(domain_from(
              source_of_domain), prep_functions);
    WR4: parallel_composed_function_composability_check(prep_functions, 
              final_function);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY parallel_offset
  SUBTYPE OF (derived_shape_aspect);
    offset : measure_with_unit;
  WHERE
    WR1: SIZEOF(SELF\derived_shape_aspect.deriving_relationships) = 1;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY parallelism_tolerance
  SUBTYPE OF (geometric_tolerance_with_datum_reference);
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY parametric_representation_context
  SUBTYPE OF (representation_context);
END_ENTITY; -- 10303-43: representation_schema

ENTITY partial_circular_profile
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_DEFINITION'
               IN TYPEOF(SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) >= 3))) = 0))) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN 
              TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0))) = 0
              ;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'radius'))) = 1))) = 0))
              ) = 0;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'sweep angle'))) = 1))) 
              = 0))) = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'profile limit'))) <= 1))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY partial_derivative_expression
  SUBTYPE OF (unary_generic_expression);
    d_variables : LIST [1:?] OF maths_variable;
    extension   : extension_options;
  DERIVE
    derivand : generic_expression := SELF\unary_generic_expression.operand;
  WHERE
    WR1: has_values_space(derivand);
    WR2: space_is_continuum(values_space_of(derivand));
    WR3: SIZEOF(QUERY (vbl <* d_variables| NOT subspace_of(values_space_of(
              vbl), the_reals) AND NOT subspace_of(values_space_of(vbl), 
              the_complex_numbers))) = 0;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY partial_derivative_function
  SUBTYPE OF (maths_function, unary_generic_expression);
    SELF\unary_generic_expression.operand : maths_function;
    d_variables : LIST [1:?] OF input_selector;
    extension   : extension_options;
  DERIVE
    derivand : maths_function := SELF\unary_generic_expression.operand;
  WHERE
    WR1: space_is_continuum(derivand.range);
    WR2: partial_derivative_check(derivand.domain, d_variables);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY partial_document_with_structured_text_representation_assignment
  SUBTYPE OF (applied_document_usage_constraint_assignment, 
      characterized_object);
END_ENTITY; -- 10303-1747: specification_document_mim

ENTITY path
  SUPERTYPE OF (ONEOF(open_path, edge_loop, oriented_path))
  SUBTYPE OF (topological_representation_item);
    edge_list : LIST [1:?] OF UNIQUE oriented_edge;
  WHERE
    WR1: path_head_to_tail(SELF);
END_ENTITY; -- 10303-42: topology_schema

ENTITY path_feature_component
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_DEFINITION'
               IN TYPEOF(SELF.of_shape.definition);
    WR2: SELF.description IN [ 'partial circular', 'complete circular', 
              'linear', 'complex' ];
    WR3: NOT (SELF.description = 'complex') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0);
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN 
              TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0))) = 0
              ;
    WR5: NOT (SELF.description = 'partial circular') OR (SIZEOF(QUERY (pd 
              <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 3))) = 0))) = 0);
    WR6: NOT (SELF.description = 'partial circular') OR (SIZEOF(QUERY (pd 
              <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'radius'))) = 1))) = 0))
              ) = 0);
    WR7: NOT (SELF.description = 'partial circular') OR (SIZEOF(QUERY (pd 
              <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'sweep angle'))) = 1))) 
              = 0))) = 0);
    WR8: NOT (SELF.description = 'complete circular') OR (SIZEOF(QUERY (pd 
              <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 2))) = 0))) = 0);
    WR9: NOT (SELF.description = 'complete circular') OR (SIZEOF(QUERY (pd 
              <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'radius'))) = 1))) = 0))
              ) = 0);
    WR10: NOT (SELF.description = 'linear') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 2))) = 0))) = 0);
    WR11: NOT (SELF.description = 'linear') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'distance'))) = 1))) = 0
              ))) = 0);
    WR12: NOT (SELF.description = 'linear') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0);
    WR13: NOT (SELF.description = 'complex') OR (SIZEOF(QUERY (pd <* USEDIN
              (SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PATH_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'sweep path')) AND (SIZEOF(QUERY (
              srwp_i <* pdr.used_representation.items| (srwp_i.name = 
              'profile shape'))) = 1))) = 1))) = 0);
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY path_node
  ABSTRACT SUPERTYPE OF (ONEOF(point_to_point_path, circular_path, 
      linear_path, curve_based_path))
  SUBTYPE OF (kinematic_path_segment);
    placement_end : placement;
END_ENTITY; -- 10303-105: kinematic_motion_representation_schema

ENTITY path_parameter_representation
  SUBTYPE OF (definitional_representation);
    SELF\representation.context_of_items : 
                          path_parameter_representation_context;
    SELF\representation.items : SET [1:?] OF bounded_curve;
  WHERE
    WR1: SELF\representation.context_of_items\
              geometric_representation_context.coordinate_space_dimension =
               2;
END_ENTITY; -- 10303-105: kinematic_motion_representation_schema

ENTITY path_parameter_representation_context
  SUBTYPE OF (geometric_representation_context, 
      parametric_representation_context);
END_ENTITY; -- 10303-105: kinematic_motion_representation_schema

ENTITY path_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(SELF.items) >= 1;
    WR2: SIZEOF(QUERY (i <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOUNDED_CURVE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_CURVE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PATH' ] * TYPEOF
              (i)) = 1))) >= 1;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY pattern_offset_membership
  SUBTYPE OF (feature_component_relationship);
  WHERE
    WR1: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF.
              relating_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)) AND (sar :<>: SELF))| (SIZEOF(QUERY (pdr <* 
              QUERY (pd <* USEDIN(fcr.related_shape_aspect.of_shape, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_PATTERN'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_PATTERN'
               ] * TYPEOF(pdr.definition)) = 1))) = 0))) = 0;
    WR2: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF.
              related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)) AND (sar :<>: SELF))| (fcr.description = 
              'modified pattern') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MODIFIED_PATTERN'
               IN TYPEOF(fcr.relating_shape_aspect)))) >= 1;
    WR3: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF.
              related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)) AND (sar :<>: SELF))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MODIFIED_PATTERN'
               IN TYPEOF(fcr.relating_shape_aspect)) AND NOT (SIZEOF(QUERY 
              (modfcr <* QUERY (modsar <* USEDIN(fcr.relating_shape_aspect,
               
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_PATTERN'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_PATTERN'
               ] * TYPEOF(modsar.related_shape_aspect.of_shape.definition))
               = 1) AND (modsar :<>: fcr))| NOT (modfcr.
              related_shape_aspect.of_shape.definition :=: SELF.
              relating_shape_aspect.of_shape.definition))) = 0))) = 0;
    WR4: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_PATTERN'
               IN TYPEOF(SELF.relating_shape_aspect.of_shape.definition)) 
              OR (SIZEOF(QUERY (pd <* USEDIN(SELF.related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )) = 2))) = 0);
    WR5: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_PATTERN'
               IN TYPEOF(SELF.relating_shape_aspect.of_shape.definition)) 
              OR (SIZEOF(QUERY (pd <* USEDIN(SELF.related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )) = 1))) = 0);
    WR6: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_PATTERN'
               IN TYPEOF(SELF.relating_shape_aspect.of_shape.definition)) 
              OR (SIZEOF(QUERY (pd <* USEDIN(SELF.related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| NOT (SIZEOF(pdr.used_representation.items) = 2))) = 0))) =
               0);
    WR7: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_PATTERN'
               IN TYPEOF(SELF.relating_shape_aspect.of_shape.definition)) 
              OR (SIZEOF(QUERY (pd <* USEDIN(SELF.related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COUNT_MEASURE' 
              IN TYPEOF(it\measure_with_unit.value_component))) AND (it.
              name = 'index number'))) = 1))) = 0))) = 0);
    WR8: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_PATTERN'
               IN TYPEOF(SELF.relating_shape_aspect.of_shape.definition)) 
              OR (SIZEOF(QUERY (pd <* USEDIN(SELF.related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               IN TYPEOF(it)) AND (it.name = 'offset'))) = 1))) = 0))) = 0)
              ;
    WR9: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_PATTERN'
               IN TYPEOF(SELF.relating_shape_aspect.of_shape.definition)) 
              OR (SIZEOF(QUERY (pd <* USEDIN(SELF.related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 3))) = 0))) = 0);
    WR10: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_PATTERN'
               IN TYPEOF(SELF.relating_shape_aspect.of_shape.definition)) 
              OR (SIZEOF(QUERY (pd <* USEDIN(SELF.related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COUNT_MEASURE' 
              IN TYPEOF(it\measure_with_unit.value_component))) AND (it.
              name = 'row index'))) = 1))) = 0))) = 0);
    WR11: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_PATTERN'
               IN TYPEOF(SELF.relating_shape_aspect.of_shape.definition)) 
              OR (SIZEOF(QUERY (pd <* USEDIN(SELF.related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COUNT_MEASURE' 
              IN TYPEOF(it\measure_with_unit.value_component))) AND (it.
              name = 'column index'))) = 1))) = 0))) = 0);
    WR12: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_PATTERN'
               IN TYPEOF(SELF.relating_shape_aspect.of_shape.definition)) 
              OR (SIZEOF(QUERY (pd <* USEDIN(SELF.related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(it)) AND (it.name = 'offset distance'))) = 1))) = 
              0))) = 0);
    WR13: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_PATTERN'
               IN TYPEOF(SELF.relating_shape_aspect.of_shape.definition)) 
              OR (SIZEOF(QUERY (pd <* USEDIN(SELF.related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'offset direction'))) = 1))) = 0);
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY pattern_omit_membership
  SUBTYPE OF (feature_component_relationship);
  WHERE
    WR1: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF.
              relating_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)) AND (sar :<>: SELF))| (SIZEOF(QUERY (pdr <* 
              QUERY (pd <* USEDIN(fcr.related_shape_aspect.of_shape, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_PATTERN'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_PATTERN'
               ] * TYPEOF(pdr.definition)) = 1))) = 0))) = 0;
    WR2: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF.
              related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)) AND (sar :<>: SELF))| (fcr.description = 
              'modified pattern') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MODIFIED_PATTERN'
               IN TYPEOF(fcr.relating_shape_aspect)))) >= 1;
    WR3: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF.
              related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)) AND (sar :<>: SELF))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MODIFIED_PATTERN'
               IN TYPEOF(fcr.relating_shape_aspect)) AND NOT (SIZEOF(QUERY 
              (modfcr <* QUERY (modsar <* USEDIN(fcr.relating_shape_aspect,
               
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_PATTERN'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_PATTERN'
               ] * TYPEOF(modsar.related_shape_aspect.of_shape.definition))
               = 1) AND (modsar :<>: fcr))| NOT (modfcr.
              related_shape_aspect.of_shape.definition :=: SELF.
              relating_shape_aspect.of_shape.definition))) = 0))) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF.related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )) = 1))) = 0;
    WR5: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_PATTERN'
               IN TYPEOF(SELF.relating_shape_aspect.of_shape.definition)) 
              OR (SIZEOF(QUERY (pd <* USEDIN(SELF.related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| NOT (SIZEOF(pdr.used_representation.items) = 1))) = 0))) =
               0);
    WR6: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_PATTERN'
               IN TYPEOF(SELF.relating_shape_aspect.of_shape.definition)) 
              OR (SIZEOF(QUERY (pd <* USEDIN(SELF.related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COUNT_MEASURE' 
              IN TYPEOF(it\measure_with_unit.value_component))) AND (it.
              name = 'index number'))) = 1))) = 0))) = 0);
    WR7: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_PATTERN'
               IN TYPEOF(SELF.relating_shape_aspect.of_shape.definition)) 
              OR (SIZEOF(QUERY (pd <* USEDIN(SELF.related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| NOT (SIZEOF(pdr.used_representation.items) = 2))) = 0))) =
               0);
    WR8: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_PATTERN'
               IN TYPEOF(SELF.relating_shape_aspect.of_shape.definition)) 
              OR (SIZEOF(QUERY (pd <* USEDIN(SELF.related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COUNT_MEASURE' 
              IN TYPEOF(it\measure_with_unit.value_component))) AND (it.
              name = 'row index'))) = 1))) = 0))) = 0);
    WR9: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_PATTERN'
               IN TYPEOF(SELF.relating_shape_aspect.of_shape.definition)) 
              OR (SIZEOF(QUERY (pd <* USEDIN(SELF.related_shape_aspect, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COUNT_MEASURE' 
              IN TYPEOF(it\measure_with_unit.value_component))) AND (it.
              name = 'column index'))) = 1))) = 0))) = 0);
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY pcurve
  SUBTYPE OF (curve);
    basis_surface      : surface;
    reference_to_curve : definitional_representation;
  WHERE
    WR1: SIZEOF(reference_to_curve\representation.items) = 1;
    WR2: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE' IN TYPEOF(
              reference_to_curve\representation.items[1]);
    WR3: reference_to_curve\representation.items[1]\
              geometric_representation_item.dim = 2;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY perpendicular_to
  SUBTYPE OF (derived_shape_aspect);
  WHERE
    WR1: SIZEOF(SELF\derived_shape_aspect.deriving_relationships) = 1;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY perpendicularity_tolerance
  SUBTYPE OF (geometric_tolerance_with_datum_reference);
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY person;
    id            : identifier;
    last_name     : OPTIONAL label;
    first_name    : OPTIONAL label;
    middle_names  : OPTIONAL LIST [1:?] OF label;
    prefix_titles : OPTIONAL LIST [1:?] OF label;
    suffix_titles : OPTIONAL LIST [1:?] OF label;
  WHERE
    WR1: EXISTS(last_name) OR EXISTS(first_name);
END_ENTITY; -- 10303-41: person_organization_schema

ENTITY person_and_organization;
    the_person       : person;
    the_organization : organization;
  DERIVE
    name        : label := get_name_value(SELF);
    description : text := get_description_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NAME_ATTRIBUTE.NAMED_ITEM'
              )) <= 1;
    WR2: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: person_organization_schema

ENTITY person_and_organization_address
  SUBTYPE OF (organizational_address, personal_address);
    SELF\organizational_address.organizations : SET [1:1] OF organization;
    SELF\personal_address.people : SET [1:1] OF person;
  WHERE
    WR1: SIZEOF(QUERY (pao <* USEDIN(SELF\personal_address.people[1], 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PERSON_AND_ORGANIZATION.THE_PERSON'
              )| (pao.the_organization :=: SELF\organizational_address.
              organizations[1]))) = 1;
END_ENTITY; -- 10303-1011: person_organization_mim

ENTITY person_and_organization_assignment
  ABSTRACT SUPERTYPE;
    assigned_person_and_organization : person_and_organization;
    role                             : person_and_organization_role;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY person_and_organization_role;
    name : label;
  DERIVE
    description : text := get_description_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: person_organization_schema

ENTITY personal_address
  SUBTYPE OF (address);
    people      : SET [1:?] OF person;
    description : OPTIONAL text;
END_ENTITY; -- 10303-41: person_organization_schema

ENTITY physical_breakdown_context
  SUBTYPE OF (breakdown_context);
END_ENTITY; -- 10303-1215: physical_breakdown_mim

ENTITY physical_element_usage
  SUBTYPE OF (breakdown_element_usage);
END_ENTITY; -- 10303-1215: physical_breakdown_mim

ENTITY placed_datum_target_feature
  SUBTYPE OF (datum_target);
  DERIVE
    representation_associations : SET [0:?] OF 
                                     property_definition_representation := 
                                     get_shape_aspect_property_definition_representations
                                     (SELF);
  WHERE
    WR1: SELF.description IN [ 'point', 'line', 'rectangle', 'circle', 
              'circular curve' ];
    WR2: SIZEOF(QUERY (pdr <* representation_associations| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1;
    WR3: valid_datum_target_parameters(SELF);
END_ENTITY; -- 10303-1051: geometric_tolerance_mim

ENTITY placed_feature
  SUBTYPE OF (shape_aspect);
END_ENTITY; -- 10303-1764: shape_feature_mim

ENTITY placement
  SUPERTYPE OF (ONEOF(axis1_placement, axis2_placement_2d, 
      axis2_placement_3d))
  SUBTYPE OF (geometric_representation_item);
    location : cartesian_point;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY planar_box
  SUBTYPE OF (planar_extent);
    placement : axis2_placement;
END_ENTITY; -- 10303-46: presentation_resource_schema

ENTITY planar_curve_pair
  SUPERTYPE OF (ONEOF(sliding_curve_pair, rolling_curve_pair) ANDOR 
      planar_curve_pair_range)
  SUBTYPE OF (high_order_kinematic_pair);
    curve_1     : curve;
    curve_2     : curve;
    orientation : BOOLEAN;
  WHERE
    WR1: SIZEOF(QUERY (r <* SELF\kinematic_pair.
              associated_link_representations_1| NOT (curve_1 IN r.items)))
               = 0;
    WR2: SIZEOF(QUERY (r <* SELF\kinematic_pair.
              associated_link_representations_2| NOT (curve_2 IN r.items)))
               = 0;
    WR3: SIZEOF(QUERY (lr <* SELF\kinematic_pair.
              associated_link_representations_1| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RIGID_LINK_REPRESENTATION'
               IN TYPEOF(lr)))) = 0;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY planar_curve_pair_range
  SUBTYPE OF (planar_curve_pair);
    range_on_curve_1 : trimmed_curve;
    range_on_curve_2 : trimmed_curve;
  WHERE
    WR1: SELF\planar_curve_pair.curve_1 :=: range_on_curve_1.basis_curve;
    WR2: SELF\planar_curve_pair.curve_2 :=: range_on_curve_2.basis_curve;
    WR3: SIZEOF(QUERY (r <* SELF\kinematic_pair.
              associated_link_representations_1| NOT (range_on_curve_1 IN r
              .items))) = 0;
    WR4: SIZEOF(QUERY (r <* SELF\kinematic_pair.
              associated_link_representations_2| NOT (range_on_curve_2 IN r
              .items))) = 0;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY planar_extent
  SUBTYPE OF (geometric_representation_item);
    size_in_x : length_measure;
    size_in_y : length_measure;
END_ENTITY; -- 10303-46: presentation_resource_schema

ENTITY planar_pair
  SUBTYPE OF (low_order_kinematic_pair);
  DERIVE
    SELF\low_order_kinematic_pair.t_x : BOOLEAN := TRUE;
    SELF\low_order_kinematic_pair.t_y : BOOLEAN := TRUE;
    SELF\low_order_kinematic_pair.t_z : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.r_x : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.r_y : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.r_z : BOOLEAN := TRUE;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY planar_pair_value
  SUBTYPE OF (pair_value);
    SELF\pair_value.applies_to_pair : planar_pair;
    actual_rotation      : plane_angle_measure;
    actual_translation_x : length_measure;
    actual_translation_y : length_measure;
END_ENTITY; -- 10303-105: kinematic_state_schema

ENTITY planar_pair_with_range
  SUBTYPE OF (planar_pair);
    lower_limit_actual_rotation      : OPTIONAL plane_angle_measure;
    upper_limit_actual_rotation      : OPTIONAL plane_angle_measure;
    lower_limit_actual_translation_x : OPTIONAL length_measure;
    upper_limit_actual_translation_x : OPTIONAL length_measure;
    lower_limit_actual_translation_y : OPTIONAL length_measure;
    upper_limit_actual_translation_y : OPTIONAL length_measure;
  WHERE
    WR1: (NOT EXISTS(lower_limit_actual_rotation) OR NOT EXISTS(
              upper_limit_actual_rotation)) XOR (
              lower_limit_actual_rotation < upper_limit_actual_rotation);
    WR2: (NOT EXISTS(lower_limit_actual_translation_x) OR NOT EXISTS(
              upper_limit_actual_translation_x)) XOR (
              lower_limit_actual_translation_x < 
              upper_limit_actual_translation_x);
    WR3: (NOT EXISTS(lower_limit_actual_translation_y) OR NOT EXISTS(
              upper_limit_actual_translation_y)) XOR (
              lower_limit_actual_translation_y < 
              upper_limit_actual_translation_y);
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY planar_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(SELF.items) = 1;
    WR2: SIZEOF(QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE' IN TYPEOF
              (it)))) = 1;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY plane
  SUBTYPE OF (elementary_surface);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY plane_angle_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_UNIT' IN 
              TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY plane_angle_unit
  SUBTYPE OF (named_unit);
  WHERE
    WR1: ((((((SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\
              named_unit.dimensions.mass_exponent = 0.0)) AND (SELF\
              named_unit.dimensions.time_exponent = 0.0)) AND (SELF\
              named_unit.dimensions.electric_current_exponent = 0.0)) AND (
              SELF\named_unit.dimensions.thermodynamic_temperature_exponent
               = 0.0)) AND (SELF\named_unit.dimensions.
              amount_of_substance_exponent = 0.0)) AND (SELF\named_unit.
              dimensions.luminous_intensity_exponent = 0.0);
END_ENTITY; -- 10303-41: measure_schema

ENTITY plane_milling_operation
  SUBTYPE OF (milling_type_operation);
  WHERE
    WR1: SELF.description IN [ 'roughing', 'finishing' ];
    WR2: verify_optional_action_property(SELF, 'axial cutting depth') AND 
              verify_length_measure_action_property(SELF, 
              'axial cutting depth');
    WR3: verify_optional_action_property(SELF, 'allowance bottom') AND 
              verify_length_measure_action_property(SELF, 
              'allowance bottom');
    WR4: NOT (SELF.description = 'roughing') OR 
              verify_required_action_property(SELF, 'allowance bottom');
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY plus_expression
  SUBTYPE OF (multiple_arity_numeric_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY plus_minus_tolerance;
    range                : tolerance_method_definition;
    toleranced_dimension : dimensional_characteristic;
  UNIQUE
    UR1: toleranced_dimension;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY pmi_requirement_item_association
  SUBTYPE OF (item_identified_representation_usage);
    requirement : characterized_object;
END_ENTITY; -- 10303-113: mechanical_design_schema

ENTITY pocket
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SELF\characterized_object.description IN [ 'closed rectangular', 
              'open rectangular', 'complex', 'circular cutout', 
              'complex cutout', 'recess' ];
    WR2: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'pocket depth occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| ((sar.description = 'path feature component usage') AND (
              sar.name = 'pocket depth')) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PATH_FEATURE_COMPONENT'
               IN TYPEOF(sdr.relating_shape_aspect)) AND (sdr.
              relating_shape_aspect.description = 'linear'))) = 1))) = 1)))
               = 0;
    WR3: SIZEOF(QUERY (pdr <* get_property_definition_representations(SELF)
              | (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND ((1 <= SIZEOF(pdr.
              used_representation.items)) AND (SIZEOF(pdr.
              used_representation.items) <= 2)))) = 1))) = 1;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND (SIZEOF(QUERY (
              srwp_i <* pdr.used_representation.items| (srwp_i.name = 
              'orientation') OR (srwp_i.name = 'fillet radius'))) = SIZEOF(
              pdr.used_representation.items)))) = 1))) = 1;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'fillet radius'))) <= 1)
              )) = 0))) = 0;
    WR7: NOT (SELF\characterized_object.description IN [ 'complex', 
              'non-circular cutout', 'recess' ]) OR (SIZEOF(QUERY (pds <* 
              QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'boundary occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_CLOSED_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NGON_CLOSED_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_CLOSED_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CLOSED_PATH_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SQUARE_U_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PARTIAL_CIRCULAR_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROUNDED_U_PROFILE'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VEE_PROFILE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEE_PROFILE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OPEN_PATH_PROFILE'
               ] * TYPEOF(sdr.relating_shape_aspect)) = 1))) = 1))) = 1))) 
              = 0);
    WR8: NOT (SELF\characterized_object.description = 'closed rectangular')
               OR (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'closed boundary occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_CLOSED_PROFILE'
               IN TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0);
    WR9: NOT (SELF\characterized_object.description = 'open rectangular') 
              OR (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'open boundary occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SQUARE_U_PROFILE'
               IN TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0);
    WR10: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'bottom condition occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'pocket bottom usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POCKET_BOTTOM' 
              IN TYPEOF(sdr.relating_shape_aspect)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POCKET' IN 
              TYPEOF(sdr.related_shape_aspect.of_shape.definition)))) = 1))
              ) = 1))) = 0;
    WR11: NOT (SELF\characterized_object.description IN [ 'complex', 
              'non-circular cutout', 'recess' ]) OR (SIZEOF(QUERY (pds <* 
              QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'change in boundary occurrence') AND
               (SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (sar.description = 'taper usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TAPER' IN TYPEOF
              (fcr.relating_shape_aspect)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POCKET' IN 
              TYPEOF(fcr.related_shape_aspect.of_shape.definition))) AND (
              fcr.related_shape_aspect.description IN [ 'angle taper', 
              'directed taper' ]))) = 1))) <= 1))) = 0);
    WR12: NOT (SELF\characterized_object.description = 'circular cutout') 
              OR (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'enclosed boundary occurrence') AND 
              (SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_CLOSED_PROFILE'
               IN TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0);
    WR13: NOT (SELF\characterized_object.description IN [ 'circular cutout'
              , 'complex cutout' ]) OR (SIZEOF(QUERY (pds <* QUERY (pd <* 
              USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'bottom condition occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'pocket bottom usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POCKET_BOTTOM' 
              IN TYPEOF(sdr.relating_shape_aspect)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POCKET' IN 
              TYPEOF(sdr.related_shape_aspect.of_shape.definition))) AND (
              sdr.relating_shape_aspect.description = 'through'))) = 1))) =
               1))) = 0);
    WR14: NOT (SELF\characterized_object.description = 'recess') OR (SIZEOF
              (QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'bottom condition occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'pocket bottom usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POCKET_BOTTOM' 
              IN TYPEOF(sdr.relating_shape_aspect)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POCKET' IN 
              TYPEOF(sdr.related_shape_aspect.of_shape.definition))) AND (
              sdr.relating_shape_aspect.description IN [ 'planar', 
              'complex' ]))) = 1))) = 1))) = 0);
    WR15: SIZEOF(QUERY (pdr <* get_property_definition_representations(SELF
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'maximum feature limit'))) >= 0;
    WR16: NOT (SELF\characterized_object.description IN [ 
              'closed rectangular', 'open rectangular', 'complex', 'recess'
               ]) OR (SIZEOF(QUERY (pds <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pds)) AND (SIZEOF(QUERY (csa <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_SHAPE_ASPECT'
               IN TYPEOF(csa)) AND (csa.name = 'uncut volume')) AND (SIZEOF
              (QUERY (sar <* csa.component_relationships| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOSS', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROTRUSION' ] * 
              TYPEOF(sar.related_shape_aspect)) = 1))) = 1))) <= 1))) = 1);
    WR17: NOT (SELF\characterized_object.description IN [ 
              'closed rectangular', 'open rectangular' ]) OR (SIZEOF(QUERY 
              (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'change in boundary occurrence') AND
               (SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (sar.description = 'taper usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TAPER' IN TYPEOF
              (fcr.relating_shape_aspect)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POCKET' IN 
              TYPEOF(fcr.related_shape_aspect.of_shape.definition))) AND (
              fcr.related_shape_aspect.description IN [ 'angle taper', 
              'directed taper' ]))) >= 1))) <= 1))) = 0);
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY pocket_bottom
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_DEFINITION'
               IN TYPEOF(SELF.of_shape.definition);
    WR2: SELF.description IN [ 'planar', 'complex', 'through' ];
    WR3: NOT (SELF.description = 'planar') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'floor normal'))) = 1))) = 0);
    WR4: NOT (SELF.description = 'planar') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LOCATION_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'floor location'))) = 1))) = 0);
    WR5: NOT (SELF.description = 'complex') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'floor face'))) = 1))) = 0);
    WR6: NOT (SELF.description IN [ 'planar', 'complex' ]) OR (SIZEOF(QUERY
               (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0);
    WR7: NOT (SELF.description IN [ 'planar', 'complex' ]) OR (SIZEOF(QUERY
               (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) <= 1))) = 0))) = 0);
    WR8: NOT (SELF.description = 'through') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 0))) = 0);
    WR9: NOT (SELF.description IN [ 'planar', 'complex' ]) OR (SIZEOF(QUERY
               (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'radius'))) <= 1))) = 0)
              )) = 0);
    WR10: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (sar.description = 'pocket bottom usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| ((fcr.related_shape_aspect.description = 
              'bottom condition occurrence') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POCKET' IN 
              TYPEOF(fcr.related_shape_aspect.of_shape.definition))) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POCKET_BOTTOM' 
              IN TYPEOF(fcr.relating_shape_aspect)))) >= 1;
    WR11: NOT (SELF.description IN [ 'planar', 'complex' ]) OR (SIZEOF(
              QUERY (fcr <* QUERY (sar <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (sar.description = 'pocket bottom usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| (fcr.related_shape_aspect.description = 
              'bottom condition occurrence') AND (fcr.related_shape_aspect.
              name IN [ 'pocket depth start', 'pocket depth end' ]))) = 0);
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY point
  SUPERTYPE OF (ONEOF(cartesian_point, point_on_curve, point_on_surface, 
      point_in_volume, point_replica, degenerate_pcurve))
  SUBTYPE OF (geometric_representation_item);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY point_cloud_dataset
  SUBTYPE OF (scanned_data_item);
    point_coordinates : LIST [1:?] OF LIST [3:3] OF REAL;
END_ENTITY; -- 10303-42: scan_data_3d_shape_model_schema

ENTITY point_cloud_dataset_with_colours
  SUBTYPE OF (point_cloud_dataset);
    colour_indices : LIST [1:?] OF LIST [3:3] OF INTEGER;
  WHERE
    WR1: SIZEOF(colour_indices) = SIZEOF(SELF\point_cloud_dataset.
              point_coordinates);
END_ENTITY; -- 10303-42: scan_data_3d_shape_model_schema

ENTITY point_cloud_dataset_with_intensities
  SUBTYPE OF (point_cloud_dataset);
    intensities : LIST [1:?] OF REAL;
  WHERE
    WR1: SIZEOF(intensities) = SIZEOF(SELF\point_cloud_dataset.
              point_coordinates);
END_ENTITY; -- 10303-42: scan_data_3d_shape_model_schema

ENTITY point_cloud_dataset_with_normals
  SUBTYPE OF (point_cloud_dataset);
    normals : LIST [1:?] OF LIST [3:3] OF REAL;
  WHERE
    WR1: SIZEOF(normals) = SIZEOF(SELF\point_cloud_dataset.
              point_coordinates);
END_ENTITY; -- 10303-42: scan_data_3d_shape_model_schema

ENTITY point_cloud_superdataset
  SUBTYPE OF (scanned_data_item);
    pts_per_sublist : INTEGER;
    sublists        : LIST [2:?] OF point_cloud_dataset;
  WHERE
    WR1: consistent_sizes(SELF.pts_per_sublist, SELF.sublists);
END_ENTITY; -- 10303-42: scan_data_3d_shape_model_schema

ENTITY point_in_volume
  SUBTYPE OF (point);
    basis_volume      : volume;
    point_parameter_u : parameter_value;
    point_parameter_v : parameter_value;
    point_parameter_w : parameter_value;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY point_on_curve
  SUBTYPE OF (point);
    basis_curve     : curve;
    point_parameter : parameter_value;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY point_on_planar_curve_pair
  SUBTYPE OF (high_order_kinematic_pair);
    pair_curve  : curve;
    orientation : BOOLEAN;
  WHERE
    WR1: SIZEOF(QUERY (r <* SELF\kinematic_pair.
              associated_link_representations_1| NOT (pair_curve IN r.items
              ))) = 0;
    WR2: SIZEOF(QUERY (lr <* SELF\kinematic_pair.
              associated_link_representations_1| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RIGID_LINK_REPRESENTATION'
               IN TYPEOF(lr)))) = 0;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY point_on_planar_curve_pair_value
  SUBTYPE OF (pair_value);
    SELF\pair_value.applies_to_pair : point_on_planar_curve_pair;
    actual_point_on_curve : point_on_curve;
    input_orientation     : spatial_rotation;
  DERIVE
    actual_orientation : ypr_rotation := convert_spatial_to_ypr_rotation(
                            SELF\pair_value.applies_to_pair, 
                            input_orientation);
  WHERE
    WR1: SELF\pair_value.applies_to_pair\point_on_planar_curve_pair.
              pair_curve :=: actual_point_on_curve.basis_curve;
END_ENTITY; -- 10303-105: kinematic_state_schema

ENTITY point_on_planar_curve_pair_with_range
  SUBTYPE OF (point_on_planar_curve_pair);
    range_on_pair_curve : trimmed_curve;
    lower_limit_yaw     : OPTIONAL plane_angle_measure;
    upper_limit_yaw     : OPTIONAL plane_angle_measure;
    lower_limit_pitch   : OPTIONAL plane_angle_measure;
    upper_limit_pitch   : OPTIONAL plane_angle_measure;
    lower_limit_roll    : OPTIONAL plane_angle_measure;
    upper_limit_roll    : OPTIONAL plane_angle_measure;
  WHERE
    WR1: (NOT EXISTS(lower_limit_pitch) OR NOT EXISTS(upper_limit_pitch)) 
              XOR (lower_limit_pitch < upper_limit_pitch);
    WR2: (NOT EXISTS(lower_limit_yaw) OR NOT EXISTS(upper_limit_yaw)) XOR (
              lower_limit_yaw < upper_limit_yaw);
    WR3: (NOT EXISTS(lower_limit_roll) OR NOT EXISTS(upper_limit_roll)) XOR
               (lower_limit_roll < upper_limit_roll);
    WR4: SIZEOF(QUERY (r <* SELF\kinematic_pair.
              associated_link_representations_1| NOT (range_on_pair_curve 
              IN r.items))) = 0;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY point_on_surface
  SUBTYPE OF (point);
    basis_surface     : surface;
    point_parameter_u : parameter_value;
    point_parameter_v : parameter_value;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY point_on_surface_pair
  SUBTYPE OF (high_order_kinematic_pair);
    pair_surface : surface;
  WHERE
    WR1: SIZEOF(QUERY (r <* SELF\kinematic_pair.
              associated_link_representations_1| NOT (pair_surface IN r.
              items))) = 0;
    WR2: SIZEOF(QUERY (lr <* SELF\kinematic_pair.
              associated_link_representations_1| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RIGID_LINK_REPRESENTATION'
               IN TYPEOF(lr)))) = 0;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY point_on_surface_pair_value
  SUBTYPE OF (pair_value);
    SELF\pair_value.applies_to_pair : point_on_surface_pair;
    actual_point_on_surface : point_on_surface;
    input_orientation       : spatial_rotation;
  DERIVE
    actual_orientation : ypr_rotation := convert_spatial_to_ypr_rotation(
                            SELF\pair_value.applies_to_pair, 
                            input_orientation);
  WHERE
    WR1: SELF\pair_value.applies_to_pair\point_on_surface_pair.pair_surface
               :=: actual_point_on_surface.basis_surface;
END_ENTITY; -- 10303-105: kinematic_state_schema

ENTITY point_on_surface_pair_with_range
  SUBTYPE OF (point_on_surface_pair);
    range_on_pair_surface : rectangular_trimmed_surface;
    lower_limit_yaw       : OPTIONAL plane_angle_measure;
    upper_limit_yaw       : OPTIONAL plane_angle_measure;
    lower_limit_pitch     : OPTIONAL plane_angle_measure;
    upper_limit_pitch     : OPTIONAL plane_angle_measure;
    lower_limit_roll      : OPTIONAL plane_angle_measure;
    upper_limit_roll      : OPTIONAL plane_angle_measure;
  WHERE
    WR1: (NOT EXISTS(lower_limit_pitch) OR NOT EXISTS(upper_limit_pitch)) 
              XOR (lower_limit_pitch < upper_limit_pitch);
    WR2: (NOT EXISTS(lower_limit_yaw) OR NOT EXISTS(upper_limit_yaw)) XOR (
              lower_limit_yaw < upper_limit_yaw);
    WR3: (NOT EXISTS(lower_limit_roll) OR NOT EXISTS(upper_limit_roll)) XOR
               (lower_limit_roll < upper_limit_roll);
    WR4: SIZEOF(QUERY (r <* SELF\kinematic_pair.
              associated_link_representations_1| NOT (range_on_pair_surface
               IN r.items))) = 0;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY point_replica
  SUBTYPE OF (point);
    parent_pt      : point;
    transformation : cartesian_transformation_operator;
  WHERE
    WR1: transformation.dim = parent_pt.dim;
    WR2: acyclic_point_replica(SELF, parent_pt);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY point_style
  SUBTYPE OF (founded_item);
    name          : label;
    marker        : OPTIONAL marker_select;
    marker_size   : OPTIONAL size_select;
    marker_colour : OPTIONAL colour;
  WHERE
    WR1: (EXISTS(marker) OR EXISTS(marker_size)) OR EXISTS(marker_colour);
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY point_to_point_path
  SUBTYPE OF (path_node);
  DERIVE
    SELF\kinematic_path_segment.transition : transition_code := 
                    discontinuous;
END_ENTITY; -- 10303-105: kinematic_motion_representation_schema

ENTITY polar_complex_number_region
  SUBTYPE OF (maths_space, generic_literal);
    centre               : complex_number_literal;
    distance_constraint  : real_interval;
    direction_constraint : finite_real_interval;
  WHERE
    WR1: min_exists(distance_constraint) AND (real_min(distance_constraint)
               >= 0.0);
    WR2: (-PI <= direction_constraint.min) AND (direction_constraint.min < 
              PI);
    WR3: direction_constraint.max - direction_constraint.min <= 2.0 * PI;
    WR4: (direction_constraint.max - direction_constraint.min < 2.0 * PI) 
              OR (direction_constraint.min_closure = open);
    WR5: ((direction_constraint.max - direction_constraint.min < 2.0 * PI) 
              OR (direction_constraint.max_closure = open)) OR (
              direction_constraint.min = -PI);
    WR6: (((real_min(distance_constraint) > 0.0) OR max_exists(
              distance_constraint)) OR (direction_constraint.max - 
              direction_constraint.min < 2.0 * PI)) OR (
              direction_constraint.max_closure = open);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY polar_point
  SUBTYPE OF (cartesian_point);
    r     : length_measure;
    theta : plane_angle_measure;
  DERIVE
    SELF\cartesian_point.coordinates : LIST [2:2] OF length_measure := [ r 
                     * COS(theta), r * SIN(theta) ];
  WHERE
    WR1: r >= 0.0;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY poly_loop
  SUBTYPE OF (loop, geometric_representation_item);
    polygon : LIST [3:?] OF UNIQUE cartesian_point;
END_ENTITY; -- 10303-42: topology_schema

ENTITY polyline
  SUBTYPE OF (bounded_curve);
    points : LIST [2:?] OF cartesian_point;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY position_tolerance
  SUBTYPE OF (geometric_tolerance);
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY positive_length_measure_with_unit
  SUBTYPE OF (length_measure_with_unit);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITIVE_LENGTH_MEASURE'
               IN TYPEOF(SELF\measure_with_unit.value_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY positive_plane_angle_measure_with_unit
  SUBTYPE OF (plane_angle_measure_with_unit);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITIVE_PLANE_ANGLE_MEASURE'
               IN TYPEOF(SELF\measure_with_unit.value_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY power_expression
  SUBTYPE OF (binary_numeric_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY power_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POWER_UNIT' IN TYPEOF
              (SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY power_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensions_for_si_unit(
              si_unit_name.watt);
END_ENTITY; -- 10303-41: measure_schema

ENTITY pre_defined_character_glyph
  SUBTYPE OF (pre_defined_item);
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY pre_defined_colour
  SUBTYPE OF (pre_defined_item, colour);
END_ENTITY; -- 10303-46: presentation_resource_schema

ENTITY pre_defined_curve_font
  SUBTYPE OF (pre_defined_item);
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY pre_defined_dimension_symbol
  SUBTYPE OF (pre_defined_symbol);
  WHERE
    WR1: SELF.name IN [ 'arc length', 'conical taper', 'counterbore', 
              'countersink', 'depth', 'diameter', 'plus minus', 'radius', 
              'slope', 'spherical diameter', 'spherical radius', 'square' ]
              ;
END_ENTITY; -- 10303-1206: draughting_annotation_mim

ENTITY pre_defined_geometrical_tolerance_symbol
  SUBTYPE OF (pre_defined_symbol);
  WHERE
    WR1: SELF.name IN [ 'angularity', 'basic dimension', 
              'blanked datum reference', 'circular runout', 'circularity', 
              'concentricity', 'cylindricity', 
              'datum target identification', 'diameter', 
              'filled datum reference', 'flatness', 
              'least material condition', 'maximum material condition', 
              'parallelism', 'perpendicularity', 'position', 
              'profile of a line', 'profile of a surface', 
              'projected tolerance zone', 'regardless of feature size', 
              'straightness', 'symmetry', 'total runout' ];
END_ENTITY; -- 10303-1206: draughting_annotation_mim

ENTITY pre_defined_item;
    name : label;
END_ENTITY; -- 10303-41: external_reference_schema

ENTITY pre_defined_marker
  SUBTYPE OF (pre_defined_item);
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY pre_defined_point_marker_symbol
  SUBTYPE OF (pre_defined_marker, pre_defined_symbol);
  WHERE
    WR1: SELF.name IN [ 'asterisk', 'circle', 'dot', 'plus', 'square', 
              'triangle', 'x' ];
END_ENTITY; -- 10303-1003: curve_appearance_mim

ENTITY pre_defined_surface_condition_symbol
  SUBTYPE OF (pre_defined_symbol);
  WHERE
    WR1: SELF.name IN [ '000', '010', '020', '030', '040', '050', '060', 
              '070', '001', '011', '021', '031', '041', '051', '061', '071'
              , '100', '110', '120', '130', '140', '150', '160', '170', 
              '101', '111', '121', '131', '141', '151', '161', '171', '200'
              , '210', '220', '230', '240', '250', '260', '270', '201', 
              '211', '221', '231', '241', '251', '261', '271' ];
END_ENTITY; -- 10303-1206: draughting_annotation_mim

ENTITY pre_defined_surface_side_style
  SUBTYPE OF (pre_defined_item);
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY pre_defined_symbol
  SUBTYPE OF (pre_defined_item);
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY pre_defined_terminator_symbol
  SUBTYPE OF (pre_defined_symbol);
  WHERE
    WR1: SELF.name IN [ 'blanked arrow', 'blanked box', 'blanked dot', 
              'blanked triangle', 'dimension origin', 'filled arrow', 
              'filled box', 'filled dot', 'integral symbol', 'open arrow', 
              'slash', 'unfilled arrow', 'unfilled triangle', 
              'filled triangle' ];
END_ENTITY; -- 10303-1003: curve_appearance_mim

ENTITY pre_defined_text_font
  SUBTYPE OF (pre_defined_item);
END_ENTITY; -- 10303-46: presentation_resource_schema

ENTITY pre_defined_tile
  SUBTYPE OF (pre_defined_item);
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY precision_qualifier;
    precision_value : INTEGER;
END_ENTITY; -- 10303-45: qualified_measure_schema

ENTITY prescribed_path
  SUBTYPE OF (link_motion_representation_along_path);
    controlling_joints : OPTIONAL SET [1:6] OF kinematic_joint;
END_ENTITY; -- 10303-105: kinematic_analysis_control_and_result_schema

ENTITY presentation_area
  SUBTYPE OF (presentation_representation);
  WHERE
    WR1: (SIZEOF(QUERY (ais <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AREA_IN_SET.AREA'
              )| (SIZEOF(USEDIN(ais, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_SIZE.UNIT'
              )) = 1))) > 0) OR (SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_SIZE.UNIT'
              )) = 1);
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY presentation_layer_assignment;
    name           : label;
    description    : text;
    assigned_items : SET [1:?] OF layered_item;
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY presentation_representation
  SUPERTYPE OF (ONEOF(presentation_area, presentation_view))
  SUBTYPE OF (representation);
    SELF\representation.context_of_items : geometric_representation_context
                          ;
  WHERE
    WR1: SELF\representation.context_of_items\
              geometric_representation_context.coordinate_space_dimension =
               2;
    WR2: (('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_AREA' 
              IN TYPEOF(SELF)) OR (SIZEOF(QUERY (prr <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_RELATIONSHIP.REP_2'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_REPRESENTATION'
               IN TYPEOF(prr\representation_relationship.rep_1)))) > 0)) OR
               (SIZEOF(QUERY (rm <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_MAP.MAPPED_REPRESENTATION'
              )| (SIZEOF(QUERY (mi <* USEDIN(rm, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM.MAPPING_SOURCE'
              )| (SIZEOF(QUERY (rep <* using_representations(mi)| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_REPRESENTATION'
               IN TYPEOF(rep)))) > 0))) > 0))) > 0);
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY presentation_set;
  INVERSE
    areas : SET [1:?] OF area_in_set FOR in_set;
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY presentation_size;
    unit : presentation_size_assignment_select;
    size : planar_box;
  UNIQUE
    UR1: unit;
  WHERE
    WR1: (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_REPRESENTATION'
               IN TYPEOF(unit)) AND item_in_context(size, unit\
              representation.context_of_items) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AREA_IN_SET' IN 
              TYPEOF(unit)) AND (SIZEOF(QUERY (ais <* unit\area_in_set.
              in_set.areas| NOT item_in_context(size, ais.area\
              representation.context_of_items))) = 0);
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY presentation_style_assignment
  SUBTYPE OF (founded_item);
    styles : SET [1:?] OF presentation_style_select;
  WHERE
    WR1: SIZEOF(QUERY (style1 <* styles| NOT (SIZEOF(QUERY (style2 <* 
              styles - style1| NOT ((TYPEOF(style1) <> TYPEOF(style2)) OR (
              SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXTERNALLY_DEFINED_STYLE'
               ] * TYPEOF(style1)) = 1)))) = 0))) = 0;
    WR2: SIZEOF(QUERY (style1 <* styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
               IN TYPEOF(style1)))) <= 2;
    WR3: SIZEOF(QUERY (style1 <* styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
               IN TYPEOF(style1)) AND (SIZEOF(QUERY (style2 <* styles - 
              style1| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_STYLE_USAGE'
               IN TYPEOF(style2)) AND (((style1\surface_style_usage.side = 
              both) OR (style2\surface_style_usage.side = both)) OR (style1
              \surface_style_usage.side = style2\surface_style_usage.side))
              )) > 0))) = 0;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY presentation_style_by_context
  SUBTYPE OF (presentation_style_assignment);
    style_context : style_context_select;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY presentation_view
  SUBTYPE OF (presentation_representation);
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY presented_item
  ABSTRACT SUPERTYPE;
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY presented_item_representation;
    presentation : presentation_representation_select;
    item         : presented_item;
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY pressure_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESSURE_UNIT' IN 
              TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY pressure_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensions_for_si_unit(
              si_unit_name.pascal);
END_ENTITY; -- 10303-41: measure_schema

ENTITY prismatic_pair
  SUBTYPE OF (low_order_kinematic_pair);
  DERIVE
    SELF\low_order_kinematic_pair.t_x : BOOLEAN := TRUE;
    SELF\low_order_kinematic_pair.t_y : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.t_z : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.r_x : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.r_y : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.r_z : BOOLEAN := FALSE;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY prismatic_pair_value
  SUBTYPE OF (pair_value);
    SELF\pair_value.applies_to_pair : prismatic_pair;
    actual_translation : length_measure;
END_ENTITY; -- 10303-105: kinematic_state_schema

ENTITY prismatic_pair_with_range
  SUBTYPE OF (prismatic_pair);
    lower_limit_actual_translation : OPTIONAL length_measure;
    upper_limit_actual_translation : OPTIONAL length_measure;
  WHERE
    WR1: (NOT EXISTS(lower_limit_actual_translation) OR NOT EXISTS(
              upper_limit_actual_translation)) XOR (
              lower_limit_actual_translation < 
              upper_limit_actual_translation);
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY process_operation
  SUBTYPE OF (action_method);
END_ENTITY; -- 10303-1803: process_plan_mim

ENTITY process_plan
  SUBTYPE OF (action);
  WHERE
    WR1: SIZEOF(QUERY (ar <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_RELATIONSHIP.RELATED_ACTION'
              )| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROCESS_PLAN', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_PROCESS_PLAN'
               ] * TYPEOF(ar.relating_action)) <> 1))) = 0;
    WR2: SIZEOF(QUERY (ar <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_RELATIONSHIP.RELATING_ACTION'
              )| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROCESS_PLAN', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_PROCESS_PLAN'
               ] * TYPEOF(ar.related_action)) = 1) OR (ar.name = 
              'process operation occurrence') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROCESS_OPERATION'
               IN TYPEOF(ar.related_action.chosen_method)))) = SIZEOF(
              USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_RELATIONSHIP.RELATING_ACTION'
              ));
END_ENTITY; -- 10303-1803: process_plan_mim

ENTITY process_product_association;
    name            : label;
    description     : text;
    defined_product : characterized_product_definition;
    process         : product_definition_process;
END_ENTITY; -- 10303-49: process_property_schema

ENTITY process_property_association;
    name              : label;
    description       : text;
    process           : property_process;
    property_or_shape : property_or_shape_select;
END_ENTITY; -- 10303-49: process_property_schema

ENTITY product;
    id                 : identifier;
    name               : label;
    description        : OPTIONAL text;
    frame_of_reference : SET [1:?] OF product_context;
END_ENTITY; -- 10303-41: product_definition_schema

ENTITY product_as_planned
  SUBTYPE OF (product_definition_formation);
END_ENTITY; -- 10303-1164: product_as_individual_mim

ENTITY product_category;
    name        : label;
    description : OPTIONAL text;
  DERIVE
    id : identifier := get_id_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ID_ATTRIBUTE.IDENTIFIED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: product_definition_schema

ENTITY product_category_relationship;
    name         : label;
    description  : OPTIONAL text;
    category     : product_category;
    sub_category : product_category;
  WHERE
    WR1: acyclic_product_category_relationship(SELF, [ SELF.sub_category ])
              ;
END_ENTITY; -- 10303-41: product_definition_schema

ENTITY product_class
  SUBTYPE OF (product_concept, characterized_object);
END_ENTITY; -- 10303-1103: product_class_mim

ENTITY product_concept;
    id             : identifier;
    name           : label;
    description    : OPTIONAL text;
    market_context : product_concept_context;
  UNIQUE
    UR1: id;
END_ENTITY; -- 10303-44: product_concept_schema

ENTITY product_concept_context
  SUBTYPE OF (application_context_element);
    market_segment_type : label;
END_ENTITY; -- 10303-41: application_context_schema

ENTITY product_concept_feature;
    id          : identifier;
    name        : label;
    description : OPTIONAL text;
END_ENTITY; -- 10303-44: product_concept_schema

ENTITY product_concept_feature_association;
    name        : label;
    description : OPTIONAL text;
    concept     : product_concept;
    feature     : product_concept_feature;
END_ENTITY; -- 10303-44: product_concept_schema

ENTITY product_concept_feature_category
  SUBTYPE OF (group);
  WHERE
    WR1: SIZEOF(QUERY (aga <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GROUP_ASSIGNMENT.ASSIGNED_GROUP'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APPLIED_GROUP_ASSIGNMENT'
               IN TYPEOF(aga)) AND ((aga\group_assignment.role\object_role.
              name <> 'specification category member') OR (SIZEOF(QUERY (i 
              <* aga\applied_group_assignment.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_CONCEPT_FEATURE'
               IN TYPEOF(i)) AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONDITIONAL_CONCEPT_FEATURE'
               IN TYPEOF(i)))) <> SIZEOF(aga\applied_group_assignment.items
              ))))) = 0;
END_ENTITY; -- 10303-1103: product_class_mim

ENTITY product_concept_feature_category_usage
  SUBTYPE OF (group_assignment);
    SELF\group_assignment.assigned_group : product_concept_feature_category
                        ;
    items          : SET [1:?] OF category_usage_item;
  WHERE
    WR1: SELF.role.name IN [ 'mandatory category usage', 
              'optional category usage' ];
END_ENTITY; -- 10303-1103: product_class_mim

ENTITY product_concept_relationship;
    name                     : label;
    description              : OPTIONAL text;
    relating_product_concept : product_concept;
    related_product_concept  : product_concept;
END_ENTITY; -- 10303-44: product_concept_schema

ENTITY product_context
  SUBTYPE OF (application_context_element);
    discipline_type : label;
END_ENTITY; -- 10303-41: application_context_schema

ENTITY product_definition;
    id                 : identifier;
    description        : OPTIONAL text;
    formation          : product_definition_formation;
    frame_of_reference : product_definition_context;
  DERIVE
    name : label := get_name_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NAME_ATTRIBUTE.NAMED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: product_definition_schema

ENTITY product_definition_context
  SUBTYPE OF (application_context_element);
    life_cycle_stage : label;
END_ENTITY; -- 10303-41: application_context_schema

ENTITY product_definition_context_association;
    definition         : product_definition;
    frame_of_reference : product_definition_context;
    role               : product_definition_context_role;
END_ENTITY; -- 10303-41: product_definition_schema

ENTITY product_definition_context_role;
    name        : label;
    description : OPTIONAL text;
END_ENTITY; -- 10303-41: product_definition_schema

ENTITY product_definition_effectivity
  SUBTYPE OF (effectivity);
    usage : product_definition_relationship;
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EFFECTIVITY_ASSIGNMENT.ASSIGNED_EFFECTIVITY'
              )) = 0;
END_ENTITY; -- 10303-41: product_definition_schema

ENTITY product_definition_element_relationship
  SUBTYPE OF (group);
END_ENTITY; -- 10303-1248: product_breakdown_mim

ENTITY product_definition_formation;
    id          : identifier;
    description : OPTIONAL text;
    of_product  : product;
  UNIQUE
    UR1: id, of_product;
END_ENTITY; -- 10303-41: product_definition_schema

ENTITY product_definition_formation_relationship;
    id                                    : identifier;
    name                                  : label;
    description                           : OPTIONAL text;
    relating_product_definition_formation : product_definition_formation;
    related_product_definition_formation  : product_definition_formation;
END_ENTITY; -- 10303-41: product_definition_schema

ENTITY product_definition_formation_resource
  SUBTYPE OF (action_resource, product_definition_formation);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE.RESOURCES'
              )) > 0;
    WR2: SIZEOF(QUERY (prpc <* USEDIN(SELF\product_definition_formation.
              of_product, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
              )| (prpc.name = 'part'))) <> 0;
    WR3: SELF\action_resource.name = SELF\product_definition_formation.id;
    WR4: SELF\action_resource.description = SELF\
              product_definition_formation.description;
END_ENTITY; -- 10303-1803: process_plan_mim

ENTITY product_definition_formation_with_specified_source
  SUBTYPE OF (product_definition_formation);
    make_or_buy : source;
END_ENTITY; -- 10303-41: product_definition_schema

ENTITY product_definition_group_assignment
  SUBTYPE OF (group_assignment);
    SELF\group_assignment.assigned_group : 
                        product_definition_element_relationship;
    items          : SET [1:1] OF 
                        product_definition_or_product_definition_relationship
                        ;
END_ENTITY; -- 10303-1248: product_breakdown_mim

ENTITY product_definition_kinematics
  SUBTYPE OF (property_definition);
    SELF\property_definition.definition : product_definition;
  INVERSE
    representation_relation : kinematic_property_definition_representation 
                                 FOR definition;
  UNIQUE
    UR1: definition;
END_ENTITY; -- 10303-105: kinematic_property_schema

ENTITY product_definition_occurrence
  SUPERTYPE OF (product_definition_specified_occurrence ANDOR 
      product_definition_occurrence_reference_with_local_representation);
    id          : identifier;
    name        : OPTIONAL label;
    description : OPTIONAL text;
    definition  : OPTIONAL product_definition_or_reference_or_occurrence;
    quantity    : OPTIONAL measure_with_unit;
  DERIVE
    descendant_occurrences : SET [0:?] OF 
                                product_definition_specified_occurrence := 
                                get_descendant_occurrences(SELF);
  INVERSE
    assembly_usages   : SET [0:?] OF assembly_component_usage FOR 
                           related_product_definition;
    child_occurrences : SET [0:?] OF 
                           product_definition_specified_occurrence FOR 
                           occurrence_usage;
  WHERE
    WR1: (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SPECIFIED_OCCURRENCE'
               IN TYPEOF(SELF)) XOR ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_OCCURRENCE'
               IN TYPEOF(definition)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_OCCURRENCE_REFERENCE'
               IN TYPEOF(definition)));
    WR2: EXISTS(definition) OR (SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONFIGURATION_DESIGN.DESIGN'
              )) > 0);
    WR3: NOT ('NUMBER' IN TYPEOF(quantity.value_component)) OR (quantity.
              value_component > 0);
END_ENTITY; -- 10303-44: product_structure_schema

ENTITY product_definition_occurrence_reference
  SUBTYPE OF (product_definition_reference);
    product_occurrence_id : identifier;
END_ENTITY; -- 10303-44: product_structure_schema

ENTITY product_definition_occurrence_reference_with_local_representation
  SUBTYPE OF (product_definition_occurrence, 
      generic_product_definition_reference);
END_ENTITY; -- 10303-44: product_structure_schema

ENTITY product_definition_occurrence_relationship;
    name             : label;
    description      : OPTIONAL text;
    occurrence       : product_definition;
    occurrence_usage : assembly_component_usage;
  WHERE
    WR1: occurrence_usage.relating_product_definition :<>: occurrence;
    WR2: occurrence_usage.related_product_definition :<>: occurrence;
    WR3: occurrence.formation :=: occurrence_usage.
              related_product_definition.formation;
END_ENTITY; -- 10303-44: product_structure_schema

ENTITY product_definition_process
  SUBTYPE OF (action);
    identification : identifier;
  INVERSE
    product_definitions : SET [1:?] OF process_product_association FOR 
                             process;
END_ENTITY; -- 10303-49: process_property_schema

ENTITY product_definition_reference
  SUBTYPE OF (generic_product_definition_reference);
    product_id                      : identifier;
    product_definition_formation_id : identifier;
    product_definition_id           : identifier;
    id_owning_organization_name     : OPTIONAL label;
END_ENTITY; -- 10303-41: product_definition_schema

ENTITY product_definition_reference_with_local_representation
  SUBTYPE OF (generic_product_definition_reference, product_definition);
END_ENTITY; -- 10303-41: product_definition_schema

ENTITY product_definition_relationship;
    id                          : identifier;
    name                        : label;
    description                 : OPTIONAL text;
    relating_product_definition : product_definition_or_reference;
    related_product_definition  : product_definition_or_reference;
END_ENTITY; -- 10303-41: product_definition_schema

ENTITY product_definition_relationship_kinematics
  SUBTYPE OF (property_definition);
    SELF\property_definition.definition : product_definition_relationship;
  UNIQUE
    UR1: definition;
END_ENTITY; -- 10303-105: kinematic_property_schema

ENTITY product_definition_resource
  SUBTYPE OF (action_resource, product_definition);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE.RESOURCES'
              )) > 0;
    WR2: SELF\product_definition.frame_of_reference\
              application_context_element.name IN [ 'part definition', 
              'part occurrence', 'physical occurrence' ];
    WR3: SELF\action_resource.name = SELF\product_definition.name;
    WR4: SELF\action_resource.description = SELF\product_definition.
              description;
END_ENTITY; -- 10303-1803: process_plan_mim

ENTITY product_definition_shape
  SUBTYPE OF (property_definition);
  UNIQUE
    UR1: SELF\property_definition.definition;
  WHERE
    WR1: SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CHARACTERIZED_PRODUCT_DEFINITION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CHARACTERIZED_OBJECT'
               ] * TYPEOF(SELF\property_definition.definition)) > 0;
END_ENTITY; -- 10303-41: product_property_definition_schema

ENTITY product_definition_specified_occurrence
  SUBTYPE OF (product_definition_occurrence);
    SELF\product_definition_occurrence.definition : 
                          product_definition_occurrence_or_reference;
    occurrence_usage : product_definition_occurrence_or_reference;
  UNIQUE
    UR1: occurrence_usage, id;
  WHERE
    WR1: SIZEOF(assembly_usages) = 0;
    WR2: acyclic_product_definition_specified_occurrence(SELF, SELF\
              product_definition_occurrence.definition);
END_ENTITY; -- 10303-44: product_structure_schema

ENTITY product_definition_substitute;
    description           : OPTIONAL text;
    context_relationship  : product_definition_relationship;
    substitute_definition : product_definition;
  DERIVE
    name : label := get_name_value(SELF);
  WHERE
    WR1: context_relationship.related_product_definition :<>: 
              substitute_definition;
    WR2: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NAME_ATTRIBUTE.NAMED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: product_definition_schema

ENTITY product_definition_usage
  SUPERTYPE OF (ONEOF(make_from_usage_option, assembly_component_usage))
  SUBTYPE OF (product_definition_relationship);
  UNIQUE
    UR1: SELF\product_definition_relationship.id,
         SELF\product_definition_relationship.relating_product_definition,
         SELF\product_definition_relationship.related_product_definition;
  WHERE
    WR1: acyclic_product_definition_relationship(SELF, [ SELF\
              product_definition_relationship.related_product_definition ],
               
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_USAGE'
              );
END_ENTITY; -- 10303-44: product_structure_schema

ENTITY product_definition_with_associated_documents
  SUBTYPE OF (product_definition);
    documentation_ids : SET [1:?] OF document;
END_ENTITY; -- 10303-41: product_definition_schema

ENTITY product_design_to_individual
  SUBTYPE OF (product_relationship);
  DERIVE
    product_design     : product := SELF\product_relationship.
                            relating_product;
    individual_product : product := SELF\product_relationship.
                            related_product;
END_ENTITY; -- 10303-1164: product_as_individual_mim

ENTITY product_design_version_to_individual
  SUBTYPE OF (product_definition_formation_relationship);
  DERIVE
    product_design_version : product_definition_formation := SELF\
                                product_definition_formation_relationship.
                                relating_product_definition_formation;
    individual_product     : product_definition_formation := SELF\
                                product_definition_formation_relationship.
                                related_product_definition_formation;
END_ENTITY; -- 10303-1164: product_as_individual_mim

ENTITY product_identification
  SUBTYPE OF (configuration_item, characterized_object);
    SELF\configuration_item.item_concept : product_class;
  WHERE
    WR1: SIZEOF(QUERY (cd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONFIGURATION_DESIGN.CONFIGURATION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_FORMATION'
               IN TYPEOF(cd.design)) AND (SIZEOF(QUERY (prpc <* USEDIN(cd.
              design\product_definition_formation.of_product, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
              )| (prpc.name IN [ 'part', 'raw material', 'tool' ]))) > 0)))
               <= 1;
    WR2: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONFIGURABLE_ITEM'
               IN TYPEOF(SELF)) XOR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_SPECIFICATION'
               IN TYPEOF(SELF));
END_ENTITY; -- 10303-1104: specified_product_mim

ENTITY product_planned_to_realized
  SUBTYPE OF (product_definition_formation_relationship);
  DERIVE
    realized_product : product_definition_formation := SELF\
                          product_definition_formation_relationship.
                          related_product_definition_formation;
    planned_product  : product_definition_formation := SELF\
                          product_definition_formation_relationship.
                          relating_product_definition_formation;
END_ENTITY; -- 10303-1164: product_as_individual_mim

ENTITY product_process_plan
  SUBTYPE OF (product_definition_process);
  WHERE
    WR1: SIZEOF(QUERY (ar <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_RELATIONSHIP.RELATED_ACTION'
              )| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROCESS_PLAN', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_PROCESS_PLAN'
               ] * TYPEOF(ar.relating_action)) <> 1))) = 0;
    WR2: SIZEOF(QUERY (ar <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_RELATIONSHIP.RELATING_ACTION'
              )| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROCESS_PLAN', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_PROCESS_PLAN'
               ] * TYPEOF(ar.related_action)) = 1) OR (ar.name = 
              'process operation occurrence') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROCESS_OPERATION'
               IN TYPEOF(ar.related_action.chosen_method)))) = SIZEOF(
              USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_RELATIONSHIP.RELATING_ACTION'
              ));
    WR3: SIZEOF(QUERY (ppa <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROCESS_PRODUCT_ASSOCIATION.PROCESS'
              )| (ppa.name <> 'produced output') OR NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION'
               IN TYPEOF(ppa.defined_product)))) = 0;
END_ENTITY; -- 10303-1803: process_plan_mim

ENTITY product_related_product_category
  SUBTYPE OF (product_category);
    products : SET [1:?] OF product;
END_ENTITY; -- 10303-41: product_definition_schema

ENTITY product_relationship;
    id               : identifier;
    name             : label;
    description      : OPTIONAL text;
    relating_product : product;
    related_product  : product;
END_ENTITY; -- 10303-41: product_definition_schema

ENTITY product_resource
  SUBTYPE OF (action_resource, product);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE.RESOURCES'
              )) > 0;
    WR2: SIZEOF(QUERY (prpc <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
              )| (prpc.name = 'part'))) <> 0;
    WR3: SELF\action_resource.name = SELF\product.name;
    WR4: SELF\action_resource.description = SELF\product.description;
END_ENTITY; -- 10303-1803: process_plan_mim

ENTITY product_specification
  SUBTYPE OF (product_identification, configurable_item);
END_ENTITY; -- 10303-1104: specified_product_mim

ENTITY profile_floor
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_DEFINITION'
               IN TYPEOF(SELF.of_shape.definition);
    WR2: SELF.description IN [ 'planar', 'complex', 'through' ];
    WR3: NOT (SELF.description IN [ 'planar', 'complex' ]) OR (SIZEOF(QUERY
               (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0);
    WR4: NOT (SELF.description IN [ 'planar', 'complex' ]) OR (SIZEOF(QUERY
               (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) >= 1) AND (SIZEOF(impl_rep.
              used_representation.items) <= 2))) = 0))) = 0);
    WR5: NOT (SELF.description = 'through') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 0))) = 0);
    WR6: NOT (SELF.description IN [ 'planar', 'complex' ]) OR (SIZEOF(QUERY
               (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'radius'))) = 1))) = 0))
              ) = 0);
    WR7: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (sar.description = 'profile floor usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OUTSIDE_PROFILE'
               IN TYPEOF(fcr.related_shape_aspect.of_shape.definition)) AND
               ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROFILE_FLOOR'
               IN TYPEOF(fcr.relating_shape_aspect)))) >= 1;
    WR8: NOT (SELF.description IN [ 'planar', 'complex' ]) OR (SIZEOF(QUERY
               (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 
              'shape profile floor orientation')) AND (it.description IN [ 
              'shape profile start', 'shape profile end' ]))) = 1))) = 0)))
               = 0);
    WR9: NOT (SELF.description = 'complex') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'floor'))) = 1))) = 1);
    WR10: NOT (SELF.description = 'planar') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'floor'))) = 1))) = 1);
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY projected_zone_definition
  SUBTYPE OF (tolerance_zone_definition);
    projection_end   : shape_aspect;
    projected_length : length_measure_with_unit;
  WHERE
    WR1: ('NUMBER' IN TYPEOF(projected_length\measure_with_unit.
              value_component)) AND (projected_length\measure_with_unit.
              value_component > 0.0);
    WR2: derive_dimensional_exponents(projected_length\measure_with_unit.
              unit_component) = dimensional_exponents(1, 0, 0, 0, 0, 0, 0);
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY projected_zone_definition_with_offset
  SUBTYPE OF (projected_zone_definition);
    offset : length_measure_with_unit;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY projection_curve
  SUBTYPE OF (annotation_curve_occurrence);
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY projection_directed_callout
  SUBTYPE OF (draughting_callout);
  WHERE
    WR1: SIZEOF(QUERY (p_1 <* SELF\draughting_callout.contents| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROJECTION_CURVE'
               IN TYPEOF(p_1)))) <= 2;
    WR2: SIZEOF(SELF\draughting_callout.contents) >= 2;
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY promissory_usage_occurrence
  SUBTYPE OF (assembly_component_usage);
END_ENTITY; -- 10303-44: product_structure_schema

ENTITY property_definition
  SUPERTYPE OF (ONEOF(product_definition_kinematics, 
      product_definition_relationship_kinematics, product_definition_shape)
      );
    name        : label;
    description : OPTIONAL text;
    definition  : characterized_definition;
  DERIVE
    id : identifier := get_id_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ID_ATTRIBUTE.IDENTIFIED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: product_property_definition_schema

ENTITY property_definition_relationship;
    name                         : label;
    description                  : text;
    relating_property_definition : property_definition;
    related_property_definition  : property_definition;
END_ENTITY; -- 10303-45: material_property_definition_schema

ENTITY property_definition_representation;
    definition          : represented_definition;
    used_representation : representation;
  DERIVE
    description : text := get_description_value(SELF);
    name        : label := get_name_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM'
              )) <= 1;
    WR2: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NAME_ATTRIBUTE.NAMED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: product_property_representation_schema

ENTITY property_process
  SUBTYPE OF (action);
    identification : identifier;
  INVERSE
    properties : SET [1:?] OF process_property_association FOR process;
END_ENTITY; -- 10303-49: process_property_schema

ENTITY protrusion
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 1))) = 0))) = 0;
    WR2: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'shape volume occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'volume shape usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (sdr.relating_shape_aspect.description = 
              'volume shape'))) = 1))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pdr <* get_property_definition_representations(SELF)
              | (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'maximum feature limit'))) >= 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY pyramid_volume
  SUBTYPE OF (volume);
    position : axis2_placement_3d;
    xlength  : positive_length_measure;
    ylength  : positive_length_measure;
    height   : positive_length_measure;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY qualified_representation_item
  SUBTYPE OF (representation_item);
    qualifiers : SET [1:?] OF value_qualifier;
  WHERE
    WR1: SIZEOF(QUERY (temp <* qualifiers| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRECISION_QUALIFIER'
               IN TYPEOF(temp)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MATHS_VALUE_PRECISION_QUALIFIER'
               IN TYPEOF(temp)))) < 2;
END_ENTITY; -- 10303-45: qualified_measure_schema

ENTITY qualitative_uncertainty
  SUBTYPE OF (uncertainty_qualifier);
    uncertainty_value : text;
END_ENTITY; -- 10303-45: qualified_measure_schema

ENTITY quantified_assembly_component_usage
  SUBTYPE OF (assembly_component_usage);
    quantity : measure_with_unit;
  WHERE
    WR1: NOT ('NUMBER' IN TYPEOF(quantity.value_component)) OR (quantity.
              value_component > 0);
END_ENTITY; -- 10303-44: product_structure_schema

ENTITY quantifier_expression
  ABSTRACT SUPERTYPE
  SUBTYPE OF (multiple_arity_generic_expression);
    variables : LIST [1:?] OF UNIQUE generic_variable;
  WHERE
    WR1: SIZEOF(QUERY (vrbl <* variables| NOT (vrbl IN SELF\
              multiple_arity_generic_expression.operands))) = 0;
    WR2: SIZEOF(QUERY (vrbl <* variables| NOT (schema_prefix + 
              'BOUND_VARIABLE_SEMANTICS' IN TYPEOF(vrbl.interpretation.
              semantics)))) = 0;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY quasi_uniform_curve
  SUBTYPE OF (b_spline_curve);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY quasi_uniform_surface
  SUBTYPE OF (b_spline_surface);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY quasi_uniform_volume
  SUBTYPE OF (b_spline_volume);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY rack_and_pinion_pair
  SUBTYPE OF (low_order_kinematic_pair_with_motion_coupling);
    pinion_radius : length_measure;
  WHERE
    WR1: SIZEOF(QUERY (lr <* SELF\kinematic_pair.
              associated_link_representations_1| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RIGID_LINK_REPRESENTATION'
               IN TYPEOF(lr)))) = 0;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY rack_and_pinion_pair_value
  SUBTYPE OF (pair_value);
    SELF\pair_value.applies_to_pair : rack_and_pinion_pair;
    actual_displacement : length_measure;
  DERIVE
    actual_rotation : plane_angle_measure := 0.0;
END_ENTITY; -- 10303-105: kinematic_state_schema

ENTITY rack_and_pinion_pair_with_range
  SUBTYPE OF (rack_and_pinion_pair);
    lower_limit_rack_displacement : OPTIONAL length_measure;
    upper_limit_rack_displacement : OPTIONAL length_measure;
  WHERE
    WR1: (NOT EXISTS(lower_limit_rack_displacement) OR NOT EXISTS(
              upper_limit_rack_displacement)) XOR (
              lower_limit_rack_displacement < upper_limit_rack_displacement
              );
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY radioactivity_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RADIOACTIVITY_UNIT' 
              IN TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY radioactivity_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensions_for_si_unit(
              si_unit_name.becquerel);
END_ENTITY; -- 10303-41: measure_schema

ENTITY radius_dimension
  SUBTYPE OF (dimension_curve_directed_callout);
  WHERE
    WR1: SIZEOF(QUERY (con <* SELF.contents| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROJECTION_CURVE'
               IN TYPEOF(con)))) <= 1;
END_ENTITY; -- 10303-506: aic_draughting_elements

ENTITY range_characteristic
  SUBTYPE OF (representation, descriptive_representation_item);
  WHERE
    WR1: NOT (SELF\representation.name IN [ 'tolerance', 
              'minimum tolerance', 'maximum tolerance', 'nominal tolerance'
              , 'plus minus tolerance', 'symmetrical tolerance', 
              'statistical tolerance' ]);
END_ENTITY; -- 10303-1654: characteristic_mim

ENTITY ratio_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RATIO_UNIT' IN TYPEOF
              (SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY ratio_unit
  SUBTYPE OF (named_unit);
  WHERE
    WR1: ((((((SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\
              named_unit.dimensions.mass_exponent = 0.0)) AND (SELF\
              named_unit.dimensions.time_exponent = 0.0)) AND (SELF\
              named_unit.dimensions.electric_current_exponent = 0.0)) AND (
              SELF\named_unit.dimensions.thermodynamic_temperature_exponent
               = 0.0)) AND (SELF\named_unit.dimensions.
              amount_of_substance_exponent = 0.0)) AND (SELF\named_unit.
              dimensions.luminous_intensity_exponent = 0.0);
END_ENTITY; -- 10303-41: measure_schema

ENTITY rational_b_spline_curve
  SUBTYPE OF (b_spline_curve);
    weights_data : LIST [2:?] OF REAL;
  DERIVE
    weights : ARRAY [0:upper_index_on_control_points] OF REAL := 
                 list_to_array(weights_data, 0, 
                 upper_index_on_control_points);
  WHERE
    WR1: SIZEOF(weights_data) = SIZEOF(SELF\b_spline_curve.
              control_points_list);
    WR2: curve_weights_positive(SELF);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY rational_b_spline_surface
  SUBTYPE OF (b_spline_surface);
    weights_data : LIST [2:?] OF LIST [2:?] OF REAL;
  DERIVE
    weights : ARRAY [0:u_upper] OF ARRAY [0:v_upper] OF REAL := 
                 make_array_of_array(weights_data, 0, u_upper, 0, v_upper);
  WHERE
    WR1: (SIZEOF(weights_data) = SIZEOF(SELF\b_spline_surface.
              control_points_list)) AND (SIZEOF(weights_data[1]) = SIZEOF(
              SELF\b_spline_surface.control_points_list[1]));
    WR2: surface_weights_positive(SELF);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY rational_b_spline_volume
  SUBTYPE OF (b_spline_volume);
    weights_data : LIST [2:?] OF LIST [2:?] OF LIST [2:?] OF REAL;
  DERIVE
    weights : ARRAY [0:u_upper] OF ARRAY [0:v_upper] OF ARRAY [0:w_upper] 
                 OF REAL := make_array_of_array_of_array(weights_data, 0, 
                 u_upper, 0, v_upper, 0, w_upper);
  WHERE
    WR1: ((SIZEOF(weights_data) = SIZEOF(SELF\b_spline_volume.
              control_points_list)) AND (SIZEOF(weights_data[1]) = SIZEOF(
              SELF\b_spline_volume.control_points_list[1]))) AND (SIZEOF(
              weights_data[1][1]) = SIZEOF(SELF\b_spline_volume.
              control_points_list[1][1]));
    WR2: volume_weights_positive(SELF);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY rational_locally_refined_spline_curve
  SUBTYPE OF (locally_refined_spline_curve);
    weights_data : LIST [2:?] OF REAL;
  WHERE
    WR1: SIZEOF(weights_data) = SIZEOF(SELF\locally_refined_spline_curve.
              control_points_list);
    WR2: weights_positive(weights_data);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY rational_locally_refined_spline_surface
  SUBTYPE OF (locally_refined_spline_surface);
    weights_data : LIST [4:?] OF REAL;
  WHERE
    WR1: SIZEOF(weights_data) = SIZEOF(SELF\locally_refined_spline_surface.
              control_points_list);
    WR2: weights_positive(weights_data);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY rational_locally_refined_spline_volume
  SUBTYPE OF (locally_refined_spline_volume);
    weights_data : LIST [8:?] OF REAL;
  WHERE
    WR1: SIZEOF(weights_data) = SIZEOF(SELF\locally_refined_spline_volume.
              control_points_list);
    WR2: weights_positive(weights_data);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY rational_representation_item
  SUBTYPE OF (representation_item, slash_expression);
  WHERE
    WR1: SIZEOF(QUERY (operand <* SELF\binary_generic_expression.operands| 
              NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.INT_LITERAL' IN 
              TYPEOF(operand)))) = 0;
END_ENTITY; -- 10303-1773: basic_data_representation_mim

ENTITY rationalize_function
  SUBTYPE OF (maths_function, unary_generic_expression);
    SELF\unary_generic_expression.operand : maths_function;
  DERIVE
    fun : maths_function := SELF\unary_generic_expression.operand;
  WHERE
    WR1: (space_dimension(fun.domain) = 1) AND (space_dimension(fun.range) 
              = 1);
    WR2: number_tuple_subspace_check(factor1(fun.range));
    WR3: space_dimension(factor1(fun.range)) > 1;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY real_defined_function
  ABSTRACT SUPERTYPE
  SUBTYPE OF (numeric_defined_function);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY real_interval_from_min
  SUBTYPE OF (maths_space, generic_literal);
    min         : REAL;
    min_closure : open_closed;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY real_interval_to_max
  SUBTYPE OF (maths_space, generic_literal);
    max         : REAL;
    max_closure : open_closed;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY real_literal
  SUBTYPE OF (literal_number);
    SELF\literal_number.the_value : REAL;
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY real_numeric_variable
  SUBTYPE OF (numeric_variable);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY real_representation_item
  SUBTYPE OF (representation_item, real_literal);
END_ENTITY; -- 10303-1773: basic_data_representation_mim

ENTITY real_tuple_literal
  SUBTYPE OF (generic_literal);
    lit_value : LIST [1:?] OF REAL;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY rectangular_closed_profile
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_DEFINITION'
               IN TYPEOF(SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT ((SIZEOF(impl_rep.
              used_representation.items) >= 3) AND (SIZEOF(impl_rep.
              used_representation.items) <= 4)))) = 0))) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND (SIZEOF(QUERY (
              srwp_i <* pdr.used_representation.items| (((srwp_i.name = 
              'orientation') OR (srwp_i.name = 'length')) OR (srwp_i.name =
               'width')) OR (srwp_i.name = 'corner radius'))) = SIZEOF(pdr.
              used_representation.items)))) = 1))) = 1;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN 
              TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0))) = 0
              ;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'width'))) = 1))) = 0)))
               = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'length'))) = 1))) = 0))
              ) = 0;
    WR8: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'corner radius'))) <= 1)
              )) = 0))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY rectangular_composite_surface
  SUBTYPE OF (bounded_surface);
    segments : LIST [1:?] OF LIST [1:?] OF surface_patch;
  DERIVE
    n_u : INTEGER := SIZEOF(segments);
    n_v : INTEGER := SIZEOF(segments[1]);
  WHERE
    WR1: SIZEOF(QUERY (s <* segments| (n_v <> SIZEOF(s)))) = 0;
    WR2: constraints_rectangular_composite_surface(SELF);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY rectangular_pattern
  SUBTYPE OF (replicate_feature);
  WHERE
    WR1: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT' IN
               TYPEOF(sdr.related_shape_aspect)))) = 1))) <= 5))) = 0;
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'row layout direction'))) = 1))) =
               0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'column layout direction'))) = 1))
              ) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 5))) = 0))) = 0;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COUNT_MEASURE' 
              IN TYPEOF(it\measure_with_unit.value_component))) AND (it.
              name = 'number of rows'))) = 1))) = 0))) = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COUNT_MEASURE' 
              IN TYPEOF(it\measure_with_unit.value_component))) AND (it.
              name = 'number of columns'))) = 1))) = 0))) = 0;
    WR8: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'row spacing'))) = 1))) 
              = 0))) = 0;
    WR9: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'column spacing'))) = 1)
              )) = 0))) = 0;
    WR10: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN 
              TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0))) = 0
              ;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY rectangular_pyramid
  SUBTYPE OF (geometric_representation_item);
    position : axis2_placement_3d;
    xlength  : positive_length_measure;
    ylength  : positive_length_measure;
    height   : positive_length_measure;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY rectangular_trimmed_surface
  SUBTYPE OF (bounded_surface);
    basis_surface : surface;
    u1            : parameter_value;
    u2            : parameter_value;
    v1            : parameter_value;
    v2            : parameter_value;
    usense        : BOOLEAN;
    vsense        : BOOLEAN;
  WHERE
    WR1: u1 <> u2;
    WR2: v1 <> v2;
    WR3: (('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ELEMENTARY_SURFACE'
               IN TYPEOF(basis_surface)) AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE' IN TYPEOF
              (basis_surface)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_OF_REVOLUTION'
               IN TYPEOF(basis_surface))) OR (usense = (u2 > u1));
    WR4: (('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SPHERICAL_SURFACE' 
              IN TYPEOF(basis_surface)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TOROIDAL_SURFACE'
               IN TYPEOF(basis_surface))) OR (vsense = (v2 > v1));
END_ENTITY; -- 10303-42: geometry_schema

ENTITY referenced_modified_datum
  SUBTYPE OF (datum_reference);
    modifier : limit_condition;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY regular_table_function
  SUBTYPE OF (linearized_table_function);
    increments : LIST [1:?] OF INTEGER;
  WHERE
    WR1: SIZEOF(increments) = SIZEOF(SELF\explicit_table_function.shape);
    WR2: extremal_position_check(SELF);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY reindexed_array_function
  SUBTYPE OF (maths_function, unary_generic_expression);
    SELF\unary_generic_expression.operand : maths_function;
    starting_indices : LIST [1:?] OF INTEGER;
  WHERE
    WR1: function_is_array(SELF\unary_generic_expression.operand);
    WR2: SIZEOF(starting_indices) = SIZEOF(shape_of_array(SELF\
              unary_generic_expression.operand));
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY relative_event_occurrence
  SUBTYPE OF (event_occurrence);
    base_event : event_occurrence;
    offset     : time_measure_with_unit;
END_ENTITY; -- 10303-41: date_time_schema

ENTITY removal_volume
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 1))) = 0))) = 0;
    WR2: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'shape volume occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'volume shape usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (sdr.relating_shape_aspect.description = 
              'volume shape'))) = 1))) = 1))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY rep_item_group
  SUBTYPE OF (group, representation_item);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_LAYER_ASSIGNMENT.ASSIGNED_ITEMS'
              )) > 0;
    WR2: SIZEOF(QUERY (r <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION.ITEMS'
              )| (r.name = 'group representation'))) > 0;
    WR3: SIZEOF(QUERY (ga <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GROUP_ASSIGNMENT.ASSIGNED_GROUP'
              )| (ga.role.name <> 'group membership'))) = 0;
    WR4: SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TOPOLOGICAL_REPRESENTATION_ITEM'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' ] *
               TYPEOF(SELF)) = 1;
END_ENTITY; -- 10303-1008: layer_assignment_mim

ENTITY repackaging_function
  SUBTYPE OF (maths_function, unary_generic_expression);
    SELF\unary_generic_expression.operand : maths_function;
    input_repack    : repackage_options;
    output_repack   : repackage_options;
    selected_output : nonnegative_integer;
  WHERE
    WR1: (input_repack <> ro_wrap_as_tuple) OR (space_dimension(operand.
              domain) = 1) AND (schema_prefix + 'TUPLE_SPACE' IN TYPEOF(
              factor1(operand.domain)));
    WR2: (output_repack <> ro_unwrap_tuple) OR (space_dimension(operand.
              range) = 1) AND (schema_prefix + 'TUPLE_SPACE' IN TYPEOF(
              factor1(operand.range)));
    WR3: selected_output <= space_dimension(repackage(operand.range, 
              output_repack));
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY reparametrised_composite_curve_segment
  SUBTYPE OF (composite_curve_segment);
    param_length : parameter_value;
  WHERE
    WR1: param_length > 0.0;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY replicate_feature
  SUPERTYPE OF (ONEOF(circular_pattern, rectangular_pattern, 
      feature_pattern))
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0;
    WR2: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPLICATE_FEATURE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.INSTANCED_FEATURE'
               ] * TYPEOF(fcr.related_shape_aspect)) >= 1) AND (fcr.name = 
              'pattern basis'))) = 1;
    WR3: SIZEOF(QUERY (sar <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))) + SIZEOF(QUERY (sar <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY repositioned_tessellated_item
  SUBTYPE OF (tessellated_item);
    location : axis2_placement_3d;
  WHERE
    WR1: NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_CURVE_SET'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_GEOMETRIC_SET'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_POINT_SET'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_SURFACE_SET'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_SHELL'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_SOLID'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_WIRE'
               ] * TYPEOF(SELF)) = 0);
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY representation
  SUPERTYPE OF ((ONEOF(interpolated_configuration_representation, 
      link_motion_representation_along_path) ANDOR ONEOF(
      kinematic_topology_structure, kinematic_topology_directed_structure, 
      kinematic_topology_network_structure)) ANDOR ONEOF(
      kinematic_link_representation, kinematic_topology_structure, 
      kinematic_topology_directed_structure, 
      kinematic_topology_network_structure, mechanism_representation, 
      shape_representation));
    name             : label;
    items            : SET [1:?] OF representation_item;
    context_of_items : representation_context;
  DERIVE
    id          : identifier := get_id_value(SELF);
    description : text := get_description_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ID_ATTRIBUTE.IDENTIFIED_ITEM'
              )) <= 1;
    WR2: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-43: representation_schema

ENTITY representation_context;
    context_identifier : identifier;
    context_type       : text;
  INVERSE
    representations_in_context : SET [1:?] OF representation FOR 
                                    context_of_items;
END_ENTITY; -- 10303-43: representation_schema

ENTITY representation_context_reference;
    context_identifier : identifier;
  INVERSE
    representations_in_context : SET [1:?] OF representation_reference FOR 
                                    context_of_items;
END_ENTITY; -- 10303-43: representation_schema

ENTITY representation_item
  SUPERTYPE OF ((ONEOF(mapped_item, styled_item) ANDOR ONEOF(
      compound_representation_item, mapped_item, value_representation_item)
      ) ANDOR ONEOF(boolean_representation_item, date_representation_item, 
      date_time_representation_item, integer_representation_item, 
      logical_representation_item, rational_representation_item, 
      real_representation_item));
    name : label;
  WHERE
    WR1: SIZEOF(using_representations(SELF)) > 0;
END_ENTITY; -- 10303-43: representation_schema

ENTITY representation_item_relationship;
    name                         : label;
    description                  : OPTIONAL text;
    relating_representation_item : representation_item;
    related_representation_item  : representation_item;
END_ENTITY; -- 10303-43: representation_schema

ENTITY representation_map;
    mapping_origin        : representation_item;
    mapped_representation : representation;
  INVERSE
    map_usage : SET [1:?] OF mapped_item FOR mapping_source;
  WHERE
    WR1: item_in_context(mapping_origin, mapped_representation\
              representation.context_of_items);
END_ENTITY; -- 10303-43: representation_schema

ENTITY representation_reference;
    id               : identifier;
    context_of_items : representation_context_reference;
END_ENTITY; -- 10303-43: representation_schema

ENTITY representation_relationship;
    name        : label;
    description : OPTIONAL text;
    rep_1       : representation_or_representation_reference;
    rep_2       : representation_or_representation_reference;
END_ENTITY; -- 10303-43: representation_schema

ENTITY representation_relationship_with_transformation
  SUBTYPE OF (representation_relationship);
    transformation_operator : transformation;
  WHERE
    WR1: SELF\representation_relationship.rep_1.context_of_items :<>: SELF\
              representation_relationship.rep_2.context_of_items;
    WR2: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ITEM_DEFINED_TRANSFORMATION'
               IN TYPEOF(transformation_operator)) OR (SELF\
              representation_relationship.rep_1 IN using_representations(
              transformation_operator\item_defined_transformation.
              transform_item_1)) AND (SELF\representation_relationship.
              rep_2 IN using_representations(transformation_operator\
              item_defined_transformation.transform_item_2));
END_ENTITY; -- 10303-43: representation_schema

ENTITY requirement_assigned_object
  SUBTYPE OF (group_assignment);
    SELF\group_assignment.assigned_group : requirement_assignment;
    items          : SET [1:1] OF requirement_assigned_item;
END_ENTITY; -- 10303-1233: requirement_assignment_mim

ENTITY requirement_assignment
  SUBTYPE OF (characterized_object, group);
END_ENTITY; -- 10303-1233: requirement_assignment_mim

ENTITY requirement_for_action_resource
  SUBTYPE OF (action_resource_requirement);
    resources : SET [1:?] OF action_resource;
END_ENTITY; -- 10303-49: process_property_schema

ENTITY requirement_source
  SUBTYPE OF (group);
END_ENTITY; -- 10303-1233: requirement_assignment_mim

ENTITY requirement_view_definition_relationship
  SUBTYPE OF (product_definition_relationship);
END_ENTITY; -- 10303-1142: requirement_view_definition_relationship_mim

ENTITY resistance_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RESISTANCE_UNIT' IN 
              TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY resistance_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensions_for_si_unit(
              si_unit_name.ohm);
END_ENTITY; -- 10303-41: measure_schema

ENTITY resource_property;
    name        : label;
    description : text;
    resource    : characterized_resource_definition;
END_ENTITY; -- 10303-49: process_property_schema

ENTITY resource_property_representation;
    name           : label;
    description    : text;
    property       : resource_property;
    representation : representation;
END_ENTITY; -- 10303-49: process_property_representation_schema

ENTITY resource_requirement_type;
    name        : label;
    description : text;
END_ENTITY; -- 10303-49: process_property_schema

ENTITY restriction_function
  SUBTYPE OF (maths_function, unary_generic_expression);
    SELF\unary_generic_expression.operand : maths_space;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY resulting_path
  SUBTYPE OF (link_motion_representation_along_path);
    controlling_joints : SET [1:?] OF kinematic_joint;
END_ENTITY; -- 10303-105: kinematic_analysis_control_and_result_schema

ENTITY retention
  SUBTYPE OF (action);
  WHERE
    WR1: SIZEOF(QUERY (aa <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_ASSIGNMENT.ASSIGNED_ACTION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APPLIED_ACTION_ASSIGNMENT'
               IN TYPEOF(aa)) AND (aa.role.name = 'retention'))) >= 1;
    WR2: ((SIZEOF(QUERY (atia <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APPLIED_TIME_INTERVAL_ASSIGNMENT.ITEMS'
              )| (atia.role.name = 'minimum retention period'))) = 1) AND (
              SIZEOF(QUERY (atia <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APPLIED_TIME_INTERVAL_ASSIGNMENT.ITEMS'
              )| (atia.role.name = 'maximum retention period'))) = 1)) AND 
              (SIZEOF(QUERY (atia1 <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APPLIED_TIME_INTERVAL_ASSIGNMENT.ITEMS'
              )| (((atia1.role.name = 'minimum retention period') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TIME_INTERVAL_WITH_BOUNDS'
               IN TYPEOF(atia1.assigned_time_interval))) AND (EXISTS(atia1.
              assigned_time_interval\time_interval_with_bounds.
              secondary_bound) OR EXISTS(atia1.assigned_time_interval\
              time_interval_with_bounds.duration))) AND (SIZEOF(QUERY (
              atia2 <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APPLIED_TIME_INTERVAL_ASSIGNMENT.ITEMS'
              )| (((atia2.role.name = 'maximum retention period') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TIME_INTERVAL_WITH_BOUNDS'
               IN TYPEOF(atia2.assigned_time_interval))) AND (EXISTS(atia2.
              assigned_time_interval\time_interval_with_bounds.
              secondary_bound) OR EXISTS(atia2.assigned_time_interval\
              time_interval_with_bounds.duration))) AND (atia1.
              assigned_time_interval\time_interval_with_bounds.
              primary_bound :=: atia2.assigned_time_interval\
              time_interval_with_bounds.primary_bound))) = 1))) = 1);
    WR3: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_RELATIONSHIP.RELATING_ACTION'
              )) + SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_RELATIONSHIP.RELATED_ACTION'
              )) = 0;
END_ENTITY; -- 10303-1628: design_product_data_management_mim

ENTITY revolute_pair
  SUBTYPE OF (low_order_kinematic_pair);
  DERIVE
    SELF\low_order_kinematic_pair.t_x : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.t_y : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.t_z : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.r_x : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.r_y : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.r_z : BOOLEAN := TRUE;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY revolute_pair_value
  SUBTYPE OF (pair_value);
    SELF\pair_value.applies_to_pair : revolute_pair;
    actual_rotation : plane_angle_measure;
END_ENTITY; -- 10303-105: kinematic_state_schema

ENTITY revolute_pair_with_range
  SUBTYPE OF (revolute_pair);
    lower_limit_actual_rotation : OPTIONAL plane_angle_measure;
    upper_limit_actual_rotation : OPTIONAL plane_angle_measure;
  WHERE
    WR1: (NOT EXISTS(lower_limit_actual_rotation) OR NOT EXISTS(
              upper_limit_actual_rotation)) XOR (
              lower_limit_actual_rotation < upper_limit_actual_rotation);
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY revolved_area_solid
  SUBTYPE OF (swept_area_solid);
    axis  : axis1_placement;
    angle : plane_angle_measure;
  DERIVE
    axis_line : line := representation_item('') || 
                   geometric_representation_item() || curve() || line(axis.
                   location, representation_item('') || 
                   geometric_representation_item() || vector(axis.z, 1.0));
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY revolved_face_solid
  SUBTYPE OF (swept_face_solid);
    axis  : axis1_placement;
    angle : plane_angle_measure;
  DERIVE
    axis_line : line := representation_item('') || 
                   geometric_representation_item() || curve() || line(axis.
                   location, representation_item('') || 
                   geometric_representation_item() || vector(axis.z, 1.0));
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY revolved_profile
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SELF\characterized_object.description IN [ 'groove', 'flat', 
              'round', 'open profile' ];
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 2))) = 0))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'radius'))) = 1))) = 0))
              ) = 0;
    WR4: SIZEOF(QUERY (pdr <* get_property_definition_representations(SELF)
              | (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'removal direction'))) = 1;
    WR5: NOT (SELF\characterized_object.description = 'open profile') OR (
              SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'outer edge shape occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OPEN_PATH_PROFILE'
               IN TYPEOF(sdr.relating_shape_aspect)) AND (sdr.
              relating_shape_aspect.description = 'outer edge shape'))) = 1
              ))) = 1))) = 0);
    WR6: NOT (SELF\characterized_object.description = 'flat') OR (SIZEOF(
              QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'flat edge shape occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINEAR_PROFILE' 
              IN TYPEOF(sdr.relating_shape_aspect)) AND (sdr.
              relating_shape_aspect.description = 'flat edge shape'))) = 1)
              )) = 1))) = 0);
    WR7: NOT (SELF\characterized_object.description = 'round') OR (SIZEOF(
              QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'rounded edge shape occurrence') AND
               (SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PARTIAL_CIRCULAR_PROFILE'
               IN TYPEOF(sdr.relating_shape_aspect)) AND (sdr.
              relating_shape_aspect.description = 'rounded edge shape'))) =
               1))) = 1))) = 0);
    WR8: NOT (SELF\characterized_object.description = 'groove') OR (SIZEOF(
              QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'sweep occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SQUARE_U_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PARTIAL_CIRCULAR_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROUNDED_U_PROFILE'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VEE_PROFILE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEE_PROFILE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OPEN_PATH_PROFILE'
               ] * TYPEOF(sdr.relating_shape_aspect)) = 1) AND (sdr.
              relating_shape_aspect.description = 'sweep'))) = 1))) = 1))) 
              = 0);
    WR9: SIZEOF(QUERY (pdr <* get_property_definition_representations(SELF)
              | (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'maximum feature limit'))) >= 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY rib_top
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'rib top condition occurrence') AND 
              (SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'rib top usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RIB_TOP_FLOOR' 
              IN TYPEOF(sdr.relating_shape_aspect)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RIB_TOP' IN 
              TYPEOF(sdr.related_shape_aspect.of_shape.definition)))) = 1))
              ) = 1))) = 0;
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'removal direction'))) = 1))) = 1;
    WR3: SIZEOF(QUERY (pdr <* get_property_definition_representations(SELF)
              | (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'maximum feature limit'))) >= 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY rib_top_floor
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_DEFINITION'
               IN TYPEOF(SELF.of_shape.definition);
    WR2: SELF.description IN [ 'planar', 'complex' ];
    WR3: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| (sar.description = 'rib top usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| ((fcr.related_shape_aspect.description = 
              'rib top condition occurrence') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RIB_TOP' IN 
              TYPEOF(fcr.related_shape_aspect.of_shape.definition))) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RIB_TOP_FLOOR' 
              IN TYPEOF(fcr.relating_shape_aspect)))) >= 1;
    WR4: NOT (SELF.description = 'complex') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'rib top face'))) = 1))) = 0);
    WR5: NOT (SELF.description = 'planar') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'rib top face'))) = 1))) = 0);
    WR6: NOT (SELF.description = 'planar') OR (SIZEOF(QUERY (pds <* QUERY (
              pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'boundary occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_CLOSED_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NGON_CLOSED_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_CLOSED_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CLOSED_PATH_PROFILE'
               ] * TYPEOF(sdr.relating_shape_aspect)) = 1) AND (sdr.
              relating_shape_aspect.description = 'rib top floor boundary')
              )) = 1))) = 1))) = 0);
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY right_angular_wedge
  SUBTYPE OF (geometric_representation_item);
    position : axis2_placement_3d;
    x        : positive_length_measure;
    y        : positive_length_measure;
    z        : positive_length_measure;
    ltx      : length_measure;
  WHERE
    WR1: (0.0 <= ltx) AND (ltx < x);
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY right_circular_cone
  SUBTYPE OF (geometric_representation_item);
    position   : axis1_placement;
    height     : positive_length_measure;
    radius     : length_measure;
    semi_angle : plane_angle_measure;
  WHERE
    WR1: radius >= 0.0;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY right_circular_cylinder
  SUBTYPE OF (geometric_representation_item);
    position : axis1_placement;
    height   : positive_length_measure;
    radius   : positive_length_measure;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY right_to_usage_association
  SUBTYPE OF (action_method_relationship);
    SELF\action_method_relationship.relating_method : 
                         information_usage_right;
    SELF\action_method_relationship.related_method : information_right;
  DERIVE
    right_applied : information_right := SELF\action_method_relationship.
                       related_method;
    right_usage   : information_usage_right := SELF\
                       action_method_relationship.relating_method;
END_ENTITY; -- 10303-1241: information_rights_mim

ENTITY rigid_link_representation
  SUBTYPE OF (kinematic_link_representation);
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY role_association;
    role           : object_role;
    item_with_role : role_select;
END_ENTITY; -- 10303-41: basic_attribute_schema

ENTITY rolling_curve_pair
  SUBTYPE OF (planar_curve_pair);
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY rolling_curve_pair_value
  SUBTYPE OF (pair_value);
    SELF\pair_value.applies_to_pair : rolling_curve_pair;
    actual_point_on_curve_1 : point_on_curve;
  WHERE
    WR1: SELF\pair_value.applies_to_pair\planar_curve_pair.curve_1 :=: 
              actual_point_on_curve_1.basis_curve;
END_ENTITY; -- 10303-105: kinematic_state_schema

ENTITY rolling_surface_pair
  SUBTYPE OF (surface_pair);
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY rolling_surface_pair_value
  SUBTYPE OF (pair_value);
    SELF\pair_value.applies_to_pair : rolling_surface_pair;
    actual_point_on_surface : point_on_surface;
    actual_rotation         : plane_angle_measure;
  WHERE
    WR1: SELF\pair_value.applies_to_pair\surface_pair.surface_1 :=: 
              actual_point_on_surface.basis_surface;
END_ENTITY; -- 10303-105: kinematic_state_schema

ENTITY rotation_about_direction
  SUBTYPE OF (geometric_representation_item);
    direction_of_axis : direction;
    rotation_angle    : plane_angle_measure;
  WHERE
    WR1: SIZEOF(direction_of_axis.direction_ratios) = 3;
END_ENTITY; -- 10303-105: kinematic_state_schema

ENTITY round_hole
  SUPERTYPE OF (ONEOF(basic_round_hole, explicit_round_hole))
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPLICIT_ROUND_HOLE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BASIC_ROUND_HOLE'
               ] * TYPEOF(SELF)) = 1) XOR (SIZEOF(QUERY (pds <* QUERY (pd 
              <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'diameter occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_CLOSED_PROFILE'
               IN TYPEOF(sdr.relating_shape_aspect)) AND (sdr.name = 
              'diameter'))) = 1))) = 1))) = 0);
    WR2: (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPLICIT_ROUND_HOLE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BASIC_ROUND_HOLE'
               ] * TYPEOF(SELF)) = 1) XOR (SIZEOF(QUERY (pds <* QUERY (pd 
              <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'hole depth occurrence') AND (SIZEOF
              (QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'path feature component usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PATH_FEATURE_COMPONENT'
               IN TYPEOF(sdr.relating_shape_aspect)) AND (sdr.name = 
              'hole depth')) AND (sdr.relating_shape_aspect.description = 
              'linear'))) = 1))) = 1))) = 0);
    WR3: (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPLICIT_ROUND_HOLE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BASIC_ROUND_HOLE'
               ] * TYPEOF(SELF)) = 1) XOR (SIZEOF(QUERY (pds <* QUERY (pd 
              <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'bottom condition occurrence') AND (
              SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'hole bottom usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.HOLE_BOTTOM' IN 
              TYPEOF(fcr.relating_shape_aspect)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROUND_HOLE' IN 
              TYPEOF(fcr.related_shape_aspect.of_shape.definition)))) = 1))
              ) = 1))) = 0);
    WR4: (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPLICIT_ROUND_HOLE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BASIC_ROUND_HOLE'
               ] * TYPEOF(SELF)) = 1) XOR (SIZEOF(QUERY (pds <* QUERY (pd 
              <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'change in diameter occurrence') AND
               (SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'taper usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TAPER' IN TYPEOF
              (fcr.relating_shape_aspect)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROUND_HOLE' IN 
              TYPEOF(fcr.related_shape_aspect.of_shape.definition)))) = 1))
              ) <= 1))) = 0);
    WR5: (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPLICIT_ROUND_HOLE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BASIC_ROUND_HOLE'
               ] * TYPEOF(SELF)) = 1) XOR (SIZEOF(QUERY (pdr <* 
              get_property_definition_representations(SELF)| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1);
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY rounded_end
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 1))) = 0))) = 0;
    WR2: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 
              'partial circular boundary occurrence') AND (SIZEOF(QUERY (
              sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PARTIAL_CIRCULAR_PROFILE'
               IN TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'course of travel occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'path feature component usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PATH_FEATURE_COMPONENT'
               IN TYPEOF(sdr.relating_shape_aspect)) AND (sdr.
              relating_shape_aspect.description = 'linear'))) = 1))) = 1)))
               = 0;
    WR4: SIZEOF(QUERY (pdr <* get_property_definition_representations(SELF)
              | (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'maximum feature limit'))) >= 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY rounded_u_profile
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_DEFINITION'
               IN TYPEOF(SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) >= 1) AND (SIZEOF(impl_rep.
              used_representation.items) <= 2))) = 0))) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND (SIZEOF(QUERY (
              srwp_i <* pdr.used_representation.items| (srwp_i.name = 
              'orientation') OR (srwp_i.name = 'depth'))) = SIZEOF(pdr.
              used_representation.items)))) = 1))) = 1;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'width'))) = 1))) = 0)))
               = 0;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'profile limit'))) <= 1))) = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'depth'))) <= 1))) = 0))
              ) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY roundness_tolerance
  SUBTYPE OF (geometric_tolerance);
  WHERE
    WR1: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE'
               IN TYPEOF(SELF));
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY row_representation_item
  SUBTYPE OF (compound_representation_item);
    SELF\compound_representation_item.item_element : 
                      list_representation_item;
END_ENTITY; -- 10303-1654: characteristic_mim

ENTITY ruled_surface_swept_area_solid
  SUBTYPE OF (surface_curve_swept_area_solid);
  WHERE
    WR1: ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_SURFACE' IN
               TYPEOF(SELF.reference_surface)) AND (SELF.reference_surface\
              b_spline_surface.u_degree = 1);
    WR2: ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PCURVE' IN TYPEOF(
              SELF.directrix)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_CURVE' 
              IN TYPEOF(SELF.directrix\surface_curve.curve_3d)) AND (SELF.
              directrix\surface_curve.curve_3d\b_spline_curve.degree = SELF
              .reference_surface\b_spline_surface.v_degree);
END_ENTITY; -- 10303-523: aic_curve_swept_solid

ENTITY runout_zone_definition
  SUBTYPE OF (tolerance_zone_definition);
    orientation : runout_zone_orientation;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY runout_zone_orientation;
    angle : plane_angle_measure_with_unit;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY runout_zone_orientation_reference_direction
  SUBTYPE OF (runout_zone_orientation);
    orientation_defining_relationship : shape_aspect_relationship;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY satisfied_requirement
  SUBTYPE OF (group_assignment);
    SELF\group_assignment.assigned_group : satisfies_requirement;
    items          : SET [1:1] OF product_definition;
END_ENTITY; -- 10303-1233: requirement_assignment_mim

ENTITY satisfies_requirement
  SUBTYPE OF (group);
END_ENTITY; -- 10303-1233: requirement_assignment_mim

ENTITY satisfying_item
  SUBTYPE OF (group_assignment);
    SELF\group_assignment.assigned_group : satisfies_requirement;
    items          : SET [1:1] OF requirement_satisfaction_item;
END_ENTITY; -- 10303-1233: requirement_assignment_mim

ENTITY scan_3d_model
  SUBTYPE OF (scanned_data_item);
    scanner_info   : SET [1:?] OF scanner_property;
    scanned_points : SET [1:?] OF scanned_data_item;
  WHERE
    WR1: SIZEOF(QUERY (tmp <* scanned_points| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SCAN_3D_MODEL' 
              IN TYPEOF(tmp)))) = 0;
END_ENTITY; -- 10303-42: scan_data_3d_shape_model_schema

ENTITY scan_data_shape_representation
  SUBTYPE OF (shape_representation);
    SELF\representation.items : SET [1:?] OF scanned_data_item;
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GLOBAL_UNIT_ASSIGNED_CONTEXT'
               IN TYPEOF(SELF\representation.context_of_items);
END_ENTITY; -- 10303-42: scan_data_3d_shape_model_schema

ENTITY scanned_data_item
  SUPERTYPE OF (ONEOF(point_cloud_dataset, point_cloud_superdataset, 
      triangulated_point_cloud_dataset, scan_3d_model))
  SUBTYPE OF (geometric_representation_item);
  WHERE
    WR1: SIZEOF(QUERY (using_rep <* using_representations(SELF)| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SCAN_DATA_SHAPE_REPRESENTATION'
               IN TYPEOF(using_rep)))) = 0;
END_ENTITY; -- 10303-42: scan_data_3d_shape_model_schema

ENTITY scanner_basic_properties
  SUBTYPE OF (scanner_property);
    scanner_identification : label;
    scanner_location       : axis2_placement_3d;
    scanner_uncertainty    : OPTIONAL positive_length_measure;
END_ENTITY; -- 10303-42: scan_data_3d_shape_model_schema

ENTITY scanner_property
  ABSTRACT SUPERTYPE
  SUBTYPE OF (representation_item);
END_ENTITY; -- 10303-42: scan_data_3d_shape_model_schema

ENTITY screw_pair
  SUBTYPE OF (low_order_kinematic_pair_with_motion_coupling);
    pitch : length_measure;
  WHERE
    WR1: SIZEOF(QUERY (lr <* SELF\kinematic_pair.
              associated_link_representations_1| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RIGID_LINK_REPRESENTATION'
               IN TYPEOF(lr)))) = 0;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY screw_pair_value
  SUBTYPE OF (pair_value);
    SELF\pair_value.applies_to_pair : screw_pair;
    actual_rotation : plane_angle_measure;
  DERIVE
    actual_translation : length_measure := SELF\pair_value.applies_to_pair\
                            screw_pair.pitch * 
                            plane_angle_for_pair_in_radian(SELF\pair_value.
                            applies_to_pair, actual_rotation) / 2 * PI;
END_ENTITY; -- 10303-105: kinematic_state_schema

ENTITY screw_pair_with_range
  SUBTYPE OF (screw_pair);
    lower_limit_actual_rotation : OPTIONAL plane_angle_measure;
    upper_limit_actual_rotation : OPTIONAL plane_angle_measure;
  WHERE
    WR1: (NOT EXISTS(lower_limit_actual_rotation) OR NOT EXISTS(
              upper_limit_actual_rotation)) XOR (
              lower_limit_actual_rotation < upper_limit_actual_rotation);
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY seam_curve
  SUBTYPE OF (surface_curve);
  WHERE
    WR1: SIZEOF(SELF\surface_curve.associated_geometry) = 2;
    WR2: associated_surface(SELF\surface_curve.associated_geometry[1]) = 
              associated_surface(SELF\surface_curve.associated_geometry[2])
              ;
    WR3: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PCURVE' IN TYPEOF(
              SELF\surface_curve.associated_geometry[1]);
    WR4: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PCURVE' IN TYPEOF(
              SELF\surface_curve.associated_geometry[2]);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY seam_edge
  SUBTYPE OF (oriented_edge);
    pcurve_reference : pcurve;
  WHERE
    WR1: ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_CURVE' IN 
              TYPEOF(edge_element)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SEAM_CURVE' IN 
              TYPEOF(edge_element\edge_curve.edge_geometry));
    WR2: pcurve_reference IN edge_element\edge_curve.edge_geometry\
              surface_curve.associated_geometry;
END_ENTITY; -- 10303-42: topology_schema

ENTITY security_classification;
    name           : label;
    purpose        : text;
    security_level : security_classification_level;
END_ENTITY; -- 10303-41: security_classification_schema

ENTITY security_classification_assignment
  ABSTRACT SUPERTYPE;
    assigned_security_classification : security_classification;
  DERIVE
    role : object_role := get_role(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROLE_ASSOCIATION.ITEM_WITH_ROLE'
              )) <= 1;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY security_classification_level;
    name : label;
END_ENTITY; -- 10303-41: security_classification_schema

ENTITY selector_function
  SUBTYPE OF (maths_function, generic_literal);
    selector         : input_selector;
    source_of_domain : maths_space_or_function;
  WHERE
    WR1: no_cyclic_domain_reference(source_of_domain, [ SELF ]);
    WR2: expression_is_constant(domain_from(source_of_domain));
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY sequential_method
  SUBTYPE OF (serial_action_method);
    sequence_position : count_measure;
END_ENTITY; -- 10303-49: method_definition_schema

ENTITY serial_action_method
  SUBTYPE OF (action_method_relationship);
END_ENTITY; -- 10303-49: method_definition_schema

ENTITY serial_numbered_effectivity
  SUBTYPE OF (effectivity);
    effectivity_start_id : identifier;
    effectivity_end_id   : OPTIONAL identifier;
END_ENTITY; -- 10303-41: effectivity_schema

ENTITY series_composed_function
  SUBTYPE OF (maths_function, multiple_arity_generic_expression);
    SELF\multiple_arity_generic_expression.operands : LIST [2:?] OF 
                  maths_function;
  WHERE
    WR1: composable_sequence(SELF\multiple_arity_generic_expression.
              operands);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY shape_aspect
  SUPERTYPE OF ((ONEOF(contacting_feature, datum, datum_feature, 
      datum_target, datum_system, general_datum_reference) ANDOR ONEOF(
      shape_aspect_occurrence)) ANDOR constituent_shape_aspect);
    name                 : label;
    description          : OPTIONAL text;
    of_shape             : product_definition_shape;
    product_definitional : LOGICAL;
  DERIVE
    id : identifier := get_id_value(SELF);
  UNIQUE
    UR1: id, of_shape;
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ID_ATTRIBUTE.IDENTIFIED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: product_property_definition_schema

ENTITY shape_aspect_associativity
  SUBTYPE OF (shape_aspect_relationship);
  WHERE
    WR1: SELF.relating_shape_aspect.product_definitional;
    WR2: NOT SELF.related_shape_aspect.product_definitional;
END_ENTITY; -- 10303-520: aic_associative_draughting_elements

ENTITY shape_aspect_deriving_relationship
  SUBTYPE OF (shape_aspect_relationship);
    SELF\shape_aspect_relationship.relating_shape_aspect : 
                               derived_shape_aspect;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY shape_aspect_occurrence
  SUBTYPE OF (shape_aspect);
    definition : shape_aspect_or_characterized_object;
  WHERE
    WR1: acyclic_shape_aspect_occurrence(SELF, definition);
END_ENTITY; -- 10303-41: product_property_definition_schema

ENTITY shape_aspect_relationship;
    name                  : label;
    description           : OPTIONAL text;
    relating_shape_aspect : shape_aspect;
    related_shape_aspect  : shape_aspect;
  DERIVE
    id : identifier := get_id_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ID_ATTRIBUTE.IDENTIFIED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-41: product_property_definition_schema

ENTITY shape_defining_relationship
  SUBTYPE OF (shape_aspect_relationship);
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY shape_definition_representation
  SUBTYPE OF (property_definition_representation);
    SELF\property_definition_representation.definition : 
                             property_definition;
    SELF\property_definition_representation.used_representation : 
                             shape_representation;
  WHERE
    WR1: (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(definition)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINITION'
               IN TYPEOF(definition\property_definition.definition));
END_ENTITY; -- 10303-41: product_property_representation_schema

ENTITY shape_dimension_representation
  SUBTYPE OF (shape_representation);
    SELF\representation.items : SET [1:?] OF 
               shape_dimension_representation_item;
END_ENTITY; -- 10303-47: shape_dimension_schema

ENTITY shape_feature_definition
  SUBTYPE OF (feature_definition);
END_ENTITY; -- 10303-1764: shape_feature_mim

ENTITY shape_feature_definition_element_relationship
  SUBTYPE OF (shape_aspect_relationship, characterized_object);
  DERIVE
    SELF\characterized_object.name : label := SELF\
                     shape_aspect_relationship.name;
    SELF\characterized_object.description : text := SELF\
                     shape_aspect_relationship.description;
END_ENTITY; -- 10303-1764: shape_feature_mim

ENTITY shape_feature_definition_relationship
  SUBTYPE OF (characterized_object_relationship, characterized_object);
    SELF\characterized_object_relationship.relating_object : 
                         shape_feature_definition;
    SELF\characterized_object_relationship.related_object : 
                         shape_feature_definition;
  DERIVE
    SELF\characterized_object.name : label := SELF\
                     characterized_object_relationship.name;
    SELF\characterized_object.description : text := SELF\
                     characterized_object_relationship.description;
END_ENTITY; -- 10303-1764: shape_feature_mim

ENTITY shape_representation
  SUBTYPE OF (representation);
END_ENTITY; -- 10303-41: product_property_representation_schema

ENTITY shape_representation_reference
  SUBTYPE OF (representation_reference);
END_ENTITY; -- 10303-41: product_property_representation_schema

ENTITY shape_representation_relationship
  SUBTYPE OF (representation_relationship);
  WHERE
    WR1: SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_REFERENCE'
               ] * (TYPEOF(SELF\representation_relationship.rep_1) + TYPEOF
              (SELF\representation_relationship.rep_2))) >= 1;
END_ENTITY; -- 10303-41: product_property_representation_schema

ENTITY shape_representation_with_parameters
  SUBTYPE OF (shape_representation);
    SELF\representation.items : SET [1:?] OF 
               shape_representation_with_parameters_items;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY shell_based_surface_model
  SUBTYPE OF (geometric_representation_item);
    sbsm_boundary : SET [1:?] OF shell;
  WHERE
    WR1: constraints_geometry_shell_based_surface_model(SELF);
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY shell_based_wireframe_model
  SUBTYPE OF (geometric_representation_item);
    sbwm_boundary : SET [1:?] OF shell;
  WHERE
    WR1: constraints_geometry_shell_based_wireframe_model(SELF);
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY shell_based_wireframe_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(QUERY (it <* SELF.items| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_3D'
               ] * TYPEOF(it)) = 1))) = 0;
    WR2: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' ]
               * TYPEOF(it)) = 1))) >= 1;
    WR3: SIZEOF(QUERY (sbwm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (ws <* QUERY (sb <* sbwm\
              shell_based_wireframe_model.sbwm_boundary| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.WIRE_SHELL' IN 
              TYPEOF(sb)))| NOT (SIZEOF(QUERY (eloop <* QUERY (wsb <* ws\
              wire_shell.wire_shell_extent| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(wsb)))| NOT (SIZEOF(QUERY (el <* eloop\path.edge_list|
               NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_CURVE' IN 
              TYPEOF(el.edge_element)))) = 0))) = 0))) = 0))) = 0;
    WR4: SIZEOF(QUERY (sbwm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (ws <* QUERY (sb <* sbwm\
              shell_based_wireframe_model.sbwm_boundary| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.WIRE_SHELL' IN 
              TYPEOF(sb)))| NOT (SIZEOF(QUERY (eloop <* QUERY (wsb <* ws\
              wire_shell.wire_shell_extent| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(wsb)))| NOT (SIZEOF(QUERY (pline_el <* QUERY (el <* 
              eloop\path.edge_list| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE' IN 
              TYPEOF(el.edge_element\edge_curve.edge_geometry)))| NOT (
              SIZEOF(pline_el.edge_element\edge_curve.edge_geometry\
              polyline.points) > 2))) = 0))) = 0))) = 0))) = 0;
    WR5: SIZEOF(QUERY (sbwm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (ws <* QUERY (sb <* sbwm\
              shell_based_wireframe_model.sbwm_boundary| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.WIRE_SHELL' IN 
              TYPEOF(sb)))| NOT (SIZEOF(QUERY (eloop <* QUERY (wsb <* ws\
              wire_shell.wire_shell_extent| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(wsb)))| NOT (SIZEOF(QUERY (el <* eloop\path.edge_list|
               NOT valid_wireframe_edge_curve(el.edge_element\edge_curve.
              edge_geometry))) = 0))) = 0))) = 0))) = 0;
    WR6: SIZEOF(QUERY (sbwm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (ws <* QUERY (sb <* sbwm\
              shell_based_wireframe_model.sbwm_boundary| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.WIRE_SHELL' IN 
              TYPEOF(sb)))| NOT (SIZEOF(QUERY (eloop <* QUERY (wsb <* ws\
              wire_shell.wire_shell_extent| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(wsb)))| NOT (SIZEOF(QUERY (el <* eloop\path.edge_list|
               NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_POINT' IN
               TYPEOF(el.edge_element.edge_start)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_POINT' IN
               TYPEOF(el.edge_element.edge_end))))) = 0))) = 0))) = 0))) = 
              0;
    WR7: SIZEOF(QUERY (sbwm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (ws <* QUERY (sb <* sbwm\
              shell_based_wireframe_model.sbwm_boundary| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.WIRE_SHELL' IN 
              TYPEOF(sb)))| NOT (SIZEOF(QUERY (eloop <* QUERY (wsb <* ws\
              wire_shell.wire_shell_extent| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(wsb)))| NOT (SIZEOF(QUERY (el <* eloop\path.edge_list|
               NOT (valid_wireframe_vertex_point(el.edge_element.edge_start
              \vertex_point.vertex_geometry) AND 
              valid_wireframe_vertex_point(el.edge_element.edge_end\
              vertex_point.vertex_geometry)))) = 0))) = 0))) = 0))) = 0;
    WR8: SIZEOF(QUERY (sbwm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (ws <* QUERY (sb <* sbwm\
              shell_based_wireframe_model.sbwm_boundary| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.WIRE_SHELL' IN 
              TYPEOF(sb)))| NOT (SIZEOF(QUERY (vloop <* QUERY (wsb <* ws\
              wire_shell.wire_shell_extent| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_LOOP' IN 
              TYPEOF(wsb)))| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_POINT' IN
               TYPEOF(vloop\vertex_loop.loop_vertex)))) = 0))) = 0))) = 0;
    WR9: SIZEOF(QUERY (sbwm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (ws <* QUERY (sb <* sbwm\
              shell_based_wireframe_model.sbwm_boundary| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.WIRE_SHELL' IN 
              TYPEOF(sb)))| NOT (SIZEOF(QUERY (vloop <* QUERY (wsb <* ws\
              wire_shell.wire_shell_extent| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_LOOP' IN 
              TYPEOF(wsb)))| NOT valid_wireframe_vertex_point(vloop\
              vertex_loop.loop_vertex\vertex_point.vertex_geometry))) = 0))
              ) = 0))) = 0;
    WR10: SIZEOF(QUERY (sbwm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (vs <* QUERY (sb <* sbwm\
              shell_based_wireframe_model.sbwm_boundary| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_SHELL' IN
               TYPEOF(sb)))| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_POINT' IN
               TYPEOF(vs\vertex_shell.vertex_shell_extent.loop_vertex)))) =
               0))) = 0;
    WR11: SIZEOF(QUERY (sbwm <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_WIREFRAME_MODEL'
               IN TYPEOF(it)))| NOT (SIZEOF(QUERY (vs <* QUERY (sb <* sbwm\
              shell_based_wireframe_model.sbwm_boundary| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_SHELL' IN
               TYPEOF(sb)))| NOT valid_wireframe_vertex_point(vs\
              vertex_shell.vertex_shell_extent.loop_vertex\vertex_point.
              vertex_geometry))) = 0))) = 0;
    WR12: SIZEOF(QUERY (mi <* QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(it)))| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL_BASED_WIREFRAME_SHAPE_REPRESENTATION'
               IN TYPEOF(mi\mapped_item.mapping_source.
              mapped_representation)))) = 0;
    WR13: SELF.context_of_items\geometric_representation_context.
              coordinate_space_dimension = 3;
END_ENTITY; -- 10303-502: aic_shell_based_wireframe

ENTITY si_absorbed_dose_unit
  SUBTYPE OF (absorbed_dose_unit, si_unit);
  WHERE
    WR1: SELF\si_unit.name = si_unit_name.gray;
    WR2: NOT EXISTS(SELF\derived_unit.name);
END_ENTITY; -- 10303-41: measure_schema

ENTITY si_capacitance_unit
  SUBTYPE OF (capacitance_unit, si_unit);
  WHERE
    WR1: SELF\si_unit.name = si_unit_name.farad;
    WR2: NOT EXISTS(SELF\derived_unit.name);
END_ENTITY; -- 10303-41: measure_schema

ENTITY si_conductance_unit
  SUBTYPE OF (conductance_unit, si_unit);
  WHERE
    WR1: SELF\si_unit.name = si_unit_name.siemens;
    WR2: NOT EXISTS(SELF\derived_unit.name);
END_ENTITY; -- 10303-41: measure_schema

ENTITY si_dose_equivalent_unit
  SUBTYPE OF (dose_equivalent_unit, si_unit);
  WHERE
    WR1: SELF\si_unit.name = si_unit_name.sievert;
    WR2: NOT EXISTS(SELF\derived_unit.name);
END_ENTITY; -- 10303-41: measure_schema

ENTITY si_electric_charge_unit
  SUBTYPE OF (electric_charge_unit, si_unit);
  WHERE
    WR1: SELF\si_unit.name = si_unit_name.coulomb;
    WR2: NOT EXISTS(SELF\derived_unit.name);
END_ENTITY; -- 10303-41: measure_schema

ENTITY si_electric_potential_unit
  SUBTYPE OF (electric_potential_unit, si_unit);
  WHERE
    WR1: SELF\si_unit.name = si_unit_name.volt;
    WR2: NOT EXISTS(SELF\derived_unit.name);
END_ENTITY; -- 10303-41: measure_schema

ENTITY si_energy_unit
  SUBTYPE OF (energy_unit, si_unit);
  WHERE
    WR1: SELF\si_unit.name = si_unit_name.joule;
    WR2: NOT EXISTS(SELF\derived_unit.name);
END_ENTITY; -- 10303-41: measure_schema

ENTITY si_force_unit
  SUBTYPE OF (force_unit, si_unit);
  WHERE
    WR1: SELF\si_unit.name = si_unit_name.newton;
    WR2: NOT EXISTS(SELF\derived_unit.name);
END_ENTITY; -- 10303-41: measure_schema

ENTITY si_frequency_unit
  SUBTYPE OF (frequency_unit, si_unit);
  WHERE
    WR1: SELF\si_unit.name = si_unit_name.hertz;
    WR2: NOT EXISTS(SELF\derived_unit.name);
END_ENTITY; -- 10303-41: measure_schema

ENTITY si_illuminance_unit
  SUBTYPE OF (illuminance_unit, si_unit);
  WHERE
    WR1: SELF\si_unit.name = si_unit_name.lux;
    WR2: NOT EXISTS(SELF\derived_unit.name);
END_ENTITY; -- 10303-41: measure_schema

ENTITY si_inductance_unit
  SUBTYPE OF (inductance_unit, si_unit);
  WHERE
    WR1: SELF\si_unit.name = si_unit_name.henry;
    WR2: NOT EXISTS(SELF\derived_unit.name);
END_ENTITY; -- 10303-41: measure_schema

ENTITY si_magnetic_flux_density_unit
  SUBTYPE OF (magnetic_flux_density_unit, si_unit);
  WHERE
    WR1: SELF\si_unit.name = si_unit_name.tesla;
    WR2: NOT EXISTS(SELF\derived_unit.name);
END_ENTITY; -- 10303-41: measure_schema

ENTITY si_magnetic_flux_unit
  SUBTYPE OF (magnetic_flux_unit, si_unit);
  WHERE
    WR1: SELF\si_unit.name = si_unit_name.weber;
    WR2: NOT EXISTS(SELF\derived_unit.name);
END_ENTITY; -- 10303-41: measure_schema

ENTITY si_power_unit
  SUBTYPE OF (power_unit, si_unit);
  WHERE
    WR1: SELF\si_unit.name = si_unit_name.watt;
    WR2: NOT EXISTS(SELF\derived_unit.name);
END_ENTITY; -- 10303-41: measure_schema

ENTITY si_pressure_unit
  SUBTYPE OF (pressure_unit, si_unit);
  WHERE
    WR1: SELF\si_unit.name = si_unit_name.pascal;
    WR2: NOT EXISTS(SELF\derived_unit.name);
END_ENTITY; -- 10303-41: measure_schema

ENTITY si_radioactivity_unit
  SUBTYPE OF (radioactivity_unit, si_unit);
  WHERE
    WR1: SELF\si_unit.name = si_unit_name.becquerel;
    WR2: NOT EXISTS(SELF\derived_unit.name);
END_ENTITY; -- 10303-41: measure_schema

ENTITY si_resistance_unit
  SUBTYPE OF (resistance_unit, si_unit);
  WHERE
    WR1: SELF\si_unit.name = si_unit_name.ohm;
    WR2: NOT EXISTS(SELF\derived_unit.name);
END_ENTITY; -- 10303-41: measure_schema

ENTITY si_unit
  SUBTYPE OF (named_unit);
    prefix : OPTIONAL si_prefix;
    name   : si_unit_name;
  DERIVE
    SELF\named_unit.dimensions : dimensional_exponents := 
                    dimensions_for_si_unit(name);
  WHERE
    WR1: NOT (('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MASS_UNIT' IN 
              TYPEOF(SELF)) AND (SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DERIVED_UNIT_ELEMENT.UNIT'
              )) > 0)) OR (prefix = si_prefix.kilo);
END_ENTITY; -- 10303-41: measure_schema

ENTITY side_milling_operation
  SUBTYPE OF (milling_type_operation);
  WHERE
    WR1: SELF.description IN [ 'roughing', 'finishing' ];
    WR2: verify_optional_action_property(SELF, 'axial cutting depth') AND 
              verify_length_measure_action_property(SELF, 
              'axial cutting depth');
    WR3: verify_optional_action_property(SELF, 'radial cutting depth') AND 
              verify_length_measure_action_property(SELF, 
              'radial cutting depth');
    WR4: verify_optional_action_property(SELF, 'allowance side') AND 
              verify_length_measure_action_property(SELF, 'allowance side')
              ;
    WR5: NOT (SELF.description = 'roughing') OR 
              verify_required_action_property(SELF, 'allowance side');
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY simple_boolean_expression
  ABSTRACT SUPERTYPE OF (ONEOF(boolean_literal, boolean_variable))
  SUBTYPE OF (boolean_expression, simple_generic_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY simple_generic_expression
  ABSTRACT SUPERTYPE OF (ONEOF(generic_literal, generic_variable))
  SUBTYPE OF (generic_expression);
END_ENTITY; -- 13584-20: iso13584_generic_expressions_schema

ENTITY simple_numeric_expression
  ABSTRACT SUPERTYPE OF (ONEOF(literal_number, numeric_variable))
  SUBTYPE OF (numeric_expression, simple_generic_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY simple_string_expression
  ABSTRACT SUPERTYPE OF (ONEOF(string_literal, string_variable))
  SUBTYPE OF (string_expression, simple_generic_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY simplified_counterbore_hole_definition
  SUBTYPE OF (counterbore_hole_definition);
  WHERE
    WR1: SIZEOF(SELF\explicit_composite_hole.placement\representation.items
              ) = 1;
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY simplified_counterdrill_hole_definition
  SUBTYPE OF (counterdrill_hole_definition);
  WHERE
    WR1: SIZEOF(SELF\explicit_composite_hole.placement\representation.items
              ) = 1;
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY simplified_countersink_hole_definition
  SUBTYPE OF (countersink_hole_definition);
  WHERE
    WR1: SIZEOF(SELF\explicit_composite_hole.placement\representation.items
              ) = 1;
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY simplified_spotface_hole_definition
  SUBTYPE OF (spotface_hole_definition, 
      simplified_counterbore_hole_definition);
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY sin_function
  SUBTYPE OF (unary_function_call);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY single_property_is_definition
  SUBTYPE OF (property_definition);
    SELF\property_definition.definition : product_definition;
  UNIQUE
    UR1: definition;
END_ENTITY; -- 10303-1399: property_as_definition_mim

ENTITY slash_expression
  SUBTYPE OF (binary_numeric_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY sliding_curve_pair
  SUBTYPE OF (planar_curve_pair);
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY sliding_curve_pair_value
  SUBTYPE OF (pair_value);
    SELF\pair_value.applies_to_pair : sliding_curve_pair;
    actual_point_on_curve_1 : point_on_curve;
    actual_point_on_curve_2 : point_on_curve;
  WHERE
    WR1: SELF\pair_value.applies_to_pair\planar_curve_pair.curve_1 :=: 
              actual_point_on_curve_1.basis_curve;
    WR2: SELF\pair_value.applies_to_pair\planar_curve_pair.curve_2 :=: 
              actual_point_on_curve_2.basis_curve;
END_ENTITY; -- 10303-105: kinematic_state_schema

ENTITY sliding_surface_pair
  SUBTYPE OF (surface_pair);
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY sliding_surface_pair_value
  SUBTYPE OF (pair_value);
    SELF\pair_value.applies_to_pair : sliding_surface_pair;
    actual_point_on_surface_1 : point_on_surface;
    actual_point_on_surface_2 : point_on_surface;
    actual_rotation           : plane_angle_measure;
  WHERE
    WR1: SELF\pair_value.applies_to_pair\surface_pair.surface_1 :=: 
              actual_point_on_surface_1.basis_surface;
    WR2: SELF\pair_value.applies_to_pair\surface_pair.surface_2 :=: 
              actual_point_on_surface_2.basis_surface;
END_ENTITY; -- 10303-105: kinematic_state_schema

ENTITY slot
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 1))) = 0))) = 0;
    WR2: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'swept shape occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SQUARE_U_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PARTIAL_CIRCULAR_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROUNDED_U_PROFILE'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VEE_PROFILE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEE_PROFILE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OPEN_PATH_PROFILE'
               ] * TYPEOF(sdr.relating_shape_aspect)) = 1))) = 1))) = 1))) 
              = 0;
    WR3: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'course of travel occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'path feature component usage') AND ((
              sar.name = 'course of travel') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar))))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PATH_FEATURE_COMPONENT'
               IN TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0;
    WR4: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT ((SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'end condition occurrence') AND (
              SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| ((sar.description = 'slot end usage') AND (sar.name IN [ 
              'course of travel start', 'course of travel end' ])) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SLOT_END' IN 
              TYPEOF(fcr.relating_shape_aspect)) AND (fcr.
              relating_shape_aspect.description IN [ 'open', 'radiused', 
              'flat', 'woodruff' ])) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SLOT' IN TYPEOF(
              fcr.related_shape_aspect.of_shape.definition)))) = 1))) = 2) 
              OR (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'end condition occurrence') AND (
              SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| ((sar.description = 'slot end usage') AND (sar.name IN [ 
              'course of travel start', 'course of travel end' ])) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SLOT_END' IN 
              TYPEOF(fcr.relating_shape_aspect)) AND (fcr.
              relating_shape_aspect.description IN [ 'loop' ])) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SLOT' IN TYPEOF(
              fcr.related_shape_aspect.of_shape.definition)))) = 1))) = 1))
              )) = 0;
    WR5: NOT (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'end condition occurrence') AND (
              SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| ((sar.description = 'slot end usage') AND (sar.name IN [ 
              'course of travel start', 'course of travel end' ])) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SLOT_END' IN 
              TYPEOF(fcr.relating_shape_aspect)) AND (fcr.
              relating_shape_aspect.description IN [ 'loop' ])) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SLOT' IN TYPEOF(
              fcr.related_shape_aspect.of_shape.definition)))) = 1))) = 1))
              ) = 0) OR (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'course of travel occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'path feature component usage') AND ((
              sar.name = 'course of travel') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar))))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PATH_FEATURE_COMPONENT'
               IN TYPEOF(sdr.relating_shape_aspect)) AND (sdr.
              relating_shape_aspect.description IN [ 'complex', 
              'complete circular' ]))) = 1))) = 1))) = 0);
    WR6: SIZEOF(QUERY (pdr <* get_property_definition_representations(SELF)
              | (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'maximum feature limit'))) >= 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY slot_end
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_DEFINITION'
               IN TYPEOF(SELF.of_shape.definition);
    WR2: SELF.description IN [ 'open', 'radiused', 'flat', 'woodruff', 
              'loop' ];
    WR3: NOT (SELF.description IN [ 'open', 'radiused', 'loop' ]) OR (
              SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 0))) = 0);
    WR4: NOT (SELF.description IN [ 'flat', 'woodruff' ]) OR (SIZEOF(QUERY 
              (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0);
    WR5: NOT (SELF.description IN [ 'flat' ]) OR (SIZEOF(QUERY (pd <* 
              USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 2))) = 0))) = 0);
    WR6: NOT (SELF.description = 'flat') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'first radius'))) = 1)))
               = 0))) = 0);
    WR7: NOT (SELF.description = 'flat') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'second radius'))) = 1))
              ) = 0))) = 0);
    WR8: NOT (SELF.description = 'woodruff') OR (SIZEOF(QUERY (pd <* USEDIN
              (SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(it)) AND (it.name = 'radius'))) = 1))) = 0))) = 0)
              ;
    WR9: NOT (SELF.description IN [ 'woodruff' ]) OR (SIZEOF(QUERY (pd <* 
              USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 1))) = 0))) = 0);
    WR10: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
              )| ((sar.description = 'slot end usage') AND (sar.name IN [ 
              'course of travel start', 'course of travel end' ])) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)))| ((fcr.related_shape_aspect.description = 
              'end condition occurrence') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SLOT' IN TYPEOF(
              fcr.related_shape_aspect.of_shape.definition))) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SLOT_END' IN 
              TYPEOF(fcr.relating_shape_aspect)))) >= 1;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY solid_angle_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SOLID_ANGLE_UNIT' IN 
              TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY solid_angle_unit
  SUBTYPE OF (named_unit);
  WHERE
    WR1: ((((((SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\
              named_unit.dimensions.mass_exponent = 0.0)) AND (SELF\
              named_unit.dimensions.time_exponent = 0.0)) AND (SELF\
              named_unit.dimensions.electric_current_exponent = 0.0)) AND (
              SELF\named_unit.dimensions.thermodynamic_temperature_exponent
               = 0.0)) AND (SELF\named_unit.dimensions.
              amount_of_substance_exponent = 0.0)) AND (SELF\named_unit.
              dimensions.luminous_intensity_exponent = 0.0);
END_ENTITY; -- 10303-41: measure_schema

ENTITY solid_curve_font
  SUBTYPE OF (pre_defined_curve_font);
END_ENTITY; -- 10303-1749: styled_curve_mim

ENTITY solid_model
  SUPERTYPE OF (ONEOF(csg_solid, manifold_solid_brep, swept_face_solid, 
      swept_area_solid, swept_disk_solid, solid_replica))
  SUBTYPE OF (geometric_representation_item);
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY solid_replica
  SUBTYPE OF (solid_model);
    parent_solid   : solid_model;
    transformation : cartesian_transformation_operator_3d;
  WHERE
    WR1: acyclic_solid_replica(SELF, parent_solid);
    WR2: parent_solid\geometric_representation_item.dim = 3;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY source_for_requirement
  SUBTYPE OF (group_assignment);
    SELF\group_assignment.assigned_group : requirement_source;
    items          : SET [1:1] OF requirement_source_item;
END_ENTITY; -- 10303-1233: requirement_assignment_mim

ENTITY sourced_requirement
  SUBTYPE OF (group_assignment);
    SELF\group_assignment.assigned_group : requirement_source;
    items          : SET [1:1] OF product_definition;
END_ENTITY; -- 10303-1233: requirement_assignment_mim

ENTITY specification_definition
  SUBTYPE OF (product_definition);
END_ENTITY; -- 10303-1747: specification_document_mim

ENTITY specified_higher_usage_occurrence
  SUBTYPE OF (assembly_component_usage);
    upper_usage : assembly_component_usage;
    next_usage  : next_assembly_usage_occurrence;
  UNIQUE
    UR1: upper_usage, next_usage;
  WHERE
    WR1: SELF :<>: upper_usage;
    WR2: SELF\product_definition_relationship.relating_product_definition 
              :=: upper_usage.relating_product_definition;
    WR3: SELF\product_definition_relationship.related_product_definition 
              :=: next_usage.related_product_definition;
    WR4: (upper_usage.related_product_definition :=: next_usage.
              relating_product_definition) OR (SIZEOF(QUERY (pdr <* USEDIN(
              upper_usage.related_product_definition, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_RELATIONSHIP.RELATED_PRODUCT_DEFINITION'
              )| (pdr.relating_product_definition :=: next_usage.
              relating_product_definition))) = 1);
    WR5: SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NEXT_ASSEMBLY_USAGE_OCCURRENCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SPECIFIED_HIGHER_USAGE_OCCURRENCE'
               ] * TYPEOF(upper_usage)) = 1;
END_ENTITY; -- 10303-44: product_structure_schema

ENTITY sphere
  SUBTYPE OF (geometric_representation_item);
    radius : positive_length_measure;
    centre : point;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY spherical_cap
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 3))) = 0))) = 0;
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'radius'))) = 1))) = 0))
              ) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'internal angle'))) = 1)
              )) = 0))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY spherical_pair
  SUBTYPE OF (low_order_kinematic_pair);
  DERIVE
    SELF\low_order_kinematic_pair.t_x : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.t_y : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.t_z : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.r_x : BOOLEAN := TRUE;
    SELF\low_order_kinematic_pair.r_y : BOOLEAN := TRUE;
    SELF\low_order_kinematic_pair.r_z : BOOLEAN := TRUE;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY spherical_pair_value
  SUBTYPE OF (pair_value);
    SELF\pair_value.applies_to_pair : spherical_pair_select;
    input_orientation : spatial_rotation;
  DERIVE
    actual_orientation : ypr_rotation := convert_spatial_to_ypr_rotation(
                            SELF\pair_value.applies_to_pair, 
                            input_orientation);
END_ENTITY; -- 10303-105: kinematic_state_schema

ENTITY spherical_pair_with_pin
  SUBTYPE OF (low_order_kinematic_pair);
  DERIVE
    SELF\low_order_kinematic_pair.t_x : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.t_y : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.t_z : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.r_x : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.r_y : BOOLEAN := TRUE;
    SELF\low_order_kinematic_pair.r_z : BOOLEAN := TRUE;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY spherical_pair_with_pin_and_range
  SUBTYPE OF (spherical_pair_with_pin);
    lower_limit_yaw  : OPTIONAL plane_angle_measure;
    upper_limit_yaw  : OPTIONAL plane_angle_measure;
    lower_limit_roll : OPTIONAL plane_angle_measure;
    upper_limit_roll : OPTIONAL plane_angle_measure;
  WHERE
    WR1: (NOT EXISTS(lower_limit_yaw) OR NOT EXISTS(upper_limit_yaw)) XOR (
              lower_limit_yaw < upper_limit_yaw);
    WR2: (NOT EXISTS(lower_limit_roll) OR NOT EXISTS(upper_limit_roll)) XOR
               (lower_limit_roll < upper_limit_roll);
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY spherical_pair_with_range
  SUBTYPE OF (spherical_pair);
    lower_limit_yaw   : OPTIONAL plane_angle_measure;
    upper_limit_yaw   : OPTIONAL plane_angle_measure;
    lower_limit_pitch : OPTIONAL plane_angle_measure;
    upper_limit_pitch : OPTIONAL plane_angle_measure;
    lower_limit_roll  : OPTIONAL plane_angle_measure;
    upper_limit_roll  : OPTIONAL plane_angle_measure;
  WHERE
    WR1: (NOT EXISTS(lower_limit_yaw) OR NOT EXISTS(upper_limit_yaw)) XOR (
              lower_limit_yaw < upper_limit_yaw);
    WR2: (NOT EXISTS(lower_limit_pitch) OR NOT EXISTS(upper_limit_pitch)) 
              XOR (lower_limit_pitch < upper_limit_pitch);
    WR3: (NOT EXISTS(lower_limit_roll) OR NOT EXISTS(upper_limit_roll)) XOR
               (lower_limit_roll < upper_limit_roll);
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY spherical_point
  SUBTYPE OF (cartesian_point);
    r     : length_measure;
    theta : plane_angle_measure;
    phi   : plane_angle_measure;
  DERIVE
    SELF\cartesian_point.coordinates : LIST [3:3] OF length_measure := [ r 
                     * SIN(theta) * COS(phi), r * SIN(theta) * SIN(phi), r 
                     * COS(theta) ];
  WHERE
    WR1: r >= 0.0;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY spherical_surface
  SUBTYPE OF (elementary_surface);
    radius : positive_length_measure;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY spherical_volume
  SUBTYPE OF (volume);
    position : axis2_placement_3d;
    radius   : positive_length_measure;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY spotface_definition
  SUBTYPE OF (explicit_round_hole);
    spotface_radius           : positive_length_measure_with_unit;
    spotface_radius_tolerance : OPTIONAL tolerance_value;
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(spotface_radius_tolerance\tolerance_value.
              lower_bound);
    WR2: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(spotface_radius_tolerance\tolerance_value.
              upper_bound);
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY spotface_hole_definition
  SUBTYPE OF (counterbore_hole_definition);
    SELF\counterbore_hole_definition.counterbore : LIST [1:?] OF UNIQUE 
                     spotface_definition;
  DERIVE
    spotface : LIST [1:?] OF UNIQUE spotface_definition := SELF\
                  counterbore_hole_definition.counterbore;
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY spotface_occurrence
  SUBTYPE OF (counterbore_hole_occurrence);
    SELF\counterbore_hole_occurrence.definition : spotface_hole_definition;
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY spotface_occurrence_in_assembly
  SUBTYPE OF (counterbore_hole_occurrence_in_assembly);
    SELF\counterbore_hole_occurrence.definition : spotface_hole_definition;
END_ENTITY; -- 10303-113: counterbore_countersink_schema

ENTITY sql_mappable_defined_function
  ABSTRACT SUPERTYPE
  SUBTYPE OF (defined_function);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY square_root_function
  SUBTYPE OF (unary_function_call);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY square_u_profile
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_DEFINITION'
               IN TYPEOF(SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) >= 4) AND (SIZEOF(impl_rep.
              used_representation.items) <= 7))) = 0))) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND (SIZEOF(QUERY (
              srwp_i <* pdr.used_representation.items| (((((((srwp_i.name =
               'orientation') OR (srwp_i.name = 'width')) OR (srwp_i.name =
               'first angle')) OR (srwp_i.name = 'second angle')) OR (
              srwp_i.name = 'first radius')) OR (srwp_i.name = 
              'second radius')) OR (srwp_i.name = 'profile limit')) OR (
              srwp_i.name = 'depth'))) = SIZEOF(pdr.used_representation.
              items)))) = 1))) = 1;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN 
              TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0))) = 0
              ;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'width'))) = 1))) = 0)))
               = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'first radius'))) <= 1))
              ) = 0))) = 0;
    WR8: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'second radius'))) <= 1)
              )) = 0))) = 0;
    WR9: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'first angle'))) = 1))) 
              = 0))) = 0;
    WR10: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'second angle'))) = 1)))
               = 0))) = 0;
    WR11: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'profile limit'))) <= 1))) = 0;
    WR12: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'depth'))) <= 1))) = 0))
              ) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY standard_table_function
  SUBTYPE OF (linearized_table_function);
    order : ordering_type;
  WHERE
    WR1: extremal_position_check(SELF);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY standard_uncertainty
  SUPERTYPE OF (expanded_uncertainty)
  SUBTYPE OF (uncertainty_qualifier);
    uncertainty_value : REAL;
END_ENTITY; -- 10303-45: qualified_measure_schema

ENTITY step
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 1))) = 0))) = 0;
    WR2: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'course of travel occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'path feature component usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PATH_FEATURE_COMPONENT'
               IN TYPEOF(sdr.relating_shape_aspect)) AND (sdr.
              relating_shape_aspect.description = 'linear'))) = 1))) = 1)))
               = 0;
    WR3: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'removal boundary occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'profile usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VEE_PROFILE' IN 
              TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0;
    WR4: SIZEOF(QUERY (pdr <* get_property_definition_representations(SELF)
              | (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'maximum feature limit'))) >= 0;
    WR5: SIZEOF(QUERY (pds <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pds)) AND (SIZEOF(QUERY (csa <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_SHAPE_ASPECT'
               IN TYPEOF(csa)) AND (csa.name = 'uncut volume')) AND (SIZEOF
              (QUERY (sar <* csa.component_relationships| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP'
               IN TYPEOF(sar)) AND (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOSS', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROTRUSION' ] * 
              TYPEOF(sar.related_shape_aspect)) = 1))) = 1))) <= 1))) = 1;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY straightness_tolerance
  SUBTYPE OF (geometric_tolerance);
  WHERE
    WR1: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE'
               IN TYPEOF(SELF));
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY strict_triangular_matrix
  SUBTYPE OF (triangular_matrix);
    main_diagonal_value : maths_value;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY string_defined_function
  ABSTRACT SUPERTYPE
  SUBTYPE OF (defined_function, string_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY string_expression
  ABSTRACT SUPERTYPE OF (ONEOF(simple_string_expression, index_expression, 
      substring_expression, concat_expression, format_function, 
      string_defined_function))
  SUBTYPE OF (expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY string_literal
  SUBTYPE OF (simple_string_expression, generic_literal);
    the_value : STRING;
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY string_variable
  SUBTYPE OF (simple_string_expression, variable);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY structured_dimension_callout
  SUBTYPE OF (draughting_callout);
  WHERE
    WR1: SIZEOF(TYPEOF(SELF) * [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DATUM_FEATURE_CALLOUT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DATUM_TARGET_CALLOUT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRICAL_TOLERANCE_CALLOUT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LEADER_DIRECTED_CALLOUT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROJECTION_DIRECTED_CALLOUT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CURVE_DIRECTED_CALLOUT'
               ]) = 0;
    WR2: SIZEOF(QUERY (ato <* QUERY (con <* SELF.contents| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT_OCCURRENCE'
               IN TYPEOF(con)))| NOT (ato.name IN [ 'dimension value', 
              'tolerance value', 'unit text', 'prefix text', 'suffix text' 
              ]))) = 0;
    WR3: SIZEOF(QUERY (ato <* QUERY (con <* SELF.contents| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT_OCCURRENCE'
               IN TYPEOF(con)))| (ato.name = 'dimension value'))) >= 1;
    WR4: SIZEOF(QUERY (dcr <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_CALLOUT_RELATIONSHIP.RELATING_DRAUGHTING_CALLOUT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CALLOUT_COMPONENT_RELATIONSHIP'
               IN TYPEOF(dcr)) AND (dcr.name = 'prefix'))) <= 1;
    WR5: SIZEOF(QUERY (dcr <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_CALLOUT_RELATIONSHIP.RELATING_DRAUGHTING_CALLOUT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CALLOUT_COMPONENT_RELATIONSHIP'
               IN TYPEOF(dcr)) AND (dcr.name = 'suffix'))) <= 1;
    WR6: NOT (SIZEOF(QUERY (ato <* QUERY (con <* SELF.contents| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT_OCCURRENCE'
               IN TYPEOF(con)))| (ato.name = 'prefix text'))) > 0) OR (
              SIZEOF(QUERY (dcr <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_CALLOUT_RELATIONSHIP.RELATING_DRAUGHTING_CALLOUT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CALLOUT_COMPONENT_RELATIONSHIP'
               IN TYPEOF(dcr)) AND (dcr.name = 'prefix'))) = 1);
    WR7: NOT (SIZEOF(QUERY (ato <* QUERY (con <* SELF.contents| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT_OCCURRENCE'
               IN TYPEOF(con)))| (ato.name = 'suffix text'))) > 0) OR (
              SIZEOF(QUERY (dcr <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DRAUGHTING_CALLOUT_RELATIONSHIP.RELATING_DRAUGHTING_CALLOUT'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSION_CALLOUT_COMPONENT_RELATIONSHIP'
               IN TYPEOF(dcr)) AND (dcr.name = 'suffix'))) = 1);
END_ENTITY; -- 10303-506: aic_draughting_elements

ENTITY structured_text_composition
  SUBTYPE OF (compound_representation_item);
END_ENTITY; -- 10303-1366: tagged_text_representation_mim

ENTITY structured_text_representation
  SUBTYPE OF (representation);
    SELF\representation.items : SET [1:?] OF 
               string_representation_item_select;
END_ENTITY; -- 10303-1366: tagged_text_representation_mim

ENTITY styled_item
  SUBTYPE OF (representation_item);
    styles : SET [0:?] OF presentation_style_assignment;
    item   : styled_item_target;
  WHERE
    WR1: ((SIZEOF(styles) = 0) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_TESSELLATED_ITEM_WITH_COLOURS'
               IN TYPEOF(SELF)) OR (SIZEOF(styles) = 1)) OR (SIZEOF(styles)
               > 1) AND (SIZEOF(QUERY (pres_style <* styles| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESENTATION_STYLE_BY_CONTEXT'
               IN TYPEOF(pres_style)))) = 0);
    WR2: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STYLED_ITEM' IN 
              TYPEOF(item));
    WR3: (('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN 
              TYPEOF(item)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_REPRESENTATION_ITEM'
               IN TYPEOF(item))) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONTEXT_DEPENDENT_OVER_RIDING_STYLED_ITEM'
               IN TYPEOF(SELF));
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY styled_tessellated_item_with_colours
  SUBTYPE OF (styled_item);
    SELF\styled_item.item : tessellated_surface_item;
    colour_type   : colour_type_enum;
    colour_values : LIST [1:?] OF LIST [3:4] OF unsigned_8_bit_integer;
  DERIVE
    coloured_coordinate_values : coordinates_list := get_coordinate_values(
                                    item);
  WHERE
    WR1: SIZEOF(SELF\styled_item.styles) = 0;
    WR2: (colour_type = rgb8) AND (SIZEOF(QUERY (clist <* colour_values| 
              NOT (SIZEOF(clist) = 3))) = 0) OR (colour_type = rgbt8) AND (
              SIZEOF(QUERY (clist <* colour_values| NOT (SIZEOF(clist) = 4)
              )) = 0);
    WR3: SIZEOF(colour_values) = coloured_coordinate_values\
              coordinates_list.npoints;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY su_parameters
  SUBTYPE OF (geometric_representation_item);
    a     : length_measure;
    alpha : plane_angle_measure;
    b     : length_measure;
    beta  : plane_angle_measure;
    c     : length_measure;
    gamma : plane_angle_measure;
  WHERE
    WR1: SELF\geometric_representation_item.dim = 3;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY subedge
  SUBTYPE OF (edge);
    parent_edge : edge;
  WHERE
    WR1: SELF :<>: parent_edge;
END_ENTITY; -- 10303-42: topology_schema

ENTITY subface
  SUBTYPE OF (face);
    parent_face : face;
  WHERE
    WR1: NOT mixed_loop_type_set((list_to_set(list_face_loops(SELF)) + 
              list_to_set(list_face_loops(parent_face))));
    WR2: SELF :<>: parent_face;
END_ENTITY; -- 10303-42: topology_schema

ENTITY subpath
  SUBTYPE OF (path);
    parent_path : path;
  WHERE
    WR1: SELF :<>: parent_path;
    WR2: NOT (('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_LOOP' IN 
              TYPEOF(SELF)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OPEN_PATH' IN 
              TYPEOF(parent_path)));
END_ENTITY; -- 10303-42: topology_schema

ENTITY substring_expression
  SUBTYPE OF (string_expression, multiple_arity_generic_expression);
  DERIVE
    operand : generic_expression := SELF\multiple_arity_generic_expression.
                 operands[1];
    index1  : generic_expression := SELF\multiple_arity_generic_expression.
                 operands[2];
    index2  : generic_expression := SELF\multiple_arity_generic_expression.
                 operands[3];
  WHERE
    WR1: (('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STRING_EXPRESSION' 
              IN TYPEOF(operand)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NUMERIC_EXPRESSION'
               IN TYPEOF(index1))) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NUMERIC_EXPRESSION'
               IN TYPEOF(index2));
    WR2: SIZEOF(SELF\multiple_arity_generic_expression.operands) = 3;
    WR3: is_int_expr(index1);
    WR4: is_int_expr(index2);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY surface
  SUPERTYPE OF (ONEOF(elementary_surface, swept_surface, bounded_surface, 
      offset_surface, surface_replica))
  SUBTYPE OF (geometric_representation_item);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY surface_condition_callout
  SUBTYPE OF (draughting_callout);
  WHERE
    WR1: SIZEOF(QUERY (c <* SELF.contents| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_CURVE_OCCURRENCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_SYMBOL_OCCURRENCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT_OCCURRENCE'
               ] * TYPEOF(c)) <> 1))) = 0;
END_ENTITY; -- 10303-1312: draughting_element_specialisations_mim

ENTITY surface_curve
  SUPERTYPE OF (ONEOF(intersection_curve, seam_curve) ANDOR 
      bounded_surface_curve)
  SUBTYPE OF (curve);
    curve_3d              : curve;
    associated_geometry   : LIST [1:2] OF pcurve_or_surface;
    master_representation : preferred_surface_curve_representation;
  DERIVE
    basis_surface : SET [1:2] OF surface := get_basis_surface(SELF);
  WHERE
    WR1: curve_3d.dim = 3;
    WR2: ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PCURVE' IN TYPEOF(
              associated_geometry[1])) OR (master_representation <> 
              pcurve_s1);
    WR3: ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PCURVE' IN TYPEOF(
              associated_geometry[2])) OR (master_representation <> 
              pcurve_s2);
    WR4: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PCURVE' IN 
              TYPEOF(curve_3d));
END_ENTITY; -- 10303-42: geometry_schema

ENTITY surface_curve_swept_area_solid
  SUBTYPE OF (swept_area_solid);
    directrix         : curve;
    start_param       : REAL;
    end_param         : REAL;
    reference_surface : surface;
  WHERE
    WR1: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_CURVE' 
              IN TYPEOF(directrix)) OR (reference_surface IN directrix\
              surface_curve.basis_surface);
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY surface_curve_swept_surface
  SUBTYPE OF (swept_surface);
    directrix         : curve;
    reference_surface : surface;
  WHERE
    WR1: NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_CURVE' 
              IN TYPEOF(directrix)) OR (reference_surface IN directrix\
              surface_curve.basis_surface);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY surface_of_linear_extrusion
  SUBTYPE OF (swept_surface);
    extrusion_axis : vector;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY surface_of_revolution
  SUBTYPE OF (swept_surface);
    axis_position : axis1_placement;
  DERIVE
    axis_line : line := representation_item('') || 
                   geometric_representation_item() || curve() || line(
                   axis_position.location, representation_item('') || 
                   geometric_representation_item() || vector(axis_position.
                   z, 1.0));
END_ENTITY; -- 10303-42: geometry_schema

ENTITY surface_pair
  ABSTRACT SUPERTYPE OF (ONEOF(sliding_surface_pair, rolling_surface_pair) 
      ANDOR surface_pair_with_range)
  SUBTYPE OF (high_order_kinematic_pair);
    surface_1   : surface;
    surface_2   : surface;
    orientation : BOOLEAN;
  WHERE
    WR1: SIZEOF(QUERY (r <* SELF\kinematic_pair.
              associated_link_representations_1| NOT (surface_1 IN r.items)
              )) = 0;
    WR2: SIZEOF(QUERY (r <* SELF\kinematic_pair.
              associated_link_representations_2| NOT (surface_2 IN r.items)
              )) = 0;
    WR3: SIZEOF(QUERY (lr <* SELF\kinematic_pair.
              associated_link_representations_1| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RIGID_LINK_REPRESENTATION'
               IN TYPEOF(lr)))) = 0;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY surface_pair_with_range
  SUBTYPE OF (surface_pair);
    range_on_surface_1          : rectangular_trimmed_surface;
    range_on_surface_2          : rectangular_trimmed_surface;
    lower_limit_actual_rotation : OPTIONAL plane_angle_measure;
    upper_limit_actual_rotation : OPTIONAL plane_angle_measure;
  WHERE
    WR1: SELF\surface_pair.surface_1 :=: range_on_surface_1.basis_surface;
    WR2: SELF\surface_pair.surface_2 :=: range_on_surface_2.basis_surface;
    WR3: (NOT EXISTS(lower_limit_actual_rotation) OR NOT EXISTS(
              upper_limit_actual_rotation)) XOR (
              lower_limit_actual_rotation < upper_limit_actual_rotation);
    WR4: SIZEOF(QUERY (r <* SELF\kinematic_pair.
              associated_link_representations_1| NOT (range_on_surface_1 IN
               r.items))) = 0;
    WR5: SIZEOF(QUERY (r <* SELF\kinematic_pair.
              associated_link_representations_2| NOT (range_on_surface_2 IN
               r.items))) = 0;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY surface_patch
  SUBTYPE OF (founded_item);
    parent_surface : bounded_surface;
    u_transition   : transition_code;
    v_transition   : transition_code;
    u_sense        : BOOLEAN;
    v_sense        : BOOLEAN;
  INVERSE
    using_surfaces : BAG [1:?] OF rectangular_composite_surface FOR 
                        segments;
  WHERE
    WR1: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_BOUNDED_SURFACE'
               IN TYPEOF(parent_surface));
END_ENTITY; -- 10303-42: geometry_schema

ENTITY surface_profile_tolerance
  SUBTYPE OF (geometric_tolerance);
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY surface_rendering_properties;
    rendered_colour : colour;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY surface_replica
  SUBTYPE OF (surface);
    parent_surface : surface;
    transformation : cartesian_transformation_operator_3d;
  WHERE
    WR1: acyclic_surface_replica(SELF, parent_surface);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY surface_side_style
  SUBTYPE OF (founded_item);
    name   : label;
    styles : SET [1:7] OF surface_style_element_select;
  WHERE
    WR1: SIZEOF(QUERY (style1 <* styles| (SIZEOF(QUERY (style2 <* styles - 
              style1| (TYPEOF(style1) = TYPEOF(style2)))) > 0))) = 0;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY surface_style_boundary
  SUBTYPE OF (founded_item);
    style_of_boundary : curve_or_render;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY surface_style_control_grid
  SUBTYPE OF (founded_item);
    style_of_control_grid : curve_or_render;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY surface_style_fill_area
  SUBTYPE OF (founded_item);
    fill_area : fill_area_style;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY surface_style_parameter_line
  SUBTYPE OF (founded_item);
    style_of_parameter_lines : curve_or_render;
    direction_counts         : SET [1:2] OF direction_count_select;
  WHERE
    WR1: (HIINDEX(direction_counts) = 1) XOR (TYPEOF(direction_counts[1]) 
              <> TYPEOF(direction_counts[2]));
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY surface_style_reflectance_ambient;
    ambient_reflectance : REAL;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY surface_style_reflectance_ambient_diffuse
  SUBTYPE OF (surface_style_reflectance_ambient);
    diffuse_reflectance : REAL;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY surface_style_reflectance_ambient_diffuse_specular
  SUBTYPE OF (surface_style_reflectance_ambient_diffuse);
    specular_reflectance : REAL;
    specular_exponent    : REAL;
    specular_colour      : colour;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY surface_style_rendering;
    rendering_method : shading_surface_method;
    surface_colour   : colour;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY surface_style_rendering_with_properties
  SUBTYPE OF (surface_style_rendering);
    properties : SET [1:2] OF rendering_properties_select;
  WHERE
    WR1: (HIINDEX(properties) = 1) XOR (TYPEOF(properties[1]) <> TYPEOF(
              properties[2]));
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY surface_style_segmentation_curve
  SUBTYPE OF (founded_item);
    style_of_segmentation_curve : curve_or_render;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY surface_style_silhouette
  SUBTYPE OF (founded_item);
    style_of_silhouette : curve_or_render;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY surface_style_transparent;
    transparency : REAL;
  WHERE
    WR1: (0.0 <= transparency) AND (transparency <= 1.0);
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY surface_style_usage
  SUBTYPE OF (founded_item);
    side  : surface_side;
    style : surface_side_style_select;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY surface_texture_representation
  SUBTYPE OF (representation);
  WHERE
    WR1: SIZEOF(QUERY (i <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VALUE_RANGE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               ] * TYPEOF(i)) <> 1))) = 0;
    WR2: (SIZEOF(QUERY (i <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(i)))) = 1) AND (SIZEOF(QUERY (i <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(i)) AND (i.name = 'measuring method'))) = 1);
    WR3: SIZEOF(QUERY (i <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VALUE_RANGE' ]
               * TYPEOF(i)) = 1))) > 0;
    WR4: ((SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_RELATIONSHIP.REP_1'
              )) <= 1) AND (SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_RELATIONSHIP.REP_2'
              )) = 0)) AND (SIZEOF(QUERY (rr <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_RELATIONSHIP.REP_1'
              )| (rr.rep_2.name = 'measuring direction'))) = SIZEOF(USEDIN(
              SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_RELATIONSHIP.REP_1'
              )));
    WR5: (SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION'
              )) = 1) AND (SIZEOF(QUERY (pdr <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION'
              )| (SIZEOF(QUERY (gpa <* USEDIN(pdr.definition, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GENERAL_PROPERTY_ASSOCIATION.DERIVED_DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GENERAL_PROPERTY'
               IN TYPEOF(gpa.base_definition)) AND (gpa\
              general_property_association.base_definition\general_property
              .name = 'surface_condition'))) = 1))) = 1);
END_ENTITY; -- 10303-1110: surface_conditions_mim

ENTITY swept_area_solid
  SUPERTYPE OF (ONEOF(revolved_area_solid, extruded_area_solid, 
      surface_curve_swept_area_solid))
  SUBTYPE OF (solid_model);
    swept_area : curve_bounded_surface;
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE' IN TYPEOF(
              swept_area.basis_surface);
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY swept_disk_solid
  SUBTYPE OF (solid_model);
    directrix    : curve;
    radius       : positive_length_measure;
    inner_radius : OPTIONAL positive_length_measure;
    start_param  : REAL;
    end_param    : REAL;
  WHERE
    WR1: directrix.dim = 3;
    WR2: NOT EXISTS(inner_radius) OR (radius > inner_radius);
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY swept_face_solid
  SUPERTYPE OF (ONEOF(extruded_face_solid, revolved_face_solid))
  SUBTYPE OF (solid_model);
    swept_face : face_surface;
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE' IN TYPEOF(
              swept_face.face_geometry);
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY swept_surface
  SUPERTYPE OF (ONEOF(surface_of_linear_extrusion, surface_of_revolution, 
      surface_curve_swept_surface, fixed_reference_swept_surface))
  SUBTYPE OF (surface);
    swept_curve : curve;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY symbol_colour;
    colour_of_symbol : colour;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY symbol_representation
  SUBTYPE OF (representation);
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY symbol_representation_map
  SUBTYPE OF (representation_map);
    SELF\representation_map.mapped_representation : symbol_representation;
    SELF\representation_map.mapping_origin : axis2_placement;
  WHERE
    WR1: SIZEOF(QUERY (mi <* SELF\representation_map.map_usage| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_SYMBOL'
               IN TYPEOF(mi)))) = 0;
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY symbol_style
  SUBTYPE OF (founded_item);
    name            : label;
    style_of_symbol : symbol_style_select;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY symbol_target
  SUBTYPE OF (geometric_representation_item);
    placement : axis2_placement;
    x_scale   : positive_ratio_measure;
    y_scale   : positive_ratio_measure;
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY symmetric_banded_matrix
  SUBTYPE OF (symmetric_matrix);
    default_entry : maths_value;
    above         : nonnegative_integer;
  WHERE
    WR1: member_of(default_entry, factor1(SELF\linearized_table_function.
              source.range));
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY symmetric_matrix
  SUBTYPE OF (linearized_table_function);
    symmetry : symmetry_type;
    triangle : lower_upper;
    order    : ordering_type;
  WHERE
    WR1: SIZEOF(SELF\explicit_table_function.shape) = 2;
    WR2: SELF\explicit_table_function.shape[1] = SELF\
              explicit_table_function.shape[2];
    WR3: NOT (symmetry = symmetry_type.skew) OR (space_dimension(SELF\
              linearized_table_function.source.range) = 1) AND 
              subspace_of_es(factor1(SELF\linearized_table_function.source.
              range), es_numbers);
    WR4: NOT ((symmetry = symmetry_type.hermitian) OR (symmetry = 
              symmetry_type.skew_hermitian)) OR (space_dimension(SELF\
              linearized_table_function.source.range) = 1) AND 
              subspace_of_es(factor1(SELF\linearized_table_function.source.
              range), es_complex_numbers);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY symmetric_shape_aspect
  SUBTYPE OF (shape_aspect);
  INVERSE
    basis_relationships : SET [1:?] OF shape_aspect_deriving_relationship 
                             FOR related_shape_aspect;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY symmetry_tolerance
  SUBTYPE OF (geometric_tolerance_with_datum_reference);
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY table_representation_item
  SUBTYPE OF (compound_representation_item);
  WHERE
    WR1: SIZEOF(QUERY (itet <* SELF\compound_representation_item.
              item_element| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROW_REPRESENTATION_ITEM'
               IN TYPEOF(itet)))) = 0;
END_ENTITY; -- 10303-1654: characteristic_mim

ENTITY tactile_appearance_representation
  SUBTYPE OF (representation);
  WHERE
    WR1: SIZEOF(QUERY (i <* SELF.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VALUE_RANGE' ]
               * TYPEOF(i)) <> 1))) = 0;
    WR2: SIZEOF(QUERY (i <* SELF.items| (name = 'depth'))) <= 1;
    WR3: (SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION'
              )) = 1) AND (SIZEOF(QUERY (pdr <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION'
              )| (SIZEOF(QUERY (gpa <* USEDIN(pdr.definition, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GENERAL_PROPERTY_ASSOCIATION.DERIVED_DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GENERAL_PROPERTY'
               IN TYPEOF(gpa.base_definition)) AND (gpa\
              general_property_association.base_definition\general_property
              .name = 'surface_condition'))) = 1))) = 1);
END_ENTITY; -- 10303-1110: surface_conditions_mim

ENTITY tagged_text_format
  SUBTYPE OF (representation_context);
END_ENTITY; -- 10303-1366: tagged_text_representation_mim

ENTITY tagged_text_item
  SUBTYPE OF (descriptive_representation_item);
END_ENTITY; -- 10303-1366: tagged_text_representation_mim

ENTITY tan_function
  SUBTYPE OF (unary_function_call);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY tangent
  SUBTYPE OF (derived_shape_aspect);
  WHERE
    WR1: SIZEOF(SELF\derived_shape_aspect.deriving_relationships) = 1;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY taper
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_DEFINITION'
               IN TYPEOF(SELF.of_shape.definition);
    WR2: SELF.description IN [ 'angle taper', 'diameter taper', 
              'directed taper' ];
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 1))) = 0))) = 0;
    WR5: NOT (SELF.description = 'angle taper') OR (SIZEOF(QUERY (pd <* 
              USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'taper angle'))) = 1))) 
              = 0))) = 0);
    WR6: NOT (SELF.description = 'diameter taper') OR (SIZEOF(QUERY (pd <* 
              USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'final diameter'))) = 1)
              )) = 0))) = 0);
    WR7: NOT (SELF.description = 'directed taper') OR (SIZEOF(QUERY (pd <* 
              USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'angle'))) = 1))) = 0)))
               = 0);
    WR8: NOT (SELF.description = 'directed taper') OR (SIZEOF(QUERY (pd <* 
              USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'direction'))) = 1))) = 0);
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY tapping_operation
  SUBTYPE OF (drilling_type_operation);
  WHERE
    WR1: SELF.description IN [ 'tapping', 'thread drilling' ];
    WR2: NOT (SELF.description = 'tapping') OR 
              verify_optional_action_property(SELF, 'compensation chuck') 
              AND verify_enumeration_action_property(SELF, 
              'compensation chuck', [ 'compensation chuck used', 
              'compensation chuck not used' ]);
    WR3: NOT (SELF.description = 'thread drilling') OR 
              verify_optional_action_property(SELF, 
              'helical movement on forward') AND 
              verify_enumeration_action_property(SELF, 
              'helical movement on forward', [ 
              'helical movement on forward', 
              'no helical movement on forward' ]);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY tee_profile
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_DEFINITION'
               IN TYPEOF(SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) >= 9) AND (SIZEOF(impl_rep.
              used_representation.items) <= 10))) = 0))) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND (SIZEOF(QUERY (
              srwp_i <* pdr.used_representation.items| (((((((((srwp_i.name
               = 'orientation') OR (srwp_i.name = 'width')) OR (srwp_i.name
               = 'depth')) OR (srwp_i.name = 'cross bar width')) OR (srwp_i
              .name = 'cross bar depth')) OR (srwp_i.name = 'first offset')
              ) OR (srwp_i.name = 'second offset')) OR (srwp_i.name = 
              'first angle')) OR (srwp_i.name = 'second angle')) OR (srwp_i
              .name = 'radius'))) = SIZEOF(pdr.used_representation.items)))
              ) = 1))) = 1;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN 
              TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0))) = 0
              ;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'width'))) = 1))) = 0)))
               = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'depth'))) = 1))) = 0)))
               = 0;
    WR8: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'cross bar width'))) = 1
              ))) = 0))) = 0;
    WR9: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'cross bar depth'))) = 1
              ))) = 0))) = 0;
    WR10: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'first offset'))) = 1)))
               = 0))) = 0;
    WR11: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'second offset'))) = 1))
              ) = 0))) = 0;
    WR12: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'first angle'))) = 1))) 
              = 0))) = 0;
    WR13: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'second angle'))) = 1)))
               = 0))) = 0;
    WR14: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'radius'))) <= 1))) = 0)
              )) = 0;
    WR15: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'profile limit'))) <= 1))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY terminator_symbol
  SUBTYPE OF (annotation_symbol_occurrence);
    annotated_curve : annotation_curve_occurrence;
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY tessellated_annotation_occurrence
  SUBTYPE OF (annotation_occurrence);
    SELF\styled_item.item : tessellated_geometric_set;
END_ENTITY; -- 10303-101: draughting_element_schema

ENTITY tessellated_connecting_edge
  SUBTYPE OF (tessellated_edge);
    smooth           : LOGICAL;
    face1            : tessellated_face;
    face2            : tessellated_face;
    line_strip_face1 : LIST [2:?] OF INTEGER;
    line_strip_face2 : LIST [2:?] OF INTEGER;
  WHERE
    WR1: SIZEOF(line_strip_face1) = SIZEOF(line_strip_face2);
    WR2: SIZEOF(line_strip_face1) = SIZEOF(SELF\tessellated_edge.line_strip
              );
    WR3: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CUBIC_BEZIER_TRIANGULATED_FACE'
               IN TYPEOF(face1));
    WR4: NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CUBIC_BEZIER_TRIANGULATED_FACE'
               IN TYPEOF(face2));
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY tessellated_curve_set
  SUBTYPE OF (tessellated_item);
    coordinates : coordinates_list;
    line_strips : LIST [1:?] OF LIST [2:?] OF INTEGER;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY tessellated_edge
  SUPERTYPE OF (ONEOF(tessellated_connecting_edge, 
      cubic_bezier_tessellated_edge))
  SUBTYPE OF (tessellated_structured_item);
    coordinates    : coordinates_list;
    geometric_link : OPTIONAL edge_or_curve;
    line_strip     : LIST [2:?] OF INTEGER;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY tessellated_face
  ABSTRACT SUPERTYPE OF (ONEOF(triangulated_face, complex_triangulated_face
      , cubic_bezier_triangulated_face))
  SUBTYPE OF (tessellated_structured_item);
    coordinates    : coordinates_list;
    pnmax          : INTEGER;
    normals        : LIST [0:?] OF LIST [3:3] OF REAL;
    geometric_link : OPTIONAL face_or_surface;
  WHERE
    WR1: ((SIZEOF(normals) = 0) OR (SIZEOF(normals) = 1)) OR (SIZEOF(
              normals) = pnmax);
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY tessellated_geometric_set
  SUBTYPE OF (tessellated_item);
    children : SET [1:?] OF tessellated_item;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY tessellated_item
  ABSTRACT SUPERTYPE OF (ONEOF(coordinates_list, tessellated_solid, 
      tessellated_shell, tessellated_wire, tessellated_geometric_set, 
      tessellated_curve_set, tessellated_point_set, tessellated_surface_set
      , tessellated_structured_item))
  SUBTYPE OF (geometric_representation_item);
  WHERE
    WR1: SIZEOF(QUERY (using_rep <* using_representations(SELF)| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_SHAPE_REPRESENTATION'
               IN TYPEOF(using_rep)))) = 0;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY tessellated_point_set
  SUBTYPE OF (tessellated_item);
    coordinates : coordinates_list;
    point_list  : LIST [1:?] OF INTEGER;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY tessellated_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GLOBAL_UNIT_ASSIGNED_CONTEXT'
               IN TYPEOF(SELF\representation.context_of_items);
    WR2: NOT (SIZEOF(QUERY (it <* SELF.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_ITEM'
               IN TYPEOF(it)))) = 0);
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY tessellated_shape_representation_with_accuracy_parameters
  SUBTYPE OF (tessellated_shape_representation);
    tessellation_accuracy_parameters : SET [1:?] OF 
                                          tessellation_accuracy_parameter_item
                                          ;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY tessellated_shell
  SUBTYPE OF (tessellated_item);
    items            : SET [1:?] OF tessellated_structured_item;
    topological_link : OPTIONAL connected_face_set;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY tessellated_solid
  SUBTYPE OF (tessellated_item);
    items          : SET [1:?] OF tessellated_structured_item;
    geometric_link : OPTIONAL manifold_solid_brep;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY tessellated_structured_item
  SUPERTYPE OF (ONEOF(tessellated_face, tessellated_edge, 
      tessellated_vertex))
  SUBTYPE OF (tessellated_item);
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY tessellated_surface_set
  ABSTRACT SUPERTYPE OF (ONEOF(triangulated_surface_set, 
      complex_triangulated_surface_set))
  SUBTYPE OF (tessellated_item);
    coordinates : coordinates_list;
    pnmax       : INTEGER;
    normals     : LIST [0:?] OF LIST [3:3] OF REAL;
  WHERE
    WR1: ((SIZEOF(normals) = 0) OR (SIZEOF(normals) = 1)) OR (SIZEOF(
              normals) = pnmax);
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY tessellated_vertex
  SUBTYPE OF (tessellated_structured_item);
    coordinates      : coordinates_list;
    topological_link : OPTIONAL vertex_point;
    point_index      : INTEGER;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY tessellated_wire
  SUBTYPE OF (tessellated_item);
    items                : SET [1:?] OF tessellated_edge_or_vertex;
    geometric_model_link : OPTIONAL path_or_composite_curve;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY tetrahedron
  SUBTYPE OF (faceted_primitive);
  WHERE
    WR1: SIZEOF(points) = 4;
    WR2: above_plane(points[1], points[2], points[3], points[4]) <> 0.0;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY tetrahedron_volume
  SUBTYPE OF (volume);
    point_1 : cartesian_point;
    point_2 : cartesian_point;
    point_3 : cartesian_point;
    point_4 : cartesian_point;
  WHERE
    WR1: point_1.dim = 3;
    WR2: above_plane(point_1, point_2, point_3, point_4) <> 0.0;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY text_literal
  SUBTYPE OF (geometric_representation_item);
    literal   : presentable_text;
    placement : axis2_placement;
    alignment : text_alignment;
    path      : text_path;
    font      : font_select;
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY text_literal_with_associated_curves
  SUBTYPE OF (text_literal);
    associated_curves : SET [1:?] OF curve;
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY text_literal_with_blanking_box
  SUBTYPE OF (text_literal);
    blanking : planar_box;
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY text_literal_with_delineation
  SUBTYPE OF (text_literal);
    delineation : text_delineation;
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY text_literal_with_extent
  SUBTYPE OF (text_literal);
    extent : planar_extent;
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY text_string_representation
  SUBTYPE OF (representation);
    SELF\representation.items : SET [1:?] OF 
               text_string_representation_item;
  WHERE
    WR1: SIZEOF(QUERY (item <* SELF\representation.items| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEXT_LITERAL', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT_CHARACTER'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DEFINED_CHARACTER_GLYPH'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_TEXT' 
              ] * TYPEOF(item)) = 0))) >= 1;
    WR2: SIZEOF(QUERY (a2p <* QUERY (item <* SELF\representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT'
               IN TYPEOF(item)))| NOT ((SIZEOF(QUERY (at <* QUERY (item <* 
              SELF\representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT'
               IN TYPEOF(item)))| (at\mapped_item.mapping_target :=: a2p)))
               >= 1) OR (SIZEOF(QUERY (atc <* QUERY (item <* SELF\
              representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT_CHARACTER'
               IN TYPEOF(item)))| (atc\mapped_item.mapping_target :=: a2p))
              ) >= 1)))) = 0;
END_ENTITY; -- 10303-46: presentation_definition_schema

ENTITY text_style
  SUBTYPE OF (founded_item);
    name                 : label;
    character_appearance : character_style_select;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY text_style_for_defined_font;
    text_colour : colour;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY text_style_with_box_characteristics
  SUBTYPE OF (text_style);
    characteristics : SET [1:4] OF box_characteristic_select;
  WHERE
    WR1: SIZEOF(QUERY (c1 <* characteristics| (SIZEOF(QUERY (c2 <* 
              characteristics - c1| (TYPEOF(c1) = TYPEOF(c2)))) > 0))) = 0;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY text_style_with_mirror
  SUBTYPE OF (text_style);
    mirror_placement : axis2_placement;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY text_style_with_spacing
  SUBTYPE OF (text_style);
    character_spacing : character_spacing_select;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY thermal_resistance_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.THERMAL_RESISTANCE_UNIT'
               IN TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-1753: value_with_unit_extension_mim

ENTITY thermal_resistance_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensional_exponents(-1.0, -
              1.0, -3.0, 0.0, 1.0, 0.0, 0.0);
END_ENTITY; -- 10303-1753: value_with_unit_extension_mim

ENTITY thermodynamic_temperature_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.THERMODYNAMIC_TEMPERATURE_UNIT'
               IN TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY thermodynamic_temperature_unit
  SUBTYPE OF (named_unit);
  WHERE
    WR1: ((((((SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\
              named_unit.dimensions.mass_exponent = 0.0)) AND (SELF\
              named_unit.dimensions.time_exponent = 0.0)) AND (SELF\
              named_unit.dimensions.electric_current_exponent = 0.0)) AND (
              SELF\named_unit.dimensions.thermodynamic_temperature_exponent
               = 1.0)) AND (SELF\named_unit.dimensions.
              amount_of_substance_exponent = 0.0)) AND (SELF\named_unit.
              dimensions.luminous_intensity_exponent = 0.0);
END_ENTITY; -- 10303-41: measure_schema

ENTITY thread
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND (8 <= SIZEOF(pdr.
              used_representation.items))) AND (SIZEOF(pdr.
              used_representation.items) <= 11))) = 1))) = 1;
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'major diameter'))) = 1)
              )) = 0))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'minor diameter'))) <= 1
              ))) = 0))) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'pitch diameter'))) <= 1
              ))) = 0))) = 0;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RATIO_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'number of threads'))) =
               1))) = 0))) = 0;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'fit class'))) = 1))) = 0))) =
               0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'form'))) = 1))) = 0))) = 0;
    WR8: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'hand')) AND (it.description 
              IN [ 'left', 'right' ]))) = 1))) = 0))) = 0;
    WR9: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'qualifier'))) <= 1))) = 0))) 
              = 0;
    WR10: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'thread side')) AND ((it.
              description = 'internal') OR (it.description = 'external'))))
               = 1))) = 0))) = 0;
    WR11: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'crest'))) <= 1))) = 0))
              ) = 0;
    WR12: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'partial area occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'applied area usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APPLIED_AREA' IN
               TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0;
    WR13: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'applied shape') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT' IN
               TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0;
    WR14: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'fit class 2'))) <= 1))) = 0))
              ) = 0;
    WR15: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'nominal size'))) <= 1))
              ) = 0))) = 0;
    WR16: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'thread runout') AND (SIZEOF(QUERY (
              sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'thread runout usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.THREAD_RUNOUT' 
              IN TYPEOF(sdr.relating_shape_aspect)))) <= 1))) = 1))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY thread_runout
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(SELF.of_shape);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 3))) = 0))) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND (SIZEOF(QUERY (
              srwp_i <* pdr.used_representation.items| NOT (srwp_i.name IN 
              [ 'length of runout', 'pitch or dimension', 
              'included or extra' ]))) > 0))) = 0))) = 0;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'length of runout'))) = 
              1))) = 0))) <= 1;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'pitch or dimension')) AND (it
              .description IN [ 'pitch', 'pitch or dimension' ]))) = 1))) =
               0))) = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'included or extra')) AND (it.
              description IN [ 'included', 'extra' ]))) = 1))) = 0))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY threading_turning_operation
  SUBTYPE OF (turning_type_operation);
  WHERE
    WR1: SELF.description IN [ 'roughing', 'finishing' ];
    WR2: verify_optional_action_property(SELF, 'allowance') AND 
              verify_length_measure_action_property(SELF, 'allowance');
    WR3: NOT (SELF.description = 'roughing') OR 
              verify_required_action_property(SELF, 'allowance');
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY time_interval;
    id          : identifier;
    name        : label;
    description : OPTIONAL text;
END_ENTITY; -- 10303-41: date_time_schema

ENTITY time_interval_assignment
  ABSTRACT SUPERTYPE;
    assigned_time_interval : time_interval;
    role                   : time_interval_role;
END_ENTITY; -- 10303-41: management_resources_schema

ENTITY time_interval_based_effectivity
  SUBTYPE OF (effectivity);
    effectivity_period : time_interval;
END_ENTITY; -- 10303-41: effectivity_schema

ENTITY time_interval_relationship;
    name                   : label;
    description            : OPTIONAL text;
    relating_time_interval : time_interval;
    related_time_interval  : time_interval;
END_ENTITY; -- 10303-41: date_time_schema

ENTITY time_interval_role;
    name        : label;
    description : OPTIONAL text;
END_ENTITY; -- 10303-41: date_time_schema

ENTITY time_interval_with_bounds
  SUBTYPE OF (time_interval);
    primary_bound   : OPTIONAL date_time_or_event_occurrence;
    secondary_bound : OPTIONAL date_time_or_event_occurrence;
    duration        : OPTIONAL time_measure_with_unit;
  WHERE
    WR1: EXISTS(primary_bound) OR EXISTS(secondary_bound);
    WR2: NOT ((EXISTS(primary_bound) AND EXISTS(secondary_bound)) AND 
              EXISTS(duration));
    WR3: (EXISTS(primary_bound) AND NOT EXISTS(secondary_bound)) AND (NOT 
              EXISTS(duration) OR duration_is_positive(duration));
    WR4: ((EXISTS(secondary_bound) AND NOT EXISTS(primary_bound)) AND 
              EXISTS(duration)) AND duration_is_negative(duration);
END_ENTITY; -- 10303-41: date_time_schema

ENTITY time_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TIME_UNIT' IN TYPEOF(
              SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY time_unit
  SUBTYPE OF (named_unit);
  WHERE
    WR1: ((((((SELF\named_unit.dimensions.length_exponent = 0.0) AND (SELF\
              named_unit.dimensions.mass_exponent = 0.0)) AND (SELF\
              named_unit.dimensions.time_exponent = 1.0)) AND (SELF\
              named_unit.dimensions.electric_current_exponent = 0.0)) AND (
              SELF\named_unit.dimensions.thermodynamic_temperature_exponent
               = 0.0)) AND (SELF\named_unit.dimensions.
              amount_of_substance_exponent = 0.0)) AND (SELF\named_unit.
              dimensions.luminous_intensity_exponent = 0.0);
END_ENTITY; -- 10303-41: measure_schema

ENTITY tolerance_value;
    lower_bound : measure_with_unit;
    upper_bound : measure_with_unit;
  DERIVE
    ubvc : REAL := upper_bound\measure_with_unit.value_component;
    lbvc : REAL := lower_bound\measure_with_unit.value_component;
  WHERE
    WR1: ubvc > lbvc;
    WR2: upper_bound\measure_with_unit.unit_component = lower_bound\
              measure_with_unit.unit_component;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY tolerance_zone
  SUBTYPE OF (shape_aspect);
    defining_tolerance : SET [1:?] OF tolerance_zone_target;
    form               : tolerance_zone_form;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY tolerance_zone_definition
  SUPERTYPE OF (ONEOF(projected_zone_definition, 
      non_uniform_zone_definition, runout_zone_definition));
    zone       : tolerance_zone;
    boundaries : SET [0:?] OF shape_aspect;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY tolerance_zone_form;
    name : label;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY tolerance_zone_with_datum
  SUPERTYPE OF (ONEOF(directed_tolerance_zone, oriented_tolerance_zone))
  SUBTYPE OF (tolerance_zone);
    datum_reference : datum_system;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY topological_representation_item
  SUPERTYPE OF (ONEOF(vertex, edge, face_bound, face, vertex_shell, 
      wire_shell, connected_edge_set, connected_face_set, 
      connected_volume_set, volume_with_faces, loop ANDOR path))
  SUBTYPE OF (representation_item);
  DERIVE
    permanent_id           : identifier := get_id_value(SELF);
    permanent_aggregate_id : identifier := get_aggregate_id_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ID_ATTRIBUTE.IDENTIFIED_ITEM'
              )) <= 1;
    WR2: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AGGREGATE_ID_ATTRIBUTE.IDENTIFIED_ITEM'
              )) <= 1;
END_ENTITY; -- 10303-42: topology_schema

ENTITY toroidal_surface
  SUBTYPE OF (elementary_surface);
    major_radius : positive_length_measure;
    minor_radius : positive_length_measure;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY toroidal_volume
  SUBTYPE OF (volume);
    position     : axis2_placement_3d;
    major_radius : positive_length_measure;
    minor_radius : positive_length_measure;
  WHERE
    WR1: minor_radius < major_radius;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY torus
  SUBTYPE OF (geometric_representation_item);
    position     : axis1_placement;
    major_radius : positive_length_measure;
    minor_radius : positive_length_measure;
  WHERE
    WR1: major_radius > minor_radius;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY total_runout_tolerance
  SUBTYPE OF (geometric_tolerance_with_datum_reference);
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY transition_feature
  SUPERTYPE OF (ONEOF(chamfer, edge_round, fillet))
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOUND_FEATURE'
               ] * TYPEOF(SELF.of_shape.definition)) = 1;
    WR2: SIZEOF([ 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CHAMFER', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE_ROUND', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FILLET' ] * 
              TYPEOF(SELF)) = 1;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY triangular_matrix
  SUBTYPE OF (linearized_table_function);
    default_entry : maths_value;
    lo_up         : lower_upper;
    order         : ordering_type;
  WHERE
    WR1: SIZEOF(SELF\explicit_table_function.shape) = 2;
    WR2: member_of(default_entry, SELF\maths_function.range);
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY triangulated_face
  SUBTYPE OF (tessellated_face);
    pnindex   : LIST [0:?] OF INTEGER;
    triangles : LIST [1:?] OF LIST [3:3] OF INTEGER;
  WHERE
    WR1: (SIZEOF(pnindex) = 0) OR (SIZEOF(pnindex) = SELF\tessellated_face.
              pnmax);
    WR2: NOT ((SIZEOF(pnindex) = 0) AND (SELF\tessellated_face.pnmax <> 
              coordinates.npoints));
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY triangulated_point_cloud_dataset
  SUBTYPE OF (scanned_data_item);
    points    : point_cloud_set_or_superset;
    triangles : LIST [1:?] OF LIST [3:3] OF INTEGER;
END_ENTITY; -- 10303-42: scan_data_3d_shape_model_schema

ENTITY triangulated_surface_set
  SUBTYPE OF (tessellated_surface_set);
    pnindex   : LIST [0:?] OF INTEGER;
    triangles : LIST [1:?] OF LIST [3:3] OF INTEGER;
  WHERE
    WR1: (SIZEOF(pnindex) = 0) OR (SIZEOF(pnindex) = SELF\
              tessellated_surface_set.pnmax);
    WR2: NOT ((SIZEOF(pnindex) = 0) AND (SELF\tessellated_surface_set.pnmax
               <> coordinates.npoints));
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY trimmed_curve
  SUBTYPE OF (bounded_curve);
    basis_curve           : curve;
    trim_1                : SET [1:2] OF trimming_select;
    trim_2                : SET [1:2] OF trimming_select;
    sense_agreement       : BOOLEAN;
    master_representation : trimming_preference;
  WHERE
    WR1: (HIINDEX(trim_1) = 1) OR (TYPEOF(trim_1[1]) <> TYPEOF(trim_1[2]));
    WR2: (HIINDEX(trim_2) = 1) OR (TYPEOF(trim_2[1]) <> TYPEOF(trim_2[2]));
END_ENTITY; -- 10303-42: geometry_schema

ENTITY turned_knurl
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SELF\characterized_object.description IN [ 'diamond', 'diagonal', 
              'straight' ];
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND ((6 <= SIZEOF(pdr.
              used_representation.items)) AND (SIZEOF(pdr.
              used_representation.items) <= 9)))) = 1))) = 1;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COUNT_MEASURE' 
              IN TYPEOF(it\measure_with_unit.value_component))) AND (it.
              name = 'number of teeth'))) <= 1))) = 0))) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'major diameter'))) = 1)
              )) = 0))) = 0;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'nominal diameter'))) = 
              1))) = 0))) = 0;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'tooth depth'))) <= 1)))
               = 0))) = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'root fillet'))) <= 1)))
               = 0))) = 0;
    WR8: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'diametral pitch'))) = 1
              ))) = 0))) = 0;
    WR9: NOT (SELF\characterized_object.description IN [ 'diamond', 
              'diagonal' ]) OR (SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'helix angle'))) = 1))) 
              = 0))) = 0);
    WR10: NOT (SELF\characterized_object.description = 'diagonal') OR (
              SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (it.name = 'helix hand'))) = 1))) = 0))) 
              = 0);
    WR11: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (sa_occ.description = 'partial area occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'applied area usage') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APPLIED_AREA' IN
               TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0;
    WR12: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
               IN TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
              )| (SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'applied shape') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT' IN
               TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY turning_type_operation
  SUBTYPE OF (machining_operation);
  WHERE
    WR1: verify_optional_relating_amr_with_name(SELF, 'approach', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'
               ]) AND verify_related_type_for_amr_with_name(SELF, 
              'approach', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_APPROACH_RETRACT_STRATEGY'
               ]);
    WR2: verify_optional_relating_amr_with_name(SELF, 'retract', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'
               ]) AND verify_related_type_for_amr_with_name(SELF, 'retract'
              , [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_APPROACH_RETRACT_STRATEGY'
               ]);
    WR3: verify_optional_relating_amr_with_name(SELF, 'machining', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'
               ]) AND verify_related_type_for_amr_with_name(SELF, 
              'machining', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'
               ], [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TURNING_TYPE_STRATEGY'
               ]);
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY turning_type_strategy
  SUBTYPE OF (machining_strategy);
  WHERE
    WR1: SELF.description IN [ 'unidirectional', 'bidirectional', 'contour'
              , 'thread', 'grooving', 'multistep grooving', 'explicit' ];
    WR2: verify_optional_action_property(SELF, 'overcut length') AND 
              verify_length_measure_action_property(SELF, 'overcut length')
              ;
    WR3: verify_optional_action_property(SELF, 'multiple passes') AND 
              verify_enumeration_action_property(SELF, 'multiple passes', [
               'multiple passes allowed', 'multiple passes not allowed' ]);
    WR4: verify_optional_action_property(SELF, 'cutting depth') AND (0 = 
              SIZEOF(QUERY (prop <* get_action_property(SELF, 
              'cutting depth')| NOT (0 < SIZEOF(QUERY (prep <* USEDIN(prop,
               
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY'
              )| (1 = SIZEOF(QUERY (it <* prep.representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOUND_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LIST_REPRESENTATION_ITEM'
               IN TYPEOF(it.item_element))) AND (0 = SIZEOF(QUERY (ie <* it
              .item_element| NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               ] * TYPEOF(ie)) = 2)))))))))))));
    WR5: (verify_optional_action_property(SELF, 'variable feedrate') AND 
              verify_rep_type_for_action_property(SELF, 'variable feedrate'
              , [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'
               ])) AND verify_rep_name_for_action_property(SELF, 
              'variable feedrate', [ 'relative speed' ]);
    WR6: NOT (SELF.description = 'unidirectional') OR ((((((((((((((
              verify_optional_action_property(SELF, 'feed direction') AND 
              verify_rep_item_for_action_property(SELF, 'feed direction', [
               'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ])) 
              AND verify_optional_action_property(SELF, 
              'back path direction')) AND 
              verify_rep_item_for_action_property(SELF, 
              'back path direction', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ])) 
              AND verify_optional_action_property(SELF, 'lift direction')) 
              AND verify_rep_item_for_action_property(SELF, 
              'lift direction', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ])) 
              AND verify_optional_action_property(SELF, 
              'stepover direction')) AND 
              verify_rep_item_for_action_property(SELF, 
              'stepover direction', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ])) 
              AND verify_optional_action_property(SELF, 'lift height')) AND
               verify_length_measure_action_property(SELF, 'lift height')) 
              AND verify_optional_action_property(SELF, 'lift feedrate')) 
              AND verify_rep_type_for_action_property(SELF, 'lift feedrate'
              , [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'
               ])) AND verify_rep_name_for_action_property(SELF, 
              'lift feedrate', [ 'feed speed', 'feed per revolution' ])) 
              AND verify_optional_action_property(SELF, 'stepover feedrate'
              )) AND verify_rep_type_for_action_property(SELF, 
              'stepover feedrate', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'
               ])) AND verify_rep_name_for_action_property(SELF, 
              'stepover feedrate', [ 'feed speed', 'feed per revolution' ])
              ;
    WR7: NOT (SELF.description = 'bidirectional') OR (((((
              verify_optional_action_property(SELF, 'feed direction') AND 
              verify_rep_item_for_action_property(SELF, 'feed direction', [
               'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ])) 
              AND verify_optional_action_property(SELF, 
              'stepover direction')) AND 
              verify_rep_item_for_action_property(SELF, 
              'stepover direction', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ])) 
              AND verify_optional_action_property(SELF, 'stepover feedrate'
              )) AND verify_rep_type_for_action_property(SELF, 
              'stepover feedrate', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'
               ])) AND verify_rep_name_for_action_property(SELF, 
              'stepover feedrate', [ 'feed speed', 'feed per revolution' ])
              ;
    WR8: NOT (SELF.description = 'contour') OR (((((((((((((((((
              verify_optional_action_property(SELF, 'feed direction') AND 
              verify_rep_item_for_action_property(SELF, 'feed direction', [
               'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ])) 
              AND verify_optional_action_property(SELF, 
              'back path direction')) AND 
              verify_rep_item_for_action_property(SELF, 
              'back path direction', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ])) 
              AND verify_optional_action_property(SELF, 'lift direction')) 
              AND verify_rep_item_for_action_property(SELF, 
              'lift direction', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ])) 
              AND verify_optional_action_property(SELF, 
              'stepover direction')) AND 
              verify_rep_item_for_action_property(SELF, 
              'stepover direction', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ])) 
              AND verify_optional_action_property(SELF, 'lift height')) AND
               verify_length_measure_action_property(SELF, 'lift height')) 
              AND verify_optional_action_property(SELF, 'lift feedrate')) 
              AND verify_rep_type_for_action_property(SELF, 'lift feedrate'
              , [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'
               ])) AND verify_rep_name_for_action_property(SELF, 
              'lift feedrate', [ 'feed speed', 'feed per revolution' ])) 
              AND verify_optional_action_property(SELF, 'stepover feedrate'
              )) AND verify_rep_type_for_action_property(SELF, 
              'stepover feedrate', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'
               ])) AND verify_rep_name_for_action_property(SELF, 
              'stepover feedrate', [ 'feed speed', 'feed per revolution' ])
              ) AND verify_optional_action_property(SELF, 
              'variable stepover feedrate')) AND 
              verify_rep_type_for_action_property(SELF, 
              'variable stepover feedrate', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'
               ])) AND verify_rep_name_for_action_property(SELF, 
              'variable stepover feedrate', [ 'relative speed' ]);
    WR9: NOT (SELF.description = 'thread') OR ((((((
              verify_required_action_property(SELF, 'cut in amount') AND 
              verify_enumeration_action_property(SELF, 'cut in amount', [ 
              'constant depth', 'variable depth', 'constant removal amount'
               ])) AND verify_required_action_property(SELF, 
              'threading direction')) AND 
              verify_enumeration_action_property(SELF, 
              'threading direction', [ 'left', 'right', 'center', 
              'left zigzag', 'right zigzag' ])) AND 
              verify_optional_action_property(SELF, 'path return angle')) 
              AND verify_angle_measure_action_property(SELF, 
              'path return angle')) AND verify_optional_action_property(
              SELF, 'lift height')) AND 
              verify_length_measure_action_property(SELF, 'lift height');
    WR10: NOT (SELF.description IN [ 'grooving', 'multistep grooving' ]) OR
               ((verify_optional_action_property(SELF, 'grooving direction'
              ) AND verify_rep_item_for_action_property(SELF, 
              'grooving direction', [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' ])) 
              AND verify_optional_action_property(SELF, 'travel distance'))
               AND verify_length_measure_action_property(SELF, 
              'travel distance');
    WR11: NOT (SELF.description = 'multistep grooving') OR 
              verify_optional_action_property(SELF, 'retract distance') AND
               verify_length_measure_action_property(SELF, 
              'retract distance');
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY two_direction_repeat_factor
  SUBTYPE OF (one_direction_repeat_factor);
    second_repeat_factor : vector;
END_ENTITY; -- 10303-46: presentation_appearance_schema

ENTITY type_qualifier;
    name : label;
END_ENTITY; -- 10303-45: qualified_measure_schema

ENTITY unary_boolean_expression
  ABSTRACT SUPERTYPE OF (ONEOF(not_expression, odd_function))
  SUBTYPE OF (boolean_expression, unary_generic_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY unary_function_call
  ABSTRACT SUPERTYPE OF (ONEOF(abs_function, minus_function, sin_function, 
      cos_function, tan_function, asin_function, acos_function, 
      exp_function, log_function, log2_function, log10_function, 
      square_root_function))
  SUBTYPE OF (unary_numeric_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY unary_generic_expression
  ABSTRACT SUPERTYPE
  SUBTYPE OF (generic_expression);
    operand : generic_expression;
END_ENTITY; -- 13584-20: iso13584_generic_expressions_schema

ENTITY unary_numeric_expression
  ABSTRACT SUPERTYPE OF (ONEOF(unary_function_call))
  SUBTYPE OF (numeric_expression, unary_generic_expression);
    SELF\unary_generic_expression.operand : numeric_expression;
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY uncertainty_assigned_representation
  SUBTYPE OF (representation);
    uncertainty : SET [1:?] OF uncertainty_measure_with_unit;
END_ENTITY; -- 10303-43: representation_schema

ENTITY uncertainty_measure_with_unit
  SUBTYPE OF (measure_with_unit);
    name        : label;
    description : OPTIONAL text;
  WHERE
    WR1: valid_measure_value(SELF\measure_with_unit.value_component);
END_ENTITY; -- 10303-43: representation_schema

ENTITY uncertainty_qualifier
  SUPERTYPE OF (ONEOF(standard_uncertainty, qualitative_uncertainty));
    measure_name : label;
    description  : text;
END_ENTITY; -- 10303-45: qualified_measure_schema

ENTITY unconstrained_pair
  SUBTYPE OF (low_order_kinematic_pair);
  DERIVE
    SELF\low_order_kinematic_pair.t_x : BOOLEAN := TRUE;
    SELF\low_order_kinematic_pair.t_y : BOOLEAN := TRUE;
    SELF\low_order_kinematic_pair.t_z : BOOLEAN := TRUE;
    SELF\low_order_kinematic_pair.r_x : BOOLEAN := TRUE;
    SELF\low_order_kinematic_pair.r_y : BOOLEAN := TRUE;
    SELF\low_order_kinematic_pair.r_z : BOOLEAN := TRUE;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY unconstrained_pair_value
  SUBTYPE OF (pair_value);
    SELF\pair_value.applies_to_pair : unconstrained_pair;
    actual_placement : axis2_placement_3d;
END_ENTITY; -- 10303-105: kinematic_state_schema

ENTITY unequally_disposed_geometric_tolerance
  SUBTYPE OF (geometric_tolerance);
    displacement : length_measure_with_unit;
  WHERE
    WR1: 'NUMBER' IN TYPEOF(displacement\measure_with_unit.value_component)
              ;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY uniform_curve
  SUBTYPE OF (b_spline_curve);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY uniform_product_space
  SUBTYPE OF (maths_space, generic_literal);
    base     : maths_space;
    exponent : positive_integer;
  WHERE
    WR1: expression_is_constant(base);
    WR2: no_cyclic_space_reference(SELF, []);
    WR3: base <> the_empty_space;
END_ENTITY; -- 10303-50: mathematical_functions_schema

ENTITY uniform_resource_identifier
  SUBTYPE OF (descriptive_representation_item);
END_ENTITY; -- 10303-1366: tagged_text_representation_mim

ENTITY uniform_surface
  SUBTYPE OF (b_spline_surface);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY uniform_volume
  SUBTYPE OF (b_spline_volume);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY universal_pair
  SUBTYPE OF (low_order_kinematic_pair);
    input_skew_angle : OPTIONAL plane_angle_measure;
  DERIVE
    SELF\low_order_kinematic_pair.t_x : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.t_y : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.t_z : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.r_x : BOOLEAN := TRUE;
    SELF\low_order_kinematic_pair.r_y : BOOLEAN := FALSE;
    SELF\low_order_kinematic_pair.r_z : BOOLEAN := TRUE;
    skew_angle : plane_angle_measure := NVL(input_skew_angle, 0.0);
  WHERE
    WR1: COS(plane_angle_for_pair_in_radian(SELF, skew_angle)) > 0.0;
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY universal_pair_value
  SUBTYPE OF (pair_value);
    SELF\pair_value.applies_to_pair : universal_pair;
    first_rotation_angle  : plane_angle_measure;
    second_rotation_angle : plane_angle_measure;
END_ENTITY; -- 10303-105: kinematic_state_schema

ENTITY universal_pair_with_range
  SUBTYPE OF (universal_pair);
    lower_limit_first_rotation  : OPTIONAL plane_angle_measure;
    upper_limit_first_rotation  : OPTIONAL plane_angle_measure;
    lower_limit_second_rotation : OPTIONAL plane_angle_measure;
    upper_limit_second_rotation : OPTIONAL plane_angle_measure;
  WHERE
    WR1: (NOT EXISTS(lower_limit_first_rotation) OR NOT EXISTS(
              upper_limit_first_rotation)) XOR (lower_limit_first_rotation 
              < upper_limit_first_rotation);
    WR2: (NOT EXISTS(lower_limit_second_rotation) OR NOT EXISTS(
              upper_limit_second_rotation)) XOR (
              lower_limit_second_rotation < upper_limit_second_rotation);
END_ENTITY; -- 10303-105: kinematic_structure_schema

ENTITY usage_association
  SUBTYPE OF (action_method_relationship);
    SELF\action_method_relationship.relating_method : 
                         information_usage_right;
    SELF\action_method_relationship.related_method : 
                         information_usage_right;
  DERIVE
    related  : information_usage_right := SELF\action_method_relationship.
                  related_method;
    relating : information_usage_right := SELF\action_method_relationship.
                  relating_method;
END_ENTITY; -- 10303-1241: information_rights_mim

ENTITY user_defined_curve_font
  SUBTYPE OF (curve_style_font, mapped_item);
END_ENTITY; -- 10303-1749: styled_curve_mim

ENTITY user_defined_marker
  SUBTYPE OF (mapped_item, pre_defined_marker);
END_ENTITY; -- 10303-1003: curve_appearance_mim

ENTITY user_defined_terminator_symbol
  SUBTYPE OF (mapped_item, pre_defined_symbol);
END_ENTITY; -- 10303-1003: curve_appearance_mim

ENTITY value_format_type_qualifier;
    format_type : value_format_type;
END_ENTITY; -- 10303-45: qualified_measure_schema

ENTITY value_function
  SUPERTYPE OF (int_value_function)
  SUBTYPE OF (numeric_expression, unary_generic_expression);
    SELF\unary_generic_expression.operand : string_expression;
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY value_range
  SUBTYPE OF (compound_representation_item);
  WHERE
    WR1: (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SET_REPRESENTATION_ITEM'
               IN TYPEOF(item_element)) AND value_range_wr1(item_element);
    WR2: value_range_wr2(item_element);
    WR3: value_range_wr3(item_element);
END_ENTITY; -- 10303-1106: extended_measure_representation_mim

ENTITY value_representation_item
  SUBTYPE OF (representation_item);
    value_component : measure_value;
  WHERE
    WR1: SIZEOF(QUERY (rep <* using_representations(SELF)| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GLOBAL_UNIT_ASSIGNED_CONTEXT'
               IN TYPEOF(rep.context_of_items)))) = 0;
END_ENTITY; -- 10303-43: representation_schema

ENTITY variable
  ABSTRACT SUPERTYPE OF (ONEOF(numeric_variable, boolean_variable, 
      string_variable))
  SUBTYPE OF (generic_variable);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY variable_semantics
  ABSTRACT SUPERTYPE;
END_ENTITY; -- 13584-20: iso13584_generic_expressions_schema

ENTITY vector
  SUBTYPE OF (geometric_representation_item);
    orientation : direction;
    magnitude   : length_measure;
  WHERE
    WR1: magnitude >= 0.0;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY vector_style
  SUBTYPE OF (curve_style, pre_defined_terminator_symbol);
END_ENTITY; -- 10303-1003: curve_appearance_mim

ENTITY vee_profile
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_COMPONENT_DEFINITION'
               IN TYPEOF(SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) >= 3) AND (SIZEOF(impl_rep.
              used_representation.items) <= 6))) = 0))) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)) AND (SIZEOF(QUERY (
              srwp_i <* pdr.used_representation.items| (((((srwp_i.name = 
              'orientation') OR (srwp_i.name = 'profile angle')) OR (srwp_i
              .name = 'tilt angle')) OR (srwp_i.name = 'profile radius')) 
              OR (srwp_i.name = 'first length')) OR (srwp_i.name = 
              'second length'))) = SIZEOF(pdr.used_representation.items))))
               = 1))) = 1;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN 
              TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0))) = 0
              ;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(it\measure_with_unit.value_component))) AND (it.
              name = 'profile radius'))) <= 1))) = 0))) = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'profile angle'))) = 1))
              ) = 0))) = 0;
    WR8: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
               ] * TYPEOF(it)) = 2) AND (it.name = 'tilt angle'))) = 1))) =
               0))) = 0;
    WR9: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'profile limit'))) <= 1))) = 0;
    WR10: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(it\measure_with_unit.value_component))) AND (it.
              name = 'first length'))) <= 1))) = 0))) = 0;
    WR11: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
               IN TYPEOF(it)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
               IN TYPEOF(it\measure_with_unit.value_component))) AND (it.
              name = 'second length'))) <= 1))) = 0))) = 0;
END_ENTITY; -- 10303-113: machining_feature_schema

ENTITY velocity_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VELOCITY_UNIT' IN 
              TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY velocity_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensional_exponents(1.0, 
              0.0, -1.0, 0.0, 0.0, 0.0, 0.0);
END_ENTITY; -- 10303-41: measure_schema

ENTITY versioned_action_request;
    id          : identifier;
    version     : OPTIONAL label;
    purpose     : text;
    description : OPTIONAL text;
END_ENTITY; -- 10303-41: action_schema

ENTITY versioned_action_request_relationship;
    id                                : identifier;
    name                              : label;
    description                       : OPTIONAL text;
    relating_versioned_action_request : versioned_action_request;
    related_versioned_action_request  : versioned_action_request;
END_ENTITY; -- 10303-41: action_schema

ENTITY vertex
  SUBTYPE OF (topological_representation_item);
END_ENTITY; -- 10303-42: topology_schema

ENTITY vertex_loop
  SUBTYPE OF (loop);
    loop_vertex : vertex;
END_ENTITY; -- 10303-42: topology_schema

ENTITY vertex_point
  SUBTYPE OF (vertex, geometric_representation_item);
    vertex_geometry : point;
END_ENTITY; -- 10303-42: topology_schema

ENTITY vertex_shell
  SUBTYPE OF (topological_representation_item);
    vertex_shell_extent : vertex_loop;
END_ENTITY; -- 10303-42: topology_schema

ENTITY via_arc_point
  SUBTYPE OF (cartesian_point);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE.POINTS'
              )) > 0;
    WR2: 0 = SIZEOF(QUERY (pl <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE.POINTS'
              )| (pl.points[1] = SELF) OR (pl.points[HIINDEX(pl.points)] = 
              SELF)));
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY via_helix_point
  SUBTYPE OF (cartesian_point);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE.POINTS'
              )) > 0;
    WR2: 0 = SIZEOF(QUERY (pl <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE.POINTS'
              )| (pl.points[1] = SELF) OR (pl.points[HIINDEX(pl.points)] = 
              SELF)));
END_ENTITY; -- 10303-238: model_based_integrated_manufacturing_schema

ENTITY view_volume
  SUBTYPE OF (founded_item);
    projection_type            : central_or_parallel;
    projection_point           : cartesian_point;
    view_plane_distance        : length_measure;
    front_plane_distance       : length_measure;
    front_plane_clipping       : BOOLEAN;
    back_plane_distance        : length_measure;
    back_plane_clipping        : BOOLEAN;
    view_volume_sides_clipping : BOOLEAN;
    view_window                : planar_box;
  INVERSE
    camera_usages : SET [1:?] OF camera_model_d3 FOR perspective_of_volume;
  WHERE
    WR1: ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AXIS2_PLACEMENT_2D' 
              IN TYPEOF(SELF\view_volume.view_window.placement)) OR (
              dot_product(representation_item(' ') || 
              geometric_representation_item() || direction([ 0.0, 0.0, 1.0 
              ]), view_window\planar_box.placement\axis2_placement_3d.p[3])
               = 1.0);
    WR2: view_plane_distance = view_window.placement\placement.location.
              coordinates[3];
END_ENTITY; -- 10303-46: presentation_organization_schema

ENTITY visual_appearance_representation
  SUBTYPE OF (representation);
  WHERE
    WR1: ((3 <= SIZEOF(SELF.items)) AND (SIZEOF(SELF.items) <= 9)) AND (
              SIZEOF(QUERY (i <* items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(i)) AND (i.name IN [ 'colour id', 'colour name', 
              'lustre', 'pattern', 'transparency', 'orientation' ]))) + 
              SIZEOF(QUERY (i <* items| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VALUE_RANGE' ]
               * TYPEOF(i)) = 1) AND (i.name IN [ 'refraction index', 
              'opacity' ]))) + SIZEOF(QUERY (i <* items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DOCUMENT_FILE' 
              IN TYPEOF(i)) AND (i.name IN [ 'texture map' ]))) = SIZEOF(
              SELF.items));
    WR2: SIZEOF(QUERY (i <* SELF.items| (i.name = 'colour id'))) = 1;
    WR3: SIZEOF(QUERY (i <* SELF.items| (i.name = 'lustre'))) = 1;
    WR4: SIZEOF(QUERY (i <* SELF.items| (i.name = 'colour name'))) <= 1;
    WR5: SIZEOF(QUERY (i <* SELF.items| (i.name = 'pattern'))) <= 1;
    WR6: SIZEOF(QUERY (i <* SELF.items| (i.name = 'transparency'))) <= 1;
    WR7: SIZEOF(QUERY (i <* SELF.items| (i.name = 'texture map'))) <= 1;
    WR8: SIZEOF(QUERY (i <* SELF.items| (i.name = 'refraction index'))) <= 
              1;
    WR9: SIZEOF(QUERY (i <* SELF.items| (i.name = 'opacity'))) <= 1;
    WR10: SIZEOF(QUERY (i <* SELF.items| (i.name = 'orientation'))) <= 1;
    WR11: (SIZEOF(USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION'
              )) = 1) AND (SIZEOF(QUERY (pdr <* USEDIN(SELF, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION'
              )| (SIZEOF(QUERY (gpa <* USEDIN(pdr.definition, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GENERAL_PROPERTY_ASSOCIATION.DERIVED_DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GENERAL_PROPERTY'
               IN TYPEOF(gpa.base_definition)) AND (gpa\
              general_property_association.base_definition\general_property
              .name = 'surface_condition'))) = 1))) = 1);
END_ENTITY; -- 10303-1110: surface_conditions_mim

ENTITY volume
  SUPERTYPE OF (ONEOF(block_volume, wedge_volume, spherical_volume, 
      cylindrical_volume, eccentric_conical_volume, toroidal_volume, 
      pyramid_volume, b_spline_volume, ellipsoid_volume, tetrahedron_volume
      , hexahedron_volume, locally_refined_spline_volume))
  SUBTYPE OF (geometric_representation_item);
  WHERE
    WR1: SELF\geometric_representation_item.dim = 3;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY volume_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VOLUME_UNIT' IN 
              TYPEOF(SELF\measure_with_unit.unit_component);
END_ENTITY; -- 10303-41: measure_schema

ENTITY volume_unit
  SUBTYPE OF (derived_unit);
  WHERE
    WR1: derive_dimensional_exponents(SELF) = dimensional_exponents(3.0, 
              0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
END_ENTITY; -- 10303-41: measure_schema

ENTITY volume_with_faces
  ABSTRACT SUPERTYPE OF (ONEOF(volume_with_shell, 
      volume_with_parametric_boundary))
  SUBTYPE OF (geometric_representation_item, 
      topological_representation_item);
    volume_geometry : volume;
END_ENTITY; -- 10303-42: topology_schema

ENTITY volume_with_parametric_boundary
  SUBTYPE OF (volume_with_faces);
    outer_bound : LIST [6:6] OF face;
END_ENTITY; -- 10303-42: topology_schema

ENTITY volume_with_shell
  SUBTYPE OF (volume_with_faces);
    outer_bound : closed_shell;
END_ENTITY; -- 10303-42: topology_schema

ENTITY wedge_volume
  SUBTYPE OF (volume);
    position : axis2_placement_3d;
    x        : positive_length_measure;
    y        : positive_length_measure;
    z        : positive_length_measure;
    ltx      : length_measure;
  WHERE
    WR1: (0.0 <= ltx) AND (ltx < x);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY week_of_year_and_day_date
  SUBTYPE OF (date);
    week_component : week_in_year_number;
    day_component  : OPTIONAL day_in_week_number;
  WHERE
    WR1: NOT leap_year(SELF\date.year_component) OR (1 <= day_component + 7
               * (week_component - 1)) AND (day_component + 7 * (
              week_component - 1) <= 366);
    WR2: leap_year(SELF\date.year_component) OR (1 <= day_component + 7 * (
              week_component - 1)) AND (day_component + 7 * (week_component
               - 1) <= 365);
END_ENTITY; -- 10303-41: date_time_schema

ENTITY wire_shell
  SUBTYPE OF (topological_representation_item);
    wire_shell_extent : SET [1:?] OF loop;
  WHERE
    WR1: NOT mixed_loop_type_set(wire_shell_extent);
END_ENTITY; -- 10303-42: topology_schema

ENTITY xor_expression
  SUBTYPE OF (binary_boolean_expression);
    SELF\binary_generic_expression.operands : LIST [2:2] OF 
                  boolean_expression;
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY year_month
  SUBTYPE OF (date);
    month_component : month_in_year_number;
END_ENTITY; -- 10303-41: date_time_schema

RULE alternative_solution_requires_solution_definition FOR 
  (product_definition_formation);
   LOCAL
      solution_versions : SET OF product_definition_formation := [];
   END_LOCAL;
      solution_versions := QUERY (pdf <* product_definition_formation| SIZEOF(QUERY (prpc <* USEDIN(pdf.of_product, 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS')| (prpc.name = 'alternative solution'))) = 1);
  WHERE
    WR1: SIZEOF(QUERY (pdf <* solution_versions| (SIZEOF(QUERY (pd <* 
              USEDIN(pdf, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION.FORMATION'
              )| (pd.frame_of_reference.name = 'alternative definition'))) 
              <> 1))) = 0;
END_RULE; -- 10303-1109: alternative_solution_mim

RULE application_context_requires_ap_definition FOR 
  (application_context,
   application_protocol_definition);
  WHERE
    WR1: 0 = SIZEOF(QUERY (ac <* application_context| NOT (1 = SIZEOF(QUERY
               (apd <* application_protocol_definition| (apd.application 
              :=: ac) AND (apd.application_interpreted_model_schema_name = 
              'model_based_integrated_manufacturing_schema'))))));
END_RULE; -- 10303-238: model_based_integrated_manufacturing_schema

RULE breakdown_element_requires_product_definition FOR 
  (product_definition_formation);
  WHERE
    WR1: SIZEOF(QUERY (pdf <* product_definition_formation| (SIZEOF(QUERY (
              prpc <* USEDIN(pdf.of_product, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
              )| (prpc.name = 'functionality'))) = 1) AND (SIZEOF(QUERY (pd
               <* USEDIN(pdf, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION.FORMATION'
              )| (pd.frame_of_reference.name = 'functional definition'))) <
               1))) = 0;
    WR2: SIZEOF(QUERY (pdf <* product_definition_formation| (SIZEOF(QUERY (
              prpc <* USEDIN(pdf.of_product, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
              )| (prpc.name = 'conceptual design'))) = 1) AND (SIZEOF(QUERY
               (pd <* USEDIN(pdf, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION.FORMATION'
              )| (pd.frame_of_reference.name = 'conceptual definition'))) <
               1))) = 0;
END_RULE; -- 10303-1112: specification_control_mim

RULE chamfer_offset_requires_faces FOR 
  (chamfer_offset,
   property_definition_representation);
  WHERE
    WR1: SIZEOF(QUERY (co <* chamfer_offset| NOT (1 = SIZEOF(QUERY (pdr <* 
              property_definition_representation| ((pdr\
              property_definition_representation.definition\
              property_definition.definition = co) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation))) AND ((pdr\
              property_definition_representation.definition\
              property_definition.definition.description = 'first offset') 
              AND (pdr.used_representation.name = 'first face shape') OR (
              pdr\property_definition_representation.definition\
              property_definition.definition.description = 'second offset')
               AND (pdr.used_representation.name = 'second face shape')))))
              )) = 0;
END_RULE; -- 10303-1814: machining_features_mim

RULE chamfer_requires_faces FOR 
  (chamfer,
   property_definition_representation);
  WHERE
    WR1: SIZEOF(QUERY (cf <* chamfer| NOT (1 = SIZEOF(QUERY (pdr <* 
              property_definition_representation| ((pdr\
              property_definition_representation.definition\
              property_definition.definition = cf) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation))) AND (pdr.
              used_representation.name = 'chamfer face')))))) = 0;
END_RULE; -- 10303-1814: machining_features_mim

RULE compatible_dimension FOR 
  (cartesian_point,
   direction,
   geometric_representation_context);
  WHERE
    WR1: ((SIZEOF(cartesian_point) = 0) AND (SIZEOF(direction) = 0)) AND (
              SIZEOF(geometric_representation_context) = 0) OR 
              check_geometric_dimension(cartesian_point, direction, 
              geometric_representation_context);
END_RULE; -- 10303-42: geometry_schema

RULE consistent_uncertainty FOR 
  (global_uncertainty_assigned_context,
   qualified_representation_item,
   uncertainty_assigned_representation);
  WHERE
    WR1: SIZEOF(QUERY (guac <* global_uncertainty_assigned_context| (SIZEOF
              (QUERY (u1 <* guac.uncertainty| (SIZEOF(QUERY (u2 <* guac.
              uncertainty| (u2.name = u1.name))) > 1))) > 0))) = 0;
    WR2: SIZEOF(QUERY (uar <* uncertainty_assigned_representation| (SIZEOF(
              QUERY (u1 <* uar.uncertainty| (SIZEOF(QUERY (u2 <* uar.
              uncertainty| (u2.name = u1.name))) > 1))) > 0))) = 0;
    WR3: SIZEOF(QUERY (qri <* qualified_representation_item| (SIZEOF(QUERY 
              (u1 <* qri.qualifiers| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.UNCERTAINTY_QUALIFIER'
               IN TYPEOF(u1)) AND (SIZEOF(QUERY (u2 <* qri.qualifiers| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.UNCERTAINTY_QUALIFIER'
               IN TYPEOF(u2)) AND (u2\uncertainty_qualifier.measure_name = 
              u1\uncertainty_qualifier.measure_name))) > 1))) > 0))) = 0;
END_RULE; -- 10303-1782: qualified_measure_mim

RULE constraint_definition_requires_constraint_category FOR 
  (product_definition);
   LOCAL
      constraint_definitions : SET OF product_definition := [];
   END_LOCAL;
      constraint_definitions := QUERY (pd <* product_definition| pd.frame_of_reference.name = 'design constraint definition');
  WHERE
    WR1: SIZEOF(QUERY (pd <* constraint_definitions| (SIZEOF(QUERY (prpc <*
               USEDIN(pd.formation.of_product, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
              )| (prpc.name = 'requirement'))) = 0))) = 0;
END_RULE; -- 10303-1112: specification_control_mim

RULE dependent_instantiable_derived_unit FOR 
  (derived_unit);
  WHERE
    WR1: 0 = SIZEOF(QUERY (du <* derived_unit| NOT (1 <= SIZEOF(USEDIN(du, 
              '')))));
END_RULE; -- 10303-238: model_based_integrated_manufacturing_schema

RULE dependent_instantiable_named_unit FOR 
  (named_unit);
  WHERE
    WR1: 0 = SIZEOF(QUERY (nu <* named_unit| NOT (1 <= SIZEOF(USEDIN(nu, ''
              )))));
END_RULE; -- 10303-238: model_based_integrated_manufacturing_schema

RULE design_constraint_requires_product_definition FOR 
  (product_definition_formation);
  WHERE
    WR1: SIZEOF(QUERY (pdf <* product_definition_formation| (SIZEOF(QUERY (
              prpc <* USEDIN(pdf.of_product, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
              )| (prpc.name = 'requirement'))) > 0) AND (SIZEOF(QUERY (pd 
              <* USEDIN(pdf, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION.FORMATION'
              )| (pd.frame_of_reference.name = 
              'design constraint definition'))) < 1))) = 0;
END_RULE; -- 10303-1112: specification_control_mim

RULE edge_round_requires_faces FOR 
  (edge_round,
   property_definition_representation);
  WHERE
    WR1: 0 = SIZEOF(QUERY (er <* edge_round| NOT (1 = SIZEOF(QUERY (pdr <* 
              property_definition_representation| ((pdr\
              property_definition_representation.definition\
              property_definition.definition = er) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation))) AND (pdr.
              used_representation.name = 'edge round face'))))));
    WR2: SIZEOF(QUERY (er <* edge_round| NOT (1 = SIZEOF(QUERY (pdr <* 
              property_definition_representation| ((pdr\
              property_definition_representation.definition\
              property_definition.definition = er) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation))) AND (pdr.
              used_representation.name = 'first face shape')))))) = 0;
    WR3: SIZEOF(QUERY (er <* edge_round| NOT (1 = SIZEOF(QUERY (pdr <* 
              property_definition_representation| ((pdr\
              property_definition_representation.definition\
              property_definition.definition = er) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation))) AND (pdr.
              used_representation.name = 'second face shape')))))) = 0;
END_RULE; -- 10303-1814: machining_features_mim

RULE external_version_assignments_are_valid FOR 
  (applied_external_identification_assignment);
  WHERE
    WR1: SIZEOF(QUERY (aia <* applied_external_identification_assignment| 
              NOT external_version_assignment_is_valid(aia))) = 0;
END_RULE; -- 10303-1129: external_properties_mim

RULE feature_optional_machining_property_process FOR 
  (shape_aspect,
   process_property_association);
  WHERE
    WR1: 0 = SIZEOF(QUERY (sa <* shape_aspect| ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FEATURE_DEFINITION'
               IN TYPEOF(sa)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TRANSITION_FEATURE'
               IN TYPEOF(sa))) AND NOT (1 >= SIZEOF(QUERY (ppa <* 
              process_property_association| (ppa.property_or_shape :=: sa) 
              AND (ppa.process.name = 'machining'))))));
END_RULE; -- 10303-238: model_based_integrated_manufacturing_schema

RULE machining_feature_definition_constraints FOR 
  (feature_definition);
   LOCAL
      mfds : SET OF feature_definition := [];
   END_LOCAL;
      mfds := QUERY (temp <* feature_definition| 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_FEATURE_DEFINITION' IN TYPEOF(temp));
  WHERE
    WR1: SIZEOF(QUERY (mfd <* mfds| NOT (SIZEOF(QUERY (pdr <* 
              get_property_definition_representations(mfd)| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))) <= 1))) = 0;
    WR2: SIZEOF(QUERY (mfd <* mfds| NOT (SIZEOF(QUERY (pd <* USEDIN(mfd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
               IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN 
              TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0))) = 0
              ))) = 0;
    WR3: SIZEOF(QUERY (mfd <* mfds| NOT (NOT (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROUND_HOLE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOSS', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OUTSIDE_PROFILE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REMOVAL_VOLUME',
               'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FLAT_FACE', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POCKET', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROTRUSION', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RIB_TOP', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROUNDED_END', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SLOT', 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STEP' ] * TYPEOF
              (mfds)) = 1) OR (SIZEOF(QUERY (pdr <* 
              get_property_definition_representations(mfd)| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_SHAPE_REPRESENTATION'
               IN TYPEOF(pdr.used_representation)) AND (pdr.
              used_representation.name = 'maximum feature limit'))) >= 0)))
              ) = 0;
END_RULE; -- 10303-113: machining_feature_schema

RULE material_for_coating_layer FOR 
  (shape_aspect);
   LOCAL
      coating_layers : SET OF shape_aspect := [];
   END_LOCAL;
      coating_layers := QUERY (r <* shape_aspect| r.name = 'coating layer');
  WHERE
    WR1: SIZEOF(QUERY (r <* coating_layers| (SIZEOF(USEDIN(r, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MATERIAL_DESIGNATION.DEFINITIONS'
              )) <> 1))) = 0;
END_RULE; -- 10303-1110: surface_conditions_mim

RULE nc_variable_compatible_initial_value FOR 
  (expression_item_representation_item,
   representation_item_relationship);
  WHERE
    WR1: 0 = SIZEOF(QUERY (nv <* expression_item_representation_item| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NUMERIC_VARIABLE'
               IN TYPEOF(nv.item)) AND NOT (1 >= SIZEOF(QUERY (rir <* 
              representation_item_relationship| (rir.description = 
              'initial value') AND (rir.relating_representation_item :=: nv
              ))))));
    WR2: 0 = SIZEOF(QUERY (rir <* representation_item_relationship| ((((rir
              .description = 'initial value') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPRESSION_ITEM_REPRESENTATION_ITEM'
               IN TYPEOF(rir.relating_representation_item))) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXPRESSION_ITEM_REPRESENTATION_ITEM'
               IN TYPEOF(rir.related_representation_item))) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NUMERIC_VARIABLE'
               IN TYPEOF(rir.relating_representation_item\
              expression_item_representation_item.item))) AND NOT ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.INT_NUMERIC_VARIABLE'
               IN TYPEOF(rir.relating_representation_item\
              expression_item_representation_item.item)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.INT_LITERAL' IN 
              TYPEOF(rir.related_representation_item\
              expression_item_representation_item.item)) OR (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REAL_NUMERIC_VARIABLE'
               IN TYPEOF(rir.relating_representation_item\
              expression_item_representation_item.item)) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REAL_LITERAL' IN
               TYPEOF(rir.related_representation_item\
              expression_item_representation_item.item)))));
END_RULE; -- 10303-238: model_based_integrated_manufacturing_schema

RULE non_uniform_zone_definition_constraint FOR 
  (tolerance_zone_definition,
   tolerance_zone,
   tolerance_zone_form);
   LOCAL
      tzf_set : SET OF tolerance_zone_form := QUERY (tzf <* tolerance_zone_form| tzf\tolerance_zone_form.name = 'non uniform');
      nuzd_set : SET OF tolerance_zone_definition := QUERY (tzd <* tolerance_zone_definition| 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NON_UNIFORM_ZONE_DEFINITION' IN TYPEOF(tzd));
   END_LOCAL;
  WHERE
    WR1: QUERY (tzd <* nuzd_set| (tzd\tolerance_zone_definition.zone\
              tolerance_zone.form IN tzf_set)) = nuzd_set;
END_RULE; -- 10303-1051: geometric_tolerance_mim

RULE plib_property_reference_requires_name_scope FOR 
  (externally_defined_general_property);
   LOCAL
      known_sourced_properties : SET OF externally_defined_general_property;
   END_LOCAL;
      known_sourced_properties := QUERY (edc <* externally_defined_general_property| 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.KNOWN_SOURCE' IN TYPEOF(edc.source));
  WHERE
    WR1: SIZEOF(QUERY (edgp <* known_sourced_properties| (SIZEOF(QUERY (
              edir <* USEDIN(edgp, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXTERNALLY_DEFINED_ITEM_RELATIONSHIP.RELATING_ITEM'
              )| ((edir.name = 'name scope') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXTERNALLY_DEFINED_CLASS'
               IN TYPEOF(edir.related_item))) AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.KNOWN_SOURCE' IN
               TYPEOF(edir.related_item.source)))) <> 1))) = 0;
END_RULE; -- 10303-1129: external_properties_mim

RULE plib_property_reference_requires_version FOR 
  (externally_defined_general_property);
   LOCAL
      plib_properties : SET OF externally_defined_general_property := [];
   END_LOCAL;
      plib_properties := QUERY (edgp <* externally_defined_general_property| ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.KNOWN_SOURCE' IN TYPEOF(edgp.source)) AND ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.KNOWN_SOURCE.NAME' = 'ISO 13584 library'));
  WHERE
    WR1: SIZEOF(QUERY (edgp <* plib_properties| (SIZEOF(QUERY (edir <* 
              USEDIN(edgp, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APPLIED_EXTERNAL_IDENTIFICATION_ASSIGNMENT.ITEMS'
              )| (edir.role.name = 'version'))) <> 1))) = 0;
END_RULE; -- 10303-1129: external_properties_mim

RULE product_concept_feature_requires_category FOR 
  (product_concept_feature);
  WHERE
    WR1: SIZEOF(QUERY (pcf <* product_concept_feature| (SIZEOF([ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.INCLUSION_PRODUCT_CONCEPT_FEATURE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONDITIONAL_CONCEPT_FEATURE'
               ] * TYPEOF(pcf)) = 0) AND (SIZEOF(QUERY (aga <* USEDIN(pcf, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APPLIED_GROUP_ASSIGNMENT.ITEMS'
              )| (aga\group_assignment.role\object_role.name = 
              'specification category member') AND (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_CONCEPT_FEATURE_CATEGORY'
               IN TYPEOF(aga.assigned_group)))) <> 1))) = 0;
END_RULE; -- 10303-1103: product_class_mim

RULE product_definition_replacement_requires_effectivity_assignment FOR 
  (product_definition_relationship);
  WHERE
    WR1: SIZEOF(QUERY (pdr <* product_definition_relationship| (pdr.name = 
              'definition replacement') AND (SIZEOF(USEDIN(pdr, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APPLIED_EFFECTIVITY_ASSIGNMENT.ITEMS'
              )) = 0))) = 0;
END_RULE; -- 10303-1345: item_definition_structure_mim

RULE product_requires_version FOR 
  (product,
   product_definition_formation);
  WHERE
    WR1: 0 = SIZEOF(QUERY (prod <* product| NOT (1 <= SIZEOF(QUERY (pdf <* 
              product_definition_formation| (prod :=: pdf.of_product))))));
END_RULE; -- 10303-238: model_based_integrated_manufacturing_schema

RULE restrict_alternative_definition FOR 
  (product_definition);
   LOCAL
      solution_definitions : SET OF product_definition := [];
   END_LOCAL;
      solution_definitions := QUERY (pd <* product_definition| pd.frame_of_reference.name = 'alternative definition');
  WHERE
    WR1: SIZEOF(QUERY (pd <* solution_definitions| (SIZEOF(QUERY (pdr <* 
              USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_RELATIONSHIP.RELATED_PRODUCT_DEFINITION'
              )| (pdr.name = 'solution alternative definition'))) <> 1))) =
               0;
    WR2: SIZEOF(QUERY (pd <* solution_definitions| NOT (pd.name IN [ 
              'technical', 'supplier', 'technical supplier', '' ]))) = 0;
    WR3: SIZEOF(QUERY (pd <* solution_definitions| (pd.name IN [ 'supplier'
              , 'technical supplier' ]) AND (SIZEOF(QUERY (aoa <* USEDIN(pd
              .formation, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS'
              )| (aoa.role.name = 'supplier'))) <> 1))) = 0;
END_RULE; -- 10303-1109: alternative_solution_mim

RULE restrict_assembly_category FOR 
  (product_definition);
   LOCAL
      assembly_definitions : SET OF product_definition := [];
   END_LOCAL;
      assembly_definitions := QUERY (pd <* product_definition| SIZEOF(QUERY (pdca <* USEDIN(pd, 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_CONTEXT_ASSOCIATION.DEFINITION')| (pdca.frame_of_reference.name = 'assembly definition'))) > 0);
  WHERE
    WR1: SIZEOF(QUERY (pd <* assembly_definitions| NOT ('assembly' IN 
              categories_of_product(pd.formation.of_product)))) = 0;
END_RULE; -- 10303-1345: item_definition_structure_mim

RULE restrict_classification_assignments FOR 
  (applied_classification_assignment);
  WHERE
    WR1: SIZEOF(QUERY (aia <* applied_classification_assignment| NOT 
              class_assignment_is_valid(aia))) = 0;
END_RULE; -- 10303-1111: classification_with_attributes_mim

RULE restrict_collection_category FOR 
  (product_definition);
   LOCAL
      collection_definitions : SET OF product_definition := [];
   END_LOCAL;
      collection_definitions := QUERY (pd <* product_definition| SIZEOF(QUERY (pdca <* USEDIN(pd, 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_CONTEXT_ASSOCIATION.DEFINITION')| (pdca.frame_of_reference.name = 'collection definition'))) > 0);
  WHERE
    WR1: SIZEOF(QUERY (pd <* collection_definitions| NOT ('collection' IN 
              categories_of_product(pd.formation.of_product)))) = 0;
END_RULE; -- 10303-1115: part_collection_mim

RULE restrict_concept_feature_operator FOR 
  (concept_feature_operator);
  WHERE
    WR1: SIZEOF(QUERY (cfo <* concept_feature_operator| NOT (cfo.name IN [ 
              'and', 'or', 'oneof', 'not', 'implication' ]))) = 0;
    WR2: SIZEOF(QUERY (cfo <* concept_feature_operator| (cfo.name = 
              'implication') AND (SIZEOF(QUERY (cfrwc <* USEDIN(cfo, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONCEPT_FEATURE_RELATIONSHIP_WITH_CONDITION.CONDITIONAL_OPERATOR'
              )| (SIZEOF(QUERY (ccf <* USEDIN(cfrwc, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONDITIONAL_CONCEPT_FEATURE.CONDITION'
              )| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.INCLUSION_PRODUCT_CONCEPT_FEATURE'
               IN TYPEOF(ccf)))) > 0))) > 0))) = 0;
    WR3: SIZEOF(QUERY (cfo <* concept_feature_operator| (cfo.name = 'not') 
              AND (SIZEOF(QUERY (cfrwc <* USEDIN(cfo, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONCEPT_FEATURE_RELATIONSHIP_WITH_CONDITION.CONDITIONAL_OPERATOR'
              )| (cfrwc.related_product_concept_feature :<>: cfrwc.
              relating_product_concept_feature))) > 0))) = 0;
END_RULE; -- 10303-1103: product_class_mim

RULE restrict_configuration_design_for_class_breakdown_association FOR 
  (configuration_design);
  WHERE
    WR1: SIZEOF(QUERY (cd <* configuration_design| (cd.name = 
              'functionality') AND (NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION'
               IN TYPEOF(cd.design)) OR (cd.design\product_definition.
              frame_of_reference.name <> 'functional definition')))) = 0;
    WR2: SIZEOF(QUERY (cd <* configuration_design| (cd.name = 'realization'
              ) AND (NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION'
               IN TYPEOF(cd.design)) OR (cd.design\product_definition.
              frame_of_reference.name <> 'conceptual definition')))) = 0;
    WR3: SIZEOF(QUERY (cd <* configuration_design| (cd.name IN [ 
              'functionality', 'realization' ]) AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_CLASS' 
              IN TYPEOF(cd.configuration.item_concept)))) = 0;
END_RULE; -- 10303-1112: specification_control_mim

RULE restrict_configuration_design_for_design_constraint FOR 
  (configuration_design);
  WHERE
    WR1: SIZEOF(QUERY (cd <* configuration_design| (cd.name = 
              'design constraint usage') AND (NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION'
               IN TYPEOF(cd.design)) OR (cd.design\product_definition.
              frame_of_reference.name <> 'design constraint definition'))))
               = 0;
END_RULE; -- 10303-1112: specification_control_mim

RULE restrict_group_relationship_for_classification_hierarchy FOR 
  (group_relationship);
  WHERE
    WR1: SIZEOF(QUERY (gr <* group_relationship| (gr\group_relationship.
              name = 'class hierarchy') AND (NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CLASS' IN TYPEOF
              (gr\group_relationship.related_group)) OR NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CLASS' IN TYPEOF
              (gr\group_relationship.relating_group))))) = 0;
END_RULE; -- 10303-1111: classification_with_attributes_mim

RULE restrict_group_relationship_for_specification_category FOR 
  (group_relationship);
  WHERE
    WR1: SIZEOF(QUERY (gr <* group_relationship| (gr.name = 
              'specification category hierarchy') AND (NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_CONCEPT_FEATURE_CATEGORY'
               IN TYPEOF(gr.related_group)) OR NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_CONCEPT_FEATURE_CATEGORY'
               IN TYPEOF(gr.relating_group))))) = 0;
END_RULE; -- 10303-1103: product_class_mim

RULE restrict_language_assignment_per_attribute FOR 
  (attribute_language_assignment);
  WHERE
    WR1: SIZEOF(QUERY (ala1 <* attribute_language_assignment| (SIZEOF(QUERY
               (it <* ala1.items| (SIZEOF(QUERY (ala2 <* USEDIN(it, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ATTRIBUTE_LANGUAGE_ASSIGNMENT.ITEMS'
              )| (ala1\attribute_classification_assignment.attribute_name =
               ala2\attribute_classification_assignment.attribute_name) AND
               (ala1\attribute_classification_assignment.assigned_class :=:
               ala2\attribute_classification_assignment.assigned_class))) >
               1))) > 0))) = 0;
END_RULE; -- 10303-1105: multi_linguism_mim

RULE restrict_part_occurrence FOR 
  (product_definition);
   LOCAL
      part_occurrences : SET OF product_definition := QUERY (pd <* product_definition| pd.frame_of_reference.name = 'part occurrence');
   END_LOCAL;
  WHERE
    WR1: SIZEOF(QUERY (pd <* part_occurrences| NOT (pd.name IN [ 
              'single instance', 'selected instance', 'quantified instance'
              , 'specified instance' ]))) = 0;
    WR2: SIZEOF(QUERY (pd <* part_occurrences| (SIZEOF(QUERY (pdr <* USEDIN
              (pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_RELATIONSHIP.RELATED_PRODUCT_DEFINITION'
              )| (pdr.name = 'definition usage'))) <> 1) AND (SIZEOF(QUERY 
              (cd <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONFIGURATION_DESIGN.DESIGN'
              )| (cd.name = 'occurrence usage definition') AND NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_IDENTIFICATION'
               IN TYPEOF(cd.configuration)))) <> 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* part_occurrences| (SIZEOF(QUERY (cd <* USEDIN(
              pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_RELATIONSHIP.RELATED_PRODUCT_DEFINITION'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_USAGE'
               IN TYPEOF(cd)))) = 0) AND (SIZEOF(USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_OCCURRENCE_RELATIONSHIP.OCCURRENCE'
              )) = 0))) = 0;
    WR4: SIZEOF(QUERY (pd <* part_occurrences| (pd.name = 
              'selected instance') AND NOT 
              valid_selected_instance_representation(pd))) = 0;
    WR5: SIZEOF(QUERY (pd <* part_occurrences| (pd.name = 
              'quantified instance') AND (SIZEOF(QUERY (ppd <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| (ppd.name = 'occurrence quantity') AND (SIZEOF(QUERY (pdr 
              <* USEDIN(ppd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| ((pdr.used_representation.name = 'quantity') AND (SIZEOF(
              pdr.used_representation.items) = 1)) AND (SIZEOF(QUERY (i <* 
              pdr.used_representation.items| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
               IN TYPEOF(i)) AND (i.name = 'quantity measure'))) = 1))) = 1
              ))) = 0))) = 0;
    WR6: SIZEOF(QUERY (pd <* part_occurrences| (pd.name = 
              'specified instance') AND (SIZEOF(QUERY (pdor <* USEDIN(pd, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_OCCURRENCE_RELATIONSHIP.OCCURRENCE'
              )| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SPECIFIED_HIGHER_USAGE_OCCURRENCE'
               IN TYPEOF(pdor.occurrence_usage)))) = 0))) = 0;
END_RULE; -- 10303-1063: product_occurrence_mim

RULE restrict_part_occurrence_category FOR 
  (product_definition);
   LOCAL
      part_occurrences : SET OF product_definition := QUERY (pd <* product_definition| pd.frame_of_reference.name = 'part occurrence');
   END_LOCAL;
  WHERE
    WR1: SIZEOF(QUERY (pd <* part_occurrences| (SIZEOF(QUERY (prpc <* 
              USEDIN(pd.formation.of_product, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
              )| (prpc.name IN [ 'part', 'raw material', 'tool' ]))) = 0)))
               = 0;
END_RULE; -- 10303-1063: product_occurrence_mim

RULE restrict_product_definitions_for_base_element FOR 
  (product_definition_relationship);
  WHERE
    WR1: SIZEOF(QUERY (pdr <* product_definition_relationship| (pdr.name = 
              'solution alternative definition') AND (NOT (pdr.
              relating_product_definition.frame_of_reference.name IN [ 
              'alternative definition', 'functional definition', 
              'conceptual definition' ]) OR (pdr.related_product_definition
              .frame_of_reference.name <> 'alternative definition')))) = 0;
END_RULE; -- 10303-1109: alternative_solution_mim

RULE restrict_product_definitions_for_collection FOR 
  (product_definition_relationship);
  WHERE
    WR1: SIZEOF(QUERY (pdr <* product_definition_relationship| (pdr.name = 
              'collection membership') AND (((pdr.
              relating_product_definition.frame_of_reference.name <> 
              'part definition') OR (pdr.related_product_definition.
              frame_of_reference.name <> 'part occurrence')) OR (SIZEOF(
              QUERY (pdca <* USEDIN(pdr.relating_product_definition, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_CONTEXT_ASSOCIATION.DEFINITION'
              )| (pdca.role.name = 'part definition type') AND (pdca.
              frame_of_reference.name = 'collection definition'))) = 0)))) 
              = 0;
END_RULE; -- 10303-1115: part_collection_mim

RULE restrict_product_definitions_for_definition_usage FOR 
  (product_definition_relationship);
  WHERE
    WR1: SIZEOF(QUERY (pdr <* product_definition_relationship| (pdr.name = 
              'definition usage') AND ((pdr.relating_product_definition.
              frame_of_reference.name <> 'part definition') OR (pdr.
              related_product_definition.frame_of_reference.name <> 
              'part occurrence')))) = 0;
END_RULE; -- 10303-1063: product_occurrence_mim

RULE restrict_product_definitions_for_design_constraint_association FOR 
  (product_definition_relationship);
  WHERE
    WR1: SIZEOF(QUERY (pdr <* product_definition_relationship| (pdr.name = 
              'design constraint association') AND ((pdr.
              relating_product_definition.frame_of_reference.name <> 
              'design constraint definition') OR NOT (pdr.
              related_product_definition.frame_of_reference.name IN [ 
              'alternative definition', 'functional definition', 
              'conceptual definition' ])))) = 0;
END_RULE; -- 10303-1112: specification_control_mim

RULE restrict_product_definitions_for_part_definition_relationship FOR 
  (product_definition_relationship);
  WHERE
    WR1: SIZEOF(QUERY (pdr <* product_definition_relationship| (pdr.name IN
               [ 'geometrical relationship', 'definition replacement' ]) 
              AND ((pdr.relating_product_definition.frame_of_reference.name
               <> 'part definition') OR (pdr.related_product_definition.
              frame_of_reference.name <> 'part definition')))) = 0;
END_RULE; -- 10303-1345: item_definition_structure_mim

RULE restrict_representation_for_surface_condition FOR 
  (property_definition_representation);
  WHERE
    WR1: SIZEOF(QUERY (pdr <* property_definition_representation| NOT 
              surface_condition_correlation(pdr.definition, pdr.
              used_representation))) = 0;
END_RULE; -- 10303-1110: surface_conditions_mim

RULE restrict_support_structure_category FOR 
  (product_definition);
   LOCAL
      support_structures : SET OF product_definition := [];
   END_LOCAL;
      support_structures := QUERY (pd <* product_definition| SIZEOF(QUERY (prpc <* USEDIN(pd.formation.of_product, 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS')| (prpc.name = 'additive manufacturing support structure'))) <> 0);
  WHERE
    WR1: SIZEOF(QUERY (pd <* support_structures| (SIZEOF(QUERY (prpc <* 
              USEDIN(pd.formation.of_product, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
              )| (prpc.name = 'part'))) <> 0))) = 0;
END_RULE; -- 10303-1835: additive_manufacturing_part_and_build_information_mim

RULE restrict_treatment_result FOR 
  (representation);
   LOCAL
      treatment_results : SET OF representation := [];
   END_LOCAL;
      treatment_results := QUERY (r <* representation| r.name = 'treatment result');
  WHERE
    WR1: (SIZEOF(QUERY (r <* treatment_results| (SIZEOF(r.items) > 2))) = 0
              ) AND (SIZEOF(QUERY (r <* treatment_results| (SIZEOF(QUERY (i
               <* r.items| NOT (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
               IN TYPEOF(i)))) > 0))) = 0);
    WR2: SIZEOF(QUERY (r <* treatment_results| (SIZEOF(QUERY (i <* r.items|
               (i.name = 'result'))) = 0))) = 0;
    WR3: SIZEOF(QUERY (r <* treatment_results| (SIZEOF(QUERY (i <* r.items|
               (i.name = 'purpose'))) > 1))) = 0;
END_RULE; -- 10303-1110: surface_conditions_mim

RULE selected_instance_usage_requires_representation FOR 
  (assembly_component_usage);
   LOCAL
      selected_instance_usages : SET OF assembly_component_usage := QUERY (acr <* assembly_component_usage| acr.name = 'selected instance usage');
   END_LOCAL;
  WHERE
    WR1: SIZEOF(QUERY (acr <* selected_instance_usages| NOT 
              valid_selected_instance_representation(acr))) = 0;
END_RULE; -- 10303-1063: product_occurrence_mim

RULE solution_definition_requires_solution_category FOR 
  (product_definition);
   LOCAL
      solution_definitions : SET OF product_definition := [];
   END_LOCAL;
      solution_definitions := QUERY (pd <* product_definition| pd.frame_of_reference.name = 'alternative definition');
  WHERE
    WR1: SIZEOF(QUERY (pd <* solution_definitions| (SIZEOF(QUERY (prpc <* 
              USEDIN(pd.formation.of_product, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
              )| (prpc.name = 'alternative solution'))) = 0))) = 0;
END_RULE; -- 10303-1109: alternative_solution_mim

RULE styled_curve FOR 
  (styled_item);
  WHERE
    WR1: SIZEOF(QUERY (si <* styled_item| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE' IN TYPEOF
              (si.item)) AND (SIZEOF(QUERY (psa <* si.styles| (SIZEOF(QUERY
               (cs <* psa.styles| (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_STYLE' IN 
              TYPEOF(cs)))) > 0))) <> 1))) = 0;
END_RULE; -- 10303-1001: appearance_assignment_mim

RULE subtype_exclusiveness_geometric_tolerance FOR 
  (geometric_tolerance);
  WHERE
    WR1: SIZEOF(QUERY (gt <* geometric_tolerance| NOT type_check_function(
              gt, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANGULARITY_TOLERANCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_RUNOUT_TOLERANCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COAXIALITY_TOLERANCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONCENTRICITY_TOLERANCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CYLINDRICITY_TOLERANCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FLATNESS_TOLERANCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINE_PROFILE_TOLERANCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PARALLELISM_TOLERANCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PERPENDICULARITY_TOLERANCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITION_TOLERANCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROUNDNESS_TOLERANCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STRAIGHTNESS_TOLERANCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_PROFILE_TOLERANCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SYMMETRY_TOLERANCE'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TOTAL_RUNOUT_TOLERANCE'
               ], 2))) = 0;
END_RULE; -- 10303-47: shape_tolerance_schema

RULE subtype_exclusiveness_representation_item FOR 
  (representation_item);
  WHERE
    WR1: SIZEOF(QUERY (cri <* representation_item| NOT type_check_function(
              cri, [ 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VALUE_REPRESENTATION_ITEM'
              , 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOUND_REPRESENTATION_ITEM'
               ], 3))) = 0;
END_RULE; -- 10303-1106: extended_measure_representation_mim

RULE text_font_usage FOR 
  (externally_defined_text_font,
   pre_defined_text_font);
  WHERE
    WR1: SIZEOF(QUERY (pdtf <* pre_defined_text_font| (SIZEOF(USEDIN(pdtf, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEXT_LITERAL.FONT'
              )) = 0))) = 0;
    WR2: SIZEOF(QUERY (edtf <* externally_defined_text_font| (SIZEOF(USEDIN
              (edtf, 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TEXT_LITERAL.FONT'
              )) = 0))) = 0;
END_RULE; -- 10303-1136: text_appearance_mim

RULE tolerance_zone_form_name_constraint FOR 
  (tolerance_zone_form);
   LOCAL
      names : SET OF STRING := [ 'within a circle', 'within a cylinder', 'within a cone', 'within a single complex surface', 'within a sphere', 'between two coaxial cylinders', 'between two concentric circles', 'between two equidistant curves', 'between two equidistant complex lines or two parallel straight lines', 'between two equidistant complex surfaces or two parallel planes', 'between two equidistant surfaces', 'between two non-equidistant complex lines or two non-parallel straight lines', 'between two non-equidistant complex surfaces or two non-parallel planes', 'between two parallel circles on a conical surface', 'between two parallel circles of the same diameter', 'non uniform', 'cylindrical or circular', 'spherical', 'unknown' ];
      pass : BOOLEAN := TRUE;
   END_LOCAL;
      REPEAT i := 1 TO SIZEOF(tolerance_zone_form) WHILE pass;
         pass := tolerance_zone_form[i].name IN names;
      END_REPEAT;
  WHERE
    WR1: pass;
END_RULE; -- 10303-1051: geometric_tolerance_mim

RULE transition_feature_on_part_boundary FOR 
  (transition_feature);
  WHERE
    WR1: SIZEOF(QUERY (tf <* transition_feature| NOT tf.
              product_definitional)) = 0;
END_RULE; -- 10303-1814: machining_features_mim

RULE tri_identification_within_product_definition FOR 
  (product_definition,
   topological_representation_item,
   representation);
   LOCAL
      associated_representations : SET [1:?] OF representation := [];
      items : SET [1:?] OF topological_representation_item := [];
      pd_items : SET [1:?] OF topological_representation_item := [];
      pass : BOOLEAN := TRUE;
   END_LOCAL;
      REPEAT i := LOINDEX(product_definition) TO HIINDEX(product_definition) WHILE pass;
         pd_items := get_tri_for_pd(product_definition[i]);
         associated_representations := get_representations_for_items(pd_items);
         items := get_tri_in_representations(associated_representations) + pd_items;
         IF SIZEOF(items) > 0 THEN
            IF SIZEOF(QUERY (ai <* items| NOT (EXISTS(ai\topological_representation_item.permanent_id) OR EXISTS(ai\topological_representation_item.permanent_aggregate_id)))) > 0 THEN
               pass := valid_tri_ids(items);
            END_IF;
         END_IF;
      END_REPEAT;
  WHERE
    WR1: pass;
END_RULE; -- 10303-113: mechanical_design_schema

RULE unique_datum_system FOR 
  (product_definition_shape,
   datum_system);
   LOCAL
      ds : SET OF datum_system := [];
      sa : SET OF shape_aspect := [];
      pass : BOOLEAN := TRUE;
   END_LOCAL;
      REPEAT ii := 1 TO SIZEOF(product_definition_shape) WHILE pass;
         sa := bag_to_set(USEDIN(product_definition_shape[ii], 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'));
         REPEAT iii := 1 TO SIZEOF(sa) WHILE pass;
            ds := QUERY (ds <* sa| 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DATUM_SYSTEM' IN TYPEOF(ds));
            REPEAT i := 1 TO SIZEOF(ds);
               REPEAT j := 1 TO SIZEOF(ds);
                  IF i <> j THEN
                     IF ds[i]\datum_system.constituents = ds[j]\datum_system.constituents THEN
                        pass := FALSE;
                     END_IF;
                  END_IF;
               END_REPEAT;
            END_REPEAT;
         END_REPEAT;
      END_REPEAT;
  WHERE
    WR1: pass;
END_RULE; -- 10303-47: shape_aspect_definition_schema

RULE unique_gdt_element_id_constraint FOR 
  (product_definition_shape,
   dimensional_location,
   dimensional_size,
   shape_aspect,
   shape_aspect_relationship);
   LOCAL
      bss : BAG OF STRING := [];
      ds : SET OF dimensional_size := QUERY (ds <* dimensional_size| EXISTS(ds\dimensional_size.id));
      sa : SET OF shape_aspect := QUERY (sa <* shape_aspect| EXISTS(sa\shape_aspect.id));
      sar : SET OF shape_aspect_relationship := QUERY (sar <* shape_aspect_relationship| EXISTS(sar\shape_aspect_relationship.id));
      ssa : SET OF shape_aspect := [];
      pass : BOOLEAN := TRUE;
   END_LOCAL;
      REPEAT ii := 1 TO SIZEOF(product_definition_shape) WHILE pass;
         bss := [];
         ssa := bag_to_set(USEDIN(product_definition_shape[ii], 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'));
         REPEAT i := 1 TO SIZEOF(ds);
            IF ds[i]\dimensional_size.applies_to IN ssa THEN
               bss := bss + ds[i]\dimensional_size.id;
            END_IF;
         END_REPEAT;
         REPEAT i := 1 TO SIZEOF(sa);
            IF sa[i] IN ssa THEN
               bss := bss + sa[i]\shape_aspect.id;
            END_IF;
         END_REPEAT;
         REPEAT i := 1 TO SIZEOF(sar);
            IF sar[i]\shape_aspect_relationship.relating_shape_aspect IN ssa THEN
               bss := bss + sar[i]\shape_aspect_relationship.id;
            END_IF;
         END_REPEAT;
         IF SIZEOF(bag_to_set(bss)) <> SIZEOF(bss) THEN
            pass := FALSE;
         END_IF;
      END_REPEAT;
  WHERE
    WR1: pass;
END_RULE; -- 10303-1051: geometric_tolerance_mim

FUNCTION above_plane (
    p1 : cartesian_point;
    p2 : cartesian_point;
    p3 : cartesian_point;
    p4 : cartesian_point 
    ) : REAL;
  LOCAL
    dir2 : direction := dummy_gri || direction([ 1.0, 0.0, 0.0 ]);
    dir3 : direction := dummy_gri || direction([ 1.0, 0.0, 0.0 ]);
    dir4 : direction := dummy_gri || direction([ 1.0, 0.0, 0.0 ]);
    val : REAL;
    mag : REAL;
  END_LOCAL;
    IF p1.dim <> 3 THEN
      RETURN (?);
    END_IF;
    REPEAT i := 1 TO 3;
      dir2.direction_ratios[i] := p2.coordinates[i] - p1.coordinates[i];
      dir3.direction_ratios[i] := p3.coordinates[i] - p1.coordinates[i];
      dir4.direction_ratios[i] := p4.coordinates[i] - p1.coordinates[i];
      mag := dir4.direction_ratios[i] * dir4.direction_ratios[i];
    END_REPEAT;
    mag := SQRT(mag);
    val := mag * dot_product(dir4, cross_product(dir2, dir3).orientation);
    RETURN (val);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION acyclic (
    arg1 : generic_expression;
    arg2 : SET OF generic_expression 
    ) : BOOLEAN;
  LOCAL
    result : BOOLEAN := TRUE;
  END_LOCAL;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SIMPLE_GENERIC_EXPRESSION'
       IN TYPEOF(arg1) THEN
      RETURN (TRUE);
    END_IF;
    IF arg1 IN arg2 THEN
      RETURN (FALSE);
    END_IF;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.UNARY_GENERIC_EXPRESSION'
       IN TYPEOF(arg1) THEN
      RETURN (acyclic(arg1\unary_generic_expression.operand, arg2 + [ arg1 
        ]));
    END_IF;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BINARY_GENERIC_EXPRESSION'
       IN TYPEOF(arg1) THEN
      RETURN (acyclic(arg1\binary_generic_expression.operands[1], (arg2 + [
         arg1 ])) AND acyclic(arg1\binary_generic_expression.operands[2], (
        arg2 + [ arg1 ])));
    END_IF;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MULTIPLE_ARITY_GENERIC_EXPRESSION'
       IN TYPEOF(arg1) THEN
      result := TRUE;
      REPEAT i := 1 TO SIZEOF(arg1\multiple_arity_generic_expression.
        operands);
        result := result AND acyclic(arg1\multiple_arity_generic_expression
          .operands[i], (arg2 + [ arg1 ]));
      END_REPEAT;
      RETURN (result);
    END_IF;
    RETURN (result);
END_FUNCTION; -- 13584-20: iso13584_generic_expressions_schema

FUNCTION acyclic_classification_assignment_relationship (
    relation          : classification_assignment_relationship;
    relatives         : SET [1:?] OF classification_assignment;
    specific_relation : STRING 
    ) : BOOLEAN;
  LOCAL
    x : SET OF classification_assignment_relationship;
  END_LOCAL;
    IF relation.relating IN relatives THEN
      RETURN (FALSE);
    END_IF;
    x := QUERY (car <* bag_to_set(USEDIN(relation.relating, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CLASSIFICATION_ASSIGNMENT_RELATIONSHIP.RELATED'
      ))| specific_relation IN TYPEOF(car));
    REPEAT i := 1 TO HIINDEX(x);
      IF NOT acyclic_classification_assignment_relationship(x[i], (
        relatives + relation.relating), specific_relation) THEN
        RETURN (FALSE);
      END_IF;
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION; -- 10303-41: management_resources_schema

FUNCTION acyclic_composite_text (
    start_composite : composite_text;
    child_text      : SET [1:?] OF text_or_character 
    ) : LOGICAL;
  LOCAL
    i : INTEGER;
    local_composite_text : SET [0:?] OF composite_text;
    local_annotation_text : SET [0:?] OF annotation_text;
    local_children : SET [0:?] OF text_or_character;
  END_LOCAL;
    local_composite_text := QUERY (child <* child_text| 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_TEXT' IN 
      TYPEOF(child));
    IF SIZEOF(local_composite_text) > 0 THEN
      REPEAT i := 1 TO HIINDEX(local_composite_text);
        IF start_composite :=: local_composite_text[i] THEN
          RETURN (FALSE);
        END_IF;
      END_REPEAT;
    END_IF;
    local_children := child_text;
    IF SIZEOF(local_composite_text) > 0 THEN
      REPEAT i := 1 TO HIINDEX(local_composite_text);
        local_children := local_children + local_composite_text[i].
          collected_text;
      END_REPEAT;
    END_IF;
    local_annotation_text := QUERY (child <* child_text| 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT' IN 
      TYPEOF(child));
    IF SIZEOF(local_annotation_text) > 0 THEN
      REPEAT i := 1 TO HIINDEX(local_annotation_text);
        local_children := local_children + QUERY (item <* 
          local_annotation_text[i]\mapped_item.mapping_source.
          mapped_representation.items| (SIZEOF([ 
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT', 
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_TEXT' ] * 
          TYPEOF(item)) > 0));
      END_REPEAT;
    END_IF;
    IF local_children :<>: child_text THEN
      RETURN (acyclic_composite_text(start_composite, local_children));
    ELSE
      RETURN (TRUE);
    END_IF;
END_FUNCTION; -- 10303-46: presentation_definition_schema

FUNCTION acyclic_curve_replica (
    rep    : curve_replica;
    parent : curve 
    ) : BOOLEAN;
    IF NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_REPLICA' IN 
      TYPEOF(parent)) THEN
      RETURN (TRUE);
    END_IF;
    IF parent :=: rep THEN
      RETURN (FALSE);
    ELSE
      RETURN (acyclic_curve_replica(rep, parent\curve_replica.parent_curve)
        );
    END_IF;
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION acyclic_external_identification_assignment_relationship (
    relation          : external_identification_assignment_relationship;
    relatives         : SET [1:?] OF external_identification_assignment;
    specific_relation : STRING 
    ) : BOOLEAN;
  LOCAL
    x : SET OF external_identification_assignment_relationship;
  END_LOCAL;
    IF relation.relating IN relatives THEN
      RETURN (FALSE);
    END_IF;
    x := QUERY (eiar <* bag_to_set(USEDIN(relation.relating, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXTERNAL_IDENTIFICATION_ASSIGNMENT_RELATIONSHIP.RELATED'
      ))| specific_relation IN TYPEOF(eiar));
    REPEAT i := 1 TO HIINDEX(x);
      IF NOT acyclic_external_identification_assignment_relationship(x[i], 
        (relatives + relation.relating), specific_relation) THEN
        RETURN (FALSE);
      END_IF;
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION; -- 10303-41: management_resources_schema

FUNCTION acyclic_geometric_tolerance_relationship (
    relation          : geometric_tolerance_relationship;
    relatives         : SET [1:?] OF geometric_tolerance;
    specific_relation : STRING 
    ) : BOOLEAN;
  LOCAL
    x : SET OF geometric_tolerance_relationship;
  END_LOCAL;
    IF relation.relating_geometric_tolerance IN relatives THEN
      RETURN (FALSE);
    END_IF;
    x := QUERY (geotol <* bag_to_set(USEDIN(relation.
      relating_geometric_tolerance, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_TOLERANCE_RELATIONSHIP.RELATED_GEOMETRIC_TOLERANCE'
      ))| specific_relation IN TYPEOF(geotol));
    REPEAT i := 1 TO HIINDEX(x);
      IF NOT acyclic_geometric_tolerance_relationship(x[i], (relatives + 
        relation.relating_geometric_tolerance), specific_relation) THEN
        RETURN (FALSE);
      END_IF;
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION; -- 10303-47: shape_tolerance_schema

FUNCTION acyclic_mapped_representation (
    mi : mapped_item 
    ) : BOOLEAN;
  LOCAL
    rms : SET OF representation_map;
    mis : SET OF mapped_item;
    rs1 : SET OF representation;
    rs2 : SET OF representation;
  END_LOCAL;
    rs1 := using_representations(mi);
    rs2 := [];
    REPEAT WHILE SIZEOF(rs1) > 0;
      REPEAT i := 1 TO HIINDEX(rs1);
        rms := bag_to_set(USEDIN(rs1[i], 
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_MAP.MAPPED_REPRESENTATION'
          ));
        IF SIZEOF(rms) > 0 THEN
          REPEAT j := 1 TO HIINDEX(rms);
            mis := bag_to_set(USEDIN(rms[i], 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM.MAPPING_SOURCE'
              ));
            IF SIZEOF(mis) > 0 THEN
              REPEAT j := 1 TO HIINDEX(mis);
                IF mis[i] :=: mi THEN
                  RETURN (FALSE);
                END_IF;
                rs2 := rs2 + using_representations(mis[i]);
              END_REPEAT;
            END_IF;
          END_REPEAT;
        END_IF;
      END_REPEAT;
      rs1 := rs2;
      rs2 := [];
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION; -- 10303-43: representation_schema

FUNCTION acyclic_point_replica (
    rep    : point_replica;
    parent : point 
    ) : BOOLEAN;
    IF NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_REPLICA' IN 
      TYPEOF(parent)) THEN
      RETURN (TRUE);
    END_IF;
    IF parent :=: rep THEN
      RETURN (FALSE);
    ELSE
      RETURN (acyclic_point_replica(rep, parent\point_replica.parent_pt));
    END_IF;
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION acyclic_product_category_relationship (
    relation : product_category_relationship;
    children : SET OF product_category 
    ) : BOOLEAN;
  LOCAL
    x : SET OF product_category_relationship;
    local_children : SET OF product_category;
  END_LOCAL;
    REPEAT i := 1 TO HIINDEX(children);
      IF relation.category :=: children[i] THEN
        RETURN (FALSE);
      END_IF;
    END_REPEAT;
    x := bag_to_set(USEDIN(relation.category, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_CATEGORY_RELATIONSHIP.SUB_CATEGORY'
      ));
    local_children := children + relation.category;
    IF SIZEOF(x) > 0 THEN
      REPEAT i := 1 TO HIINDEX(x);
        IF NOT acyclic_product_category_relationship(x[i], local_children) 
          THEN
          RETURN (FALSE);
        END_IF;
      END_REPEAT;
    END_IF;
    RETURN (TRUE);
END_FUNCTION; -- 10303-41: product_definition_schema

FUNCTION acyclic_product_definition_relationship (
    relation          : product_definition_relationship;
    relatives         : SET [1:?] OF product_definition_or_reference;
    specific_relation : STRING 
    ) : BOOLEAN;
  LOCAL
    x : SET OF product_definition_relationship;
  END_LOCAL;
    IF relation.relating_product_definition IN relatives THEN
      RETURN (FALSE);
    END_IF;
    x := QUERY (pd <* bag_to_set(USEDIN(relation.
      relating_product_definition, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_RELATIONSHIP.RELATED_PRODUCT_DEFINITION'
      ))| specific_relation IN TYPEOF(pd));
    REPEAT i := 1 TO HIINDEX(x);
      IF NOT acyclic_product_definition_relationship(x[i], (relatives + 
        relation.relating_product_definition), specific_relation) THEN
        RETURN (FALSE);
      END_IF;
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION; -- 10303-41: product_definition_schema

FUNCTION acyclic_product_definition_specified_occurrence (
    pdso       : product_definition_specified_occurrence;
    definition : product_definition_occurrence 
    ) : BOOLEAN;
    IF NOT (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SPECIFIED_OCCURRENCE'
       IN TYPEOF(definition)) THEN
      RETURN (TRUE);
    END_IF;
    IF definition :=: pdso THEN
      RETURN (FALSE);
    ELSE
      RETURN (acyclic_product_definition_specified_occurrence(pdso, 
        definition\product_definition_occurrence.definition));
    END_IF;
END_FUNCTION; -- 10303-44: product_structure_schema

FUNCTION acyclic_representation_relationship (
    relation          : representation_relationship;
    relatives         : SET [1:?] OF representation;
    specific_relation : STRING 
    ) : BOOLEAN;
  LOCAL
    x : SET OF representation_relationship;
  END_LOCAL;
    IF relation.rep_1 IN relatives THEN
      RETURN (FALSE);
    END_IF;
    x := QUERY (r <* bag_to_set(USEDIN(relation.rep_1, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_RELATIONSHIP.REP_2'
      ))| specific_relation IN TYPEOF(r));
    REPEAT i := 1 TO HIINDEX(x);
      IF NOT acyclic_representation_relationship(x[i], (relatives + 
        relation.rep_1), specific_relation) THEN
        RETURN (FALSE);
      END_IF;
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION; -- 10303-43: representation_schema

FUNCTION acyclic_shape_aspect_occurrence (
    sao        : shape_aspect_occurrence;
    definition : shape_aspect_or_characterized_object 
    ) : BOOLEAN;
    IF NOT (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT_OCCURRENCE'
       IN TYPEOF(definition)) THEN
      RETURN (TRUE);
    END_IF;
    IF definition :=: sao THEN
      RETURN (FALSE);
    ELSE
      RETURN (acyclic_shape_aspect_occurrence(sao, definition\
        shape_aspect_occurrence.definition));
    END_IF;
END_FUNCTION; -- 10303-41: product_property_definition_schema

FUNCTION acyclic_solid_replica (
    rep    : solid_replica;
    parent : solid_model 
    ) : BOOLEAN;
    IF NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SOLID_REPLICA' IN 
      TYPEOF(parent)) THEN
      RETURN (TRUE);
    END_IF;
    IF parent :=: rep THEN
      RETURN (FALSE);
    ELSE
      RETURN (acyclic_solid_replica(rep, parent\solid_replica.parent_solid)
        );
    END_IF;
END_FUNCTION; -- 10303-42: geometric_model_schema

FUNCTION acyclic_surface_replica (
    rep    : surface_replica;
    parent : surface 
    ) : BOOLEAN;
    IF NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_REPLICA' 
      IN TYPEOF(parent)) THEN
      RETURN (TRUE);
    END_IF;
    IF parent :=: rep THEN
      RETURN (FALSE);
    ELSE
      RETURN (acyclic_surface_replica(rep, parent\surface_replica.
        parent_surface));
    END_IF;
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION advanced_face_properties (
    testface : face 
    ) : BOOLEAN;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ADVANCED_FACE' IN 
      TYPEOF(testface) THEN
      RETURN (TRUE);
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SUBFACE' IN TYPEOF(
      testface) THEN
      RETURN (advanced_face_properties(testface\subface.parent_face));
    ELSE
      RETURN (FALSE);
    END_IF;
END_FUNCTION; -- 10303-521: aic_manifold_subsurface

FUNCTION all_members_of_es (
    sv : SET OF maths_value;
    es : elementary_space_enumerators 
    ) : LOGICAL;
  CONSTANT
    base_types : SET OF STRING := [ 'NUMBER', 'COMPLEX_NUMBER_LITERAL', 
      'REAL', 'INTEGER', 'LOGICAL', 'BOOLEAN', 'STRING', 'BINARY', 
      'MATHS_SPACE', 'MATHS_FUNCTION', 'LIST', 
      'ELEMENTARY_SPACE_ENUMERATORS', 'ORDERING_TYPE', 'LOWER_UPPER', 
      'SYMMETRY_TYPE', 'ELEMENTARY_FUNCTION_ENUMERATORS', 'OPEN_CLOSED', 
      'SPACE_CONSTRAINT_TYPE', 'REPACKAGE_OPTIONS', 'EXTENSION_OPTIONS' ];
  END_CONSTANT;
  LOCAL
    v : maths_value;
    key_type : STRING := '';
    types : SET OF STRING;
    ge : generic_expression;
    cum : LOGICAL := TRUE;
    vspc : maths_space;
  END_LOCAL;
    IF NOT EXISTS(sv) OR NOT EXISTS(es) THEN
      RETURN (FALSE);
    END_IF;
    CASE es OF
      es_numbers :
          key_type := 'NUMBER';
      es_complex_numbers :
          key_type := 'COMPLEX_NUMBER_LITERAL';
      es_reals :
          key_type := 'REAL';
      es_integers :
          key_type := 'INTEGER';
      es_logicals :
          key_type := 'LOGICAL';
      es_booleans :
          key_type := 'BOOLEAN';
      es_strings :
          key_type := 'STRING';
      es_binarys :
          key_type := 'BINARY';
      es_maths_spaces :
          key_type := 'MATHS_SPACE';
      es_maths_functions :
          key_type := 'MATHS_FUNCTION';
      es_generics :
          RETURN (TRUE);
    END_CASE;
    REPEAT i := 1 TO SIZEOF(sv);
      IF NOT EXISTS(sv[i]) THEN
        RETURN (FALSE);
      END_IF;
      v := simplify_maths_value(sv[i]);
      types := stripped_typeof(v);
      IF key_type IN types THEN
        SKIP;
      END_IF;
      IF (es = es_numbers) AND ('COMPLEX_NUMBER_LITERAL' IN types) THEN
        SKIP;
      END_IF;
      IF SIZEOF(base_types * types) > 0 THEN
        RETURN (FALSE);
      END_IF;
      ge := v;
      IF has_values_space(ge) THEN
        vspc := values_space_of(ge);
        IF NOT subspace_of_es(vspc, es) THEN
          IF NOT compatible_spaces(vspc, make_elementary_space(es)) THEN
            RETURN (FALSE);
          END_IF;
          cum := UNKNOWN;
        END_IF;
      ELSE
        cum := UNKNOWN;
      END_IF;
      IF cum = FALSE THEN
        RETURN (FALSE);
      END_IF;
    END_REPEAT;
    RETURN (cum);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION any_space_satisfies (
    sc  : space_constraint_type;
    spc : maths_space 
    ) : BOOLEAN;
  LOCAL
    spc_id : elementary_space_enumerators;
  END_LOCAL;
    IF (sc = sc_equal) OR NOT ('ELEMENTARY_SPACE' IN stripped_typeof(spc)) 
      THEN
      RETURN (FALSE);
    END_IF;
    spc_id := spc\elementary_space.space_id;
    IF sc = sc_subspace THEN
      RETURN (bool(spc_id = es_generics));
    END_IF;
    IF sc = sc_member THEN
      RETURN (bool((spc_id = es_generics) OR (spc_id = es_maths_spaces)));
    END_IF;
    RETURN (?);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION aspect_ratio (
    p : planar_box 
    ) : positive_ratio_measure;
    IF (p.size_in_x > 0.0) AND (p.size_in_y > 0.0) THEN
      RETURN (p.size_in_x / p.size_in_y);
    ELSE
      RETURN (?);
    END_IF;
END_FUNCTION; -- 10303-46: presentation_organization_schema

FUNCTION assoc_product_space (
    ts1 : tuple_space;
    ts2 : tuple_space 
    ) : tuple_space;
  LOCAL
    types1 : SET OF STRING := stripped_typeof(ts1);
    types2 : SET OF STRING := stripped_typeof(ts2);
    up1 : uniform_product_space := make_uniform_product_space(the_reals, 1)
      ;
    up2 : uniform_product_space := make_uniform_product_space(the_reals, 1)
      ;
    lp1 : listed_product_space := the_zero_tuple_space;
    lp2 : listed_product_space := the_zero_tuple_space;
    lps : listed_product_space := the_zero_tuple_space;
    et1 : extended_tuple_space := the_tuples;
    et2 : extended_tuple_space := the_tuples;
    ets : extended_tuple_space := the_tuples;
    use_up1 : BOOLEAN;
    use_up2 : BOOLEAN;
    use_lp1 : BOOLEAN;
    use_lp2 : BOOLEAN;
    factors : LIST OF maths_space := [];
    tspace : tuple_space;
  END_LOCAL;
    IF 'UNIFORM_PRODUCT_SPACE' IN types1 THEN
      up1 := ts1;
      use_up1 := TRUE;
      use_lp1 := FALSE;
    ELSE
      IF 'LISTED_PRODUCT_SPACE' IN types1 THEN
        lp1 := ts1;
        use_up1 := FALSE;
        use_lp1 := TRUE;
      ELSE
        IF NOT ('EXTENDED_TUPLE_SPACE' IN types1) THEN
          RETURN (?);
        END_IF;
        et1 := ts1;
        use_up1 := FALSE;
        use_lp1 := FALSE;
      END_IF;
    END_IF;
    IF 'UNIFORM_PRODUCT_SPACE' IN types2 THEN
      up2 := ts2;
      use_up2 := TRUE;
      use_lp2 := FALSE;
    ELSE
      IF 'LISTED_PRODUCT_SPACE' IN types2 THEN
        lp2 := ts2;
        use_up2 := FALSE;
        use_lp2 := TRUE;
      ELSE
        IF NOT ('EXTENDED_TUPLE_SPACE' IN types2) THEN
          RETURN (?);
        END_IF;
        et2 := ts2;
        use_up2 := FALSE;
        use_lp2 := FALSE;
      END_IF;
    END_IF;
    IF use_up1 THEN
      IF use_up2 THEN
        IF up1.base = up2.base THEN
          tspace := make_uniform_product_space(up1.base, up1.exponent + up2
            .exponent);
        ELSE
          factors := [ up1.base, up2.base ];
          tspace := make_listed_product_space(factors);
        END_IF;
      ELSE
        IF use_lp2 THEN
          factors := [ up1.base ];
          factors := factors + lp2.factors;
          tspace := make_listed_product_space(factors);
        ELSE
          tspace := assoc_product_space(up1, et2.base);
          tspace := make_extended_tuple_space(tspace, et2.extender);
        END_IF;
      END_IF;
    ELSE
      IF use_lp1 THEN
        IF use_up2 THEN
          factors := [ up2.base ];
          factors := lp1.factors + factors;
          tspace := make_listed_product_space(factors);
        ELSE
          IF use_lp2 THEN
            tspace := make_listed_product_space(lp1.factors + lp2.factors);
          ELSE
            tspace := assoc_product_space(lp1, et2.base);
            tspace := make_extended_tuple_space(tspace, et2.extender);
          END_IF;
        END_IF;
      ELSE
        IF use_up2 THEN
          IF et1.extender = up2.base THEN
            tspace := assoc_product_space(et1.base, up2);
            tspace := make_extended_tuple_space(tspace, et1.extender);
          ELSE
            RETURN (?);
          END_IF;
        ELSE
          IF use_lp2 THEN
            factors := lp2.factors;
            REPEAT i := 1 TO SIZEOF(factors);
              IF et1.extender <> factors[i] THEN
                RETURN (?);
              END_IF;
            END_REPEAT;
            tspace := assoc_product_space(et1.base, lp2);
            tspace := make_extended_tuple_space(tspace, et1.extender);
          ELSE
            IF et1.extender = et2.extender THEN
              tspace := assoc_product_space(et1, et2.base);
            ELSE
              RETURN (?);
            END_IF;
          END_IF;
        END_IF;
      END_IF;
    END_IF;
    RETURN (tspace);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION associated_surface (
    arg : pcurve_or_surface 
    ) : surface;
  LOCAL
    surf : surface;
  END_LOCAL;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PCURVE' IN TYPEOF(arg) 
      THEN
      surf := arg\pcurve.basis_surface;
    ELSE
      surf := arg;
    END_IF;
    RETURN (surf);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION atan2 (
    y : REAL;
    x : REAL 
    ) : REAL;
  LOCAL
    r : REAL;
  END_LOCAL;
    IF (y = 0.0) AND (x = 0.0) THEN
      RETURN (?);
    END_IF;
    r := ATAN(y, x);
    IF x < 0.0 THEN
      IF y < 0.0 THEN
        r := r - PI;
      ELSE
        r := r + PI;
      END_IF;
    END_IF;
    RETURN (r);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION bag_to_set (
    the_bag : BAG OF GENERIC : INTYPE 
    ) : SET OF GENERIC : INTYPE;
  LOCAL
    the_set : SET OF GENERIC : INTYPE := [];
  END_LOCAL;
    IF SIZEOF(the_bag) > 0 THEN
      REPEAT i := 1 TO HIINDEX(the_bag);
        the_set := the_set + the_bag[i];
      END_REPEAT;
    END_IF;
    RETURN (the_set);
END_FUNCTION; -- 10303-41: support_resource_schema

FUNCTION base_axis (
    dim   : INTEGER;
    axis1 : direction;
    axis2 : direction;
    axis3 : direction 
    ) : LIST [2:3] OF direction;
  LOCAL
    u : LIST [2:3] OF direction;
    factor : REAL;
    d1 : direction;
    d2 : direction;
  END_LOCAL;
    IF dim = 3 THEN
      d1 := NVL(normalise(axis3), dummy_gri || direction([ 0.0, 0.0, 1.0 ])
        );
      d2 := first_proj_axis(d1, axis1);
      u := [ d2, second_proj_axis(d1, d2, axis2), d1 ];
    ELSE
      IF EXISTS(axis1) THEN
        d1 := normalise(axis1);
        u := [ d1, orthogonal_complement(d1) ];
        IF EXISTS(axis2) THEN
          factor := dot_product(axis2, u[2]);
          IF factor < 0.0 THEN
            u[2].direction_ratios[1] := -u[2].direction_ratios[1];
            u[2].direction_ratios[2] := -u[2].direction_ratios[2];
          END_IF;
        END_IF;
      ELSE
        IF EXISTS(axis2) THEN
          d1 := normalise(axis2);
          u := [ orthogonal_complement(d1), d1 ];
          u[1].direction_ratios[1] := -u[1].direction_ratios[1];
          u[1].direction_ratios[2] := -u[1].direction_ratios[2];
        ELSE
          u := [ dummy_gri || direction([ 1.0, 0.0 ]), dummy_gri || 
            direction([ 0.0, 1.0 ]) ];
        END_IF;
      END_IF;
    END_IF;
    RETURN (u);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION bool (
    lgcl : LOGICAL 
    ) : BOOLEAN;
    IF NOT EXISTS(lgcl) THEN
      RETURN (FALSE);
    END_IF;
    IF lgcl <> TRUE THEN
      RETURN (FALSE);
    END_IF;
    RETURN (TRUE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION boolean_choose (
    b       : BOOLEAN;
    choice1 : GENERIC : item;
    choice2 : GENERIC : item 
    ) : GENERIC : item;
    IF b THEN
      RETURN (choice1);
    ELSE
      RETURN (choice2);
    END_IF;
END_FUNCTION; -- 10303-42: topology_schema

FUNCTION build_2axes (
    ref_direction : direction 
    ) : LIST [2:2] OF direction;
  LOCAL
    d : direction := NVL(normalise(ref_direction), dummy_gri || direction([
       1.0, 0.0 ]));
  END_LOCAL;
    RETURN ([ d, orthogonal_complement(d) ]);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION build_axes (
    axis          : direction;
    ref_direction : direction 
    ) : LIST [3:3] OF direction;
  LOCAL
    d1 : direction;
    d2 : direction;
  END_LOCAL;
    d1 := NVL(normalise(axis), dummy_gri || direction([ 0.0, 0.0, 1.0 ]));
    d2 := first_proj_axis(d1, ref_direction);
    RETURN ([ d2, normalise(cross_product(d1, d2))\vector.orientation, d1 ]
      );
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION categories_of_product (
    obj : product 
    ) : SET OF STRING;
  LOCAL
    category_assignments : BAG OF product_category;
    categories : SET OF STRING := [];
  END_LOCAL;
    category_assignments := USEDIN(obj, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
      );
    REPEAT i := LOINDEX(category_assignments) TO HIINDEX(
      category_assignments) BY 1;
      categories := categories + category_assignments[i].name;
    END_REPEAT;
    RETURN (categories);
END_FUNCTION; -- 10303-41: product_definition_schema

FUNCTION check_geometric_dimension (
    capt : SET [0:?] OF cartesian_point;
    dir  : SET [0:?] OF direction;
    grc  : SET [1:?] OF geometric_representation_context 
    ) : BOOLEAN;
  LOCAL
    globaldim : INTEGER := 0;
    reps : SET [0:?] OF representation := [];
    result : BOOLEAN := TRUE;
  END_LOCAL;
    globaldim := geometric_dimensionalities_in_contexts(grc);
    IF globaldim > 0 THEN
      IF SIZEOF(capt) > 0 THEN
        REPEAT i := 1 TO HIINDEX(capt);
          IF HIINDEX(capt[i].coordinates) <> globaldim THEN
            RETURN (FALSE);
          END_IF;
        END_REPEAT;
      END_IF;
      IF SIZEOF(dir) > 0 THEN
        REPEAT i := 1 TO HIINDEX(dir);
          IF HIINDEX(dir[i].direction_ratios) <> globaldim THEN
            RETURN (FALSE);
          END_IF;
        END_REPEAT;
      END_IF;
      RETURN (result);
    ELSE
      IF SIZEOF(capt) > 0 THEN
        REPEAT i := 1 TO HIINDEX(capt);
          reps := using_representations(capt[i]);
          IF SIZEOF(reps) > 0 THEN
            REPEAT j := 1 TO HIINDEX(reps);
              IF HIINDEX(capt[i].coordinates) <> reps[j].context_of_items\
                geometric_representation_context.coordinate_space_dimension
                 THEN
                RETURN (FALSE);
              END_IF;
            END_REPEAT;
          ELSE
            RETURN (FALSE);
          END_IF;
        END_REPEAT;
      END_IF;
      IF SIZEOF(dir) > 0 THEN
        REPEAT i := 1 TO HIINDEX(dir);
          reps := using_representations(dir[i]);
          IF SIZEOF(reps) > 0 THEN
            REPEAT j := 1 TO HIINDEX(reps);
              IF HIINDEX(dir[i].direction_ratios) <> reps[j].
                context_of_items\geometric_representation_context.
                coordinate_space_dimension THEN
                RETURN (FALSE);
              END_IF;
            END_REPEAT;
          ELSE
            RETURN (FALSE);
          END_IF;
        END_REPEAT;
      END_IF;
    END_IF;
    RETURN (result);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION check_sparse_index_domain (
    idxdom : tuple_space;
    base   : zero_or_one;
    shape  : LIST [1:?] OF positive_integer;
    order  : ordering_type 
    ) : BOOLEAN;
  LOCAL
    mthspc : maths_space;
    interval : finite_integer_interval;
    i : INTEGER;
  END_LOCAL;
    mthspc := factor1(idxdom);
    interval := mthspc;
    IF order = by_rows THEN
      i := 1;
    ELSE
      i := 2;
    END_IF;
    RETURN (bool((interval.min <= base) AND (interval.max >= base + shape[i
      ])));
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION check_sparse_index_to_loc (
    index_range : tuple_space;
    loc_domain  : tuple_space 
    ) : BOOLEAN;
  LOCAL
    temp : maths_space;
    idx_rng_itvl : finite_integer_interval;
    loc_dmn_itvl : finite_integer_interval;
  END_LOCAL;
    temp := factor1(index_range);
    IF schema_prefix + 'TUPLE_SPACE' IN TYPEOF(temp) THEN
      temp := factor1(temp);
    END_IF;
    IF NOT (schema_prefix + 'FINITE_INTEGER_INTERVAL' IN TYPEOF(temp)) THEN
      RETURN (FALSE);
    END_IF;
    idx_rng_itvl := temp;
    temp := factor1(loc_domain);
    IF schema_prefix + 'TUPLE_SPACE' IN TYPEOF(temp) THEN
      temp := factor1(temp);
    END_IF;
    IF NOT (schema_prefix + 'FINITE_INTEGER_INTERVAL' IN TYPEOF(temp)) THEN
      RETURN (FALSE);
    END_IF;
    loc_dmn_itvl := temp;
    RETURN (bool((loc_dmn_itvl.min <= idx_rng_itvl.min) AND (idx_rng_itvl.
      max <= loc_dmn_itvl.max + 1)));
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION check_sparse_loc_range (
    locrng : tuple_space;
    base   : zero_or_one;
    shape  : LIST [1:?] OF positive_integer;
    order  : ordering_type 
    ) : BOOLEAN;
  LOCAL
    mthspc : maths_space;
    interval : finite_integer_interval;
    i : INTEGER;
  END_LOCAL;
    IF space_dimension(locrng) <> 1 THEN
      RETURN (FALSE);
    END_IF;
    mthspc := factor1(locrng);
    IF NOT (schema_prefix + 'FINITE_INTEGER_INTERVAL' IN TYPEOF(mthspc)) 
      THEN
      RETURN (FALSE);
    END_IF;
    interval := mthspc;
    IF order = by_rows THEN
      i := 2;
    ELSE
      i := 1;
    END_IF;
    RETURN (bool((interval.min >= base) AND (interval.max <= base + shape[i
      ] - 1)));
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION check_text_alignment (
    ct : composite_text 
    ) : BOOLEAN;
  LOCAL
    a : SET OF text_alignment := [];
  END_LOCAL;
    REPEAT i := 1 TO HIINDEX(ct.collected_text);
      a := a + [ ct.collected_text[i]\text_literal.alignment ];
    END_REPEAT;
    RETURN (SIZEOF(a) = 1);
END_FUNCTION; -- 10303-504: aic_draughting_annotation

FUNCTION check_text_font (
    ct : composite_text 
    ) : BOOLEAN;
  LOCAL
    f : SET OF font_select := [];
  END_LOCAL;
    REPEAT i := 1 TO HIINDEX(ct.collected_text);
      f := f + [ ct.collected_text[i]\text_literal.font ];
    END_REPEAT;
    RETURN (SIZEOF(f) <= 1);
END_FUNCTION; -- 10303-504: aic_draughting_annotation

FUNCTION class_assignment_is_valid (
    aia : applied_classification_assignment 
    ) : BOOLEAN;
  LOCAL
    item : classification_item;
    role : classification_role;
  END_LOCAL;
    role := aia\classification_assignment.role;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CLASS_SYSTEM' IN TYPEOF
      (aia\classification_assignment.assigned_class) THEN
      IF role\classification_role.name <> 'class system membership' THEN
        RETURN (FALSE);
      END_IF;
      REPEAT i := LOINDEX(aia\applied_classification_assignment.items) TO 
        HIINDEX(aia\applied_classification_assignment.items);
        item := aia\applied_classification_assignment.items[i];
        IF SIZEOF([ 
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CHARACTERIZED_CLASS'
           ] * TYPEOF(item)) = 0 THEN
          RETURN (FALSE);
        END_IF;
      END_REPEAT;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CHARACTERIZED_CLASS' IN
       TYPEOF(aia\classification_assignment.assigned_class) THEN
      IF NOT (role\classification_role.name IN [ 'definitional', 
        'non-definitional', '' ]) THEN
        RETURN (FALSE);
      END_IF;
      REPEAT i := LOINDEX(aia\applied_classification_assignment.items) TO 
        HIINDEX(aia\applied_classification_assignment.items);
        item := aia\applied_classification_assignment.items[i];
        IF SIZEOF([ 
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CLASSIFIED_ITEM' ] *
           TYPEOF(item)) = 0 THEN
          RETURN (FALSE);
        END_IF;
      END_REPEAT;
    END_IF;
    IF role\classification_role.name = 'definitional' THEN
      IF NOT (SIZEOF(QUERY (it <* aia\applied_classification_assignment.
        items| NOT (SIZEOF([ 
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT', 
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_FORMATION'
        , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION' 
        ] * TYPEOF(it)) = 1))) = 0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    RETURN (TRUE);
END_FUNCTION; -- 10303-1111: classification_with_attributes_mim

FUNCTION closed_shell_reversed (
    a_shell : closed_shell 
    ) : oriented_closed_shell;
  LOCAL
    the_reverse : oriented_closed_shell;
  END_LOCAL;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORIENTED_CLOSED_SHELL' 
      IN TYPEOF(a_shell) THEN
      the_reverse := dummy_tri || connected_face_set(a_shell\
        connected_face_set.cfs_faces) || closed_shell() || 
        oriented_closed_shell(a_shell\oriented_closed_shell.
        closed_shell_element, NOT a_shell\oriented_closed_shell.orientation
        );
    ELSE
      the_reverse := dummy_tri || connected_face_set(a_shell\
        connected_face_set.cfs_faces) || closed_shell() || 
        oriented_closed_shell(a_shell, FALSE);
    END_IF;
    RETURN (the_reverse);
END_FUNCTION; -- 10303-42: topology_schema

FUNCTION collect_joints (
    items : SET [1:?] OF pair_representation_relationship 
    ) : SET OF kinematic_joint;
  LOCAL
    result : SET OF kinematic_joint := [];
  END_LOCAL;
    REPEAT i := 1 TO HIINDEX(items);
      result := result + items[i].transformation_operator.joint;
    END_REPEAT;
    RETURN (result);
END_FUNCTION; -- 10303-105: kinematic_structure_schema

FUNCTION compare_basis_and_coef (
    basis : LIST [1:?] OF b_spline_basis;
    coef  : maths_function 
    ) : BOOLEAN;
  LOCAL
    shape : LIST OF positive_integer;
  END_LOCAL;
    IF NOT EXISTS(basis) OR NOT EXISTS(coef) THEN
      RETURN (FALSE);
    END_IF;
    shape := shape_of_array(coef);
    IF NOT EXISTS(shape) THEN
      RETURN (FALSE);
    END_IF;
    IF SIZEOF(shape) < SIZEOF(basis) THEN
      RETURN (FALSE);
    END_IF;
    REPEAT i := 1 TO SIZEOF(basis);
      IF (basis[i].num_basis = shape[i]) <> TRUE THEN
        RETURN (FALSE);
      END_IF;
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION compatible_complex_number_regions (
    sp1 : maths_space;
    sp2 : maths_space 
    ) : BOOLEAN;
  LOCAL
    typenames : SET OF STRING := stripped_typeof(sp1);
    crgn1 : cartesian_complex_number_region;
    crgn2 : cartesian_complex_number_region;
    prgn1 : polar_complex_number_region;
    prgn2 : polar_complex_number_region;
    prgn1c2 : polar_complex_number_region;
    prgn2c1 : polar_complex_number_region;
    sp1_is_crgn : BOOLEAN;
    sp2_is_crgn : BOOLEAN;
  END_LOCAL;
    IF 'CARTESIAN_COMPLEX_NUMBER_REGION' IN typenames THEN
      sp1_is_crgn := TRUE;
      crgn1 := sp1;
    ELSE
      IF 'POLAR_COMPLEX_NUMBER_REGION' IN typenames THEN
        sp1_is_crgn := FALSE;
        prgn1 := sp1;
      ELSE
        RETURN (TRUE);
      END_IF;
    END_IF;
    typenames := stripped_typeof(sp2);
    IF 'CARTESIAN_COMPLEX_NUMBER_REGION' IN typenames THEN
      sp2_is_crgn := TRUE;
      crgn2 := sp2;
    ELSE
      IF 'POLAR_COMPLEX_NUMBER_REGION' IN typenames THEN
        sp2_is_crgn := FALSE;
        prgn2 := sp2;
      ELSE
        RETURN (TRUE);
      END_IF;
    END_IF;
    IF sp1_is_crgn AND sp2_is_crgn THEN
      RETURN (compatible_intervals(crgn1.real_constraint, crgn2.
        real_constraint) AND compatible_intervals(crgn1.imag_constraint, 
        crgn2.imag_constraint));
    END_IF;
    IF ((NOT sp1_is_crgn AND NOT sp2_is_crgn) AND (prgn1.centre.real_part =
       prgn2.centre.real_part)) AND (prgn1.centre.imag_part = prgn2.centre.
      imag_part) THEN
      IF NOT compatible_intervals(prgn1.distance_constraint, prgn2.
        distance_constraint) THEN
        RETURN (FALSE);
      END_IF;
      IF compatible_intervals(prgn1.direction_constraint, prgn2.
        direction_constraint) THEN
        RETURN (TRUE);
      END_IF;
      IF (prgn1.direction_constraint.max > PI) AND (prgn2.
        direction_constraint.max < PI) THEN
        RETURN (compatible_intervals(prgn2.direction_constraint, 
          make_finite_real_interval(-PI, open, prgn1.direction_constraint.
          max - 2.0 * PI, prgn1.direction_constraint.max_closure)));
      END_IF;
      IF (prgn2.direction_constraint.max > PI) AND (prgn1.
        direction_constraint.max < PI) THEN
        RETURN (compatible_intervals(prgn1.direction_constraint, 
          make_finite_real_interval(-PI, open, prgn2.direction_constraint.
          max - 2.0 * PI, prgn2.direction_constraint.max_closure)));
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF sp1_is_crgn AND NOT sp2_is_crgn THEN
      crgn2 := enclose_pregion_in_cregion(prgn2);
      prgn1 := enclose_cregion_in_pregion(crgn1, prgn2.centre);
      RETURN (compatible_complex_number_regions(crgn1, crgn2) AND 
        compatible_complex_number_regions(prgn1, prgn2));
    END_IF;
    IF NOT sp1_is_crgn AND sp2_is_crgn THEN
      crgn1 := enclose_pregion_in_cregion(prgn1);
      prgn2 := enclose_cregion_in_pregion(crgn2, prgn1.centre);
      RETURN (compatible_complex_number_regions(crgn1, crgn2) AND 
        compatible_complex_number_regions(prgn1, prgn2));
    END_IF;
    prgn1c2 := enclose_pregion_in_pregion(prgn1, prgn2.centre);
    prgn2c1 := enclose_pregion_in_pregion(prgn2, prgn1.centre);
    RETURN (compatible_complex_number_regions(prgn1, prgn2c1) AND 
      compatible_complex_number_regions(prgn1c2, prgn2));
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION compatible_es_values (
    esval1 : elementary_space_enumerators;
    esval2 : elementary_space_enumerators 
    ) : BOOLEAN;
  LOCAL
    esval1_is_numeric : LOGICAL;
    esval2_is_numeric : LOGICAL;
  END_LOCAL;
    IF ((esval1 = esval2) OR (esval1 = es_generics)) OR (esval2 = 
      es_generics) THEN
      RETURN (TRUE);
    END_IF;
    esval1_is_numeric := (esval1 >= es_numbers) AND (esval1 <= es_integers)
      ;
    esval2_is_numeric := (esval2 >= es_numbers) AND (esval2 <= es_integers)
      ;
    IF esval1_is_numeric AND (esval2 = es_numbers) OR esval2_is_numeric AND
       (esval1 = es_numbers) THEN
      RETURN (TRUE);
    END_IF;
    IF esval1_is_numeric XOR esval2_is_numeric THEN
      RETURN (FALSE);
    END_IF;
    IF (esval1 = es_logicals) AND (esval2 = es_booleans) OR (esval1 = 
      es_booleans) AND (esval2 = es_logicals) THEN
      RETURN (TRUE);
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION compatible_intervals (
    sp1 : maths_space;
    sp2 : maths_space 
    ) : BOOLEAN;
  LOCAL
    amin : REAL;
    amax : REAL;
  END_LOCAL;
    IF min_exists(sp1) AND max_exists(sp2) THEN
      amin := real_min(sp1);
      amax := real_max(sp2);
      IF amin > amax THEN
        RETURN (FALSE);
      END_IF;
      IF amin = amax THEN
        RETURN (min_included(sp1) AND max_included(sp2));
      END_IF;
    END_IF;
    IF min_exists(sp2) AND max_exists(sp1) THEN
      amin := real_min(sp2);
      amax := real_max(sp1);
      IF amin > amax THEN
        RETURN (FALSE);
      END_IF;
      IF amin = amax THEN
        RETURN (min_included(sp2) AND max_included(sp1));
      END_IF;
    END_IF;
    RETURN (TRUE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION compatible_spaces (
    sp1 : maths_space;
    sp2 : maths_space 
    ) : BOOLEAN;
  LOCAL
    types1 : SET OF STRING := stripped_typeof(sp1);
    types2 : SET OF STRING := stripped_typeof(sp2);
    lgcl : LOGICAL := UNKNOWN;
    m : INTEGER;
    n : INTEGER;
    s1 : maths_space;
    s2 : maths_space;
  END_LOCAL;
    IF 'FINITE_SPACE' IN types1 THEN
      REPEAT i := 1 TO SIZEOF(sp1\finite_space.members);
        lgcl := member_of(sp1\finite_space.members[i], sp2);
        IF lgcl <> FALSE THEN
          RETURN (TRUE);
        END_IF;
      END_REPEAT;
      RETURN (FALSE);
    END_IF;
    IF 'FINITE_SPACE' IN types2 THEN
      REPEAT i := 1 TO SIZEOF(sp2\finite_space.members);
        lgcl := member_of(sp2\finite_space.members[i], sp1);
        IF lgcl <> FALSE THEN
          RETURN (TRUE);
        END_IF;
      END_REPEAT;
      RETURN (FALSE);
    END_IF;
    IF 'ELEMENTARY_SPACE' IN types1 THEN
      IF sp1\elementary_space.space_id = es_generics THEN
        RETURN (TRUE);
      END_IF;
      IF 'ELEMENTARY_SPACE' IN types2 THEN
        RETURN (compatible_es_values(sp1\elementary_space.space_id, sp2\
          elementary_space.space_id));
      END_IF;
      IF (('FINITE_INTEGER_INTERVAL' IN types2) OR (
        'INTEGER_INTERVAL_FROM_MIN' IN types2)) OR (
        'INTEGER_INTERVAL_TO_MAX' IN types2) THEN
        RETURN (compatible_es_values(sp1\elementary_space.space_id, 
          es_integers));
      END_IF;
      IF (('FINITE_REAL_INTERVAL' IN types2) OR ('REAL_INTERVAL_FROM_MIN' 
        IN types2)) OR ('REAL_INTERVAL_TO_MAX' IN types2) THEN
        RETURN (compatible_es_values(sp1\elementary_space.space_id, 
          es_reals));
      END_IF;
      IF ('CARTESIAN_COMPLEX_NUMBER_REGION' IN types2) OR (
        'POLAR_COMPLEX_NUMBER_REGION' IN types2) THEN
        RETURN (compatible_es_values(sp1\elementary_space.space_id, 
          es_complex_numbers));
      END_IF;
      IF 'TUPLE_SPACE' IN types2 THEN
        RETURN (FALSE);
      END_IF;
      IF 'FUNCTION_SPACE' IN types2 THEN
        RETURN (bool(sp1\elementary_space.space_id = es_maths_functions));
      END_IF;
      RETURN (TRUE);
    END_IF;
    IF 'ELEMENTARY_SPACE' IN types2 THEN
      IF sp2\elementary_space.space_id = es_generics THEN
        RETURN (TRUE);
      END_IF;
      IF (('FINITE_INTEGER_INTERVAL' IN types1) OR (
        'INTEGER_INTERVAL_FROM_MIN' IN types1)) OR (
        'INTEGER_INTERVAL_TO_MAX' IN types1) THEN
        RETURN (compatible_es_values(sp2\elementary_space.space_id, 
          es_integers));
      END_IF;
      IF (('FINITE_REAL_INTERVAL' IN types1) OR ('REAL_INTERVAL_FROM_MIN' 
        IN types1)) OR ('REAL_INTERVAL_TO_MAX' IN types1) THEN
        RETURN (compatible_es_values(sp2\elementary_space.space_id, 
          es_reals));
      END_IF;
      IF ('CARTESIAN_COMPLEX_NUMBER_REGION' IN types1) OR (
        'POLAR_COMPLEX_NUMBER_REGION' IN types1) THEN
        RETURN (compatible_es_values(sp2\elementary_space.space_id, 
          es_complex_numbers));
      END_IF;
      IF 'TUPLE_SPACE' IN types1 THEN
        RETURN (FALSE);
      END_IF;
      IF 'FUNCTION_SPACE' IN types1 THEN
        RETURN (bool(sp2\elementary_space.space_id = es_maths_functions));
      END_IF;
      RETURN (TRUE);
    END_IF;
    IF subspace_of_es(sp1, es_integers) THEN
      IF subspace_of_es(sp2, es_integers) THEN
        RETURN (compatible_intervals(sp1, sp2));
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF subspace_of_es(sp2, es_integers) THEN
      RETURN (FALSE);
    END_IF;
    IF subspace_of_es(sp1, es_reals) THEN
      IF subspace_of_es(sp2, es_reals) THEN
        RETURN (compatible_intervals(sp1, sp2));
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF subspace_of_es(sp2, es_reals) THEN
      RETURN (FALSE);
    END_IF;
    IF subspace_of_es(sp1, es_complex_numbers) THEN
      IF subspace_of_es(sp2, es_complex_numbers) THEN
        RETURN (compatible_complex_number_regions(sp1, sp2));
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF subspace_of_es(sp2, es_complex_numbers) THEN
      RETURN (FALSE);
    END_IF;
    IF 'UNIFORM_PRODUCT_SPACE' IN types1 THEN
      IF 'UNIFORM_PRODUCT_SPACE' IN types2 THEN
        IF sp1\uniform_product_space.exponent <> sp2\uniform_product_space.
          exponent THEN
          RETURN (FALSE);
        END_IF;
        RETURN (compatible_spaces(sp1\uniform_product_space.base, sp2\
          uniform_product_space.base));
      END_IF;
      IF 'LISTED_PRODUCT_SPACE' IN types2 THEN
        n := SIZEOF(sp2\listed_product_space.factors);
        IF sp1\uniform_product_space.exponent <> n THEN
          RETURN (FALSE);
        END_IF;
        REPEAT i := 1 TO n;
          IF NOT compatible_spaces(sp1\uniform_product_space.base, sp2\
            listed_product_space.factors[i]) THEN
            RETURN (FALSE);
          END_IF;
        END_REPEAT;
        RETURN (TRUE);
      END_IF;
      IF 'EXTENDED_TUPLE_SPACE' IN types2 THEN
        m := sp1\uniform_product_space.exponent;
        n := space_dimension(sp2\extended_tuple_space.base);
        IF m < n THEN
          RETURN (FALSE);
        END_IF;
        IF m = n THEN
          RETURN (compatible_spaces(sp1, sp2\extended_tuple_space.base));
        END_IF;
        RETURN (compatible_spaces(sp1, assoc_product_space(sp2\
          extended_tuple_space.base, make_uniform_product_space(sp2\
          extended_tuple_space.extender, m - n))));
      END_IF;
      IF 'FUNCTION_SPACE' IN types2 THEN
        RETURN (FALSE);
      END_IF;
      RETURN (TRUE);
    END_IF;
    IF 'LISTED_PRODUCT_SPACE' IN types1 THEN
      n := SIZEOF(sp1\listed_product_space.factors);
      IF 'UNIFORM_PRODUCT_SPACE' IN types2 THEN
        IF n <> sp2\uniform_product_space.exponent THEN
          RETURN (FALSE);
        END_IF;
        REPEAT i := 1 TO n;
          IF NOT compatible_spaces(sp2\uniform_product_space.base, sp1\
            listed_product_space.factors[i]) THEN
            RETURN (FALSE);
          END_IF;
        END_REPEAT;
        RETURN (TRUE);
      END_IF;
      IF 'LISTED_PRODUCT_SPACE' IN types2 THEN
        IF n <> SIZEOF(sp2\listed_product_space.factors) THEN
          RETURN (FALSE);
        END_IF;
        REPEAT i := 1 TO n;
          IF NOT compatible_spaces(sp1\listed_product_space.factors[i], sp2
            \listed_product_space.factors[i]) THEN
            RETURN (FALSE);
          END_IF;
        END_REPEAT;
        RETURN (TRUE);
      END_IF;
      IF 'EXTENDED_TUPLE_SPACE' IN types2 THEN
        m := space_dimension(sp2\extended_tuple_space.base);
        IF n < m THEN
          RETURN (FALSE);
        END_IF;
        IF n = m THEN
          RETURN (compatible_spaces(sp1, sp2\extended_tuple_space.base));
        END_IF;
        RETURN (compatible_spaces(sp1, assoc_product_space(sp2\
          extended_tuple_space.base, make_uniform_product_space(sp2\
          extended_tuple_space.extender, n - m))));
      END_IF;
      IF schema_prefix + 'FUNCTION_SPACE' IN types2 THEN
        RETURN (FALSE);
      END_IF;
      RETURN (TRUE);
    END_IF;
    IF 'EXTENDED_TUPLE_SPACE' IN types1 THEN
      IF ('UNIFORM_PRODUCT_SPACE' IN types2) OR ('LISTED_PRODUCT_SPACE' IN 
        types2) THEN
        RETURN (compatible_spaces(sp2, sp1));
      END_IF;
      IF 'EXTENDED_TUPLE_SPACE' IN types2 THEN
        IF NOT compatible_spaces(sp1\extended_tuple_space.extender, sp2\
          extended_tuple_space.extender) THEN
          RETURN (FALSE);
        END_IF;
        n := space_dimension(sp1\extended_tuple_space.base);
        m := space_dimension(sp2\extended_tuple_space.base);
        IF n < m THEN
          RETURN (compatible_spaces(assoc_product_space(sp1\
            extended_tuple_space.base, make_uniform_product_space(sp1\
            extended_tuple_space.extender, m - n)), sp2\
            extended_tuple_space.base));
        END_IF;
        IF n = m THEN
          RETURN (compatible_spaces(sp1\extended_tuple_space.base, sp2\
            extended_tuple_space.base));
        END_IF;
        IF n > m THEN
          RETURN (compatible_spaces(sp1\extended_tuple_space.base, 
            assoc_product_space(sp2\extended_tuple_space.base, 
            make_uniform_product_space(sp2\extended_tuple_space.extender, n
             - m))));
        END_IF;
      END_IF;
      IF 'FUNCTION_SPACE' IN types2 THEN
        RETURN (FALSE);
      END_IF;
      RETURN (TRUE);
    END_IF;
    IF 'FUNCTION_SPACE' IN types1 THEN
      IF 'FUNCTION_SPACE' IN types2 THEN
        s1 := sp1\function_space.domain_argument;
        s2 := sp2\function_space.domain_argument;
        CASE sp1\function_space.domain_constraint OF
          sc_equal :
              BEGIN
                CASE sp2\function_space.domain_constraint OF
                  sc_equal :
                      lgcl := subspace_of(s1, s2) AND subspace_of(s2, s1);
                  sc_subspace :
                      lgcl := subspace_of(s1, s2);
                  sc_member :
                      lgcl := member_of(s1, s2);
                END_CASE;
              END;
          sc_subspace :
              BEGIN
                CASE sp2\function_space.domain_constraint OF
                  sc_equal :
                      lgcl := subspace_of(s2, s1);
                  sc_subspace :
                      lgcl := compatible_spaces(s1, s2);
                  sc_member :
                      lgcl := UNKNOWN;
                END_CASE;
              END;
          sc_member :
              BEGIN
                CASE sp2\function_space.domain_constraint OF
                  sc_equal :
                      lgcl := member_of(s2, s1);
                  sc_subspace :
                      lgcl := UNKNOWN;
                  sc_member :
                      lgcl := compatible_spaces(s1, s2);
                END_CASE;
              END;
        END_CASE;
        IF lgcl = FALSE THEN
          RETURN (FALSE);
        END_IF;
        s1 := sp1\function_space.range_argument;
        s2 := sp2\function_space.range_argument;
        CASE sp1\function_space.range_constraint OF
          sc_equal :
              BEGIN
                CASE sp2\function_space.range_constraint OF
                  sc_equal :
                      lgcl := subspace_of(s1, s2) AND subspace_of(s2, s1);
                  sc_subspace :
                      lgcl := subspace_of(s1, s2);
                  sc_member :
                      lgcl := member_of(s1, s2);
                END_CASE;
              END;
          sc_subspace :
              BEGIN
                CASE sp2\function_space.range_constraint OF
                  sc_equal :
                      lgcl := subspace_of(s2, s1);
                  sc_subspace :
                      lgcl := compatible_spaces(s1, s2);
                  sc_member :
                      lgcl := UNKNOWN;
                END_CASE;
              END;
          sc_member :
              BEGIN
                CASE sp2\function_space.range_constraint OF
                  sc_equal :
                      lgcl := member_of(s2, s1);
                  sc_subspace :
                      lgcl := UNKNOWN;
                  sc_member :
                      lgcl := compatible_spaces(s1, s2);
                END_CASE;
              END;
        END_CASE;
        IF lgcl = FALSE THEN
          RETURN (FALSE);
        END_IF;
        RETURN (TRUE);
      END_IF;
      RETURN (TRUE);
    END_IF;
    RETURN (TRUE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION composable_sequence (
    operands : LIST [2:?] OF maths_function 
    ) : BOOLEAN;
    REPEAT i := 1 TO SIZEOF(operands) - 1;
      IF NOT compatible_spaces(operands[i].range, operands[(i + 1)].domain)
         THEN
        RETURN (FALSE);
      END_IF;
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION conditional_reverse (
    p       : BOOLEAN;
    an_item : reversible_topology 
    ) : reversible_topology;
    IF p THEN
      RETURN (an_item);
    ELSE
      RETURN (topology_reversed(an_item));
    END_IF;
END_FUNCTION; -- 10303-42: topology_schema

FUNCTION consistent_sizes (
    max         : INTEGER;
    point_lists : LIST OF point_cloud_dataset 
    ) : BOOLEAN;
  LOCAL
    ndatasets : INTEGER := SIZEOF(point_lists);
    result : BOOLEAN := TRUE;
  END_LOCAL;
    REPEAT i := 1 TO ndatasets - 1;
      IF SIZEOF(point_lists[i].point_coordinates) <> max THEN
        result := FALSE;
        RETURN (result);
      END_IF;
    END_REPEAT;
    IF SIZEOF(point_lists[ndatasets].point_coordinates) > max THEN
      result := FALSE;
      RETURN (result);
    END_IF;
    RETURN (result);
END_FUNCTION; -- 10303-42: scan_data_3d_shape_model_schema

FUNCTION constraints_composite_curve_on_surface (
    c : composite_curve_on_surface 
    ) : BOOLEAN;
  LOCAL
    n_segments : INTEGER := SIZEOF(c.segments);
  END_LOCAL;
    REPEAT k := 1 TO n_segments;
      IF (NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PCURVE' IN 
        TYPEOF(c\composite_curve.segments[k].parent_curve)) AND NOT (
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_CURVE' IN 
        TYPEOF(c\composite_curve.segments[k].parent_curve))) AND NOT (
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_CURVE_ON_SURFACE'
         IN TYPEOF(c\composite_curve.segments[k].parent_curve)) THEN
        RETURN (FALSE);
      END_IF;
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION constraints_geometry_shell_based_surface_model (
    m : shell_based_surface_model 
    ) : BOOLEAN;
  LOCAL
    result : BOOLEAN := TRUE;
  END_LOCAL;
    REPEAT j := 1 TO SIZEOF(m.sbsm_boundary);
      IF NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OPEN_SHELL' IN 
        TYPEOF(m.sbsm_boundary[j])) AND NOT (
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CLOSED_SHELL' IN 
        TYPEOF(m.sbsm_boundary[j])) THEN
        result := FALSE;
        RETURN (result);
      END_IF;
    END_REPEAT;
    RETURN (result);
END_FUNCTION; -- 10303-42: geometric_model_schema

FUNCTION constraints_geometry_shell_based_wireframe_model (
    m : shell_based_wireframe_model 
    ) : BOOLEAN;
  LOCAL
    result : BOOLEAN := TRUE;
  END_LOCAL;
    REPEAT j := 1 TO SIZEOF(m.sbwm_boundary);
      IF NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.WIRE_SHELL' IN 
        TYPEOF(m.sbwm_boundary[j])) AND NOT (
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VERTEX_SHELL' IN 
        TYPEOF(m.sbwm_boundary[j])) THEN
        result := FALSE;
        RETURN (result);
      END_IF;
    END_REPEAT;
    RETURN (result);
END_FUNCTION; -- 10303-42: geometric_model_schema

FUNCTION constraints_param_b_spline (
    degree    : INTEGER;
    up_knots  : INTEGER;
    up_cp     : INTEGER;
    knot_mult : LIST [0:?] OF INTEGER;
    knots     : LIST [0:?] OF parameter_value 
    ) : BOOLEAN;
  LOCAL
    result : BOOLEAN := TRUE;
    k : INTEGER;
    sum : INTEGER;
  END_LOCAL;
    sum := knot_mult[1];
    REPEAT i := 2 TO up_knots;
      sum := sum + knot_mult[i];
    END_REPEAT;
    IF (((degree < 1) OR (up_knots < 2)) OR (up_cp < degree)) OR (sum <> 
      degree + up_cp + 2) THEN
      result := FALSE;
      RETURN (result);
    END_IF;
    k := knot_mult[1];
    IF (k < 1) OR (k > degree + 1) THEN
      result := FALSE;
      RETURN (result);
    END_IF;
    REPEAT i := 2 TO up_knots;
      IF (knot_mult[i] < 1) OR (knots[i] <= knots[(i - 1)]) THEN
        result := FALSE;
        RETURN (result);
      END_IF;
      k := knot_mult[i];
      IF (i < up_knots) AND (k > degree) THEN
        result := FALSE;
        RETURN (result);
      END_IF;
      IF (i = up_knots) AND (k > degree + 1) THEN
        result := FALSE;
        RETURN (result);
      END_IF;
    END_REPEAT;
    RETURN (result);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION constraints_param_local_b_spline (
    degree    : INTEGER;
    knot_mult : LIST OF INTEGER;
    knots     : LIST OF INTEGER 
    ) : BOOLEAN;
  LOCAL
    result : BOOLEAN := TRUE;
    k : INTEGER;
    up_knots : INTEGER;
    sum : INTEGER;
  END_LOCAL;
    up_knots := SIZEOF(knots);
    sum := knot_mult[1];
    REPEAT i := 2 TO up_knots;
      sum := sum + knot_mult[i];
    END_REPEAT;
    IF ((degree < 1) OR (up_knots < 2)) OR (sum <> degree + 2) THEN
      result := FALSE;
      RETURN (result);
    END_IF;
    k := knot_mult[1];
    IF (k < 1) OR (k > degree + 1) THEN
      result := FALSE;
      RETURN (result);
    END_IF;
    IF knots[1] < 1 THEN
      result := FALSE;
    END_IF;
    REPEAT i := 2 TO up_knots;
      IF (knot_mult[i] < 1) OR (knots[i] <= knots[(i - 1)]) THEN
        result := FALSE;
        RETURN (result);
      END_IF;
      k := knot_mult[i];
      IF (i < up_knots) AND (k > degree) THEN
        result := FALSE;
        RETURN (result);
      END_IF;
      IF (i = up_knots) AND (k > degree + 1) THEN
        result := FALSE;
        RETURN (result);
      END_IF;
    END_REPEAT;
    RETURN (result);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION constraints_rectangular_composite_surface (
    s : rectangular_composite_surface 
    ) : BOOLEAN;
    REPEAT i := 1 TO s.n_u;
      REPEAT j := 1 TO s.n_v;
        IF NOT ((
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_SURFACE' IN
           TYPEOF(s.segments[i][j].parent_surface)) OR (
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_TRIMMED_SURFACE'
           IN TYPEOF(s.segments[i][j].parent_surface))) THEN
          RETURN (FALSE);
        END_IF;
      END_REPEAT;
    END_REPEAT;
    REPEAT i := 1 TO s.n_u - 1;
      REPEAT j := 1 TO s.n_v;
        IF s.segments[i][j].u_transition = discontinuous THEN
          RETURN (FALSE);
        END_IF;
      END_REPEAT;
    END_REPEAT;
    REPEAT i := 1 TO s.n_u;
      REPEAT j := 1 TO s.n_v - 1;
        IF s.segments[i][j].v_transition = discontinuous THEN
          RETURN (FALSE);
        END_IF;
      END_REPEAT;
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION constraints_scaling (
    factors : LIST OF REAL 
    ) : BOOLEAN;
  LOCAL
    result : BOOLEAN := TRUE;
  END_LOCAL;
    REPEAT i := 1 TO SIZEOF(factors);
      IF NOT ((0.0 < factors[i]) AND (factors[i] <= 1.0)) THEN
        result := FALSE;
        RETURN (result);
      END_IF;
    END_REPEAT;
    RETURN (result);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION control_characters_free (
    s : STRING 
    ) : BOOLEAN;
  LOCAL
    ch : STRING;
  END_LOCAL;
    REPEAT i := 1 TO LENGTH(s);
      ch := s[i];
      IF ((ch = '\x9') OR (ch = '\xA')) OR (ch = '\xD') THEN
        RETURN (FALSE);
      END_IF;
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION; -- 10303-46: presentation_definition_schema

FUNCTION convert_spatial_to_ypr_rotation (
    pair     : kinematic_pair;
    rotation : spatial_rotation 
    ) : ypr_rotation;
  LOCAL
    axis : direction;
    angle : plane_angle_measure;
    conv_angle : plane_angle_measure;
    ya : plane_angle_measure;
    pa : plane_angle_measure;
    ra : plane_angle_measure;
    ucf : REAL;
    dx : REAL;
    dy : REAL;
    dz : REAL;
    s_a : REAL;
    c_a : REAL;
    rotmat : ARRAY [1:3] OF ARRAY [1:3] OF REAL;
    cm1 : REAL;
    s_y : REAL;
    c_y : REAL;
    s_r : REAL;
    c_r : REAL;
  END_LOCAL;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.YPR_ROTATION' IN TYPEOF
      (rotation) THEN
      RETURN (rotation);
    END_IF;
    axis := normalise(rotation\rotation_about_direction.direction_of_axis);
    angle := rotation\rotation_about_direction.rotation_angle;
    IF angle = 0.0 THEN
      RETURN ([ 0.0, 0.0, 0.0 ]);
    END_IF;
    dx := axis.direction_ratios[1];
    dy := axis.direction_ratios[2];
    dz := axis.direction_ratios[3];
    conv_angle := plane_angle_for_pair_in_radian(pair, angle);
    IF NOT (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE' IN 
      TYPEOF(conv_angle)) THEN
      RETURN (?);
    END_IF;
    ucf := angle / conv_angle;
    s_a := SIN(conv_angle);
    c_a := COS(conv_angle);
    IF (dy = 0.0) AND (dx * dz = 0.0) THEN
      REPEAT WHILE conv_angle <= -PI;
        conv_angle := conv_angle + 2.0 * PI;
      END_REPEAT;
      REPEAT WHILE conv_angle > PI;
        conv_angle := conv_angle - 2.0 * PI;
      END_REPEAT;
      ya := ucf * conv_angle;
      IF conv_angle <> PI THEN
        ra := -ya;
      ELSE
        ra := ya;
      END_IF;
      IF dx <> 0.0 THEN
        IF dx > 0.0 THEN
          RETURN ([ 0.0, 0.0, ya ]);
        ELSE
          RETURN ([ 0.0, 0.0, ra ]);
        END_IF;
      ELSE
        IF dz > 0.0 THEN
          RETURN ([ ya, 0.0, 0.0 ]);
        ELSE
          RETURN ([ ra, 0.0, 0.0 ]);
        END_IF;
      END_IF;
    END_IF;
    IF ((dy <> 0.0) AND (dx = 0.0)) AND (dz = 0.0) THEN
      IF c_a >= 0.0 THEN
        ya := 0.0;
        ra := 0.0;
      ELSE
        ya := ucf * PI;
        ra := ya;
      END_IF;
      pa := ucf * ATAN(s_a, ABS(c_a));
      IF dy < 0.0 THEN
        pa := -pa;
      END_IF;
      RETURN ([ ya, pa, ra ]);
    END_IF;
    cm1 := 1.0 - c_a;
    rotmat := [ [ dx * dx * cm1 + c_a, dx * dy * cm1 - dz * s_a, dx * dz * 
      cm1 + dy * s_a ], [ dx * dy * cm1 + dz * s_a, dy * dy * cm1 + c_a, dy
       * dz * cm1 - dx * s_a ], [ dx * dz * cm1 - dy * s_a, dy * dz * cm1 +
       dx * s_a, dz * dz * cm1 + c_a ] ];
    IF ABS(rotmat[1][3]) = 1.0 THEN
      BEGIN
        IF rotmat[1][3] = 1.0 THEN
          pa := 0.5 * PI;
        ELSE
          pa := -0.5 * PI;
        END_IF;
        ra := 0.0;
        ya := ATAN(rotmat[2][1], rotmat[2][2]);
        IF rotmat[2][2] < 0.0 THEN
          IF ya <= 0.0 THEN
            ya := ya + PI;
          ELSE
            ya := ya - PI;
          END_IF;
        END_IF;
      END;
    ELSE
      BEGIN
        ya := ATAN(-rotmat[1][2], rotmat[1][1]);
        IF rotmat[1][1] < 0.0 THEN
          IF ya <= 0.0 THEN
            ya := ya + PI;
          ELSE
            ya := ya - PI;
          END_IF;
        END_IF;
        ra := ATAN(-rotmat[2][3], rotmat[3][3]);
        IF rotmat[3][3] < 0.0 THEN
          IF ra <= 0.0 THEN
            ra := ra + PI;
          ELSE
            ra := ra - PI;
          END_IF;
        END_IF;
        s_y := SIN(ya);
        c_y := COS(ya);
        s_r := SIN(ra);
        c_r := COS(ra);
        IF ((ABS(s_y) > ABS(c_y)) AND (ABS(s_y) > ABS(s_r))) AND (ABS(s_y) 
          > ABS(c_r)) THEN
          cm1 := -rotmat[1][2] / s_y;
        ELSE
          IF (ABS(c_y) > ABS(s_r)) AND (ABS(c_y) > ABS(c_r)) THEN
            cm1 := rotmat[1][1] / c_y;
          ELSE
            IF ABS(s_r) > ABS(c_r) THEN
              cm1 := -rotmat[2][3] / s_r;
            ELSE
              cm1 := rotmat[3][3] / c_r;
            END_IF;
          END_IF;
        END_IF;
        pa := ATAN(rotmat[1][3], cm1);
      END;
    END_IF;
    ya := ya * ucf;
    pa := pa * ucf;
    ra := ra * ucf;
    RETURN ([ ya, pa, ra ]);
END_FUNCTION; -- 10303-105: kinematic_state_schema

FUNCTION convert_to_literal (
    val : maths_atom 
    ) : generic_literal;
  LOCAL
    types : SET OF STRING := TYPEOF(val);
  END_LOCAL;
    IF 'INTEGER' IN types THEN
      RETURN (make_int_literal(val));
    END_IF;
    IF 'REAL' IN types THEN
      RETURN (make_real_literal(val));
    END_IF;
    IF 'BOOLEAN' IN types THEN
      RETURN (make_boolean_literal(val));
    END_IF;
    IF 'STRING' IN types THEN
      RETURN (make_string_literal(val));
    END_IF;
    IF 'LOGICAL' IN types THEN
      RETURN (make_logical_literal(val));
    END_IF;
    IF 'BINARY' IN types THEN
      RETURN (make_binary_literal(val));
    END_IF;
    IF schema_prefix + 'MATHS_ENUM_ATOM' IN types THEN
      RETURN (make_maths_enum_literal(val));
    END_IF;
    RETURN (?);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION convert_to_maths_function (
    func : maths_function_select 
    ) : maths_function;
  LOCAL
    efenum : elementary_function_enumerators;
    mthfun : maths_function;
  END_LOCAL;
    IF schema_prefix + 'MATHS_FUNCTION' IN TYPEOF(func) THEN
      mthfun := func;
    ELSE
      efenum := func;
      mthfun := make_elementary_function(efenum);
    END_IF;
    RETURN (mthfun);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION convert_to_maths_value (
    val : GENERIC : G 
    ) : maths_value;
  LOCAL
    types : SET OF STRING := TYPEOF(val);
    ival : maths_integer;
    rval : maths_real;
    nval : maths_number;
    tfval : maths_boolean;
    lval : maths_logical;
    sval : maths_string;
    bval : maths_binary;
    tval : maths_tuple := the_empty_maths_tuple;
    mval : maths_value;
  END_LOCAL;
    IF schema_prefix + 'MATHS_VALUE' IN types THEN
      RETURN (val);
    END_IF;
    IF 'INTEGER' IN types THEN
      ival := val;
      RETURN (ival);
    END_IF;
    IF 'REAL' IN types THEN
      rval := val;
      RETURN (rval);
    END_IF;
    IF 'NUMBER' IN types THEN
      nval := val;
      RETURN (nval);
    END_IF;
    IF 'BOOLEAN' IN types THEN
      tfval := val;
      RETURN (tfval);
    END_IF;
    IF 'LOGICAL' IN types THEN
      lval := val;
      RETURN (lval);
    END_IF;
    IF 'STRING' IN types THEN
      sval := val;
      RETURN (sval);
    END_IF;
    IF 'BINARY' IN types THEN
      bval := val;
      RETURN (bval);
    END_IF;
    IF 'LIST' IN types THEN
      REPEAT i := 1 TO SIZEOF(val);
        mval := convert_to_maths_value(val[i]);
        IF NOT EXISTS(mval) THEN
          RETURN (?);
        END_IF;
        INSERT( tval, mval, i - 1 );
      END_REPEAT;
      RETURN (tval);
    END_IF;
    RETURN (?);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION convert_to_operand (
    val : maths_value 
    ) : generic_expression;
  LOCAL
    types : SET OF STRING := stripped_typeof(val);
  END_LOCAL;
    IF 'GENERIC_EXPRESSION' IN types THEN
      RETURN (val);
    END_IF;
    IF 'MATHS_ATOM' IN types THEN
      RETURN (convert_to_literal(val));
    END_IF;
    IF 'ATOM_BASED_VALUE' IN types THEN
      RETURN (make_atom_based_literal(val));
    END_IF;
    IF 'MATHS_TUPLE' IN types THEN
      RETURN (make_maths_tuple_literal(val));
    END_IF;
    RETURN (?);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION convert_to_operands (
    values : AGGREGATE OF maths_value 
    ) : LIST OF generic_expression;
  LOCAL
    operands : LIST OF generic_expression := [];
    loc : INTEGER := 0;
  END_LOCAL;
    IF NOT EXISTS(values) THEN
      RETURN (?);
    END_IF;
    REPEAT i := LOINDEX(values) TO HIINDEX(values);
      INSERT( operands, convert_to_operand(values[i]), loc );
      loc := loc + 1;
    END_REPEAT;
    RETURN (operands);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION convert_to_operands_prcmfn (
    srcdom  : maths_space_or_function;
    prepfun : LIST OF maths_function;
    finfun  : maths_function_select 
    ) : LIST [2:?] OF generic_expression;
  LOCAL
    operands : LIST OF generic_expression := [];
  END_LOCAL;
    INSERT( operands, srcdom, 0 );
    REPEAT i := 1 TO SIZEOF(prepfun);
      INSERT( operands, prepfun[i], i );
    END_REPEAT;
    INSERT( operands, convert_to_maths_function(finfun), SIZEOF(prepfun) + 
      1 );
    RETURN (operands);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION cross_product (
    arg1 : direction;
    arg2 : direction 
    ) : vector;
  LOCAL
    mag : REAL;
    res : direction;
    v1 : LIST [3:3] OF REAL;
    v2 : LIST [3:3] OF REAL;
    result : vector;
  END_LOCAL;
    IF (NOT EXISTS(arg1) OR (arg1.dim = 2)) OR (NOT EXISTS(arg2) OR (arg2.
      dim = 2)) THEN
      RETURN (?);
    ELSE
      BEGIN
        v1 := normalise(arg1).direction_ratios;
        v2 := normalise(arg2).direction_ratios;
        res := dummy_gri || direction([ (v1[2] * v2[3] - v1[3] * v2[2]), (
          v1[3] * v2[1] - v1[1] * v2[3]), (v1[1] * v2[2] - v1[2] * v2[1]) ]
          );
        mag := 0.0;
        REPEAT i := 1 TO 3;
          mag := mag + res.direction_ratios[i] * res.direction_ratios[i];
        END_REPEAT;
        IF mag > 0.0 THEN
          result := dummy_gri || vector(res, SQRT(mag));
        ELSE
          result := dummy_gri || vector(arg1, 0.0);
        END_IF;
        RETURN (result);
      END;
    END_IF;
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION curve_weights_positive (
    b : rational_b_spline_curve 
    ) : BOOLEAN;
  LOCAL
    result : BOOLEAN := TRUE;
  END_LOCAL;
    REPEAT i := 0 TO b.upper_index_on_control_points;
      IF b.weights[i] <= 0.0 THEN
        result := FALSE;
        RETURN (result);
      END_IF;
    END_REPEAT;
    RETURN (result);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION default_tolerance_table_cell_wr2 (
    agg : compound_item_definition 
    ) : BOOLEAN;
    BEGIN
      IF SIZEOF(agg) <= 5 THEN
        RETURN (TRUE);
      ELSE
        RETURN (FALSE);
      END_IF;
    END;
END_FUNCTION; -- 10303-1052: default_tolerance_mim

FUNCTION default_tolerance_table_cell_wr3 (
    agg : compound_item_definition 
    ) : BOOLEAN;
    BEGIN
      IF (SIZEOF(QUERY (i <* agg| (
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
         IN TYPEOF(i)) AND (i\representation_item.name = 
        'significant number of digits'))) = 1) OR (SIZEOF(QUERY (i <* agg| 
        (
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
         IN TYPEOF(i)) AND (i\representation_item.name = 'lower limit'))) =
         1) AND (SIZEOF(QUERY (i <* agg| (
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
         IN TYPEOF(i)) AND (i\representation_item.name = 'upper limit'))) =
         1) THEN
        RETURN (TRUE);
      ELSE
        RETURN (FALSE);
      END_IF;
    END;
END_FUNCTION; -- 10303-1052: default_tolerance_mim

FUNCTION default_tolerance_table_cell_wr4 (
    agg : compound_item_definition 
    ) : BOOLEAN;
    BEGIN
      IF (SIZEOF(QUERY (i <* agg| (
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
         IN TYPEOF(i)) AND (i\representation_item.name = 
        'plus minus tolerance value'))) = 1) OR (SIZEOF(QUERY (i <* agg| (
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
         IN TYPEOF(i)) AND (i\representation_item.name = 
        'lower tolerance value'))) = 1) AND (SIZEOF(QUERY (i <* agg| (
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
         IN TYPEOF(i)) AND (i\representation_item.name = 
        'upper tolerance value'))) = 1) THEN
        RETURN (TRUE);
      ELSE
        RETURN (FALSE);
      END_IF;
    END;
END_FUNCTION; -- 10303-1052: default_tolerance_mim

FUNCTION default_tolerance_table_cell_wr5 (
    agg : compound_item_definition 
    ) : BOOLEAN;
    BEGIN
      IF (SIZEOF(QUERY (i <* agg| (
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
         IN TYPEOF(i)))) <= 1) AND (SIZEOF(QUERY (i <* agg| (
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
         IN TYPEOF(i)))) = SIZEOF(QUERY (i <* agg| (
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
         IN TYPEOF(i)) AND (i\representation_item.name = 'cell description'
        )))) THEN
        RETURN (TRUE);
      ELSE
        RETURN (FALSE);
      END_IF;
    END;
END_FUNCTION; -- 10303-1052: default_tolerance_mim

FUNCTION definite_integral_check (
    domain   : tuple_space;
    vrblint  : input_selector;
    lowerinf : BOOLEAN;
    upperinf : BOOLEAN 
    ) : BOOLEAN;
  LOCAL
    domn : tuple_space := domain;
    fspc : maths_space;
    dim : nonnegative_integer;
    k : positive_integer;
  END_LOCAL;
    IF (space_dimension(domain) = 1) AND (schema_prefix + 'TUPLE_SPACE' IN 
      TYPEOF(factor1(domain))) THEN
      domn := factor1(domain);
    END_IF;
    dim := space_dimension(domn);
    k := vrblint;
    IF k > dim THEN
      RETURN (FALSE);
    END_IF;
    fspc := factor_space(domn, k);
    IF NOT (schema_prefix + 'REAL_INTERVAL' IN TYPEOF(fspc)) THEN
      RETURN (FALSE);
    END_IF;
    IF lowerinf AND min_exists(fspc) THEN
      RETURN (FALSE);
    END_IF;
    IF upperinf AND max_exists(fspc) THEN
      RETURN (FALSE);
    END_IF;
    RETURN (TRUE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION definite_integral_expr_check (
    operands : LIST [2:?] OF generic_expression;
    lowerinf : BOOLEAN;
    upperinf : BOOLEAN 
    ) : BOOLEAN;
  LOCAL
    nops : INTEGER := 2;
    vspc : maths_space;
    dim : nonnegative_integer;
    k : positive_integer;
    bspc : maths_space;
  END_LOCAL;
    IF NOT lowerinf THEN
      nops := nops + 1;
    END_IF;
    IF NOT upperinf THEN
      nops := nops + 1;
    END_IF;
    IF SIZEOF(operands) <> nops THEN
      RETURN (FALSE);
    END_IF;
    IF NOT ('GENERIC_VARIABLE' IN stripped_typeof(operands[2])) THEN
      RETURN (FALSE);
    END_IF;
    IF NOT has_values_space(operands[2]) THEN
      RETURN (FALSE);
    END_IF;
    vspc := values_space_of(operands[2]);
    IF NOT ('REAL_INTERVAL' IN stripped_typeof(vspc)) THEN
      RETURN (FALSE);
    END_IF;
    IF lowerinf THEN
      IF min_exists(vspc) THEN
        RETURN (FALSE);
      END_IF;
      k := 3;
    ELSE
      IF NOT has_values_space(operands[3]) THEN
        RETURN (FALSE);
      END_IF;
      bspc := values_space_of(operands[3]);
      IF NOT compatible_spaces(bspc, vspc) THEN
        RETURN (FALSE);
      END_IF;
      k := 4;
    END_IF;
    IF upperinf THEN
      IF max_exists(vspc) THEN
        RETURN (FALSE);
      END_IF;
    ELSE
      IF NOT has_values_space(operands[k]) THEN
        RETURN (FALSE);
      END_IF;
      bspc := values_space_of(operands[k]);
      IF NOT compatible_spaces(bspc, vspc) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    RETURN (TRUE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION derive_definite_integral_domain (
    igrl : definite_integral_function 
    ) : tuple_space;
    FUNCTION process_product_space
      (spc : product_space;
       idx : INTEGER;
       prefix : INTEGER;
       vdomn : maths_space ) : product_space;
    LOCAL
      uspc : uniform_product_space;
      expnt : INTEGER;
      factors : LIST OF maths_space;
    END_LOCAL;
      IF schema_prefix + 'UNIFORM_PRODUCT_SPACE' IN TYPEOF(spc) THEN
        uspc := spc;
        expnt := uspc.exponent + prefix;
        IF idx <= uspc.exponent THEN
          expnt := expnt - 1;
        END_IF;
        IF expnt = 0 THEN
          RETURN (make_listed_product_space([]));
        ELSE
          RETURN (make_uniform_product_space(uspc.base, expnt));
        END_IF;
      ELSE
        factors := spc\listed_product_space.factors;
        IF idx <= SIZEOF(factors) THEN
          REMOVE( factors, idx );
        END_IF;
        IF prefix > 0 THEN
          INSERT( factors, vdomn, 0 );
          IF prefix > 1 THEN
            INSERT( factors, vdomn, 0 );
          END_IF;
        END_IF;
        RETURN (make_listed_product_space(factors));
      END_IF;
    END_FUNCTION;
  LOCAL
    idomn : tuple_space := igrl.integrand.domain;
    types : SET OF STRING := TYPEOF(idomn);
    idx : INTEGER := igrl.variable_of_integration;
    tupled : BOOLEAN := bool((space_dimension(idomn) = 1) AND (
      schema_prefix + 'TUPLE_SPACE' IN types));
    prefix : INTEGER := 0;
    espc : extended_tuple_space;
    vdomn : maths_space;
  END_LOCAL;
    IF tupled THEN
      idomn := factor1(idomn);
      types := TYPEOF(idomn);
    END_IF;
    IF igrl.lower_limit_neg_infinity THEN
      prefix := prefix + 1;
    END_IF;
    IF igrl.upper_limit_pos_infinity THEN
      prefix := prefix + 1;
    END_IF;
    vdomn := factor_space(idomn, idx);
    IF schema_prefix + 'EXTENDED_TUPLE_SPACE' IN types THEN
      espc := idomn;
      idomn := make_extended_tuple_space(process_product_space(espc.base, 
        idx, prefix, vdomn), espc.extender);
    ELSE
      idomn := process_product_space(idomn, idx, prefix, vdomn);
    END_IF;
    IF tupled THEN
      RETURN (one_tuples_of(idomn));
    ELSE
      RETURN (idomn);
    END_IF;
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION derive_dimensional_exponents (
    x : unit 
    ) : dimensional_exponents;
  LOCAL
    result : dimensional_exponents := dimensional_exponents(0.0, 0.0, 0.0, 
      0.0, 0.0, 0.0, 0.0);
  END_LOCAL;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DERIVED_UNIT' IN TYPEOF
      (x) THEN
      REPEAT i := LOINDEX(x\derived_unit.elements) TO HIINDEX(x\
        derived_unit.elements);
        result.length_exponent := result.length_exponent + x\derived_unit.
          elements[i]\derived_unit_element.exponent * x\derived_unit.
          elements[i]\derived_unit_element.unit\named_unit.dimensions.
          length_exponent;
        result.mass_exponent := result.mass_exponent + x\derived_unit.
          elements[i]\derived_unit_element.exponent * x\derived_unit.
          elements[i]\derived_unit_element.unit\named_unit.dimensions.
          mass_exponent;
        result.time_exponent := result.time_exponent + x\derived_unit.
          elements[i]\derived_unit_element.exponent * x\derived_unit.
          elements[i]\derived_unit_element.unit\named_unit.dimensions.
          time_exponent;
        result.electric_current_exponent := result.
          electric_current_exponent + x\derived_unit.elements[i]\
          derived_unit_element.exponent * x\derived_unit.elements[i]\
          derived_unit_element.unit\named_unit.dimensions.
          electric_current_exponent;
        result.thermodynamic_temperature_exponent := result.
          thermodynamic_temperature_exponent + x\derived_unit.elements[i]\
          derived_unit_element.exponent * x\derived_unit.elements[i]\
          derived_unit_element.unit\named_unit.dimensions.
          thermodynamic_temperature_exponent;
        result.amount_of_substance_exponent := result.
          amount_of_substance_exponent + x\derived_unit.elements[i]\
          derived_unit_element.exponent * x\derived_unit.elements[i]\
          derived_unit_element.unit\named_unit.dimensions.
          amount_of_substance_exponent;
        result.luminous_intensity_exponent := result.
          luminous_intensity_exponent + x\derived_unit.elements[i]\
          derived_unit_element.exponent * x\derived_unit.elements[i]\
          derived_unit_element.unit\named_unit.dimensions.
          luminous_intensity_exponent;
      END_REPEAT;
    ELSE
      result := x\named_unit.dimensions;
    END_IF;
    RETURN (result);
END_FUNCTION; -- 10303-41: measure_schema

FUNCTION derive_elementary_function_domain (
    ef_val : elementary_function_enumerators 
    ) : tuple_space;
    IF NOT EXISTS(ef_val) THEN
      RETURN (?);
    END_IF;
    CASE ef_val OF
      ef_and :
          RETURN (make_extended_tuple_space(the_zero_tuple_space, 
            the_logicals));
      ef_or :
          RETURN (make_extended_tuple_space(the_zero_tuple_space, 
            the_logicals));
      ef_not :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_xor :
          RETURN (make_uniform_product_space(the_logicals, 2));
      ef_negate_i :
          RETURN (make_uniform_product_space(the_integers, 1));
      ef_add_i :
          RETURN (the_integer_tuples);
      ef_subtract_i :
          RETURN (make_uniform_product_space(the_integers, 2));
      ef_multiply_i :
          RETURN (the_integer_tuples);
      ef_divide_i :
          RETURN (make_uniform_product_space(the_integers, 2));
      ef_mod_i :
          RETURN (make_uniform_product_space(the_integers, 2));
      ef_exponentiate_i :
          RETURN (make_uniform_product_space(the_integers, 2));
      ef_eq_i :
          RETURN (make_uniform_product_space(the_integers, 2));
      ef_ne_i :
          RETURN (make_uniform_product_space(the_integers, 2));
      ef_gt_i :
          RETURN (make_uniform_product_space(the_integers, 2));
      ef_lt_i :
          RETURN (make_uniform_product_space(the_integers, 2));
      ef_ge_i :
          RETURN (make_uniform_product_space(the_integers, 2));
      ef_le_i :
          RETURN (make_uniform_product_space(the_integers, 2));
      ef_abs_i :
          RETURN (make_uniform_product_space(the_integers, 1));
      ef_if_i :
          RETURN (make_listed_product_space([ the_logicals, the_integers, 
            the_integers ]));
      ef_negate_r :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_reciprocal_r :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_add_r :
          RETURN (the_real_tuples);
      ef_subtract_r :
          RETURN (make_uniform_product_space(the_reals, 2));
      ef_multiply_r :
          RETURN (the_real_tuples);
      ef_divide_r :
          RETURN (make_uniform_product_space(the_reals, 2));
      ef_mod_r :
          RETURN (make_uniform_product_space(the_reals, 2));
      ef_exponentiate_r :
          RETURN (make_listed_product_space([ the_nonnegative_reals, 
            the_reals ]));
      ef_exponentiate_ri :
          RETURN (make_listed_product_space([ the_reals, the_integers ]));
      ef_eq_r :
          RETURN (make_uniform_product_space(the_reals, 2));
      ef_ne_r :
          RETURN (make_uniform_product_space(the_reals, 2));
      ef_gt_r :
          RETURN (make_uniform_product_space(the_reals, 2));
      ef_lt_r :
          RETURN (make_uniform_product_space(the_reals, 2));
      ef_ge_r :
          RETURN (make_uniform_product_space(the_reals, 2));
      ef_le_r :
          RETURN (make_uniform_product_space(the_reals, 2));
      ef_abs_r :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_acos_r :
          RETURN (make_uniform_product_space(the_neg1_one_interval, 1));
      ef_asin_r :
          RETURN (make_uniform_product_space(the_neg1_one_interval, 1));
      ef_atan2_r :
          RETURN (make_uniform_product_space(the_reals, 2));
      ef_cos_r :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_exp_r :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_ln_r :
          RETURN (make_uniform_product_space(the_nonnegative_reals, 1));
      ef_log2_r :
          RETURN (make_uniform_product_space(the_nonnegative_reals, 1));
      ef_log10_r :
          RETURN (make_uniform_product_space(the_nonnegative_reals, 1));
      ef_sin_r :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_sqrt_r :
          RETURN (make_uniform_product_space(the_nonnegative_reals, 1));
      ef_tan_r :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_if_r :
          RETURN (make_listed_product_space([ the_logicals, the_reals, 
            the_reals ]));
      ef_negate_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_reciprocal_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_add_c :
          RETURN (the_complex_tuples);
      ef_subtract_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 2));
      ef_multiply_c :
          RETURN (the_complex_tuples);
      ef_divide_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 2));
      ef_exponentiate_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 2));
      ef_exponentiate_ci :
          RETURN (make_listed_product_space([ the_complex_numbers, 
            the_integers ]));
      ef_eq_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 2));
      ef_ne_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 2));
      ef_conjugate_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_abs_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_arg_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_cos_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_exp_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_ln_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_sin_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_sqrt_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_tan_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_if_c :
          RETURN (make_listed_product_space([ the_logicals, 
            the_complex_numbers, the_complex_numbers ]));
      ef_subscript_s :
          RETURN (make_listed_product_space([ the_strings, the_integers ]))
            ;
      ef_eq_s :
          RETURN (make_uniform_product_space(the_strings, 2));
      ef_ne_s :
          RETURN (make_uniform_product_space(the_strings, 2));
      ef_gt_s :
          RETURN (make_uniform_product_space(the_strings, 2));
      ef_lt_s :
          RETURN (make_uniform_product_space(the_strings, 2));
      ef_ge_s :
          RETURN (make_uniform_product_space(the_strings, 2));
      ef_le_s :
          RETURN (make_uniform_product_space(the_strings, 2));
      ef_subsequence_s :
          RETURN (make_listed_product_space([ the_strings, the_integers, 
            the_integers ]));
      ef_concat_s :
          RETURN (make_extended_tuple_space(the_zero_tuple_space, 
            the_strings));
      ef_size_s :
          RETURN (make_uniform_product_space(the_strings, 1));
      ef_format :
          RETURN (make_listed_product_space([ the_numbers, the_strings ]));
      ef_value :
          RETURN (make_uniform_product_space(the_strings, 1));
      ef_like :
          RETURN (make_uniform_product_space(the_strings, 2));
      ef_if_s :
          RETURN (make_listed_product_space([ the_logicals, the_strings, 
            the_strings ]));
      ef_subscript_b :
          RETURN (make_listed_product_space([ the_binarys, the_integers ]))
            ;
      ef_eq_b :
          RETURN (make_uniform_product_space(the_binarys, 2));
      ef_ne_b :
          RETURN (make_uniform_product_space(the_binarys, 2));
      ef_gt_b :
          RETURN (make_uniform_product_space(the_binarys, 2));
      ef_lt_b :
          RETURN (make_uniform_product_space(the_binarys, 2));
      ef_ge_b :
          RETURN (make_uniform_product_space(the_binarys, 2));
      ef_le_b :
          RETURN (make_uniform_product_space(the_binarys, 2));
      ef_subsequence_b :
          RETURN (make_listed_product_space([ the_binarys, the_integers, 
            the_integers ]));
      ef_concat_b :
          RETURN (make_extended_tuple_space(the_zero_tuple_space, 
            the_binarys));
      ef_size_b :
          RETURN (make_uniform_product_space(the_binarys, 1));
      ef_if_b :
          RETURN (make_listed_product_space([ the_logicals, the_binarys, 
            the_binarys ]));
      ef_subscript_t :
          RETURN (make_listed_product_space([ the_tuples, the_integers ]));
      ef_eq_t :
          RETURN (make_uniform_product_space(the_tuples, 2));
      ef_ne_t :
          RETURN (make_uniform_product_space(the_tuples, 2));
      ef_concat_t :
          RETURN (make_extended_tuple_space(the_zero_tuple_space, 
            the_tuples));
      ef_size_t :
          RETURN (make_uniform_product_space(the_tuples, 1));
      ef_entuple :
          RETURN (the_tuples);
      ef_detuple :
          RETURN (make_uniform_product_space(the_generics, 1));
      ef_insert :
          RETURN (make_listed_product_space([ the_tuples, the_generics, 
            the_integers ]));
      ef_remove :
          RETURN (make_listed_product_space([ the_tuples, the_integers ]));
      ef_if_t :
          RETURN (make_listed_product_space([ the_logicals, the_tuples, 
            the_tuples ]));
      ef_sum_it :
          RETURN (make_uniform_product_space(the_integer_tuples, 1));
      ef_product_it :
          RETURN (make_uniform_product_space(the_integer_tuples, 1));
      ef_add_it :
          RETURN (make_extended_tuple_space(the_integer_tuples, 
            the_integer_tuples));
      ef_subtract_it :
          RETURN (make_uniform_product_space(the_integer_tuples, 2));
      ef_scalar_mult_it :
          RETURN (make_listed_product_space([ the_integers, 
            the_integer_tuples ]));
      ef_dot_prod_it :
          RETURN (make_uniform_product_space(the_integer_tuples, 2));
      ef_sum_rt :
          RETURN (make_uniform_product_space(the_real_tuples, 1));
      ef_product_rt :
          RETURN (make_uniform_product_space(the_real_tuples, 1));
      ef_add_rt :
          RETURN (make_extended_tuple_space(the_real_tuples, 
            the_real_tuples));
      ef_subtract_rt :
          RETURN (make_uniform_product_space(the_real_tuples, 2));
      ef_scalar_mult_rt :
          RETURN (make_listed_product_space([ the_reals, the_real_tuples ])
            );
      ef_dot_prod_rt :
          RETURN (make_uniform_product_space(the_real_tuples, 2));
      ef_norm_rt :
          RETURN (make_uniform_product_space(the_real_tuples, 1));
      ef_sum_ct :
          RETURN (make_uniform_product_space(the_complex_tuples, 1));
      ef_product_ct :
          RETURN (make_uniform_product_space(the_complex_tuples, 1));
      ef_add_ct :
          RETURN (make_extended_tuple_space(the_complex_tuples, 
            the_complex_tuples));
      ef_subtract_ct :
          RETURN (make_uniform_product_space(the_complex_tuples, 2));
      ef_scalar_mult_ct :
          RETURN (make_listed_product_space([ the_complex_numbers, 
            the_complex_tuples ]));
      ef_dot_prod_ct :
          RETURN (make_uniform_product_space(the_complex_tuples, 2));
      ef_norm_ct :
          RETURN (make_uniform_product_space(the_complex_tuples, 1));
      ef_if :
          RETURN (make_listed_product_space([ the_logicals, the_generics, 
            the_generics ]));
      ef_ensemble :
          RETURN (the_tuples);
      ef_member_of :
          RETURN (make_listed_product_space([ the_generics, 
            the_maths_spaces ]));
    OTHERWISE :
        RETURN (?);
    END_CASE;
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION derive_elementary_function_range (
    ef_val : elementary_function_enumerators 
    ) : tuple_space;
    IF NOT EXISTS(ef_val) THEN
      RETURN (?);
    END_IF;
    CASE ef_val OF
      ef_and :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_or :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_not :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_xor :
          RETURN (make_uniform_product_space(the_logicals, 2));
      ef_negate_i :
          RETURN (make_uniform_product_space(the_integers, 1));
      ef_add_i :
          RETURN (make_uniform_product_space(the_integers, 1));
      ef_subtract_i :
          RETURN (make_uniform_product_space(the_integers, 1));
      ef_multiply_i :
          RETURN (make_uniform_product_space(the_integers, 1));
      ef_divide_i :
          RETURN (make_uniform_product_space(the_integers, 1));
      ef_mod_i :
          RETURN (make_uniform_product_space(the_integers, 1));
      ef_exponentiate_i :
          RETURN (make_uniform_product_space(the_integers, 1));
      ef_eq_i :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_ne_i :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_gt_i :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_lt_i :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_ge_i :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_le_i :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_abs_i :
          RETURN (make_uniform_product_space(the_integers, 1));
      ef_if_i :
          RETURN (make_uniform_product_space(the_integers, 1));
      ef_negate_r :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_reciprocal_r :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_add_r :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_subtract_r :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_multiply_r :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_divide_r :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_mod_r :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_exponentiate_r :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_exponentiate_ri :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_eq_r :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_ne_r :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_gt_r :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_lt_r :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_ge_r :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_le_r :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_abs_r :
          RETURN (make_uniform_product_space(the_nonnegative_reals, 1));
      ef_acos_r :
          RETURN (make_uniform_product_space(the_zero_pi_interval, 1));
      ef_asin_r :
          RETURN (make_uniform_product_space(the_neghalfpi_halfpi_interval,
             1));
      ef_atan2_r :
          RETURN (make_uniform_product_space(the_negpi_pi_interval, 1));
      ef_cos_r :
          RETURN (make_uniform_product_space(the_neg1_one_interval, 1));
      ef_exp_r :
          RETURN (make_uniform_product_space(the_nonnegative_reals, 1));
      ef_ln_r :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_log2_r :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_log10_r :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_sin_r :
          RETURN (make_uniform_product_space(the_neg1_one_interval, 1));
      ef_sqrt_r :
          RETURN (make_uniform_product_space(the_nonnegative_reals, 1));
      ef_tan_r :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_if_r :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_negate_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_reciprocal_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_add_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_subtract_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_multiply_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_divide_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_exponentiate_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_exponentiate_ci :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_eq_c :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_ne_c :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_conjugate_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_abs_c :
          RETURN (make_uniform_product_space(the_nonnegative_reals, 1));
      ef_arg_c :
          RETURN (make_uniform_product_space(the_negpi_pi_interval, 1));
      ef_cos_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_exp_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_ln_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_sin_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_sqrt_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_tan_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_if_c :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_subscript_s :
          RETURN (make_uniform_product_space(the_strings, 1));
      ef_eq_s :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_ne_s :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_gt_s :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_lt_s :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_ge_s :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_le_s :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_subsequence_s :
          RETURN (make_uniform_product_space(the_strings, 1));
      ef_concat_s :
          RETURN (make_uniform_product_space(the_strings, 1));
      ef_size_s :
          RETURN (make_uniform_product_space(the_integers, 1));
      ef_format :
          RETURN (make_uniform_product_space(the_strings, 1));
      ef_value :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_like :
          RETURN (make_uniform_product_space(the_booleans, 1));
      ef_if_s :
          RETURN (make_uniform_product_space(the_strings, 1));
      ef_subscript_b :
          RETURN (make_uniform_product_space(the_binarys, 1));
      ef_eq_b :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_ne_b :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_gt_b :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_lt_b :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_ge_b :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_le_b :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_subsequence_b :
          RETURN (make_uniform_product_space(the_binarys, 1));
      ef_concat_b :
          RETURN (make_uniform_product_space(the_binarys, 1));
      ef_size_b :
          RETURN (make_uniform_product_space(the_integers, 1));
      ef_if_b :
          RETURN (make_uniform_product_space(the_binarys, 1));
      ef_subscript_t :
          RETURN (make_uniform_product_space(the_generics, 1));
      ef_eq_t :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_ne_t :
          RETURN (make_uniform_product_space(the_logicals, 1));
      ef_concat_t :
          RETURN (make_uniform_product_space(the_tuples, 1));
      ef_size_t :
          RETURN (make_uniform_product_space(the_integers, 1));
      ef_entuple :
          RETURN (make_uniform_product_space(the_tuples, 1));
      ef_detuple :
          RETURN (the_tuples);
      ef_insert :
          RETURN (make_uniform_product_space(the_tuples, 1));
      ef_remove :
          RETURN (make_uniform_product_space(the_tuples, 1));
      ef_if_t :
          RETURN (make_uniform_product_space(the_tuples, 1));
      ef_sum_it :
          RETURN (make_uniform_product_space(the_integers, 1));
      ef_product_it :
          RETURN (make_uniform_product_space(the_integers, 1));
      ef_add_it :
          RETURN (make_uniform_product_space(the_integer_tuples, 1));
      ef_subtract_it :
          RETURN (make_uniform_product_space(the_integer_tuples, 1));
      ef_scalar_mult_it :
          RETURN (make_uniform_product_space(the_integer_tuples, 1));
      ef_dot_prod_it :
          RETURN (make_uniform_product_space(the_integers, 1));
      ef_sum_rt :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_product_rt :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_add_rt :
          RETURN (make_uniform_product_space(the_real_tuples, 1));
      ef_subtract_rt :
          RETURN (make_uniform_product_space(the_real_tuples, 1));
      ef_scalar_mult_rt :
          RETURN (make_uniform_product_space(the_real_tuples, 1));
      ef_dot_prod_rt :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_norm_rt :
          RETURN (make_uniform_product_space(the_reals, 1));
      ef_sum_ct :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_product_ct :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_add_ct :
          RETURN (make_uniform_product_space(the_complex_tuples, 1));
      ef_subtract_ct :
          RETURN (make_uniform_product_space(the_complex_tuples, 1));
      ef_scalar_mult_ct :
          RETURN (make_uniform_product_space(the_complex_tuples, 1));
      ef_dot_prod_ct :
          RETURN (make_uniform_product_space(the_complex_numbers, 1));
      ef_norm_ct :
          RETURN (make_uniform_product_space(the_nonnegative_reals, 1));
      ef_if :
          RETURN (make_uniform_product_space(the_generics, 1));
      ef_ensemble :
          RETURN (make_uniform_product_space(the_maths_spaces, 1));
      ef_member_of :
          RETURN (make_uniform_product_space(the_logicals, 1));
    OTHERWISE :
        RETURN (?);
    END_CASE;
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION derive_finite_function_domain (
    pairs : SET [1:?] OF LIST [2:2] OF maths_value 
    ) : tuple_space;
  LOCAL
    result : SET OF maths_value := [];
  END_LOCAL;
    result := result + list_selected_components(pairs, 1);
    RETURN (one_tuples_of(make_finite_space(result)));
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION derive_finite_function_range (
    pairs : SET [1:?] OF LIST [2:2] OF maths_value 
    ) : tuple_space;
  LOCAL
    result : SET OF maths_value := [];
  END_LOCAL;
    result := result + list_selected_components(pairs, 2);
    RETURN (one_tuples_of(make_finite_space(result)));
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION derive_function_domain (
    func : maths_function 
    ) : tuple_space;
  LOCAL
    typenames : SET OF STRING := stripped_typeof(func);
    tspace : tuple_space := make_listed_product_space([]);
    shape : LIST OF positive_integer;
    sidxs : LIST OF INTEGER := [ 0 ];
    itvl : finite_integer_interval;
    factors : LIST OF finite_integer_interval := [];
    is_uniform : BOOLEAN := TRUE;
  END_LOCAL;
    IF 'FINITE_FUNCTION' IN typenames THEN
      RETURN (derive_finite_function_domain(func\finite_function.pairs));
    END_IF;
    IF 'CONSTANT_FUNCTION' IN typenames THEN
      RETURN (domain_from(func\constant_function.source_of_domain));
    END_IF;
    IF 'SELECTOR_FUNCTION' IN typenames THEN
      RETURN (domain_from(func\selector_function.source_of_domain));
    END_IF;
    IF 'ELEMENTARY_FUNCTION' IN typenames THEN
      RETURN (derive_elementary_function_domain(func\elementary_function.
        func_id));
    END_IF;
    IF 'RESTRICTION_FUNCTION' IN typenames THEN
      RETURN (one_tuples_of(func\restriction_function.operand));
    END_IF;
    IF 'REPACKAGING_FUNCTION' IN typenames THEN
      IF func\repackaging_function.input_repack = ro_nochange THEN
        RETURN (func\repackaging_function.operand.domain);
      END_IF;
      IF func\repackaging_function.input_repack = ro_wrap_as_tuple THEN
        RETURN (factor1(func\repackaging_function.operand.domain));
      END_IF;
      IF func\repackaging_function.input_repack = ro_unwrap_tuple THEN
        RETURN (one_tuples_of(func\repackaging_function.operand.domain));
      END_IF;
      RETURN (?);
    END_IF;
    IF 'REINDEXED_ARRAY_FUNCTION' IN typenames THEN
      shape := shape_of_array(func\unary_generic_expression.operand);
      sidxs := func\reindexed_array_function.starting_indices;
      REPEAT i := 1 TO SIZEOF(shape);
        itvl := make_finite_integer_interval(sidxs[i], sidxs[i] + shape[i] 
          - 1);
        INSERT( factors, itvl, i - 1 );
        IF shape[i] <> shape[1] THEN
          is_uniform := FALSE;
        END_IF;
      END_REPEAT;
      IF is_uniform THEN
        RETURN (make_uniform_product_space(factors[1], SIZEOF(shape)));
      END_IF;
      RETURN (make_listed_product_space(factors));
    END_IF;
    IF 'SERIES_COMPOSED_FUNCTION' IN typenames THEN
      RETURN (func\series_composed_function.operands[1].domain);
    END_IF;
    IF 'PARALLEL_COMPOSED_FUNCTION' IN typenames THEN
      RETURN (domain_from(func\parallel_composed_function.source_of_domain)
        );
    END_IF;
    IF 'EXPLICIT_TABLE_FUNCTION' IN typenames THEN
      shape := func\explicit_table_function.shape;
      sidxs[1] := func\explicit_table_function.index_base;
      REPEAT i := 1 TO SIZEOF(shape);
        itvl := make_finite_integer_interval(sidxs[1], sidxs[1] + shape[i] 
          - 1);
        INSERT( factors, itvl, i - 1 );
        IF shape[i] <> shape[1] THEN
          is_uniform := FALSE;
        END_IF;
      END_REPEAT;
      IF is_uniform THEN
        RETURN (make_uniform_product_space(factors[1], SIZEOF(shape)));
      END_IF;
      RETURN (make_listed_product_space(factors));
    END_IF;
    IF 'HOMOGENEOUS_LINEAR_FUNCTION' IN typenames THEN
      RETURN (one_tuples_of(make_uniform_product_space(factor1(func\
        homogeneous_linear_function.mat.range), func\
        homogeneous_linear_function.mat\explicit_table_function.shape[func\
        homogeneous_linear_function.sum_index])));
    END_IF;
    IF 'GENERAL_LINEAR_FUNCTION' IN typenames THEN
      RETURN (one_tuples_of(make_uniform_product_space(factor1(func\
        general_linear_function.mat.range), func\general_linear_function.
        mat\explicit_table_function.shape[func\general_linear_function.
        sum_index] - 1)));
    END_IF;
    IF 'B_SPLINE_BASIS' IN typenames THEN
      RETURN (one_tuples_of(make_finite_real_interval(func\b_spline_basis.
        repeated_knots[func\b_spline_basis.order], closed, func\
        b_spline_basis.repeated_knots[(func\b_spline_basis.num_basis + 1)],
         closed)));
    END_IF;
    IF 'B_SPLINE_FUNCTION' IN typenames THEN
      REPEAT i := 1 TO SIZEOF(func\b_spline_function.basis);
        tspace := assoc_product_space(tspace, func\b_spline_function.basis[
          i].domain);
      END_REPEAT;
      RETURN (one_tuples_of(tspace));
    END_IF;
    IF 'RATIONALIZE_FUNCTION' IN typenames THEN
      RETURN (func\rationalize_function.fun.domain);
    END_IF;
    IF 'PARTIAL_DERIVATIVE_FUNCTION' IN typenames THEN
      RETURN (func\partial_derivative_function.derivand.domain);
    END_IF;
    IF 'DEFINITE_INTEGRAL_FUNCTION' IN typenames THEN
      RETURN (derive_definite_integral_domain(func));
    END_IF;
    IF 'ABSTRACTED_EXPRESSION_FUNCTION' IN typenames THEN
      REPEAT i := 1 TO SIZEOF(func\abstracted_expression_function.variables
        );
        tspace := assoc_product_space(tspace, one_tuples_of(values_space_of
          (func\abstracted_expression_function.variables[i])));
      END_REPEAT;
      RETURN (tspace);
    END_IF;
    IF 'EXPRESSION_DENOTED_FUNCTION' IN typenames THEN
      RETURN (values_space_of(func\expression_denoted_function.expr)\
        function_space.domain_argument);
    END_IF;
    IF 'IMPORTED_POINT_FUNCTION' IN typenames THEN
      RETURN (one_tuples_of(make_listed_product_space([])));
    END_IF;
    IF 'IMPORTED_CURVE_FUNCTION' IN typenames THEN
      RETURN (func\imported_curve_function.parametric_domain);
    END_IF;
    IF 'IMPORTED_SURFACE_FUNCTION' IN typenames THEN
      RETURN (func\imported_surface_function.parametric_domain);
    END_IF;
    IF 'IMPORTED_VOLUME_FUNCTION' IN typenames THEN
      RETURN (func\imported_volume_function.parametric_domain);
    END_IF;
    IF 'APPLICATION_DEFINED_FUNCTION' IN typenames THEN
      RETURN (func\application_defined_function.explicit_domain);
    END_IF;
    RETURN (?);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION derive_function_range (
    func : maths_function 
    ) : tuple_space;
  LOCAL
    typenames : SET OF STRING := stripped_typeof(func);
    tspace : tuple_space := make_listed_product_space([]);
    m : nonnegative_integer := 0;
    n : nonnegative_integer := 0;
    temp : INTEGER := 0;
  END_LOCAL;
    IF 'FINITE_FUNCTION' IN typenames THEN
      RETURN (derive_finite_function_range(func\finite_function.pairs));
    END_IF;
    IF 'CONSTANT_FUNCTION' IN typenames THEN
      RETURN (one_tuples_of(make_finite_space([ func\constant_function.
        sole_output ])));
    END_IF;
    IF 'SELECTOR_FUNCTION' IN typenames THEN
      tspace := func.domain;
      IF (space_dimension(tspace) = 1) AND (schema_prefix + 'TUPLE_SPACE' 
        IN TYPEOF(tspace)) THEN
        tspace := factor1(tspace);
      END_IF;
      RETURN (one_tuples_of(factor_space(tspace, func\selector_function.
        selector)));
    END_IF;
    IF 'ELEMENTARY_FUNCTION' IN typenames THEN
      RETURN (derive_elementary_function_range(func\elementary_function.
        func_id));
    END_IF;
    IF 'RESTRICTION_FUNCTION' IN typenames THEN
      RETURN (one_tuples_of(func\restriction_function.operand));
    END_IF;
    IF 'REPACKAGING_FUNCTION' IN typenames THEN
      tspace := func\repackaging_function.operand.range;
      IF func\repackaging_function.output_repack = ro_wrap_as_tuple THEN
        tspace := one_tuples_of(tspace);
      END_IF;
      IF func\repackaging_function.output_repack = ro_unwrap_tuple THEN
        tspace := factor1(tspace);
      END_IF;
      IF func\repackaging_function.selected_output > 0 THEN
        tspace := one_tuples_of(factor_space(tspace, func\
          repackaging_function.selected_output));
      END_IF;
      RETURN (tspace);
    END_IF;
    IF 'REINDEXED_ARRAY_FUNCTION' IN typenames THEN
      RETURN (func\unary_generic_expression.operand\maths_function.range);
    END_IF;
    IF 'SERIES_COMPOSED_FUNCTION' IN typenames THEN
      RETURN (func\series_composed_function.operands[SIZEOF(func\
        series_composed_function.operands)].range);
    END_IF;
    IF 'PARALLEL_COMPOSED_FUNCTION' IN typenames THEN
      RETURN (func\parallel_composed_function.final_function.range);
    END_IF;
    IF 'EXPLICIT_TABLE_FUNCTION' IN typenames THEN
      IF 'LISTED_REAL_DATA' IN typenames THEN
        RETURN (one_tuples_of(the_reals));
      END_IF;
      IF 'LISTED_INTEGER_DATA' IN typenames THEN
        RETURN (one_tuples_of(the_integers));
      END_IF;
      IF 'LISTED_LOGICAL_DATA' IN typenames THEN
        RETURN (one_tuples_of(the_logicals));
      END_IF;
      IF 'LISTED_STRING_DATA' IN typenames THEN
        RETURN (one_tuples_of(the_strings));
      END_IF;
      IF 'LISTED_COMPLEX_NUMBER_DATA' IN typenames THEN
        RETURN (one_tuples_of(the_complex_numbers));
      END_IF;
      IF 'LISTED_DATA' IN typenames THEN
        RETURN (one_tuples_of(func\listed_data.value_range));
      END_IF;
      IF 'EXTERNALLY_LISTED_DATA' IN typenames THEN
        RETURN (one_tuples_of(func\externally_listed_data.value_range));
      END_IF;
      IF 'LINEARIZED_TABLE_FUNCTION' IN typenames THEN
        RETURN (func\linearized_table_function.source.range);
      END_IF;
      IF 'BASIC_SPARSE_MATRIX' IN typenames THEN
        RETURN (func\basic_sparse_matrix.val.range);
      END_IF;
      RETURN (?);
    END_IF;
    IF 'HOMOGENEOUS_LINEAR_FUNCTION' IN typenames THEN
      RETURN (one_tuples_of(make_uniform_product_space(factor1(func\
        homogeneous_linear_function.mat.range), func\
        homogeneous_linear_function.mat\explicit_table_function.shape[(3 - 
        func\homogeneous_linear_function.sum_index)])));
    END_IF;
    IF 'GENERAL_LINEAR_FUNCTION' IN typenames THEN
      RETURN (one_tuples_of(make_uniform_product_space(factor1(func\
        general_linear_function.mat.range), func\general_linear_function.
        mat\explicit_table_function.shape[(3 - func\general_linear_function
        .sum_index)])));
    END_IF;
    IF 'B_SPLINE_BASIS' IN typenames THEN
      RETURN (one_tuples_of(make_uniform_product_space(the_reals, func\
        b_spline_basis.num_basis)));
    END_IF;
    IF 'B_SPLINE_FUNCTION' IN typenames THEN
      tspace := factor1(func\b_spline_function.coef.domain);
      m := SIZEOF(func\b_spline_function.basis);
      n := space_dimension(tspace);
      IF m = n THEN
        RETURN (one_tuples_of(the_reals));
      END_IF;
      IF m = n - 1 THEN
        RETURN (one_tuples_of(make_uniform_product_space(the_reals, 
          factor_space(tspace, n)\finite_integer_interval.size)));
      END_IF;
      tspace := extract_factors(tspace, m + 1, n);
      RETURN (one_tuples_of(make_function_space(sc_equal, tspace, 
        sc_subspace, number_superspace_of(func\b_spline_function.coef.range
        ))));
    END_IF;
    IF 'RATIONALIZE_FUNCTION' IN typenames THEN
      tspace := factor1(func\rationalize_function.fun.range);
      n := space_dimension(tspace);
      RETURN (one_tuples_of(make_uniform_product_space(number_superspace_of
        (factor1(tspace)), n - 1)));
    END_IF;
    IF 'PARTIAL_DERIVATIVE_FUNCTION' IN typenames THEN
      RETURN (drop_numeric_constraints(func\partial_derivative_function.
        derivand.range));
    END_IF;
    IF 'DEFINITE_INTEGRAL_FUNCTION' IN typenames THEN
      RETURN (drop_numeric_constraints(func\definite_integral_function.
        integrand.range));
    END_IF;
    IF 'ABSTRACTED_EXPRESSION_FUNCTION' IN typenames THEN
      RETURN (one_tuples_of(values_space_of(func\
        abstracted_expression_function.expr)));
    END_IF;
    IF 'EXPRESSION_DENOTED_FUNCTION' IN typenames THEN
      RETURN (values_space_of(func\expression_denoted_function.expr)\
        function_space.range_argument);
    END_IF;
    IF 'IMPORTED_POINT_FUNCTION' IN typenames THEN
      temp := dimension_of(func\imported_point_function.geometry);
      RETURN (one_tuples_of(make_uniform_product_space(the_reals, temp)));
    END_IF;
    IF 'IMPORTED_CURVE_FUNCTION' IN typenames THEN
      temp := dimension_of(func\imported_curve_function.geometry);
      RETURN (one_tuples_of(make_uniform_product_space(the_reals, temp)));
    END_IF;
    IF 'IMPORTED_SURFACE_FUNCTION' IN typenames THEN
      temp := dimension_of(func\imported_surface_function.geometry);
      RETURN (one_tuples_of(make_uniform_product_space(the_reals, temp)));
    END_IF;
    IF 'IMPORTED_VOLUME_FUNCTION' IN typenames THEN
      temp := dimension_of(func\imported_volume_function.geometry);
      RETURN (one_tuples_of(make_uniform_product_space(the_reals, temp)));
    END_IF;
    IF 'APPLICATION_DEFINED_FUNCTION' IN typenames THEN
      RETURN (func\application_defined_function.explicit_range);
    END_IF;
    RETURN (?);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION dimension_of (
    item : geometric_representation_item 
    ) : dimension_count;
  LOCAL
    x : SET OF representation;
    y : representation_context;
    dim : dimension_count;
  END_LOCAL;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CARTESIAN_POINT' IN 
      TYPEOF(item) THEN
      dim := SIZEOF(item\cartesian_point.coordinates);
      RETURN (dim);
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIRECTION' IN TYPEOF(
      item) THEN
      dim := SIZEOF(item\direction.direction_ratios);
      RETURN (dim);
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VECTOR' IN TYPEOF(item)
       THEN
      dim := SIZEOF(item\vector.orientation\direction.direction_ratios);
      RETURN (dim);
    END_IF;
    x := using_representations(item);
    IF SIZEOF(x) > 0 THEN
      y := x[1].context_of_items;
      dim := y\geometric_representation_context.coordinate_space_dimension;
      RETURN (dim);
    ELSE
      RETURN (?);
    END_IF;
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION dimensions_for_si_unit (
    n : si_unit_name 
    ) : dimensional_exponents;
    CASE n OF
      metre :
          RETURN (dimensional_exponents(1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0))
            ;
      gram :
          RETURN (dimensional_exponents(0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0))
            ;
      second :
          RETURN (dimensional_exponents(0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0))
            ;
      ampere :
          RETURN (dimensional_exponents(0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0))
            ;
      kelvin :
          RETURN (dimensional_exponents(0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0))
            ;
      mole :
          RETURN (dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0))
            ;
      candela :
          RETURN (dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0))
            ;
      radian :
          RETURN (dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0))
            ;
      steradian :
          RETURN (dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0))
            ;
      hertz :
          RETURN (dimensional_exponents(0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0)
            );
      newton :
          RETURN (dimensional_exponents(1.0, 1.0, -2.0, 0.0, 0.0, 0.0, 0.0)
            );
      pascal :
          RETURN (dimensional_exponents(-1.0, 1.0, -2.0, 0.0, 0.0, 0.0, 0.0
            ));
      joule :
          RETURN (dimensional_exponents(2.0, 1.0, -2.0, 0.0, 0.0, 0.0, 0.0)
            );
      watt :
          RETURN (dimensional_exponents(2.0, 1.0, -3.0, 0.0, 0.0, 0.0, 0.0)
            );
      coulomb :
          RETURN (dimensional_exponents(0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0))
            ;
      volt :
          RETURN (dimensional_exponents(2.0, 1.0, -3.0, -1.0, 0.0, 0.0, 0.0
            ));
      farad :
          RETURN (dimensional_exponents(-2.0, -1.0, 4.0, 2.0, 0.0, 0.0, 0.0
            ));
      ohm :
          RETURN (dimensional_exponents(2.0, 1.0, -3.0, -2.0, 0.0, 0.0, 0.0
            ));
      siemens :
          RETURN (dimensional_exponents(-2.0, -1.0, 3.0, 2.0, 0.0, 0.0, 0.0
            ));
      weber :
          RETURN (dimensional_exponents(2.0, 1.0, -2.0, -1.0, 0.0, 0.0, 0.0
            ));
      tesla :
          RETURN (dimensional_exponents(0.0, 1.0, -2.0, -1.0, 0.0, 0.0, 0.0
            ));
      henry :
          RETURN (dimensional_exponents(2.0, 1.0, -2.0, -2.0, 0.0, 0.0, 0.0
            ));
      degree_celsius :
          RETURN (dimensional_exponents(0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0))
            ;
      lumen :
          RETURN (dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0))
            ;
      lux :
          RETURN (dimensional_exponents(-2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0)
            );
      becquerel :
          RETURN (dimensional_exponents(0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0)
            );
      gray :
          RETURN (dimensional_exponents(2.0, 0.0, -2.0, 0.0, 0.0, 0.0, 0.0)
            );
      sievert :
          RETURN (dimensional_exponents(2.0, 0.0, -2.0, 0.0, 0.0, 0.0, 0.0)
            );
    OTHERWISE :
        RETURN (?);
    END_CASE;
END_FUNCTION; -- 10303-41: measure_schema

FUNCTION domain_from (
    ref : maths_space_or_function 
    ) : tuple_space;
  LOCAL
    typenames : SET OF STRING := stripped_typeof(ref);
    func : maths_function;
  END_LOCAL;
    IF NOT EXISTS(ref) THEN
      RETURN (?);
    END_IF;
    IF 'TUPLE_SPACE' IN typenames THEN
      RETURN (ref);
    END_IF;
    IF 'MATHS_SPACE' IN typenames THEN
      RETURN (one_tuples_of(ref));
    END_IF;
    func := ref;
    IF 'CONSTANT_FUNCTION' IN typenames THEN
      RETURN (domain_from(func\constant_function.source_of_domain));
    END_IF;
    IF 'SELECTOR_FUNCTION' IN typenames THEN
      RETURN (domain_from(func\selector_function.source_of_domain));
    END_IF;
    IF 'PARALLEL_COMPOSED_FUNCTION' IN typenames THEN
      RETURN (domain_from(func\parallel_composed_function.source_of_domain)
        );
    END_IF;
    RETURN (func.domain);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION dot_count (
    str : STRING 
    ) : INTEGER;
  LOCAL
    n : INTEGER := 0;
  END_LOCAL;
    REPEAT i := 1 TO LENGTH(str);
      IF str[i] = '.' THEN
        n := n + 1;
      END_IF;
    END_REPEAT;
    RETURN (n);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION dot_product (
    arg1 : direction;
    arg2 : direction 
    ) : REAL;
  LOCAL
    scalar : REAL;
    vec1 : direction;
    vec2 : direction;
    ndim : INTEGER;
  END_LOCAL;
    IF NOT EXISTS(arg1) OR NOT EXISTS(arg2) THEN
      scalar := ?;
    ELSE
      IF arg1.dim <> arg2.dim THEN
        scalar := ?;
      ELSE
        BEGIN
          vec1 := normalise(arg1);
          vec2 := normalise(arg2);
          ndim := arg1.dim;
          scalar := 0.0;
          REPEAT i := 1 TO ndim;
            scalar := scalar + vec1.direction_ratios[i] * vec2.
              direction_ratios[i];
          END_REPEAT;
        END;
      END_IF;
    END_IF;
    RETURN (scalar);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION dotted_identifiers_syntax (
    str : STRING 
    ) : BOOLEAN;
  LOCAL
    k : positive_integer;
    m : positive_integer;
  END_LOCAL;
    IF NOT EXISTS(str) THEN
      RETURN (FALSE);
    END_IF;
    k := parse_express_identifier(str, 1);
    IF k = 1 THEN
      RETURN (FALSE);
    END_IF;
    REPEAT WHILE k <= LENGTH(str);
      IF (str[k] <> '.') OR (k = LENGTH(str)) THEN
        RETURN (FALSE);
      END_IF;
      m := parse_express_identifier(str, k + 1);
      IF m = k + 1 THEN
        RETURN (FALSE);
      END_IF;
      k := m;
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION drop_numeric_constraints (
    spc : maths_space 
    ) : maths_space;
  LOCAL
    typenames : SET OF STRING := stripped_typeof(spc);
    tspc : listed_product_space;
    factors : LIST OF maths_space := [];
    xspc : extended_tuple_space;
  END_LOCAL;
    IF 'UNIFORM_PRODUCT_SPACE' IN typenames THEN
      RETURN (make_uniform_product_space(drop_numeric_constraints(spc\
        uniform_product_space.base), spc\uniform_product_space.exponent));
    END_IF;
    IF 'LISTED_PRODUCT_SPACE' IN typenames THEN
      tspc := spc;
      REPEAT i := 1 TO SIZEOF(tspc.factors);
        INSERT( factors, drop_numeric_constraints(tspc.factors[i]), i - 1 )
          ;
      END_REPEAT;
      RETURN (make_listed_product_space(factors));
    END_IF;
    IF 'EXTENDED_TUPLE_SPACE' IN typenames THEN
      xspc := spc;
      RETURN (make_extended_tuple_space(drop_numeric_constraints(xspc.base)
        , drop_numeric_constraints(xspc.extender)));
    END_IF;
    IF subspace_of_es(spc, es_numbers) THEN
      RETURN (number_superspace_of(spc));
    END_IF;
    RETURN (spc);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION duration_is_negative (
    duration : time_measure_with_unit 
    ) : BOOLEAN;
    IF duration\measure_with_unit.value_component < 0.0 THEN
      RETURN (TRUE);
    ELSE
      RETURN (FALSE);
    END_IF;
END_FUNCTION; -- 10303-41: date_time_schema

FUNCTION duration_is_positive (
    duration : time_measure_with_unit 
    ) : BOOLEAN;
    IF duration\measure_with_unit.value_component > 0.0 THEN
      RETURN (TRUE);
    ELSE
      RETURN (FALSE);
    END_IF;
END_FUNCTION; -- 10303-41: date_time_schema

FUNCTION edge_reversed (
    an_edge : edge 
    ) : oriented_edge;
  LOCAL
    the_reverse : oriented_edge;
  END_LOCAL;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORIENTED_EDGE' IN 
      TYPEOF(an_edge) THEN
      the_reverse := dummy_tri || edge(an_edge.edge_end, an_edge.edge_start
        ) || oriented_edge(an_edge\oriented_edge.edge_element, NOT an_edge\
        oriented_edge.orientation);
    ELSE
      the_reverse := dummy_tri || edge(an_edge.edge_end, an_edge.edge_start
        ) || oriented_edge(an_edge, FALSE);
    END_IF;
    RETURN (the_reverse);
END_FUNCTION; -- 10303-42: topology_schema

FUNCTION enclose_cregion_in_pregion (
    crgn   : cartesian_complex_number_region;
    centre : complex_number_literal 
    ) : polar_complex_number_region;
    FUNCTION angle
      (a : REAL ) : REAL;
      REPEAT WHILE a > PI;
        a := a - 2.0 * PI;
      END_REPEAT;
      REPEAT WHILE a <= -PI;
        a := a + 2.0 * PI;
      END_REPEAT;
      RETURN (a);
    END_FUNCTION;
    FUNCTION strictly_in
      (z : REAL;
       zitv : real_interval ) : LOGICAL;
      RETURN ((NOT min_exists(zitv) OR (z > real_min(zitv))) AND (NOT 
        max_exists(zitv) OR (z < real_max(zitv))));
    END_FUNCTION;
    PROCEDURE angle_minmax
      (ab : REAL;
       a : REAL;
       a_in : BOOLEAN;
       VAR amin : REAL;
       VAR amax : REAL;
       VAR amin_in : BOOLEAN;
       VAR amax_in : BOOLEAN );
      a := angle(a - ab);
      IF amin = a THEN
        amin_in := amin_in OR a_in;
      END_IF;
      IF amin > a THEN
        amin := a;
        amin_in := a_in;
      END_IF;
      IF amax = a THEN
        amax_in := amax_in OR a_in;
      END_IF;
      IF amax < a THEN
        amax := a;
        amax_in := a_in;
      END_IF;
    END_PROCEDURE;
    PROCEDURE range_max
      (r : REAL;
       incl : BOOLEAN;
       VAR rmax : REAL;
       VAR rmax_in : BOOLEAN );
      IF rmax = r THEN
        rmax_in := rmax_in OR incl;
      END_IF;
      IF rmax < r THEN
        rmax := r;
        rmax_in := incl;
      END_IF;
    END_PROCEDURE;
    PROCEDURE range_min
      (r : REAL;
       incl : BOOLEAN;
       VAR rmin : REAL;
       VAR rmin_in : BOOLEAN );
      IF rmin = r THEN
        rmin_in := rmin_in OR incl;
      END_IF;
      IF (rmin < 0.0) OR (rmin > r) THEN
        rmin := r;
        rmin_in := incl;
      END_IF;
    END_PROCEDURE;
  LOCAL
    xitv : real_interval;
    yitv : real_interval;
    is_xmin : BOOLEAN;
    is_xmax : BOOLEAN;
    is_ymin : BOOLEAN;
    is_ymax : BOOLEAN;
    xmin : REAL := 0.0;
    xmax : REAL := 0.0;
    ymin : REAL := 0.0;
    ymax : REAL := 0.0;
    xc : REAL := 0.0;
    yc : REAL := 0.0;
    xmin_in : BOOLEAN := FALSE;
    xmax_in : BOOLEAN := FALSE;
    ymin_in : BOOLEAN := FALSE;
    ymax_in : BOOLEAN := FALSE;
    rmin : REAL := -1.0;
    rmax : REAL := -1.0;
    amin : REAL := 4.0;
    amax : REAL := -4.0;
    rmax_exists : BOOLEAN := TRUE;
    outside : BOOLEAN := TRUE;
    rmin_in : BOOLEAN := FALSE;
    rmax_in : BOOLEAN := FALSE;
    amin_in : BOOLEAN := FALSE;
    amax_in : BOOLEAN := FALSE;
    ab : REAL := 0.0;
    a : REAL := 0.0;
    r : REAL := 0.0;
    incl : BOOLEAN;
    ritv : real_interval;
    aitv : finite_real_interval;
    minclo : open_closed := open;
    maxclo : open_closed := open;
  END_LOCAL;
    IF NOT EXISTS(crgn) OR NOT EXISTS(centre) THEN
      RETURN (?);
    END_IF;
    xitv := crgn.real_constraint;
    yitv := crgn.imag_constraint;
    xc := centre.real_part;
    yc := centre.imag_part;
    is_xmin := min_exists(xitv);
    is_xmax := max_exists(xitv);
    is_ymin := min_exists(yitv);
    is_ymax := max_exists(yitv);
    IF is_xmin THEN
      xmin := real_min(xitv);
      xmin_in := min_included(xitv);
    END_IF;
    IF is_xmax THEN
      xmax := real_max(xitv);
      xmax_in := max_included(xitv);
    END_IF;
    IF is_ymin THEN
      ymin := real_min(yitv);
      ymin_in := min_included(yitv);
    END_IF;
    IF is_ymax THEN
      ymax := real_max(yitv);
      ymax_in := max_included(yitv);
    END_IF;
    rmax_exists := ((is_xmin AND is_xmax) AND is_ymin) AND is_ymax;
    IF is_xmin AND (xc <= xmin) THEN
      ab := 0.0;
    ELSE
      IF is_ymin AND (yc <= ymin) THEN
        ab := 0.5 * PI;
      ELSE
        IF is_ymax AND (yc >= ymax) THEN
          ab := -0.5 * PI;
        ELSE
          IF is_xmax AND (xc >= xmax) THEN
            ab := PI;
          ELSE
            outside := FALSE;
          END_IF;
        END_IF;
      END_IF;
    END_IF;
    IF NOT outside AND NOT rmax_exists THEN
      RETURN (?);
    END_IF;
    IF (is_xmin AND (xc <= xmin)) AND strictly_in(yc, yitv) THEN
      rmin := xmin - xc;
      rmin_in := xmin_in;
    ELSE
      IF (is_ymin AND (yc <= ymin)) AND strictly_in(xc, xitv) THEN
        rmin := ymin - yc;
        rmin_in := ymin_in;
      ELSE
        IF (is_ymax AND (yc >= ymax)) AND strictly_in(xc, xitv) THEN
          rmin := yc - ymax;
          rmin_in := ymax_in;
        ELSE
          IF (is_xmax AND (xc >= xmax)) AND strictly_in(yc, yitv) THEN
            rmin := xc - xmax;
            rmin_in := xmax_in;
          END_IF;
        END_IF;
      END_IF;
    END_IF;
    IF is_xmin THEN
      IF is_ymin THEN
        r := SQRT((xmin - xc) ** 2 + (ymin - yc) ** 2);
        incl := xmin_in AND ymin_in;
        IF rmax_exists THEN
          range_max( r, incl, rmax, rmax_in );
        END_IF;
        IF outside THEN
          IF r > 0.0 THEN
            range_min( r, incl, rmin, rmin_in );
            a := angle(atan2(ymin - yc, xmin - xc) - ab);
            IF xc = xmin THEN
              incl := xmin_in;
            END_IF;
            IF yc = ymin THEN
              incl := ymin_in;
            END_IF;
            angle_minmax( ab, a, incl, amin, amax, amin_in, amax_in );
          ELSE
            rmin := 0.0;
            rmin_in := xmin_in AND ymin_in;
            amin := angle(0.0 - ab);
            amin_in := ymin_in;
            amax := angle(0.5 * PI - ab);
            amax_in := xmin_in;
          END_IF;
        END_IF;
      ELSE
        IF xc <= xmin THEN
          angle_minmax( ab, -0.5 * PI, (xc = xmin) AND xmin_in, amin, amax,
             amin_in, amax_in );
        END_IF;
      END_IF;
      IF NOT is_ymax AND (xc <= xmin) THEN
        angle_minmax( ab, 0.5 * PI, (xc = xmin) AND xmin_in, amin, amax, 
          amin_in, amax_in );
      END_IF;
    END_IF;
    IF is_ymin THEN
      IF is_xmax THEN
        r := SQRT((xmax - xc) ** 2 + (ymin - yc) ** 2);
        incl := xmax_in AND ymin_in;
        IF rmax_exists THEN
          range_max( r, incl, rmax, rmax_in );
        END_IF;
        IF outside THEN
          IF r > 0.0 THEN
            range_min( r, incl, rmin, rmin_in );
            a := angle(atan2(ymin - yc, xmax - xc) - ab);
            IF xc = xmax THEN
              incl := xmax_in;
            END_IF;
            IF yc = ymin THEN
              incl := ymin_in;
            END_IF;
            angle_minmax( ab, a, incl, amin, amax, amin_in, amax_in );
          ELSE
            rmin := 0.0;
            rmin_in := xmax_in AND ymin_in;
            amin := angle(0.5 * PI - ab);
            amin_in := ymin_in;
            amax := angle(PI - ab);
            amax_in := xmax_in;
          END_IF;
        END_IF;
      ELSE
        IF yc <= ymin THEN
          angle_minmax( ab, 0.0, (yc = ymin) AND ymin_in, amin, amax, 
            amin_in, amax_in );
        END_IF;
      END_IF;
      IF NOT is_xmin AND (yc <= ymin) THEN
        angle_minmax( ab, PI, (yc = ymin) AND ymin_in, amin, amax, amin_in,
           amax_in );
      END_IF;
    END_IF;
    IF is_xmax THEN
      IF is_ymax THEN
        r := SQRT((xmax - xc) ** 2 + (ymax - yc) ** 2);
        incl := xmax_in AND ymax_in;
        IF rmax_exists THEN
          range_max( r, incl, rmax, rmax_in );
        END_IF;
        IF outside THEN
          IF r > 0.0 THEN
            range_min( r, incl, rmin, rmin_in );
            a := angle(atan2(ymax - yc, xmax - xc) - ab);
            IF xc = xmax THEN
              incl := xmax_in;
            END_IF;
            IF yc = ymax THEN
              incl := ymax_in;
            END_IF;
            angle_minmax( ab, a, incl, amin, amax, amin_in, amax_in );
          ELSE
            rmin := 0.0;
            rmin_in := xmax_in AND ymax_in;
            amin := angle(-PI - ab);
            amin_in := ymax_in;
            amax := angle(-0.5 * PI - ab);
            amax_in := xmax_in;
          END_IF;
        END_IF;
      ELSE
        IF xc >= xmax THEN
          angle_minmax( ab, 0.5 * PI, (xc = xmax) AND xmax_in, amin, amax, 
            amin_in, amax_in );
        END_IF;
      END_IF;
      IF NOT is_ymin AND (xc >= xmax) THEN
        angle_minmax( ab, -0.5 * PI, (xc = xmax) AND xmax_in, amin, amax, 
          amin_in, amax_in );
      END_IF;
    END_IF;
    IF is_ymax THEN
      IF is_xmin THEN
        r := SQRT((xmin - xc) ** 2 + (ymax - yc) ** 2);
        incl := xmin_in AND ymax_in;
        IF rmax_exists THEN
          range_max( r, incl, rmax, rmax_in );
        END_IF;
        IF outside THEN
          IF r > 0.0 THEN
            range_min( r, incl, rmin, rmin_in );
            a := angle(atan2(ymax - yc, xmin - xc) - ab);
            IF xc = xmin THEN
              incl := xmin_in;
            END_IF;
            IF yc = ymax THEN
              incl := ymax_in;
            END_IF;
            angle_minmax( ab, a, incl, amin, amax, amin_in, amax_in );
          ELSE
            rmin := 0.0;
            rmin_in := xmin_in AND ymax_in;
            amin := angle(0.5 * PI - ab);
            amin_in := ymax_in;
            amax := angle(PI - ab);
            amax_in := xmin_in;
          END_IF;
        END_IF;
      ELSE
        IF yc >= ymax THEN
          angle_minmax( ab, PI, (yc = ymax) AND ymax_in, amin, amax, 
            amin_in, amax_in );
        END_IF;
      END_IF;
      IF NOT is_xmax AND (yc >= ymax) THEN
        angle_minmax( ab, 0.0, (yc = ymax) AND ymax_in, amin, amax, amin_in
          , amax_in );
      END_IF;
    END_IF;
    IF outside THEN
      amin := angle(amin + ab);
      IF amin = PI THEN
        amin := -PI;
      END_IF;
      amax := angle(amax + ab);
      IF amax <= amin THEN
        amax := amax + 2.0 * PI;
      END_IF;
    ELSE
      amin := -PI;
      amin_in := FALSE;
      amax := PI;
      amax_in := FALSE;
    END_IF;
    IF amin_in THEN
      minclo := closed;
    END_IF;
    IF amax_in THEN
      maxclo := closed;
    END_IF;
    aitv := make_finite_real_interval(amin, minclo, amax, maxclo);
    minclo := open;
    IF rmin_in THEN
      minclo := closed;
    END_IF;
    IF rmax_exists THEN
      maxclo := open;
      IF rmax_in THEN
        maxclo := closed;
      END_IF;
      ritv := make_finite_real_interval(rmin, minclo, rmax, maxclo);
    ELSE
      ritv := make_real_interval_from_min(rmin, minclo);
    END_IF;
    RETURN (make_polar_complex_number_region(centre, ritv, aitv));
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION enclose_pregion_in_cregion (
    prgn : polar_complex_number_region 
    ) : cartesian_complex_number_region;
    PROCEDURE nearest_good_direction
      (acart : REAL;
       aitv : finite_real_interval;
       VAR a : REAL;
       VAR a_in : BOOLEAN );
      a := acart;
      a_in := TRUE;
      IF a < aitv.min THEN
        IF a + 2.0 * PI < aitv.max THEN
          RETURN;
        END_IF;
        IF a + 2.0 * PI = aitv.max THEN
          a_in := max_included(aitv);
          RETURN;
        END_IF;
      ELSE
        IF a = aitv.min THEN
          a_in := min_included(aitv);
          RETURN;
        ELSE
          IF a < aitv.max THEN
            RETURN;
          ELSE
            IF a = aitv.max THEN
              a_in := max_included(aitv);
              RETURN;
            END_IF;
          END_IF;
        END_IF;
      END_IF;
      IF COS(acart - aitv.max) >= COS(acart - aitv.min) THEN
        a := aitv.max;
        a_in := max_included(aitv);
      ELSE
        a := aitv.min;
        a_in := min_included(aitv);
      END_IF;
    END_PROCEDURE;
  LOCAL
    xc : REAL := 0.0;
    yc : REAL := 0.0;
    xmin : REAL := 0.0;
    xmax : REAL := 0.0;
    ymin : REAL := 0.0;
    ymax : REAL := 0.0;
    ritv : real_interval;
    xitv : real_interval;
    yitv : real_interval;
    aitv : finite_real_interval;
    xmin_exists : BOOLEAN;
    xmax_exists : BOOLEAN;
    ymin_exists : BOOLEAN;
    ymax_exists : BOOLEAN;
    xmin_in : BOOLEAN := FALSE;
    xmax_in : BOOLEAN := FALSE;
    ymin_in : BOOLEAN := FALSE;
    ymax_in : BOOLEAN := FALSE;
    a : REAL := 0.0;
    r : REAL := 0.0;
    a_in : BOOLEAN := FALSE;
    min_clo : open_closed := open;
    max_clo : open_closed := open;
  END_LOCAL;
    IF NOT EXISTS(prgn) THEN
      RETURN (?);
    END_IF;
    xc := prgn.centre.real_part;
    yc := prgn.centre.imag_part;
    ritv := prgn.distance_constraint;
    aitv := prgn.direction_constraint;
    nearest_good_direction( PI, aitv, a, a_in );
    IF COS(a) >= 0.0 THEN
      xmin_exists := TRUE;
      xmin := xc + real_min(ritv) * COS(a);
      xmin_in := a_in AND (min_included(ritv) OR (COS(a) = 0.0));
    ELSE
      IF max_exists(ritv) THEN
        xmin_exists := TRUE;
        xmin := xc + real_max(ritv) * COS(a);
        xmin_in := a_in AND max_included(ritv);
      ELSE
        xmin_exists := FALSE;
      END_IF;
    END_IF;
    nearest_good_direction( 0.0, aitv, a, a_in );
    IF COS(a) <= 0.0 THEN
      xmax_exists := TRUE;
      xmax := xc + real_min(ritv) * COS(a);
      xmax_in := a_in AND (min_included(ritv) OR (COS(a) = 0.0));
    ELSE
      IF max_exists(ritv) THEN
        xmax_exists := TRUE;
        xmax := xc + real_max(ritv) * COS(a);
        xmax_in := a_in AND max_included(ritv);
      ELSE
        xmax_exists := FALSE;
      END_IF;
    END_IF;
    nearest_good_direction( -0.5 * PI, aitv, a, a_in );
    IF SIN(a) >= 0.0 THEN
      ymin_exists := TRUE;
      ymin := yc + real_min(ritv) * SIN(a);
      ymin_in := a_in AND (min_included(ritv) OR (SIN(a) = 0.0));
    ELSE
      IF max_exists(ritv) THEN
        ymin_exists := TRUE;
        ymin := yc + real_max(ritv) * SIN(a);
        ymin_in := a_in AND max_included(ritv);
      ELSE
        ymin_exists := FALSE;
      END_IF;
    END_IF;
    nearest_good_direction( 0.5 * PI, aitv, a, a_in );
    IF SIN(a) <= 0.0 THEN
      ymax_exists := TRUE;
      ymax := yc + real_min(ritv) * SIN(a);
      ymax_in := a_in AND (min_included(ritv) OR (SIN(a) = 0.0));
    ELSE
      IF max_exists(ritv) THEN
        ymax_exists := TRUE;
        ymax := yc + real_max(ritv) * SIN(a);
        ymax_in := a_in AND max_included(ritv);
      ELSE
        ymax_exists := FALSE;
      END_IF;
    END_IF;
    IF NOT (((xmin_exists OR xmax_exists) OR ymin_exists) OR ymax_exists) 
      THEN
      RETURN (?);
    END_IF;
    IF xmin_exists THEN
      IF xmin_in THEN
        min_clo := closed;
      ELSE
        min_clo := open;
      END_IF;
      IF xmax_exists THEN
        IF xmax_in THEN
          max_clo := closed;
        ELSE
          max_clo := open;
        END_IF;
        xitv := make_finite_real_interval(xmin, min_clo, xmax, max_clo);
      ELSE
        xitv := make_real_interval_from_min(xmin, min_clo);
      END_IF;
    ELSE
      IF xmax_exists THEN
        IF xmax_in THEN
          max_clo := closed;
        ELSE
          max_clo := open;
        END_IF;
        xitv := make_real_interval_to_max(xmax, max_clo);
      ELSE
        xitv := the_reals;
      END_IF;
    END_IF;
    IF ymin_exists THEN
      IF ymin_in THEN
        min_clo := closed;
      ELSE
        min_clo := open;
      END_IF;
      IF ymax_exists THEN
        IF ymax_in THEN
          max_clo := closed;
        ELSE
          max_clo := open;
        END_IF;
        yitv := make_finite_real_interval(ymin, min_clo, ymax, max_clo);
      ELSE
        yitv := make_real_interval_from_min(ymin, min_clo);
      END_IF;
    ELSE
      IF ymax_exists THEN
        IF ymax_in THEN
          max_clo := closed;
        ELSE
          max_clo := open;
        END_IF;
        yitv := make_real_interval_to_max(ymax, max_clo);
      ELSE
        yitv := the_reals;
      END_IF;
    END_IF;
    RETURN (make_cartesian_complex_number_region(xitv, yitv));
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION enclose_pregion_in_pregion (
    prgn   : polar_complex_number_region;
    centre : complex_number_literal 
    ) : polar_complex_number_region;
    FUNCTION angle
      (a : REAL ) : REAL;
      REPEAT WHILE a > PI;
        a := a - 2.0 * PI;
      END_REPEAT;
      REPEAT WHILE a <= -PI;
        a := a + 2.0 * PI;
      END_REPEAT;
      RETURN (a);
    END_FUNCTION;
    PROCEDURE angle_range
      (VAR amin : REAL;
       VAR amax : REAL );
      amin := angle(amin);
      IF amin = PI THEN
        amin := -PI;
      END_IF;
      amax := angle(amax);
      IF amax <= amin THEN
        amax := amax + 2.0 * PI;
      END_IF;
    END_PROCEDURE;
    FUNCTION strictly_in
      (a : REAL;
       aitv : finite_real_interval ) : LOGICAL;
      a := angle(a);
      RETURN ((aitv.min < a) AND (a < aitv.max) OR (aitv.min < a + 2.0 * PI
        ) AND (a + 2.0 * PI < aitv.max));
    END_FUNCTION;
    PROCEDURE find_aminmax
      (ab : REAL;
       a0 : REAL;
       a1 : REAL;
       a2 : REAL;
       a3 : REAL;
       in0 : BOOLEAN;
       in1 : BOOLEAN;
       in2 : BOOLEAN;
       in3 : BOOLEAN;
       VAR amin : REAL;
       VAR amax : REAL;
       VAR amin_in : BOOLEAN;
       VAR amax_in : BOOLEAN );
    LOCAL
      a : REAL;
    END_LOCAL;
      amin := angle(a0 - ab);
      amin_in := in0;
      amax := amin;
      amax_in := in0;
      a := angle(a1 - ab);
      IF a = amin THEN
        amin_in := amin_in OR in1;
      END_IF;
      IF a < amin THEN
        amin := a;
        amin_in := in1;
      END_IF;
      IF a = amax THEN
        amax_in := amax_in OR in1;
      END_IF;
      IF a > amax THEN
        amax := a;
        amax_in := in1;
      END_IF;
      a := angle(a2 - ab);
      IF a = amin THEN
        amin_in := amin_in OR in2;
      END_IF;
      IF a < amin THEN
        amin := a;
        amin_in := in2;
      END_IF;
      IF a = amax THEN
        amax_in := amax_in OR in2;
      END_IF;
      IF a > amax THEN
        amax := a;
        amax_in := in2;
      END_IF;
      a := angle(a3 - ab);
      IF a = amin THEN
        amin_in := amin_in OR in3;
      END_IF;
      IF a < amin THEN
        amin := a;
        amin_in := in3;
      END_IF;
      IF a = amax THEN
        amax_in := amax_in OR in3;
      END_IF;
      IF a > amax THEN
        amax := a;
        amax_in := in3;
      END_IF;
      amin := amin + ab;
      amax := amax + ab;
      angle_range( amin, amax );
    END_PROCEDURE;
  LOCAL
    ritp : real_interval;
    ritv : real_interval;
    aitp : finite_real_interval;
    aitv : finite_real_interval;
    xp : REAL := 0.0;
    yp : REAL := 0.0;
    xc : REAL := 0.0;
    yc : REAL := 0.0;
    rmax : REAL := 0.0;
    rmin : REAL := 0.0;
    amin : REAL := 0.0;
    amax : REAL := 0.0;
    rc : REAL := 0.0;
    acp : REAL := 0.0;
    apc : REAL := 0.0;
    rmax_in : BOOLEAN := FALSE;
    rmin_in : BOOLEAN := FALSE;
    amin_in : BOOLEAN := FALSE;
    amax_in : BOOLEAN := FALSE;
    rmxp : REAL := 0.0;
    rmnp : REAL := 0.0;
    x : REAL := 0.0;
    y : REAL := 0.0;
    r : REAL := 0.0;
    a : REAL := 0.0;
    ab : REAL := 0.0;
    r0 : REAL := 0.0;
    a0 : REAL := 0.0;
    r1 : REAL := 0.0;
    a1 : REAL := 0.0;
    r2 : REAL := 0.0;
    a2 : REAL := 0.0;
    r3 : REAL := 0.0;
    a3 : REAL := 0.0;
    in0 : BOOLEAN := FALSE;
    in1 : BOOLEAN := FALSE;
    in2 : BOOLEAN := FALSE;
    in3 : BOOLEAN := FALSE;
    inn : BOOLEAN := FALSE;
    minclo : open_closed := open;
    maxclo : open_closed := open;
  END_LOCAL;
    IF NOT EXISTS(prgn) OR NOT EXISTS(centre) THEN
      RETURN (?);
    END_IF;
    xp := prgn.centre.real_part;
    yp := prgn.centre.imag_part;
    ritp := prgn.distance_constraint;
    aitp := prgn.direction_constraint;
    xc := centre.real_part;
    yc := centre.imag_part;
    IF (xc = xp) AND (yc = yp) THEN
      RETURN (prgn);
    END_IF;
    rc := SQRT((xp - xc) ** 2 + (yp - yc) ** 2);
    acp := atan2(yp - yc, xp - xc);
    apc := atan2(yc - yp, xc - xp);
    rmnp := real_min(ritp);
    IF max_exists(ritp) THEN
      rmxp := real_max(ritp);
      IF aitp.max - aitp.min = 2.0 * PI THEN
        inn := NOT max_included(aitp);
        a := angle(aitp.min);
        rmax := rc + rmxp;
        rmax_in := max_included(ritp);
        IF inn AND (acp = a) THEN
          rmax_in := FALSE;
        END_IF;
        IF rc > rmxp THEN
          a0 := ASIN(rmxp / rc);
          amin := angle(acp - a0);
          amin_in := max_included(ritp);
          IF amin = PI THEN
            amin := -PI;
          END_IF;
          amax := angle(acp + a0);
          amax_in := amin_in;
          IF amax < amin THEN
            amax := amax + 2.0 * PI;
          END_IF;
          rmin := rc - rmxp;
          rmin_in := amin_in;
          IF inn THEN
            IF apc = a THEN
              rmin_in := FALSE;
            END_IF;
            IF angle(amin + 0.5 * PI) = a THEN
              amin_in := FALSE;
            END_IF;
            IF angle(amax - 0.5 * PI) = a THEN
              amax_in := FALSE;
            END_IF;
          END_IF;
        ELSE
          IF rc = rmxp THEN
            amin := angle(acp - 0.5 * PI);
            amin_in := FALSE;
            IF amin = PI THEN
              amin := -PI;
            END_IF;
            amax := angle(acp + 0.5 * PI);
            amax_in := FALSE;
            IF amax < amin THEN
              amax := amax + 2.0 * PI;
            END_IF;
            rmin := 0.0;
            rmin_in := max_included(ritp);
            IF inn AND (apc = a) THEN
              rmin_in := FALSE;
            END_IF;
          ELSE
            IF rc > rmnp THEN
              IF inn AND (apc = a) THEN
                rmin := 0.0;
                rmin_in := FALSE;
                amin := aitp.min;
                amin_in := FALSE;
                amax := aitp.max;
                amax_in := FALSE;
              ELSE
                rmin := 0.0;
                rmin_in := TRUE;
                amin := -PI;
                amin_in := FALSE;
                amax := PI;
                amax_in := TRUE;
              END_IF;
            ELSE
              rmin := rmnp - rc;
              rmin_in := min_included(ritp);
              amin := -PI;
              amin_in := FALSE;
              amax := PI;
              amax_in := TRUE;
              IF inn THEN
                IF apc = a THEN
                  rmin_in := FALSE;
                  amin := aitp.min;
                  amin_in := FALSE;
                  amax := aitp.max;
                  amax_in := FALSE;
                ELSE
                  IF acp = a THEN
                    amin := aitp.min;
                    amin_in := FALSE;
                    amax := aitp.max;
                    amax_in := FALSE;
                  END_IF;
                END_IF;
              END_IF;
            END_IF;
          END_IF;
        END_IF;
      ELSE
        x := xp + rmxp * COS(aitp.min) - xc;
        y := yp + rmxp * SIN(aitp.min) - yc;
        r0 := SQRT(x ** 2 + y ** 2);
        in0 := max_included(ritp) AND min_included(aitp);
        IF r0 <> 0.0 THEN
          a0 := atan2(y, x);
        END_IF;
        x := xp + rmxp * COS(aitp.max) - xc;
        y := yp + rmxp * SIN(aitp.max) - yc;
        r1 := SQRT(x ** 2 + y ** 2);
        in1 := max_included(ritp) AND max_included(aitp);
        IF r1 <> 0.0 THEN
          a1 := atan2(y, x);
        END_IF;
        x := xp + rmnp * COS(aitp.max) - xc;
        y := yp + rmnp * SIN(aitp.max) - yc;
        r2 := SQRT(x ** 2 + y ** 2);
        in2 := min_included(ritp) AND max_included(aitp);
        IF r2 <> 0.0 THEN
          a2 := atan2(y, x);
        ELSE
          a2 := a1;
          in2 := in1;
        END_IF;
        IF r1 = 0.0 THEN
          a1 := a2;
          in1 := in2;
        END_IF;
        x := xp + rmnp * COS(aitp.min) - xc;
        y := yp + rmnp * SIN(aitp.min) - yc;
        r3 := SQRT(x ** 2 + y ** 2);
        in3 := min_included(ritp) AND min_included(aitp);
        IF r3 <> 0.0 THEN
          a3 := atan2(y, x);
        ELSE
          a3 := a0;
          in3 := in0;
        END_IF;
        IF r0 = 0.0 THEN
          a0 := a3;
          in0 := in3;
        END_IF;
        IF rmnp = 0.0 THEN
          in2 := min_included(ritp);
          in3 := in2;
        END_IF;
        IF (apc = angle(aitp.min)) OR (acp = angle(aitp.min)) THEN
          in0 := min_included(aitp);
          in3 := in0;
        ELSE
          IF (apc = angle(aitp.max)) OR (acp = angle(aitp.max)) THEN
            in1 := max_included(aitp);
            in2 := in1;
          END_IF;
        END_IF;
        IF strictly_in(acp, aitp) THEN
          rmax := rc + rmxp;
          rmax_in := max_included(ritp);
        ELSE
          rmax := r0;
          rmax_in := in0;
          IF rmax = r1 THEN
            rmax_in := rmax_in OR in1;
          END_IF;
          IF rmax < r1 THEN
            rmax := r1;
            rmax_in := in1;
          END_IF;
          IF rmax = r2 THEN
            rmax_in := rmax_in OR in2;
          END_IF;
          IF rmax < r2 THEN
            rmax := r2;
            rmax_in := in2;
          END_IF;
          IF rmax = r3 THEN
            rmax_in := rmax_in OR in3;
          END_IF;
          IF rmax < r3 THEN
            rmax := r3;
            rmax_in := in3;
          END_IF;
        END_IF;
        IF strictly_in(apc, aitp) THEN
          IF rc >= rmxp THEN
            rmin := rc - rmxp;
            rmin_in := max_included(ritp);
          ELSE
            IF rc <= rmnp THEN
              rmin := rmnp - rc;
              rmin_in := min_included(ritp);
            ELSE
              rmin := 0.0;
              rmin_in := TRUE;
            END_IF;
          END_IF;
        ELSE
          rmin := r0;
          rmin_in := in0;
          a := apc - aitp.min;
          r := rc * COS(a);
          IF (rmnp < r) AND (r < rmxp) THEN
            rmin := rc * SIN(ABS(a));
            rmin_in := min_included(aitp);
          END_IF;
          a := apc - aitp.max;
          r := rc * COS(a);
          IF (rmnp < r) AND (r < rmxp) THEN
            r := rc * SIN(ABS(a));
            inn := max_included(aitp);
            IF r = rmin THEN
              rmin_in := rmin_in OR inn;
            END_IF;
            IF r < rmin THEN
              rmin := r;
              rmin_in := inn;
            END_IF;
          END_IF;
          IF r1 = rmin THEN
            rmin_in := rmin_in OR in1;
          END_IF;
          IF r1 < rmin THEN
            rmin := r1;
            rmin_in := in1;
          END_IF;
          IF r2 = rmin THEN
            rmin_in := rmin_in OR in2;
          END_IF;
          IF r2 < rmin THEN
            rmin := r2;
            rmin_in := in2;
          END_IF;
          IF r3 = rmin THEN
            rmin_in := rmin_in OR in3;
          END_IF;
          IF r3 < rmin THEN
            rmin := r3;
            rmin_in := in3;
          END_IF;
        END_IF;
        IF rc >= rmxp THEN
          ab := acp;
          find_aminmax( ab, a0, a1, a2, a3, in0, in1, in2, in3, amin, amax,
             amin_in, amax_in );
          a := ACOS(rmxp / rc);
          IF strictly_in(apc - a, aitp) THEN
            amin := ab - ASIN(rmxp / rc);
            amin_in := max_included(ritp);
          END_IF;
          IF strictly_in(apc + a, aitp) THEN
            amax := ab + ASIN(rmxp / rc);
            amax_in := max_included(ritp);
          END_IF;
          angle_range( amin, amax );
        ELSE
          IF rc > rmnp THEN
            ab := angle(0.5 * (aitp.min + aitp.max));
            find_aminmax( ab, a0, a1, a2, a3, in0, in1, in2, in3, amin, 
              amax, amin_in, amax_in );
          ELSE
            ab := angle(0.5 * (aitp.min + aitp.max));
            a0 := angle(a0 - ab);
            a1 := angle(a1 - ab);
            a2 := angle(a2 - ab);
            a3 := angle(a3 - ab);
            IF a3 > a2 THEN
              a2 := a2 + 2.0 * PI;
            END_IF;
            IF a0 > a1 THEN
              a0 := a0 + 2.0 * PI;
            END_IF;
            IF a3 < a0 THEN
              amin := a3;
              amin_in := in3;
            ELSE
              amin := a0;
              amin_in := in0;
            END_IF;
            IF a2 > a1 THEN
              amax := a2;
              amax_in := in2;
            ELSE
              amax := a1;
              amax_in := in1;
            END_IF;
            IF (amax - amin > 2.0 * PI) OR (amax - amin = 2.0 * PI) AND (
              amin_in OR amax_in) THEN
              amin := -PI;
              amin_in := FALSE;
              amax := PI;
              amax_in := TRUE;
            ELSE
              amin := amin + ab;
              amax := amax + ab;
              angle_range( amin, amax );
            END_IF;
          END_IF;
        END_IF;
      END_IF;
      IF rmin_in THEN
        minclo := closed;
      END_IF;
      IF rmax_in THEN
        maxclo := closed;
      END_IF;
      ritv := make_finite_real_interval(rmin, minclo, rmax, maxclo);
    ELSE
      IF (rc > rmnp) AND strictly_in(apc, aitp) THEN
        RETURN (?);
      END_IF;
      IF aitp.max - aitp.min = 2.0 * PI THEN
        a := angle(aitp.min);
        IF rc > rmnp THEN
          IF max_included(aitp) THEN
            RETURN (?);
          END_IF;
          rmin := 0.0;
          rmin_in := FALSE;
          amin := aitp.min;
          amin_in := FALSE;
          amax := aitp.max;
          amax_in := FALSE;
        ELSE
          rmin := rmnp - rc;
          rmin_in := min_included(ritp);
          amin := -PI;
          amin_in := FALSE;
          amax := PI;
          amax_in := TRUE;
          IF NOT max_included(aitp) THEN
            IF apc = a THEN
              rmin_in := FALSE;
              amin := aitp.min;
              amin_in := FALSE;
              amax := aitp.max;
              amax_in := FALSE;
            ELSE
              IF acp = a THEN
                amin := aitp.min;
                amin_in := FALSE;
                amax := aitp.max;
                amax_in := FALSE;
              END_IF;
            END_IF;
          END_IF;
        END_IF;
      ELSE
        a0 := angle(aitp.min);
        in0 := FALSE;
        a1 := angle(aitp.max);
        in1 := FALSE;
        x := xp + rmnp * COS(aitp.max) - xc;
        y := yp + rmnp * SIN(aitp.max) - yc;
        r2 := SQRT(x ** 2 + y ** 2);
        in2 := min_included(ritp) AND max_included(aitp);
        IF r2 <> 0.0 THEN
          a2 := atan2(y, x);
        ELSE
          a2 := a1;
          in2 := in1;
        END_IF;
        x := xp + rmnp * COS(aitp.min) - xc;
        y := yp + rmnp * SIN(aitp.min) - yc;
        r3 := SQRT(x ** 2 + y ** 2);
        in3 := min_included(ritp) AND min_included(aitp);
        IF r3 <> 0.0 THEN
          a3 := atan2(y, x);
        ELSE
          a3 := a0;
          in3 := in0;
        END_IF;
        IF rmnp = 0.0 THEN
          in2 := min_included(ritp);
          in3 := in2;
        END_IF;
        IF (apc = angle(aitp.min)) OR (acp = angle(aitp.min)) THEN
          in0 := min_included(aitp);
          in3 := in0;
        ELSE
          IF (apc = angle(aitp.max)) OR (acp = angle(aitp.max)) THEN
            in1 := max_included(aitp);
            in2 := in1;
          END_IF;
        END_IF;
        IF strictly_in(apc, aitp) THEN
          rmin := rmnp - rc;
          rmin_in := min_included(ritp);
        ELSE
          rmin := r2;
          rmin_in := in2;
          a := apc - aitp.min;
          r := rc * COS(a);
          IF rmnp < r THEN
            rmin := rc * SIN(ABS(a));
            rmin_in := min_included(aitp);
          END_IF;
          a := apc - aitp.max;
          r := rc * COS(a);
          IF rmnp < r THEN
            r := rc * SIN(ABS(a));
            inn := max_included(aitp);
            IF r = rmin THEN
              rmin_in := rmin_in OR inn;
            END_IF;
            IF r < rmin THEN
              rmin := r;
              rmin_in := inn;
            END_IF;
          END_IF;
          IF r3 = rmin THEN
            rmin_in := rmin_in OR in3;
          END_IF;
          IF r3 < rmin THEN
            rmin := r3;
            rmin_in := in3;
          END_IF;
        END_IF;
        ab := angle(0.5 * (aitp.min + aitp.max));
        IF rc > rmnp THEN
          find_aminmax( ab, a0, a1, a2, a3, in0, in1, in2, in3, amin, amax,
             amin_in, amax_in );
        ELSE
          a0 := angle(a0 - ab);
          a1 := angle(a1 - ab);
          a2 := angle(a2 - ab);
          a3 := angle(a3 - ab);
          IF a3 > a2 THEN
            a2 := a2 + 2.0 * PI;
          END_IF;
          IF a0 > a1 THEN
            a0 := a0 + 2.0 * PI;
          END_IF;
          IF a3 < a0 THEN
            amin := a3;
            amin_in := in3;
          ELSE
            amin := a0;
            amin_in := in0;
          END_IF;
          IF a2 > a1 THEN
            amax := a2;
            amax_in := in2;
          ELSE
            amax := a1;
            amax_in := in1;
          END_IF;
          IF (amax - amin > 2.0 * PI) OR (amax - amin = 2.0 * PI) AND (
            amin_in OR amax_in) THEN
            amin := -PI;
            amin_in := FALSE;
            amax := PI;
            amax_in := TRUE;
            IF (rmin = 0.0) AND rmin_in THEN
              RETURN (?);
            END_IF;
          ELSE
            amin := amin + ab;
            amax := amax + ab;
            angle_range( amin, amax );
          END_IF;
        END_IF;
      END_IF;
      IF rmin_in THEN
        minclo := closed;
      END_IF;
      ritv := make_real_interval_from_min(rmin, minclo);
    END_IF;
    minclo := open;
    maxclo := open;
    IF amin_in THEN
      minclo := closed;
    END_IF;
    IF amax_in THEN
      maxclo := closed;
    END_IF;
    aitv := make_finite_real_interval(amin, minclo, amax, maxclo);
    RETURN (make_polar_complex_number_region(centre, ritv, aitv));
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION equal_cregion_pregion (
    crgn : cartesian_complex_number_region;
    prgn : polar_complex_number_region 
    ) : LOGICAL;
  LOCAL
    arng : REAL;
    amin : REAL;
    xc : REAL;
    yc : REAL;
    aitv : real_interval;
    xitv : real_interval;
    yitv : real_interval;
    c_in : BOOLEAN;
  END_LOCAL;
    IF NOT EXISTS(crgn) OR NOT EXISTS(prgn) THEN
      RETURN (FALSE);
    END_IF;
    IF max_exists(prgn.distance_constraint) THEN
      RETURN (FALSE);
    END_IF;
    IF real_min(prgn.distance_constraint) <> 0.0 THEN
      RETURN (FALSE);
    END_IF;
    c_in := min_included(prgn.distance_constraint);
    aitv := prgn.direction_constraint;
    amin := aitv.min;
    arng := aitv.max - amin;
    xc := prgn.centre.real_part;
    yc := prgn.centre.imag_part;
    xitv := crgn.real_constraint;
    yitv := crgn.imag_constraint;
    IF arng = 0.5 * PI THEN
      IF amin = 0.0 THEN
        RETURN ((((((NOT max_exists(xitv) AND NOT max_exists(yitv)) AND 
          min_exists(xitv)) AND min_exists(yitv)) AND (real_min(xitv) = xc)
          ) AND (real_min(yitv) = yc)) AND ((((((c_in AND min_included(aitv
          )) AND max_included(aitv)) AND min_included(xitv)) AND 
          min_included(yitv) OR (((NOT c_in AND NOT min_included(aitv)) AND
           max_included(aitv)) AND min_included(xitv)) AND NOT min_included
          (yitv)) OR (((NOT c_in AND min_included(aitv)) AND NOT 
          max_included(aitv)) AND NOT min_included(xitv)) AND min_included(
          yitv)) OR (((NOT c_in AND NOT min_included(aitv)) AND NOT 
          max_included(aitv)) AND NOT min_included(xitv)) AND NOT 
          min_included(yitv)));
      END_IF;
      IF amin = 0.5 * PI THEN
        RETURN ((((((max_exists(xitv) AND NOT max_exists(yitv)) AND NOT 
          min_exists(xitv)) AND min_exists(yitv)) AND (real_max(xitv) = xc)
          ) AND (real_min(yitv) = yc)) AND ((((((c_in AND min_included(aitv
          )) AND max_included(aitv)) AND max_included(xitv)) AND 
          min_included(yitv) OR (((NOT c_in AND NOT min_included(aitv)) AND
           max_included(aitv)) AND max_included(xitv)) AND NOT min_included
          (yitv)) OR (((NOT c_in AND min_included(aitv)) AND NOT 
          max_included(aitv)) AND NOT max_included(xitv)) AND min_included(
          yitv)) OR (((NOT c_in AND NOT min_included(aitv)) AND NOT 
          max_included(aitv)) AND NOT max_included(xitv)) AND NOT 
          min_included(yitv)));
      END_IF;
      IF amin = -PI THEN
        RETURN ((((((max_exists(xitv) AND max_exists(yitv)) AND NOT 
          min_exists(xitv)) AND NOT min_exists(yitv)) AND (real_max(xitv) =
           xc)) AND (real_max(yitv) = yc)) AND ((((((c_in AND min_included(
          aitv)) AND max_included(aitv)) AND max_included(xitv)) AND 
          max_included(yitv) OR (((NOT c_in AND NOT min_included(aitv)) AND
           max_included(aitv)) AND max_included(xitv)) AND NOT max_included
          (yitv)) OR (((NOT c_in AND min_included(aitv)) AND NOT 
          max_included(aitv)) AND NOT max_included(xitv)) AND max_included(
          yitv)) OR (((NOT c_in AND NOT min_included(aitv)) AND NOT 
          max_included(aitv)) AND NOT max_included(xitv)) AND NOT 
          max_included(yitv)));
      END_IF;
      IF amin = -0.5 * PI THEN
        RETURN ((((((NOT max_exists(xitv) AND max_exists(yitv)) AND 
          min_exists(xitv)) AND NOT min_exists(yitv)) AND (real_min(xitv) =
           xc)) AND (real_max(yitv) = yc)) AND ((((((c_in AND min_included(
          aitv)) AND max_included(aitv)) AND min_included(xitv)) AND 
          max_included(yitv) OR (((NOT c_in AND NOT min_included(aitv)) AND
           max_included(aitv)) AND min_included(xitv)) AND NOT max_included
          (yitv)) OR (((NOT c_in AND min_included(aitv)) AND NOT 
          max_included(aitv)) AND NOT min_included(xitv)) AND max_included(
          yitv)) OR (((NOT c_in AND NOT min_included(aitv)) AND NOT 
          max_included(aitv)) AND NOT min_included(xitv)) AND NOT 
          max_included(yitv)));
      END_IF;
    END_IF;
    IF arng = PI THEN
      IF amin = 0.0 THEN
        RETURN (((((NOT max_exists(xitv) AND NOT max_exists(yitv)) AND NOT 
          min_exists(xitv)) AND min_exists(yitv)) AND (real_min(yitv) = yc)
          ) AND (((c_in AND min_included(aitv)) AND max_included(aitv)) AND
           min_included(yitv) OR ((NOT c_in AND NOT min_included(aitv)) AND
           NOT max_included(aitv)) AND NOT min_included(yitv)));
      END_IF;
      IF amin = 0.5 * PI THEN
        RETURN (((((max_exists(xitv) AND NOT max_exists(yitv)) AND NOT 
          min_exists(xitv)) AND NOT min_exists(yitv)) AND (real_max(xitv) =
           xc)) AND (((c_in AND min_included(aitv)) AND max_included(aitv))
           AND max_included(xitv) OR ((NOT c_in AND NOT min_included(aitv))
           AND NOT max_included(aitv)) AND NOT max_included(xitv)));
      END_IF;
      IF amin = -PI THEN
        RETURN (((((NOT max_exists(xitv) AND max_exists(yitv)) AND NOT 
          min_exists(xitv)) AND NOT min_exists(yitv)) AND (real_max(yitv) =
           yc)) AND (((c_in AND min_included(aitv)) AND max_included(aitv))
           AND max_included(yitv) OR ((NOT c_in AND NOT min_included(aitv))
           AND NOT max_included(aitv)) AND NOT max_included(yitv)));
      END_IF;
      IF amin = -0.5 * PI THEN
        RETURN (((((NOT max_exists(xitv) AND NOT max_exists(yitv)) AND 
          min_exists(xitv)) AND NOT min_exists(yitv)) AND (real_min(xitv) =
           xc)) AND (((c_in AND min_included(aitv)) AND max_included(aitv))
           AND min_included(xitv) OR ((NOT c_in AND NOT min_included(aitv))
           AND NOT max_included(aitv)) AND NOT min_included(xitv)));
      END_IF;
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION equal_maths_functions (
    fun1 : maths_function;
    fun2 : maths_function 
    ) : LOGICAL;
  LOCAL
    cum : LOGICAL;
  END_LOCAL;
    IF fun1 = fun2 THEN
      RETURN (TRUE);
    END_IF;
    cum := equal_maths_spaces(fun1.domain, fun2.domain);
    IF cum = FALSE THEN
      RETURN (FALSE);
    END_IF;
    cum := cum AND equal_maths_spaces(fun1.range, fun2.range);
    IF cum = FALSE THEN
      RETURN (FALSE);
    END_IF;
    RETURN (UNKNOWN);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION equal_maths_spaces (
    spc1 : maths_space;
    spc2 : maths_space 
    ) : LOGICAL;
  LOCAL
    spc1types : SET OF STRING := stripped_typeof(spc1);
    spc2types : SET OF STRING := stripped_typeof(spc2);
    set1 : SET OF maths_value;
    set2 : SET OF maths_value;
    cum : LOGICAL := TRUE;
    base : maths_space;
    expnt : INTEGER;
    factors : LIST OF maths_space;
    factors2 : LIST OF maths_space;
    fs1 : function_space;
    fs2 : function_space;
    cum2 : LOGICAL;
  END_LOCAL;
    IF spc1 = spc2 THEN
      RETURN (TRUE);
    END_IF;
    IF 'FINITE_SPACE' IN spc1types THEN
      set1 := spc1\finite_space.members;
      IF 'FINITE_SPACE' IN spc2types THEN
        set2 := spc2\finite_space.members;
        REPEAT i := 1 TO SIZEOF(set1);
          cum := cum AND member_of(set1[i], spc2);
          IF cum = FALSE THEN
            RETURN (FALSE);
          END_IF;
        END_REPEAT;
        IF cum = TRUE THEN
          REPEAT i := 1 TO SIZEOF(set2);
            cum := cum AND member_of(set2[i], spc1);
            IF cum = FALSE THEN
              RETURN (FALSE);
            END_IF;
          END_REPEAT;
        END_IF;
        RETURN (cum);
      END_IF;
      IF 'FINITE_INTEGER_INTERVAL' IN spc2types THEN
        set2 := [];
        REPEAT i := spc2\finite_integer_interval.min TO spc2\
          finite_integer_interval.max;
          set2 := set2 + [ i ];
        END_REPEAT;
        RETURN (equal_maths_spaces(spc1, make_finite_space(set2)));
      END_IF;
    END_IF;
    IF ('FINITE_INTEGER_INTERVAL' IN spc1types) AND ('FINITE_SPACE' IN 
      spc2types) THEN
      set1 := [];
      REPEAT i := spc1\finite_integer_interval.min TO spc1\
        finite_integer_interval.max;
        set1 := set1 + [ i ];
      END_REPEAT;
      RETURN (equal_maths_spaces(make_finite_space(set1), spc2));
    END_IF;
    IF ('CARTESIAN_COMPLEX_NUMBER_REGION' IN spc1types) AND (
      'POLAR_COMPLEX_NUMBER_REGION' IN spc2types) THEN
      RETURN (equal_cregion_pregion(spc1, spc2));
    END_IF;
    IF ('POLAR_COMPLEX_NUMBER_REGION' IN spc1types) AND (
      'CARTESIAN_COMPLEX_NUMBER_REGION' IN spc2types) THEN
      RETURN (equal_cregion_pregion(spc2, spc1));
    END_IF;
    IF 'UNIFORM_PRODUCT_SPACE' IN spc1types THEN
      base := spc1\uniform_product_space.base;
      expnt := spc1\uniform_product_space.exponent;
      IF 'UNIFORM_PRODUCT_SPACE' IN spc2types THEN
        IF expnt <> spc2\uniform_product_space.exponent THEN
          RETURN (FALSE);
        END_IF;
        RETURN (equal_maths_spaces(base, spc2\uniform_product_space.base));
      END_IF;
      IF 'LISTED_PRODUCT_SPACE' IN spc2types THEN
        factors := spc2\listed_product_space.factors;
        IF expnt <> SIZEOF(factors) THEN
          RETURN (FALSE);
        END_IF;
        REPEAT i := 1 TO SIZEOF(factors);
          cum := cum AND equal_maths_spaces(base, factors[i]);
          IF cum = FALSE THEN
            RETURN (FALSE);
          END_IF;
        END_REPEAT;
        RETURN (cum);
      END_IF;
    END_IF;
    IF 'LISTED_PRODUCT_SPACE' IN spc1types THEN
      factors := spc1\listed_product_space.factors;
      IF 'UNIFORM_PRODUCT_SPACE' IN spc2types THEN
        IF spc2\uniform_product_space.exponent <> SIZEOF(factors) THEN
          RETURN (FALSE);
        END_IF;
        base := spc2\uniform_product_space.base;
        REPEAT i := 1 TO SIZEOF(factors);
          cum := cum AND equal_maths_spaces(base, factors[i]);
          IF cum = FALSE THEN
            RETURN (FALSE);
          END_IF;
        END_REPEAT;
        RETURN (cum);
      END_IF;
      IF 'LISTED_PRODUCT_SPACE' IN spc2types THEN
        factors2 := spc2\listed_product_space.factors;
        IF SIZEOF(factors) <> SIZEOF(factors2) THEN
          RETURN (FALSE);
        END_IF;
        REPEAT i := 1 TO SIZEOF(factors);
          cum := cum AND equal_maths_spaces(factors[i], factors2[i]);
          IF cum = FALSE THEN
            RETURN (FALSE);
          END_IF;
        END_REPEAT;
        RETURN (cum);
      END_IF;
    END_IF;
    IF ('EXTENDED_TUPLE_SPACE' IN spc1types) AND ('EXTENDED_TUPLE_SPACE' IN
       spc2types) THEN
      RETURN (equal_maths_spaces(spc1\extended_tuple_space.extender, spc2\
        extended_tuple_space.extender) AND equal_maths_spaces(spc1\
        extended_tuple_space.base, spc2\extended_tuple_space.base));
    END_IF;
    IF ('FUNCTION_SPACE' IN spc1types) AND ('FUNCTION_SPACE' IN spc2types) 
      THEN
      fs1 := spc1;
      fs2 := spc2;
      IF fs1.domain_constraint <> fs2.domain_constraint THEN
        IF (fs1.domain_constraint = sc_equal) OR (fs2.domain_constraint = 
          sc_equal) THEN
          RETURN (FALSE);
        END_IF;
        IF fs1.domain_constraint <> sc_subspace THEN
          fs1 := spc2;
          fs2 := spc1;
        END_IF;
        IF (fs1.domain_constraint <> sc_subspace) OR (fs2.domain_constraint
           <> sc_member) THEN
          RETURN (UNKNOWN);
        END_IF;
        IF any_space_satisfies(fs1.domain_constraint, fs1.domain_argument) 
          <> any_space_satisfies(fs2.domain_constraint, fs2.domain_argument
          ) THEN
          RETURN (FALSE);
        END_IF;
        IF NOT ('FINITE_SPACE' IN stripped_typeof(fs2.domain_argument)) 
          THEN
          RETURN (FALSE);
        END_IF;
        IF SIZEOF([ 'FINITE_SPACE', 'FINITE_INTEGER_INTERVAL' ] * 
          stripped_typeof(fs1.domain_argument)) = 0 THEN
          RETURN (FALSE);
        END_IF;
        RETURN (UNKNOWN);
      END_IF;
      cum := equal_maths_spaces(fs1.domain_argument, fs2.domain_argument);
      IF cum = FALSE THEN
        RETURN (FALSE);
      END_IF;
      IF fs1.range_constraint <> fs2.range_constraint THEN
        IF (fs1.range_constraint = sc_equal) OR (fs2.range_constraint = 
          sc_equal) THEN
          RETURN (FALSE);
        END_IF;
        IF fs1.range_constraint <> sc_subspace THEN
          fs1 := spc2;
          fs2 := spc1;
        END_IF;
        IF (fs1.range_constraint <> sc_subspace) OR (fs2.range_constraint 
          <> sc_member) THEN
          RETURN (UNKNOWN);
        END_IF;
        IF any_space_satisfies(fs1.range_constraint, fs1.range_argument) <>
           any_space_satisfies(fs2.range_constraint, fs2.range_argument) 
          THEN
          RETURN (FALSE);
        END_IF;
        IF NOT ('FINITE_SPACE' IN stripped_typeof(fs2.range_argument)) THEN
          RETURN (FALSE);
        END_IF;
        IF SIZEOF([ 'FINITE_SPACE', 'FINITE_INTEGER_INTERVAL' ] * 
          stripped_typeof(fs1.range_argument)) = 0 THEN
          RETURN (FALSE);
        END_IF;
        RETURN (UNKNOWN);
      END_IF;
      cum := cum AND equal_maths_spaces(fs1.range_argument, fs2.
        range_argument);
      RETURN (cum);
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION equal_maths_values (
    val1 : maths_value;
    val2 : maths_value 
    ) : LOGICAL;
    FUNCTION mem_of_vs
      (val1 : maths_value;
       val2 : maths_value ) : LOGICAL;
      IF NOT has_values_space(val2) THEN
        RETURN (UNKNOWN);
      END_IF;
      IF NOT member_of(val1, values_space_of(val2)) THEN
        RETURN (FALSE);
      END_IF;
      RETURN (UNKNOWN);
    END_FUNCTION;
  LOCAL
    types1 : SET OF STRING;
    types2 : SET OF STRING;
    list1 : LIST OF maths_value;
    list2 : LIST OF maths_value;
    cum : LOGICAL := TRUE;
  END_LOCAL;
    IF NOT EXISTS(val1) OR NOT EXISTS(val2) THEN
      RETURN (FALSE);
    END_IF;
    IF val1 = val2 THEN
      RETURN (TRUE);
    END_IF;
    types1 := stripped_typeof(val1);
    types2 := stripped_typeof(val2);
    IF ('MATHS_ATOM' IN types1) OR ('COMPLEX_NUMBER_LITERAL' IN types1) 
      THEN
      IF 'MATHS_ATOM' IN types2 THEN
        RETURN (FALSE);
      END_IF;
      IF 'COMPLEX_NUMBER_LITERAL' IN types2 THEN
        RETURN (FALSE);
      END_IF;
      IF 'LIST' IN types2 THEN
        RETURN (FALSE);
      END_IF;
      IF 'MATHS_SPACE' IN types2 THEN
        RETURN (FALSE);
      END_IF;
      IF 'MATHS_FUNCTION' IN types2 THEN
        RETURN (FALSE);
      END_IF;
      IF 'GENERIC_EXPRESSION' IN types2 THEN
        RETURN (mem_of_vs(val1, val2));
      END_IF;
      RETURN (UNKNOWN);
    END_IF;
    IF ('MATHS_ATOM' IN types2) OR ('COMPLEX_NUMBER_LITERAL' IN types2) 
      THEN
      RETURN (equal_maths_values(val2, val1));
    END_IF;
    IF 'LIST' IN types1 THEN
      IF 'LIST' IN types2 THEN
        list1 := val1;
        list2 := val2;
        IF SIZEOF(list1) <> SIZEOF(list2) THEN
          RETURN (FALSE);
        END_IF;
        REPEAT i := 1 TO SIZEOF(list1);
          cum := cum AND equal_maths_values(list1[i], list2[i]);
          IF cum = FALSE THEN
            RETURN (FALSE);
          END_IF;
        END_REPEAT;
        RETURN (cum);
      END_IF;
      IF 'MATHS_SPACE' IN types2 THEN
        RETURN (FALSE);
      END_IF;
      IF 'MATHS_FUNCTION' IN types2 THEN
        RETURN (FALSE);
      END_IF;
      IF 'GENERIC_EXPRESSION' IN types2 THEN
        RETURN (mem_of_vs(val1, val2));
      END_IF;
      RETURN (UNKNOWN);
    END_IF;
    IF 'LIST' IN types2 THEN
      RETURN (equal_maths_values(val2, val1));
    END_IF;
    IF 'MATHS_SPACE' IN types1 THEN
      IF 'MATHS_SPACE' IN types2 THEN
        RETURN (equal_maths_spaces(val1, val2));
      END_IF;
      IF 'MATHS_FUNCTION' IN types2 THEN
        RETURN (FALSE);
      END_IF;
      IF 'GENERIC_EXPRESSION' IN types2 THEN
        RETURN (mem_of_vs(val1, val2));
      END_IF;
      RETURN (UNKNOWN);
    END_IF;
    IF 'MATHS_SPACE' IN types2 THEN
      RETURN (equal_maths_values(val2, val1));
    END_IF;
    IF 'MATHS_FUNCTION' IN types1 THEN
      IF 'MATHS_FUNCTION' IN types2 THEN
        RETURN (equal_maths_functions(val1, val2));
      END_IF;
      IF 'GENERIC_EXPRESSION' IN types2 THEN
        RETURN (mem_of_vs(val1, val2));
      END_IF;
      RETURN (UNKNOWN);
    END_IF;
    IF 'MATHS_FUNCTION' IN types2 THEN
      RETURN (equal_maths_values(val2, val1));
    END_IF;
    IF ('GENERIC_EXPRESSION' IN types1) AND ('GENERIC_EXPRESSION' IN types2
      ) THEN
      IF NOT has_values_space(val1) OR NOT has_values_space(val2) THEN
        RETURN (UNKNOWN);
      END_IF;
      IF NOT compatible_spaces(values_space_of(val1), values_space_of(val2)
        ) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    RETURN (UNKNOWN);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION es_subspace_of_es (
    es1 : elementary_space_enumerators;
    es2 : elementary_space_enumerators 
    ) : BOOLEAN;
    IF NOT EXISTS(es1) OR NOT EXISTS(es2) THEN
      RETURN (FALSE);
    END_IF;
    IF es1 = es2 THEN
      RETURN (TRUE);
    END_IF;
    IF es2 = es_generics THEN
      RETURN (TRUE);
    END_IF;
    IF (es1 = es_booleans) AND (es2 = es_logicals) THEN
      RETURN (TRUE);
    END_IF;
    IF (es2 = es_numbers) AND (((es1 = es_complex_numbers) OR (es1 = 
      es_reals)) OR (es1 = es_integers)) THEN
      RETURN (TRUE);
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION expression_is_constant (
    expr : generic_expression 
    ) : BOOLEAN;
    RETURN (bool(SIZEOF(free_variables_of(expr)) = 0));
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION external_version_assignment_is_valid (
    aia : applied_external_identification_assignment 
    ) : BOOLEAN;
  LOCAL
    item : external_identification_item;
    role : identification_role;
  END_LOCAL;
    role := aia.role;
    IF role.name = 'version' THEN
      REPEAT i := LOINDEX(aia\applied_external_identification_assignment.
        items) TO HIINDEX(aia\applied_external_identification_assignment.
        items);
        item := aia\applied_external_identification_assignment.items[i];
        IF SIZEOF([ 
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXTERNALLY_DEFINED_GENERAL_PROPERTY'
           ] * TYPEOF(item)) = 0 THEN
          RETURN (FALSE);
        END_IF;
      END_REPEAT;
      RETURN (TRUE);
    ELSE
      RETURN (TRUE);
    END_IF;
END_FUNCTION; -- 10303-1129: external_properties_mim

FUNCTION extract_factors (
    tspace : tuple_space;
    m      : INTEGER;
    n      : INTEGER 
    ) : tuple_space;
  LOCAL
    tsp : tuple_space := the_zero_tuple_space;
  END_LOCAL;
    REPEAT i := m TO n;
      tsp := assoc_product_space(tsp, factor_space(tspace, i));
    END_REPEAT;
    RETURN (tsp);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION extremal_position_check (
    fun : linearized_table_function 
    ) : BOOLEAN;
  LOCAL
    source_domain : maths_space;
    source_interval : finite_integer_interval;
    index : INTEGER := 1;
    base : INTEGER;
    shape : LIST OF positive_integer;
    ndim : positive_integer;
    slo : INTEGER;
    shi : INTEGER;
    sublo : LIST OF INTEGER := [];
    subhi : LIST OF INTEGER := [];
  END_LOCAL;
    IF NOT EXISTS(fun) THEN
      RETURN (FALSE);
    END_IF;
    source_domain := factor1(fun.source.domain);
    IF schema_prefix + 'TUPLE_SPACE' IN TYPEOF(source_domain) THEN
      source_domain := factor1(source_domain);
    END_IF;
    IF NOT (schema_prefix + 'FINITE_INTEGER_INTERVAL' IN TYPEOF(
      source_domain)) THEN
      RETURN (FALSE);
    END_IF;
    source_interval := source_domain;
    base := fun\explicit_table_function.index_base;
    shape := fun\explicit_table_function.shape;
    IF schema_prefix + 'STANDARD_TABLE_FUNCTION' IN TYPEOF(fun) THEN
      REPEAT j := 1 TO SIZEOF(shape);
        index := index * shape[j];
      END_REPEAT;
      index := fun.first + index - 1;
      RETURN (bool((source_interval.min <= index) AND (index <= 
        source_interval.max)));
    END_IF;
    IF schema_prefix + 'REGULAR_TABLE_FUNCTION' IN TYPEOF(fun) THEN
      ndim := SIZEOF(fun\explicit_table_function.shape);
      REPEAT j := 1 TO ndim;
        slo := base;
        shi := base + shape[j] - 1;
        IF fun\regular_table_function.increments[j] >= 0 THEN
          INSERT( sublo, slo, j - 1 );
          INSERT( subhi, shi, j - 1 );
        ELSE
          INSERT( sublo, shi, j - 1 );
          INSERT( subhi, slo, j - 1 );
        END_IF;
      END_REPEAT;
      index := regular_indexing(sublo, base, shape, fun\
        regular_table_function.increments, fun.first);
      IF NOT ((source_interval.min <= index) AND (index <= source_interval.
        max)) THEN
        RETURN (FALSE);
      END_IF;
      index := regular_indexing(subhi, base, shape, fun\
        regular_table_function.increments, fun.first);
      IF NOT ((source_interval.min <= index) AND (index <= source_interval.
        max)) THEN
        RETURN (FALSE);
      END_IF;
      RETURN (TRUE);
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION face_bound_reversed (
    a_face_bound : face_bound 
    ) : face_bound;
  LOCAL
    the_reverse : face_bound;
  END_LOCAL;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_OUTER_BOUND' IN 
      TYPEOF(a_face_bound) THEN
      the_reverse := dummy_tri || face_bound(a_face_bound\face_bound.bound,
         NOT a_face_bound\face_bound.orientation) || face_outer_bound();
    ELSE
      the_reverse := dummy_tri || face_bound(a_face_bound.bound, NOT 
        a_face_bound.orientation);
    END_IF;
    RETURN (the_reverse);
END_FUNCTION; -- 10303-42: topology_schema

FUNCTION face_reversed (
    a_face : face 
    ) : oriented_face;
  LOCAL
    the_reverse : oriented_face;
  END_LOCAL;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORIENTED_FACE' IN 
      TYPEOF(a_face) THEN
      the_reverse := dummy_tri || face(set_of_topology_reversed(a_face.
        bounds)) || oriented_face(a_face\oriented_face.face_element, NOT 
        a_face\oriented_face.orientation);
    ELSE
      the_reverse := dummy_tri || face(set_of_topology_reversed(a_face.
        bounds)) || oriented_face(a_face, FALSE);
    END_IF;
    RETURN (the_reverse);
END_FUNCTION; -- 10303-42: topology_schema

FUNCTION factor1 (
    tspace : tuple_space 
    ) : maths_space;
  LOCAL
    typenames : SET OF STRING := TYPEOF(tspace);
  END_LOCAL;
    IF schema_prefix + 'UNIFORM_PRODUCT_SPACE' IN typenames THEN
      RETURN (tspace\uniform_product_space.base);
    END_IF;
    IF schema_prefix + 'LISTED_PRODUCT_SPACE' IN typenames THEN
      RETURN (tspace\listed_product_space.factors[1]);
    END_IF;
    IF schema_prefix + 'EXTENDED_TUPLE_SPACE' IN typenames THEN
      RETURN (factor1(tspace\extended_tuple_space.base));
    END_IF;
    RETURN (?);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION factor_space (
    tspace : tuple_space;
    idx    : positive_integer 
    ) : maths_space;
  LOCAL
    typenames : SET OF STRING := TYPEOF(tspace);
  END_LOCAL;
    IF schema_prefix + 'UNIFORM_PRODUCT_SPACE' IN typenames THEN
      IF idx <= tspace\uniform_product_space.exponent THEN
        RETURN (tspace\uniform_product_space.base);
      END_IF;
      RETURN (?);
    END_IF;
    IF schema_prefix + 'LISTED_PRODUCT_SPACE' IN typenames THEN
      IF idx <= SIZEOF(tspace\listed_product_space.factors) THEN
        RETURN (tspace\listed_product_space.factors[idx]);
      END_IF;
      RETURN (?);
    END_IF;
    IF schema_prefix + 'EXTENDED_TUPLE_SPACE' IN typenames THEN
      IF idx <= space_dimension(tspace\extended_tuple_space.base) THEN
        RETURN (factor_space(tspace\extended_tuple_space.base, idx));
      END_IF;
      RETURN (tspace\extended_tuple_space.extender);
    END_IF;
    RETURN (?);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION first_proj_axis (
    z_axis : direction;
    arg    : direction 
    ) : direction;
  LOCAL
    x_axis : direction;
    v : direction;
    z : direction;
    x_vec : vector;
  END_LOCAL;
    IF NOT EXISTS(z_axis) THEN
      RETURN (?);
    ELSE
      z := normalise(z_axis);
      IF NOT EXISTS(arg) THEN
        IF (z.direction_ratios <> [ 1.0, 0.0, 0.0 ]) AND (z.
          direction_ratios <> [ -1.0, 0.0, 0.0 ]) THEN
          v := dummy_gri || direction([ 1.0, 0.0, 0.0 ]);
        ELSE
          v := dummy_gri || direction([ 0.0, 1.0, 0.0 ]);
        END_IF;
      ELSE
        IF arg.dim <> 3 THEN
          RETURN (?);
        END_IF;
        IF cross_product(arg, z).magnitude = 0.0 THEN
          RETURN (?);
        ELSE
          v := normalise(arg);
        END_IF;
      END_IF;
      x_vec := scalar_times_vector(dot_product(v, z), z);
      x_axis := vector_difference(v, x_vec).orientation;
      x_axis := normalise(x_axis);
    END_IF;
    RETURN (x_axis);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION free_variables_of (
    expr : generic_expression 
    ) : SET OF generic_variable;
  LOCAL
    typenames : SET OF STRING := stripped_typeof(expr);
    result : SET OF generic_variable := [];
    exprs : LIST OF generic_expression := [];
  END_LOCAL;
    IF 'GENERIC_LITERAL' IN typenames THEN
      RETURN (result);
    END_IF;
    IF 'GENERIC_VARIABLE' IN typenames THEN
      result := result + expr;
      RETURN (result);
    END_IF;
    IF 'QUANTIFIER_EXPRESSION' IN typenames THEN
      exprs := QUERY (ge <* expr\multiple_arity_generic_expression.operands
        | NOT (ge IN expr\quantifier_expression.variables));
      REPEAT i := 1 TO SIZEOF(exprs);
        result := result + free_variables_of(exprs[i]);
      END_REPEAT;
      REPEAT i := 1 TO SIZEOF(expr\quantifier_expression.variables);
        result := result - expr\quantifier_expression.variables[i];
      END_REPEAT;
      RETURN (result);
    END_IF;
    IF 'UNARY_GENERIC_EXPRESSION' IN typenames THEN
      RETURN (free_variables_of(expr\unary_generic_expression.operand));
    END_IF;
    IF 'BINARY_GENERIC_EXPRESSION' IN typenames THEN
      result := free_variables_of(expr\binary_generic_expression.operands[1
        ]);
      RETURN (result + free_variables_of(expr\binary_generic_expression.
        operands[2]));
    END_IF;
    IF 'MULTIPLE_ARITY_GENERIC_EXPRESSION' IN typenames THEN
      REPEAT i := 1 TO SIZEOF(expr\multiple_arity_generic_expression.
        operands);
        result := result + free_variables_of(expr\
          multiple_arity_generic_expression.operands[i]);
      END_REPEAT;
      RETURN (result);
    END_IF;
    RETURN (result);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION function_applicability (
    func      : maths_function_select;
    arguments : LIST [1:?] OF maths_value 
    ) : BOOLEAN;
  LOCAL
    domain : tuple_space := convert_to_maths_function(func).domain;
    domain_types : SET OF STRING := TYPEOF(domain);
    narg : positive_integer := SIZEOF(arguments);
    arg : generic_expression;
  END_LOCAL;
    IF schema_prefix + 'PRODUCT_SPACE' IN domain_types THEN
      IF space_dimension(domain) <> narg THEN
        RETURN (FALSE);
      END_IF;
    ELSE
      IF schema_prefix + 'EXTENDED_TUPLE_SPACE' IN domain_types THEN
        IF space_dimension(domain) > narg THEN
          RETURN (FALSE);
        END_IF;
      ELSE
        RETURN (FALSE);
      END_IF;
    END_IF;
    REPEAT i := 1 TO narg;
      arg := convert_to_operand(arguments[i]);
      IF NOT has_values_space(arg) THEN
        RETURN (FALSE);
      END_IF;
      IF NOT compatible_spaces(factor_space(domain, i), values_space_of(arg
        )) THEN
        RETURN (FALSE);
      END_IF;
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION function_is_1d_array (
    func : maths_function 
    ) : BOOLEAN;
  LOCAL
    temp : maths_space;
  END_LOCAL;
    IF NOT EXISTS(func) THEN
      RETURN (FALSE);
    END_IF;
    IF space_dimension(func.domain) <> 1 THEN
      RETURN (FALSE);
    END_IF;
    temp := factor1(func.domain);
    IF schema_prefix + 'PRODUCT_SPACE' IN TYPEOF(temp) THEN
      IF space_dimension(temp) <> 1 THEN
        RETURN (FALSE);
      END_IF;
      temp := factor1(temp);
    END_IF;
    IF schema_prefix + 'FINITE_INTEGER_INTERVAL' IN TYPEOF(temp) THEN
      RETURN (TRUE);
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION function_is_1d_table (
    func : maths_function 
    ) : BOOLEAN;
  LOCAL
    temp : maths_space;
    itvl : finite_integer_interval;
  END_LOCAL;
    IF NOT EXISTS(func) THEN
      RETURN (FALSE);
    END_IF;
    IF space_dimension(func.domain) <> 1 THEN
      RETURN (FALSE);
    END_IF;
    temp := factor1(func.domain);
    IF schema_prefix + 'PRODUCT_SPACE' IN TYPEOF(temp) THEN
      IF space_dimension(temp) <> 1 THEN
        RETURN (FALSE);
      END_IF;
      temp := factor1(temp);
    END_IF;
    IF schema_prefix + 'FINITE_INTEGER_INTERVAL' IN TYPEOF(temp) THEN
      itvl := temp;
      RETURN (bool((itvl.min = 0) OR (itvl.min = 1)));
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION function_is_2d_table (
    func : maths_function 
    ) : BOOLEAN;
  LOCAL
    temp : maths_space;
    pspace : product_space;
    itvl1 : finite_integer_interval;
    itvl2 : finite_integer_interval;
  END_LOCAL;
    IF NOT EXISTS(func) THEN
      RETURN (FALSE);
    END_IF;
    IF space_dimension(func.domain) <> 1 THEN
      RETURN (FALSE);
    END_IF;
    temp := factor1(func.domain);
    IF NOT ('PRODUCT_SPACE' IN stripped_typeof(temp)) THEN
      RETURN (FALSE);
    END_IF;
    pspace := temp;
    IF space_dimension(pspace) <> 2 THEN
      RETURN (FALSE);
    END_IF;
    temp := factor1(pspace);
    IF NOT ('FINITE_INTEGER_INTERVAL' IN stripped_typeof(temp)) THEN
      RETURN (FALSE);
    END_IF;
    itvl1 := temp;
    temp := factor_space(pspace, 2);
    IF NOT ('FINITE_INTEGER_INTERVAL' IN stripped_typeof(temp)) THEN
      RETURN (FALSE);
    END_IF;
    itvl2 := temp;
    RETURN (bool((itvl1.min = itvl2.min) AND ((itvl1.min = 0) OR (itvl1.min
       = 1))));
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION function_is_array (
    func : maths_function 
    ) : BOOLEAN;
  LOCAL
    tspace : tuple_space;
    temp : maths_space;
  END_LOCAL;
    IF NOT EXISTS(func) THEN
      RETURN (FALSE);
    END_IF;
    tspace := func.domain;
    IF (space_dimension(tspace) = 1) AND (schema_prefix + 'TUPLE_SPACE' IN 
      TYPEOF(factor1(tspace))) THEN
      tspace := factor1(tspace);
    END_IF;
    IF NOT (schema_prefix + 'PRODUCT_SPACE' IN TYPEOF(tspace)) THEN
      RETURN (FALSE);
    END_IF;
    REPEAT i := 1 TO space_dimension(tspace);
      temp := factor_space(tspace, i);
      IF NOT (schema_prefix + 'FINITE_INTEGER_INTERVAL' IN TYPEOF(temp)) 
        THEN
        RETURN (FALSE);
      END_IF;
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION function_is_table (
    func : maths_function 
    ) : BOOLEAN;
  LOCAL
    tspace : tuple_space;
    temp : maths_space;
    base : INTEGER;
  END_LOCAL;
    IF NOT EXISTS(func) THEN
      RETURN (FALSE);
    END_IF;
    tspace := func.domain;
    IF (space_dimension(tspace) = 1) AND (schema_prefix + 'TUPLE_SPACE' IN 
      TYPEOF(factor1(tspace))) THEN
      tspace := factor1(tspace);
    END_IF;
    IF NOT (schema_prefix + 'PRODUCT_SPACE' IN TYPEOF(tspace)) THEN
      RETURN (FALSE);
    END_IF;
    temp := factor1(tspace);
    IF NOT (schema_prefix + 'FINITE_INTEGER_INTERVAL' IN TYPEOF(temp)) THEN
      RETURN (FALSE);
    END_IF;
    base := temp\finite_integer_interval.min;
    IF (base <> 0) AND (base <> 1) THEN
      RETURN (FALSE);
    END_IF;
    REPEAT i := 2 TO space_dimension(tspace);
      temp := factor_space(tspace, i);
      IF NOT (schema_prefix + 'FINITE_INTEGER_INTERVAL' IN TYPEOF(temp)) 
        THEN
        RETURN (FALSE);
      END_IF;
      IF temp\finite_integer_interval.min <> base THEN
        RETURN (FALSE);
      END_IF;
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION gbsf_check_curve (
    cv : representation_item 
    ) : BOOLEAN;
    IF SIZEOF([ 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOUNDED_CURVE'
      , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONIC', 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_REPLICA', 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINE', 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OFFSET_CURVE_3D' ] * 
      TYPEOF(cv)) > 1 THEN
      RETURN (FALSE);
    END_IF;
    IF SIZEOF([ 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCLE', 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ELLIPSE', 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TRIMMED_CURVE' ] * 
      TYPEOF(cv)) = 1 THEN
      RETURN (TRUE);
    ELSE
      IF ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_CURVE' IN 
        TYPEOF(cv)) AND (cv\b_spline_curve.self_intersect = FALSE) OR (cv\
        b_spline_curve.self_intersect = UNKNOWN) THEN
        RETURN (TRUE);
      ELSE
        IF ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_CURVE' 
          IN TYPEOF(cv)) AND (cv\composite_curve.self_intersect = FALSE) OR
           (cv\composite_curve.self_intersect = UNKNOWN) THEN
          RETURN (SIZEOF(QUERY (seg <* cv\composite_curve.segments| NOT 
            gbsf_check_curve(seg.parent_curve))) = 0);
        ELSE
          IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_REPLICA' IN
             TYPEOF(cv) THEN
            RETURN (gbsf_check_curve(cv\curve_replica.parent_curve));
          ELSE
            IF ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OFFSET_CURVE_3D'
               IN TYPEOF(cv)) AND ((cv\offset_curve_3d.self_intersect = 
              FALSE) OR (cv\offset_curve_3d.self_intersect = UNKNOWN))) AND
               NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE' 
              IN TYPEOF(cv\offset_curve_3d.basis_curve)) THEN
              RETURN (gbsf_check_curve(cv\offset_curve_3d.basis_curve));
            ELSE
              IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PCURVE' IN 
                TYPEOF(cv) THEN
                RETURN (gbsf_check_curve(cv\pcurve.reference_to_curve\
                  representation.items[1]) AND gbsf_check_surface(cv\pcurve
                  .basis_surface));
              ELSE
                IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE' 
                  IN TYPEOF(cv) THEN
                  IF SIZEOF(cv\polyline.points) >= 3 THEN
                    RETURN (TRUE);
                  END_IF;
                ELSE
                  IF 
                    'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_CURVE'
                     IN TYPEOF(cv) THEN
                    IF gbsf_check_curve(cv\surface_curve.curve_3d) THEN
                      REPEAT i := 1 TO SIZEOF(cv\surface_curve.
                        associated_geometry);
                        IF 
                          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE'
                           IN TYPEOF(cv\surface_curve.associated_geometry[i
                          ]) THEN
                          IF NOT gbsf_check_surface(cv\surface_curve.
                            associated_geometry[i]) THEN
                            RETURN (FALSE);
                          END_IF;
                        ELSE
                          IF 
                            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PCURVE'
                             IN TYPEOF(cv\surface_curve.associated_geometry
                            [i]) THEN
                            IF NOT gbsf_check_curve(cv\surface_curve.
                              associated_geometry[i]) THEN
                              RETURN (FALSE);
                            END_IF;
                          END_IF;
                        END_IF;
                      END_REPEAT;
                      RETURN (TRUE);
                    END_IF;
                  END_IF;
                END_IF;
              END_IF;
            END_IF;
          END_IF;
        END_IF;
      END_IF;
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-507: aic_geometrically_bounded_surface

FUNCTION gbsf_check_point (
    pnt : point 
    ) : BOOLEAN;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CARTESIAN_POINT' IN 
      TYPEOF(pnt) THEN
      RETURN (TRUE);
    ELSE
      IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_ON_CURVE' IN 
        TYPEOF(pnt) THEN
        RETURN (gbsf_check_curve(pnt\point_on_curve.basis_curve));
      ELSE
        IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_ON_SURFACE' 
          IN TYPEOF(pnt) THEN
          RETURN (gbsf_check_surface(pnt\point_on_surface.basis_surface));
        ELSE
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DEGENERATE_PCURVE'
             IN TYPEOF(pnt) THEN
            RETURN (gbsf_check_curve(pnt\degenerate_pcurve.
              reference_to_curve\representation.items[1]) AND 
              gbsf_check_surface(pnt\degenerate_pcurve.basis_surface));
          END_IF;
        END_IF;
      END_IF;
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-507: aic_geometrically_bounded_surface

FUNCTION gbsf_check_surface (
    sf : surface 
    ) : BOOLEAN;
    IF ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_SURFACE' IN 
      TYPEOF(sf)) AND (sf\b_spline_surface.self_intersect = FALSE) OR (sf\
      b_spline_surface.self_intersect = UNKNOWN) THEN
      RETURN (TRUE);
    ELSE
      IF SIZEOF([ 
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SPHERICAL_SURFACE', 
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TOROIDAL_SURFACE', 
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_BOUNDED_SURFACE'
        , 
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_TRIMMED_SURFACE'
         ] * TYPEOF(sf)) = 1 THEN
        RETURN (TRUE);
      ELSE
        IF ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OFFSET_SURFACE' IN
           TYPEOF(sf)) AND (sf\offset_surface.self_intersect = FALSE) OR (
          sf\offset_surface.self_intersect = UNKNOWN) THEN
          RETURN (gbsf_check_surface(sf\offset_surface.basis_surface));
        ELSE
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RECTANGULAR_COMPOSITE_SURFACE'
             IN TYPEOF(sf) THEN
            REPEAT i := 1 TO SIZEOF(sf\rectangular_composite_surface.
              segments);
              REPEAT j := 1 TO SIZEOF(sf\rectangular_composite_surface.
                segments[i]);
                IF NOT gbsf_check_surface(sf\rectangular_composite_surface.
                  segments[i][j].parent_surface) THEN
                  RETURN (FALSE);
                END_IF;
              END_REPEAT;
            END_REPEAT;
            RETURN (TRUE);
          ELSE
            IF 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_REPLICA'
               IN TYPEOF(sf) THEN
              RETURN (gbsf_check_surface(sf\surface_replica.parent_surface)
                );
            ELSE
              IF 
                'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_OF_REVOLUTION'
                 IN TYPEOF(sf) THEN
                RETURN (gbsf_check_curve(sf\swept_surface.swept_curve));
              END_IF;
            END_IF;
          END_IF;
        END_IF;
      END_IF;
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-507: aic_geometrically_bounded_surface

FUNCTION geometric_dimensionalities_in_contexts (
    grcs : SET [1:?] OF geometric_representation_context 
    ) : INTEGER;
  LOCAL
    grcs_1d : INTEGER := 0;
    grcs_2d : INTEGER := 0;
    grcs_3d : INTEGER := 0;
  END_LOCAL;
    IF SIZEOF(grcs) = 1 THEN
      RETURN (grcs[1]\geometric_representation_context.
        coordinate_space_dimension);
    ELSE
      REPEAT i := 1 TO HIINDEX(grcs);
        IF grcs[i]\geometric_representation_context.
          coordinate_space_dimension = 1 THEN
          grcs_1d := grcs_1d + 1;
        ELSE
          IF grcs[i]\geometric_representation_context.
            coordinate_space_dimension = 2 THEN
            grcs_2d := grcs_2d + 1;
          ELSE
            IF grcs[i]\geometric_representation_context.
              coordinate_space_dimension = 3 THEN
              grcs_3d := grcs_3d + 1;
            END_IF;
          END_IF;
        END_IF;
      END_REPEAT;
    END_IF;
    IF grcs_1d + grcs_2d = 0 THEN
      RETURN (3);
    ELSE
      IF grcs_1d + grcs_3d = 0 THEN
        RETURN (2);
      ELSE
        IF grcs_2d + grcs_3d = 0 THEN
          RETURN (1);
        ELSE
          RETURN (0);
        END_IF;
      END_IF;
    END_IF;
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION get_action_property (
    cad       : characterized_action_definition;
    prop_name : STRING 
    ) : SET OF action_property;
    RETURN (bag_to_set(QUERY (ap <* USEDIN(cad, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_PROPERTY.DEFINITION'
      )| ap.name = prop_name)));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION get_aggregate_id_value (
    obj : id_attribute_select 
    ) : identifier;
  LOCAL
    aggregate_id_bag : BAG OF aggregate_id_attribute := USEDIN(obj, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AGGREGATE_ID_ATTRIBUTE.IDENTIFIED_ITEM'
      );
  END_LOCAL;
    IF SIZEOF(aggregate_id_bag) = 1 THEN
      RETURN (aggregate_id_bag[1].attribute_value);
    ELSE
      RETURN (?);
    END_IF;
END_FUNCTION; -- 10303-41: basic_attribute_schema

FUNCTION get_basis_surface (
    c : curve_on_surface 
    ) : SET [0:2] OF surface;
  LOCAL
    surfs : SET [0:2] OF surface;
    n : INTEGER;
  END_LOCAL;
    surfs := [];
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PCURVE' IN TYPEOF(c) 
      THEN
      surfs := [ c\pcurve.basis_surface ];
    ELSE
      IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_CURVE' IN 
        TYPEOF(c) THEN
        n := SIZEOF(c\surface_curve.associated_geometry);
        REPEAT i := 1 TO n;
          surfs := surfs + associated_surface(c\surface_curve.
            associated_geometry[i]);
        END_REPEAT;
      END_IF;
    END_IF;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_CURVE_ON_SURFACE'
       IN TYPEOF(c) THEN
      n := SIZEOF(c\composite_curve.segments);
      surfs := get_basis_surface(c\composite_curve.segments[1].parent_curve
        );
      IF n > 1 THEN
        REPEAT i := 2 TO n;
          surfs := surfs * get_basis_surface(c\composite_curve.segments[i].
            parent_curve);
        END_REPEAT;
      END_IF;
    END_IF;
    RETURN (surfs);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION get_coordinate_values (
    source : tessellated_surface_item 
    ) : coordinates_list;
  LOCAL
    coordinate_values : coordinates_list;
    max : INTEGER;
  END_LOCAL;
    CASE TRUE OF
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_FACE' IN 
        TYPEOF(source) :
          BEGIN
            coordinate_values := source\tessellated_face.coordinates;
            RETURN (coordinate_values);
          END;
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_SURFACE_SET'
         IN TYPEOF(source) :
          BEGIN
            coordinate_values := source\tessellated_surface_set.coordinates
              ;
            RETURN (coordinate_values);
          END;
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_SOLID' IN 
        TYPEOF(source) :
          BEGIN
            IF 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_FACE'
               IN TYPEOF(source\tessellated_solid.items[1]) THEN
              coordinate_values := source\tessellated_solid.items[1]\
                tessellated_face.coordinates;
            END_IF;
            IF 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_EDGE'
               IN TYPEOF(source\tessellated_solid.items[1]) THEN
              coordinate_values := source\tessellated_solid.items[1]\
                tessellated_edge.coordinates;
            END_IF;
            IF 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_VERTEX'
               IN TYPEOF(source\tessellated_solid.items[1]) THEN
              coordinate_values := source\tessellated_solid.items[1]\
                tessellated_vertex.coordinates;
            END_IF;
            max := SIZEOF(source\tessellated_solid.items);
            IF max = 1 THEN
              RETURN (coordinate_values);
            ELSE
              REPEAT i := 2 TO max;
                IF 
                  'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_FACE'
                   IN TYPEOF(source\tessellated_solid.items[i]) THEN
                  IF NOT (coordinate_values :=: source\tessellated_solid.
                    items[i]\tessellated_face.coordinates) THEN
                    RETURN (?);
                  END_IF;
                END_IF;
                IF 
                  'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_EDGE'
                   IN TYPEOF(source\tessellated_solid.items[i]) THEN
                  IF NOT (coordinate_values :=: source\tessellated_solid.
                    items[i]\tessellated_edge.coordinates) THEN
                    RETURN (?);
                  END_IF;
                END_IF;
                IF 
                  'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_VERTEX'
                   IN TYPEOF(source\tessellated_solid.items[i]) THEN
                  IF NOT (coordinate_values :=: source\tessellated_solid.
                    items[i]\tessellated_vertex.coordinates) THEN
                    RETURN (?);
                  END_IF;
                END_IF;
              END_REPEAT;
              RETURN (coordinate_values);
            END_IF;
          END;
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_SHELL' IN 
        TYPEOF(source) :
          BEGIN
            IF 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_FACE'
               IN TYPEOF(source\tessellated_shell.items[1]) THEN
              coordinate_values := source\tessellated_shell.items[1]\
                tessellated_face.coordinates;
            END_IF;
            IF 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_EDGE'
               IN TYPEOF(source\tessellated_shell.items[1]) THEN
              coordinate_values := source\tessellated_shell.items[1]\
                tessellated_edge.coordinates;
            END_IF;
            IF 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_VERTEX'
               IN TYPEOF(source\tessellated_shell.items[1]) THEN
              coordinate_values := source\tessellated_shell.items[1]\
                tessellated_vertex.coordinates;
            END_IF;
            max := SIZEOF(source\tessellated_shell.items);
            IF max = 1 THEN
              RETURN (coordinate_values);
            ELSE
              REPEAT i := 2 TO max;
                IF 
                  'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_FACE'
                   IN TYPEOF(source\tessellated_shell.items[i]) THEN
                  IF NOT (coordinate_values :=: source\tessellated_shell.
                    items[i]\tessellated_face.coordinates) THEN
                    RETURN (?);
                  END_IF;
                END_IF;
                IF 
                  'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_EDGE'
                   IN TYPEOF(source\tessellated_shell.items[i]) THEN
                  IF NOT (coordinate_values :=: source\tessellated_shell.
                    items[i]\tessellated_edge.coordinates) THEN
                    RETURN (?);
                  END_IF;
                END_IF;
                IF 
                  'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TESSELLATED_VERTEX'
                   IN TYPEOF(source\tessellated_shell.items[i]) THEN
                  IF NOT (coordinate_values :=: source\tessellated_shell.
                    items[i]\tessellated_vertex.coordinates) THEN
                    RETURN (?);
                  END_IF;
                END_IF;
              END_REPEAT;
              RETURN (coordinate_values);
            END_IF;
          END;
    END_CASE;
END_FUNCTION; -- 10303-46: presentation_appearance_schema

FUNCTION get_count_of_relating_amr (
    am        : action_method;
    amr_types : SET OF STRING 
    ) : INTEGER;
    RETURN (SIZEOF(QUERY (amr <* get_relating_amr(am)| SIZEOF(amr_types * 
      TYPEOF(amr)) = SIZEOF(amr_types))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION get_count_of_relating_amr_with_name (
    am        : action_method;
    amr_name  : STRING;
    amr_types : SET OF STRING 
    ) : INTEGER;
    RETURN (SIZEOF(QUERY (amr <* get_relating_amr(am)| (amr.name = amr_name
      ) AND (SIZEOF(amr_types * TYPEOF(amr)) = SIZEOF(amr_types)))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION get_descendant_occurrences (
    input : product_definition_occurrence 
    ) : SET [0:?] OF product_definition_specified_occurrence;
  LOCAL
    result : SET OF product_definition_specified_occurrence := input.
      child_occurrences;
  END_LOCAL;
    REPEAT i := 1 TO HIINDEX(input.child_occurrences) BY 1;
      result := result + get_descendant_occurrences(input.child_occurrences
        [i]);
    END_REPEAT;
    RETURN (result);
END_FUNCTION; -- 10303-44: product_structure_schema

FUNCTION get_description_value (
    obj : description_attribute_select 
    ) : text;
  LOCAL
    description_bag : BAG OF description_attribute := USEDIN(obj, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM'
      );
  END_LOCAL;
    IF SIZEOF(description_bag) = 1 THEN
      RETURN (description_bag[1].attribute_value);
    ELSE
      RETURN (?);
    END_IF;
END_FUNCTION; -- 10303-41: basic_attribute_schema

FUNCTION get_directed_link (
    nodes           : LIST OF representation;
    undirected_link : LIST OF chained_representation_link 
    ) : LIST OF representation_relationship;
  LOCAL
    directed_link : LIST OF representation_relationship := [];
  END_LOCAL;
    IF (SIZEOF(nodes) <> SIZEOF(undirected_link) + 1) OR (VALUE_UNIQUE(
      nodes) = FALSE) THEN
      RETURN (?);
    END_IF;
    REPEAT i := 1 TO SIZEOF(undirected_link);
      CASE TRUE OF
        
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_CONTEXT'
           IN TYPEOF(undirected_link[i]) :
            BEGIN
              IF (nodes[i]\representation.context_of_items :=: 
                undirected_link[i]) AND (nodes[(i + 1)]\representation.
                context_of_items :=: undirected_link[i]) THEN
                INSERT( directed_link, representation_relationship('', '', 
                  nodes[(i + 1)], nodes[i]), i - 1 );
              ELSE
                RETURN (?);
              END_IF;
            END;
        
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_RELATIONSHIP'
           IN TYPEOF(undirected_link[i]) :
            BEGIN
              IF (nodes[i] :=: undirected_link[i]\
                representation_relationship.rep_1) AND (nodes[(i + 1)] :=: 
                undirected_link[i]\representation_relationship.rep_2) OR (
                nodes[i] :=: undirected_link[i]\representation_relationship
                .rep_2) AND (nodes[(i + 1)] :=: undirected_link[i]\
                representation_relationship.rep_1) THEN
                INSERT( directed_link, representation_relationship('', '', 
                  nodes[(i + 1)], nodes[i]), i - 1 );
              ELSE
                RETURN (?);
              END_IF;
            END;
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAPPED_ITEM' IN TYPEOF
          (undirected_link[i]) :
            BEGIN
              IF (nodes[i] IN using_representations(undirected_link[i])) 
                AND (nodes[(i + 1)] :=: undirected_link[i]\mapped_item.
                mapping_source\representation_map.mapped_representation) 
                THEN
                INSERT( directed_link, representation_relationship('', '', 
                  nodes[(i + 1)], nodes[i]), i - 1 );
              ELSE
                RETURN (?);
              END_IF;
            END;
      OTHERWISE :
          RETURN (?);
      END_CASE;
    END_REPEAT;
    IF VALUE_UNIQUE(directed_link) = FALSE THEN
      RETURN (?);
    END_IF;
    RETURN (directed_link);
END_FUNCTION; -- 10303-41: product_property_representation_schema

FUNCTION get_id_value (
    obj : id_attribute_select 
    ) : identifier;
  LOCAL
    id_bag : BAG OF id_attribute := USEDIN(obj, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ID_ATTRIBUTE.IDENTIFIED_ITEM'
      );
  END_LOCAL;
    IF SIZEOF(id_bag) = 1 THEN
      RETURN (id_bag[1].attribute_value);
    ELSE
      RETURN (?);
    END_IF;
END_FUNCTION; -- 10303-41: basic_attribute_schema

FUNCTION get_kinematic_joints_from_kinematic_loops (
    kls : SET OF kinematic_loop 
    ) : SET OF kinematic_joint;
  LOCAL
    result : SET OF oriented_joint := [];
  END_LOCAL;
    IF SIZEOF(kls) > 0 THEN
      REPEAT i := 1 TO HIINDEX(kls);
        result := result + kls[i].edge_list;
      END_REPEAT;
    END_IF;
    RETURN (get_kinematic_joints_from_oriented_joints(result));
END_FUNCTION; -- 10303-105: kinematic_topology_schema

FUNCTION get_kinematic_joints_from_oriented_joints (
    ors : SET OF oriented_joint 
    ) : SET OF kinematic_joint;
  LOCAL
    result : SET OF kinematic_joint := [];
  END_LOCAL;
    IF SIZEOF(ors) > 0 THEN
      REPEAT i := 1 TO HIINDEX(ors);
        result := result + ors[i].edge_element;
      END_REPEAT;
    END_IF;
    RETURN (result);
END_FUNCTION; -- 10303-105: kinematic_topology_schema

FUNCTION get_name_value (
    obj : name_attribute_select 
    ) : label;
  LOCAL
    name_bag : BAG OF name_attribute := USEDIN(obj, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NAME_ATTRIBUTE.NAMED_ITEM'
      );
  END_LOCAL;
    IF SIZEOF(name_bag) = 1 THEN
      RETURN (name_bag[1].attribute_value);
    ELSE
      RETURN (?);
    END_IF;
END_FUNCTION; -- 10303-41: basic_attribute_schema

FUNCTION get_product_definition_shape (
    current : constituent_shape_aspect 
    ) : product_definition_shape;
    REPEAT WHILE 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONSTITUENT_SHAPE_ASPECT'
       IN TYPEOF(current.parent);
      current := current.parent;
    END_REPEAT;
    RETURN (current.parent\shape_aspect.of_shape);
END_FUNCTION; -- 10303-41: product_property_definition_schema

FUNCTION get_property_definition_representations (
    c_def_instance : characterized_definition 
    ) : SET OF property_definition_representation;
  LOCAL
    pd_set : SET OF property_definition := [];
    pdr_set : SET OF property_definition_representation := [];
  END_LOCAL;
    pd_set := bag_to_set(USEDIN(c_def_instance, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
      ));
    IF SIZEOF(pd_set) < 1 THEN
      RETURN (pdr_set);
    END_IF;
    REPEAT i := 1 TO HIINDEX(pd_set);
      pdr_set := pdr_set + bag_to_set(USEDIN(pd_set[i], 
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
        ));
    END_REPEAT;
    RETURN (pdr_set);
END_FUNCTION; -- 10303-41: product_property_representation_schema

FUNCTION get_relating_amr (
    am : action_method 
    ) : SET OF action_method_relationship;
    RETURN (bag_to_set(USEDIN(am, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_METHOD_RELATIONSHIP.RELATING_METHOD'
      )));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION get_representations_for_items (
    input : SET OF founded_item_select 
    ) : SET OF representation;
  LOCAL
    r_set : SET OF representation := [];
  END_LOCAL;
    REPEAT i := LOINDEX(input) TO HIINDEX(input);
      r_set := r_set + using_representations(input[i]);
    END_REPEAT;
    RETURN (r_set);
END_FUNCTION; -- 10303-43: representation_schema

FUNCTION get_resource_property (
    crd       : characterized_resource_definition;
    prop_name : STRING 
    ) : SET OF resource_property;
    RETURN (bag_to_set(QUERY (rp <* USEDIN(crd, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RESOURCE_PROPERTY.RESOURCE'
      )| rp.name = prop_name)));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION get_role (
    obj : role_select 
    ) : object_role;
  LOCAL
    role_bag : BAG OF role_association := USEDIN(obj, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROLE_ASSOCIATION.ITEM_WITH_ROLE'
      );
  END_LOCAL;
    IF SIZEOF(role_bag) = 1 THEN
      RETURN (role_bag[1].role);
    ELSE
      RETURN (?);
    END_IF;
END_FUNCTION; -- 10303-41: basic_attribute_schema

FUNCTION get_shape_aspect_property_definition_representations (
    s_a_instance : shape_aspect 
    ) : SET OF property_definition_representation;
  LOCAL
    pd_set : SET OF property_definition := [];
    pdr_set : SET OF property_definition_representation := [];
  END_LOCAL;
    pd_set := bag_to_set(USEDIN(s_a_instance, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
      ));
    IF SIZEOF(pd_set) < 1 THEN
      RETURN (pdr_set);
    END_IF;
    REPEAT i := 1 TO HIINDEX(pd_set);
      pdr_set := pdr_set + QUERY (pdr <* USEDIN(pd_set[i], 
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
        )| (
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_DEFINITION_REPRESENTATION'
         IN TYPEOF(pdr)));
    END_REPEAT;
    RETURN (pdr_set);
END_FUNCTION; -- 10303-1051: geometric_tolerance_mim

FUNCTION get_shape_aspects (
    c_def_instance : characterized_definition 
    ) : SET OF shape_aspect;
  LOCAL
    pd_set : SET OF product_definition_shape := [];
    pdr_set : SET OF shape_aspect := [];
  END_LOCAL;
    pd_set := bag_to_set(QUERY (pd <* USEDIN(c_def_instance, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
      )| 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
       IN TYPEOF(pd)));
    IF SIZEOF(pd_set) < 1 THEN
      RETURN (pdr_set);
    END_IF;
    REPEAT i := 1 TO HIINDEX(pd_set);
      pdr_set := pdr_set + bag_to_set(USEDIN(pd_set[i], 
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
        ));
    END_REPEAT;
    RETURN (pdr_set);
END_FUNCTION; -- 10303-41: product_property_definition_schema

FUNCTION get_tool_body_item (
    mt        : machining_tool;
    prop_name : STRING 
    ) : SET OF representation_item;
  LOCAL
    props : SET OF resource_property;
    preps : SET OF resource_property_representation;
    items : SET OF representation_item;
  END_LOCAL;
    props := get_resource_property(mt, 'tool body');
    REPEAT i := 1 TO HIINDEX(props);
      preps := preps + USEDIN(props[i], 
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY'
        );
    END_REPEAT;
    REPEAT i := 1 TO HIINDEX(preps);
      IF 
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MACHINING_TOOL_BODY_REPRESENTATION'
         IN TYPEOF(preps[i].representation) THEN
        items := items + preps[i].representation.items;
      END_IF;
    END_REPEAT;
    RETURN (bag_to_set(QUERY (it <* items| it.name = prop_name)));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION get_tri_for_pd (
    def_instance : product_definition 
    ) : SET OF topological_representation_item;
  LOCAL
    pd1_set : SET OF property_definition := bag_to_set(USEDIN(def_instance,
       
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
      ));
    pd2_set : SET OF property_definition := [];
    pdr_set : SET OF property_definition_representation := [];
    pds_set : SET OF product_definition_shape := [];
    r_set : SET OF representation := [];
    sa_set : SET OF shape_aspect := [];
    tri_set : SET OF topological_representation_item := [];
  END_LOCAL;
    IF SIZEOF(pd1_set) < 1 THEN
      RETURN (?);
    END_IF;
    REPEAT i := LOINDEX(pd1_set) TO HIINDEX(pd1_set);
      pdr_set := pdr_set + bag_to_set(USEDIN(pd1_set[i], 
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
        ));
      IF 
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
         IN TYPEOF(pd1_set[i]) THEN
        pds_set := pds_set + pd1_set[i];
      END_IF;
    END_REPEAT;
    REPEAT i := LOINDEX(pds_set) TO HIINDEX(pds_set);
      sa_set := sa_set + bag_to_set(USEDIN(pds_set[i], 
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT.OF_SHAPE'
        ));
    END_REPEAT;
    REPEAT i := LOINDEX(sa_set) TO HIINDEX(sa_set);
      pd2_set := pd2_set + bag_to_set(USEDIN(sa_set[i], 
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
        ));
    END_REPEAT;
    IF SIZEOF(pd2_set) > 0 THEN
      BEGIN
        REPEAT i := LOINDEX(pd2_set) TO HIINDEX(pd2_set);
          pdr_set := pdr_set + bag_to_set(USEDIN(pd2_set[i], 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
            ));
        END_REPEAT;
      END;
    END_IF;
    IF SIZEOF(pdr_set) < 1 THEN
      RETURN (?);
    END_IF;
    REPEAT i := LOINDEX(pdr_set) TO HIINDEX(pdr_set);
      r_set := r_set + pdr_set[i]\property_definition_representation.
        used_representation;
    END_REPEAT;
    IF SIZEOF(r_set) < 1 THEN
      RETURN (?);
    END_IF;
    REPEAT i := LOINDEX(r_set) TO HIINDEX(r_set);
      REPEAT j := LOINDEX(r_set[i]\representation.items) TO HIINDEX(r_set[i
        ]\representation.items);
        IF 
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TOPOLOGICAL_REPRESENTATION_ITEM'
           IN TYPEOF(r_set[i]\representation.items[j]) THEN
          tri_set := tri_set + r_set[i]\representation.items[j];
        END_IF;
      END_REPEAT;
    END_REPEAT;
    RETURN (tri_set);
END_FUNCTION; -- 10303-113: mechanical_design_schema

FUNCTION get_tri_in_representations (
    members : SET OF representation 
    ) : SET OF topological_representation_item;
  LOCAL
    tri_set : SET OF topological_representation_item := [];
  END_LOCAL;
    IF SIZEOF(members) = 0 THEN
      RETURN (?);
    END_IF;
    REPEAT i := LOINDEX(members) TO HIINDEX(members);
      REPEAT j := LOINDEX(members[i]\representation.items) TO HIINDEX(
        members[i]\representation.items);
        IF 
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TOPOLOGICAL_REPRESENTATION_ITEM'
           IN TYPEOF(members[i]\representation.items[j]) THEN
          tri_set := tri_set + members[i]\representation.items[j];
        END_IF;
      END_REPEAT;
    END_REPEAT;
    RETURN (tri_set);
END_FUNCTION; -- 10303-42: topology_schema

FUNCTION has_values_space (
    expr : generic_expression 
    ) : BOOLEAN;
  LOCAL
    typenames : SET OF STRING := stripped_typeof(expr);
  END_LOCAL;
    IF 'EXPRESSION' IN typenames THEN
      RETURN (bool((('NUMERIC_EXPRESSION' IN typenames) OR (
        'STRING_EXPRESSION' IN typenames)) OR ('BOOLEAN_EXPRESSION' IN 
        typenames)));
    END_IF;
    IF 'MATHS_FUNCTION' IN typenames THEN
      RETURN (TRUE);
    END_IF;
    IF 'FUNCTION_APPLICATION' IN typenames THEN
      RETURN (TRUE);
    END_IF;
    IF 'MATHS_SPACE' IN typenames THEN
      RETURN (TRUE);
    END_IF;
    IF 'MATHS_VARIABLE' IN typenames THEN
      RETURN (TRUE);
    END_IF;
    IF 'DEPENDENT_VARIABLE_DEFINITION' IN typenames THEN
      RETURN (has_values_space(expr\unary_generic_expression.operand));
    END_IF;
    IF 'COMPLEX_NUMBER_LITERAL' IN typenames THEN
      RETURN (TRUE);
    END_IF;
    IF 'LOGICAL_LITERAL' IN typenames THEN
      RETURN (TRUE);
    END_IF;
    IF 'BINARY_LITERAL' IN typenames THEN
      RETURN (TRUE);
    END_IF;
    IF 'MATHS_ENUM_LITERAL' IN typenames THEN
      RETURN (TRUE);
    END_IF;
    IF 'REAL_TUPLE_LITERAL' IN typenames THEN
      RETURN (TRUE);
    END_IF;
    IF 'INTEGER_TUPLE_LITERAL' IN typenames THEN
      RETURN (TRUE);
    END_IF;
    IF 'ATOM_BASED_LITERAL' IN typenames THEN
      RETURN (TRUE);
    END_IF;
    IF 'MATHS_TUPLE_LITERAL' IN typenames THEN
      RETURN (TRUE);
    END_IF;
    IF 'PARTIAL_DERIVATIVE_EXPRESSION' IN typenames THEN
      RETURN (TRUE);
    END_IF;
    IF 'DEFINITE_INTEGRAL_EXPRESSION' IN typenames THEN
      RETURN (TRUE);
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION increasing_values_in_list (
    values : LIST [2:?] OF REAL 
    ) : BOOLEAN;
  LOCAL
    result : BOOLEAN := TRUE;
    limit : INTEGER := SIZEOF(values);
  END_LOCAL;
    REPEAT i := 2 TO limit;
      IF values[i] <= values[(i - 1)] THEN
        result := FALSE;
      END_IF;
    END_REPEAT;
    RETURN (result);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION is_acyclic (
    arg : generic_expression 
    ) : BOOLEAN;
    RETURN (acyclic(arg, []));
END_FUNCTION; -- 13584-20: iso13584_generic_expressions_schema

FUNCTION is_int_expr (
    arg : numeric_expression 
    ) : BOOLEAN;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.INT_LITERAL' IN TYPEOF(
      arg) THEN
      RETURN (TRUE);
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REAL_LITERAL' IN TYPEOF
      (arg) THEN
      RETURN (FALSE);
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.INT_NUMERIC_VARIABLE' 
      IN TYPEOF(arg) THEN
      RETURN (TRUE);
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REAL_NUMERIC_VARIABLE' 
      IN TYPEOF(arg) THEN
      RETURN (FALSE);
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ABS_FUNCTION' IN TYPEOF
      (arg) THEN
      RETURN (is_int_expr(arg\unary_numeric_expression.operand));
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MINUS_FUNCTION' IN 
      TYPEOF(arg) THEN
      RETURN (is_int_expr(arg\unary_numeric_expression.operand));
    END_IF;
    IF (((((((((('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SIN_FUNCTION'
       IN TYPEOF(arg)) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COS_FUNCTION' IN TYPEOF(
      arg))) OR ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TAN_FUNCTION'
       IN TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ASIN_FUNCTION' IN TYPEOF
      (arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACOS_FUNCTION' IN TYPEOF
      (arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ATAN_FUNCTION' IN TYPEOF
      (arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXP_FUNCTION' IN TYPEOF(
      arg))) OR ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LOG_FUNCTION'
       IN TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LOG2_FUNCTION' IN TYPEOF
      (arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LOG10_FUNCTION' IN 
      TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SQUARE_ROOT_FUNCTION' IN
       TYPEOF(arg)) THEN
      RETURN (FALSE);
    END_IF;
    IF ((('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLUS_EXPRESSION' IN 
      TYPEOF(arg)) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MULT_EXPRESSION' IN 
      TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAXIMUM_FUNCTION' IN 
      TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MINIMUM_FUNCTION' IN 
      TYPEOF(arg)) THEN
      REPEAT i := 1 TO SIZEOF(arg\multiple_arity_numeric_expression.
        operands);
        IF NOT is_int_expr(arg\multiple_arity_numeric_expression.operands[i
          ]) THEN
          RETURN (FALSE);
        END_IF;
      END_REPEAT;
      RETURN (TRUE);
    END_IF;
    IF ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MINUS_EXPRESSION' IN 
      TYPEOF(arg)) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POWER_EXPRESSION' IN 
      TYPEOF(arg)) THEN
      RETURN (is_int_expr(arg\binary_numeric_expression.operands[1]) AND 
        is_int_expr(arg\binary_numeric_expression.operands[2]));
    END_IF;
    IF ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIV_EXPRESSION' IN 
      TYPEOF(arg)) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MOD_EXPRESSION' IN 
      TYPEOF(arg)) THEN
      RETURN (TRUE);
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SLASH_EXPRESSION' IN 
      TYPEOF(arg) THEN
      RETURN (FALSE);
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_FUNCTION' IN 
      TYPEOF(arg) THEN
      RETURN (TRUE);
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VALUE_FUNCTION' IN 
      TYPEOF(arg) THEN
      IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.INT_VALUE_FUNCTION' 
        IN TYPEOF(arg) THEN
        RETURN (TRUE);
      ELSE
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.INTEGER_DEFINED_FUNCTION'
       IN TYPEOF(arg) THEN
      RETURN (TRUE);
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REAL_DEFINED_FUNCTION' 
      IN TYPEOF(arg) THEN
      RETURN (FALSE);
    END_IF;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOOLEAN_DEFINED_FUNCTION'
       IN TYPEOF(arg) THEN
      RETURN (FALSE);
    END_IF;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STRING_DEFINED_FUNCTION'
       IN TYPEOF(arg) THEN
      RETURN (FALSE);
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 13584-20: iso13584_expressions_schema

FUNCTION is_sql_mappable (
    arg : expression 
    ) : BOOLEAN;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SIMPLE_NUMERIC_EXPRESSION'
       IN TYPEOF(arg) THEN
      RETURN (TRUE);
    END_IF;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SQL_MAPPABLE_DEFINED_FUNCTION'
       IN TYPEOF(arg) THEN
      RETURN (TRUE);
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MINUS_FUNCTION' IN 
      TYPEOF(arg) THEN
      RETURN (is_sql_mappable(arg\unary_numeric_expression.operand));
    END_IF;
    IF (((((((((((((
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ABS_FUNCTION' IN TYPEOF(
      arg)) OR ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SIN_FUNCTION' 
      IN TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COS_FUNCTION' IN TYPEOF(
      arg))) OR ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TAN_FUNCTION'
       IN TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ASIN_FUNCTION' IN TYPEOF
      (arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACOS_FUNCTION' IN TYPEOF
      (arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ATAN_FUNCTION' IN TYPEOF
      (arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EXP_FUNCTION' IN TYPEOF(
      arg))) OR ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LOG_FUNCTION'
       IN TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LOG2_FUNCTION' IN TYPEOF
      (arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LOG10_FUNCTION' IN 
      TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SQUARE_ROOT_FUNCTION' IN
       TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VALUE_FUNCTION' IN 
      TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_FUNCTION' IN 
      TYPEOF(arg)) THEN
      RETURN (FALSE);
    END_IF;
    IF ((('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLUS_EXPRESSION' IN 
      TYPEOF(arg)) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MULT_EXPRESSION' IN 
      TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAXIMUM_FUNCTION' IN 
      TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MINIMUM_FUNCTION' IN 
      TYPEOF(arg)) THEN
      REPEAT i := 1 TO SIZEOF(arg\multiple_arity_numeric_expression.
        operands);
        IF NOT is_sql_mappable(arg\multiple_arity_numeric_expression.
          operands[i]) THEN
          RETURN (FALSE);
        END_IF;
      END_REPEAT;
      RETURN (TRUE);
    END_IF;
    IF ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MINUS_EXPRESSION' IN 
      TYPEOF(arg)) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SLASH_EXPRESSION' IN 
      TYPEOF(arg)) THEN
      RETURN (is_sql_mappable(arg\binary_numeric_expression.operands[1]) 
        AND is_sql_mappable(arg\binary_numeric_expression.operands[2]));
    END_IF;
    IF (('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIV_EXPRESSION' IN 
      TYPEOF(arg)) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MOD_EXPRESSION' IN 
      TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POWER_EXPRESSION' IN 
      TYPEOF(arg)) THEN
      RETURN (FALSE);
    END_IF;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SIMPLE_BOOLEAN_EXPRESSION'
       IN TYPEOF(arg) THEN
      RETURN (TRUE);
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NOT_EXPRESSION' IN 
      TYPEOF(arg) THEN
      RETURN (is_sql_mappable(arg\unary_generic_expression.operand));
    END_IF;
    IF ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ODD_FUNCTION' IN 
      TYPEOF(arg)) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.XOR_EXPRESSION' IN 
      TYPEOF(arg)) THEN
      RETURN (FALSE);
    END_IF;
    IF ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AND_EXPRESSION' IN 
      TYPEOF(arg)) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OR_EXPRESSION' IN TYPEOF
      (arg)) THEN
      REPEAT i := 1 TO SIZEOF(arg\multiple_arity_boolean_expression.
        operands);
        IF NOT is_sql_mappable(arg\multiple_arity_boolean_expression.
          operands[i]) THEN
          RETURN (FALSE);
        END_IF;
      END_REPEAT;
      RETURN (TRUE);
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EQUALS_EXPRESSION' IN 
      TYPEOF(arg) THEN
      RETURN (is_sql_mappable(arg\binary_generic_expression.operands[1]) 
        AND is_sql_mappable(arg\binary_generic_expression.operands[2]));
    END_IF;
    IF (((((('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPARISON_EQUAL'
       IN TYPEOF(arg)) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPARISON_GREATER' IN 
      TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPARISON_GREATER_EQUAL'
       IN TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPARISON_LESS' IN 
      TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPARISON_LESS_EQUAL' 
      IN TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPARISON_NOT_EQUAL' IN
       TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LIKE_EXPRESSION' IN 
      TYPEOF(arg)) THEN
      RETURN (is_sql_mappable(arg\comparison_expression.operands[1]) AND 
        is_sql_mappable(arg\comparison_expression.operands[2]));
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.INTERVAL_EXPRESSION' IN
       TYPEOF(arg) THEN
      RETURN ((is_sql_mappable(arg\interval_expression.interval_low) AND 
        is_sql_mappable(arg\interval_expression.interval_high)) AND 
        is_sql_mappable(arg\interval_expression.interval_item));
    END_IF;
    IF ((
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NUMERIC_DEFINED_FUNCTION'
       IN TYPEOF(arg)) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOOLEAN_DEFINED_FUNCTION'
       IN TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STRING_DEFINED_FUNCTION'
       IN TYPEOF(arg)) THEN
      RETURN (FALSE);
    END_IF;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SIMPLE_STRING_EXPRESSION'
       IN TYPEOF(arg) THEN
      RETURN (TRUE);
    END_IF;
    IF ((('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.INDEX_EXPRESSION' IN
       TYPEOF(arg)) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SUBSTRING_EXPRESSION' IN
       TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONCAT_EXPRESSION' IN 
      TYPEOF(arg))) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FORMAT_FUNCTION' IN 
      TYPEOF(arg)) THEN
      RETURN (FALSE);
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 13584-20: iso13584_expressions_schema

FUNCTION item_in_context (
    item  : representation_item;
    cntxt : representation_context 
    ) : BOOLEAN;
  LOCAL
    y : BAG OF representation_item;
  END_LOCAL;
    IF SIZEOF(USEDIN(item, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION.ITEMS') *
       cntxt.representations_in_context) > 0 THEN
      RETURN (TRUE);
    ELSE
      y := QUERY (z <* USEDIN(item, '')| 
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_ITEM' 
        IN TYPEOF(z));
      IF SIZEOF(y) > 0 THEN
        REPEAT i := 1 TO HIINDEX(y);
          IF item_in_context(y[i], cntxt) THEN
            RETURN (TRUE);
          END_IF;
        END_REPEAT;
      END_IF;
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-43: representation_schema

FUNCTION leap_year (
    year : year_number 
    ) : BOOLEAN;
    IF (year MOD 4 = 0) AND (year MOD 100 <> 0) OR (year MOD 400 = 0) THEN
      RETURN (TRUE);
    ELSE
      RETURN (FALSE);
    END_IF;
END_FUNCTION; -- 10303-41: date_time_schema

FUNCTION list_face_loops (
    f : face 
    ) : LIST [0:?] OF loop;
  LOCAL
    loops : LIST [0:?] OF loop := [];
  END_LOCAL;
    REPEAT i := 1 TO SIZEOF(f.bounds);
      loops := loops + f.bounds[i].bound;
    END_REPEAT;
    RETURN (loops);
END_FUNCTION; -- 10303-42: topology_schema

FUNCTION list_of_topology_reversed (
    a_list : list_of_reversible_topology_item 
    ) : list_of_reversible_topology_item;
  LOCAL
    the_reverse : list_of_reversible_topology_item;
  END_LOCAL;
    the_reverse := [];
    REPEAT i := 1 TO SIZEOF(a_list);
      the_reverse := topology_reversed(a_list[i]) + the_reverse;
    END_REPEAT;
    RETURN (the_reverse);
END_FUNCTION; -- 10303-42: topology_schema

FUNCTION list_selected_components (
    aggr : AGGREGATE OF LIST OF maths_value;
    k    : positive_integer 
    ) : LIST OF maths_value;
  LOCAL
    result : LIST OF maths_value := [];
    j : INTEGER := 0;
  END_LOCAL;
    REPEAT i := LOINDEX(aggr) TO HIINDEX(aggr);
      IF k <= SIZEOF(aggr[i]) THEN
        INSERT( result, aggr[i][k], j );
        j := j + 1;
      END_IF;
    END_REPEAT;
    RETURN (result);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION list_to_array (
    lis : LIST [0:?] OF GENERIC : T;
    low : INTEGER;
    u   : INTEGER 
    ) : ARRAY [low:u] OF GENERIC : T;
  LOCAL
    n : INTEGER;
    res : ARRAY [low:u] OF GENERIC : T;
  END_LOCAL;
    n := SIZEOF(lis);
    IF n <> u - low + 1 THEN
      RETURN (?);
    ELSE
      res := [ lis[1] ];
      REPEAT i := 2 TO n;
        res[(low + i - 1)] := lis[i];
      END_REPEAT;
      RETURN (res);
    END_IF;
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION list_to_set (
    l : LIST [0:?] OF GENERIC : T 
    ) : SET OF GENERIC : T;
  LOCAL
    s : SET OF GENERIC : T := [];
  END_LOCAL;
    REPEAT i := 1 TO SIZEOF(l);
      s := s + l[i];
    END_REPEAT;
    RETURN (s);
END_FUNCTION; -- 10303-42: topology_schema

FUNCTION make_array_of_array (
    lis  : LIST [1:?] OF LIST [1:?] OF GENERIC : T;
    low1 : INTEGER;
    u1   : INTEGER;
    low2 : INTEGER;
    u2   : INTEGER 
    ) : ARRAY [low1:u1] OF ARRAY [low2:u2] OF GENERIC : T;
  LOCAL
    res : ARRAY [low1:u1] OF ARRAY [low2:u2] OF GENERIC : T;
  END_LOCAL;
    IF u1 - low1 + 1 <> SIZEOF(lis) THEN
      RETURN (?);
    END_IF;
    IF u2 - low2 + 1 <> SIZEOF(lis[1]) THEN
      RETURN (?);
    END_IF;
    res := [ list_to_array(lis[1], low2, u2) ];
    REPEAT i := 2 TO HIINDEX(lis);
      IF u2 - low2 + 1 <> SIZEOF(lis[i]) THEN
        RETURN (?);
      END_IF;
      res[(low1 + i - 1)] := list_to_array(lis[i], low2, u2);
    END_REPEAT;
    RETURN (res);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION make_array_of_array_of_array (
    lis  : LIST [1:?] OF LIST [1:?] OF LIST [1:?] OF GENERIC : T;
    low1 : INTEGER;
    u1   : INTEGER;
    low2 : INTEGER;
    u2   : INTEGER;
    low3 : INTEGER;
    u3   : INTEGER 
    ) : ARRAY [low1:u1] OF ARRAY [low2:u2] OF ARRAY [low3:u3] OF GENERIC : T;
  LOCAL
    res : ARRAY [low1:u1] OF ARRAY [low2:u2] OF ARRAY [low3:u3] OF GENERIC 
      : T;
  END_LOCAL;
    IF u1 - low1 + 1 <> SIZEOF(lis) THEN
      RETURN (?);
    END_IF;
    IF u2 - low2 + 1 <> SIZEOF(lis[1]) THEN
      RETURN (?);
    END_IF;
    res := [ make_array_of_array(lis[1], low2, u2, low3, u3) ];
    REPEAT i := 2 TO HIINDEX(lis);
      IF u2 - low2 + 1 <> SIZEOF(lis[i]) THEN
        RETURN (?);
      END_IF;
      res[(low1 + i - 1)] := make_array_of_array(lis[i], low2, u2, low3, u3
        );
    END_REPEAT;
    RETURN (res);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION make_atom_based_literal (
    lit_value : atom_based_value 
    ) : atom_based_literal;
    RETURN (atom_based_literal(lit_value) || generic_literal() || 
      simple_generic_expression() || generic_expression());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_binary_literal (
    lit_value : BINARY 
    ) : binary_literal;
    RETURN (binary_literal(lit_value) || generic_literal() || 
      simple_generic_expression() || generic_expression());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_boolean_literal (
    lit_value : BOOLEAN 
    ) : boolean_literal;
    RETURN (boolean_literal(lit_value) || simple_boolean_expression() || 
      boolean_expression() || expression() || generic_expression() || 
      simple_generic_expression() || generic_literal());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_cartesian_complex_number_region (
    real_constraint : real_interval;
    imag_constraint : real_interval 
    ) : cartesian_complex_number_region;
    RETURN (cartesian_complex_number_region(real_constraint, 
      imag_constraint) || maths_space() || generic_expression() || 
      generic_literal() || simple_generic_expression());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_complex_number_literal (
    rpart : REAL;
    ipart : REAL 
    ) : complex_number_literal;
    RETURN (complex_number_literal(rpart, ipart) || generic_literal() || 
      simple_generic_expression() || generic_expression());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_elementary_function (
    func_id : elementary_function_enumerators 
    ) : elementary_function;
    RETURN (elementary_function(func_id) || maths_function() || 
      generic_expression() || generic_literal() || 
      simple_generic_expression());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_elementary_space (
    space_id : elementary_space_enumerators 
    ) : elementary_space;
    RETURN (elementary_space(space_id) || maths_space() || 
      generic_expression() || generic_literal() || 
      simple_generic_expression());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_extended_tuple_space (
    base     : tuple_space;
    extender : maths_space 
    ) : extended_tuple_space;
    RETURN (extended_tuple_space(base, extender) || maths_space() || 
      generic_expression() || generic_literal() || 
      simple_generic_expression());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_finite_integer_interval (
    min : INTEGER;
    max : INTEGER 
    ) : finite_integer_interval;
    RETURN (finite_integer_interval(min, max) || maths_space() || 
      generic_expression() || generic_literal() || 
      simple_generic_expression());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_finite_real_interval (
    min    : REAL;
    minclo : open_closed;
    max    : REAL;
    maxclo : open_closed 
    ) : finite_real_interval;
    RETURN (finite_real_interval(min, minclo, max, maxclo) || maths_space()
       || generic_expression() || generic_literal() || 
      simple_generic_expression());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_finite_space (
    members : SET OF maths_value 
    ) : finite_space;
    RETURN (finite_space(members) || maths_space() || generic_expression() 
      || generic_literal() || simple_generic_expression());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_function_application (
    afunction : maths_function_select;
    arguments : LIST [1:?] OF maths_value 
    ) : function_application;
    RETURN (function_application(afunction, arguments) || 
      multiple_arity_generic_expression((convert_to_maths_function(
      afunction) + convert_to_operands(arguments))) || generic_expression()
      );
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_function_space (
    domain_constraint : space_constraint_type;
    domain_argument   : maths_space;
    range_constraint  : space_constraint_type;
    range_argument    : maths_space 
    ) : function_space;
    RETURN (function_space(domain_constraint, domain_argument, 
      range_constraint, range_argument) || maths_space() || 
      generic_expression() || generic_literal() || 
      simple_generic_expression());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_int_literal (
    lit_value : INTEGER 
    ) : int_literal;
    RETURN (int_literal() || literal_number(lit_value) || 
      simple_numeric_expression() || numeric_expression() || expression() 
      || generic_expression() || simple_generic_expression() || 
      generic_literal());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_listed_product_space (
    factors : LIST OF maths_space 
    ) : listed_product_space;
    RETURN (listed_product_space(factors) || maths_space() || 
      generic_expression() || generic_literal() || 
      simple_generic_expression());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_logical_literal (
    lit_value : LOGICAL 
    ) : logical_literal;
    RETURN (logical_literal(lit_value) || generic_literal() || 
      simple_generic_expression() || generic_expression());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_maths_enum_literal (
    lit_value : maths_enum_atom 
    ) : maths_enum_literal;
    RETURN (maths_enum_literal(lit_value) || generic_literal() || 
      simple_generic_expression() || generic_expression());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_maths_tuple_literal (
    lit_value : LIST OF maths_value 
    ) : maths_tuple_literal;
    RETURN (maths_tuple_literal(lit_value) || generic_literal() || 
      simple_generic_expression() || generic_expression());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_parallel_composed_function (
    srcdom    : maths_space_or_function;
    prepfuncs : LIST [2:?] OF maths_function;
    finfunc   : maths_function_select 
    ) : parallel_composed_function;
    RETURN (parallel_composed_function(srcdom, prepfuncs, finfunc) || 
      maths_function() || generic_expression() || 
      multiple_arity_generic_expression(convert_to_operands_prcmfn(srcdom, 
      prepfuncs, finfunc)));
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_polar_complex_number_region (
    centre         : complex_number_literal;
    dis_constraint : real_interval;
    dir_constraint : finite_real_interval 
    ) : polar_complex_number_region;
    RETURN (polar_complex_number_region(centre, dis_constraint, 
      dir_constraint) || maths_space() || generic_expression() || 
      generic_literal() || simple_generic_expression());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_real_interval_from_min (
    min    : REAL;
    minclo : open_closed 
    ) : real_interval_from_min;
    RETURN (real_interval_from_min(min, minclo) || maths_space() || 
      generic_expression() || generic_literal() || 
      simple_generic_expression());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_real_interval_to_max (
    max    : REAL;
    maxclo : open_closed 
    ) : real_interval_to_max;
    RETURN (real_interval_to_max(max, maxclo) || maths_space() || 
      generic_expression() || generic_literal() || 
      simple_generic_expression());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_real_literal (
    lit_value : REAL 
    ) : real_literal;
    RETURN (real_literal() || literal_number(lit_value) || 
      simple_numeric_expression() || numeric_expression() || expression() 
      || generic_expression() || simple_generic_expression() || 
      generic_literal());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_string_literal (
    lit_value : STRING 
    ) : string_literal;
    RETURN (string_literal(lit_value) || simple_string_expression() || 
      string_expression() || expression() || generic_expression() || 
      simple_generic_expression() || generic_literal());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION make_uniform_product_space (
    base     : maths_space;
    exponent : positive_integer 
    ) : uniform_product_space;
    RETURN (uniform_product_space(base, exponent) || maths_space() || 
      generic_expression() || generic_literal() || 
      simple_generic_expression());
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION max_exists (
    spc : maths_space 
    ) : BOOLEAN;
  LOCAL
    types : SET OF STRING := TYPEOF(spc);
  END_LOCAL;
    RETURN (bool((((schema_prefix + 'FINITE_INTEGER_INTERVAL' IN types) OR 
      (schema_prefix + 'INTEGER_INTERVAL_TO_MAX' IN types)) OR (
      schema_prefix + 'FINITE_REAL_INTERVAL' IN types)) OR (schema_prefix +
       'REAL_INTERVAL_TO_MAX' IN types)));
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION max_included (
    spc : maths_space 
    ) : BOOLEAN;
  LOCAL
    types : SET OF STRING := TYPEOF(spc);
  END_LOCAL;
    IF (schema_prefix + 'FINITE_INTEGER_INTERVAL' IN types) OR (
      schema_prefix + 'INTEGER_INTERVAL_TO_MAX' IN types) THEN
      RETURN (TRUE);
    END_IF;
    IF schema_prefix + 'FINITE_REAL_INTERVAL' IN types THEN
      RETURN (bool(spc\finite_real_interval.max_closure = closed));
    END_IF;
    IF schema_prefix + 'REAL_INTERVAL_TO_MAX' IN types THEN
      RETURN (bool(spc\real_interval_to_max.max_closure = closed));
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION md_pmi_name_and_type_correlation (
    input : annotation_placeholder_occurrence 
    ) : BOOLEAN;
  LOCAL
    pmi_role : STRING := input\annotation_placeholder_occurrence.item\
      representation_item.name;
    dmiawps : SET OF draughting_model_item_association_with_placeholder := 
      input\annotation_placeholder_occurrence.
      the_draughting_model_item_association_with_placeholders;
    v : SET OF STRING := [];
  END_LOCAL;
    IF SIZEOF(dmiawps) = 1 THEN
      v := TYPEOF(dmiawps[1]\draughting_model_item_association.definition);
    ELSE
      RETURN (FALSE);
    END_IF;
    IF NOT (pmi_role IN [ 'angular dimension', 'angularity', 
      'circular runout', 'circularity', 'coaxiality', 'concentricity', 
      'curve dimension', 'cylindricity', 'datum', 'datum target', 
      'diameter dimension', 'flatness', 'general dimension', 'general note'
      , 'general tolerance', 'label', 'linear dimension', 'note', 
      'ordinate dimension', 'parallelism', 'perpendicularity', 'position', 
      'profile of line', 'profile of surface', 'radial dimension', 
      'roundness', 'runout', 'straightness', 'surface roughness', 
      'symmetry', 'total runout' ]) THEN
      RETURN (?);
    END_IF;
    CASE pmi_role OF
      'angular dimension' :
          IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANGULAR_LOCATION'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'angularity' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANGULARITY_TOLERANCE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'circular runout' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCULAR_RUNOUT_TOLERANCE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'circularity' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROUNDNESS_TOLERANCE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'coaxiality' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COAXIALITY_TOLERANCE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'concentricity' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONCENTRICITY_TOLERANCE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'curve dimension' :
          IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSIONAL_SIZE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'cylindricity' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CYLINDRICITY_TOLERANCE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'datum' :
          IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DATUM' IN v THEN
            RETURN (TRUE);
          END_IF;
      'datum target' :
          IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DATUM_TARGET' IN 
            v THEN
            RETURN (TRUE);
          END_IF;
      'diameter dimension' :
          IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSIONAL_SIZE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'flatness' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FLATNESS_TOLERANCE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'general dimension' :
          IF SIZEOF([ 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSIONAL_SIZE',
             
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSIONAL_LOCATION'
             ] * v) = 1 THEN
            RETURN (TRUE);
          END_IF;
      'general note' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'general tolerance' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GEOMETRIC_TOLERANCE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'label' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'linear dimension' :
          IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSIONAL_SIZE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'note' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'ordinate dimension' :
          IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSIONAL_SIZE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'parallelism' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PARALLELISM_TOLERANCE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'perpendicularity' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PERPENDICULARITY_TOLERANCE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'position' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITION_TOLERANCE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'profile of line' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINE_PROFILE_TOLERANCE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'profile of surface' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_PROFILE_TOLERANCE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'radial dimension' :
          IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSIONAL_SIZE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'roundness' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ROUNDNESS_TOLERANCE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'runout' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TOTAL_RUNOUT_TOLERANCE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'straightness' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.STRAIGHTNESS_TOLERANCE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'surface roughness' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'symmetry' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SYMMETRY_TOLERANCE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
      'total runout' :
          IF 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TOTAL_RUNOUT_TOLERANCE'
             IN v THEN
            RETURN (TRUE);
          END_IF;
    OTHERWISE :
        RETURN (FALSE);
    END_CASE;
END_FUNCTION; -- 10303-113: mechanical_design_schema

FUNCTION md_valid_content_in_geometric_set_for_placeholder (
    input : geometric_set 
    ) : BOOLEAN;
  LOCAL
    pass : BOOLEAN := TRUE;
    boxes : BAG OF planar_box := [];
    texts : BAG OF annotation_text := [];
    placements : BAG OF placement := [];
    points : BAG OF point := [];
  END_LOCAL;
    REPEAT i := LOINDEX(input\geometric_set.elements) TO HIINDEX(input\
      geometric_set.elements);
      IF ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT' IN TYPEOF(
        input\geometric_set.elements[i])) AND NOT (SIZEOF([ 
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CARTESIAN_POINT', 
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_ON_CURVE', 
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_ON_SURFACE' ] * 
        TYPEOF(input\geometric_set.elements[i])) = 1) THEN
        pass := FALSE;
      ELSE
        points := points + input\geometric_set.elements[i];
      END_IF;
      IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANAR_BOX' IN TYPEOF
        (input\geometric_set.elements[i]) THEN
        boxes := boxes + input\geometric_set.elements[i];
      END_IF;
      IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ANNOTATION_TEXT' IN 
        TYPEOF(input\geometric_set.elements[i]) THEN
        texts := texts + input\geometric_set.elements[i];
      END_IF;
      IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN TYPEOF(
        input\geometric_set.elements[i]) THEN
        placements := placements + input\geometric_set.elements[i];
      END_IF;
    END_REPEAT;
    IF SIZEOF(boxes) > 1 THEN
      pass := FALSE;
    END_IF;
    IF SIZEOF(texts) > 1 THEN
      pass := FALSE;
    END_IF;
    IF SIZEOF(placements) <> 1 THEN
      pass := FALSE;
    END_IF;
    RETURN (pass);
END_FUNCTION; -- 10303-113: mechanical_design_schema

FUNCTION member_of (
    val : GENERIC : G;
    spc : maths_space 
    ) : LOGICAL;
    FUNCTION fedex
      (val : AGGREGATE OF GENERIC : x;
       i : INTEGER ) : GENERIC : x;
      RETURN (val[i]);
    END_FUNCTION;
  LOCAL
    v : maths_value := simplify_maths_value(convert_to_maths_value(val));
    vtypes : SET OF STRING := stripped_typeof(v);
    s : maths_space := simplify_maths_space(spc);
    stypes : SET OF STRING := stripped_typeof(s);
    tmp_int : INTEGER;
    tmp_real : REAL;
    tmp_cmplx : complex_number_literal;
    lgcl : LOGICAL;
    cum : LOGICAL;
    vspc : maths_space;
    sspc : maths_space;
    smem : SET OF maths_value;
    factors : LIST OF maths_space;
  END_LOCAL;
    IF NOT EXISTS(s) THEN
      RETURN (FALSE);
    END_IF;
    IF NOT EXISTS(v) THEN
      RETURN (s = the_generics);
    END_IF;
    IF ((('GENERIC_EXPRESSION' IN vtypes) AND NOT ('MATHS_SPACE' IN vtypes)
      ) AND NOT ('MATHS_FUNCTION' IN vtypes)) AND NOT (
      'COMPLEX_NUMBER_LITERAL' IN vtypes) THEN
      IF has_values_space(v) THEN
        vspc := values_space_of(v);
        IF subspace_of(vspc, s) THEN
          RETURN (TRUE);
        END_IF;
        IF NOT compatible_spaces(vspc, s) THEN
          RETURN (FALSE);
        END_IF;
        RETURN (UNKNOWN);
      END_IF;
      RETURN (UNKNOWN);
    END_IF;
    IF 'ELEMENTARY_SPACE' IN stypes THEN
      CASE s\elementary_space.space_id OF
        es_numbers :
            RETURN (('NUMBER' IN vtypes) OR ('COMPLEX_NUMBER_LITERAL' IN 
              vtypes));
        es_complex_numbers :
            RETURN ('COMPLEX_NUMBER_LITERAL' IN vtypes);
        es_reals :
            RETURN (('REAL' IN vtypes) AND NOT ('INTEGER' IN vtypes));
        es_integers :
            RETURN ('INTEGER' IN vtypes);
        es_logicals :
            RETURN ('LOGICAL' IN vtypes);
        es_booleans :
            RETURN ('BOOLEAN' IN vtypes);
        es_strings :
            RETURN ('STRING' IN vtypes);
        es_binarys :
            RETURN ('BINARY' IN vtypes);
        es_maths_spaces :
            RETURN ('MATHS_SPACE' IN vtypes);
        es_maths_functions :
            RETURN ('MATHS_FUNCTION' IN vtypes);
        es_generics :
            RETURN (TRUE);
      END_CASE;
    END_IF;
    IF 'FINITE_INTEGER_INTERVAL' IN stypes THEN
      IF 'INTEGER' IN vtypes THEN
        tmp_int := v;
        RETURN ((s\finite_integer_interval.min <= tmp_int) AND (tmp_int <= 
          s\finite_integer_interval.max));
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF 'INTEGER_INTERVAL_FROM_MIN' IN stypes THEN
      IF 'INTEGER' IN vtypes THEN
        tmp_int := v;
        RETURN (s\integer_interval_from_min.min <= tmp_int);
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF 'INTEGER_INTERVAL_TO_MAX' IN stypes THEN
      IF 'INTEGER' IN vtypes THEN
        tmp_int := v;
        RETURN (tmp_int <= s\integer_interval_to_max.max);
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF 'FINITE_REAL_INTERVAL' IN stypes THEN
      IF ('REAL' IN vtypes) AND NOT ('INTEGER' IN vtypes) THEN
        tmp_real := v;
        IF s\finite_real_interval.min_closure = closed THEN
          IF s\finite_real_interval.max_closure = closed THEN
            RETURN ((s\finite_real_interval.min <= tmp_real) AND (tmp_real 
              <= s\finite_real_interval.max));
          ELSE
            RETURN ((s\finite_real_interval.min <= tmp_real) AND (tmp_real 
              < s\finite_real_interval.max));
          END_IF;
        ELSE
          IF s\finite_real_interval.max_closure = closed THEN
            RETURN ((s\finite_real_interval.min < tmp_real) AND (tmp_real 
              <= s\finite_real_interval.max));
          ELSE
            RETURN ((s\finite_real_interval.min < tmp_real) AND (tmp_real <
               s\finite_real_interval.max));
          END_IF;
        END_IF;
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF 'REAL_INTERVAL_FROM_MIN' IN stypes THEN
      IF ('REAL' IN vtypes) AND NOT ('INTEGER' IN vtypes) THEN
        tmp_real := v;
        IF s\real_interval_from_min.min_closure = closed THEN
          RETURN (s\real_interval_from_min.min <= tmp_real);
        ELSE
          RETURN (s\real_interval_from_min.min < tmp_real);
        END_IF;
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF 'REAL_INTERVAL_TO_MAX' IN stypes THEN
      IF ('REAL' IN vtypes) AND NOT ('INTEGER' IN vtypes) THEN
        tmp_real := v;
        IF s\real_interval_to_max.max_closure = closed THEN
          RETURN (tmp_real <= s\real_interval_to_max.max);
        ELSE
          RETURN (tmp_real < s\real_interval_to_max.max);
        END_IF;
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF 'CARTESIAN_COMPLEX_NUMBER_REGION' IN stypes THEN
      IF 'COMPLEX_NUMBER_LITERAL' IN vtypes THEN
        RETURN (member_of(v\complex_number_literal.real_part, s\
          cartesian_complex_number_region.real_constraint) AND member_of(v\
          complex_number_literal.imag_part, s\
          cartesian_complex_number_region.imag_constraint));
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF 'POLAR_COMPLEX_NUMBER_REGION' IN stypes THEN
      IF 'COMPLEX_NUMBER_LITERAL' IN vtypes THEN
        tmp_cmplx := v;
        tmp_cmplx.real_part := tmp_cmplx.real_part - s\
          polar_complex_number_region.centre.real_part;
        tmp_cmplx.imag_part := tmp_cmplx.imag_part - s\
          polar_complex_number_region.centre.imag_part;
        tmp_real := SQRT(tmp_cmplx.real_part ** 2 + tmp_cmplx.imag_part ** 
          2);
        IF NOT member_of(tmp_real, s\polar_complex_number_region.
          distance_constraint) THEN
          RETURN (FALSE);
        END_IF;
        IF tmp_real = 0.0 THEN
          RETURN (TRUE);
        END_IF;
        tmp_real := atan2(tmp_cmplx.imag_part, tmp_cmplx.real_part);
        RETURN (member_of(tmp_real, s\polar_complex_number_region.
          direction_constraint) OR member_of(tmp_real + 2.0 * PI, s\
          polar_complex_number_region.direction_constraint));
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF 'FINITE_SPACE' IN stypes THEN
      smem := s\finite_space.members;
      cum := FALSE;
      REPEAT i := 1 TO SIZEOF(smem);
        cum := cum OR equal_maths_values(v, smem[i]);
        IF cum = TRUE THEN
          RETURN (TRUE);
        END_IF;
      END_REPEAT;
      RETURN (cum);
    END_IF;
    IF 'UNIFORM_PRODUCT_SPACE' IN stypes THEN
      IF 'LIST' IN vtypes THEN
        IF SIZEOF(v) = s\uniform_product_space.exponent THEN
          sspc := s\uniform_product_space.base;
          cum := TRUE;
          REPEAT i := 1 TO SIZEOF(v);
            cum := cum AND member_of(v[i], sspc);
            IF cum = FALSE THEN
              RETURN (FALSE);
            END_IF;
          END_REPEAT;
          RETURN (cum);
        END_IF;
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF 'LISTED_PRODUCT_SPACE' IN stypes THEN
      IF 'LIST' IN vtypes THEN
        factors := s\listed_product_space.factors;
        IF SIZEOF(v) = SIZEOF(factors) THEN
          cum := TRUE;
          REPEAT i := 1 TO SIZEOF(v);
            cum := cum AND member_of(v[i], factors[i]);
            IF cum = FALSE THEN
              RETURN (FALSE);
            END_IF;
          END_REPEAT;
          RETURN (cum);
        END_IF;
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF 'EXTENDED_TUPLE_SPACE' IN stypes THEN
      IF 'LIST' IN vtypes THEN
        sspc := s\extended_tuple_space.base;
        tmp_int := space_dimension(sspc);
        IF SIZEOF(v) >= tmp_int THEN
          cum := TRUE;
          REPEAT i := 1 TO tmp_int;
            cum := cum AND member_of(v[i], factor_space(sspc, i));
            IF cum = FALSE THEN
              RETURN (FALSE);
            END_IF;
          END_REPEAT;
          sspc := s\extended_tuple_space.extender;
          REPEAT i := tmp_int + 1 TO SIZEOF(v);
            cum := cum AND member_of(v[i], sspc);
            IF cum = FALSE THEN
              RETURN (FALSE);
            END_IF;
          END_REPEAT;
          RETURN (cum);
        END_IF;
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF 'FUNCTION_SPACE' IN stypes THEN
      IF 'MATHS_FUNCTION' IN vtypes THEN
        vspc := v\maths_function.domain;
        sspc := s\function_space.domain_argument;
        CASE s\function_space.domain_constraint OF
          sc_equal :
              cum := equal_maths_spaces(vspc, sspc);
          sc_subspace :
              cum := subspace_of(vspc, sspc);
          sc_member :
              cum := member_of(vspc, sspc);
        END_CASE;
        IF cum = FALSE THEN
          RETURN (FALSE);
        END_IF;
        vspc := v\maths_function.range;
        sspc := s\function_space.range_argument;
        CASE s\function_space.range_constraint OF
          sc_equal :
              cum := cum AND equal_maths_spaces(vspc, sspc);
          sc_subspace :
              cum := cum AND subspace_of(vspc, sspc);
          sc_member :
              cum := cum AND member_of(vspc, sspc);
        END_CASE;
        RETURN (cum);
      END_IF;
      RETURN (FALSE);
    END_IF;
    RETURN (UNKNOWN);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION min_exists (
    spc : maths_space 
    ) : BOOLEAN;
  LOCAL
    types : SET OF STRING := TYPEOF(spc);
  END_LOCAL;
    RETURN (bool((((schema_prefix + 'FINITE_INTEGER_INTERVAL' IN types) OR 
      (schema_prefix + 'INTEGER_INTERVAL_FROM_MIN' IN types)) OR (
      schema_prefix + 'FINITE_REAL_INTERVAL' IN types)) OR (schema_prefix +
       'REAL_INTERVAL_FROM_MIN' IN types)));
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION min_included (
    spc : maths_space 
    ) : BOOLEAN;
  LOCAL
    types : SET OF STRING := TYPEOF(spc);
  END_LOCAL;
    IF (schema_prefix + 'FINITE_INTEGER_INTERVAL' IN types) OR (
      schema_prefix + 'INTEGER_INTERVAL_FROM_MIN' IN types) THEN
      RETURN (TRUE);
    END_IF;
    IF schema_prefix + 'FINITE_REAL_INTERVAL' IN types THEN
      RETURN (bool(spc\finite_real_interval.min_closure = closed));
    END_IF;
    IF schema_prefix + 'REAL_INTERVAL_FROM_MIN' IN types THEN
      RETURN (bool(spc\real_interval_from_min.min_closure = closed));
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION mixed_loop_type_set (
    l : SET [0:?] OF loop 
    ) : LOGICAL;
  LOCAL
    poly_loop_type : LOGICAL;
  END_LOCAL;
    IF SIZEOF(l) <= 1 THEN
      RETURN (FALSE);
    END_IF;
    poly_loop_type := 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLY_LOOP' IN TYPEOF(l[1
      ]);
    REPEAT i := 2 TO SIZEOF(l);
      IF ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLY_LOOP' IN TYPEOF
        (l[i])) <> poly_loop_type THEN
        RETURN (TRUE);
      END_IF;
    END_REPEAT;
    RETURN (FALSE);
END_FUNCTION; -- 10303-42: topology_schema

FUNCTION msb_shells (
    brep : manifold_solid_brep 
    ) : SET [1:?] OF closed_shell;
  LOCAL
    return_set : SET [1:?] OF closed_shell := [ brep.outer ];
  END_LOCAL;
    IF SIZEOF(QUERY (msbtype <* TYPEOF(brep)| msbtype LIKE 
      '*BREP_WITH_VOIDS')) >= 1 THEN
      return_set := return_set + brep\brep_with_voids.voids;
    END_IF;
    RETURN (return_set);
END_FUNCTION; -- 10303-42: geometric_model_schema

FUNCTION msf_curve_check (
    cv : representation_item 
    ) : BOOLEAN;
    IF SIZEOF([ 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOUNDED_CURVE'
      , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONIC', 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_REPLICA', 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINE', 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OFFSET_CURVE_3D' ] * 
      TYPEOF(cv)) > 1 THEN
      RETURN (FALSE);
    END_IF;
    IF ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_CURVE' IN 
      TYPEOF(cv)) AND (cv\b_spline_curve.self_intersect = FALSE) OR (cv\
      b_spline_curve.self_intersect = UNKNOWN) THEN
      RETURN (TRUE);
    ELSE
      IF SIZEOF([ 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONIC', 
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINE' ] * TYPEOF(cv)) 
        = 1 THEN
        RETURN (TRUE);
      ELSE
        IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_REPLICA' IN 
          TYPEOF(cv) THEN
          RETURN (msf_curve_check(cv\curve_replica.parent_curve));
        ELSE
          IF ((
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OFFSET_CURVE_3D' 
            IN TYPEOF(cv)) AND ((cv\offset_curve_3d.self_intersect = FALSE)
             OR (cv\offset_curve_3d.self_intersect = UNKNOWN))) AND NOT (
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE' IN 
            TYPEOF(cv\offset_curve_3d.basis_curve)) THEN
            RETURN (msf_curve_check(cv\offset_curve_3d.basis_curve));
          ELSE
            IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PCURVE' IN 
              TYPEOF(cv) THEN
              RETURN (msf_curve_check(cv\pcurve.reference_to_curve\
                representation.items[1]) AND msf_surface_check(cv\pcurve.
                basis_surface));
            ELSE
              IF 
                'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_CURVE'
                 IN TYPEOF(cv) THEN
                IF msf_curve_check(cv\surface_curve.curve_3d) THEN
                  REPEAT i := 1 TO SIZEOF(cv\surface_curve.
                    associated_geometry);
                    IF 
                      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE'
                       IN TYPEOF(cv\surface_curve.associated_geometry[i]) 
                      THEN
                      IF NOT msf_surface_check(cv\surface_curve.
                        associated_geometry[i]) THEN
                        RETURN (FALSE);
                      END_IF;
                    ELSE
                      IF 
                        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PCURVE'
                         IN TYPEOF(cv\surface_curve.associated_geometry[i])
                         THEN
                        IF NOT msf_curve_check(cv\surface_curve.
                          associated_geometry[i]) THEN
                          RETURN (FALSE);
                        END_IF;
                      END_IF;
                    END_IF;
                  END_REPEAT;
                  RETURN (TRUE);
                END_IF;
              ELSE
                IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE' 
                  IN TYPEOF(cv) THEN
                  IF SIZEOF(cv\polyline.points) >= 3 THEN
                    RETURN (TRUE);
                  END_IF;
                END_IF;
              END_IF;
            END_IF;
          END_IF;
        END_IF;
      END_IF;
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-509: aic_manifold_surface

FUNCTION msf_surface_check (
    surf : surface 
    ) : BOOLEAN;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ELEMENTARY_SURFACE' IN 
      TYPEOF(surf) THEN
      RETURN (TRUE);
    ELSE
      IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SWEPT_SURFACE' IN 
        TYPEOF(surf) THEN
        RETURN (msf_curve_check(surf\swept_surface.swept_curve));
      ELSE
        IF ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OFFSET_SURFACE' IN
           TYPEOF(surf)) AND (surf\offset_surface.self_intersect = FALSE) 
          OR (surf\offset_surface.self_intersect = UNKNOWN) THEN
          RETURN (msf_surface_check(surf\offset_surface.basis_surface));
        ELSE
          IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_REPLICA' 
            IN TYPEOF(surf) THEN
            RETURN (msf_surface_check(surf\surface_replica.parent_surface))
              ;
          ELSE
            IF (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_SURFACE'
               IN TYPEOF(surf)) AND (surf\b_spline_surface.self_intersect =
               FALSE) OR (surf\b_spline_surface.self_intersect = UNKNOWN) 
              THEN
              RETURN (TRUE);
            END_IF;
          END_IF;
        END_IF;
      END_IF;
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-509: aic_manifold_surface

FUNCTION nmsf_curve_check (
    cv : representation_item 
    ) : BOOLEAN;
    IF SIZEOF([ 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.BOUNDED_CURVE'
      , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONIC', 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_REPLICA', 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINE', 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OFFSET_CURVE_3D' ] * 
      TYPEOF(cv)) > 1 THEN
      RETURN (FALSE);
    ELSE
      IF ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_CURVE' IN 
        TYPEOF(cv)) AND (cv\b_spline_curve.self_intersect = FALSE) OR (cv\
        b_spline_curve.self_intersect = UNKNOWN) THEN
        RETURN (TRUE);
      ELSE
        IF SIZEOF([ 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONIC', 
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINE' ] * TYPEOF(cv)
          ) = 1 THEN
          RETURN (TRUE);
        ELSE
          IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_REPLICA' IN
             TYPEOF(cv) THEN
            RETURN (nmsf_curve_check(cv\curve_replica.parent_curve));
          ELSE
            IF ((
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OFFSET_CURVE_3D'
               IN TYPEOF(cv)) AND ((cv\offset_curve_3d.self_intersect = 
              FALSE) OR (cv\offset_curve_3d.self_intersect = UNKNOWN))) AND
               NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE' 
              IN TYPEOF(cv\offset_curve_3d.basis_curve)) THEN
              RETURN (nmsf_curve_check(cv\offset_curve_3d.basis_curve));
            ELSE
              IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PCURVE' IN 
                TYPEOF(cv) THEN
                RETURN (nmsf_curve_check(cv\pcurve.reference_to_curve\
                  representation.items[1]) AND nmsf_surface_check(cv\pcurve
                  .basis_surface));
              ELSE
                IF 
                  'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_CURVE'
                   IN TYPEOF(cv) THEN
                  IF nmsf_curve_check(cv\surface_curve.curve_3d) THEN
                    REPEAT i := 1 TO SIZEOF(cv\surface_curve.
                      associated_geometry);
                      IF 
                        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE'
                         IN TYPEOF(cv\surface_curve.associated_geometry[i])
                         THEN
                        IF NOT nmsf_surface_check(cv\surface_curve.
                          associated_geometry[i]) THEN
                          RETURN (FALSE);
                        END_IF;
                      ELSE
                        IF 
                          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PCURVE'
                           IN TYPEOF(cv\surface_curve.associated_geometry[i
                          ]) THEN
                          IF NOT nmsf_curve_check(cv\surface_curve.
                            associated_geometry[i]) THEN
                            RETURN (FALSE);
                          END_IF;
                        END_IF;
                      END_IF;
                    END_REPEAT;
                    RETURN (TRUE);
                  END_IF;
                ELSE
                  IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE'
                     IN TYPEOF(cv) THEN
                    IF SIZEOF(cv\polyline.points) >= 3 THEN
                      RETURN (TRUE);
                    END_IF;
                  END_IF;
                END_IF;
              END_IF;
            END_IF;
          END_IF;
        END_IF;
      END_IF;
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-508: aic_non_manifold_surface

FUNCTION nmsf_surface_check (
    surf : surface 
    ) : BOOLEAN;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ELEMENTARY_SURFACE' IN 
      TYPEOF(surf) THEN
      RETURN (TRUE);
    ELSE
      IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SWEPT_SURFACE' IN 
        TYPEOF(surf) THEN
        RETURN (nmsf_curve_check(surf\swept_surface.swept_curve));
      ELSE
        IF ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OFFSET_SURFACE' IN
           TYPEOF(surf)) AND (surf\offset_surface.self_intersect = FALSE) 
          OR (surf\offset_surface.self_intersect = UNKNOWN) THEN
          RETURN (nmsf_surface_check(surf\offset_surface.basis_surface));
        ELSE
          IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SURFACE_REPLICA' 
            IN TYPEOF(surf) THEN
            RETURN (nmsf_surface_check(surf\surface_replica.parent_surface)
              );
          ELSE
            IF (
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_SURFACE'
               IN TYPEOF(surf)) AND (surf\b_spline_surface.self_intersect =
               FALSE) OR (surf\b_spline_surface.self_intersect = UNKNOWN) 
              THEN
              RETURN (TRUE);
            END_IF;
          END_IF;
        END_IF;
      END_IF;
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-508: aic_non_manifold_surface

FUNCTION no_cyclic_domain_reference (
    ref  : maths_space_or_function;
    used : SET OF maths_function 
    ) : BOOLEAN;
  LOCAL
    typenames : SET OF STRING := TYPEOF(ref);
    func : maths_function;
  END_LOCAL;
    IF NOT EXISTS(ref) OR NOT EXISTS(used) THEN
      RETURN (FALSE);
    END_IF;
    IF schema_prefix + 'MATHS_SPACE' IN typenames THEN
      RETURN (TRUE);
    END_IF;
    func := ref;
    IF func IN used THEN
      RETURN (FALSE);
    END_IF;
    IF schema_prefix + 'CONSTANT_FUNCTION' IN typenames THEN
      RETURN (no_cyclic_domain_reference(func\constant_function.
        source_of_domain, used + [ func ]));
    END_IF;
    IF schema_prefix + 'SELECTOR_FUNCTION' IN typenames THEN
      RETURN (no_cyclic_domain_reference(func\selector_function.
        source_of_domain, used + [ func ]));
    END_IF;
    IF schema_prefix + 'PARALLEL_COMPOSED_FUNCTION' IN typenames THEN
      RETURN (no_cyclic_domain_reference(func\parallel_composed_function.
        source_of_domain, used + [ func ]));
    END_IF;
    RETURN (TRUE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION no_cyclic_space_reference (
    spc  : maths_space;
    refs : SET OF maths_space 
    ) : BOOLEAN;
  LOCAL
    types : SET OF STRING;
    refs_plus : SET OF maths_space;
  END_LOCAL;
    IF spc IN refs THEN
      RETURN (FALSE);
    END_IF;
    types := TYPEOF(spc);
    refs_plus := refs + spc;
    IF schema_prefix + 'FINITE_SPACE' IN types THEN
      RETURN (bool(SIZEOF(QUERY (sp <* QUERY (mem <* spc\finite_space.
        members| (schema_prefix + 'MATHS_SPACE' IN TYPEOF(mem)))| NOT 
        no_cyclic_space_reference(sp, refs_plus))) = 0));
    END_IF;
    IF schema_prefix + 'UNIFORM_PRODUCT_SPACE' IN types THEN
      RETURN (no_cyclic_space_reference(spc\uniform_product_space.base, 
        refs_plus));
    END_IF;
    IF schema_prefix + 'LISTED_PRODUCT_SPACE' IN types THEN
      RETURN (bool(SIZEOF(QUERY (fac <* spc\listed_product_space.factors| 
        NOT no_cyclic_space_reference(fac, refs_plus))) = 0));
    END_IF;
    IF schema_prefix + 'EXTENDED_TUPLE_SPACE' IN types THEN
      RETURN (no_cyclic_space_reference(spc\extended_tuple_space.base, 
        refs_plus) AND no_cyclic_space_reference(spc\extended_tuple_space.
        extender, refs_plus));
    END_IF;
    RETURN (TRUE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION nondecreasing (
    lr : LIST OF REAL 
    ) : BOOLEAN;
    IF NOT EXISTS(lr) THEN
      RETURN (FALSE);
    END_IF;
    REPEAT j := 2 TO SIZEOF(lr);
      IF lr[j] < lr[(j - 1)] THEN
        RETURN (FALSE);
      END_IF;
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION normalise (
    arg : vector_or_direction 
    ) : vector_or_direction;
  LOCAL
    ndim : INTEGER;
    v : direction := dummy_gri || direction([ 1.0, 0.0, 0.0 ]);
    result : vector_or_direction;
    vec : vector := dummy_gri || vector(v, 1.0);
    mag : REAL;
  END_LOCAL;
    IF NOT EXISTS(arg) THEN
      result := ?;
    ELSE
      ndim := arg.dim;
      IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VECTOR' IN TYPEOF(arg
        ) THEN
        BEGIN
          v := dummy_gri || direction(arg\vector.orientation.
            direction_ratios);
          IF arg\vector.magnitude = 0.0 THEN
            RETURN (?);
          ELSE
            vec := dummy_gri || vector(v, 1.0);
          END_IF;
        END;
      ELSE
        v := dummy_gri || direction(arg.direction_ratios);
      END_IF;
      mag := 0.0;
      REPEAT i := 1 TO ndim;
        mag := mag + v.direction_ratios[i] * v.direction_ratios[i];
      END_REPEAT;
      IF mag > 0.0 THEN
        mag := SQRT(mag);
        REPEAT i := 1 TO ndim;
          v.direction_ratios[i] := v.direction_ratios[i] / mag;
        END_REPEAT;
        IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VECTOR' IN TYPEOF(
          arg) THEN
          vec.orientation := v;
          result := vec;
        ELSE
          result := v;
        END_IF;
      ELSE
        RETURN (?);
      END_IF;
    END_IF;
    RETURN (result);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION number_superspace_of (
    spc : maths_space 
    ) : elementary_space;
    IF subspace_of_es(spc, es_integers) THEN
      RETURN (the_integers);
    END_IF;
    IF subspace_of_es(spc, es_reals) THEN
      RETURN (the_reals);
    END_IF;
    IF subspace_of_es(spc, es_complex_numbers) THEN
      RETURN (the_complex_numbers);
    END_IF;
    IF subspace_of_es(spc, es_numbers) THEN
      RETURN (the_numbers);
    END_IF;
    RETURN (?);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION number_tuple_subspace_check (
    spc : maths_space 
    ) : LOGICAL;
  LOCAL
    types : SET OF STRING := stripped_typeof(spc);
    factors : LIST OF maths_space;
    cum : LOGICAL := TRUE;
  END_LOCAL;
    IF 'UNIFORM_PRODUCT_SPACE' IN types THEN
      RETURN (subspace_of_es(spc\uniform_product_space.base, es_numbers));
    END_IF;
    IF 'LISTED_PRODUCT_SPACE' IN types THEN
      factors := spc\listed_product_space.factors;
      REPEAT i := 1 TO SIZEOF(factors);
        cum := cum AND subspace_of_es(factors[i], es_numbers);
      END_REPEAT;
      RETURN (cum);
    END_IF;
    IF 'EXTENDED_TUPLE_SPACE' IN types THEN
      cum := subspace_of_es(spc\extended_tuple_space.extender, es_numbers);
      cum := cum AND number_tuple_subspace_check(spc\extended_tuple_space.
        base);
      RETURN (cum);
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION one_tuples_of (
    spc : maths_space 
    ) : tuple_space;
    RETURN (make_uniform_product_space(spc, 1));
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION open_shell_reversed (
    a_shell : open_shell 
    ) : oriented_open_shell;
  LOCAL
    the_reverse : oriented_open_shell;
  END_LOCAL;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORIENTED_OPEN_SHELL' IN
       TYPEOF(a_shell) THEN
      the_reverse := dummy_tri || connected_face_set(a_shell\
        connected_face_set.cfs_faces) || open_shell() || 
        oriented_open_shell(a_shell\oriented_open_shell.open_shell_element,
         NOT a_shell\oriented_open_shell.orientation);
    ELSE
      the_reverse := dummy_tri || connected_face_set(a_shell\
        connected_face_set.cfs_faces) || open_shell() || 
        oriented_open_shell(a_shell, FALSE);
    END_IF;
    RETURN (the_reverse);
END_FUNCTION; -- 10303-42: topology_schema

FUNCTION orthogonal_complement (
    vec : direction 
    ) : direction;
  LOCAL
    result : direction;
  END_LOCAL;
    IF (vec.dim <> 2) OR NOT EXISTS(vec) THEN
      RETURN (?);
    ELSE
      result := dummy_gri || direction([ -vec.direction_ratios[2], vec.
        direction_ratios[1] ]);
      RETURN (result);
    END_IF;
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION parallel_composed_function_composability_check (
    funcs : LIST OF maths_function;
    final : maths_function_select 
    ) : BOOLEAN;
  LOCAL
    tplsp : tuple_space := the_zero_tuple_space;
    finfun : maths_function := convert_to_maths_function(final);
  END_LOCAL;
    REPEAT i := 1 TO SIZEOF(funcs);
      tplsp := assoc_product_space(tplsp, funcs[i].range);
    END_REPEAT;
    RETURN (compatible_spaces(tplsp, finfun.domain));
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION parallel_composed_function_domain_check (
    comdom : tuple_space;
    funcs  : LIST OF maths_function 
    ) : BOOLEAN;
    REPEAT i := 1 TO SIZEOF(funcs);
      IF NOT compatible_spaces(comdom, funcs[i].domain) THEN
        RETURN (FALSE);
      END_IF;
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION parse_express_identifier (
    s : STRING;
    i : positive_integer 
    ) : positive_integer;
  LOCAL
    k : positive_integer;
  END_LOCAL;
    k := i;
    IF i <= LENGTH(s) THEN
      IF s[i] LIKE '@' THEN
        REPEAT UNTIL (k > LENGTH(s)) OR ((s[k] <> '_') AND NOT (s[k] LIKE 
          '@')) AND NOT (s[k] LIKE '#');
          k := k + 1;
        END_REPEAT;
      END_IF;
    END_IF;
    RETURN (k);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION partial_derivative_check (
    domain : tuple_space;
    d_vars : LIST [1:?] OF input_selector 
    ) : BOOLEAN;
  LOCAL
    domn : tuple_space := domain;
    fspc : maths_space;
    dim : INTEGER;
    k : INTEGER;
  END_LOCAL;
    IF (space_dimension(domain) = 1) AND (schema_prefix + 'TUPLE_SPACE' IN 
      TYPEOF(factor1(domain))) THEN
      domn := factor1(domain);
    END_IF;
    dim := space_dimension(domn);
    REPEAT i := 1 TO SIZEOF(d_vars);
      k := d_vars[i];
      IF k > dim THEN
        RETURN (FALSE);
      END_IF;
      fspc := factor_space(domn, k);
      IF NOT subspace_of_es(fspc, es_reals) AND NOT subspace_of_es(fspc, 
        es_complex_numbers) THEN
        RETURN (FALSE);
      END_IF;
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION path_head_to_tail (
    a_path : path 
    ) : LOGICAL;
  LOCAL
    n : INTEGER;
    p : LOGICAL := TRUE;
  END_LOCAL;
    n := SIZEOF(a_path.edge_list);
    REPEAT i := 2 TO n;
      p := p AND (a_path.edge_list[(i - 1)].edge_end :=: a_path.edge_list[i
        ].edge_start);
    END_REPEAT;
    RETURN (p);
END_FUNCTION; -- 10303-42: topology_schema

FUNCTION path_reversed (
    a_path : path 
    ) : oriented_path;
  LOCAL
    the_reverse : oriented_path;
  END_LOCAL;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ORIENTED_PATH' IN 
      TYPEOF(a_path) THEN
      the_reverse := dummy_tri || path(list_of_topology_reversed(a_path.
        edge_list)) || oriented_path(a_path\oriented_path.path_element, NOT
         a_path\oriented_path.orientation);
    ELSE
      the_reverse := dummy_tri || path(list_of_topology_reversed(a_path.
        edge_list)) || oriented_path(a_path, FALSE);
    END_IF;
    RETURN (the_reverse);
END_FUNCTION; -- 10303-42: topology_schema

FUNCTION plane_angle_for_pair_in_radian (
    pair  : kinematic_pair;
    angle : plane_angle_measure 
    ) : plane_angle_measure;
  LOCAL
    converted_angle : plane_angle_measure := angle;
    link_rep : kinematic_link_representation := representation_of_link(pair
      .joint.edge_start);
    link_cntxt : representation_context;
    pa_units : SET OF unit := [];
    pau : unit;
  END_LOCAL;
    link_cntxt := link_rep\representation.context_of_items;
    IF NOT (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GLOBAL_UNIT_ASSIGNED_CONTEXT'
       IN TYPEOF(link_cntxt)) THEN
      RETURN (?);
    END_IF;
    pa_units := QUERY (unit <* link_cntxt\global_unit_assigned_context.
      units| 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_UNIT'
       IN TYPEOF(unit));
    IF SIZEOF(pa_units) <> 1 THEN
      RETURN (?);
    END_IF;
    pau := pa_units[1];
    IF NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SI_UNIT' IN TYPEOF
      (pau)) AND NOT (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONVERSION_BASED_UNIT' 
      IN TYPEOF(pau)) THEN
      RETURN (?);
    END_IF;
    REPEAT WHILE 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONVERSION_BASED_UNIT' 
      IN TYPEOF(pau);
      converted_angle := converted_angle * pau\conversion_based_unit.
        conversion_factor.value_component;
      pau := pau\conversion_based_unit.conversion_factor.unit_component;
      IF NOT ('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SI_UNIT' IN 
        TYPEOF(pau)) AND NOT (
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONVERSION_BASED_UNIT'
         IN TYPEOF(pau)) OR NOT (
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_UNIT' IN 
        TYPEOF(pau)) THEN
        RETURN (?);
      END_IF;
    END_REPEAT;
    IF pau\si_unit.name <> si_unit_name.radian THEN
      RETURN (?);
    END_IF;
    CASE pau\si_unit.prefix OF
      si_prefix.exa :
          RETURN (1.0E+018 * converted_angle);
      si_prefix.peta :
          RETURN (1.0E+015 * converted_angle);
      si_prefix.tera :
          RETURN (1.0E+012 * converted_angle);
      si_prefix.giga :
          RETURN (1.0E+009 * converted_angle);
      si_prefix.mega :
          RETURN (1.0E+006 * converted_angle);
      si_prefix.kilo :
          RETURN (1000.00 * converted_angle);
      si_prefix.hecto :
          RETURN (100.000 * converted_angle);
      si_prefix.deca :
          RETURN (10.0 * converted_angle);
      si_prefix.deci :
          RETURN (0.100000 * converted_angle);
      si_prefix.centi :
          RETURN (0.0100000 * converted_angle);
      si_prefix.milli :
          RETURN (0.00100000 * converted_angle);
      si_prefix.micro :
          RETURN (1.0E-006 * converted_angle);
      si_prefix.nano :
          RETURN (1.0E-009 * converted_angle);
      si_prefix.pico :
          RETURN (1.0E-012 * converted_angle);
      si_prefix.femto :
          RETURN (1.0E-015 * converted_angle);
      si_prefix.atto :
          RETURN (1.0E-018 * converted_angle);
    OTHERWISE :
        RETURN (converted_angle);
    END_CASE;
END_FUNCTION; -- 10303-105: kinematic_structure_schema

FUNCTION real_max (
    spc : maths_space 
    ) : REAL;
  LOCAL
    types : SET OF STRING := TYPEOF(spc);
  END_LOCAL;
    IF schema_prefix + 'FINITE_INTEGER_INTERVAL' IN types THEN
      RETURN (spc\finite_integer_interval.max);
    END_IF;
    IF schema_prefix + 'INTEGER_INTERVAL_TO_MAX' IN types THEN
      RETURN (spc\integer_interval_to_max.max);
    END_IF;
    IF schema_prefix + 'FINITE_REAL_INTERVAL' IN types THEN
      RETURN (spc\finite_real_interval.max);
    END_IF;
    IF schema_prefix + 'REAL_INTERVAL_TO_MAX' IN types THEN
      RETURN (spc\real_interval_to_max.max);
    END_IF;
    RETURN (?);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION real_min (
    spc : maths_space 
    ) : REAL;
  LOCAL
    types : SET OF STRING := TYPEOF(spc);
  END_LOCAL;
    IF schema_prefix + 'FINITE_INTEGER_INTERVAL' IN types THEN
      RETURN (spc\finite_integer_interval.min);
    END_IF;
    IF schema_prefix + 'INTEGER_INTERVAL_FROM_MIN' IN types THEN
      RETURN (spc\integer_interval_from_min.min);
    END_IF;
    IF schema_prefix + 'FINITE_REAL_INTERVAL' IN types THEN
      RETURN (spc\finite_real_interval.min);
    END_IF;
    IF schema_prefix + 'REAL_INTERVAL_FROM_MIN' IN types THEN
      RETURN (spc\real_interval_from_min.min);
    END_IF;
    RETURN (?);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION regular_indexing (
    sub   : LIST OF INTEGER;
    base  : zero_or_one;
    shape : LIST [1:?] OF positive_integer;
    inc   : LIST [1:?] OF INTEGER;
    first : INTEGER 
    ) : INTEGER;
  LOCAL
    k : INTEGER;
    index : INTEGER;
  END_LOCAL;
    IF (((NOT EXISTS(sub) OR NOT EXISTS(base)) OR NOT EXISTS(shape)) OR NOT
       EXISTS(inc)) OR NOT EXISTS(first) THEN
      RETURN (?);
    END_IF;
    IF (SIZEOF(sub) <> SIZEOF(inc)) OR (SIZEOF(sub) <> SIZEOF(shape)) THEN
      RETURN (?);
    END_IF;
    index := first;
    REPEAT j := 1 TO SIZEOF(sub);
      IF NOT EXISTS(sub[j]) OR NOT EXISTS(inc[j]) THEN
        RETURN (?);
      END_IF;
      k := sub[j] - base;
      IF NOT ((0 <= k) AND (k < shape[j])) THEN
        RETURN (?);
      END_IF;
      index := index + k * inc[j];
    END_REPEAT;
    RETURN (index);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION remove_first (
    alist : LIST OF GENERIC : GEN 
    ) : LIST OF GENERIC : GEN;
  LOCAL
    blist : LIST OF GENERIC : GEN := alist;
  END_LOCAL;
    IF SIZEOF(blist) > 0 THEN
      REMOVE( blist, 1 );
    END_IF;
    RETURN (blist);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION repackage (
    tspace : tuple_space;
    repckg : repackage_options 
    ) : tuple_space;
    CASE repckg OF
      ro_nochange :
          RETURN (tspace);
      ro_wrap_as_tuple :
          RETURN (one_tuples_of(tspace));
      ro_unwrap_tuple :
          RETURN (factor1(tspace));
    OTHERWISE :
        RETURN (?);
    END_CASE;
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION representation_of_link (
    link : kinematic_link 
    ) : kinematic_link_representation;
    RETURN (?);
END_FUNCTION; -- 10303-105: kinematic_structure_schema

FUNCTION same_side (
    plane_pts   : LIST [3:3] OF cartesian_point;
    test_points : LIST [2:?] OF cartesian_point 
    ) : BOOLEAN;
  LOCAL
    val1 : REAL;
    val2 : REAL;
    n : INTEGER;
  END_LOCAL;
    IF (plane_pts[1].dim = 2) OR (test_points[1].dim = 2) THEN
      RETURN (?);
    END_IF;
    n := SIZEOF(test_points);
    val1 := above_plane(plane_pts[1], plane_pts[2], plane_pts[3], 
      test_points[1]);
    REPEAT i := 2 TO n;
      val2 := above_plane(plane_pts[1], plane_pts[2], plane_pts[3], 
        test_points[i]);
      IF val1 * val2 <= 0.0 THEN
        RETURN (FALSE);
      END_IF;
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION scalar_times_vector (
    scalar : REAL;
    vec    : vector_or_direction 
    ) : vector;
  LOCAL
    v : direction;
    mag : REAL;
    result : vector;
  END_LOCAL;
    IF NOT EXISTS(scalar) OR NOT EXISTS(vec) THEN
      RETURN (?);
    ELSE
      IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VECTOR' IN TYPEOF(vec
        ) THEN
        v := dummy_gri || direction(vec\vector.orientation.direction_ratios
          );
        mag := scalar * vec\vector.magnitude;
      ELSE
        v := dummy_gri || direction(vec.direction_ratios);
        mag := scalar;
      END_IF;
      IF mag < 0.0 THEN
        REPEAT i := 1 TO SIZEOF(v.direction_ratios);
          v.direction_ratios[i] := -v.direction_ratios[i];
        END_REPEAT;
        mag := -mag;
      END_IF;
      result := dummy_gri || vector(normalise(v), mag);
    END_IF;
    RETURN (result);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION second_proj_axis (
    z_axis : direction;
    x_axis : direction;
    arg    : direction 
    ) : direction;
  LOCAL
    y_axis : vector;
    v : direction;
    temp : vector;
  END_LOCAL;
    IF NOT EXISTS(arg) THEN
      v := dummy_gri || direction([ 0.0, 1.0, 0.0 ]);
    ELSE
      v := arg;
    END_IF;
    temp := scalar_times_vector(dot_product(v, z_axis), z_axis);
    y_axis := vector_difference(v, temp);
    temp := scalar_times_vector(dot_product(v, x_axis), x_axis);
    y_axis := vector_difference(y_axis, temp);
    y_axis := normalise(y_axis);
    RETURN (y_axis.orientation);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION set_of_topology_reversed (
    a_set : set_of_reversible_topology_item 
    ) : set_of_reversible_topology_item;
  LOCAL
    the_reverse : set_of_reversible_topology_item;
  END_LOCAL;
    the_reverse := [];
    REPEAT i := 1 TO SIZEOF(a_set);
      the_reverse := the_reverse + topology_reversed(a_set[i]);
    END_REPEAT;
    RETURN (the_reverse);
END_FUNCTION; -- 10303-42: topology_schema

FUNCTION shape_of_array (
    func : maths_function 
    ) : LIST OF positive_integer;
  LOCAL
    tspace : tuple_space;
    temp : maths_space;
    result : LIST OF positive_integer := [];
  END_LOCAL;
    IF schema_prefix + 'EXPLICIT_TABLE_FUNCTION' IN TYPEOF(func) THEN
      RETURN (func\explicit_table_function.shape);
    END_IF;
    tspace := func.domain;
    IF (space_dimension(tspace) = 1) AND (schema_prefix + 'TUPLE_SPACE' IN 
      TYPEOF(factor1(tspace))) THEN
      tspace := factor1(tspace);
    END_IF;
    REPEAT i := 1 TO space_dimension(tspace);
      temp := factor_space(tspace, i);
      IF NOT (schema_prefix + 'FINITE_INTEGER_INTERVAL' IN TYPEOF(temp)) 
        THEN
        RETURN (?);
      END_IF;
      INSERT( result, temp\finite_integer_interval.size, i - 1 );
    END_REPEAT;
    RETURN (result);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION shell_reversed (
    a_shell : shell 
    ) : shell;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OPEN_SHELL' IN TYPEOF(
      a_shell) THEN
      RETURN (open_shell_reversed(a_shell));
    ELSE
      IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CLOSED_SHELL' IN 
        TYPEOF(a_shell) THEN
        RETURN (closed_shell_reversed(a_shell));
      ELSE
        RETURN (?);
      END_IF;
    END_IF;
END_FUNCTION; -- 10303-42: topology_schema

FUNCTION simplify_function_application (
    expr : function_application 
    ) : maths_value;
    FUNCTION ctmv
      (x : GENERIC : G ) : maths_value;
      RETURN (convert_to_maths_value(x));
    END_FUNCTION;
    PROCEDURE parts
      (c : complex_number_literal;
       VAR x : REAL;
       VAR y : REAL );
      x := c.real_part;
      y := c.imag_part;
    END_PROCEDURE;
    FUNCTION makec
      (x : REAL;
       y : REAL ) : complex_number_literal;
      RETURN (make_complex_number_literal(x, y));
    END_FUNCTION;
    FUNCTION good_t
      (v : maths_value;
       tn : STRING ) : BOOLEAN;
    LOCAL
      tpl : LIST OF maths_value;
    END_LOCAL;
      IF 'LIST' IN TYPEOF(v) THEN
        tpl := v;
        REPEAT i := 1 TO SIZEOF(tpl);
          IF NOT (tn IN TYPEOF(tpl[i])) THEN
            RETURN (FALSE);
          END_IF;
        END_REPEAT;
        RETURN (TRUE);
      END_IF;
      RETURN (FALSE);
    END_FUNCTION;
  CONSTANT
    cnlit : STRING := schema_prefix + 'COMPLEX_NUMBER_LITERAL';
  END_CONSTANT;
  LOCAL
    types : SET OF STRING := stripped_typeof(expr.func);
    ef_val : elementary_function_enumerators;
    is_elementary : BOOLEAN := FALSE;
    v : maths_value;
    v1 : maths_value;
    v2 : maths_value;
    v3 : maths_value;
    vlist : LIST OF maths_value := [];
    gexpr : generic_expression;
    pairs : SET [1:?] OF LIST [2:2] OF maths_value;
    boo : BOOLEAN;
    lgc : LOGICAL;
    cum : LOGICAL;
    j : INTEGER;
    k : INTEGER;
    n : INTEGER;
    p : REAL;
    q : REAL;
    r : REAL;
    s : REAL;
    T : REAL;
    u : REAL;
    str : STRING;
    st2 : STRING;
    bin : BINARY;
    bi2 : BINARY;
    tpl : LIST OF maths_value;
    tp2 : LIST OF maths_value;
    mem : SET OF maths_value := [];
  END_LOCAL;
    REPEAT i := 1 TO SIZEOF(expr.arguments);
      v := simplify_maths_value(expr.arguments[i]);
      INSERT( vlist, v, i - 1 );
    END_REPEAT;
    IF SIZEOF(vlist) >= 1 THEN
      v1 := vlist[1];
    END_IF;
    IF SIZEOF(vlist) >= 2 THEN
      v2 := vlist[2];
    END_IF;
    IF SIZEOF(vlist) >= 3 THEN
      v3 := vlist[3];
    END_IF;
    IF 'ELEMENTARY_FUNCTION_ENUMERATORS' IN types THEN
      ef_val := expr.func;
      is_elementary := TRUE;
    END_IF;
    IF 'ELEMENTARY_FUNCTION' IN types THEN
      ef_val := expr.func\elementary_function.func_id;
      is_elementary := TRUE;
    END_IF;
    IF is_elementary THEN
      CASE ef_val OF
        ef_and :
            BEGIN
              cum := TRUE;
              REPEAT i := SIZEOF(vlist) TO 1 BY -1;
                IF 'LOGICAL' IN TYPEOF(vlist[i]) THEN
                  lgc := vlist[i];
                  cum := cum AND lgc;
                  IF lgc = FALSE THEN
                    RETURN (ctmv(FALSE));
                  END_IF;
                  REMOVE( vlist, i );
                END_IF;
              END_REPEAT;
              IF SIZEOF(vlist) = 0 THEN
                RETURN (ctmv(cum));
              END_IF;
              IF cum <> TRUE THEN
                INSERT( vlist, ctmv(cum), 0 );
              END_IF;
              IF SIZEOF(vlist) = 1 THEN
                RETURN (vlist[1]);
              END_IF;
            END;
        ef_or :
            BEGIN
              cum := FALSE;
              REPEAT i := SIZEOF(vlist) TO 1 BY -1;
                IF 'LOGICAL' IN TYPEOF(vlist[i]) THEN
                  lgc := vlist[i];
                  cum := cum OR lgc;
                  IF lgc = TRUE THEN
                    RETURN (ctmv(TRUE));
                  END_IF;
                  REMOVE( vlist, i );
                END_IF;
              END_REPEAT;
              IF SIZEOF(vlist) = 0 THEN
                RETURN (ctmv(cum));
              END_IF;
              IF cum <> FALSE THEN
                INSERT( vlist, ctmv(cum), 0 );
              END_IF;
              IF SIZEOF(vlist) = 1 THEN
                RETURN (vlist[1]);
              END_IF;
            END;
        ef_not :
            IF 'LOGICAL' IN TYPEOF(v1) THEN
              lgc := v1;
              RETURN (ctmv(NOT lgc));
            END_IF;
        ef_xor :
            BEGIN
              IF 'LOGICAL' IN TYPEOF(v1) THEN
                lgc := v1;
                IF 'LOGICAL' IN TYPEOF(v2) THEN
                  cum := v2;
                  RETURN (ctmv(lgc XOR cum));
                ELSE
                  IF lgc = FALSE THEN
                    RETURN (ctmv(v2));
                  ELSE
                    IF lgc = UNKNOWN THEN
                      RETURN (ctmv(UNKNOWN));
                    ELSE
                      RETURN (make_function_application(ef_not, [ v2 ]));
                    END_IF;
                  END_IF;
                END_IF;
              ELSE
                IF 'LOGICAL' IN TYPEOF(v2) THEN
                  lgc := v2;
                  IF lgc = FALSE THEN
                    RETURN (ctmv(v1));
                  ELSE
                    IF lgc = UNKNOWN THEN
                      RETURN (ctmv(UNKNOWN));
                    ELSE
                      RETURN (make_function_application(ef_not, [ v1 ]));
                    END_IF;
                  END_IF;
                END_IF;
              END_IF;
            END;
        ef_negate_i :
            IF 'INTEGER' IN TYPEOF(v1) THEN
              j := v1;
              RETURN (ctmv(-j));
            END_IF;
        ef_add_i :
            BEGIN
              j := 0;
              REPEAT i := SIZEOF(vlist) TO 1 BY -1;
                IF 'INTEGER' IN TYPEOF(vlist[i]) THEN
                  k := vlist[i];
                  j := j + k;
                  REMOVE( vlist, i );
                END_IF;
              END_REPEAT;
              IF SIZEOF(vlist) = 0 THEN
                RETURN (ctmv(j));
              END_IF;
              IF j <> 0 THEN
                INSERT( vlist, ctmv(j), 0 );
              END_IF;
              IF SIZEOF(vlist) = 1 THEN
                RETURN (vlist[1]);
              END_IF;
            END;
        ef_subtract_i :
            IF ('INTEGER' IN TYPEOF(v1)) AND ('INTEGER' IN TYPEOF(v2)) THEN
              j := v1;
              k := v2;
              RETURN (ctmv(j - k));
            END_IF;
        ef_multiply_i :
            BEGIN
              j := 1;
              REPEAT i := SIZEOF(vlist) TO 1 BY -1;
                IF 'INTEGER' IN TYPEOF(vlist[i]) THEN
                  k := vlist[i];
                  j := j * k;
                  REMOVE( vlist, i );
                END_IF;
              END_REPEAT;
              IF SIZEOF(vlist) = 0 THEN
                RETURN (ctmv(j));
              END_IF;
              IF j <> 1 THEN
                INSERT( vlist, ctmv(j), 0 );
              END_IF;
              IF SIZEOF(vlist) = 1 THEN
                RETURN (vlist[1]);
              END_IF;
            END;
        ef_divide_i :
            IF ('INTEGER' IN TYPEOF(v1)) AND ('INTEGER' IN TYPEOF(v2)) THEN
              j := v1;
              k := v2;
              RETURN (ctmv(j DIV k));
            END_IF;
        ef_mod_i :
            IF ('INTEGER' IN TYPEOF(v1)) AND ('INTEGER' IN TYPEOF(v2)) THEN
              j := v1;
              k := v2;
              RETURN (ctmv(j MOD k));
            END_IF;
        ef_exponentiate_i :
            IF ('INTEGER' IN TYPEOF(v1)) AND ('INTEGER' IN TYPEOF(v2)) THEN
              j := v1;
              k := v2;
              n := 1;
              REPEAT i := 1 TO ABS(k);
                n := n * j;
              END_REPEAT;
              IF k < 0 THEN
                n := 1 DIV n;
              END_IF;
              RETURN (ctmv(n));
            END_IF;
        ef_eq_i :
            IF ('INTEGER' IN TYPEOF(v1)) AND ('INTEGER' IN TYPEOF(v2)) THEN
              j := v1;
              k := v2;
              RETURN (ctmv(j = k));
            END_IF;
        ef_ne_i :
            IF ('INTEGER' IN TYPEOF(v1)) AND ('INTEGER' IN TYPEOF(v2)) THEN
              j := v1;
              k := v2;
              RETURN (ctmv(j <> k));
            END_IF;
        ef_gt_i :
            IF ('INTEGER' IN TYPEOF(v1)) AND ('INTEGER' IN TYPEOF(v2)) THEN
              j := v1;
              k := v2;
              RETURN (ctmv(j > k));
            END_IF;
        ef_lt_i :
            IF ('INTEGER' IN TYPEOF(v1)) AND ('INTEGER' IN TYPEOF(v2)) THEN
              j := v1;
              k := v2;
              RETURN (ctmv(j < k));
            END_IF;
        ef_ge_i :
            IF ('INTEGER' IN TYPEOF(v1)) AND ('INTEGER' IN TYPEOF(v2)) THEN
              j := v1;
              k := v2;
              RETURN (ctmv(j >= k));
            END_IF;
        ef_le_i :
            IF ('INTEGER' IN TYPEOF(v1)) AND ('INTEGER' IN TYPEOF(v2)) THEN
              j := v1;
              k := v2;
              RETURN (ctmv(j <= k));
            END_IF;
        ef_abs_i :
            IF 'INTEGER' IN TYPEOF(v1) THEN
              j := v1;
              RETURN (ctmv(ABS(j)));
            END_IF;
        ef_max_i :
            BEGIN
              boo := FALSE;
              REPEAT i := SIZEOF(vlist) TO 1 BY -1;
                IF 'INTEGER' IN TYPEOF(vlist[i]) THEN
                  IF boo THEN
                    k := vlist[i];
                    IF k > j THEN
                      j := k;
                    END_IF;
                  ELSE
                    j := vlist[i];
                    boo := TRUE;
                  END_IF;
                  REMOVE( vlist, i );
                END_IF;
              END_REPEAT;
              IF SIZEOF(vlist) = 0 THEN
                RETURN (ctmv(j));
              END_IF;
              IF boo THEN
                INSERT( vlist, ctmv(j), 0 );
              END_IF;
              IF SIZEOF(vlist) = 1 THEN
                RETURN (vlist[1]);
              END_IF;
            END;
        ef_min_i :
            BEGIN
              boo := FALSE;
              REPEAT i := SIZEOF(vlist) TO 1 BY -1;
                IF 'INTEGER' IN TYPEOF(vlist[i]) THEN
                  IF boo THEN
                    k := vlist[i];
                    IF k < j THEN
                      j := k;
                    END_IF;
                  ELSE
                    j := vlist[i];
                    boo := TRUE;
                  END_IF;
                  REMOVE( vlist, i );
                END_IF;
              END_REPEAT;
              IF SIZEOF(vlist) = 0 THEN
                RETURN (ctmv(j));
              END_IF;
              IF boo THEN
                INSERT( vlist, ctmv(j), 0 );
              END_IF;
              IF SIZEOF(vlist) = 1 THEN
                RETURN (vlist[1]);
              END_IF;
            END;
        ef_negate_r :
            IF 'REAL' IN TYPEOF(v1) THEN
              r := v1;
              RETURN (ctmv(-r));
            END_IF;
        ef_reciprocal_r :
            IF 'REAL' IN TYPEOF(v1) THEN
              r := v1;
              RETURN (ctmv(1.0 / r));
            END_IF;
        ef_add_r :
            BEGIN
              r := 0.0;
              REPEAT i := SIZEOF(vlist) TO 1 BY -1;
                IF 'REAL' IN TYPEOF(vlist[i]) THEN
                  s := vlist[i];
                  r := r + s;
                  REMOVE( vlist, i );
                END_IF;
              END_REPEAT;
              IF SIZEOF(vlist) = 0 THEN
                RETURN (ctmv(r));
              END_IF;
              IF r <> 0.0 THEN
                INSERT( vlist, ctmv(r), 0 );
              END_IF;
              IF SIZEOF(vlist) = 1 THEN
                RETURN (vlist[1]);
              END_IF;
            END;
        ef_subtract_r :
            IF ('REAL' IN TYPEOF(v1)) AND ('REAL' IN TYPEOF(v2)) THEN
              r := v1;
              s := v2;
              RETURN (ctmv(r - s));
            END_IF;
        ef_multiply_r :
            BEGIN
              r := 1.0;
              REPEAT i := SIZEOF(vlist) TO 1 BY -1;
                IF 'REAL' IN TYPEOF(vlist[i]) THEN
                  s := vlist[i];
                  r := r * s;
                  REMOVE( vlist, i );
                END_IF;
              END_REPEAT;
              IF SIZEOF(vlist) = 0 THEN
                RETURN (ctmv(r));
              END_IF;
              IF r <> 1.0 THEN
                INSERT( vlist, ctmv(r), 0 );
              END_IF;
              IF SIZEOF(vlist) = 1 THEN
                RETURN (vlist[1]);
              END_IF;
            END;
        ef_divide_r :
            IF ('REAL' IN TYPEOF(v1)) AND ('REAL' IN TYPEOF(v2)) THEN
              r := v1;
              s := v2;
              RETURN (ctmv(r / s));
            END_IF;
        ef_mod_r :
            IF ('REAL' IN TYPEOF(v1)) AND ('REAL' IN TYPEOF(v2)) THEN
              r := v1;
              s := v2;
              T := r / s;
              j := T DIV 1;
              IF (T < 0.0) AND (j <> T) THEN
                j := j - 1;
              END_IF;
              RETURN (ctmv(r - j * s));
            END_IF;
        ef_exponentiate_r :
            IF ('REAL' IN TYPEOF(v1)) AND ('REAL' IN TYPEOF(v2)) THEN
              r := v1;
              s := v2;
              RETURN (ctmv(r ** s));
            END_IF;
        ef_exponentiate_ri :
            IF ('REAL' IN TYPEOF(v1)) AND ('INTEGER' IN TYPEOF(v2)) THEN
              r := v1;
              k := v2;
              T := 1.0;
              REPEAT i := 1 TO ABS(k);
                T := T * r;
              END_REPEAT;
              IF k < 0 THEN
                T := 1.0 / T;
              END_IF;
              RETURN (ctmv(T));
            END_IF;
        ef_eq_r :
            IF ('REAL' IN TYPEOF(v1)) AND ('REAL' IN TYPEOF(v2)) THEN
              r := v1;
              s := v2;
              RETURN (ctmv(r = s));
            END_IF;
        ef_ne_r :
            IF ('REAL' IN TYPEOF(v1)) AND ('REAL' IN TYPEOF(v2)) THEN
              r := v1;
              s := v2;
              RETURN (ctmv(r <> s));
            END_IF;
        ef_gt_r :
            IF ('REAL' IN TYPEOF(v1)) AND ('REAL' IN TYPEOF(v2)) THEN
              r := v1;
              s := v2;
              RETURN (ctmv(r > s));
            END_IF;
        ef_lt_r :
            IF ('REAL' IN TYPEOF(v1)) AND ('REAL' IN TYPEOF(v2)) THEN
              r := v1;
              s := v2;
              RETURN (ctmv(r < s));
            END_IF;
        ef_ge_r :
            IF ('REAL' IN TYPEOF(v1)) AND ('REAL' IN TYPEOF(v2)) THEN
              r := v1;
              s := v2;
              RETURN (ctmv(r >= s));
            END_IF;
        ef_le_r :
            IF ('REAL' IN TYPEOF(v1)) AND ('REAL' IN TYPEOF(v2)) THEN
              r := v1;
              s := v2;
              RETURN (ctmv(r <= s));
            END_IF;
        ef_abs_r :
            IF 'REAL' IN TYPEOF(v1) THEN
              r := v1;
              RETURN (ctmv(ABS(r)));
            END_IF;
        ef_max_r :
            BEGIN
              boo := FALSE;
              REPEAT i := SIZEOF(vlist) TO 1 BY -1;
                IF 'REAL' IN TYPEOF(vlist[i]) THEN
                  IF boo THEN
                    s := vlist[i];
                    IF s > r THEN
                      r := s;
                    END_IF;
                  ELSE
                    r := vlist[i];
                    boo := TRUE;
                  END_IF;
                  REMOVE( vlist, i );
                END_IF;
              END_REPEAT;
              IF SIZEOF(vlist) = 0 THEN
                RETURN (ctmv(r));
              END_IF;
              IF boo THEN
                INSERT( vlist, ctmv(r), 0 );
              END_IF;
              IF SIZEOF(vlist) = 1 THEN
                RETURN (vlist[1]);
              END_IF;
            END;
        ef_min_r :
            BEGIN
              boo := FALSE;
              REPEAT i := SIZEOF(vlist) TO 1 BY -1;
                IF 'REAL' IN TYPEOF(vlist[i]) THEN
                  IF boo THEN
                    s := vlist[i];
                    IF s < r THEN
                      r := s;
                    END_IF;
                  ELSE
                    r := vlist[i];
                    boo := TRUE;
                  END_IF;
                  REMOVE( vlist, i );
                END_IF;
              END_REPEAT;
              IF SIZEOF(vlist) = 0 THEN
                RETURN (ctmv(r));
              END_IF;
              IF boo THEN
                INSERT( vlist, ctmv(r), 0 );
              END_IF;
              IF SIZEOF(vlist) = 1 THEN
                RETURN (vlist[1]);
              END_IF;
            END;
        ef_acos_r :
            IF 'REAL' IN TYPEOF(v1) THEN
              r := v1;
              RETURN (ctmv(ACOS(r)));
            END_IF;
        ef_asin_r :
            IF 'REAL' IN TYPEOF(v1) THEN
              r := v1;
              RETURN (ctmv(ASIN(r)));
            END_IF;
        ef_atan2_r :
            IF ('REAL' IN TYPEOF(v1)) AND ('REAL' IN TYPEOF(v2)) THEN
              r := v1;
              s := v2;
              RETURN (ctmv(atan2(r, s)));
            END_IF;
        ef_cos_r :
            IF 'REAL' IN TYPEOF(v1) THEN
              r := v1;
              RETURN (ctmv(COS(r)));
            END_IF;
        ef_exp_r :
            IF 'REAL' IN TYPEOF(v1) THEN
              r := v1;
              RETURN (ctmv(EXP(r)));
            END_IF;
        ef_ln_r :
            IF 'REAL' IN TYPEOF(v1) THEN
              r := v1;
              RETURN (ctmv(LOG(r)));
            END_IF;
        ef_log2_r :
            IF 'REAL' IN TYPEOF(v1) THEN
              r := v1;
              RETURN (ctmv(LOG2(r)));
            END_IF;
        ef_log10_r :
            IF 'REAL' IN TYPEOF(v1) THEN
              r := v1;
              RETURN (ctmv(LOG10(r)));
            END_IF;
        ef_sin_r :
            IF 'REAL' IN TYPEOF(v1) THEN
              r := v1;
              RETURN (ctmv(SIN(r)));
            END_IF;
        ef_sqrt_r :
            IF 'REAL' IN TYPEOF(v1) THEN
              r := v1;
              RETURN (ctmv(SQRT(r)));
            END_IF;
        ef_tan_r :
            IF 'REAL' IN TYPEOF(v1) THEN
              r := v1;
              RETURN (ctmv(TAN(r)));
            END_IF;
        ef_form_c :
            IF ('REAL' IN TYPEOF(v1)) AND ('REAL' IN TYPEOF(v2)) THEN
              r := v1;
              s := v2;
              RETURN (makec(r, s));
            END_IF;
        ef_rpart_c :
            IF cnlit IN TYPEOF(v1) THEN
              RETURN (ctmv(v1\complex_number_literal.real_part));
            END_IF;
        ef_ipart_c :
            IF cnlit IN TYPEOF(v1) THEN
              RETURN (ctmv(v1\complex_number_literal.imag_part));
            END_IF;
        ef_negate_c :
            IF cnlit IN TYPEOF(v1) THEN
              parts( v1, p, q );
              RETURN (makec(-p, -q));
            END_IF;
        ef_reciprocal_c :
            IF cnlit IN TYPEOF(v1) THEN
              parts( v1, p, q );
              T := p * p + q * q;
              RETURN (makec(p / T, -q / T));
            END_IF;
        ef_add_c :
            BEGIN
              p := 0.0;
              q := 0.0;
              REPEAT i := SIZEOF(vlist) TO 1 BY -1;
                IF cnlit IN TYPEOF(vlist[i]) THEN
                  parts( vlist[i], r, s );
                  p := p + r;
                  q := q + s;
                  REMOVE( vlist, i );
                END_IF;
              END_REPEAT;
              IF SIZEOF(vlist) = 0 THEN
                RETURN (makec(p, q));
              END_IF;
              IF p * p + q * q <> 0.0 THEN
                INSERT( vlist, makec(p, q), 0 );
              END_IF;
              IF SIZEOF(vlist) = 1 THEN
                RETURN (vlist[1]);
              END_IF;
            END;
        ef_subtract_c :
            IF (cnlit IN TYPEOF(v1)) AND (cnlit IN TYPEOF(v2)) THEN
              parts( v1, p, q );
              parts( v2, r, s );
              RETURN (makec(p - r, q - s));
            END_IF;
        ef_multiply_c :
            BEGIN
              p := 1.0;
              q := 0.0;
              REPEAT i := SIZEOF(vlist) TO 1 BY -1;
                IF cnlit IN TYPEOF(vlist[i]) THEN
                  parts( vlist[i], r, s );
                  p := p * r - q * s;
                  q := p * s + q * r;
                  REMOVE( vlist, i );
                END_IF;
              END_REPEAT;
              IF SIZEOF(vlist) = 0 THEN
                RETURN (makec(p, q));
              END_IF;
              IF (p <> 1.0) OR (q <> 0.0) THEN
                INSERT( vlist, makec(p, q), 0 );
              END_IF;
              IF SIZEOF(vlist) = 1 THEN
                RETURN (vlist[1]);
              END_IF;
            END;
        ef_divide_c :
            IF (cnlit IN TYPEOF(v1)) AND (cnlit IN TYPEOF(v2)) THEN
              parts( v1, p, q );
              parts( v2, r, s );
              T := r * r + s * s;
              RETURN (makec((p * r + q * s) / T, (q * r - p * s) / T));
            END_IF;
        ef_exponentiate_c :
            IF (cnlit IN TYPEOF(v1)) AND (cnlit IN TYPEOF(v2)) THEN
              parts( v1, p, q );
              parts( v2, r, s );
              T := 0.5 * LOG((p * p + q * q));
              u := atan2(q, p);
              p := r * T - s * u;
              q := r * u + s * T;
              r := EXP(p);
              RETURN (makec(r * COS(q), r * SIN(q)));
            END_IF;
        ef_exponentiate_ci :
            IF (cnlit IN TYPEOF(v1)) AND ('INTEGER' IN TYPEOF(v2)) THEN
              parts( v1, p, q );
              k := v2;
              r := 1.0;
              s := 0.0;
              REPEAT i := 1 TO ABS(k);
                r := p * r - q * s;
                s := p * s + q * r;
              END_REPEAT;
              IF k < 0 THEN
                T := r * r + s * s;
                r := r / T;
                s := -s / T;
              END_IF;
              RETURN (makec(r, s));
            END_IF;
        ef_eq_c :
            IF (cnlit IN TYPEOF(v1)) AND (cnlit IN TYPEOF(v2)) THEN
              parts( v1, p, q );
              parts( v2, r, s );
              RETURN (ctmv((p = r) AND (q = s)));
            END_IF;
        ef_ne_c :
            IF (cnlit IN TYPEOF(v1)) AND (cnlit IN TYPEOF(v2)) THEN
              parts( v1, p, q );
              parts( v2, r, s );
              RETURN (ctmv((p <> r) OR (q <> s)));
            END_IF;
        ef_conjugate_c :
            IF cnlit IN TYPEOF(v1) THEN
              parts( v1, p, q );
              RETURN (makec(p, -q));
            END_IF;
        ef_abs_c :
            IF cnlit IN TYPEOF(v1) THEN
              parts( v1, p, q );
              RETURN (ctmv(SQRT(p * p + q * q)));
            END_IF;
        ef_arg_c :
            IF cnlit IN TYPEOF(v1) THEN
              parts( v1, p, q );
              RETURN (ctmv(atan2(q, p)));
            END_IF;
        ef_cos_c :
            IF cnlit IN TYPEOF(v1) THEN
              parts( v1, p, q );
              T := 0.5 * EXP(-q);
              u := 0.5 * EXP(q);
              RETURN (makec((T + u) * COS(p), (T - u) * SIN(p)));
            END_IF;
        ef_exp_c :
            IF cnlit IN TYPEOF(v1) THEN
              parts( v1, p, q );
              RETURN (makec(EXP(p) * COS(q), EXP(p) * SIN(q)));
            END_IF;
        ef_ln_c :
            IF cnlit IN TYPEOF(v1) THEN
              parts( v1, p, q );
              RETURN (makec(0.5 * LOG((p * p + q * q)), atan2(q, p)));
            END_IF;
        ef_sin_c :
            IF cnlit IN TYPEOF(v1) THEN
              parts( v1, p, q );
              T := 0.5 * EXP(-q);
              u := 0.5 * EXP(q);
              RETURN (makec((T + u) * SIN(p), (u - T) * COS(p)));
            END_IF;
        ef_sqrt_c :
            IF cnlit IN TYPEOF(v1) THEN
              parts( v1, p, q );
              T := SQRT(SQRT(p * p + q * q));
              u := 0.5 * atan2(q, p);
              RETURN (makec(T * COS(u), T * SIN(u)));
            END_IF;
        ef_tan_c :
            IF cnlit IN TYPEOF(v1) THEN
              parts( v1, p, q );
              T := EXP(2.0 * q) + EXP(-2.0 * q) + 2.0 * COS(2.0 * p);
              RETURN (makec(2.0 * SIN(2.0 * p) / T, (EXP(-2.0 * q) - EXP(
                2.0 * q)) / T));
            END_IF;
        ef_subscript_s :
            IF ('STRING' IN TYPEOF(v1)) AND ('INTEGER' IN TYPEOF(v2)) THEN
              str := v1;
              k := v2;
              RETURN (ctmv(str[k]));
            END_IF;
        ef_eq_s :
            IF ('STRING' IN TYPEOF(v1)) AND ('STRING' IN TYPEOF(v2)) THEN
              str := v1;
              st2 := v2;
              RETURN (ctmv(str = st2));
            END_IF;
        ef_ne_s :
            IF ('STRING' IN TYPEOF(v1)) AND ('STRING' IN TYPEOF(v2)) THEN
              str := v1;
              st2 := v2;
              RETURN (ctmv(str <> st2));
            END_IF;
        ef_gt_s :
            IF ('STRING' IN TYPEOF(v1)) AND ('STRING' IN TYPEOF(v2)) THEN
              str := v1;
              st2 := v2;
              RETURN (ctmv(str > st2));
            END_IF;
        ef_lt_s :
            IF ('STRING' IN TYPEOF(v1)) AND ('STRING' IN TYPEOF(v2)) THEN
              str := v1;
              st2 := v2;
              RETURN (ctmv(str < st2));
            END_IF;
        ef_ge_s :
            IF ('STRING' IN TYPEOF(v1)) AND ('STRING' IN TYPEOF(v2)) THEN
              str := v1;
              st2 := v2;
              RETURN (ctmv(str >= st2));
            END_IF;
        ef_le_s :
            IF ('STRING' IN TYPEOF(v1)) AND ('STRING' IN TYPEOF(v2)) THEN
              str := v1;
              st2 := v2;
              RETURN (ctmv(str <= st2));
            END_IF;
        ef_subsequence_s :
            IF (('STRING' IN TYPEOF(v1)) AND ('INTEGER' IN TYPEOF(v2))) AND
               ('INTEGER' IN TYPEOF(v3)) THEN
              str := v1;
              j := v2;
              k := v3;
              RETURN (ctmv(str[ j : k ]));
            END_IF;
        ef_concat_s :
            BEGIN
              str := '';
              REPEAT i := SIZEOF(vlist) TO 1 BY -1;
                IF 'STRING' IN TYPEOF(vlist[i]) THEN
                  st2 := vlist[i];
                  str := str + st2;
                  REMOVE( vlist, i );
                ELSE
                  IF str <> '' THEN
                    INSERT( vlist, ctmv(str), i );
                    str := '';
                  END_IF;
                END_IF;
              END_REPEAT;
              IF SIZEOF(vlist) = 0 THEN
                RETURN (ctmv(str));
              END_IF;
              IF str <> '' THEN
                INSERT( vlist, ctmv(str), 0 );
              END_IF;
              IF SIZEOF(vlist) = 1 THEN
                RETURN (vlist[1]);
              END_IF;
            END;
        ef_size_s :
            IF 'STRING' IN TYPEOF(v1) THEN
              str := v1;
              RETURN (ctmv(LENGTH(str)));
            END_IF;
        ef_format :
            IF ('NUMBER' IN TYPEOF(v1)) AND ('STRING' IN TYPEOF(v2)) THEN
              RETURN (ctmv(FORMAT(v1, v2)));
            END_IF;
        ef_value :
            IF 'STRING' IN TYPEOF(v1) THEN
              str := v1;
              RETURN (ctmv(VALUE(str)));
            END_IF;
        ef_like :
            IF ('STRING' IN TYPEOF(v1)) AND ('STRING' IN TYPEOF(v2)) THEN
              RETURN (ctmv(v1 LIKE v2));
            END_IF;
        ef_subscript_b :
            IF ('BINARY' IN TYPEOF(v1)) AND ('INTEGER' IN TYPEOF(v2)) THEN
              bin := v1;
              k := v2;
              RETURN (ctmv(bin[k]));
            END_IF;
        ef_eq_b :
            IF ('BINARY' IN TYPEOF(v1)) AND ('BINARY' IN TYPEOF(v2)) THEN
              bin := v1;
              bi2 := v2;
              RETURN (ctmv(bin = bi2));
            END_IF;
        ef_ne_b :
            IF ('BINARY' IN TYPEOF(v1)) AND ('BINARY' IN TYPEOF(v2)) THEN
              bin := v1;
              bi2 := v2;
              RETURN (ctmv(bin <> bi2));
            END_IF;
        ef_gt_b :
            IF ('BINARY' IN TYPEOF(v1)) AND ('BINARY' IN TYPEOF(v2)) THEN
              bin := v1;
              bi2 := v2;
              RETURN (ctmv(bin > bi2));
            END_IF;
        ef_lt_b :
            IF ('BINARY' IN TYPEOF(v1)) AND ('BINARY' IN TYPEOF(v2)) THEN
              bin := v1;
              bi2 := v2;
              RETURN (ctmv(bin < bi2));
            END_IF;
        ef_ge_b :
            IF ('BINARY' IN TYPEOF(v1)) AND ('BINARY' IN TYPEOF(v2)) THEN
              bin := v1;
              bi2 := v2;
              RETURN (ctmv(bin >= bi2));
            END_IF;
        ef_le_b :
            IF ('BINARY' IN TYPEOF(v1)) AND ('BINARY' IN TYPEOF(v2)) THEN
              bin := v1;
              bi2 := v2;
              RETURN (ctmv(bin <= bi2));
            END_IF;
        ef_subsequence_b :
            IF (('BINARY' IN TYPEOF(v1)) AND ('INTEGER' IN TYPEOF(v2))) AND
               ('INTEGER' IN TYPEOF(v3)) THEN
              bin := v1;
              j := v2;
              k := v3;
              RETURN (ctmv(bin[ j : k ]));
            END_IF;
        ef_concat_b :
            BEGIN
              boo := FALSE;
              REPEAT i := SIZEOF(vlist) TO 1 BY -1;
                IF 'BINARY' IN TYPEOF(vlist[i]) THEN
                  IF boo THEN
                    bi2 := vlist[i];
                    bin := bin + bi2;
                  ELSE
                    bin := vlist[i];
                    boo := TRUE;
                  END_IF;
                  REMOVE( vlist, i );
                ELSE
                  IF boo THEN
                    INSERT( vlist, ctmv(bin), i );
                    boo := FALSE;
                  END_IF;
                END_IF;
              END_REPEAT;
              IF SIZEOF(vlist) = 0 THEN
                RETURN (ctmv(bin));
              END_IF;
              IF boo THEN
                INSERT( vlist, ctmv(bin), 0 );
              END_IF;
              IF SIZEOF(vlist) = 1 THEN
                RETURN (vlist[1]);
              END_IF;
            END;
        ef_size_b :
            IF 'BINARY' IN TYPEOF(v1) THEN
              bin := v1;
              RETURN (ctmv(BLENGTH(bin)));
            END_IF;
        ef_subscript_t :
            IF ('LIST' IN TYPEOF(v1)) AND ('INTEGER' IN TYPEOF(v2)) THEN
              tpl := v1;
              k := v2;
              RETURN (ctmv(tpl[k]));
            END_IF;
        ef_eq_t :
            IF ('LIST' IN TYPEOF(v1)) AND ('LIST' IN TYPEOF(v2)) THEN
              lgc := equal_maths_values(v1, v2);
              IF lgc <> UNKNOWN THEN
                RETURN (ctmv(lgc));
              END_IF;
            END_IF;
        ef_ne_t :
            IF ('LIST' IN TYPEOF(v1)) AND ('LIST' IN TYPEOF(v2)) THEN
              lgc := equal_maths_values(v1, v2);
              IF lgc <> UNKNOWN THEN
                RETURN (ctmv(NOT lgc));
              END_IF;
            END_IF;
        ef_concat_t :
            BEGIN
              tpl := [];
              REPEAT i := SIZEOF(vlist) TO 1 BY -1;
                IF 'STRING' IN TYPEOF(vlist[i]) THEN
                  tp2 := vlist[i];
                  tpl := tpl + tp2;
                  REMOVE( vlist, i );
                ELSE
                  IF SIZEOF(tpl) <> 0 THEN
                    INSERT( vlist, ctmv(tpl), i );
                    tpl := [];
                  END_IF;
                END_IF;
              END_REPEAT;
              IF SIZEOF(vlist) = 0 THEN
                RETURN (ctmv(tpl));
              END_IF;
              IF SIZEOF(tpl) <> 0 THEN
                INSERT( vlist, ctmv(tpl), 0 );
              END_IF;
              IF SIZEOF(vlist) = 1 THEN
                RETURN (vlist[1]);
              END_IF;
            END;
        ef_size_t :
            IF 'LIST' IN TYPEOF(v1) THEN
              tpl := v1;
              RETURN (ctmv(SIZEOF(tpl)));
            END_IF;
        ef_entuple :
            RETURN (ctmv(vlist));
        ef_detuple :
            IF 'LIST' IN TYPEOF(v1) THEN
              tpl := v1;
              RETURN (ctmv(tpl[1]));
            END_IF;
        ef_insert :
            IF ('LIST' IN TYPEOF(v1)) AND ('INTEGER' IN TYPEOF(v3)) THEN
              tpl := v1;
              k := v3;
              INSERT( tpl, v2, k );
              RETURN (ctmv(tpl));
            END_IF;
        ef_remove :
            IF ('LIST' IN TYPEOF(v1)) AND ('INTEGER' IN TYPEOF(v2)) THEN
              tpl := v1;
              k := v2;
              REMOVE( tpl, k );
              RETURN (ctmv(tpl));
            END_IF;
        ef_sum_it :
            IF good_t(v1, 'INTEGER') THEN
              tpl := v1;
              j := 0;
              REPEAT i := 1 TO SIZEOF(tpl);
                j := j + tpl[i];
              END_REPEAT;
              RETURN (ctmv(j));
            END_IF;
        ef_product_it :
            IF good_t(v1, 'INTEGER') THEN
              tpl := v1;
              j := 1;
              REPEAT i := 1 TO SIZEOF(tpl);
                j := j * tpl[i];
              END_REPEAT;
              RETURN (ctmv(j));
            END_IF;
        ef_add_it :
            BEGIN
              boo := FALSE;
              REPEAT i := SIZEOF(vlist) TO 1 BY -1;
                IF good_t(vlist[i], 'INTEGER') THEN
                  IF NOT boo THEN
                    tpl := vlist[i];
                    boo := TRUE;
                  ELSE
                    tp2 := vlist[i];
                    IF SIZEOF(tpl) <> SIZEOF(tp2) THEN
                      RETURN (?);
                    END_IF;
                    REPEAT l := 1 TO SIZEOF(tpl);
                      tpl[j] := tpl[j] + tp2[j];
                    END_REPEAT;
                  END_IF;
                  REMOVE( vlist, i );
                END_IF;
              END_REPEAT;
              IF SIZEOF(vlist) = 0 THEN
                RETURN (ctmv(tpl));
              END_IF;
              IF boo THEN
                INSERT( vlist, ctmv(tpl), 0 );
              END_IF;
              IF SIZEOF(vlist) = 1 THEN
                RETURN (vlist[1]);
              END_IF;
            END;
        ef_subtract_it :
            IF good_t(v1, 'INTEGER') AND good_t(v2, 'INTEGER') THEN
              tpl := v1;
              tp2 := v2;
              IF SIZEOF(tpl) <> SIZEOF(tp2) THEN
                RETURN (?);
              END_IF;
              REPEAT i := 1 TO SIZEOF(tpl);
                tpl[i] := tpl[i] - tp2[i];
              END_REPEAT;
              RETURN (ctmv(tpl));
            END_IF;
        ef_scalar_mult_it :
            IF ('INTEGER' IN TYPEOF(v1)) AND good_t(v2, 'INTEGER') THEN
              j := v1;
              tpl := v2;
              REPEAT i := 1 TO SIZEOF(tpl);
                tpl[i] := j * tpl[i];
              END_REPEAT;
              RETURN (ctmv(tpl));
            END_IF;
        ef_dot_prod_it :
            IF good_t(v1, 'INTEGER') AND good_t(v2, 'INTEGER') THEN
              tpl := v1;
              tp2 := v2;
              j := 0;
              IF SIZEOF(tpl) <> SIZEOF(tp2) THEN
                RETURN (?);
              END_IF;
              REPEAT i := 1 TO SIZEOF(tpl);
                j := j + tpl[i] * tp2[i];
              END_REPEAT;
              RETURN (ctmv(j));
            END_IF;
        ef_sum_rt :
            IF good_t(v1, 'REAL') THEN
              tpl := v1;
              r := 0.0;
              REPEAT i := 1 TO SIZEOF(tpl);
                r := r + tpl[i];
              END_REPEAT;
              RETURN (ctmv(r));
            END_IF;
        ef_product_rt :
            IF good_t(v1, 'REAL') THEN
              tpl := v1;
              r := 1.0;
              REPEAT i := 1 TO SIZEOF(tpl);
                r := r * tpl[i];
              END_REPEAT;
              RETURN (ctmv(r));
            END_IF;
        ef_add_rt :
            BEGIN
              boo := FALSE;
              REPEAT i := SIZEOF(vlist) TO 1 BY -1;
                IF good_t(vlist[i], 'REAL') THEN
                  IF NOT boo THEN
                    tpl := vlist[i];
                    boo := TRUE;
                  ELSE
                    tp2 := vlist[i];
                    IF SIZEOF(tpl) <> SIZEOF(tp2) THEN
                      RETURN (?);
                    END_IF;
                    REPEAT l := 1 TO SIZEOF(tpl);
                      tpl[j] := tpl[j] + tp2[j];
                    END_REPEAT;
                  END_IF;
                  REMOVE( vlist, i );
                END_IF;
              END_REPEAT;
              IF SIZEOF(vlist) = 0 THEN
                RETURN (ctmv(tpl));
              END_IF;
              IF boo THEN
                INSERT( vlist, ctmv(tpl), 0 );
              END_IF;
              IF SIZEOF(vlist) = 1 THEN
                RETURN (vlist[1]);
              END_IF;
            END;
        ef_subtract_rt :
            IF good_t(v1, 'REAL') AND good_t(v2, 'REAL') THEN
              tpl := v1;
              tp2 := v2;
              IF SIZEOF(tpl) <> SIZEOF(tp2) THEN
                RETURN (?);
              END_IF;
              REPEAT i := 1 TO SIZEOF(tpl);
                tpl[i] := tpl[i] - tp2[i];
              END_REPEAT;
              RETURN (ctmv(tpl));
            END_IF;
        ef_scalar_mult_rt :
            IF ('REAL' IN TYPEOF(v1)) AND good_t(v2, 'REAL') THEN
              r := v1;
              tpl := v2;
              REPEAT i := 1 TO SIZEOF(tpl);
                tpl[i] := r * tpl[i];
              END_REPEAT;
              RETURN (ctmv(tpl));
            END_IF;
        ef_dot_prod_rt :
            IF good_t(v1, 'REAL') AND good_t(v2, 'REAL') THEN
              tpl := v1;
              tp2 := v2;
              r := 0;
              IF SIZEOF(tpl) <> SIZEOF(tp2) THEN
                RETURN (?);
              END_IF;
              REPEAT i := 1 TO SIZEOF(tpl);
                r := r + tpl[i] * tp2[i];
              END_REPEAT;
              RETURN (ctmv(r));
            END_IF;
        ef_norm_rt :
            IF good_t(v1, 'REAL') THEN
              tpl := v1;
              r := 0.0;
              REPEAT i := 1 TO SIZEOF(tpl);
                r := r + tpl[i] * tpl[i];
              END_REPEAT;
              RETURN (ctmv(SQRT(r)));
            END_IF;
        ef_sum_ct :
            IF good_t(v1, cnlit) THEN
              tpl := v1;
              p := 0.0;
              q := 0.0;
              REPEAT i := 1 TO SIZEOF(tpl);
                parts( tpl[i], r, s );
                p := p + r;
                q := q + s;
              END_REPEAT;
              RETURN (makec(p, q));
            END_IF;
        ef_product_ct :
            IF good_t(v1, cnlit) THEN
              tpl := v1;
              p := 1.0;
              q := 0.0;
              REPEAT i := 1 TO SIZEOF(tpl);
                parts( tpl[i], r, s );
                p := p * r - q * s;
                q := p * s + q * r;
              END_REPEAT;
              RETURN (makec(p, q));
            END_IF;
        ef_add_ct :
            BEGIN
              boo := FALSE;
              REPEAT i := SIZEOF(vlist) TO 1 BY -1;
                IF good_t(vlist[i], cnlit) THEN
                  IF NOT boo THEN
                    tpl := vlist[i];
                    boo := TRUE;
                  ELSE
                    tp2 := vlist[i];
                    IF SIZEOF(tpl) <> SIZEOF(tp2) THEN
                      RETURN (?);
                    END_IF;
                    REPEAT l := 1 TO SIZEOF(tpl);
                      parts( tpl[j], p, q );
                      parts( tp2[j], r, s );
                      tpl[j] := makec(p + r, q + s);
                    END_REPEAT;
                  END_IF;
                  REMOVE( vlist, i );
                END_IF;
              END_REPEAT;
              IF SIZEOF(vlist) = 0 THEN
                RETURN (ctmv(tpl));
              END_IF;
              IF boo THEN
                INSERT( vlist, ctmv(tpl), 0 );
              END_IF;
              IF SIZEOF(vlist) = 1 THEN
                RETURN (vlist[1]);
              END_IF;
            END;
        ef_subtract_ct :
            IF good_t(v1, cnlit) AND good_t(v2, cnlit) THEN
              tpl := v1;
              tp2 := v2;
              IF SIZEOF(tpl) <> SIZEOF(tp2) THEN
                RETURN (?);
              END_IF;
              REPEAT i := 1 TO SIZEOF(tpl);
                parts( tpl[i], p, q );
                parts( tp2[i], r, s );
                tpl[i] := makec(p - r, q - s);
              END_REPEAT;
              RETURN (ctmv(tpl));
            END_IF;
        ef_scalar_mult_ct :
            IF (cnlit IN TYPEOF(v1)) AND good_t(v2, cnlit) THEN
              parts( v1, p, q );
              tpl := v2;
              REPEAT i := 1 TO SIZEOF(tpl);
                parts( tpl[i], r, s );
                tpl[i] := makec(p * r - q * s, p * s + q * r);
              END_REPEAT;
              RETURN (ctmv(tpl));
            END_IF;
        ef_dot_prod_ct :
            IF good_t(v1, cnlit) AND good_t(v2, cnlit) THEN
              tpl := v1;
              tp2 := v2;
              T := 0.0;
              u := 0.0;
              IF SIZEOF(tpl) <> SIZEOF(tp2) THEN
                RETURN (?);
              END_IF;
              REPEAT i := 1 TO SIZEOF(tpl);
                parts( tpl[i], p, q );
                parts( tp2[i], r, s );
                T := T + p * r + q * s;
                u := u + q * r - p * s;
              END_REPEAT;
              RETURN (makec(T, u));
            END_IF;
        ef_norm_ct :
            IF good_t(v1, cnlit) THEN
              tpl := v1;
              r := 0.0;
              REPEAT i := 1 TO SIZEOF(tpl);
                parts( tpl[i], p, q );
                r := r + p * p + q * q;
              END_REPEAT;
              RETURN (ctmv(SQRT(r)));
            END_IF;
        ef_if, ef_if_i, ef_if_r, ef_if_c, ef_if_s, ef_if_b, ef_if_t :
            IF 'LOGICAL' IN TYPEOF(v1) THEN
              lgc := v1;
              IF lgc THEN
                RETURN (v2);
              ELSE
                RETURN (v3);
              END_IF;
            END_IF;
        ef_ensemble :
            RETURN (make_finite_space(mem + vlist));
        ef_member_of :
            IF schema_prefix + 'MATHS_SPACE' IN TYPEOF(v2) THEN
              lgc := member_of(v1, v2);
              IF lgc <> UNKNOWN THEN
                RETURN (ctmv(lgc));
              END_IF;
            END_IF;
      END_CASE;
      RETURN (make_function_application(expr.func, vlist));
    END_IF;
    IF 'ABSTRACTED_EXPRESSION_FUNCTION' IN types THEN
      gexpr := substitute(expr.func\abstracted_expression_function.expr, 
        expr.func\quantifier_expression.variables, vlist);
      RETURN (simplify_generic_expression(gexpr));
    END_IF;
    IF 'FINITE_FUNCTION' IN types THEN
      pairs := expr.func\finite_function.pairs;
      REPEAT i := 1 TO SIZEOF(pairs);
        IF equal_maths_values(vlist[1], pairs[i][1]) THEN
          RETURN (simplify_maths_value(pairs[i][2]));
        END_IF;
      END_REPEAT;
      RETURN (make_function_application(expr.func, vlist));
    END_IF;
    RETURN (expr);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION simplify_generic_expression (
    expr : generic_expression 
    ) : maths_value;
    FUNCTION restore_unary
      (expr : unary_generic_expression;
       opnd : generic_expression ) : generic_expression;
      expr.operand := opnd;
      RETURN (expr);
    END_FUNCTION;
    FUNCTION restore_binary
      (expr : binary_generic_expression;
       opd1 : generic_expression;
       opd2 : generic_expression ) : generic_expression;
      expr.operands[1] := opd1;
      expr.operands[2] := opd2;
      RETURN (expr);
    END_FUNCTION;
    FUNCTION restore_mulary
      (expr : multiple_arity_generic_expression;
       ops : LIST OF generic_expression ) : generic_expression;
      expr.operands := ops;
      RETURN (expr);
    END_FUNCTION;
    FUNCTION make_number_literal
      (nmb : NUMBER ) : generic_literal;
      IF 'INTEGER' IN TYPEOF(nmb) THEN
        RETURN (make_int_literal(nmb));
      END_IF;
      RETURN (make_real_literal(nmb));
    END_FUNCTION;
  LOCAL
    types : SET OF STRING := stripped_typeof(expr);
    v1 : maths_value;
    v2 : maths_value;
    vlist : LIST OF maths_value := [];
    op1 : generic_expression;
    op2 : generic_expression;
    oplist : LIST OF generic_expression := [];
    opnds : LIST [2:?] OF generic_expression;
    n : INTEGER;
    m : INTEGER;
    finfun : maths_function_select;
    boo : BOOLEAN;
    str : STRING;
    nmb : NUMBER;
  END_LOCAL;
    IF 'INT_LITERAL' IN types THEN
      RETURN (convert_to_maths_value(expr\int_literal.the_value));
    END_IF;
    IF 'REAL_LITERAL' IN types THEN
      RETURN (convert_to_maths_value(expr\real_literal.the_value));
    END_IF;
    IF 'BOOLEAN_LITERAL' IN types THEN
      RETURN (convert_to_maths_value(expr\boolean_literal.the_value));
    END_IF;
    IF 'STRING_LITERAL' IN types THEN
      RETURN (convert_to_maths_value(expr\string_literal.the_value));
    END_IF;
    IF 'COMPLEX_NUMBER_LITERAL' IN types THEN
      RETURN (expr);
    END_IF;
    IF 'LOGICAL_LITERAL' IN types THEN
      RETURN (convert_to_maths_value(expr\logical_literal.lit_value));
    END_IF;
    IF 'BINARY_LITERAL' IN types THEN
      RETURN (convert_to_maths_value(expr\binary_literal.lit_value));
    END_IF;
    IF 'MATHS_ENUM_LITERAL' IN types THEN
      RETURN (expr\maths_enum_literal.lit_value);
    END_IF;
    IF 'REAL_TUPLE_LITERAL' IN types THEN
      RETURN (convert_to_maths_value(expr\real_tuple_literal.lit_value));
    END_IF;
    IF 'INTEGER_TUPLE_LITERAL' IN types THEN
      RETURN (convert_to_maths_value(expr\integer_tuple_literal.lit_value))
        ;
    END_IF;
    IF 'ATOM_BASED_LITERAL' IN types THEN
      RETURN (expr\atom_based_literal.lit_value);
    END_IF;
    IF 'MATHS_TUPLE_LITERAL' IN types THEN
      RETURN (convert_to_maths_value(expr\maths_tuple_literal.lit_value));
    END_IF;
    IF 'MATHS_SPACE' IN types THEN
      RETURN (simplify_maths_space(expr));
    END_IF;
    IF 'FUNCTION_APPLICATION' IN types THEN
      RETURN (simplify_function_application(expr));
    END_IF;
    IF 'UNARY_GENERIC_EXPRESSION' IN types THEN
      v1 := simplify_generic_expression(expr\unary_generic_expression.
        operand);
      op1 := convert_to_operand(v1);
    END_IF;
    IF 'BINARY_GENERIC_EXPRESSION' IN types THEN
      v1 := simplify_generic_expression(expr\binary_generic_expression.
        operands[1]);
      op1 := convert_to_operand(v1);
      v2 := simplify_generic_expression(expr\binary_generic_expression.
        operands[2]);
      op2 := convert_to_operand(v2);
    END_IF;
    IF 'MULTIPLE_ARITY_GENERIC_EXPRESSION' IN types THEN
      opnds := expr\multiple_arity_generic_expression.operands;
      REPEAT i := 1 TO SIZEOF(opnds);
        v1 := simplify_generic_expression(opnds[i]);
        INSERT( vlist, v1, i - 1 );
        INSERT( oplist, convert_to_operand(v1), i - 1 );
      END_REPEAT;
    END_IF;
    IF 'PARALLEL_COMPOSED_FUNCTION' IN types THEN
      v1 := vlist[1];
      n := SIZEOF(vlist);
      finfun := vlist[n];
      REMOVE( vlist, n );
      REMOVE( vlist, 1 );
      RETURN (make_parallel_composed_function(v1, vlist, finfun));
    END_IF;
    IF ('ABS_EXPRESSION' IN types) AND ('NUMBER' IN TYPEOF(v1)) THEN
      RETURN (convert_to_maths_value(ABS(v1)));
    END_IF;
    IF ('ACOS_EXPRESSION' IN types) AND ('NUMBER' IN TYPEOF(v1)) THEN
      RETURN (convert_to_maths_value(ACOS(v1)));
    END_IF;
    IF 'AND_EXPRESSION' IN types THEN
      REPEAT i := SIZEOF(vlist) TO 1 BY -1;
        IF 'BOOLEAN' IN TYPEOF(vlist[i]) THEN
          boo := vlist[i];
          IF NOT boo THEN
            RETURN (convert_to_maths_value(FALSE));
          END_IF;
          REMOVE( oplist, i );
        END_IF;
      END_REPEAT;
      IF SIZEOF(oplist) = 0 THEN
        RETURN (convert_to_maths_value(TRUE));
      END_IF;
      IF SIZEOF(oplist) = 1 THEN
        RETURN (oplist[1]);
      END_IF;
    END_IF;
    IF ('ASIN_EXPRESSION' IN types) AND ('NUMBER' IN TYPEOF(v1)) THEN
      RETURN (convert_to_maths_value(ASIN(v1)));
    END_IF;
    IF (('ATAN_EXPRESSION' IN types) AND ('NUMBER' IN TYPEOF(v1))) AND (
      'NUMBER' IN TYPEOF(v2)) THEN
      RETURN (convert_to_maths_value(ATAN(v1, v2)));
    END_IF;
    IF ('COMPARISON_EXPRESSION' IN types) AND ((('NUMBER' IN TYPEOF(v1)) 
      AND ('NUMBER' IN TYPEOF(v2)) OR ('STRING' IN TYPEOF(v1)) AND (
      'STRING' IN TYPEOF(v2))) OR ('BOOLEAN' IN TYPEOF(v1)) AND ('BOOLEAN' 
      IN TYPEOF(v2))) THEN
      IF 'COMPARISON_EQUAL' IN types THEN
        boo := bool(v1 = v2);
      ELSE
        IF 'COMPARISON_GREATER' IN types THEN
          boo := bool(v1 > v2);
        ELSE
          IF 'COMPARISON_GREATER_EQUAL' IN types THEN
            boo := bool(v1 >= v2);
          ELSE
            IF 'COMPARISON_LESS' IN types THEN
              boo := bool(v1 < v2);
            ELSE
              IF 'COMPARISON_LESS_EQUAL' IN types THEN
                boo := bool(v1 <= v2);
              ELSE
                IF 'COMPARISON_NOT_EQUAL' IN types THEN
                  boo := bool(v1 <> v2);
                ELSE
                  IF 'LIKE_EXPRESSION' IN types THEN
                    boo := bool(v1 LIKE v2);
                  ELSE
                    RETURN (?);
                  END_IF;
                END_IF;
              END_IF;
            END_IF;
          END_IF;
        END_IF;
      END_IF;
      RETURN (convert_to_maths_value(boo));
    END_IF;
    IF 'CONCAT_EXPRESSION' IN types THEN
      str := '';
      REPEAT i := SIZEOF(vlist) TO 1 BY -1;
        IF 'STRING' IN TYPEOF(vlist[i]) THEN
          str := vlist[i] + str;
          REMOVE( oplist, i );
        ELSE
          IF LENGTH(str) > 0 THEN
            INSERT( oplist, make_string_literal(str), i );
            str := '';
          END_IF;
        END_IF;
      END_REPEAT;
      IF SIZEOF(oplist) = 0 THEN
        RETURN (convert_to_maths_value(str));
      END_IF;
      IF LENGTH(str) > 0 THEN
        INSERT( oplist, make_string_literal(str), 0 );
      END_IF;
      IF SIZEOF(oplist) = 1 THEN
        RETURN (oplist[1]);
      END_IF;
    END_IF;
    IF ('COS_EXPRESSION' IN types) AND ('NUMBER' IN TYPEOF(v1)) THEN
      RETURN (convert_to_maths_value(COS(v1)));
    END_IF;
    IF (('DIV_EXPRESSION' IN types) AND ('NUMBER' IN TYPEOF(v1))) AND (
      'NUMBER' IN TYPEOF(v2)) THEN
      RETURN (convert_to_maths_value(v1 DIV v2));
    END_IF;
    IF 'EQUALS_EXPRESSION' IN types THEN
      opnds := expr\binary_generic_expression.operands;
      RETURN (convert_to_maths_value(opnds[1] :=: opnds[2]));
    END_IF;
    IF ('EXP_EXPRESSION' IN types) AND ('NUMBER' IN TYPEOF(v1)) THEN
      RETURN (convert_to_maths_value(EXP(v1)));
    END_IF;
    IF (('FORMAT_EXPRESSION' IN types) AND ('NUMBER' IN TYPEOF(v1))) AND (
      'STRING' IN TYPEOF(v2)) THEN
      RETURN (convert_to_maths_value(FORMAT(v1, v2)));
    END_IF;
    IF (('INDEX_EXPRESSION' IN types) AND ('STRING' IN TYPEOF(v1))) AND (
      'NUMBER' IN TYPEOF(v2)) THEN
      str := v1;
      n := v2;
      RETURN (convert_to_maths_value(str[n]));
    END_IF;
    IF ('INT_VALUE_EXPRESSION' IN types) AND ('STRING' IN TYPEOF(v1)) THEN
      RETURN (convert_to_maths_value(VALUE(v1)));
    END_IF;
    IF 'INTERVAL_EXPRESSION' IN types THEN
      str := '';
      IF 'NUMBER' IN TYPEOF(vlist[1]) THEN
        str := 'NUMBER';
      END_IF;
      IF 'STRING' IN TYPEOF(vlist[1]) THEN
        str := 'STRING';
      END_IF;
      IF 'BOOLEAN' IN TYPEOF(vlist[1]) THEN
        str := 'BOOLEAN';
      END_IF;
      IF ((LENGTH(str) > 0) AND (str IN TYPEOF(vlist[2]))) AND (str IN 
        TYPEOF(vlist[3])) THEN
        RETURN (convert_to_maths_value((vlist[1] <= vlist[2]) AND (vlist[2]
           <= vlist[3])));
      END_IF;
    END_IF;
    IF ('LENGTH_EXPRESSION' IN types) AND ('STRING' IN TYPEOF(v1)) THEN
      RETURN (convert_to_maths_value(LENGTH(v1)));
    END_IF;
    IF ('LOG_EXPRESSION' IN types) AND ('NUMBER' IN TYPEOF(v1)) THEN
      RETURN (convert_to_maths_value(LOG(v1)));
    END_IF;
    IF ('LOG10_EXPRESSION' IN types) AND ('NUMBER' IN TYPEOF(v1)) THEN
      RETURN (convert_to_maths_value(LOG10(v1)));
    END_IF;
    IF ('LOG2_EXPRESSION' IN types) AND ('NUMBER' IN TYPEOF(v1)) THEN
      RETURN (convert_to_maths_value(LOG2(v1)));
    END_IF;
    IF 'MAXIMUM_EXPRESSION' IN types THEN
      boo := FALSE;
      REPEAT i := SIZEOF(vlist) TO 1 BY -1;
        IF 'NUMBER' IN TYPEOF(vlist[i]) THEN
          IF boo THEN
            IF nmb < vlist[i] THEN
              nmb := vlist[i];
            END_IF;
          ELSE
            nmb := vlist[i];
            boo := TRUE;
          END_IF;
          REMOVE( oplist, i );
        END_IF;
      END_REPEAT;
      IF SIZEOF(oplist) = 0 THEN
        RETURN (convert_to_maths_value(nmb));
      END_IF;
      IF boo THEN
        INSERT( oplist, make_number_literal(nmb), 0 );
      END_IF;
    END_IF;
    IF 'MINIMUM_EXPRESSION' IN types THEN
      boo := FALSE;
      REPEAT i := SIZEOF(vlist) TO 1 BY -1;
        IF 'NUMBER' IN TYPEOF(vlist[i]) THEN
          IF boo THEN
            IF nmb > vlist[i] THEN
              nmb := vlist[i];
            END_IF;
          ELSE
            nmb := vlist[i];
            boo := TRUE;
          END_IF;
          REMOVE( oplist, i );
        END_IF;
      END_REPEAT;
      IF SIZEOF(oplist) = 0 THEN
        RETURN (convert_to_maths_value(nmb));
      END_IF;
      IF boo THEN
        INSERT( oplist, make_number_literal(nmb), 0 );
      END_IF;
    END_IF;
    IF (('MINUS_EXPRESSION' IN types) AND ('NUMBER' IN TYPEOF(v1))) AND (
      'NUMBER' IN TYPEOF(v2)) THEN
      RETURN (convert_to_maths_value(v1 - v2));
    END_IF;
    IF (('MOD_EXPRESSION' IN types) AND ('NUMBER' IN TYPEOF(v1))) AND (
      'NUMBER' IN TYPEOF(v2)) THEN
      RETURN (convert_to_maths_value(v1 MOD v2));
    END_IF;
    IF 'MULT_EXPRESSION' IN types THEN
      nmb := 1;
      REPEAT i := SIZEOF(vlist) TO 1 BY -1;
        IF 'NUMBER' IN TYPEOF(vlist[i]) THEN
          nmb := nmb * vlist[i];
          REMOVE( oplist, i );
        END_IF;
      END_REPEAT;
      IF SIZEOF(oplist) = 0 THEN
        RETURN (convert_to_maths_value(nmb));
      END_IF;
      IF nmb <> 1 THEN
        INSERT( oplist, make_number_literal(nmb), 0 );
      END_IF;
      IF SIZEOF(oplist) = 1 THEN
        RETURN (oplist[1]);
      END_IF;
    END_IF;
    IF ('NOT_EXPRESSION' IN types) AND ('BOOLEAN' IN TYPEOF(v1)) THEN
      boo := v1;
      RETURN (convert_to_maths_value(NOT boo));
    END_IF;
    IF ('ODD_EXPRESSION' IN types) AND ('INTEGER' IN TYPEOF(v1)) THEN
      RETURN (convert_to_maths_value(ODD(v1)));
    END_IF;
    IF 'OR_EXPRESSION' IN types THEN
      REPEAT i := SIZEOF(vlist) TO 1 BY -1;
        IF 'BOOLEAN' IN TYPEOF(vlist[i]) THEN
          boo := vlist[i];
          IF boo THEN
            RETURN (convert_to_maths_value(TRUE));
          END_IF;
          REMOVE( oplist, i );
        END_IF;
      END_REPEAT;
      IF SIZEOF(oplist) = 0 THEN
        RETURN (convert_to_maths_value(FALSE));
      END_IF;
      IF SIZEOF(oplist) = 1 THEN
        RETURN (oplist[1]);
      END_IF;
    END_IF;
    IF 'PLUS_EXPRESSION' IN types THEN
      nmb := 0;
      REPEAT i := SIZEOF(vlist) TO 1 BY -1;
        IF 'NUMBER' IN TYPEOF(vlist[i]) THEN
          nmb := nmb + vlist[i];
          REMOVE( oplist, i );
        END_IF;
      END_REPEAT;
      IF SIZEOF(oplist) = 0 THEN
        RETURN (convert_to_maths_value(nmb));
      END_IF;
      IF nmb <> 0 THEN
        INSERT( oplist, make_number_literal(nmb), 0 );
      END_IF;
      IF SIZEOF(oplist) = 1 THEN
        RETURN (oplist[1]);
      END_IF;
    END_IF;
    IF (('POWER_EXPRESSION' IN types) AND ('NUMBER' IN TYPEOF(v1))) AND (
      'NUMBER' IN TYPEOF(v2)) THEN
      RETURN (convert_to_maths_value(v1 ** v2));
    END_IF;
    IF ('SIN_EXPRESSION' IN types) AND ('NUMBER' IN TYPEOF(v1)) THEN
      RETURN (convert_to_maths_value(SIN(v1)));
    END_IF;
    IF (('SLASH_EXPRESSION' IN types) AND ('NUMBER' IN TYPEOF(v1))) AND (
      'NUMBER' IN TYPEOF(v2)) THEN
      RETURN (convert_to_maths_value(v1 / v2));
    END_IF;
    IF ('SQUARE_ROOT_EXPRESSION' IN types) AND ('NUMBER' IN TYPEOF(v1)) 
      THEN
      RETURN (convert_to_maths_value(SQRT(v1)));
    END_IF;
    IF ((('SUBSTRING_EXPRESSION' IN types) AND ('STRING' IN TYPEOF(vlist[1]
      ))) AND ('NUMBER' IN TYPEOF(vlist[2]))) AND ('NUMBER' IN TYPEOF(vlist
      [3])) THEN
      str := vlist[1];
      n := vlist[2];
      m := vlist[3];
      RETURN (convert_to_maths_value(str[ n : m ]));
    END_IF;
    IF ('TAN_EXPRESSION' IN types) AND ('NUMBER' IN TYPEOF(v1)) THEN
      RETURN (convert_to_maths_value(TAN(v1)));
    END_IF;
    IF ('UNARY_MINUS_EXPRESSION' IN types) AND ('NUMBER' IN TYPEOF(v1)) 
      THEN
      nmb := v1;
      RETURN (convert_to_maths_value(-nmb));
    END_IF;
    IF ('VALUE_EXPRESSION' IN types) AND ('STRING' IN TYPEOF(v1)) THEN
      RETURN (convert_to_maths_value(VALUE(v1)));
    END_IF;
    IF (('XOR_EXPRESSION' IN types) AND ('BOOLEAN' IN TYPEOF(v1))) AND (
      'BOOLEAN' IN TYPEOF(v2)) THEN
      RETURN (convert_to_maths_value(v1 XOR v2));
    END_IF;
    IF 'UNARY_GENERIC_EXPRESSION' IN types THEN
      RETURN (restore_unary(expr, op1));
    END_IF;
    IF 'BINARY_GENERIC_EXPRESSION' IN types THEN
      RETURN (restore_binary(expr, op1, op2));
    END_IF;
    IF 'MULTIPLE_ARITY_GENERIC_EXPRESSION' IN types THEN
      RETURN (restore_mulary(expr, oplist));
    END_IF;
    RETURN (expr);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION simplify_maths_space (
    spc : maths_space 
    ) : maths_space;
  LOCAL
    stypes : SET OF STRING := stripped_typeof(spc);
    sset : SET OF maths_value;
    zset : SET OF maths_value := [];
    zval : maths_value;
    zspc : maths_space;
    zallint : BOOLEAN := TRUE;
    zint : INTEGER;
    zmin : INTEGER;
    zmax : INTEGER;
    factors : LIST OF maths_space;
    zfactors : LIST OF maths_space := [];
    rspc : maths_space;
  END_LOCAL;
    IF 'FINITE_SPACE' IN stypes THEN
      sset := spc\finite_space.members;
      REPEAT i := 1 TO SIZEOF(sset);
        zval := simplify_maths_value(sset[i]);
        zset := zset + [ zval ];
        IF zallint AND ('INTEGER' IN TYPEOF(zval)) THEN
          zint := zval;
          IF i = 1 THEN
            zmin := zint;
            zmax := zint;
          ELSE
            IF zint < zmin THEN
              zmin := zint;
            END_IF;
            IF zint > zmax THEN
              zmax := zint;
            END_IF;
          END_IF;
        ELSE
          zallint := FALSE;
        END_IF;
      END_REPEAT;
      IF zallint AND (SIZEOF(zset) = zmax - zmin + 1) THEN
        RETURN (make_finite_integer_interval(zmin, zmax));
      END_IF;
      RETURN (make_finite_space(zset));
    END_IF;
    IF 'UNIFORM_PRODUCT_SPACE' IN stypes THEN
      zspc := simplify_maths_space(spc\uniform_product_space.base);
      RETURN (make_uniform_product_space(zspc, spc\uniform_product_space.
        exponent));
    END_IF;
    IF 'LISTED_PRODUCT_SPACE' IN stypes THEN
      factors := spc\listed_product_space.factors;
      REPEAT i := 1 TO SIZEOF(factors);
        INSERT( zfactors, simplify_maths_space(factors[i]), i - 1 );
      END_REPEAT;
      RETURN (make_listed_product_space(zfactors));
    END_IF;
    IF 'EXTENDED_TUPLE_SPACE' IN stypes THEN
      zspc := simplify_maths_space(spc\extended_tuple_space.base);
      rspc := simplify_maths_space(spc\extended_tuple_space.extender);
      RETURN (make_extended_tuple_space(zspc, rspc));
    END_IF;
    IF 'FUNCTION_SPACE' IN stypes THEN
      zspc := simplify_maths_space(spc\function_space.domain_argument);
      rspc := simplify_maths_space(spc\function_space.range_argument);
      RETURN (make_function_space(spc\function_space.domain_constraint, 
        zspc, spc\function_space.range_constraint, rspc));
    END_IF;
    RETURN (spc);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION simplify_maths_value (
    val : maths_value 
    ) : maths_value;
  LOCAL
    vtypes : SET OF STRING := stripped_typeof(val);
    vlist : LIST OF maths_value;
    nlist : LIST OF maths_value := [];
  END_LOCAL;
    IF 'GENERIC_EXPRESSION' IN vtypes THEN
      RETURN (simplify_generic_expression(val));
    END_IF;
    IF 'LIST' IN vtypes THEN
      vlist := val;
      REPEAT i := 1 TO SIZEOF(vlist);
        INSERT( nlist, simplify_maths_value(vlist[i]), i - 1 );
      END_REPEAT;
      RETURN (convert_to_maths_value(nlist));
    END_IF;
    RETURN (val);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION singleton_member_of (
    spc : maths_space 
    ) : maths_value;
  LOCAL
    types : SET OF STRING := stripped_typeof(spc);
  END_LOCAL;
    IF 'FINITE_SPACE' IN types THEN
      IF SIZEOF(spc\finite_space.members) = 1 THEN
        RETURN (spc\finite_space.members[1]);
      END_IF;
      RETURN (?);
    END_IF;
    IF 'FINITE_INTEGER_INTERVAL' IN types THEN
      IF spc\finite_integer_interval.size = 1 THEN
        RETURN (spc\finite_integer_interval.min);
      END_IF;
      RETURN (?);
    END_IF;
    RETURN (?);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION sort_link_associations (
    aprr        : SET [1:?] OF pair_representation_relationship;
    one_not_two : BOOLEAN 
    ) : SET OF kinematic_link_representation;
  LOCAL
    result : SET OF kinematic_link_representation := [];
  END_LOCAL;
    IF one_not_two THEN
      REPEAT i := 1 TO HIINDEX(aprr);
        result := result + aprr[i].rep_1;
      END_REPEAT;
    ELSE
      REPEAT i := 1 TO HIINDEX(aprr);
        result := result + aprr[i].rep_2;
      END_REPEAT;
    END_IF;
    RETURN (result);
END_FUNCTION; -- 10303-105: kinematic_structure_schema

FUNCTION space_dimension (
    tspace : tuple_space 
    ) : nonnegative_integer;
  LOCAL
    types : SET OF STRING := TYPEOF(tspace);
  END_LOCAL;
    IF schema_prefix + 'UNIFORM_PRODUCT_SPACE' IN types THEN
      RETURN (tspace\uniform_product_space.exponent);
    END_IF;
    IF schema_prefix + 'LISTED_PRODUCT_SPACE' IN types THEN
      RETURN (SIZEOF(tspace\listed_product_space.factors));
    END_IF;
    IF schema_prefix + 'EXTENDED_TUPLE_SPACE' IN types THEN
      RETURN (space_dimension(tspace\extended_tuple_space.base));
    END_IF;
    RETURN (?);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION space_is_continuum (
    space : maths_space 
    ) : BOOLEAN;
  LOCAL
    typenames : SET OF STRING := TYPEOF(space);
    factors : LIST OF maths_space;
  END_LOCAL;
    IF NOT EXISTS(space) THEN
      RETURN (FALSE);
    END_IF;
    IF subspace_of_es(space, es_reals) OR subspace_of_es(space, 
      es_complex_numbers) THEN
      RETURN (TRUE);
    END_IF;
    IF schema_prefix + 'UNIFORM_PRODUCT_SPACE' IN typenames THEN
      RETURN (space_is_continuum(space\uniform_product_space.base));
    END_IF;
    IF schema_prefix + 'LISTED_PRODUCT_SPACE' IN typenames THEN
      factors := space\listed_product_space.factors;
      IF SIZEOF(factors) = 0 THEN
        RETURN (FALSE);
      END_IF;
      REPEAT i := 1 TO SIZEOF(factors);
        IF NOT space_is_continuum(factors[i]) THEN
          RETURN (FALSE);
        END_IF;
      END_REPEAT;
      RETURN (TRUE);
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION space_is_singleton (
    spc : maths_space 
    ) : BOOLEAN;
  LOCAL
    types : SET OF STRING := stripped_typeof(spc);
  END_LOCAL;
    IF 'FINITE_SPACE' IN types THEN
      RETURN (bool(SIZEOF(spc\finite_space.members) = 1));
    END_IF;
    IF 'FINITE_INTEGER_INTERVAL' IN types THEN
      RETURN (bool(spc\finite_integer_interval.size = 1));
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION stripped_typeof (
    arg : GENERIC : G 
    ) : SET OF STRING;
  LOCAL
    types : SET OF STRING := TYPEOF(arg);
    stypes : SET OF STRING := [];
    n : INTEGER := LENGTH(schema_prefix);
  END_LOCAL;
    REPEAT i := 1 TO SIZEOF(types);
      IF types[i][ 1 : n ] = schema_prefix THEN
        stypes := stypes + types[i][ (n + 1) : LENGTH(types[i]) ];
      ELSE
        stypes := stypes + types[i];
      END_IF;
    END_REPEAT;
    RETURN (stypes);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION sts_get_general_datum_reference (
    input : datum_reference_element 
    ) : general_datum_reference;
  LOCAL
    general_datum_reference_bag : BAG OF general_datum_reference := USEDIN(
      input, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.GENERAL_DATUM_REFERENCE.BASE'
      );
  END_LOCAL;
    IF SIZEOF(general_datum_reference_bag) = 1 THEN
      RETURN (general_datum_reference_bag[1]);
    ELSE
      RETURN (?);
    END_IF;
END_FUNCTION; -- 10303-47: shape_aspect_definition_schema

FUNCTION sts_get_product_definition_shape (
    input : geometric_tolerance_target 
    ) : product_definition_shape;
    CASE TRUE OF
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSIONAL_LOCATION' IN
         TYPEOF(input) :
          RETURN (input\shape_aspect_relationship.relating_shape_aspect\
            shape_aspect.of_shape);
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DIMENSIONAL_SIZE' IN 
        TYPEOF(input) :
          RETURN (input\dimensional_size.applies_to\shape_aspect.of_shape);
      
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_SHAPE'
         IN TYPEOF(input) :
          RETURN (input);
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_ASPECT' IN TYPEOF(
        input) :
          RETURN (input\shape_aspect.of_shape);
    OTHERWISE :
        RETURN (?);
    END_CASE;
END_FUNCTION; -- 10303-47: shape_tolerance_schema

FUNCTION subspace_of (
    space1 : maths_space;
    space2 : maths_space 
    ) : LOGICAL;
  LOCAL
    spc1 : maths_space := simplify_maths_space(space1);
    spc2 : maths_space := simplify_maths_space(space2);
    types1 : SET OF STRING := stripped_typeof(spc1);
    types2 : SET OF STRING := stripped_typeof(spc2);
    lgcl : LOGICAL;
    cum : LOGICAL;
    es_val : elementary_space_enumerators;
    bnd1 : REAL;
    bnd2 : REAL;
    n : INTEGER;
    sp1 : maths_space;
    sp2 : maths_space;
    prgn1 : polar_complex_number_region;
    prgn2 : polar_complex_number_region;
    aitv : finite_real_interval;
  END_LOCAL;
    IF NOT EXISTS(spc1) OR NOT EXISTS(spc2) THEN
      RETURN (FALSE);
    END_IF;
    IF spc2 = the_generics THEN
      RETURN (TRUE);
    END_IF;
    IF 'ELEMENTARY_SPACE' IN types1 THEN
      IF NOT ('ELEMENTARY_SPACE' IN types2) THEN
        RETURN (FALSE);
      END_IF;
      es_val := spc2\elementary_space.space_id;
      IF spc1\elementary_space.space_id = es_val THEN
        RETURN (TRUE);
      END_IF;
      CASE spc1\elementary_space.space_id OF
        es_numbers :
            RETURN (FALSE);
        es_complex_numbers :
            RETURN (es_val = es_numbers);
        es_reals :
            RETURN (es_val = es_numbers);
        es_integers :
            RETURN (es_val = es_numbers);
        es_logicals :
            RETURN (FALSE);
        es_booleans :
            RETURN (es_val = es_logicals);
        es_strings :
            RETURN (FALSE);
        es_binarys :
            RETURN (FALSE);
        es_maths_spaces :
            RETURN (FALSE);
        es_maths_functions :
            RETURN (FALSE);
        es_generics :
            RETURN (FALSE);
      END_CASE;
      RETURN (UNKNOWN);
    END_IF;
    IF 'FINITE_INTEGER_INTERVAL' IN types1 THEN
      cum := TRUE;
      REPEAT i := spc1\finite_integer_interval.min TO spc1\
        finite_integer_interval.max;
        cum := cum AND member_of(i, spc2);
        IF cum = FALSE THEN
          RETURN (FALSE);
        END_IF;
      END_REPEAT;
      RETURN (cum);
    END_IF;
    IF 'INTEGER_INTERVAL_FROM_MIN' IN types1 THEN
      IF 'ELEMENTARY_SPACE' IN types2 THEN
        es_val := spc2\elementary_space.space_id;
        RETURN ((es_val = es_numbers) OR (es_val = es_integers));
      END_IF;
      IF 'INTEGER_INTERVAL_FROM_MIN' IN types2 THEN
        RETURN (spc1\integer_interval_from_min.min >= spc2\
          integer_interval_from_min.min);
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF 'INTEGER_INTERVAL_TO_MAX' IN types1 THEN
      IF 'ELEMENTARY_SPACE' IN types2 THEN
        es_val := spc2\elementary_space.space_id;
        RETURN ((es_val = es_numbers) OR (es_val = es_integers));
      END_IF;
      IF 'INTEGER_INTERVAL_TO_MAX' IN types2 THEN
        RETURN (spc1\integer_interval_to_max.max <= spc2\
          integer_interval_to_max.max);
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF 'FINITE_REAL_INTERVAL' IN types1 THEN
      IF 'ELEMENTARY_SPACE' IN types2 THEN
        es_val := spc2\elementary_space.space_id;
        RETURN ((es_val = es_numbers) OR (es_val = es_reals));
      END_IF;
      IF (('FINITE_REAL_INTERVAL' IN types2) OR ('REAL_INTERVAL_FROM_MIN' 
        IN types2)) OR ('REAL_INTERVAL_TO_MAX' IN types2) THEN
        IF min_exists(spc2) THEN
          bnd1 := spc1\finite_real_interval.min;
          bnd2 := real_min(spc2);
          IF (bnd1 < bnd2) OR ((bnd1 = bnd2) AND min_included(spc1)) AND 
            NOT min_included(spc2) THEN
            RETURN (FALSE);
          END_IF;
        END_IF;
        IF max_exists(spc2) THEN
          bnd1 := spc1\finite_real_interval.max;
          bnd2 := real_max(spc2);
          IF (bnd1 > bnd2) OR ((bnd1 = bnd2) AND max_included(spc1)) AND 
            NOT max_included(spc2) THEN
            RETURN (FALSE);
          END_IF;
        END_IF;
        RETURN (TRUE);
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF 'REAL_INTERVAL_FROM_MIN' IN types1 THEN
      IF 'ELEMENTARY_SPACE' IN types2 THEN
        es_val := spc2\elementary_space.space_id;
        RETURN ((es_val = es_numbers) OR (es_val = es_reals));
      END_IF;
      IF 'REAL_INTERVAL_FROM_MIN' IN types2 THEN
        bnd1 := spc1\real_interval_from_min.min;
        bnd2 := spc2\real_interval_from_min.min;
        RETURN ((bnd2 < bnd1) OR (bnd2 = bnd1) AND (min_included(spc2) OR 
          NOT min_included(spc1)));
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF 'REAL_INTERVAL_TO_MAX' IN types1 THEN
      IF 'ELEMENTARY_SPACE' IN types2 THEN
        es_val := spc2\elementary_space.space_id;
        RETURN ((es_val = es_numbers) OR (es_val = es_reals));
      END_IF;
      IF 'REAL_INTERVAL_TO_MAX' IN types2 THEN
        bnd1 := spc1\real_interval_to_max.max;
        bnd2 := spc2\real_interval_to_max.max;
        RETURN ((bnd2 > bnd1) OR (bnd2 = bnd1) AND (max_included(spc2) OR 
          NOT max_included(spc1)));
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF 'CARTESIAN_COMPLEX_NUMBER_REGION' IN types1 THEN
      IF 'ELEMENTARY_SPACE' IN types2 THEN
        es_val := spc2\elementary_space.space_id;
        RETURN ((es_val = es_numbers) OR (es_val = es_complex_numbers));
      END_IF;
      IF 'CARTESIAN_COMPLEX_NUMBER_REGION' IN types2 THEN
        RETURN (subspace_of(spc1\cartesian_complex_number_region.
          real_constraint, spc2\cartesian_complex_number_region.
          real_constraint) AND subspace_of(spc1\
          cartesian_complex_number_region.imag_constraint, spc2\
          cartesian_complex_number_region.imag_constraint));
      END_IF;
      IF 'POLAR_COMPLEX_NUMBER_REGION' IN types2 THEN
        RETURN (subspace_of(enclose_cregion_in_pregion(spc1, spc2\
          polar_complex_number_region.centre), spc2));
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF 'POLAR_COMPLEX_NUMBER_REGION' IN types1 THEN
      IF 'ELEMENTARY_SPACE' IN types2 THEN
        es_val := spc2\elementary_space.space_id;
        RETURN ((es_val = es_numbers) OR (es_val = es_complex_numbers));
      END_IF;
      IF 'CARTESIAN_COMPLEX_NUMBER_REGION' IN types2 THEN
        RETURN (subspace_of(enclose_pregion_in_cregion(spc1), spc2));
      END_IF;
      IF 'POLAR_COMPLEX_NUMBER_REGION' IN types2 THEN
        prgn1 := spc1;
        prgn2 := spc2;
        IF prgn1.centre = prgn2.centre THEN
          IF prgn2.direction_constraint.max > PI THEN
            aitv := make_finite_real_interval(-PI, open, prgn2.
              direction_constraint.max - 2.0 * PI, prgn2.
              direction_constraint.max_closure);
            RETURN (subspace_of(prgn1.distance_constraint, prgn2.
              distance_constraint) AND (subspace_of(prgn1.
              direction_constraint, prgn2.direction_constraint) OR 
              subspace_of(prgn1.direction_constraint, aitv)));
          ELSE
            RETURN (subspace_of(prgn1.distance_constraint, prgn2.
              distance_constraint) AND subspace_of(prgn1.
              direction_constraint, prgn2.direction_constraint));
          END_IF;
        END_IF;
        RETURN (subspace_of(enclose_pregion_in_pregion(prgn1, prgn2.centre)
          , prgn2));
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF 'FINITE_SPACE' IN types1 THEN
      cum := TRUE;
      REPEAT i := 1 TO SIZEOF(spc1\finite_space.members);
        cum := cum AND member_of(spc1\finite_space.members[i], spc2);
        IF cum = FALSE THEN
          RETURN (FALSE);
        END_IF;
      END_REPEAT;
      RETURN (cum);
    END_IF;
    IF 'PRODUCT_SPACE' IN types1 THEN
      IF 'PRODUCT_SPACE' IN types2 THEN
        IF space_dimension(spc1) = space_dimension(spc2) THEN
          cum := TRUE;
          REPEAT i := 1 TO space_dimension(spc1);
            cum := cum AND subspace_of(factor_space(spc1, i), factor_space(
              spc2, i));
            IF cum = FALSE THEN
              RETURN (FALSE);
            END_IF;
          END_REPEAT;
          RETURN (cum);
        END_IF;
      END_IF;
      IF 'EXTENDED_TUPLE_SPACE' IN types2 THEN
        IF space_dimension(spc1) >= space_dimension(spc2) THEN
          cum := TRUE;
          REPEAT i := 1 TO space_dimension(spc1);
            cum := cum AND subspace_of(factor_space(spc1, i), factor_space(
              spc2, i));
            IF cum = FALSE THEN
              RETURN (FALSE);
            END_IF;
          END_REPEAT;
          RETURN (cum);
        END_IF;
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF 'EXTENDED_TUPLE_SPACE' IN types1 THEN
      IF 'EXTENDED_TUPLE_SPACE' IN types2 THEN
        n := space_dimension(spc1);
        IF n < space_dimension(spc2) THEN
          n := space_dimension(spc2);
        END_IF;
        cum := TRUE;
        REPEAT i := 1 TO n + 1;
          cum := cum AND subspace_of(factor_space(spc1, i), factor_space(
            spc2, i));
          IF cum = FALSE THEN
            RETURN (FALSE);
          END_IF;
        END_REPEAT;
        RETURN (cum);
      END_IF;
      RETURN (FALSE);
    END_IF;
    IF 'FUNCTION_SPACE' IN types1 THEN
      IF 'ELEMENTARY_SPACE' IN types2 THEN
        RETURN (spc2\elementary_space.space_id = es_maths_functions);
      END_IF;
      IF 'FUNCTION_SPACE' IN types2 THEN
        cum := TRUE;
        sp1 := spc1\function_space.domain_argument;
        sp2 := spc2\function_space.domain_argument;
        CASE spc1\function_space.domain_constraint OF
          sc_equal :
              BEGIN
                CASE spc2\function_space.domain_constraint OF
                  sc_equal :
                      cum := cum AND equal_maths_spaces(sp1, sp2);
                  sc_subspace :
                      cum := cum AND subspace_of(sp1, sp2);
                  sc_member :
                      cum := cum AND member_of(sp1, sp2);
                END_CASE;
              END;
          sc_subspace :
              BEGIN
                CASE spc2\function_space.domain_constraint OF
                  sc_equal :
                      RETURN (FALSE);
                  sc_subspace :
                      cum := cum AND subspace_of(sp1, sp2);
                  sc_member :
                      BEGIN
                        IF NOT member_of(sp1, sp2) THEN
                          RETURN (FALSE);
                        END_IF;
                        cum := UNKNOWN;
                      END;
                END_CASE;
              END;
          sc_member :
              BEGIN
                CASE spc2\function_space.domain_constraint OF
                  sc_equal :
                      cum := (cum AND space_is_singleton(sp1)) AND 
                        equal_maths_spaces(singleton_member_of(sp1), sp2);
                  sc_subspace :
                      BEGIN
                        IF NOT member_of(sp2, sp1) THEN
                          RETURN (FALSE);
                        END_IF;
                        cum := UNKNOWN;
                      END;
                  sc_member :
                      cum := cum AND subspace_of(sp1, sp2);
                END_CASE;
              END;
        END_CASE;
        IF cum = FALSE THEN
          RETURN (FALSE);
        END_IF;
        sp1 := spc1\function_space.range_argument;
        sp2 := spc2\function_space.range_argument;
        CASE spc1\function_space.range_constraint OF
          sc_equal :
              BEGIN
                CASE spc2\function_space.range_constraint OF
                  sc_equal :
                      cum := cum AND equal_maths_spaces(sp1, sp2);
                  sc_subspace :
                      cum := cum AND subspace_of(sp1, sp2);
                  sc_member :
                      cum := cum AND member_of(sp1, sp2);
                END_CASE;
              END;
          sc_subspace :
              BEGIN
                CASE spc2\function_space.domain_constraint OF
                  sc_equal :
                      RETURN (FALSE);
                  sc_subspace :
                      cum := cum AND subspace_of(sp1, sp2);
                  sc_member :
                      BEGIN
                        IF NOT member_of(sp1, sp2) THEN
                          RETURN (FALSE);
                        END_IF;
                        cum := UNKNOWN;
                      END;
                END_CASE;
              END;
          sc_member :
              BEGIN
                CASE spc2\function_space.domain_constraint OF
                  sc_equal :
                      cum := (cum AND space_is_singleton(sp1)) AND 
                        equal_maths_spaces(singleton_member_of(sp1), sp2);
                  sc_subspace :
                      BEGIN
                        IF NOT member_of(sp2, sp1) THEN
                          RETURN (FALSE);
                        END_IF;
                        cum := UNKNOWN;
                      END;
                  sc_member :
                      cum := cum AND subspace_of(sp1, sp2);
                END_CASE;
              END;
        END_CASE;
        RETURN (cum);
      END_IF;
      RETURN (FALSE);
    END_IF;
    RETURN (UNKNOWN);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION subspace_of_es (
    spc : maths_space;
    es  : elementary_space_enumerators 
    ) : LOGICAL;
  LOCAL
    types : SET OF STRING := stripped_typeof(spc);
  END_LOCAL;
    IF NOT EXISTS(spc) OR NOT EXISTS(es) THEN
      RETURN (FALSE);
    END_IF;
    IF 'ELEMENTARY_SPACE' IN types THEN
      RETURN (es_subspace_of_es(spc\elementary_space.space_id, es));
    END_IF;
    IF 'FINITE_SPACE' IN types THEN
      RETURN (all_members_of_es(spc\finite_space.members, es));
    END_IF;
    CASE es OF
      es_numbers :
          RETURN (((((((('FINITE_INTEGER_INTERVAL' IN types) OR (
            'INTEGER_INTERVAL_FROM_MIN' IN types)) OR (
            'INTEGER_INTERVAL_TO_MAX' IN types)) OR ('FINITE_REAL_INTERVAL'
             IN types)) OR ('REAL_INTERVAL_FROM_MIN' IN types)) OR (
            'REAL_INTERVAL_TO_MAX' IN types)) OR (
            'CARTESIAN_COMPLEX_NUMBER_REGION' IN types)) OR (
            'POLAR_COMPLEX_NUMBER_REGION' IN types));
      es_complex_numbers :
          RETURN (('CARTESIAN_COMPLEX_NUMBER_REGION' IN types) OR (
            'POLAR_COMPLEX_NUMBER_REGION' IN types));
      es_reals :
          RETURN ((('FINITE_REAL_INTERVAL' IN types) OR (
            'REAL_INTERVAL_FROM_MIN' IN types)) OR ('REAL_INTERVAL_TO_MAX' 
            IN types));
      es_integers :
          RETURN ((('FINITE_INTEGER_INTERVAL' IN types) OR (
            'INTEGER_INTERVAL_FROM_MIN' IN types)) OR (
            'INTEGER_INTERVAL_TO_MAX' IN types));
      es_logicals :
          RETURN (FALSE);
      es_booleans :
          RETURN (FALSE);
      es_strings :
          RETURN (FALSE);
      es_binarys :
          RETURN (FALSE);
      es_maths_spaces :
          RETURN (FALSE);
      es_maths_functions :
          RETURN ('FUNCTION_SPACE' IN types);
      es_generics :
          RETURN (TRUE);
    END_CASE;
    RETURN (UNKNOWN);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION substitute (
    expr : generic_expression;
    vars : LIST [1:?] OF generic_variable;
    vals : LIST [1:?] OF maths_value 
    ) : generic_expression;
  LOCAL
    types : SET OF STRING := stripped_typeof(expr);
    opnds : LIST OF generic_expression;
    op1 : generic_expression;
    op2 : generic_expression;
    qvars : LIST OF generic_variable;
    srcdom : maths_space_or_function;
    prpfun : LIST [1:?] OF maths_function;
    finfun : maths_function_select;
  END_LOCAL;
    IF SIZEOF(vars) <> SIZEOF(vals) THEN
      RETURN (?);
    END_IF;
    IF 'GENERIC_LITERAL' IN types THEN
      RETURN (expr);
    END_IF;
    IF 'GENERIC_VARIABLE' IN types THEN
      REPEAT i := 1 TO SIZEOF(vars);
        IF expr :=: vars[i] THEN
          RETURN (vals[i]);
        END_IF;
      END_REPEAT;
      RETURN (expr);
    END_IF;
    IF 'QUANTIFIER_EXPRESSION' IN types THEN
      qvars := expr\quantifier_expression.variables;
      REPEAT i := SIZEOF(vars) TO 1 BY -1;
        IF vars[i] IN qvars THEN
          REMOVE( vars, i );
          REMOVE( vals, i );
        END_IF;
      END_REPEAT;
      opnds := expr\multiple_arity_generic_expression.operands;
      REPEAT i := 1 TO SIZEOF(opnds);
        IF NOT (opnds[i] IN qvars) THEN
          expr\multiple_arity_generic_expression.operands[i] := substitute(
            opnds[i], vars, vals);
        END_IF;
      END_REPEAT;
      RETURN (expr);
    END_IF;
    IF 'UNARY_GENERIC_EXPRESSION' IN types THEN
      op1 := expr\unary_generic_expression.operand;
      expr\unary_generic_expression.operand := substitute(op1, vars, vals);
    END_IF;
    IF 'BINARY_GENERIC_EXPRESSION' IN types THEN
      op1 := expr\binary_generic_expression.operands[1];
      expr\binary_generic_expression.operands[1] := substitute(op1, vars, 
        vals);
      op2 := expr\binary_generic_expression.operands[2];
      expr\binary_generic_expression.operands[2] := substitute(op2, vars, 
        vals);
    END_IF;
    IF 'PARALLEL_COMPOSED_FUNCTION' IN types THEN
      srcdom := expr\parallel_composed_function.source_of_domain;
      prpfun := expr\parallel_composed_function.prep_functions;
      finfun := expr\parallel_composed_function.final_function;
      srcdom := substitute(srcdom, vars, vals);
      REPEAT i := 1 TO SIZEOF(prpfun);
        prpfun[i] := substitute(prpfun[i], vars, vals);
      END_REPEAT;
      IF 'MATHS_FUNCTION' IN stripped_typeof(finfun) THEN
        finfun := substitute(finfun, vars, vals);
      END_IF;
      RETURN (make_parallel_composed_function(srcdom, prpfun, finfun));
    END_IF;
    IF 'MULTIPLE_ARITY_GENERIC_EXPRESSION' IN types THEN
      opnds := expr\multiple_arity_generic_expression.operands;
      REPEAT i := 1 TO SIZEOF(opnds);
        expr\multiple_arity_generic_expression.operands[i] := substitute(
          opnds[i], vars, vals);
      END_REPEAT;
    END_IF;
    RETURN (expr);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION surface_condition_correlation (
    pd  : property_definition;
    rep : representation 
    ) : LOGICAL;
    CASE pd.name OF
      'visual appearance', 'tactile appearance', 'contact ratio', 
        'hardness', 'treatment result', 'surface texture' :
          RETURN (pd.name = rep.name);
    OTHERWISE :
        RETURN (UNKNOWN);
    END_CASE;
END_FUNCTION; -- 10303-1110: surface_conditions_mim

FUNCTION surface_weights_positive (
    b : rational_b_spline_surface 
    ) : BOOLEAN;
  LOCAL
    result : BOOLEAN := TRUE;
  END_LOCAL;
    REPEAT i := 0 TO b.u_upper;
      REPEAT j := 0 TO b.v_upper;
        IF b.weights[i][j] <= 0.0 THEN
          result := FALSE;
          RETURN (result);
        END_IF;
      END_REPEAT;
    END_REPEAT;
    RETURN (result);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION topology_reversed (
    an_item : reversible_topology 
    ) : reversible_topology;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.EDGE' IN TYPEOF(an_item
      ) THEN
      RETURN (edge_reversed(an_item));
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PATH' IN TYPEOF(an_item
      ) THEN
      RETURN (path_reversed(an_item));
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE_BOUND' IN TYPEOF(
      an_item) THEN
      RETURN (face_bound_reversed(an_item));
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FACE' IN TYPEOF(an_item
      ) THEN
      RETURN (face_reversed(an_item));
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHELL' IN TYPEOF(
      an_item) THEN
      RETURN (shell_reversed(an_item));
    END_IF;
    IF 'SET' IN TYPEOF(an_item) THEN
      RETURN (set_of_topology_reversed(an_item));
    END_IF;
    IF 'LIST' IN TYPEOF(an_item) THEN
      RETURN (list_of_topology_reversed(an_item));
    END_IF;
    RETURN (?);
END_FUNCTION; -- 10303-42: topology_schema

FUNCTION type_check_function (
    the_type  : GENERIC;
    sub_names : SET OF STRING;
    criterion : INTEGER 
    ) : LOGICAL;
    IF NOT EXISTS(the_type) OR (SIZEOF(sub_names) = 0) THEN
      RETURN (UNKNOWN);
    ELSE
      CASE criterion OF
        0 :
            RETURN (SIZEOF(sub_names * TYPEOF(the_type)) > 0);
        1 :
            RETURN (SIZEOF(sub_names * TYPEOF(the_type)) = 0);
        2 :
            RETURN (SIZEOF(sub_names * TYPEOF(the_type)) = 1);
        3 :
            RETURN (SIZEOF(sub_names * TYPEOF(the_type)) <= 1);
      OTHERWISE :
          RETURN (UNKNOWN);
      END_CASE;
    END_IF;
END_FUNCTION; -- 10303-41: support_resource_schema

FUNCTION unambiguously_specified_multi_level_reference_designator (
    links : LIST [1:?] OF next_assembly_usage_occurrence 
    ) : BOOLEAN;
    REPEAT i := 1 TO SIZEOF(links) - 1;
      CASE TRUE OF
        (('MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION' 
          IN TYPEOF(links[i]\product_definition_relationship.
          relating_product_definition)) AND (
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION' 
          IN TYPEOF(links[i]\product_definition_relationship.
          related_product_definition))) AND (
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION' 
          IN TYPEOF(links[(i + 1)]\product_definition_relationship.
          relating_product_definition)) :
            BEGIN
              IF NOT ((links[i]\product_definition_relationship.
                related_product_definition :=: links[(i + 1)]\
                product_definition_relationship.relating_product_definition
                ) OR (SIZEOF(QUERY (pdr <* USEDIN(links[i]\
                product_definition_relationship.related_product_definition,
                 
                'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_RELATIONSHIP.RELATED_PRODUCT_DEFINITION'
                )| (pdr\product_definition_relationship.
                relating_product_definition :=: links[(i + 1)]\
                product_definition_relationship.relating_product_definition
                ))) = 1) AND (links[i]\product_definition_relationship.
                related_product_definition\product_definition.formation\
                product_definition_formation.of_product :=: links[(i + 1)]\
                product_definition_relationship.relating_product_definition
                \product_definition.formation\product_definition_formation.
                of_product)) THEN
                RETURN (FALSE);
              END_IF;
            END;
        (
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_REFERENCE'
           IN TYPEOF(links[i]\product_definition_relationship.
          related_product_definition)) AND (
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_REFERENCE'
           IN TYPEOF(links[(i + 1)]\product_definition_relationship.
          relating_product_definition)) :
            BEGIN
              IF NOT ((links[i]\product_definition_relationship.
                related_product_definition :=: links[(i + 1)]\
                product_definition_relationship.relating_product_definition
                ) OR (((SIZEOF(QUERY (pdr <* USEDIN(links[i]\
                product_definition_relationship.related_product_definition,
                 
                'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_RELATIONSHIP.RELATED_PRODUCT_DEFINITION'
                )| (pdr\product_definition_relationship.
                relating_product_definition :=: links[(i + 1)]\
                product_definition_relationship.relating_product_definition
                ))) = 1) AND (links[i]\product_definition_relationship.
                related_product_definition\product_definition_reference.
                product_id = links[(i + 1)]\product_definition_relationship
                .relating_product_definition\product_definition_reference.
                product_id)) AND (links[i]\product_definition_relationship.
                related_product_definition\product_definition_reference.
                id_owning_organization_name = links[(i + 1)]\
                product_definition_relationship.relating_product_definition
                \product_definition_reference.id_owning_organization_name))
                 AND (links[i]\product_definition_relationship.
                related_product_definition\product_definition_reference.
                product_definition_id <> links[(i + 1)]\
                product_definition_relationship.relating_product_definition
                \product_definition_reference.product_definition_id)) THEN
                RETURN (FALSE);
              END_IF;
            END;
        (
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION_REFERENCE'
           IN TYPEOF(links[i]\product_definition_relationship.
          relating_product_definition)) AND (
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRODUCT_DEFINITION' 
          IN TYPEOF(links[i]\product_definition_relationship.
          related_product_definition)) :
            RETURN (FALSE);
      OTHERWISE :
          RETURN (FALSE);
      END_CASE;
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION; -- 10303-44: product_structure_schema

FUNCTION using_items (
    item          : founded_item_select;
    checked_items : SET OF founded_item_select 
    ) : SET OF founded_item_select;
  LOCAL
    new_check_items : SET OF founded_item_select;
    result_items : SET OF founded_item_select;
    next_items : SET OF founded_item_select;
  END_LOCAL;
    result_items := [];
    new_check_items := checked_items + item;
    next_items := QUERY (z <* bag_to_set(USEDIN(item, ''))| (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_ITEM' IN 
      TYPEOF(z)) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FOUNDED_ITEM' IN TYPEOF(
      z)));
    IF SIZEOF(next_items) > 0 THEN
      REPEAT i := 1 TO HIINDEX(next_items);
        IF NOT (next_items[i] IN new_check_items) THEN
          result_items := result_items + next_items[i] + using_items(
            next_items[i], new_check_items);
        END_IF;
      END_REPEAT;
    END_IF;
    RETURN (result_items);
END_FUNCTION; -- 10303-43: representation_schema

FUNCTION using_representations (
    item : founded_item_select 
    ) : SET OF representation;
  LOCAL
    results : SET OF representation;
    result_bag : BAG OF representation;
    intermediate_items : SET OF founded_item_select;
  END_LOCAL;
    results := [];
    result_bag := USEDIN(item, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION.ITEMS');
    IF SIZEOF(result_bag) > 0 THEN
      REPEAT i := 1 TO HIINDEX(result_bag);
        results := results + result_bag[i];
      END_REPEAT;
    END_IF;
    intermediate_items := using_items(item, []);
    IF SIZEOF(intermediate_items) > 0 THEN
      REPEAT i := 1 TO HIINDEX(intermediate_items);
        result_bag := USEDIN(intermediate_items[i], 
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION.ITEMS'
          );
        IF SIZEOF(result_bag) > 0 THEN
          REPEAT j := 1 TO HIINDEX(result_bag);
            results := results + result_bag[j];
          END_REPEAT;
        END_IF;
      END_REPEAT;
    END_IF;
    RETURN (results);
END_FUNCTION; -- 10303-43: representation_schema

FUNCTION valid_calendar_date (
    date : calendar_date 
    ) : LOGICAL;
    CASE date.month_component OF
      1 :
          RETURN ((1 <= date.day_component) AND (date.day_component <= 31))
            ;
      2 :
          BEGIN
            IF leap_year(date.year_component) THEN
              RETURN ((1 <= date.day_component) AND (date.day_component <= 
                29));
            ELSE
              RETURN ((1 <= date.day_component) AND (date.day_component <= 
                28));
            END_IF;
          END;
      3 :
          RETURN ((1 <= date.day_component) AND (date.day_component <= 31))
            ;
      4 :
          RETURN ((1 <= date.day_component) AND (date.day_component <= 30))
            ;
      5 :
          RETURN ((1 <= date.day_component) AND (date.day_component <= 31))
            ;
      6 :
          RETURN ((1 <= date.day_component) AND (date.day_component <= 30))
            ;
      7 :
          RETURN ((1 <= date.day_component) AND (date.day_component <= 31))
            ;
      8 :
          RETURN ((1 <= date.day_component) AND (date.day_component <= 31))
            ;
      9 :
          RETURN ((1 <= date.day_component) AND (date.day_component <= 30))
            ;
      10 :
          RETURN ((1 <= date.day_component) AND (date.day_component <= 31))
            ;
      11 :
          RETURN ((1 <= date.day_component) AND (date.day_component <= 30))
            ;
      12 :
          RETURN ((1 <= date.day_component) AND (date.day_component <= 31))
            ;
    END_CASE;
    RETURN (FALSE);
END_FUNCTION; -- 10303-41: date_time_schema

FUNCTION valid_datum_target_parameters (
    pdf : placed_datum_target_feature 
    ) : BOOLEAN;
  LOCAL
    rep_set : SET OF representation := [];
    parameter_representations : SET OF representation;
  END_LOCAL;
    REPEAT i := 1 TO HIINDEX(pdf.representation_associations);
      rep_set := rep_set + pdf.representation_associations[i].
        used_representation;
    END_REPEAT;
    parameter_representations := QUERY (rep <* rep_set| 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS'
       IN TYPEOF(rep));
    IF SIZEOF(QUERY (srwp <* parameter_representations| (SIZEOF(QUERY (i <*
       srwp.items| (i.name = 'orientation') AND (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLACEMENT' IN TYPEOF(i))
      )) = 1))) <> 1 THEN
      RETURN (FALSE);
    END_IF;
    CASE pdf\shape_aspect.description OF
      'point' :
          RETURN (SIZEOF(QUERY (srwp <* parameter_representations| (SIZEOF(
            srwp.items) = 1))) = 1);
      'circle', 'circular curve' :
          RETURN ((SIZEOF(QUERY (srwp <* parameter_representations| (SIZEOF
            (srwp.items) = 2))) = 1) AND (SIZEOF(QUERY (srwp <* 
            parameter_representations| (SIZEOF(QUERY (i <* srwp.items| (i.
            name = 'target diameter') AND (SIZEOF([ 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
            , 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
             ] * TYPEOF(i)) = 2))) = 1))) = 1));
      'line' :
          RETURN (SIZEOF(QUERY (srwp <* parameter_representations| (SIZEOF(
            QUERY (i <* srwp.items| (i.name = 'target length') AND (SIZEOF(
            [ 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
            , 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
             ] * TYPEOF(i)) = 2))) = 1))) = 1);
      'rectangle' :
          RETURN (((SIZEOF(QUERY (srwp <* parameter_representations| (
            SIZEOF(srwp.items) = 3))) = 1) AND (SIZEOF(QUERY (srwp <* 
            parameter_representations| (SIZEOF(QUERY (i <* srwp.items| (i.
            name = 'target length') AND (SIZEOF([ 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
            , 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
             ] * TYPEOF(i)) = 2))) = 1))) = 1)) AND (SIZEOF(QUERY (srwp <* 
            parameter_representations| (SIZEOF(QUERY (i <* srwp.items| (i.
            name = 'target width') AND (SIZEOF([ 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
            , 
            'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
             ] * TYPEOF(i)) = 2))) = 1))) = 1));
    OTHERWISE :
        RETURN (FALSE);
    END_CASE;
END_FUNCTION; -- 10303-1051: geometric_tolerance_mim

FUNCTION valid_geometrically_bounded_wf_curve (
    crv : curve 
    ) : BOOLEAN;
    IF SIZEOF([ 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE', 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_CURVE', 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ELLIPSE', 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CIRCLE' ] * TYPEOF(crv))
       = 1 THEN
      RETURN (TRUE);
    ELSE
      IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TRIMMED_CURVE' IN 
        TYPEOF(crv) THEN
        IF SIZEOF([ 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINE', 
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PARABOLA', 
          'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.HYPERBOLA' ] * 
          TYPEOF(crv\trimmed_curve.basis_curve)) = 1 THEN
          RETURN (TRUE);
        ELSE
          RETURN (valid_geometrically_bounded_wf_curve(crv\trimmed_curve.
            basis_curve));
        END_IF;
      ELSE
        IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OFFSET_CURVE_3D' IN
           TYPEOF(crv) THEN
          RETURN (valid_geometrically_bounded_wf_curve(crv\offset_curve_3d.
            basis_curve));
        ELSE
          IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_REPLICA' IN
             TYPEOF(crv) THEN
            RETURN (valid_geometrically_bounded_wf_curve(crv\curve_replica.
              parent_curve));
          ELSE
            IF 
              'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COMPOSITE_CURVE'
               IN TYPEOF(crv) THEN
              RETURN (SIZEOF(QUERY (ccs <* crv\composite_curve.segments| 
                NOT valid_geometrically_bounded_wf_curve(ccs.parent_curve))
                ) = 0);
            END_IF;
          END_IF;
        END_IF;
      END_IF;
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-510: aic_geometrically_bounded_wireframe

FUNCTION valid_geometrically_bounded_wf_point (
    pnt : point 
    ) : BOOLEAN;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CARTESIAN_POINT' IN 
      TYPEOF(pnt) THEN
      RETURN (TRUE);
    ELSE
      IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_ON_CURVE' IN 
        TYPEOF(pnt) THEN
        RETURN (valid_geometrically_bounded_wf_curve(pnt\point_on_curve.
          basis_curve));
      ELSE
        IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_REPLICA' IN 
          TYPEOF(pnt) THEN
          RETURN (valid_geometrically_bounded_wf_point(pnt\point_replica.
            parent_pt));
        END_IF;
      END_IF;
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-510: aic_geometrically_bounded_wireframe

FUNCTION valid_identified_item_in_representation (
    identified_item     : item_identified_representation_usage_select;
    used_representation : representation 
    ) : BOOLEAN;
  LOCAL
    i : INTEGER := 1;
  END_LOCAL;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.REPRESENTATION_ITEM' IN
       TYPEOF(identified_item) THEN
      RETURN (used_representation IN using_representations(identified_item)
        );
    END_IF;
    IF (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LIST_REPRESENTATION_ITEM'
       IN TYPEOF(identified_item)) OR (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SET_REPRESENTATION_ITEM'
       IN TYPEOF(identified_item)) THEN
      REPEAT WHILE EXISTS(identified_item[i]);
        IF NOT (used_representation IN using_representations(
          identified_item[i])) THEN
          RETURN (FALSE);
        END_IF;
        i := i + 1;
      END_REPEAT;
      RETURN (TRUE);
    END_IF;
    RETURN (?);
END_FUNCTION; -- 10303-41: product_property_representation_schema

FUNCTION valid_measure_value (
    m : measure_value 
    ) : BOOLEAN;
    IF 'REAL' IN TYPEOF(m) THEN
      RETURN (m > 0.0);
    ELSE
      IF 'INTEGER' IN TYPEOF(m) THEN
        RETURN (m > 0);
      ELSE
        RETURN (TRUE);
      END_IF;
    END_IF;
END_FUNCTION; -- 10303-43: representation_schema

FUNCTION valid_selected_instance_representation (
    pd : product_definition_or_assembly_relationship 
    ) : LOGICAL;
  LOCAL
    properties : SET OF property_definition := bag_to_set(QUERY (prd <* 
      USEDIN(pd, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
      )| prd.name = 'occurrence selection'));
    property_definition_representations : SET OF 
      property_definition_representation := bag_to_set(QUERY (pdr <* USEDIN
      (properties[1], 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
      )| pdr.used_representation.name = 'selection criteria'));
    selected_representation : representation;
  END_LOCAL;
    IF SIZEOF(properties) <> 1 THEN
      RETURN (FALSE);
    END_IF;
    IF SIZEOF(property_definition_representations) <> 1 THEN
      RETURN (FALSE);
    END_IF;
    selected_representation := property_definition_representations[1]\
      property_definition_representation.used_representation;
    IF (SIZEOF(selected_representation\representation.items) < 1) OR (
      SIZEOF(selected_representation\representation.items) > 2) THEN
      RETURN (FALSE);
    END_IF;
    IF SIZEOF(QUERY (i <* selected_representation\representation.items| (
      SIZEOF([ 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
      , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VALUE_RANGE' ] * 
      TYPEOF(i)) = 1) AND (i.name = 'selection quantity'))) <> 1 THEN
      RETURN (FALSE);
    END_IF;
    IF SIZEOF(QUERY (i <* selected_representation\representation.items| (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
       IN TYPEOF(i)) AND (i.name = 'selection control'))) > 1 THEN
      RETURN (FALSE);
    END_IF;
    IF (SIZEOF(QUERY (i <* selected_representation\representation.items| (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
       IN TYPEOF(i)) AND (i.name = 'selection control'))) = 0) AND (SIZEOF(
      QUERY (i <* selected_representation\representation.items| (i.name = 
      'selection quantity') AND (SIZEOF([ 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.QUALIFIED_REPRESENTATION_ITEM'
      , 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VALUE_RANGE' ] * 
      TYPEOF(i)) = 0))) > 0) THEN
      RETURN (FALSE);
    END_IF;
    RETURN (TRUE);
END_FUNCTION; -- 10303-1063: product_occurrence_mim

FUNCTION valid_time (
    time : local_time 
    ) : BOOLEAN;
    IF EXISTS(time.second_component) THEN
      RETURN (EXISTS(time.minute_component));
    ELSE
      RETURN (TRUE);
    END_IF;
END_FUNCTION; -- 10303-41: date_time_schema

FUNCTION valid_tri_ids (
    objs : SET OF topological_representation_item 
    ) : BOOLEAN;
  LOCAL
    values : BAG OF identifier := [];
  END_LOCAL;
    REPEAT i := LOINDEX(objs) TO HIINDEX(objs);
      IF NOT (EXISTS(objs[i]\topological_representation_item.permanent_id) 
        OR EXISTS(objs[i]\topological_representation_item.
        permanent_aggregate_id)) THEN
        RETURN (FALSE);
      END_IF;
      values := values + objs[i]\topological_representation_item.
        permanent_id + objs[i]\topological_representation_item.
        permanent_aggregate_id;
    END_REPEAT;
    IF SIZEOF(bag_to_set(values)) <> SIZEOF(values) THEN
      RETURN (FALSE);
    END_IF;
    RETURN (TRUE);
END_FUNCTION; -- 10303-42: topology_schema

FUNCTION valid_units (
    m : measure_with_unit 
    ) : BOOLEAN;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE' IN 
      TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MASS_MEASURE' IN TYPEOF
      (m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TIME_MEASURE' IN TYPEOF
      (m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ELECTRIC_CURRENT_MEASURE'
       IN TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.THERMODYNAMIC_TEMPERATURE_MEASURE'
       IN TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CELSIUS_TEMPERATURE_MEASURE'
       IN TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AMOUNT_OF_SUBSTANCE_MEASURE'
       IN TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LUMINOUS_INTENSITY_MEASURE'
       IN TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE' IN
       TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SOLID_ANGLE_MEASURE' IN
       TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.AREA_MEASURE' IN TYPEOF
      (m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VOLUME_MEASURE' IN 
      TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(3.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RATIO_MEASURE' IN 
      TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITIVE_LENGTH_MEASURE'
       IN TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POSITIVE_PLANE_ANGLE_MEASURE'
       IN TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACCELERATION_MEASURE' 
      IN TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(1.0, 0.0, -2.0, 0.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CAPACITANCE_MEASURE' IN
       TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(-2.0, -1.0, 4.0, 2.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ELECTRIC_CHARGE_MEASURE'
       IN TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONDUCTANCE_MEASURE' IN
       TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(-2.0, -1.0, 3.0, 2.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ELECTRIC_POTENTIAL_MEASURE'
       IN TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(2.0, 1.0, -3.0, -1.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ENERGY_MEASURE' IN 
      TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(2.0, 1.0, -2.0, 0.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FORCE_MEASURE' IN 
      TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(1.0, 1.0, -2.0, 0.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.FREQUENCY_MEASURE' IN 
      TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ILLUMINANCE_MEASURE' IN
       TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(-2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.INDUCTANCE_MEASURE' IN 
      TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(2.0, 1.0, -2.0, -2.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LUMINOUS_FLUX_MEASURE' 
      IN TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAGNETIC_FLUX_MEASURE' 
      IN TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(2.0, 1.0, -2.0, -1.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MAGNETIC_FLUX_DENSITY_MEASURE'
       IN TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(0.0, 1.0, -2.0, -1.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POWER_MEASURE' IN 
      TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(2.0, 1.0, -3.0, 0.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PRESSURE_MEASURE' IN 
      TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(-1.0, 1.0, -2.0, 0.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RESISTANCE_MEASURE' IN 
      TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(2.0, 1.0, -3.0, -2.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VELOCITY_MEASURE' IN 
      TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RADIOACTIVITY_MEASURE' 
      IN TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ABSORBED_DOSE_MEASURE' 
      IN TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(2.0, 0.0, -2.0, 0.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DOSE_EQUIVALENT_MEASURE'
       IN TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <> 
        dimensional_exponents(2.0, 0.0, -2.0, 0.0, 0.0, 0.0, 0.0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    RETURN (TRUE);
END_FUNCTION; -- 10303-41: measure_schema

FUNCTION valid_wireframe_edge_curve (
    crv : curve 
    ) : BOOLEAN;
    IF SIZEOF([ 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LINE', 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CONIC', 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.B_SPLINE_CURVE', 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POLYLINE' ] * TYPEOF(crv
      )) = 1 THEN
      RETURN (TRUE);
    ELSE
      IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CURVE_REPLICA' IN 
        TYPEOF(crv) THEN
        RETURN (valid_wireframe_edge_curve(crv\curve_replica.parent_curve))
          ;
      ELSE
        IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.OFFSET_CURVE_3D' IN
           TYPEOF(crv) THEN
          RETURN (valid_wireframe_edge_curve(crv\offset_curve_3d.
            basis_curve));
        END_IF;
      END_IF;
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-501: aic_edge_based_wireframe

FUNCTION valid_wireframe_vertex_point (
    pnt : point 
    ) : BOOLEAN;
    IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.CARTESIAN_POINT' IN 
      TYPEOF(pnt) THEN
      RETURN (TRUE);
    ELSE
      IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.POINT_REPLICA' IN 
        TYPEOF(pnt) THEN
        RETURN (valid_wireframe_vertex_point(pnt\point_replica.parent_pt));
      END_IF;
    END_IF;
    RETURN (FALSE);
END_FUNCTION; -- 10303-501: aic_edge_based_wireframe

FUNCTION value_range_wr1 (
    agg : compound_item_definition 
    ) : BOOLEAN;
    BEGIN
      IF (SIZEOF(agg) = 2) AND ((SIZEOF(QUERY (i1 <* agg| (
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
         IN TYPEOF(i1)))) = 2) OR (SIZEOF(QUERY (i2 <* agg| (
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VALUE_REPRESENTATION_ITEM'
         IN TYPEOF(i2)))) = 2)) THEN
        RETURN (TRUE);
      ELSE
        RETURN (FALSE);
      END_IF;
    END;
END_FUNCTION; -- 10303-1106: extended_measure_representation_mim

FUNCTION value_range_wr2 (
    agg : compound_item_definition 
    ) : BOOLEAN;
    BEGIN
      IF (SIZEOF(QUERY (i <* agg| (i\representation_item.name = 
        'upper limit'))) = 1) AND (SIZEOF(QUERY (i <* agg| (i\
        representation_item.name = 'lower limit'))) = 1) THEN
        RETURN (TRUE);
      ELSE
        RETURN (FALSE);
      END_IF;
    END;
END_FUNCTION; -- 10303-1106: extended_measure_representation_mim

FUNCTION value_range_wr3 (
    agg : compound_item_definition 
    ) : BOOLEAN;
    BEGIN
      IF SIZEOF(QUERY (i1 <* agg| (
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
         IN TYPEOF(i1)) AND (SIZEOF(QUERY (i2 <* agg| ((
        'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
         IN TYPEOF(i2)) AND (i1 :<>: i2)) AND (i1\measure_with_unit.
        unit_component :=: i2\measure_with_unit.unit_component))) = 1))) = 
        2 THEN
        RETURN (TRUE);
      ELSE
        RETURN (FALSE);
      END_IF;
    END;
END_FUNCTION; -- 10303-1106: extended_measure_representation_mim

FUNCTION values_space_of (
    expr : generic_expression 
    ) : maths_space;
  LOCAL
    e_prefix : STRING := 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.';
    typenames : SET OF STRING := TYPEOF(expr);
  END_LOCAL;
    IF schema_prefix + 'MATHS_VARIABLE' IN typenames THEN
      RETURN (expr\maths_variable.values_space);
    END_IF;
    IF e_prefix + 'EXPRESSION' IN typenames THEN
      IF e_prefix + 'NUMERIC_EXPRESSION' IN typenames THEN
        IF expr\numeric_expression.is_int THEN
          IF e_prefix + 'INT_LITERAL' IN typenames THEN
            RETURN (make_finite_space([ expr\int_literal.the_value ]));
          ELSE
            RETURN (the_integers);
          END_IF;
        ELSE
          IF e_prefix + 'REAL_LITERAL' IN typenames THEN
            RETURN (make_finite_space([ expr\real_literal.the_value ]));
          ELSE
            RETURN (the_reals);
          END_IF;
        END_IF;
      END_IF;
      IF e_prefix + 'BOOLEAN_EXPRESSION' IN typenames THEN
        IF e_prefix + 'BOOLEAN_LITERAL' IN typenames THEN
          RETURN (make_finite_space([ expr\boolean_literal.the_value ]));
        ELSE
          RETURN (the_booleans);
        END_IF;
      END_IF;
      IF e_prefix + 'STRING_EXPRESSION' IN typenames THEN
        IF e_prefix + 'STRING_LITERAL' IN typenames THEN
          RETURN (make_finite_space([ expr\string_literal.the_value ]));
        ELSE
          RETURN (the_strings);
        END_IF;
      END_IF;
      RETURN (?);
    END_IF;
    IF schema_prefix + 'MATHS_FUNCTION' IN typenames THEN
      IF expression_is_constant(expr) THEN
        RETURN (make_finite_space([ expr ]));
      ELSE
        RETURN (make_function_space(sc_equal, expr\maths_function.domain, 
          sc_equal, expr\maths_function.range));
      END_IF;
    END_IF;
    IF schema_prefix + 'FUNCTION_APPLICATION' IN typenames THEN
      RETURN (expr\function_application.func.range);
    END_IF;
    IF schema_prefix + 'MATHS_SPACE' IN typenames THEN
      IF expression_is_constant(expr) THEN
        RETURN (make_finite_space([ expr ]));
      ELSE
        RETURN (make_elementary_space(es_maths_spaces));
      END_IF;
    END_IF;
    IF schema_prefix + 'DEPENDENT_VARIABLE_DEFINITION' IN typenames THEN
      RETURN (values_space_of(expr\unary_generic_expression.operand));
    END_IF;
    IF schema_prefix + 'COMPLEX_NUMBER_LITERAL' IN typenames THEN
      RETURN (make_finite_space([ expr ]));
    END_IF;
    IF schema_prefix + 'LOGICAL_LITERAL' IN typenames THEN
      RETURN (make_finite_space([ expr\logical_literal.lit_value ]));
    END_IF;
    IF schema_prefix + 'BINARY_LITERAL' IN typenames THEN
      RETURN (make_finite_space([ expr\binary_literal.lit_value ]));
    END_IF;
    IF schema_prefix + 'MATHS_ENUM_LITERAL' IN typenames THEN
      RETURN (make_finite_space([ expr\maths_enum_literal.lit_value ]));
    END_IF;
    IF schema_prefix + 'REAL_TUPLE_LITERAL' IN typenames THEN
      RETURN (make_finite_space([ expr\real_tuple_literal.lit_value ]));
    END_IF;
    IF schema_prefix + 'INTEGER_TUPLE_LITERAL' IN typenames THEN
      RETURN (make_finite_space([ expr\integer_tuple_literal.lit_value ]));
    END_IF;
    IF schema_prefix + 'ATOM_BASED_LITERAL' IN typenames THEN
      RETURN (make_finite_space([ expr\atom_based_literal.lit_value ]));
    END_IF;
    IF schema_prefix + 'MATHS_TUPLE_LITERAL' IN typenames THEN
      RETURN (make_finite_space([ expr\maths_tuple_literal.lit_value ]));
    END_IF;
    IF schema_prefix + 'PARTIAL_DERIVATIVE_EXPRESSION' IN typenames THEN
      RETURN (drop_numeric_constraints(values_space_of(expr\
        partial_derivative_expression.derivand)));
    END_IF;
    IF schema_prefix + 'DEFINITE_INTEGRAL_EXPRESSION' IN typenames THEN
      RETURN (drop_numeric_constraints(values_space_of(expr\
        definite_integral_expression.integrand)));
    END_IF;
    RETURN (?);
END_FUNCTION; -- 10303-50: mathematical_functions_schema

FUNCTION vector_difference (
    arg1 : vector_or_direction;
    arg2 : vector_or_direction 
    ) : vector;
  LOCAL
    result : vector;
    res : direction;
    vec1 : direction;
    vec2 : direction;
    mag : REAL;
    mag1 : REAL;
    mag2 : REAL;
    ndim : INTEGER;
  END_LOCAL;
    IF (NOT EXISTS(arg1) OR NOT EXISTS(arg2)) OR (arg1.dim <> arg2.dim) 
      THEN
      RETURN (?);
    ELSE
      BEGIN
        IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VECTOR' IN TYPEOF(
          arg1) THEN
          mag1 := arg1\vector.magnitude;
          vec1 := arg1\vector.orientation;
        ELSE
          mag1 := 1.0;
          vec1 := arg1;
        END_IF;
        IF 'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.VECTOR' IN TYPEOF(
          arg2) THEN
          mag2 := arg2\vector.magnitude;
          vec2 := arg2\vector.orientation;
        ELSE
          mag2 := 1.0;
          vec2 := arg2;
        END_IF;
        vec1 := normalise(vec1);
        vec2 := normalise(vec2);
        ndim := SIZEOF(vec1.direction_ratios);
        mag := 0.0;
        res := dummy_gri || direction(vec1.direction_ratios);
        REPEAT i := 1 TO ndim;
          res.direction_ratios[i] := mag1 * vec1.direction_ratios[i] - mag2
             * vec2.direction_ratios[i];
          mag := mag + res.direction_ratios[i] * res.direction_ratios[i];
        END_REPEAT;
        IF mag > 0.0 THEN
          result := dummy_gri || vector(res, SQRT(mag));
        ELSE
          result := dummy_gri || vector(vec1, 0.0);
        END_IF;
      END;
    END_IF;
    RETURN (result);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION verify_angle_measure_action_property (
    cad       : characterized_action_definition;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (verify_rep_item_for_action_property(cad, prop_name, [ 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
      , 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
       ]));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_angle_measure_rep_item (
    rep       : representation;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (it <* rep.items| (it.name = prop_name) AND 
      NOT (SIZEOF([ 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
      , 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
       ] * TYPEOF(it)) = 2))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_angle_measure_resource_property (
    crd       : characterized_resource_definition;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (verify_rep_item_for_resource_property(crd, prop_name, [ 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
      , 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
       ]));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_angle_measure_tool_body_item (
    mt        : machining_tool;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (verify_rep_item_for_tool_body(mt, prop_name, [ 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
      , 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'
       ]));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_ballnose_endmill_dimensions (
    mt : machining_tool 
    ) : LOGICAL;
  LOCAL
    rads : SET OF representation_item := get_tool_body_item(mt, 
      'edge radius');
    dias : SET OF representation_item := get_tool_body_item(mt, 
      'effective cutting diameter');
  END_LOCAL;
    RETURN ((0 = SIZEOF(rads)) OR ((1 = SIZEOF(rads)) AND (1 = SIZEOF(dias)
      )) AND (rads[1].value_component = dias[1].value_component / 2));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_bullnose_endmill_dimensions (
    mt : machining_tool 
    ) : LOGICAL;
  LOCAL
    rads : SET OF representation_item := get_tool_body_item(mt, 
      'edge radius');
    dias : SET OF representation_item := get_tool_body_item(mt, 
      'effective cutting diameter');
  END_LOCAL;
    RETURN (((1 = SIZEOF(rads)) AND (1 = SIZEOF(dias))) AND (rads[1].
      value_component < dias[1].value_component / 2));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_count_measure_action_property (
    cad       : characterized_action_definition;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (prop <* get_action_property(cad, prop_name)| 
      NOT (0 < SIZEOF(QUERY (prep <* USEDIN(prop, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY'
      )| (0 < SIZEOF(QUERY (it <* prep.representation.items| (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
       IN TYPEOF(it)) AND (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COUNT_MEASURE' IN TYPEOF
      (it.value_component)))))))))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_count_measure_rep_item (
    rep       : representation;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (it <* rep.items| (it.name = prop_name) AND 
      NOT ((
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
       IN TYPEOF(it)) AND (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COUNT_MEASURE' IN TYPEOF
      (it.value_component))))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_count_measure_resource_property (
    crd       : characterized_resource_definition;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (prop <* get_resource_property(crd, prop_name)
      | NOT (0 < SIZEOF(QUERY (prep <* USEDIN(prop, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY'
      )| (0 < SIZEOF(QUERY (it <* prep.representation.items| (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
       IN TYPEOF(it)) AND (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COUNT_MEASURE' IN TYPEOF
      (it.value_component)))))))))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_count_measure_tool_body_item (
    mt        : machining_tool;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (it <* get_tool_body_item(mt, prop_name)| NOT 
      ((
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
       IN TYPEOF(it)) AND (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.COUNT_MEASURE' IN TYPEOF
      (it.value_component))))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_descriptive_action_property (
    cad       : characterized_action_definition;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (verify_rep_item_for_action_property(cad, prop_name, [ 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
       ]));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_enumeration_action_property (
    cad         : characterized_action_definition;
    prop_name   : STRING;
    prop_values : SET OF STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (prop <* get_action_property(cad, prop_name)| 
      NOT (0 < SIZEOF(QUERY (prep <* USEDIN(prop, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY'
      )| (0 < SIZEOF(QUERY (it <* prep.representation.items| (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
       IN TYPEOF(it)) AND (it.description IN prop_values))))))))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_enumeration_resource_property (
    crd         : characterized_resource_definition;
    prop_name   : STRING;
    prop_values : SET OF STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (prop <* get_resource_property(crd, prop_name)
      | NOT (0 < SIZEOF(QUERY (prep <* USEDIN(prop, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY'
      )| (0 < SIZEOF(QUERY (it <* prep.representation.items| (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
       IN TYPEOF(it)) AND (it.description IN prop_values))))))))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_enumeration_tool_body_item (
    mt          : machining_tool;
    prop_name   : STRING;
    prop_values : SET OF STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (it <* get_tool_body_item(mt, prop_name)| NOT 
      ((
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
       IN TYPEOF(it)) AND (it.description IN prop_values)))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_length_measure_action_property (
    cad       : characterized_action_definition;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (verify_rep_item_for_action_property(cad, prop_name, [ 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
      , 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
       ]));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_length_measure_rep_item (
    rep       : representation;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (it <* rep.items| (it.name = prop_name) AND 
      NOT (SIZEOF([ 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
      , 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
       ] * TYPEOF(it)) = 2))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_length_measure_resource_property (
    crd       : characterized_resource_definition;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (verify_rep_item_for_resource_property(crd, prop_name, [ 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
      , 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
       ]));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_length_measure_tool_body_item (
    mt        : machining_tool;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (verify_rep_item_for_tool_body(mt, prop_name, [ 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
      , 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.LENGTH_MEASURE_WITH_UNIT'
       ]));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_linear_speed_measure_rep_item (
    rep       : representation;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (it <* rep.items| (it.name = prop_name) AND 
      NOT ((
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
       IN TYPEOF(it)) AND (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NUMERIC_MEASURE' IN 
      TYPEOF(it.value_component))))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_numeric_measure_action_property (
    cad       : characterized_action_definition;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (prop <* get_action_property(cad, prop_name)| 
      NOT (0 < SIZEOF(QUERY (prep <* USEDIN(prop, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY'
      )| (0 < SIZEOF(QUERY (it <* prep.representation.items| (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
       IN TYPEOF(it)) AND (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NUMERIC_MEASURE' IN 
      TYPEOF(it.value_component)))))))))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_optional_action_property (
    cad       : characterized_action_definition;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (1 >= SIZEOF(get_action_property(cad, prop_name)));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_optional_in_process_geometry (
    mpe : machining_process_executable 
    ) : LOGICAL;
    RETURN (((verify_optional_action_property(mpe, 'as-is shape') AND 
      verify_optional_action_property(mpe, 'to-be shape')) AND 
      verify_optional_action_property(mpe, 'removal shape')) AND (0 = 
      SIZEOF(QUERY (prop <* USEDIN(mpe, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_PROPERTY.DEFINITION'
      )| (prop.name IN [ 'as-is shape', 'to-be shape', 'removal shape' ]) 
      AND (0 = SIZEOF(QUERY (prep <* USEDIN(prop, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY'
      )| (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.SHAPE_REPRESENTATION' IN
       TYPEOF(prep.representation)))))))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_optional_relating_amr (
    am        : action_method;
    amr_types : SET OF STRING 
    ) : LOGICAL;
    RETURN (1 >= get_count_of_relating_amr(am, amr_types));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_optional_relating_amr_with_name (
    am        : action_method;
    amr_name  : STRING;
    amr_types : SET OF STRING 
    ) : LOGICAL;
    RETURN (1 >= get_count_of_relating_amr_with_name(am, amr_name, 
      amr_types));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_optional_rep_item (
    rep       : representation;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (1 >= SIZEOF(QUERY (it <* rep.items| (it.name = prop_name))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_optional_resource_property (
    crd       : characterized_resource_definition;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (1 >= SIZEOF(get_resource_property(crd, prop_name)));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_optional_tool_body_item (
    mt        : machining_tool;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (1 >= SIZEOF(get_tool_body_item(mt, prop_name)));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_pressure_measure_action_property (
    cad       : characterized_action_definition;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (verify_numeric_measure_action_property(cad, prop_name));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_ratio_measure_action_property (
    cad       : characterized_action_definition;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (verify_rep_item_for_action_property(cad, prop_name, [ 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
      , 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RATIO_MEASURE_WITH_UNIT'
       ]));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_ratio_measure_rep_item (
    rep       : representation;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (it <* rep.items| (it.name = prop_name) AND 
      NOT (SIZEOF([ 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
      , 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RATIO_MEASURE_WITH_UNIT'
       ] * TYPEOF(it)) = 2))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_related_type_for_amr (
    am        : action_method;
    amr_types : SET OF STRING;
    types     : SET OF STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (amr <* get_relating_amr(am)| (SIZEOF(
      amr_types * TYPEOF(amr)) = SIZEOF(amr_types)) AND NOT (SIZEOF(types *
       TYPEOF(amr.related_method)) = SIZEOF(types)))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_related_type_for_amr_with_name (
    am        : action_method;
    amr_name  : STRING;
    amr_types : SET OF STRING;
    types     : SET OF STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (amr <* get_relating_amr(am)| ((amr.name = 
      amr_name) AND (SIZEOF(amr_types * TYPEOF(amr)) = SIZEOF(amr_types))) 
      AND NOT (SIZEOF(types * TYPEOF(amr.related_method)) = SIZEOF(types)))
      ));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_rep_item_for_action_property (
    cad            : characterized_action_definition;
    prop_name      : STRING;
    rep_item_types : SET OF STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (prop <* get_action_property(cad, prop_name)| 
      NOT (0 < SIZEOF(QUERY (prep <* USEDIN(prop, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY'
      )| (0 < SIZEOF(QUERY (it <* prep.representation.items| (SIZEOF(
      rep_item_types * TYPEOF(it)) = SIZEOF(rep_item_types)))))))))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_rep_item_for_resource_property (
    crd            : characterized_resource_definition;
    prop_name      : STRING;
    rep_item_types : SET OF STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (prop <* get_resource_property(crd, prop_name)
      | NOT (0 < SIZEOF(QUERY (prep <* USEDIN(prop, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY'
      )| (0 < SIZEOF(QUERY (it <* prep.representation.items| (SIZEOF(
      rep_item_types * TYPEOF(it)) = SIZEOF(rep_item_types)))))))))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_rep_item_for_tool_body (
    mt             : machining_tool;
    prop_name      : STRING;
    rep_item_types : SET OF STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (it <* get_tool_body_item(mt, prop_name)| NOT 
      (SIZEOF(rep_item_types * TYPEOF(it)) = SIZEOF(rep_item_types)))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_rep_name_for_action_property (
    cad        : characterized_action_definition;
    prop_name  : STRING;
    desc_names : SET OF STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (prop <* get_action_property(cad, prop_name)| 
      NOT (0 < SIZEOF(QUERY (prep <* USEDIN(prop, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY'
      )| (prep.representation.name IN desc_names)))))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_rep_type_for_action_property (
    cad       : characterized_action_definition;
    prop_name : STRING;
    rep_types : SET OF STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (prop <* get_action_property(cad, prop_name)| 
      NOT (0 < SIZEOF(QUERY (prep <* USEDIN(prop, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY'
      )| (SIZEOF(rep_types * TYPEOF(prep.representation)) = SIZEOF(
      rep_types))))))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_rep_type_for_resource_property (
    crd       : characterized_resource_definition;
    prop_name : STRING;
    rep_types : SET OF STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (prop <* get_resource_property(crd, prop_name)
      | NOT (0 < SIZEOF(QUERY (prep <* USEDIN(prop, 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.RESOURCE_PROPERTY_REPRESENTATION.PROPERTY'
      )| (SIZEOF(rep_types * TYPEOF(prep.representation)) = SIZEOF(
      rep_types))))))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_required_action_property (
    cad       : characterized_action_definition;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (1 = SIZEOF(get_action_property(cad, prop_name)));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_required_relating_amr (
    am        : action_method;
    amr_types : SET OF STRING 
    ) : LOGICAL;
    RETURN (1 = get_count_of_relating_amr(am, amr_types));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_required_relating_amr_with_name (
    am        : action_method;
    amr_name  : STRING;
    amr_types : SET OF STRING 
    ) : LOGICAL;
    RETURN (1 = get_count_of_relating_amr_with_name(am, amr_name, amr_types
      ));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_required_rep_item (
    rep       : representation;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (1 = SIZEOF(QUERY (it <* rep.items| (it.name = prop_name))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_required_resource_property (
    crd       : characterized_resource_definition;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (1 = SIZEOF(get_resource_property(crd, prop_name)));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_required_tool_body_item (
    mt        : machining_tool;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (1 = SIZEOF(get_tool_body_item(mt, prop_name)));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_rotary_speed_measure_rep_item (
    rep       : representation;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (it <* rep.items| (it.name = prop_name) AND 
      NOT ((
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
       IN TYPEOF(it)) AND (
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.NUMERIC_MEASURE' IN 
      TYPEOF(it.value_component))))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_time_measure_action_property (
    cad       : characterized_action_definition;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (verify_rep_item_for_action_property(cad, prop_name, [ 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
      , 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TIME_MEASURE_WITH_UNIT' 
      ]));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_time_measure_rep_item (
    rep       : representation;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (0 = SIZEOF(QUERY (it <* rep.items| (it.name = prop_name) AND 
      NOT (SIZEOF([ 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
      , 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TIME_MEASURE_WITH_UNIT' 
      ] * TYPEOF(it)) = 2))));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION verify_time_measure_resource_property (
    crd       : characterized_resource_definition;
    prop_name : STRING 
    ) : LOGICAL;
    RETURN (verify_rep_item_for_resource_property(crd, prop_name, [ 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.MEASURE_REPRESENTATION_ITEM'
      , 
      'MODEL_BASED_INTEGRATED_MANUFACTURING_SCHEMA.TIME_MEASURE_WITH_UNIT' 
      ]));
END_FUNCTION; -- 10303-238: model_based_integrated_manufacturing_schema

FUNCTION volume_weights_positive (
    b : rational_b_spline_volume 
    ) : BOOLEAN;
  LOCAL
    result : BOOLEAN := TRUE;
  END_LOCAL;
    REPEAT i := 0 TO b.u_upper;
      REPEAT j := 0 TO b.v_upper;
        REPEAT k := 0 TO b.w_upper;
          IF b.weights[i][j][k] <= 0.0 THEN
            result := FALSE;
            RETURN (result);
          END_IF;
        END_REPEAT;
      END_REPEAT;
    END_REPEAT;
    RETURN (result);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION weights_positive (
    weights : LIST OF REAL 
    ) : BOOLEAN;
  LOCAL
    result : BOOLEAN := TRUE;
  END_LOCAL;
    REPEAT i := 1 TO SIZEOF(weights);
      IF weights[i] <= 0.0 THEN
        result := FALSE;
        RETURN (result);
      END_IF;
    END_REPEAT;
    RETURN (result);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION ypr_index (
    ypr : ypr_enumeration 
    ) : INTEGER;
    CASE ypr OF
      yaw :
          RETURN (1);
      pitch :
          RETURN (2);
      roll :
          RETURN (3);
    END_CASE;
    RETURN (?);
END_FUNCTION; -- 10303-105: kinematic_state_schema

END_SCHEMA; -- model_based_integrated_manufacturing_schema

© ISO 2022 — All rights reserved