SCHEMA integrated_cnc_schema;

(*  AIM long form for ISO/DIS 10303-238
    ISO TC184/SC4/WG3 N1541
    Supercedes: WG3 N1112
    Author: David Loffredo (loffredo@steptools.com)

    2002-10-29 -- wg3n1540 (shortform), wg3n1541 (longform) schema
	          distributed with DIS ballot.
    2004-10-22 -- Fixed some EXPRESS warnings for DIS ballot.
    2004-10-12 -- Added GD&T definitions harmonized across AP-214,
		  AP-224, and Module 1050.  All mappings should now
		  be complete and ready for DIS ballot.
    2004-09-09 -- Finished adding subtypes for the action method
		  relationships as discussed in Bath.  Rebuilding
		  with the latest IRs and AICs, particularly the
		  AIC 522e2 definitions.
    2004-06-09 -- Short and longform to accompany the draft of the DIS
	          (wg3n1360) circulated for discussion at the Bath ISO
		  meeting.    	
    2003-12-16 -- Finalized turning definitions and functions.
    2003-11-20 -- Adding new AIM types and updating where rules 
	          on existing types to support the turning model.
		  See changelog in AP document for details.
    2003-09-03 -- Updating with comment resolutions from NWI/CD.
	          See changelog in AP document for details.
    2002-04-24 -- wg3n1111 (shortform), wg3n1112 (longform) schema
	          distributed with NWI/CD ballot.
    2002-03-07 -- Added temporary rule restricing use of turning 
		  features.  Fixed EXPRESS problems in rules (entity
		  value compares changed to instance compares, added
		  group qualifier and guard to nc_variable rule).
    2002-02-24 -- Changed return type of verify_* functions to logical, 
	          removed three extraneous numeric_expression subtypes
 		  brought in by SHTOLO, corrected warnings in a couple
	          local rules.
    2002-02-24 -- wg3n1090 (shortform), wg3n1091 (longform) schema
 		  distributed with NWI/CD documents for review at Myrtle 
		  Beach.

    All prior dates were distributed with AIM versions prior to v2.8
    Prior to this, the longform was hand-edited rather than generated
    from the shortform.  They are now synchronized and the longform is
    produced using the short-to-long tools.

    2001-10-18 -- Added material_designation_characterization
    2001-09-25 -- Added machining_operator_instruction and made
		  machining_adaptive_control_strategy a subtype 
		  of machining_strategy.
    2001-09-24 -- Added machining_offset_vector_representation
	          representation subtype, an action resource subtype
		  machining_cutting_component, and the representation 
		  item relationship type from Part 43.
    2001-09-17 -- Added the AP-214 value_range entity and the
		  surface_texture_representation.
    2001-08-23 -- Added classification assignment and new
 		  machining_feature_process subtype
    2001-07-25 -- Added machining_strategies subtypes and the freeform
		  milling tolerance representation.
    2001-07-13 -- Added machining_tool_dimension_representation
    2001-07-05 -- Updated measure_value to add numeric_measure
    2001-07-05 -- Updated with new Part 11 subtypes, DTL
    2001-06-22 -- Original, DTL
 *)

CONSTANT
    dummy_gri : geometric_representation_item := representation_item('') ||
                    geometric_representation_item();
    dummy_tri : topological_representation_item := representation_item('') 
                   || topological_representation_item();
END_CONSTANT;

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

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

TYPE approval_item = SELECT 
  (product_definition_formation);
END_TYPE; -- 10303-238: integrated_cnc_schema

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 
  (solid_model,
   csg_primitive);
END_TYPE; -- 10303-42: geometric_model_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_object,
   characterized_product_definition,
   shape_definition);
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_relationship);
END_TYPE; -- 10303-41: product_property_definition_schema

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

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

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

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

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

TYPE csg_primitive = SELECT 
  (block,
   right_circular_cylinder);
END_TYPE; -- 10303-42: geometric_model_schema

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

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

TYPE date_and_time_item = SELECT 
  (approval_person_organization,
   machining_operation,
   machining_process_executable,
   machining_toolpath,
   product_definition,
   product_definition_formation);
END_TYPE; -- 10303-238: integrated_cnc_schema

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

TYPE date_time_select = SELECT 
  (date,
   local_time,
   date_and_time);
END_TYPE; -- 10303-41: date_time_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 derived_property_select = SELECT 
  (property_definition,
   action_property,
   resource_property);
END_TYPE; -- 10303-41: product_property_definition_schema

TYPE description_attribute_select = SELECT 
  (application_context,
   approval_role,
   date_time_role,
   context_dependent_shape_representation,
   external_source,
   person_and_organization_role,
   person_and_organization,
   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 dimensional_characteristic = SELECT 
  (dimensional_location,
   dimensional_size);
END_TYPE; -- 10303-47: shape_dimension_schema

TYPE document_reference_item = SELECT 
  (externally_defined_dimension_definition,
   externally_defined_feature_definition,
   material_designation,
   property_definition);
END_TYPE; -- 10303-238: integrated_cnc_schema

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

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

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,
   product_category,
   property_definition,
   shape_aspect,
   shape_aspect_relationship,
   application_context,
   representation);
END_TYPE; -- 10303-41: basic_attribute_schema

TYPE identification_item = SELECT 
  (dimensional_size);
END_TYPE; -- 10303-238: integrated_cnc_schema

TYPE identifier = STRING;
END_TYPE; -- 10303-41: support_resource_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 length_measure = REAL;
END_TYPE; -- 10303-41: measure_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 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 measure_value = SELECT 
  (length_measure,
   time_measure,
   plane_angle_measure,
   solid_angle_measure,
   ratio_measure,
   parameter_value,
   numeric_measure,
   context_dependent_measure,
   descriptive_measure,
   positive_length_measure,
   positive_plane_angle_measure,
   count_measure);
END_TYPE; -- 10303-41: measure_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 name_attribute_select = SELECT 
  (address,
   context_dependent_shape_representation,
   derived_unit,
   person_and_organization,
   product_definition,
   property_definition_representation);
END_TYPE; -- 10303-41: basic_attribute_schema

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

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

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

TYPE person_and_organization_item = SELECT 
  (product_definition_formation);
END_TYPE; -- 10303-238: integrated_cnc_schema

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

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

TYPE positive_length_measure = 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 preferred_surface_curve_representation = ENUMERATION OF 
  (curve_3d,
   pcurve_s1,
   pcurve_s2);
END_TYPE; -- 10303-42: geometry_schema

TYPE process_or_process_relationship = SELECT 
  (product_definition_process,
   property_process,
   relationship_with_condition);
END_TYPE; -- 10303-49: method_definition_schema

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

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

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

TYPE relationship_with_condition = SELECT 
  (action_method_relationship,
   action_relationship);
END_TYPE; -- 10303-49: method_definition_schema

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

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

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

TYPE role_select = SELECT 
  (approval_assignment,
   approval_date_time,
   document_reference,
   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 
  (machining_operation,
   machining_process_executable,
   machining_toolpath,
   product_definition,
   product_definition_formation);
END_TYPE; -- 10303-238: integrated_cnc_schema

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 shape_definition = SELECT 
  (product_definition_shape,
   shape_aspect,
   shape_aspect_relationship);
END_TYPE; -- 10303-41: product_property_definition_schema

TYPE shape_tolerance_select = SELECT 
  (geometric_tolerance,
   plus_minus_tolerance);
END_TYPE; -- 10303-47: shape_tolerance_schema

TYPE shell = SELECT 
  (open_shell,
   closed_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 solid_angle_measure = REAL;
END_TYPE; -- 10303-41: measure_schema

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

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

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

TYPE surface_model = SELECT 
  (shell_based_surface_model);
END_TYPE; -- 10303-42: geometric_model_schema

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

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

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

TYPE transformation = SELECT 
  (item_defined_transformation,
   functionally_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 unit = SELECT 
  (named_unit,
   derived_unit);
END_TYPE; -- 10303-41: measure_schema

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

TYPE vector_or_direction = SELECT 
  (vector,
   direction);
END_TYPE; -- 10303-42: geometry_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;
END_TYPE; -- 10303-41: date_time_schema

ENTITY action;
    name          : label;
    description   : OPTIONAL text;
    chosen_method : action_method;
  DERIVE
    id : identifier := get_id_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 'INTEGRATED_CNC_SCHEMA.' + 
              'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
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_relationship;
    name            : label;
    description     : OPTIONAL text;
    relating_method : action_method;
    related_method  : action_method;
END_ENTITY; -- 10303-41: action_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_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_requirement_relationship;
    name                                 : label;
    description                          : text;
    relating_action_resource_requirement : action_resource_requirement;
    related_action_resource_requirement  : action_resource_requirement;
  WHERE
    WR1: relating_action_resource_requirement :<>: 
              related_action_resource_requirement;
END_ENTITY; -- 10303-49: process_property_schema

ENTITY action_resource_type;
    name : label;
END_ENTITY; -- 10303-41: action_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([ 
              'INTEGRATED_CNC_SCHEMA.MANIFOLD_SOLID_BREP', 
--              'INTEGRATED_CNC_SCHEMA.FACETED_BREP', 
              'INTEGRATED_CNC_SCHEMA.MAPPED_ITEM', 
              'INTEGRATED_CNC_SCHEMA.AXIS2_PLACEMENT_3D' ] * TYPEOF(it)) = 
              1))) = 0;
    WR2: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MANIFOLD_SOLID_BREP', 
              'INTEGRATED_CNC_SCHEMA.MAPPED_ITEM' ] * TYPEOF(it)) = 1))) > 
              0;
    WR3: SIZEOF(QUERY (msb <* QUERY (it <* SELF.items| (
              'INTEGRATED_CNC_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 (
              'INTEGRATED_CNC_SCHEMA.ADVANCED_FACE' IN TYPEOF(fcs)))) = 0))
              ) = 0))) = 0;
    WR4: SIZEOF(QUERY (msb <* QUERY (it <* items| (
              'INTEGRATED_CNC_SCHEMA.MANIFOLD_SOLID_BREP' IN TYPEOF(it)))| 
              ('INTEGRATED_CNC_SCHEMA.ORIENTED_CLOSED_SHELL' IN TYPEOF(msb\
              manifold_solid_brep.outer)))) = 0;
    WR5: SIZEOF(QUERY (brv <* QUERY (it <* items| (
              'INTEGRATED_CNC_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| (
              'INTEGRATED_CNC_SCHEMA.MAPPED_ITEM' IN TYPEOF(it)))| NOT (
              'INTEGRATED_CNC_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([ 'INTEGRATED_CNC_SCHEMA.ELEMENTARY_SURFACE', 
              'INTEGRATED_CNC_SCHEMA.B_SPLINE_SURFACE', 
              'INTEGRATED_CNC_SCHEMA.SWEPT_SURFACE' ] * TYPEOF(
              face_geometry)) = 1;
    WR2: SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* bounds| (
              'INTEGRATED_CNC_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)))| 
              NOT (SIZEOF(QUERY (oe <* elp_fbnds.bound\path.edge_list| NOT 
              ('INTEGRATED_CNC_SCHEMA.EDGE_CURVE' IN TYPEOF(oe\
              oriented_edge.edge_element)))) = 0))) = 0;
    WR3: SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* bounds| (
              'INTEGRATED_CNC_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)))| 
              NOT (SIZEOF(QUERY (oe <* elp_fbnds.bound\path.edge_list| NOT 
              (SIZEOF([ 'INTEGRATED_CNC_SCHEMA.LINE', 
              'INTEGRATED_CNC_SCHEMA.CONIC', 
              'INTEGRATED_CNC_SCHEMA.POLYLINE', 
              'INTEGRATED_CNC_SCHEMA.SURFACE_CURVE', 
              'INTEGRATED_CNC_SCHEMA.B_SPLINE_CURVE' ] * TYPEOF(oe.
              edge_element\edge_curve.edge_geometry)) = 1))) = 0))) = 0;
    WR4: SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* bounds| (
              'INTEGRATED_CNC_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)))| 
              NOT (SIZEOF(QUERY (oe <* elp_fbnds.bound\path.edge_list| NOT 
              ((('INTEGRATED_CNC_SCHEMA.VERTEX_POINT' IN TYPEOF(oe\edge.
              edge_start)) AND ('INTEGRATED_CNC_SCHEMA.CARTESIAN_POINT' IN 
              TYPEOF(oe\edge.edge_start\vertex_point.vertex_geometry))) AND
               (('INTEGRATED_CNC_SCHEMA.VERTEX_POINT' IN TYPEOF(oe\edge.
              edge_end)) AND ('INTEGRATED_CNC_SCHEMA.CARTESIAN_POINT' IN 
              TYPEOF(oe\edge.edge_end\vertex_point.vertex_geometry)))))) = 
              0))) = 0;
    WR5: SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* bounds| (
              'INTEGRATED_CNC_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)))| (
              'INTEGRATED_CNC_SCHEMA.ORIENTED_PATH' IN TYPEOF(elp_fbnds.
              bound)))) = 0;
    WR6: NOT ('INTEGRATED_CNC_SCHEMA.SWEPT_SURFACE' IN TYPEOF(face_geometry
              )) OR (SIZEOF([ 'INTEGRATED_CNC_SCHEMA.LINE', 
              'INTEGRATED_CNC_SCHEMA.CONIC', 
              'INTEGRATED_CNC_SCHEMA.POLYLINE', 
              'INTEGRATED_CNC_SCHEMA.B_SPLINE_CURVE' ] * TYPEOF(
              face_geometry\swept_surface.swept_curve)) = 1);
    WR7: SIZEOF(QUERY (vlp_fbnds <* QUERY (bnds <* bounds| (
              'INTEGRATED_CNC_SCHEMA.VERTEX_LOOP' IN TYPEOF(bnds.bound)))| 
              NOT (('INTEGRATED_CNC_SCHEMA.VERTEX_POINT' IN TYPEOF(
              vlp_fbnds\face_bound.bound\vertex_loop.loop_vertex)) AND (
              'INTEGRATED_CNC_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([ 
              'INTEGRATED_CNC_SCHEMA.EDGE_LOOP', 
              'INTEGRATED_CNC_SCHEMA.VERTEX_LOOP' ] * TYPEOF(bnd.bound)) = 
              1))) = 0;
    WR9: SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* bounds| (
              'INTEGRATED_CNC_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)))| 
              NOT (SIZEOF(QUERY (oe <* elp_fbnds.bound\path.edge_list| (
              'INTEGRATED_CNC_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 (
              'INTEGRATED_CNC_SCHEMA.PCURVE' IN TYPEOF(sc_ag)))) = 0))) = 0
              ))) = 0;
    WR10: (NOT ('INTEGRATED_CNC_SCHEMA.SWEPT_SURFACE' IN TYPEOF(
              face_geometry)) OR (NOT ('INTEGRATED_CNC_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| (
              'INTEGRATED_CNC_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)))| 
              NOT (SIZEOF(QUERY (oe <* elp_fbnds.bound\path.edge_list| (
              'INTEGRATED_CNC_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 and_expression
  SUBTYPE OF (multiple_arity_Boolean_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

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);
  WHERE
    WR1: SIZEOF(SELF\geometric_tolerance_with_datum_reference.datum_system)
               < 3;
END_ENTITY; -- 10303-519: aic_geometric_tolerances

ENTITY apex
  SUBTYPE OF (derived_shape_aspect);
END_ENTITY; -- 10303-47: shape_aspect_definition_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, 'INTEGRATED_CNC_SCHEMA.' + 
              'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
    WR2: SIZEOF(USEDIN(SELF, 'INTEGRATED_CNC_SCHEMA.' + 
              'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
END_ENTITY; -- 10303-41: application_context_schema

ENTITY application_context_element
  SUPERTYPE OF (ONEOF(product_context, product_definition_context));
    name               : label;
    frame_of_reference : application_context;
END_ENTITY; -- 10303-41: application_context_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_approval_assignment
  SUBTYPE OF (approval_assignment);
    items : SET [1:?] OF approval_item;
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY applied_area
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(SELF.
              of_shape);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'effective length'))) = 1))) = 0))) 
              <= 1;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'maximum length'))) <= 1))) = 0))) =
               0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ('INTEGRATED_CNC_SCHEMA.PLACEMENT'
               IN TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0)))
               = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

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

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

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

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

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

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

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, 'INTEGRATED_CNC_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, 'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.' + 
              'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
END_ENTITY; -- 10303-41: approval_schema

ENTITY approval_status;
    name : label;
END_ENTITY; -- 10303-41: approval_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_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: ((('INTEGRATED_CNC_SCHEMA.UNIFORM_CURVE' IN TYPEOF(SELF)) OR (
              'INTEGRATED_CNC_SCHEMA.QUASI_UNIFORM_CURVE' IN TYPEOF(SELF)))
               OR ('INTEGRATED_CNC_SCHEMA.BEZIER_CURVE' IN TYPEOF(SELF))) 
              OR ('INTEGRATED_CNC_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_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: ((('INTEGRATED_CNC_SCHEMA.UNIFORM_SURFACE' IN TYPEOF(SELF)) OR (
              'INTEGRATED_CNC_SCHEMA.QUASI_UNIFORM_SURFACE' IN TYPEOF(SELF)
              )) OR ('INTEGRATED_CNC_SCHEMA.BEZIER_SURFACE' IN TYPEOF(SELF)
              )) OR ('INTEGRATED_CNC_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 back_boring_operation
  SUBTYPE OF (drilling_type_operation);
  WHERE
  WR1:  (0 = SIZEOF (QUERY (amr <* get_relating_amr (SELF) |
           ('INTEGRATED_CNC_SCHEMA.MACHINING_FUNCTIONS_RELATIONSHIP'
              IN TYPEOF (amr)) AND NOT
           (verify_required_action_property
                (amr.related_method, 'oriented spindle stop')))));
END_ENTITY; -- 10303-238: integrated_cnc_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 binary_boolean_expression
  ABSTRACT SUPERTYPE OF (xor_expression)
  SUBTYPE OF (boolean_expression, binary_generic_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 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| ('INTEGRATED_CNC_SCHEMA.PLACEMENT'
               IN TYPEOF(it)) AND (it.name = 'orientation'))) = 1;
    WR3: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'length'))) = 1;
    WR4: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'width'))) = 1;
    WR5: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'height'))) = 1;
END_ENTITY; -- 10303-238: integrated_cnc_schema

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

ENTITY boring_operation
  SUBTYPE OF (drilling_type_operation);
  WHERE
  WR1:  (SELF.description IN ['boring','reaming']);

  WR2:  (verify_required_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',
         ['INTEGRATED_CNC_SCHEMA.CARTESIAN_POINT']));
END_ENTITY; -- 10303-238: integrated_cnc_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'boss height occurrence') AND (SIZEOF(QUERY (
              sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 
              'path feature component usage') AND ('INTEGRATED_CNC_SCHEMA.'
               + 'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF(sar)))| ((
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'circular profile occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| (
              'INTEGRATED_CNC_SCHEMA.CIRCULAR_CLOSED_PROFILE' IN TYPEOF(sdr
              .relating_shape_aspect)))) = 1))) = 1))) = 0);
    WR7: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'top condition occurrence') AND (SIZEOF(QUERY (
              fcr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'boss top usage') AND (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)))| ('INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'change in diameter occurrence') AND (SIZEOF(
              QUERY (fcr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'taper usage') 
              AND ('INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' 
              IN TYPEOF(sar)))| ('INTEGRATED_CNC_SCHEMA.TAPER' IN TYPEOF(
              fcr.related_shape_aspect)) AND ('INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'enclosed boundary occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.NGON_CLOSED_PROFILE', 
              'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| ('INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN 
              TYPEOF(pd)))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'change in boundary occurrence') AND (SIZEOF(
              QUERY (fcr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATING_SHAPE_ASPECT')| (sar.description = 'taper usage') 
              AND ('INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' 
              IN TYPEOF(sar)))| (('INTEGRATED_CNC_SCHEMA.TAPER' IN TYPEOF(
              fcr.related_shape_aspect)) AND ('INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'rectangular profile occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| (
              'INTEGRATED_CNC_SCHEMA.RECTANGULAR_CLOSED_PROFILE' IN TYPEOF(
              sdr.relating_shape_aspect)))) = 1))) = 1))) = 0);
    WR12: SIZEOF(QUERY (pdr <* get_property_definition_representations(SELF
              )| ('INTEGRATED_CNC_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN 
              TYPEOF(pdr.used_representation)) AND (pdr.used_representation
              .name = 'maximum feature limit'))) >= 0;
END_ENTITY; -- 10303-522: aic_machining_feature

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

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: integrated_cnc_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))
  SUBTYPE OF (curve);
END_ENTITY; -- 10303-42: geometry_schema

ENTITY bounded_pcurve
  SUBTYPE OF (pcurve, bounded_curve);
  WHERE
    WR1: 'INTEGRATED_CNC_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))
  SUBTYPE OF (surface);
END_ENTITY; -- 10303-42: geometry_schema

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

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 cartesian_point
  SUBTYPE OF (point);
    coordinates : LIST [1:3] OF length_measure;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY cartesian_transformation_operator
  SUPERTYPE OF (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_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 centre_of_symmetry
  SUBTYPE OF (derived_shape_aspect);
  WHERE
    WR1: SIZEOF(QUERY (sadr <* SELF\derived_shape_aspect.
              deriving_relationships| NOT (
              'INTEGRATED_CNC_SCHEMA.SYMMETRIC_SHAPE_ASPECT' IN TYPEOF(sadr
              \shape_aspect_relationship.related_shape_aspect)))) = 0;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY chamfer
  SUBTYPE OF (transition_feature);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATING_SHAPE_ASPECT')| (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)))| (('INTEGRATED_CNC_SCHEMA.CHAMFER_OFFSET' IN 
              TYPEOF(fcr.related_shape_aspect)) AND (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATING_SHAPE_ASPECT')| (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)))| (('INTEGRATED_CNC_SCHEMA.CHAMFER_OFFSET' IN 
              TYPEOF(fcr.related_shape_aspect)) AND (
              'INTEGRATED_CNC_SCHEMA.CHAMFER' IN TYPEOF(fcr.
              relating_shape_aspect))) AND (fcr.related_shape_aspect.
              description = 'second offset'))) = 1;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY chamfer_offset
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: SELF.description IN [ 'first offset', 'second offset' ];
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'offset amount') OR (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| ('INTEGRATED_CNC_SCHEMA.' + 
              'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF(sar)))| (
              'INTEGRATED_CNC_SCHEMA.CHAMFER' IN TYPEOF(sdr.
              relating_shape_aspect)) AND (
              'INTEGRATED_CNC_SCHEMA.CHAMFER_OFFSET' IN TYPEOF(sdr.
              related_shape_aspect)))) = 1;
END_ENTITY; -- 10303-522: aic_machining_feature

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

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: 'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN TYPEOF(
              SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ('INTEGRATED_CNC_SCHEMA.PLACEMENT'
               IN TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0)))
               = 0;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'diameter'))) = 1))) = 0))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY circular_pattern
  SUBTYPE OF (replicate_feature);
  WHERE
    WR1: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (SIZEOF(QUERY
               (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATING_SHAPE_ASPECT')| (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)))| ('INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT' IN 
              TYPEOF(sdr.related_shape_aspect)))) = 1))) <= 3))) = 0;
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'diameter'))) <= 1))) = 0))) = 0;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT' ] * 
              TYPEOF(it)) = 2) AND (it.name = 'base feature rotation'))) <=
               1))) = 0))) = 0;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ((
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN TYPEOF
              (it)) AND ('INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT' ] * 
              TYPEOF(it)) = 2) AND (it.name = 'angular spacing'))) = 1))) =
               0))) = 0;
    WR8: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ('INTEGRATED_CNC_SCHEMA.PLACEMENT'
               IN TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0)))
               = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY circular_runout_tolerance
  SUBTYPE OF (geometric_tolerance_with_datum_reference);
  WHERE
    WR1: SIZEOF(SELF\geometric_tolerance_with_datum_reference.datum_system)
               <= 2;
END_ENTITY; -- 10303-519: aic_geometric_tolerances

ENTITY closed_path_profile
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN TYPEOF(
              SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.' + 'DEFINITION')|
               NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ('INTEGRATED_CNC_SCHEMA.PLACEMENT'
               IN TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0)))
               = 0;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.' + 'DEFINITION')|
               NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PATH_SHAPE_REPRESENTATION' IN TYPEOF(
              pdr.used_representation)))) = 1))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

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

ENTITY coaxiality_tolerance
  SUBTYPE OF (geometric_tolerance_with_datum_reference);
  WHERE
    WR1: SIZEOF(SELF\geometric_tolerance_with_datum_reference.datum_system)
               <= 2;
END_ENTITY; -- 10303-519: aic_geometric_tolerances

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

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))
  SUBTYPE OF (boolean_expression, binary_generic_expression);
    SELF\binary_generic_expression.operands : LIST [2:2] OF expression;
  WHERE
    WR1: (('INTEGRATED_CNC_SCHEMA.NUMERIC_EXPRESSION'
            IN TYPEOF(SELF\binary_generic_expression.operands[1])) AND
 	  ('INTEGRATED_CNC_SCHEMA.NUMERIC_EXPRESSION'
 	    IN TYPEOF(SELF\binary_generic_expression.operands[2]))
 	 OR
	 (('INTEGRATED_CNC_SCHEMA.BOOLEAN_EXPRESSION'
	    IN TYPEOF(SELF\binary_generic_expression.operands[1])) AND
	  ('INTEGRATED_CNC_SCHEMA.BOOLEAN_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 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: 'INTEGRATED_CNC_SCHEMA.BOUNDED_CURVE' IN TYPEOF(parent_curve);
END_ENTITY; -- 10303-42: geometry_schema

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

ENTITY composite_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 compound_feature
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pds <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(
              pds)) AND (SIZEOF(QUERY (csa <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (csa.name = 
              'compound feature in solid') AND (
              'INTEGRATED_CNC_SCHEMA.COMPOSITE_SHAPE_ASPECT' IN TYPEOF(csa)
              ))) = 1))) = 1;
    WR2: SIZEOF(QUERY (pds <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(
              pds)) AND (SIZEOF(QUERY (csa <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (
              'INTEGRATED_CNC_SCHEMA.COMPOSITE_SHAPE_ASPECT' IN TYPEOF(csa)
              ))) = 1))) = 1;
    WR3: SIZEOF(QUERY (pds <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(
              pds)) AND (SIZEOF(QUERY (csa <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (
              'INTEGRATED_CNC_SCHEMA.COMPOSITE_SHAPE_ASPECT' IN TYPEOF(csa)
              ) AND (SIZEOF(QUERY (fcr <* csa.component_relationships| NOT 
              ('INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(fcr)))) = 0))) = 1))) = 1;
    WR4: SIZEOF(QUERY (pds <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(
              pds)) AND (SIZEOF(QUERY (csa <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (
              'INTEGRATED_CNC_SCHEMA.COMPOSITE_SHAPE_ASPECT' IN TYPEOF(csa)
              ))) = 1))) = 1;
    WR5: SIZEOF(QUERY (pds <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(
              pds)) AND (SIZEOF(QUERY (csa <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (
              'INTEGRATED_CNC_SCHEMA.COMPOSITE_SHAPE_ASPECT' IN TYPEOF(csa)
              ) AND (SIZEOF(QUERY (sar <* csa.component_relationships| (
              'INTEGRATED_CNC_SCHEMA.THREAD' IN TYPEOF(sar.
              related_shape_aspect)))) = 0))) = 1))) = 1;
    WR6: SIZEOF(QUERY (pds <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(
              pds)) AND (SIZEOF(QUERY (csa <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (
              'INTEGRATED_CNC_SCHEMA.COMPOSITE_SHAPE_ASPECT' IN TYPEOF(csa)
              ) AND (SIZEOF(QUERY (sar <* csa.component_relationships| (
              'INTEGRATED_CNC_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-522: aic_machining_feature

ENTITY compound_representation_item
  SUBTYPE OF (representation_item);
    item_element : compound_item_definition;
END_ENTITY; -- 10303-43: representation_schema

ENTITY concentricity_tolerance
  SUBTYPE OF (geometric_tolerance_with_datum_reference);
  WHERE
    WR1: SIZEOF(SELF\geometric_tolerance_with_datum_reference.datum_system)
               = 1;
END_ENTITY; -- 10303-519: aic_geometric_tolerances

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

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-238: integrated_cnc_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 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: 'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_RELATIONSHIP' IN TYPEOF(
              SELF.represented_product_relation.definition);
    WR2: SIZEOF(USEDIN(SELF, 'INTEGRATED_CNC_SCHEMA.' + 
              'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
    WR3: SIZEOF(USEDIN(SELF, 'INTEGRATED_CNC_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 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: integrated_cnc_schema

ENTITY conversion_based_unit
  SUBTYPE OF (named_unit);
    name              : label;
    conversion_factor : measure_with_unit;
END_ENTITY; -- 10303-41: measure_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 curve
  SUPERTYPE OF (ONEOF(line, conic, pcurve, surface_curve, offset_curve_3d, 
      curve_replica))
  SUBTYPE OF (geometric_representation_item);
END_ENTITY; -- 10303-42: geometry_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| (
              'INTEGRATED_CNC_SCHEMA.OUTER_BOUNDARY_CURVE' IN TYPEOF(temp))
              )) = 0);
    WR2: NOT implicit_outer OR ('INTEGRATED_CNC_SCHEMA.BOUNDED_SURFACE' IN 
              TYPEOF(basis_surface));
    WR3: SIZEOF(QUERY (temp <* boundaries| (
              'INTEGRATED_CNC_SCHEMA.OUTER_BOUNDARY_CURVE' IN TYPEOF(temp))
              )) <= 1;
    WR4: SIZEOF(QUERY (temp <* boundaries| (temp\composite_curve_on_surface
              .basis_surface[1] <> SELF.basis_surface))) = 0;
END_ENTITY; -- 10303-42: geometry_schema

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

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

ENTITY cylindricity_tolerance
  SUBTYPE OF (geometric_tolerance);
  WHERE
    WR1: NOT ('INTEGRATED_CNC_SCHEMA.' + 
              'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE' IN TYPEOF(SELF));
END_ENTITY; -- 10303-519: aic_geometric_tolerances

ENTITY data_environment;
    name        : label;
    description : text;
    elements    : SET [1:?] OF property_definition_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_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_time_role;
    name : label;
  DERIVE
    description : text := get_description_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 'INTEGRATED_CNC_SCHEMA.' + 
              'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
END_ENTITY; -- 10303-41: date_time_schema

ENTITY datum
  SUBTYPE OF (shape_aspect);
    identification : identifier;
  INVERSE
    established_by_relationships : SET [1:?] OF shape_aspect_relationship 
                                      FOR related_shape_aspect;
  WHERE
    WR1: SIZEOF(QUERY (x <* SELF\datum.established_by_relationships| (
              SIZEOF(TYPEOF(x\shape_aspect_relationship.
              relating_shape_aspect) * [ 
              'INTEGRATED_CNC_SCHEMA.DATUM_FEATURE', 
              'INTEGRATED_CNC_SCHEMA.DATUM_TARGET' ]) <> 1))) = 0;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY datum_feature
  SUBTYPE OF (shape_aspect);
  INVERSE
    feature_basis_relationship : shape_aspect_relationship FOR 
                                    relating_shape_aspect;
  WHERE
    WR1: SIZEOF(QUERY (sar <* bag_to_set(USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATING_SHAPE_ASPECT'))| NOT ('INTEGRATED_CNC_SCHEMA.DATUM'
               IN TYPEOF(sar\shape_aspect_relationship.related_shape_aspect
              )))) = 0;
    WR2: SELF\shape_aspect.product_definitional = TRUE;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

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

ENTITY datum_target
  SUBTYPE OF (shape_aspect);
    target_id : identifier;
  INVERSE
    target_basis_relationship : shape_aspect_relationship FOR 
                                   relating_shape_aspect;
  WHERE
    WR1: SIZEOF(QUERY (sar <* bag_to_set(USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATING_SHAPE_ASPECT'))| NOT ('INTEGRATED_CNC_SCHEMA.DATUM'
               IN TYPEOF(sar\shape_aspect_relationship.related_shape_aspect
              )))) = 0;
    WR2: SELF\shape_aspect.product_definitional = TRUE;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY definitional_representation
  SUBTYPE OF (representation);
  WHERE
    WR1: 'INTEGRATED_CNC_SCHEMA.PARAMETRIC_REPRESENTATION_CONTEXT' IN 
              TYPEOF(SELF\representation.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: 'INTEGRATED_CNC_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 derived_shape_aspect
  SUPERTYPE OF (ONEOF(apex, centre_of_symmetry, geometric_alignment, 
      geometric_intersection, parallel_offset, perpendicular_to, extension,
       tangent))
  SUBTYPE OF (shape_aspect);
  INVERSE
    deriving_relationships : SET [1:?] OF shape_aspect_relationship FOR 
                                relating_shape_aspect;
  WHERE
    WR1: SIZEOF(QUERY (dr <* SELF\derived_shape_aspect.
              deriving_relationships| NOT ('INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_ASPECT_DERIVING_RELATIONSHIP' IN TYPEOF(dr)))) = 0;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY derived_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, 'INTEGRATED_CNC_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
  SUBTYPE OF (representation_item);
    description : text;
END_ENTITY; -- 10303-45: qualified_measure_schema

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

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);
END_ENTITY; -- 10303-47: shape_dimension_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;
  WHERE
    WR1: applies_to.product_definitional = TRUE;
END_ENTITY; -- 10303-47: shape_dimension_schema

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

ENTITY directed_dimensional_location
  SUBTYPE OF (dimensional_location);
END_ENTITY; -- 10303-238: integrated_cnc_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 (
              'INTEGRATED_CNC_SCHEMA.DIRECTION' IN TYPEOF(it)))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

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 (characterized_object, document);
  WHERE
    WR1: (SIZEOF(QUERY (adr <* QUERY (dr <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.DOCUMENT_REFERENCE.ASSIGNED_DOCUMENT')
              | ('INTEGRATED_CNC_SCHEMA.APPLIED_DOCUMENT_REFERENCE' IN 
              TYPEOF(dr)))| (
              'INTEGRATED_CNC_SCHEMA.EXTERNALLY_DEFINED_FEATURE_DEFINITION'
               IN TYPEOF(adr.items)))) = 1) OR (SIZEOF(QUERY (duc <* USEDIN
              (SELF, 
              'INTEGRATED_CNC_SCHEMA.DOCUMENT_USAGE_CONSTRAINT.SOURCE')| 
              NOT (SIZEOF(QUERY (aduc <* QUERY (duca <* USEDIN(duc, 
              'INTEGRATED_CNC_SCHEMA.DOCUMENT_USAGE_CONSTRAINT_ASSIGNMENT.'
               + 'ASSIGNED_DOCUMENT_USAGE')| ('INTEGRATED_CNC_SCHEMA.' + 
              'APPLIED_DOCUMENT_USAGE_CONSTRAINT_ASSIGNMENT' IN TYPEOF(duca
              )))| (
              'INTEGRATED_CNC_SCHEMA.EXTERNALLY_DEFINED_FEATURE_DEFINITION'
               IN TYPEOF(aduc.items)))) = 1))) = 0);
    WR2: SIZEOF(QUERY (drt <* USEDIN(SELF, 'INTEGRATED_CNC_SCHEMA.' + 
              'DOCUMENT_REPRESENTATION_TYPE.REPRESENTED_DOCUMENT')| (drt.
              name = 'physical'))) = 1;
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY document_reference
  ABSTRACT SUPERTYPE;
    assigned_document : document;
    source            : label;
  DERIVE
    role : object_role := get_role(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 'INTEGRATED_CNC_SCHEMA.' + 
              'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1;
END_ENTITY; -- 10303-41: management_resources_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 document_with_class
  SUBTYPE OF (document);
    class : identifier;
END_ENTITY; -- 10303-41: document_schema

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',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_DWELL_TIME_REPRESENTATION'])) AND
         (verify_rep_desc_for_action_property   (SELF, 'dwell time step',
           ['dwell time']))
        );
END_ENTITY; -- 10303-238: integrated_cnc_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',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_DWELL_TIME_REPRESENTATION'])) AND
        (verify_rep_desc_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',
           ['INTEGRATED_CNC_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'])) AND
        (verify_rep_desc_for_action_property    (SELF, 'feedrate on retract',
           ['relative speed']));

  WR6:  ((verify_optional_relating_amr_with_name  (SELF, 'machining',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'])) AND
         (verify_related_type_for_amr_with_name   (SELF, 'machining',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.DRILLING_TYPE_STRATEGY']))
        );
END_ENTITY; -- 10303-238: integrated_cnc_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',
           ['INTEGRATED_CNC_SCHEMA.MACHINING_SPINDLE_SPEED_REPRESENTATION'])) AND
        (verify_rep_desc_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',
           ['INTEGRATED_CNC_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'])) AND
        (verify_rep_desc_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',
           ['INTEGRATED_CNC_SCHEMA.MACHINING_SPINDLE_SPEED_REPRESENTATION'])) AND
        (verify_rep_desc_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',
           ['INTEGRATED_CNC_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'])) AND
        (verify_rep_desc_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: integrated_cnc_schema

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

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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'second offset'))) <= 1))) = 0))) = 
              0);
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.FACE_SHAPE_REPRESENTATION' IN TYPEOF(
              pdr.used_representation)) AND (pdr.used_representation.name =
               'second face shape'))) <= 1))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

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 environment;
    syntactic_representation : generic_variable;
    semantics                : variable_semantics;
END_ENTITY; -- 13584-20: iso13584_generic_expressions_schema

ENTITY evaluated_degenerate_pcurve
  SUBTYPE OF (degenerate_pcurve);
    equivalent_point : cartesian_point;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY expanded_uncertainty
  SUBTYPE OF (standard_uncertainty);
    coverage_factor : REAL;
END_ENTITY; -- 10303-45: qualified_measure_schema

ENTITY expression
  ABSTRACT SUPERTYPE OF (ONEOF(numeric_expression, boolean_expression))
  SUBTYPE OF (generic_expression);
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY expression_representation_item
  SUBTYPE OF (representation_item, generic_expression);
END_ENTITY; -- 10303-238: integrated_cnc_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_source;
    source_id : source_item;
  DERIVE
    description : text := get_description_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 'INTEGRATED_CNC_SCHEMA.' + 
              'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
END_ENTITY; -- 10303-41: external_reference_schema

ENTITY externally_defined_dimension_definition
  SUBTYPE OF (externally_defined_item, dimensional_size);
  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, 
              'INTEGRATED_CNC_SCHEMA.APPLIED_DOCUMENT_REFERENCE.ITEMS')| (
              adr.assigned_document.description = 
              'external size dimension specification')));
END_ENTITY; -- 10303-238: integrated_cnc_schema

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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'partial area occurrence') AND (SIZEOF(QUERY (
              sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 
              'applied area usage') AND (
              'INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF
              (sar)))| ('INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ((
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.RATIO_MEASURE_WITH_UNIT' ] * TYPEOF(it
              )) = 2) AND (it.name = 'number of threads'))) = 1))) = 0))) =
               0);
    WR14: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (
              'INTEGRATED_CNC_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN 
              TYPEOF(it)) AND (it.name = 'fit class 2'))) <= 1))) = 0))) = 
              0;
    WR15: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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
              , 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (SIZEOF(QUERY
               (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'applied shape') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| ('INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| ((
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT' ] * 
              TYPEOF(it)) = 2) AND (it.name = 'reference presure angle'))) 
              = 1))) = 0))) = 0);
    WR20: NOT (SELF\characterized_object.description IN [ 'gear' ]) OR (
              SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'nominal tool depth'))) = 1))) = 0))
              ) = 0);
    WR22: NOT (SELF\characterized_object.description IN [ 'gear' ]) OR (
              SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ((
              'INTEGRATED_CNC_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN 
              TYPEOF(it)) AND (it.name = 'module or diametral pitch')) AND 
              ((it.description = 'module') OR (it.description = 
              'diameter pitch')))) = 1))) = 0))) = 0);
    WR25: NOT (SELF\characterized_object.description IN [ 'gear' ]) OR (
              SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ((
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT' ] * 
              TYPEOF(it)) = 2) AND (it.name = 'root fillet radius'))) <= 1)
              )) = 0))) = 0);
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY externally_defined_item;
    item_id : source_item;
    source  : external_source;
END_ENTITY; -- 10303-41: external_reference_schema

ENTITY face
  SUPERTYPE OF (ONEOF(face_surface, 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| (
              'INTEGRATED_CNC_SCHEMA.FACE_OUTER_BOUND' IN TYPEOF(temp)))) 
              <= 1;
END_ENTITY; -- 10303-42: topology_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 ((
              'INTEGRATED_CNC_SCHEMA.FACE_SURFACE' IN TYPEOF(it)) OR (
              'INTEGRATED_CNC_SCHEMA.ORIENTED_FACE' IN TYPEOF(it))))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY face_surface
  SUBTYPE OF (face, geometric_representation_item);
    face_geometry : surface;
    same_sense    : BOOLEAN;
--  WHERE
--    WR1: NOT ('INTEGRATED_CNC_SCHEMA.ORIENTED_SURFACE' IN TYPEOF(
--              face_geometry));
END_ENTITY; -- 10303-42: topology_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: integrated_cnc_schema

ENTITY feature_component_definition
  SUBTYPE OF (characterized_object);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')) = 1))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY feature_component_relationship
  SUPERTYPE OF (ONEOF(pattern_omit_membership, pattern_offset_membership))
  SUBTYPE OF (shape_aspect_relationship);
  WHERE
    WR1: ((SIZEOF([ 'INTEGRATED_CNC_SCHEMA.COMPOSITE_SHAPE_ASPECT', 
              'INTEGRATED_CNC_SCHEMA.REPLICATE_FEATURE', 
              'INTEGRATED_CNC_SCHEMA.TRANSITION_FEATURE', 
              'INTEGRATED_CNC_SCHEMA.MODIFIED_PATTERN' ] * TYPEOF(SELF.
              relating_shape_aspect)) = 1) OR (
              'INTEGRATED_CNC_SCHEMA.FEATURE_DEFINITION' IN TYPEOF(SELF.
              relating_shape_aspect.of_shape.definition))) OR (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN 
              TYPEOF(SELF.relating_shape_aspect.of_shape.definition));
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY feature_definition
  SUBTYPE OF (characterized_object);
  WHERE
    WR1: SIZEOF(QUERY (pdr <* get_property_definition_representations(SELF)
              | (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))) <= 1;
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ('INTEGRATED_CNC_SCHEMA.PLACEMENT'
               IN TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0)))
               = 0;
    WR3: SIZEOF([ 'INTEGRATED_CNC_SCHEMA.BOSS', 
              'INTEGRATED_CNC_SCHEMA.TURNED_KNURL', 
              'INTEGRATED_CNC_SCHEMA.THREAD', 'INTEGRATED_CNC_SCHEMA.GEAR',
               'INTEGRATED_CNC_SCHEMA.MARKING', 
              'INTEGRATED_CNC_SCHEMA.RIB_TOP', 
              'INTEGRATED_CNC_SCHEMA.ROUND_HOLE', 
              'INTEGRATED_CNC_SCHEMA.OUTSIDE_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.POCKET', 
              'INTEGRATED_CNC_SCHEMA.REMOVAL_VOLUME', 
              'INTEGRATED_CNC_SCHEMA.REVOLVED_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.OUTER_ROUND', 
              'INTEGRATED_CNC_SCHEMA.FLAT_FACE', 
              'INTEGRATED_CNC_SCHEMA.PROTRUSION', 
              'INTEGRATED_CNC_SCHEMA.ROUNDED_END', 
              'INTEGRATED_CNC_SCHEMA.SLOT', 
              'INTEGRATED_CNC_SCHEMA.SPHERICAL_CAP', 
              'INTEGRATED_CNC_SCHEMA.STEP', 
              'INTEGRATED_CNC_SCHEMA.COMPOUND_FEATURE', 
              'INTEGRATED_CNC_SCHEMA.REPLICATE_FEATURE', 
              'INTEGRATED_CNC_SCHEMA.EXTERNALLY_DEFINED_FEATURE_DEFINITION'
               ] * TYPEOF(SELF)) = 1;
    WR4: NOT (SIZEOF([ 'INTEGRATED_CNC_SCHEMA.ROUND_HOLE', 
              'INTEGRATED_CNC_SCHEMA.BOSS', 
              'INTEGRATED_CNC_SCHEMA.OUTSIDE_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.REMOVAL_VOLUME', 
              'INTEGRATED_CNC_SCHEMA.FLAT_FACE', 
              'INTEGRATED_CNC_SCHEMA.POCKET', 
              'INTEGRATED_CNC_SCHEMA.PROTRUSION', 
              'INTEGRATED_CNC_SCHEMA.RIB_TOP', 
              'INTEGRATED_CNC_SCHEMA.ROUNDED_END', 
              'INTEGRATED_CNC_SCHEMA.SLOT', 'INTEGRATED_CNC_SCHEMA.STEP' ] 
              * TYPEOF(SELF)) = 1) OR (SIZEOF(QUERY (pdr <* 
              get_property_definition_representations(SELF)| (
              'INTEGRATED_CNC_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN TYPEOF
              (pdr.used_representation)) AND (pdr.used_representation.name 
              = 'maximum feature limit'))) >= 0);
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY feature_pattern
  SUBTYPE OF (replicate_feature);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)) AND (SIZEOF(QUERY (srwp_i <* pdr.
              used_representation.items| NOT (
              'INTEGRATED_CNC_SCHEMA.PLACEMENT' IN TYPEOF(srwp_i)))) > 0)))
               > 0))) = 0;
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ('INTEGRATED_CNC_SCHEMA.PLACEMENT'
               IN TYPEOF(it)) AND (it.name = 'base feature placement'))) > 
              1))) = 0))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY fillet
  SUBTYPE OF (transition_feature);
  WHERE
    WR1: NOT (SELF\shape_aspect.description = 'constant radius') OR (SIZEOF
              (QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'second offset'))) <= 1))) = 0))) = 
              0);
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.' + 'DEFINITION')|
               NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.FACE_SHAPE_REPRESENTATION' IN TYPEOF(
              pdr.used_representation)) AND (pdr.used_representation.name =
               'fillet face'))) = 1))) = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.' + 'DEFINITION')|
               NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.' + 'DEFINITION')|
               NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.FACE_SHAPE_REPRESENTATION' IN TYPEOF(
              pdr.used_representation)) AND (pdr.used_representation.name =
               'second face shape'))) = 1))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY flat_face
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'course of travel occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 
              'path feature component usage') AND (
              'INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF
              (sar)))| (('INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'removal boundary occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| ('INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'enclosed boundary occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.CIRCULAR_CLOSED_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.NGON_CLOSED_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.RECTANGULAR_CLOSED_PROFILE', 
              'INTEGRATED_CNC_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)
              | ('INTEGRATED_CNC_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN 
              TYPEOF(pdr.used_representation)) AND (pdr.used_representation
              .name = 'maximum feature limit'))) >= 0;
    WR6: SIZEOF(QUERY (pds <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(
              pds)) AND (SIZEOF(QUERY (csa <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| ((
              'INTEGRATED_CNC_SCHEMA.COMPOSITE_SHAPE_ASPECT' IN TYPEOF(csa)
              ) AND (csa.name = 'uncut area')) AND (SIZEOF(QUERY (sar <* 
              csa.component_relationships| (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)) AND (SIZEOF([ 'INTEGRATED_CNC_SCHEMA.BOSS', 
              'INTEGRATED_CNC_SCHEMA.PROTRUSION' ] * TYPEOF(sar.
              related_shape_aspect)) = 1))) = 1))) <= 1))) = 1;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'removal depth'))) <= 1))) = 0))) = 
              0;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY flatness_tolerance
  SUBTYPE OF (geometric_tolerance);
  WHERE
    WR1: NOT ('INTEGRATED_CNC_SCHEMA.' + 
              'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE' IN TYPEOF(SELF));
END_ENTITY; -- 10303-519: aic_geometric_tolerances

ENTITY founded_item;
END_ENTITY; -- 10303-43: representation_schema

ENTITY freeform_milling_operation
  SUBTYPE OF (milling_type_operation);
  WHERE
  WR1:  ((verify_optional_relating_amr_with_name  (SELF, 'machining',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'])) AND
         (verify_related_type_for_amr_with_name   (SELF, 'machining',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.FREEFORM_MILLING_STRATEGY']))
        );
END_ENTITY; -- 10303-238: integrated_cnc_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',
           ['INTEGRATED_CNC_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',
           ['INTEGRATED_CNC_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',
           ['INTEGRATED_CNC_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',
           ['INTEGRATED_CNC_SCHEMA.DIRECTION'])) AND

         (verify_required_action_property       (SELF, 'sideward direction')) AND
         (verify_rep_item_for_action_property   (SELF, 'sideward direction',
           ['INTEGRATED_CNC_SCHEMA.DIRECTION'])) );
END_ENTITY; -- 10303-238: integrated_cnc_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: integrated_cnc_schema

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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| ((
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| ((
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
              )| (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (SIZEOF(QUERY
               (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
              )| (sar.description = 'applied shape') AND (
              'INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF
              (sar)))| ('INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT' IN TYPEOF(sdr.
              relating_shape_aspect)))) = 1))) = 1))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

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_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_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_representation_context
  SUBTYPE OF (representation_context);
    coordinate_space_dimension : dimension_count;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY geometric_representation_item
  SUPERTYPE OF (ONEOF(point, direction, vector, placement, 
      cartesian_transformation_operator, curve, surface, edge_curve, 
      face_surface, vertex_point, solid_model, right_circular_cylinder, 
      block, shell_based_surface_model, geometric_set))
  SUBTYPE OF (representation_item);
  DERIVE
    dim : dimension_count := dimension_of(SELF);
  WHERE
    WR1: SIZEOF(QUERY (using_rep <* using_representations(SELF)| NOT (
              'INTEGRATED_CNC_SCHEMA.GEOMETRIC_REPRESENTATION_CONTEXT' IN 
              TYPEOF(using_rep.context_of_items)))) = 0;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY geometric_set
  SUBTYPE OF (geometric_representation_item);
    elements : SET [1:?] OF geometric_set_select;
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY geometric_tolerance;
    name                    : label;
    description             : text;
    magnitude               : measure_with_unit;
    toleranced_shape_aspect : shape_aspect;
  WHERE
    WR1: ('NUMBER' IN TYPEOF(magnitude\measure_with_unit.value_component)) 
              AND (magnitude\measure_with_unit.value_component >= 0.0);
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;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY geometric_tolerance_with_datum_reference
  SUBTYPE OF (geometric_tolerance);
    datum_system : SET [1:?] OF datum_reference;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY geometric_tolerance_with_defined_unit
  SUBTYPE OF (geometric_tolerance);
    unit_size : measure_with_unit;
  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 geometrically_bounded_surface_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(QUERY (it <* SELF.items| NOT (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.GEOMETRIC_SET', 
              'INTEGRATED_CNC_SCHEMA.MAPPED_ITEM', 
              'INTEGRATED_CNC_SCHEMA.AXIS2_PLACEMENT_3D' ] * TYPEOF(it)) = 
              1))) = 0;
    WR2: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.GEOMETRIC_SET', 
              'INTEGRATED_CNC_SCHEMA.MAPPED_ITEM' ] * TYPEOF(it)) = 1))) > 
              0;
    WR3: SIZEOF(QUERY (mi <* QUERY (it <* SELF.items| (
              'INTEGRATED_CNC_SCHEMA.MAPPED_ITEM' IN TYPEOF(it)))| NOT ((
              'INTEGRATED_CNC_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| (
              'INTEGRATED_CNC_SCHEMA.GEOMETRIC_SET' IN TYPEOF(mr_it)))) > 0
              )))) = 0;
    WR4: SIZEOF(QUERY (gs <* QUERY (it <* SELF.items| (
              'INTEGRATED_CNC_SCHEMA.GEOMETRIC_SET' IN TYPEOF(it)))| NOT (
              SIZEOF(QUERY (pnt <* QUERY (gsel <* gs\geometric_set.elements
              | ('INTEGRATED_CNC_SCHEMA.POINT' IN TYPEOF(gsel)))| NOT 
              gbsf_check_point(pnt))) = 0))) = 0;
    WR5: SIZEOF(QUERY (gs <* QUERY (it <* SELF.items| (
              'INTEGRATED_CNC_SCHEMA.GEOMETRIC_SET' IN TYPEOF(it)))| NOT (
              SIZEOF(QUERY (cv <* QUERY (gsel <* gs\geometric_set.elements|
               ('INTEGRATED_CNC_SCHEMA.CURVE' IN TYPEOF(gsel)))| NOT 
              gbsf_check_curve(cv))) = 0))) = 0;
    WR6: SIZEOF(QUERY (gs <* QUERY (it <* SELF.items| (
              'INTEGRATED_CNC_SCHEMA.GEOMETRIC_SET' IN TYPEOF(it)))| NOT (
              SIZEOF(QUERY (sf <* QUERY (gsel <* gs\geometric_set.elements|
               ('INTEGRATED_CNC_SCHEMA.SURFACE' IN TYPEOF(gsel)))| NOT 
              gbsf_check_surface(sf))) = 0))) = 0;
    WR7: SIZEOF(QUERY (gs <* QUERY (it <* SELF.items| (
              'INTEGRATED_CNC_SCHEMA.GEOMETRIC_SET' IN TYPEOF(it)))| (
              SIZEOF(QUERY (gsel <* gs\geometric_set.elements| (
              'INTEGRATED_CNC_SCHEMA.SURFACE' IN TYPEOF(gsel)))) > 0))) > 0
              ;
END_ENTITY; -- 10303-507: aic_geometrically_bounded_surface

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 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',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_DWELL_TIME_REPRESENTATION']));

  WR3:  (verify_optional_action_property        (SELF, 'allowance')) AND
        (verify_length_measure_action_property  (SELF, 'allowance'));

  -- allowance propery required for roughing
  WR4:  NOT (SELF.description = 'roughing') OR
        (verify_required_action_property (SELF, 'allowance'));

  -- allowance propery forbidden for cutting in
  WR5:  NOT (SELF.description = 'cutting in') OR
        (0 = SIZEOF (get_action_property (SELF, 'allowance')));
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY hole_bottom
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(USEDIN(pd, 'INTEGRATED_CNC_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
              , 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| 
              NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.'
               + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))) = 1))) = 0);
    WR5: NOT (SELF.description = 'flat') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATING_SHAPE_ASPECT')| (sar.description = 
              'hole bottom usage') AND (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATING_SHAPE_ASPECT')| (sar.description = 
              'hole bottom usage') AND (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)))| ((fcr.related_shape_aspect.description = 
              'bottom condition occurrence') AND (
              'INTEGRATED_CNC_SCHEMA.ROUND_HOLE' IN TYPEOF(fcr.
              related_shape_aspect.of_shape.definition))) AND (
              'INTEGRATED_CNC_SCHEMA.HOLE_BOTTOM' IN TYPEOF(fcr.
              relating_shape_aspect)))) >= 1;
    WR15: NOT (SELF.description = 'flat with taper') OR (SIZEOF(QUERY (pd 
              <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT' ] * 
              TYPEOF(it)) = 2) AND (it.name = 'taper diameter'))) = 1))) = 
              0))) = 0);
END_ENTITY; -- 10303-522: aic_machining_feature

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 instanced_feature
  SUBTYPE OF (feature_definition, shape_aspect);
  WHERE
    WR1: 'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION' IN TYPEOF(SELF.of_shape
              .definition);
    WR2: SELF.product_definitional;
END_ENTITY; -- 10303-522: aic_machining_feature

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 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 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 knurling_turning_operation
  SUBTYPE OF (turning_type_operation);
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY length_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'INTEGRATED_CNC_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 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);
  WHERE
    WR1: NOT ('INTEGRATED_CNC_SCHEMA.' + 
              'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE' IN TYPEOF(SELF)) 
              OR (SIZEOF(SELF\geometric_tolerance_with_datum_reference.
              datum_system) <= 3);
    WR2: SIZEOF(QUERY (sar <* USEDIN(SELF\geometric_tolerance.
              toleranced_shape_aspect, 'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT')| (sar.name
               IN [ 'affected plane association', 
              'resulting intersection curve association' ]))) = 1;
END_ENTITY; -- 10303-519: aic_geometric_tolerances

ENTITY linear_profile
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN TYPEOF(
              SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ('INTEGRATED_CNC_SCHEMA.PLACEMENT'
               IN TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0)))
               = 0;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'profile length'))) = 1))) = 0))) = 
              0;
END_ENTITY; -- 10303-522: aic_machining_feature

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_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 location_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(SELF.items) = 1;
    WR2: SIZEOF(QUERY (it <* SELF.items| NOT ('INTEGRATED_CNC_SCHEMA.POINT'
               IN TYPEOF(it)))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY loop
  SUPERTYPE OF (ONEOF(vertex_loop, edge_loop))
  SUBTYPE OF (topological_representation_item);
END_ENTITY; -- 10303-42: topology_schema

ENTITY machining_adaptive_control_relationship
  SUBTYPE OF (action_method_relationship);
END_ENTITY; -- 10303-238: integrated_cnc_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',
          ['INTEGRATED_CNC_SCHEMA.DIRECTION']));

  WR3:  NOT (SELF.description = 'along path') OR
        ((1 <= get_count_of_relating_amr (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_TOOLPATH_SEQUENCE_RELATIONSHIP'])) AND
         (verify_related_type_for_amr   (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_TOOLPATH_SEQUENCE_RELATIONSHIP'],
          ['INTEGRATED_CNC_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: integrated_cnc_schema

ENTITY machining_cutting_component
  SUBTYPE OF (action_resource,characterized_object);
  WHERE
  WR1:  (verify_required_resource_property       (SELF, 'offset length')) AND
        (verify_length_measure_resource_property (SELF, 'offset length'));

  WR2:  (1 >= SIZEOF (USEDIN (SELF, 'INTEGRATED_CNC_SCHEMA.' +
           'MATERIAL_DESIGNATION.DEFINITIONS')));

  WR3:  (verify_optional_resource_property
          (SELF, 'technological data')) AND
        (0 = SIZEOF (QUERY (prop <* get_resource_property
          (SELF, 'technological data') |
           NOT (0 < SIZEOF (QUERY (prep <* USEDIN (prop,
                'INTEGRATED_CNC_SCHEMA.' +
                'RESOURCE_PROPERTY_REPRESENTATION.PROPERTY') |

                ((verify_optional_rep_item
                   (prep.representation, 'cutting angle')) AND
                 (verify_angle_measure_rep_item
                   (prep.representation, 'cutting angle')) AND

                 (verify_optional_rep_item
                   (prep.representation, 'free angle')) AND
                 (verify_angle_measure_rep_item
                   (prep.representation, 'free angle')) AND

                 (verify_optional_rep_item
                   (prep.representation, 'aux angle')) AND
                 (verify_angle_measure_rep_item
                   (prep.representation, 'aux angle'))
                )
            )))
         )));

  WR4:  (verify_optional_resource_property     (SELF, 'expected life')) AND
        (verify_time_measure_resource_property (SELF, 'expected life'));

  WR5: (1 >= SIZEOF (QUERY (arr <* USEDIN (SELF,
          'INTEGRATED_CNC_SCHEMA.REQUIREMENT_FOR_ACTION_RESOURCE.RESOURCES') |
          (arr.kind.name = 'cutting component') AND
          (0 < SIZEOF (QUERY (mt <* arr.operations |
           'INTEGRATED_CNC_SCHEMA.MACHINING_TECHNOLOGY' IN TYPEOF (mt))))
        )));
END_ENTITY; -- 10303-238: integrated_cnc_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: integrated_cnc_schema

ENTITY machining_feature_process
  SUBTYPE OF (machining_process_executable);
  WHERE
  WR1:  (1 = SIZEOF (QUERY (act <*
          USEDIN (SELF, 'INTEGRATED_CNC_SCHEMA.ACTION.CHOSEN_METHOD') |
          (act.name = 'machining')))) AND
        (0 = SIZEOF (QUERY (act <*
          USEDIN (SELF, 'INTEGRATED_CNC_SCHEMA.ACTION.CHOSEN_METHOD') |
          (act.name = 'machining') AND NOT
          ('INTEGRATED_CNC_SCHEMA.PROPERTY_PROCESS' IN TYPEOF (act))
        )));
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_feature_relationship
  SUBTYPE OF (action_method_relationship);
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_feature_sequence_relationship
  SUBTYPE OF (machining_feature_relationship, sequential_method);
END_ENTITY; -- 10303-238: integrated_cnc_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
         (verify_length_measure_rep_item (SELF, 'feed per revolution'))
        );

  WR4:  NOT (SELF.name = 'feed per tooth') OR
        ((verify_required_rep_item       (SELF, 'feed per tooth')) AND
         (verify_length_measure_rep_item (SELF, 'feed per tooth'))
        );

  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: integrated_cnc_schema

ENTITY machining_final_feature_relationship
  SUBTYPE OF (action_method_relationship);
END_ENTITY; -- 10303-238: integrated_cnc_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_required_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

         -- axis constraints property must contain zero or more ranges
         (0 = SIZEOF (QUERY (prop <* get_action_property
                (SELF, 'axis constraints') | NOT
                 ((0 < SIZEOF (QUERY (prep <* USEDIN (prop,
            'INTEGRATED_CNC_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY') |
              (0 <= SIZEOF (QUERY (it <* prep.representation.items |
                 ('INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.' +
              'ACTION_PROPERTY_REPRESENTATION.PROPERTY') |
             (1 = SIZEOF (QUERY (it <* prep.representation.items |
                (('INTEGRATED_CNC_SCHEMA.COMPOUND_REPRESENTATION_ITEM'
                   IN TYPEOF(it)) AND
                 ('INTEGRATED_CNC_SCHEMA.LIST_REPRESENTATION_ITEM'
                   IN TYPEOF(it.item_element)) AND
                 (0 = SIZEOF (QUERY (ie <* it.item_element | NOT
                   ('INTEGRATED_CNC_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
                    IN TYPEOF(ie)) )))
             ))))
           )))
         ))) AND

         (verify_required_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',
           ['INTEGRATED_CNC_SCHEMA.DIRECTION'])) AND

         (verify_related_type_for_amr   (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_MODEL_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_MODEL'])) AND

         (verify_optional_action_property (SELF, 'other functions')) AND
         (0 = SIZEOF (QUERY (prop <* get_action_property
                             (SELF, 'other functions') | NOT
           (0 < SIZEOF (QUERY (prep <* USEDIN (prop, 'INTEGRATED_CNC_SCHEMA.' +
              'ACTION_PROPERTY_REPRESENTATION.PROPERTY') |
             (1 = SIZEOF (QUERY (it <* prep.representation.items |
                (('INTEGRATED_CNC_SCHEMA.COMPOUND_REPRESENTATION_ITEM'
                   IN TYPEOF(it)) AND
                 ('INTEGRATED_CNC_SCHEMA.SET_REPRESENTATION_ITEM'
                   IN TYPEOF(it.item_element)))
             )))
           )))
         )))
        );
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_functions_relationship
  SUBTYPE OF (action_method_relationship);
END_ENTITY; -- 10303-238: integrated_cnc_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', '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_parameter_action_property      (SELF, 'pallet index')));

  WR5:  NOT (SELF.description = 'index table') OR
        ((verify_required_action_property       (SELF, 'table index')) AND
         (verify_parameter_action_property      (SELF, 'table index')));

  WR6:  NOT (SELF.description = 'load tool') OR
        (1 = SIZEOF (QUERY (mt <*
         USEDIN (SELF, 'INTEGRATED_CNC_SCHEMA.ACTION_RESOURCE.USAGE') |
         ('INTEGRATED_CNC_SCHEMA.MACHINING_TOOL' in TYPEOF(mt)))));

  WR7:  NOT (SELF.description = 'unload tool') OR
        (1 >= SIZEOF (QUERY (mt <*
         USEDIN (SELF, 'INTEGRATED_CNC_SCHEMA.ACTION_RESOURCE.USAGE') |
         ('INTEGRATED_CNC_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: integrated_cnc_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
         (('INTEGRATED_CNC_SCHEMA.COMPOUND_REPRESENTATION_ITEM'
            IN TYPEOF(it)) AND
          ('INTEGRATED_CNC_SCHEMA.LIST_REPRESENTATION_ITEM'
            IN TYPEOF(it.item_element)) AND
          (SIZEOF(it.item_element) = 3) AND
          (0 = SIZEOF (QUERY (ie <* it.item_element | NOT
           (('INTEGRATED_CNC_SCHEMA.EXPRESSION_REPRESENTATION_ITEM'
              IN TYPEOF(ie)) AND
            ('INTEGRATED_CNC_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
         (('INTEGRATED_CNC_SCHEMA.COMPOUND_REPRESENTATION_ITEM'
            IN TYPEOF(it)) AND
          ('INTEGRATED_CNC_SCHEMA.LIST_REPRESENTATION_ITEM'
            IN TYPEOF(it.item_element)) AND
          (SIZEOF(it.item_element) = 3) AND
          (0 = SIZEOF (QUERY (ie <* it.item_element | NOT
           (('INTEGRATED_CNC_SCHEMA.EXPRESSION_REPRESENTATION_ITEM'
              IN TYPEOF(ie)) AND
            ('INTEGRATED_CNC_SCHEMA.NUMERIC_VARIABLE'
              IN TYPEOF(ie))))))
         )
        )));
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_operation
  SUBTYPE OF (action_method);
  WHERE
  WR1: ((verify_related_type_for_amr    (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_TOOLPATH_SEQUENCE_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_TOOLPATH']))
       );

  WR2:  (verify_optional_action_property     (SELF, 'tool direction')) AND
        (verify_rep_type_for_action_property (SELF, 'tool direction',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_TOOL_DIRECTION_REPRESENTATION']));

  WR3:  ('INTEGRATED_CNC_SCHEMA.MACHINING_RAPID_MOVEMENT' IN TYPEOF(SELF)) OR
        ('INTEGRATED_CNC_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',
          ['INTEGRATED_CNC_SCHEMA.CARTESIAN_POINT'])) AND

         (1 = SIZEOF (QUERY (mt <*
          USEDIN (SELF, 'INTEGRATED_CNC_SCHEMA.ACTION_RESOURCE.USAGE') |
          ('INTEGRATED_CNC_SCHEMA.MACHINING_TOOL' in TYPEOF(mt))))) AND

         (verify_required_relating_amr  (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_TECHNOLOGY_RELATIONSHIP'])) AND
         (verify_related_type_for_amr   (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_TECHNOLOGY_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_TECHNOLOGY'])) AND

         (verify_required_relating_amr  (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_FUNCTIONS_RELATIONSHIP'])) AND
         (verify_related_type_for_amr   (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_FUNCTIONS_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_FUNCTIONS']))
        );
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_operation_relationship
  SUBTYPE OF (action_method_relationship);
END_ENTITY; -- 10303-238: integrated_cnc_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: integrated_cnc_schema

ENTITY machining_operator_instruction_relationship
  SUBTYPE OF (sequential_method);
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_process_body_relationship
  SUBTYPE OF (action_method_relationship);
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_process_branch_relationship
  SUBTYPE OF (machining_process_body_relationship);
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_process_concurrent_relationship
  SUBTYPE OF (machining_process_body_relationship, concurrent_action_method);
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_process_executable
  SUBTYPE OF (action_method);
  WHERE
  WR1:  NOT (0 = SIZEOF (TYPEOF (SELF) *
            ['INTEGRATED_CNC_SCHEMA.MACHINING_FEATURE_PROCESS',
             'INTEGRATED_CNC_SCHEMA.MACHINING_NC_FUNCTION',
             'INTEGRATED_CNC_SCHEMA.MACHINING_RAPID_MOVEMENT',
             'INTEGRATED_CNC_SCHEMA.MACHINING_TOUCH_PROBING',
             'INTEGRATED_CNC_SCHEMA.MACHINING_WORKINGSTEP',
             'INTEGRATED_CNC_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',
          ['INTEGRATED_CNC_SCHEMA.EXPRESSION_REPRESENTATION_ITEM',
           'INTEGRATED_CNC_SCHEMA.NUMERIC_VARIABLE'])) AND

         (verify_required_action_property       (SELF, 'rvalue')) AND
         (verify_rep_item_for_action_property   (SELF, 'rvalue',
          ['INTEGRATED_CNC_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',
          ['INTEGRATED_CNC_SCHEMA.EXPRESSION_REPRESENTATION_ITEM',
           'INTEGRATED_CNC_SCHEMA.BOOLEAN_EXPRESSION'])) AND

         (verify_required_relating_amr_with_name  (SELF, 'true branch',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_BRANCH_RELATIONSHIP'])) AND
         (verify_related_type_for_amr_with_name   (SELF, 'true branch',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_BRANCH_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_EXECUTABLE'])) AND

         (verify_optional_relating_amr_with_name  (SELF, 'false branch',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_BRANCH_RELATIONSHIP'])) AND
         (verify_related_type_for_amr_with_name   (SELF, 'false branch',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_BRANCH_RELATIONSHIP'],
          ['INTEGRATED_CNC_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',
          ['INTEGRATED_CNC_SCHEMA.EXPRESSION_REPRESENTATION_ITEM',
           'INTEGRATED_CNC_SCHEMA.BOOLEAN_EXPRESSION'])) AND

         (verify_required_relating_amr  (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_BODY_RELATIONSHIP'])) AND
         (verify_related_type_for_amr   (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_BODY_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_EXECUTABLE']))
        );

  WR5:  NOT (SELF.description = 'parallel') OR
        ((2 <= get_count_of_relating_amr (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_CONCURRENT_RELATIONSHIP']))
        AND
         (verify_related_type_for_amr   (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_CONCURRENT_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_EXECUTABLE']))
        );

  WR6:  NOT (SELF.description = 'non-sequential') OR
        ((2 <= get_count_of_relating_amr (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_BODY_RELATIONSHIP'])) AND
         (verify_related_type_for_amr   (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_BODY_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_EXECUTABLE']))
        );

  WR7:  NOT (SELF.description = 'selective') OR
        ((2 <= get_count_of_relating_amr (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_BRANCH_RELATIONSHIP'])) AND
         (verify_related_type_for_amr   (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_BRANCH_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_EXECUTABLE']))
        );

  WR8:  NOT (SELF.description = 'setup instructions') OR
        ((verify_related_type_for_amr   (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_OPERATOR_INSTRUCTION_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_OPERATOR_INSTRUCTION']))
        );
END_ENTITY; -- 10303-238: integrated_cnc_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: integrated_cnc_schema

ENTITY machining_process_model_relationship
  SUBTYPE OF (sequential_method);
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_process_sequence_relationship
  SUBTYPE OF (machining_process_body_relationship, sequential_method);
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_project
          SUBTYPE OF (product);
  WHERE
  WR1: (0 = SIZEOF (QUERY (pdf <* USEDIN (SELF,
          'INTEGRATED_CNC_SCHEMA.' +
          'PRODUCT_DEFINITION_FORMATION.OF_PRODUCT') | NOT

          -- it has at most one associated owner.
          (1 >= SIZEOF (QUERY (poa <* USEDIN (pdf,
             'INTEGRATED_CNC_SCHEMA.' +
             'APPLIED_PERSON_AND_ORGANIZATION_ASSIGNMENT.ITEMS') |
               (poa.role.name = 'owner'))))
        )));


  WR2: (0 = SIZEOF (QUERY (pdf <* USEDIN (SELF,
          'INTEGRATED_CNC_SCHEMA.' +
          'PRODUCT_DEFINITION_FORMATION.OF_PRODUCT') | NOT

          -- it has at most one associated release date.
          (1 >= SIZEOF (QUERY (dta <* USEDIN (pdf,
             'INTEGRATED_CNC_SCHEMA.' +
             'APPLIED_DATE_AND_TIME_ASSIGNMENT.ITEMS') |
               (dta.role.name = 'release date'))))
        )));


  WR3: (0 = SIZEOF (QUERY (pdf <* USEDIN (SELF,
          'INTEGRATED_CNC_SCHEMA.' +
          'PRODUCT_DEFINITION_FORMATION.OF_PRODUCT') | NOT

          (0 = SIZEOF (QUERY (pd <* USEDIN (pdf,
           'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION.FORMATION') | NOT

          -- it has one associated workplan.
          (1 = SIZEOF (QUERY (ppa <* USEDIN (pd,
             'INTEGRATED_CNC_SCHEMA.' +
             'PROCESS_PRODUCT_ASSOCIATION.DEFINED_PRODUCT') |
             (ppa.process.name = 'machining') AND
             ('INTEGRATED_CNC_SCHEMA.MACHINING_WORKPLAN'
               IN TYPEOF (ppa.process.chosen_method)))))
          )))
        )));
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_project_workpiece_relationship
  SUBTYPE OF (product_definition_relationship);
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_rapid_movement
  SUBTYPE OF (machining_process_executable, machining_operation);
  WHERE
  WR1:  ((verify_required_action_property       (SELF, 'security plane')) AND
         (verify_rep_item_for_action_property   (SELF, 'security plane',
          ['INTEGRATED_CNC_SCHEMA.ELEMENTARY_SURFACE'])));
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_setup
  SUBTYPE OF (product);
  WHERE
  WR1: (0 = SIZEOF (QUERY (pdf <* USEDIN (SELF,
          'INTEGRATED_CNC_SCHEMA.' +
          'PRODUCT_DEFINITION_FORMATION.OF_PRODUCT') | NOT

          (0 = SIZEOF (QUERY (pd <* USEDIN (pdf,
           'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION.FORMATION') | NOT

          -- it has one associated security plane.
          (1 = SIZEOF (QUERY (prop <* USEDIN (pd,
             'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION') |
             (prop.name = 'security plane'))))
          )))
        )));
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_setup_workpiece_relationship
  SUBTYPE OF (product_definition_relationship);
END_ENTITY; -- 10303-238: integrated_cnc_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: integrated_cnc_schema

ENTITY machining_strategy
  SUBTYPE OF (action_method);
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_strategy_relationship
  SUBTYPE OF (action_method_relationship);
END_ENTITY; -- 10303-238: integrated_cnc_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',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION']));

  WR2:  (verify_required_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',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_SPINDLE_SPEED_REPRESENTATION'])) AND

         (verify_required_action_property
           (SELF, 'synchronize spindle with feed')) AND
         (verify_enumeration_action_property
           (SELF, 'synchronize spindle with feed',
           ['synchronized', 'not synchronized'])) AND

         (verify_required_action_property
           (SELF, 'inhibit feedrate override')) AND
         (verify_enumeration_action_property
           (SELF, 'inhibit feedrate override',
           ['override allowed', 'override not allowed'])) AND

         (verify_required_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,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_ADAPTIVE_CONTROL_RELATIONSHIP'])) AND
         (verify_related_type_for_amr   (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_ADAPTIVE_CONTROL_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_TECHNOLOGY']))
        );

  WR4:  NOT (SELF.description = 'milling') OR
        ((verify_required_relating_amr (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_ADAPTIVE_CONTROL_RELATIONSHIP'])) OR

         (verify_required_action_property     (SELF, 'spindle') AND
          verify_rep_desc_for_action_property (SELF, 'spindle',
           ['spindle speed', 'cutting speed']))
        );

  WR5:  NOT (SELF.description = 'milling') OR
        ((verify_required_relating_amr (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_ADAPTIVE_CONTROL_RELATIONSHIP'])) OR

         (verify_required_action_property     (SELF, 'feedrate') AND
          verify_rep_desc_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',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_SPINDLE_SPEED_REPRESENTATION'])) AND
         (verify_rep_desc_for_action_property (SELF, 'spindle',
           ['spindle speed', 'cutting speed'])) AND

         (verify_rep_desc_for_action_property (SELF, 'feedrate',
           ['feed speed', 'feed per revolution'])) AND

         (verify_required_action_property
           (SELF, 'synchronize spindle with z feed')) AND
         (verify_enumeration_action_property
           (SELF, 'synchronize spindle with z feed',
           ['synchronized', 'not synchronized'])) AND

         (verify_required_action_property
           (SELF, 'inhibit feedrate override')) AND
         (verify_enumeration_action_property
           (SELF, 'inhibit feedrate override',
           ['override allowed', 'override not allowed'])) AND

         (verify_required_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,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_ADAPTIVE_CONTROL_RELATIONSHIP'])) AND
         (verify_related_type_for_amr   (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_ADAPTIVE_CONTROL_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_TECHNOLOGY']))
        );
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_technology_relationship
  SUBTYPE OF (action_method_relationship);
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_tool
  SUBTYPE OF (action_resource);
  WHERE
  WR1: NOT (SELF.kind.name IN ['cutting tool', 'milling cutting tool',
        'turning cutting tool']) OR
        ((verify_required_resource_property     (SELF, 'tool body')) AND
         (verify_rep_type_for_resource_property (SELF, 'tool body',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_TOOL_BODY_REPRESENTATION'])) AND

        -- Must have at least one cutting component
        -- note that this is a set, not a list.
        (0 < SIZEOF (QUERY (arr <* USEDIN (SELF,
          'INTEGRATED_CNC_SCHEMA.ACTION_RESOURCE_RELATIONSHIP.RELATING_RESOURCE') |
         ('INTEGRATED_CNC_SCHEMA.MACHINING_CUTTING_COMPONENT'
          IN TYPEOF (arr.related_resource)) ))) AND

         (verify_optional_resource_property
           (SELF, 'overall assembly length')) AND
         (verify_length_measure_resource_property
           (SELF, 'overall assembly length')) AND

         (verify_optional_resource_property
           (SELF, 'tool holder profile')) AND
         (verify_rep_item_for_resource_property
           (SELF, 'tool holder profile',
           ['INTEGRATED_CNC_SCHEMA.SURFACE_OF_REVOLUTION']))
        );

  WR2: NOT (SELF.kind.name = 'milling cutting tool') OR
        ((verify_optional_resource_property
           (SELF, 'direction for spindle orientation')) AND
         (verify_rep_item_for_resource_property
           (SELF, 'direction for spindle orientation',
           ['INTEGRATED_CNC_SCHEMA.DIRECTION'])) AND

         (verify_optional_resource_property
           (SELF, 'tool holder diameter for spindle orientation')) AND
         (verify_length_measure_resource_property
           (SELF, 'tool holder diameter for spindle orientation'))
        );

  WR3: NOT (SELF.kind.name = 'turning cutting tool') OR
        ((verify_optional_resource_property
           (SELF, 'overall assembly width')) AND
         (verify_length_measure_resource_property
           (SELF, 'overall assembly width')) AND

         (verify_optional_resource_property
           (SELF, 'minimum cutting diameter')) AND
         (verify_length_measure_resource_property
           (SELF, 'minimum cutting diameter'))
        );
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_tool_body_representation
  SUBTYPE OF (representation);
  WHERE
  WR1:  NOT (SELF.name IN ['backside counterbore', 'backside countersink',
        'ball endmill', 'boring tool', 'bullnose endmill', 'centerdrill',
        'combined drill and reamer', 'combined drill and tap', 'counterbore',
        'countersink','dovetail mill', 'endmill', 'facemill', 'reamer',
        'side mill', 'spade drill', 'tap', 'tapered drill', 'tapered endmill',
        'tapered reamer', 'tapered tap', 'tee slot mill', 'thread mill',
        'threading tool', 'twist drill', 'user defined milling tool',
        'woodruff keyseat mill']) OR

        ((1 = SIZEOF (QUERY (rr <* USEDIN (SELF,
           'INTEGRATED_CNC_SCHEMA.REPRESENTATION_RELATIONSHIP.REP_1') |
          ('INTEGRATED_CNC_SCHEMA.MACHINING_TOOL_DIMENSION_REPRESENTATION'
           IN TYPEOF(rr.rep_2))))
          ) AND

         (verify_optional_rep_item      (SELF, 'number of teeth')) AND
         (verify_count_measure_rep_item (SELF, 'number of teeth')) AND

         (verify_optional_rep_item    (SELF, 'hand of cut')) AND
         (verify_enumeration_rep_item (SELF, 'hand of cut',
           ['left', 'right', 'neutral'])) AND

         (verify_optional_rep_item    (SELF, 'coolant through tool')) AND
         (verify_enumeration_rep_item (SELF, 'coolant through tool',
           ['supported', 'not supported'])) AND

         (verify_optional_rep_item       (SELF, 'pilot length')) AND
         (verify_length_measure_rep_item (SELF, 'pilot length'))
        );

  WR2:  NOT (SELF.name = 'boring tool') OR
        ((verify_required_rep_item    (SELF, 'retract movement')) AND
         (verify_enumeration_rep_item (SELF, 'retract movement',
           ['permitted', 'forbidden']))
        );

  WR3:  NOT (SELF.name IN ['combined drill and reamer',
         'combined drill and tap']) OR
        ((verify_optional_rep_item       (SELF, 'drill length')) AND
         (verify_length_measure_rep_item (SELF, 'drill length'))
        );

  WR4:  NOT (SELF.name IN ['countersink', 'backside countersink']) OR
        ((verify_optional_rep_item       (SELF, 'countersink radius')) AND
         (verify_length_measure_rep_item (SELF, 'countersink radius'))
        );

  WR5:  NOT (SELF.name = 'dovetail mill') OR
        ((verify_optional_rep_item       (SELF, 'included angle')) AND
         (verify_angle_measure_rep_item  (SELF, 'included angle'))
        );

  WR6:  NOT (SELF.name IN ['side mill', 'woodruff keyseat mill']) OR
        ((verify_optional_rep_item       (SELF, 'cutter width')) AND
         (verify_length_measure_rep_item (SELF, 'cutter width'))
        );

  WR7:  NOT (SELF.name = 'tee slot mill') OR
        ((verify_optional_rep_item       (SELF, 'cutting thickness')) AND
         (verify_length_measure_rep_item (SELF, 'cutting thickness'))
        );

  WR8:  NOT (SELF.name IN ['tapered drill', 'tapered endmill',
         'tapered reamer', 'tapered tap']) OR
        ((verify_optional_rep_item       (SELF, 'taper angle')) AND
         (verify_angle_measure_rep_item  (SELF, 'taper angle'))
        );

  WR9:  NOT (SELF.name = 'user defined milling tool') OR
        ((verify_required_rep_item (SELF, 'tool identifier')) AND
         (0 = SIZEOF (QUERY ( it <* SELF.items |
          (it.name = 'tool identifier') AND NOT
          (('INTEGRATED_CNC_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
            IN TYPEOF(it))))))
        );

  -- tool types for turning
  WR10: NOT (SELF.name IN ['general turning tool',
        'grooving tool', 'knurling tool', 'turning threading tool',
        'user defined turning tool']) OR

        ((1 = SIZEOF (QUERY (rr <* USEDIN (SELF,
           'INTEGRATED_CNC_SCHEMA.REPRESENTATION_RELATIONSHIP.REP_1') |
          ('INTEGRATED_CNC_SCHEMA.MACHINING_TOOL_DIMENSION_REPRESENTATION'
           IN TYPEOF(rr.rep_2))))) AND

         (verify_optional_rep_item    (SELF, 'hand of cut')) AND
         (verify_enumeration_rep_item (SELF, 'hand of cut',
           ['left', 'right', 'neutral'])) AND

         (verify_optional_rep_item
           (SELF, 'maximum side cutting depth')) AND
         (verify_length_measure_rep_item
           (SELF, 'maximum side cutting depth')) AND

         (verify_optional_rep_item
           (SELF, 'maximum end cutting depth')) AND
         (verify_length_measure_rep_item
           (SELF, 'maximum end cutting depth')) AND

         (verify_optional_rep_item       (SELF, 'tool body height')) AND
         (verify_length_measure_rep_item (SELF, 'tool body height')) AND

         (verify_optional_rep_item       (SELF, 'tool body width')) AND
         (verify_length_measure_rep_item (SELF, 'tool body width'))
        );

  WR11: NOT (SELF.name = 'grooving tool') OR
        ((verify_required_rep_item       (SELF, 'cutting width')) AND
         (verify_length_measure_rep_item (SELF, 'cutting width')) AND

         (verify_required_rep_item       (SELF, 'maximum grooving depth')) AND
         (verify_length_measure_rep_item (SELF, 'maximum grooving depth')) AND

         (verify_optional_rep_item       (SELF, 'corner radius')) AND
         (verify_length_measure_rep_item (SELF, 'corner radius')) AND

         (verify_optional_rep_item
           (SELF, 'maximum axial grooving diameter')) AND
         (verify_length_measure_rep_item
           (SELF, 'maximum axial grooving diameter')) AND

         (verify_optional_rep_item
           (SELF, 'minimum axial grooving diameter')) AND
         (verify_length_measure_rep_item
           (SELF, 'minimum axial grooving diameter'))
        );

  WR12: NOT (SELF.name = 'knurling tool') OR
        ((verify_required_rep_item    (SELF, 'knurl pattern')) AND
         (verify_enumeration_rep_item (SELF, 'knurl pattern',
           ['straight', 'diagonal', 'diamond'])) AND

         (verify_optional_rep_item       (SELF, 'cutting length')) AND
         (verify_length_measure_rep_item (SELF, 'cutting length')) AND

         (verify_optional_rep_item       (SELF, 'cutting angle')) AND
         (verify_angle_measure_rep_item  (SELF, 'cutting angle')) AND

         (verify_optional_rep_item       (SELF, 'cutting pitch')) AND
         (verify_length_measure_rep_item (SELF, 'cutting pitch'))
        );

  WR13: NOT (SELF.name = 'turning threading tool') OR
        ((verify_required_rep_item       (SELF, 'threading pitch')) AND
         (verify_length_measure_rep_item (SELF, 'threading pitch')) AND

         (verify_optional_rep_item       (SELF, 'threading angle')) AND
         (verify_angle_measure_rep_item  (SELF, 'threading angle'))
        );

  WR14: NOT (SELF.name = 'user defined turning tool') OR
        ((verify_required_rep_item       (SELF, 'tool identifier')) AND
         (verify_descriptive_rep_item    (SELF, 'tool identifier'))
        );
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_tool_dimension_representation
  SUBTYPE OF (representation);
  WHERE
  WR1:  NOT (SELF.name = 'milling') OR
        ((verify_required_rep_item       (SELF, 'diameter')) AND
         (verify_length_measure_rep_item (SELF, 'diameter')) AND

         (verify_optional_rep_item       (SELF, 'tool tip half angle')) AND
         (verify_angle_measure_rep_item  (SELF, 'tool tip half angle')) AND

         (verify_optional_rep_item       (SELF, 'tool circumference angle')) AND
         (verify_angle_measure_rep_item  (SELF, 'tool circumference angle')) AND

         (verify_optional_rep_item       (SELF, 'cutting edge length')) AND
         (verify_length_measure_rep_item (SELF, 'cutting edge length')) AND

         (verify_optional_rep_item       (SELF, 'edge radius')) AND
         (verify_length_measure_rep_item (SELF, 'edge radius')) AND

         (verify_optional_rep_item       (SELF, 'edge center vertical')) AND
         (verify_length_measure_rep_item (SELF, 'edge center vertical')) AND

         (verify_optional_rep_item       (SELF, 'edge center horizontal')) AND
         (verify_length_measure_rep_item (SELF, 'edge center horizontal'))
        );

  WR2:  NOT (SELF.name = 'turning') OR
        ((verify_optional_rep_item       (SELF, 'cutting edge length')) AND
         (verify_length_measure_rep_item (SELF, 'cutting edge length')) AND

         (verify_optional_rep_item       (SELF, 'side cutting edge angle')) AND
         (verify_angle_measure_rep_item  (SELF, 'side cutting edge angle')) AND

         (verify_optional_rep_item       (SELF, 'end cutting edge angle')) AND
         (verify_angle_measure_rep_item  (SELF, 'end cutting edge angle')) AND

         (verify_optional_rep_item       (SELF, 'side rake angle')) AND
         (verify_angle_measure_rep_item  (SELF, 'side rake angle')) AND

         (verify_optional_rep_item       (SELF, 'back rake angle')) AND
         (verify_angle_measure_rep_item  (SELF, 'back rake angle')) AND

         (verify_optional_rep_item       (SELF, 'side clearance angle')) AND
         (verify_angle_measure_rep_item  (SELF, 'side clearance angle')) AND

         (verify_optional_rep_item       (SELF, 'back clearance angle')) AND
         (verify_angle_measure_rep_item  (SELF, 'back clearance angle')) AND

         (verify_optional_rep_item       (SELF, 'nose radius')) AND
         (verify_length_measure_rep_item (SELF, 'nose radius')) AND

         (verify_optional_rep_item       (SELF, 'circle diameter')) AND
         (verify_length_measure_rep_item (SELF, 'circle diameter'))
        );

  WR3:  (0 = SIZEOF (QUERY (rr <* USEDIN (SELF,
          'INTEGRATED_CNC_SCHEMA.REPRESENTATION_RELATIONSHIP.REP_2') |
         ('INTEGRATED_CNC_SCHEMA.MACHINING_TOOL_BODY_REPRESENTATION'
          IN TYPEOF(rr.rep_1)) AND (rr.rep_1.name = 'ball endmill')))
        ) OR (verify_ball_endmill_edge_dimensions (SELF));


  WR4:  (0 = SIZEOF (QUERY (rr <* USEDIN (SELF,
          'INTEGRATED_CNC_SCHEMA.REPRESENTATION_RELATIONSHIP.REP_2') |
         ('INTEGRATED_CNC_SCHEMA.MACHINING_TOOL_BODY_REPRESENTATION'
          IN TYPEOF(rr.rep_1)) AND
         (rr.rep_1.name IN ['bullnose endmill', 'ball endmill'])))
        ) OR (
         (0 = SIZEOF (QUERY ( it <* SELF.items |
          (it.name = 'tool tip half angle') AND NOT
          (it.value_component = 0)))
         ) AND
         (0 = SIZEOF (QUERY ( it <* SELF.items |
          (it.name = 'tool circumference angle') AND NOT
          (it.value_component = 0)))
         )
        );
END_ENTITY; -- 10303-238: integrated_cnc_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
          ('INTEGRATED_CNC_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: integrated_cnc_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_required_action_property        (SELF, 'priority')) AND
        (verify_enumeration_action_property     (SELF, 'priority',
         ['required', 'suggested']));

  WR3:  (verify_required_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,
                'INTEGRATED_CNC_SCHEMA.' +
                'ACTION_PROPERTY_REPRESENTATION.PROPERTY') |
                ('INTEGRATED_CNC_SCHEMA.' +
                 'MACHINING_TOOLPATH_SPEED_PROFILE_REPRESENTATION'
                 IN TYPEOF(prep.representation)) )))
         )))
        );

  WR5:  (verify_optional_relating_amr   (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_TECHNOLOGY_RELATIONSHIP'])) AND
        (verify_related_type_for_amr    (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_TECHNOLOGY_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_TECHNOLOGY']));

  WR6:  (verify_optional_relating_amr   (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_FUNCTIONS_RELATIONSHIP'])) AND
        (verify_related_type_for_amr    (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_FUNCTIONS_RELATIONSHIP'],
          ['INTEGRATED_CNC_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',
           ['INTEGRATED_CNC_SCHEMA.DIRECTION'])) AND

         (verify_optional_action_property     (SELF, 'down direction')) AND
         (verify_rep_item_for_action_property (SELF, 'down direction',
           ['INTEGRATED_CNC_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

         -- axis commands property must contain one or more bounded curves
         (0 = SIZEOF (QUERY (prop <* get_action_property (SELF, 'axis commands') |
          NOT ((0 < SIZEOF (QUERY (prep <* USEDIN (prop,
               'INTEGRATED_CNC_SCHEMA.ACTION_PROPERTY_REPRESENTATION.PROPERTY') |
              (1 <= SIZEOF (QUERY (it <* prep.representation.items |
                 ('INTEGRATED_CNC_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',
           ['INTEGRATED_CNC_SCHEMA.CARTESIAN_POINT'])) AND

         (verify_optional_action_property     (SELF, 'fix point direction')) AND
         (verify_rep_item_for_action_property (SELF, 'fix point direction',
           ['INTEGRATED_CNC_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',
           ['INTEGRATED_CNC_SCHEMA.BOUNDED_CURVE'])) AND

         (verify_optional_action_property     (SELF, 'surface normal')) AND
         (verify_rep_item_for_action_property (SELF, 'surface normal',
           ['INTEGRATED_CNC_SCHEMA.BOUNDED_CURVE'])) AND

         (verify_optional_action_property     (SELF, 'tool axis')) AND
         (verify_rep_item_for_action_property (SELF, 'tool axis',
           ['INTEGRATED_CNC_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',
            ['INTEGRATED_CNC_SCHEMA.BOUNDED_PCURVE'])) )

           OR

          ((verify_required_action_property     (SELF, 'basic curve')) AND
           (verify_rep_item_for_action_property (SELF, 'basic curve',
            ['INTEGRATED_CNC_SCHEMA.BOUNDED_CURVE'])) AND

           (verify_required_action_property     (SELF, 'surface normal')) AND
           (verify_rep_item_for_action_property (SELF, 'surface normal',
            ['INTEGRATED_CNC_SCHEMA.BOUNDED_CURVE'])) )
          ) AND

         (verify_optional_action_property     (SELF, 'tool axis')) AND
         (verify_rep_item_for_action_property (SELF, 'tool axis',
           ['INTEGRATED_CNC_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'))
        );

END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_toolpath_sequence_relationship
  SUBTYPE OF (sequential_method);
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_toolpath_speed_profile_representation
  SUBTYPE OF (representation);
  WHERE
  WR1:  (1 = SIZEOF (QUERY ( it <* SELF.items |
          ( (('INTEGRATED_CNC_SCHEMA.BOUNDED_CURVE'
              IN TYPEOF(it))) OR

            (('INTEGRATED_CNC_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
              IN TYPEOF(it)) AND
             (it.description IN ['rapid']))  OR

            ((SIZEOF([
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM',
              'INTEGRATED_CNC_SCHEMA.RATIO_MEASURE_WITH_UNIT'] *
              TYPEOF(it)) = 2))
           )
        )));
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_touch_probing
  SUBTYPE OF (machining_process_executable, machining_operation);
  WHERE
  WR1:  (SELF.description IN ['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',
          ['INTEGRATED_CNC_SCHEMA.ELEMENTARY_SURFACE'])));

  WR3:  ((verify_required_action_property       (SELF, 'measured offset')) AND
         (verify_rep_item_for_action_property   (SELF, 'measured offset',
          ['INTEGRATED_CNC_SCHEMA.EXPRESSION_REPRESENTATION_ITEM',
           'INTEGRATED_CNC_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',
          ['INTEGRATED_CNC_SCHEMA.AXIS2_PLACEMENT_3D'])) AND

        (1 = SIZEOF (QUERY (act <*
          USEDIN (SELF, 'INTEGRATED_CNC_SCHEMA.ACTION.CHOSEN_METHOD') |
          (act.name = 'workpiece probing')))) AND
        (0 = SIZEOF (QUERY (act <*
          USEDIN (SELF, 'INTEGRATED_CNC_SCHEMA.ACTION.CHOSEN_METHOD') |
          (act.name = 'workpiece probing') AND NOT
          ('INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_PROCESS'
            IN TYPEOF (act))))) AND

         (verify_required_action_property       (SELF, 'direction')) AND
         (verify_rep_item_for_action_property   (SELF, 'direction',
          ['INTEGRATED_CNC_SCHEMA.DIRECTION'])) AND

         (verify_required_action_property       (SELF, 'expected value')) AND
         (verify_rep_item_for_action_property   (SELF, 'expected value',
          ['INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT',
           'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM',
           'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.ACTION.CHOSEN_METHOD') |
          (act.name = 'workpiece complete probing')))) AND
         (0 = SIZEOF (QUERY (act <*
          USEDIN (SELF, 'INTEGRATED_CNC_SCHEMA.ACTION.CHOSEN_METHOD') |
          (act.name = 'workpiece complete probing') AND NOT
          ('INTEGRATED_CNC_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',
          ['INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT',
           'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM',
           'INTEGRATED_CNC_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',
          ['INTEGRATED_CNC_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',
          ['INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.ACTION_RESOURCE.USAGE') |
          ('INTEGRATED_CNC_SCHEMA.MACHINING_TOOL' in TYPEOF(mt)))))
        );
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_workingstep
  SUBTYPE OF (machining_process_executable);
  WHERE
  WR1:  ((verify_required_action_property     (SELF, 'security plane')) AND
         (verify_rep_item_for_action_property (SELF, 'security plane',
          ['INTEGRATED_CNC_SCHEMA.ELEMENTARY_SURFACE'])));

  WR2:  NOT (SELF.description = 'machining') OR
        ((verify_required_relating_amr (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_FEATURE_RELATIONSHIP'])) AND
         (verify_related_type_for_amr  (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_FEATURE_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_FEATURE_PROCESS'])) AND

         (verify_related_type_for_amr (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_FINAL_FEATURE_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_FEATURE_PROCESS'])) AND

         (verify_required_relating_amr  (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_OPERATION_RELATIONSHIP'])) AND
         (verify_related_type_for_amr   (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_OPERATION_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_OPERATION']))
        );

  WR3:  NOT (SELF.description = 'turning') OR
        ((2 <= get_count_of_relating_amr (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_FEATURE_SEQUENCE_RELATIONSHIP'])) AND
         (verify_related_type_for_amr    (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_FEATURE_SEQUENCE_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_FEATURE_PROCESS'])) AND

         (verify_required_relating_amr  (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_OPERATION_RELATIONSHIP'])) AND
         (verify_related_type_for_amr   (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_OPERATION_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.TURNING_TYPE_OPERATION']))
        );

  WR4:  NOT (SELF.description IN ['machining', 'turning']) OR
        (verify_optional_in_process_geometry (SELF));
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY machining_workplan
  SUBTYPE OF (machining_process_executable);
  WHERE
  WR1:  (1 <= get_count_of_relating_amr (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_SEQUENCE_RELATIONSHIP'])) AND
        (verify_related_type_for_amr   (SELF,
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_SEQUENCE_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_PROCESS_EXECUTABLE']));

  WR2:  (verify_optional_action_property (SELF, 'channel'));

  WR3:  (1 >= SIZEOF (QUERY (act <*
          USEDIN (SELF, 'INTEGRATED_CNC_SCHEMA.ACTION.CHOSEN_METHOD') |
          (act.name = 'setup')))) AND
        (0 = SIZEOF (QUERY (act <*
          USEDIN (SELF, 'INTEGRATED_CNC_SCHEMA.ACTION.CHOSEN_METHOD') |
          (act.name = 'setup') AND NOT
          ('INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_PROCESS' IN TYPEOF (act))
        )));

  WR4:  (verify_optional_in_process_geometry (SELF));
END_ENTITY; -- 10303-238: integrated_cnc_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_surface_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(QUERY (it <* SELF.items| NOT (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.SHELL_BASED_SURFACE_MODEL', 
              'INTEGRATED_CNC_SCHEMA.MAPPED_ITEM', 
              'INTEGRATED_CNC_SCHEMA.AXIS2_PLACEMENT_3D' ] * TYPEOF(it)) = 
              1))) = 0;
    WR2: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.SHELL_BASED_SURFACE_MODEL', 
              'INTEGRATED_CNC_SCHEMA.MAPPED_ITEM' ] * TYPEOF(it)) = 1))) > 
              0;
    WR3: SIZEOF(QUERY (mi <* QUERY (it <* SELF.items| (
              'INTEGRATED_CNC_SCHEMA.MAPPED_ITEM' IN TYPEOF(it)))| NOT ((
              'INTEGRATED_CNC_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| (
              'INTEGRATED_CNC_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN TYPEOF(
              mr_it)))) > 0)))) = 0;
    WR4: SIZEOF(QUERY (sbsm <* QUERY (it <* SELF.items| (
              'INTEGRATED_CNC_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN TYPEOF(
              it)))| NOT (SIZEOF(QUERY (sh <* sbsm\
              shell_based_surface_model.sbsm_boundary| NOT (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.OPEN_SHELL', 
              'INTEGRATED_CNC_SCHEMA.ORIENTED_CLOSED_SHELL', 
              'INTEGRATED_CNC_SCHEMA.CLOSED_SHELL' ] * TYPEOF(sh)) = 1))) =
               0))) = 0;
    WR5: SIZEOF(QUERY (sbsm <* QUERY (it <* SELF.items| (
              'INTEGRATED_CNC_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 (
              'INTEGRATED_CNC_SCHEMA.FACE_SURFACE' IN TYPEOF(fa)))) = 0))) 
              = 0))) = 0;
    WR6: SIZEOF(QUERY (sbsm <* QUERY (it <* SELF.items| (
              'INTEGRATED_CNC_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 ((
              'INTEGRATED_CNC_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| (
              'INTEGRATED_CNC_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 ((
              'INTEGRATED_CNC_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR (
              SIZEOF(QUERY (bnds <* fa.bounds| NOT (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.EDGE_LOOP', 
              'INTEGRATED_CNC_SCHEMA.VERTEX_LOOP' ] * TYPEOF(bnds.bound)) =
               1))) = 0)))) = 0))) = 0))) = 0;
    WR8: SIZEOF(QUERY (sbsm <* QUERY (it <* SELF.items| (
              'INTEGRATED_CNC_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 ((
              'INTEGRATED_CNC_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR (
              SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds| (
              'INTEGRATED_CNC_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)))| 
              NOT (SIZEOF(QUERY (oe <* elp_fbnds\path.edge_list| NOT (
              'INTEGRATED_CNC_SCHEMA.EDGE_CURVE' IN TYPEOF(oe.edge_element)
              ))) = 0))) = 0)))) = 0))) = 0))) = 0;
    WR9: SIZEOF(QUERY (sbsm <* QUERY (it <* SELF.items| (
              'INTEGRATED_CNC_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 ((
              'INTEGRATED_CNC_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR (
              SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds| (
              'INTEGRATED_CNC_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)))| 
              NOT (SIZEOF(QUERY (oe_cv <* QUERY (oe <* elp_fbnds\path.
              edge_list| ('INTEGRATED_CNC_SCHEMA.EDGE_CURVE' IN TYPEOF(oe.
              edge_element)))| NOT (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.B_SPLINE_CURVE', 
              'INTEGRATED_CNC_SCHEMA.CONIC', 
              'INTEGRATED_CNC_SCHEMA.CURVE_REPLICA', 
              'INTEGRATED_CNC_SCHEMA.LINE', 
              'INTEGRATED_CNC_SCHEMA.OFFSET_CURVE_3D', 
              'INTEGRATED_CNC_SCHEMA.PCURVE', 
              'INTEGRATED_CNC_SCHEMA.POLYLINE', 
              'INTEGRATED_CNC_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| (
              'INTEGRATED_CNC_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 ((
              'INTEGRATED_CNC_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR (
              SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds| (
              'INTEGRATED_CNC_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| (
              'INTEGRATED_CNC_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 ((
              'INTEGRATED_CNC_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR (
              SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds| (
              'INTEGRATED_CNC_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)))| 
              NOT (SIZEOF(QUERY (oe <* elp_fbnds\path.edge_list| NOT ((
              'INTEGRATED_CNC_SCHEMA.VERTEX_POINT' IN TYPEOF(oe.
              edge_element.edge_start)) AND (
              'INTEGRATED_CNC_SCHEMA.VERTEX_POINT' IN TYPEOF(oe.
              edge_element.edge_end))))) = 0))) = 0)))) = 0))) = 0))) = 0;
    WR12: SIZEOF(QUERY (sbsm <* QUERY (it <* SELF.items| (
              'INTEGRATED_CNC_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 ((
              'INTEGRATED_CNC_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR (
              SIZEOF(QUERY (elp_fbnds <* QUERY (bnds <* fa.bounds| (
              'INTEGRATED_CNC_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)))| 
              NOT (SIZEOF(QUERY (oe <* elp_fbnds\path.edge_list| NOT ((
              SIZEOF([ 'INTEGRATED_CNC_SCHEMA.CARTESIAN_POINT', 
              'INTEGRATED_CNC_SCHEMA.DEGENERATE_PCURVE', 
              'INTEGRATED_CNC_SCHEMA.POINT_ON_CURVE', 
              'INTEGRATED_CNC_SCHEMA.POINT_ON_SURFACE' ] * TYPEOF(oe.
              edge_element.edge_start\vertex_point.vertex_geometry)) = 1) 
              AND (SIZEOF([ 'INTEGRATED_CNC_SCHEMA.CARTESIAN_POINT', 
              'INTEGRATED_CNC_SCHEMA.DEGENERATE_PCURVE', 
              'INTEGRATED_CNC_SCHEMA.POINT_ON_CURVE', 
              'INTEGRATED_CNC_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| (
              'INTEGRATED_CNC_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 ((
              'INTEGRATED_CNC_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR (
              SIZEOF(QUERY (vlp_fbnds <* QUERY (bnds <* fa.bounds| (
              'INTEGRATED_CNC_SCHEMA.VERTEX_LOOP' IN TYPEOF(bnds.bound)))| 
              NOT ('INTEGRATED_CNC_SCHEMA.VERTEX_POINT' IN TYPEOF(vlp_fbnds
              \vertex_loop.loop_vertex)))) = 0)))) = 0))) = 0))) = 0;
    WR14: SIZEOF(QUERY (sbsm <* QUERY (it <* SELF.items| (
              'INTEGRATED_CNC_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 ((
              'INTEGRATED_CNC_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR (
              SIZEOF(QUERY (vlp_fbnds <* QUERY (bnds <* fa.bounds| (
              'INTEGRATED_CNC_SCHEMA.VERTEX_LOOP' IN TYPEOF(bnds.bound)))| 
              NOT (SIZEOF([ 'INTEGRATED_CNC_SCHEMA.CARTESIAN_POINT', 
              'INTEGRATED_CNC_SCHEMA.DEGENERATE_PCURVE', 
              'INTEGRATED_CNC_SCHEMA.POINT_ON_CURVE', 
              'INTEGRATED_CNC_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(using_representations(SELF), [ SELF 
              ]);
END_ENTITY; -- 10303-43: representation_schema

ENTITY marking
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (
              'INTEGRATED_CNC_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN 
              TYPEOF(it)) AND (it.name = 'marking text'))) = 1))) = 0))) = 
              0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (
              'INTEGRATED_CNC_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN 
              TYPEOF(it)) AND (it.name = 'special instructions'))) <= 1))) 
              = 0))) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (
              'INTEGRATED_CNC_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN 
              TYPEOF(it)) AND (it.name = 'font name'))) <= 1))) = 0))) = 0;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'character height'))) <= 1))) = 0)))
               = 0;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'character spacing'))) <= 1))) = 0))
              ) = 0;
    WR7: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (SIZEOF(QUERY
               (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'applied shape') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| ('INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT' IN 
              TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

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: ('INTEGRATED_CNC_SCHEMA.CHARACTERIZED_OBJECT' IN TYPEOF(SELF\
              property_definition.definition)) OR (SIZEOF(bag_to_set(USEDIN
              (SELF, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')) - QUERY (
              temp <* bag_to_set(USEDIN(SELF, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'))| (
              'INTEGRATED_CNC_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 measure_qualification;
    name              : label;
    description       : text;
    qualified_measure : measure_with_unit;
    qualifiers        : SET [1:?] OF value_qualifier;
  WHERE
    WR1: SIZEOF(QUERY (temp <* qualifiers| (
              'INTEGRATED_CNC_SCHEMA.PRECISION_QUALIFIER' IN TYPEOF(temp)))
              ) < 2;
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, time_measure_with_unit, 
      plane_angle_measure_with_unit, solid_angle_measure_with_unit, 
      ratio_measure_with_unit));
    value_component : measure_value;
    unit_component  : unit;
  WHERE
    WR1: valid_units(SELF);
END_ENTITY; -- 10303-41: measure_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',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'])) AND
         (verify_related_type_for_amr_with_name   (SELF, 'approach',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_APPROACH_RETRACT_STRATEGY']))
        );

  WR3:  ((verify_optional_relating_amr_with_name  (SELF, 'retract',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'])) AND
         (verify_related_type_for_amr_with_name   (SELF, 'retract',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_APPROACH_RETRACT_STRATEGY']))
        );

  WR4:  ((verify_optional_relating_amr_with_name  (SELF, 'machining',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'])) AND
         (verify_related_type_for_amr_with_name   (SELF, 'machining',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MILLING_TYPE_STRATEGY']))
        );
END_ENTITY; -- 10303-238: integrated_cnc_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',
           ['INTEGRATED_CNC_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',
           ['INTEGRATED_CNC_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',
           ['INTEGRATED_CNC_SCHEMA.DIRECTION'])) AND

         (verify_optional_action_property       (SELF, 'cutmode')) AND
         (verify_enumeration_action_property    (SELF, 'cutmode',
           ['climb', 'conventional'])) );
END_ENTITY; -- 10303-238: integrated_cnc_schema

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, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATING_SHAPE_ASPECT')| (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)))| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.REPLICATE_FEATURE', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATING_SHAPE_ASPECT')| (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)))| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.CIRCULAR_PATTERN', 
              'INTEGRATED_CNC_SCHEMA.RECTANGULAR_PATTERN' ] * TYPEOF(fcr.
              related_shape_aspect.of_shape.definition)) = 1) AND (fcr.
              description = 'base pattern'))) = 1;
    WR3: SIZEOF(QUERY (sar <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATING_SHAPE_ASPECT')| (SIZEOF(QUERY (msar <* USEDIN(sar.
              related_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| ((SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.PATTERN_OFFSET_MEMBERSHIP', 
              'INTEGRATED_CNC_SCHEMA.PATTERN_OMIT_MEMBERSHIP' ] * TYPEOF(
              sar)) = 1) AND (sar.description = 'modified pattern')) AND (
              sar :<>: msar))) >= 1))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

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_generic_expression
  ABSTRACT SUPERTYPE
  SUBTYPE OF (generic_expression);
    operands : LIST [2:?] OF generic_expression;
END_ENTITY; -- 13584-20: iso13584_generic_expressions_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, time_unit, 
      plane_angle_unit, solid_angle_unit, ratio_unit));
    dimensions : dimensional_exponents;
END_ENTITY; -- 10303-41: measure_schema

ENTITY ngon_closed_profile
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN TYPEOF(
              SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ('INTEGRATED_CNC_SCHEMA.PLACEMENT'
               IN TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0)))
               = 0;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ((
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN TYPEOF
              (it)) AND ('INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'corner radius'))) <= 1))) = 0))) = 
              0;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY ngon_shape_representation
  SUBTYPE OF (shape_representation_with_parameters);
  WHERE
    WR1: SIZEOF(SELF.items) = 5;
    WR2: SIZEOF(QUERY (it <* SELF.items| ('INTEGRATED_CNC_SCHEMA.PLACEMENT'
               IN TYPEOF(it)) AND (it.name = 'orientation'))) = 1;
    WR3: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'length'))) = 1;
    WR4: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'corner radius'))) = 1;
    WR5: SIZEOF(QUERY (it <* SELF.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name IN [ 'circumscribed diameter', 
              'diameter across flats' ]))) = 1;
    WR6: SIZEOF(QUERY (it <* SELF.items| ((
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN TYPEOF
              (it)) AND ('INTEGRATED_CNC_SCHEMA.COUNT_MEASURE' IN TYPEOF(it
              \measure_with_unit.value_component))) AND (it.name = 
              'number of sides'))) = 1;
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY not_expression
  SUBTYPE OF (unary_Boolean_expression);
    SELF\unary_generic_expression.operand: boolean_expression;
END_ENTITY; -- 13584-20: iso13584_expressions_schema

ENTITY numeric_expression
  ABSTRACT SUPERTYPE OF (ONEOF(simple_numeric_expression))
  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: ('INTEGRATED_CNC_SCHEMA.INT_NUMERIC_VARIABLE' IN TYPEOF(SELF)) OR 
              ('INTEGRATED_CNC_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 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 open_path_profile
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN TYPEOF(
              SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ('INTEGRATED_CNC_SCHEMA.PLACEMENT'
               IN TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0)))
               = 0;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PATH_SHAPE_REPRESENTATION' IN TYPEOF(
              pdr.used_representation)))) = 1))) = 0;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN TYPEOF
              (pdr.used_representation)) AND (pdr.used_representation.name 
              = 'profile limit'))) <= 1))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

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 organization;
    id          : OPTIONAL identifier;
    name        : label;
    description : OPTIONAL text;
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 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 ('INTEGRATED_CNC_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 ('INTEGRATED_CNC_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 ('INTEGRATED_CNC_SCHEMA.ORIENTED_FACE' IN TYPEOF(SELF.
              face_element));
END_ENTITY; -- 10303-42: 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 ('INTEGRATED_CNC_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 ('INTEGRATED_CNC_SCHEMA.ORIENTED_PATH' IN TYPEOF(SELF.
              path_element));
END_ENTITY; -- 10303-42: topology_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' +
               'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'length'))) = 1))) = 0))) = 0);
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'v-shape boundary occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| ('INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'reduced size occurrence') AND (SIZEOF(QUERY (
              sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'taper usage') 
              AND ('INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' 
              IN TYPEOF(sar)))| (('INTEGRATED_CNC_SCHEMA.TAPER' IN TYPEOF(
              sdr.relating_shape_aspect)) AND (
              'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'feature length'))) <= 1))) = 0))) =
               0);
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY outside_profile
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'boundary occurrence'))) = 1))) = 0) OR (SIZEOF
              (QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (SIZEOF(QUERY
               (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.' + 'SHAPE_DEFINING_RELATIONSHIP'
               IN TYPEOF(sar)))| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.CIRCULAR_CLOSED_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.NGON_CLOSED_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.RECTANGULAR_CLOSED_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.CLOSED_PATH_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.SQUARE_U_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.PARTIAL_CIRCULAR_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.ROUNDED_U_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.LINEAR_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.VEE_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.TEE_PROFILE', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| NOT (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 
              'profile floor usage') AND (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)))| ('INTEGRATED_CNC_SCHEMA.PROFILE_FLOOR' IN 
              TYPEOF(sdr.relating_shape_aspect)) AND (
              'INTEGRATED_CNC_SCHEMA.OUTSIDE_PROFILE' IN TYPEOF(sdr.
              related_shape_aspect.of_shape.definition)))) = 1))) = 0))) = 
              0);
    WR5: NOT (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (SIZEOF(QUERY
               (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 
              'path feature component usage') AND ('INTEGRATED_CNC_SCHEMA.'
               + 'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF(sar)))| ((SIZEOF([
               'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'complex boundary occurrence'))) = 1))) = 0) OR
               (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (SIZEOF(QUERY
               (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.CIRCULAR_CLOSED_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.NGON_CLOSED_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.RECTANGULAR_CLOSED_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.CLOSED_PATH_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.SQUARE_U_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.PARTIAL_CIRCULAR_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.ROUNDED_U_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.VEE_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.TEE_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.LINEAR_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.OPEN_PATH_PROFILE' ] * TYPEOF(sdr.
              relating_shape_aspect)) = 1))) = 1))) = 1))) = 0);
    WR7: NOT (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'partial circular boundary occurrence'))) = 1))
              ) = 0) OR (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (SIZEOF(QUERY
               (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| (
              'INTEGRATED_CNC_SCHEMA.PARTIAL_CIRCULAR_PROFILE' IN TYPEOF(
              sdr.relating_shape_aspect)))) = 1))) = 1))) = 0);
    WR8: NOT (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'closed circular boundary occurrence'))) = 1)))
               = 0) OR (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (SIZEOF(QUERY
               (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| (
              'INTEGRATED_CNC_SCHEMA.CIRCULAR_CLOSED_PROFILE' IN TYPEOF(sdr
              .relating_shape_aspect)))) = 1))) = 1))) = 0);
    WR9: NOT (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'open rectangular boundary occurrence'))) = 1))
              ) = 0) OR (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (SIZEOF(QUERY
               (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| ('INTEGRATED_CNC_SCHEMA.SQUARE_U_PROFILE' IN 
              TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0);
    WR10: NOT (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'closed rectangular boundary occurrence'))) = 1
              ))) = 0) OR (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (SIZEOF(QUERY
               (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| (
              'INTEGRATED_CNC_SCHEMA.RECTANGULAR_CLOSED_PROFILE' IN TYPEOF(
              sdr.relating_shape_aspect)))) = 1))) = 1))) = 0);
    WR11: (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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
              )| ('INTEGRATED_CNC_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN 
              TYPEOF(pdr.used_representation)) AND (pdr.used_representation
              .name = 'maximum feature limit'))) >= 0;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY parabola
  SUBTYPE OF (conic);
    focal_dist : length_measure;
  WHERE
    WR1: focal_dist <> 0.0;
END_ENTITY; -- 10303-42: geometry_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);
  WHERE
    WR1: SIZEOF(SELF\geometric_tolerance_with_datum_reference.datum_system)
               < 3;
END_ENTITY; -- 10303-519: aic_geometric_tolerances

ENTITY parametric_representation_context
  SUBTYPE OF (representation_context);
END_ENTITY; -- 10303-43: representation_schema

ENTITY partial_circular_profile
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN TYPEOF(
              SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ('INTEGRATED_CNC_SCHEMA.PLACEMENT'
               IN TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0)))
               = 0;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'radius'))) = 1))) = 0))) = 0;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT' ] * 
              TYPEOF(it)) = 2) AND (it.name = 'sweep angle'))) = 1))) = 0))
              ) = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN TYPEOF
              (pdr.used_representation)) AND (pdr.used_representation.name 
              = 'profile limit'))) <= 1))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY path
  SUPERTYPE OF (ONEOF(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: 'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))) = 1))) = 0);
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ('INTEGRATED_CNC_SCHEMA.PLACEMENT'
               IN TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0)))
               = 0;
    WR5: NOT (SELF.description = 'partial circular') OR (SIZEOF(QUERY (pd 
              <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.DIRECTION_SHAPE_REPRESENTATION' IN 
              TYPEOF(pdr.used_representation)))) = 1))) = 0);
    WR13: NOT (SELF.description = 'complex') OR (SIZEOF(QUERY (pd <* USEDIN
              (SELF, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| ((
              'INTEGRATED_CNC_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-522: aic_machining_feature

ENTITY path_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(SELF.items) >= 1;
    WR2: SIZEOF(QUERY (i <* SELF.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.BOUNDED_CURVE', 
              'INTEGRATED_CNC_SCHEMA.EDGE_CURVE', 
              'INTEGRATED_CNC_SCHEMA.PATH' ] * TYPEOF(i)) = 1))) >= 1;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY pattern_offset_membership
  SUBTYPE OF (feature_component_relationship);
  WHERE
    WR1: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF.
              relating_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATING_SHAPE_ASPECT')| (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)) AND (sar :<>: SELF))| (SIZEOF(QUERY (pdr <* 
              QUERY (pd <* USEDIN(fcr.related_shape_aspect.of_shape, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| (SIZEOF([ 'INTEGRATED_CNC_SCHEMA.CIRCULAR_PATTERN', 
              'INTEGRATED_CNC_SCHEMA.RECTANGULAR_PATTERN' ] * TYPEOF(pdr.
              definition)) = 1))) = 0))) = 0;
    WR2: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF.
              related_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)) AND (sar :<>: SELF))| (fcr.description = 
              'modified pattern') AND (
              'INTEGRATED_CNC_SCHEMA.MODIFIED_PATTERN' IN TYPEOF(fcr.
              relating_shape_aspect)))) >= 1;
    WR3: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF.
              related_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)) AND (sar :<>: SELF))| (
              'INTEGRATED_CNC_SCHEMA.MODIFIED_PATTERN' IN TYPEOF(fcr.
              relating_shape_aspect)) AND NOT (SIZEOF(QUERY (modfcr <* 
              QUERY (modsar <* USEDIN(fcr.relating_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT')| (SIZEOF([
               'INTEGRATED_CNC_SCHEMA.CIRCULAR_PATTERN', 
              'INTEGRATED_CNC_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 ('INTEGRATED_CNC_SCHEMA.RECTANGULAR_PATTERN' IN TYPEOF(SELF.
              relating_shape_aspect.of_shape.definition)) OR (SIZEOF(QUERY 
              (pd <* USEDIN(SELF.related_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')) = 2))) = 0)
              ;
    WR5: NOT ('INTEGRATED_CNC_SCHEMA.CIRCULAR_PATTERN' IN TYPEOF(SELF.
              relating_shape_aspect.of_shape.definition)) OR (SIZEOF(QUERY 
              (pd <* USEDIN(SELF.related_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')) = 1))) = 0)
              ;
    WR6: NOT ('INTEGRATED_CNC_SCHEMA.CIRCULAR_PATTERN' IN TYPEOF(SELF.
              relating_shape_aspect.of_shape.definition)) OR (SIZEOF(QUERY 
              (pd <* USEDIN(SELF.related_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| NOT (SIZEOF
              (pdr.used_representation.items) = 2))) = 0))) = 0);
    WR7: NOT ('INTEGRATED_CNC_SCHEMA.CIRCULAR_PATTERN' IN TYPEOF(SELF.
              relating_shape_aspect.of_shape.definition)) OR (SIZEOF(QUERY 
              (pd <* USEDIN(SELF.related_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ((
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN TYPEOF
              (it)) AND ('INTEGRATED_CNC_SCHEMA.COUNT_MEASURE' IN TYPEOF(it
              \measure_with_unit.value_component))) AND (it.name = 
              'index number'))) = 1))) = 0))) = 0);
    WR8: NOT ('INTEGRATED_CNC_SCHEMA.CIRCULAR_PATTERN' IN TYPEOF(SELF.
              relating_shape_aspect.of_shape.definition)) OR (SIZEOF(QUERY 
              (pd <* USEDIN(SELF.related_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (
              'INTEGRATED_CNC_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT' IN 
              TYPEOF(it)) AND (it.name = 'offset'))) = 1))) = 0))) = 0);
    WR9: NOT ('INTEGRATED_CNC_SCHEMA.RECTANGULAR_PATTERN' IN TYPEOF(SELF.
              relating_shape_aspect.of_shape.definition)) OR (SIZEOF(QUERY 
              (pd <* USEDIN(SELF.related_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(impl_rep.
              used_representation.items) = 3))) = 0))) = 0);
    WR10: NOT ('INTEGRATED_CNC_SCHEMA.RECTANGULAR_PATTERN' IN TYPEOF(SELF.
              relating_shape_aspect.of_shape.definition)) OR (SIZEOF(QUERY 
              (pd <* USEDIN(SELF.related_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ((
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN TYPEOF
              (it)) AND ('INTEGRATED_CNC_SCHEMA.COUNT_MEASURE' IN TYPEOF(it
              \measure_with_unit.value_component))) AND (it.name = 
              'row index'))) = 1))) = 0))) = 0);
    WR11: NOT ('INTEGRATED_CNC_SCHEMA.RECTANGULAR_PATTERN' IN TYPEOF(SELF.
              relating_shape_aspect.of_shape.definition)) OR (SIZEOF(QUERY 
              (pd <* USEDIN(SELF.related_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ((
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN TYPEOF
              (it)) AND ('INTEGRATED_CNC_SCHEMA.COUNT_MEASURE' IN TYPEOF(it
              \measure_with_unit.value_component))) AND (it.name = 
              'column index'))) = 1))) = 0))) = 0);
    WR12: NOT ('INTEGRATED_CNC_SCHEMA.RECTANGULAR_PATTERN' IN TYPEOF(SELF.
              relating_shape_aspect.of_shape.definition)) OR (SIZEOF(QUERY 
              (pd <* USEDIN(SELF.related_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' IN TYPEOF(it
              )) AND (it.name = 'offset distance'))) = 1))) = 0))) = 0);
    WR13: NOT ('INTEGRATED_CNC_SCHEMA.RECTANGULAR_PATTERN' IN TYPEOF(SELF.
              relating_shape_aspect.of_shape.definition)) OR (SIZEOF(QUERY 
              (pd <* USEDIN(SELF.related_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.DIRECTION_SHAPE_REPRESENTATION' IN 
              TYPEOF(pdr.used_representation)) AND (pdr.used_representation
              .name = 'offset direction'))) = 1))) = 0);
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY pattern_omit_membership
  SUBTYPE OF (feature_component_relationship);
  WHERE
    WR1: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF.
              relating_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATING_SHAPE_ASPECT')| (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)) AND (sar :<>: SELF))| (SIZEOF(QUERY (pdr <* 
              QUERY (pd <* USEDIN(fcr.related_shape_aspect.of_shape, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| (SIZEOF([ 'INTEGRATED_CNC_SCHEMA.CIRCULAR_PATTERN', 
              'INTEGRATED_CNC_SCHEMA.RECTANGULAR_PATTERN' ] * TYPEOF(pdr.
              definition)) = 1))) = 0))) = 0;
    WR2: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF.
              related_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)) AND (sar :<>: SELF))| (fcr.description = 
              'modified pattern') AND (
              'INTEGRATED_CNC_SCHEMA.MODIFIED_PATTERN' IN TYPEOF(fcr.
              relating_shape_aspect)))) >= 1;
    WR3: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF.
              related_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)) AND (sar :<>: SELF))| (
              'INTEGRATED_CNC_SCHEMA.MODIFIED_PATTERN' IN TYPEOF(fcr.
              relating_shape_aspect)) AND NOT (SIZEOF(QUERY (modfcr <* 
              QUERY (modsar <* USEDIN(fcr.relating_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT')| (SIZEOF([
               'INTEGRATED_CNC_SCHEMA.CIRCULAR_PATTERN', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')) = 1))) = 0;
    WR5: NOT ('INTEGRATED_CNC_SCHEMA.CIRCULAR_PATTERN' IN TYPEOF(SELF.
              relating_shape_aspect.of_shape.definition)) OR (SIZEOF(QUERY 
              (pd <* USEDIN(SELF.related_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| NOT (SIZEOF
              (pdr.used_representation.items) = 1))) = 0))) = 0);
    WR6: NOT ('INTEGRATED_CNC_SCHEMA.CIRCULAR_PATTERN' IN TYPEOF(SELF.
              relating_shape_aspect.of_shape.definition)) OR (SIZEOF(QUERY 
              (pd <* USEDIN(SELF.related_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ((
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN TYPEOF
              (it)) AND ('INTEGRATED_CNC_SCHEMA.COUNT_MEASURE' IN TYPEOF(it
              \measure_with_unit.value_component))) AND (it.name = 
              'index number'))) = 1))) = 0))) = 0);
    WR7: NOT ('INTEGRATED_CNC_SCHEMA.RECTANGULAR_PATTERN' IN TYPEOF(SELF.
              relating_shape_aspect.of_shape.definition)) OR (SIZEOF(QUERY 
              (pd <* USEDIN(SELF.related_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| NOT (SIZEOF
              (pdr.used_representation.items) = 2))) = 0))) = 0);
    WR8: NOT ('INTEGRATED_CNC_SCHEMA.RECTANGULAR_PATTERN' IN TYPEOF(SELF.
              relating_shape_aspect.of_shape.definition)) OR (SIZEOF(QUERY 
              (pd <* USEDIN(SELF.related_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ((
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN TYPEOF
              (it)) AND ('INTEGRATED_CNC_SCHEMA.COUNT_MEASURE' IN TYPEOF(it
              \measure_with_unit.value_component))) AND (it.name = 
              'row index'))) = 1))) = 0))) = 0);
    WR9: NOT ('INTEGRATED_CNC_SCHEMA.RECTANGULAR_PATTERN' IN TYPEOF(SELF.
              relating_shape_aspect.of_shape.definition)) OR (SIZEOF(QUERY 
              (pd <* USEDIN(SELF.related_shape_aspect, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ((
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN TYPEOF
              (it)) AND ('INTEGRATED_CNC_SCHEMA.COUNT_MEASURE' IN TYPEOF(it
              \measure_with_unit.value_component))) AND (it.name = 
              'column index'))) = 1))) = 0))) = 0);
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY pcurve
  SUBTYPE OF (curve);
    basis_surface      : surface;
    reference_to_curve : definitional_representation;
  WHERE
    WR1: SIZEOF(reference_to_curve\representation.items) = 1;
    WR2: 'INTEGRATED_CNC_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);
  WHERE
    WR1: SIZEOF(SELF\geometric_tolerance_with_datum_reference.datum_system)
               <= 3;
END_ENTITY; -- 10303-519: aic_geometric_tolerances

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, 'INTEGRATED_CNC_SCHEMA.' + 
              'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1;
    WR2: SIZEOF(USEDIN(SELF, 'INTEGRATED_CNC_SCHEMA.' + 
              'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
END_ENTITY; -- 10303-41: person_organization_schema

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, 'INTEGRATED_CNC_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 placed_datum_target_feature
  SUBTYPE OF (datum_target);
  WHERE
    WR1: SELF.description IN [ 'point', 'line', 'rectangle', 'circle' ];
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (dtm_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* dtm_rep.
              used_representation.items| ('INTEGRATED_CNC_SCHEMA.PLACEMENT'
               IN TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0)))
               = 0;
    WR4: NOT (SELF.description = 'point') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (dtm_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(dtm_rep.
              used_representation.items) = 1))) = 0))) = 0);
    WR5: NOT (SELF.description IN [ 'line', 'circle' ]) OR (SIZEOF(QUERY (
              pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (dtm_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(dtm_rep.
              used_representation.items) = 2))) = 0))) = 0);
    WR6: NOT (SELF.description = 'rectangle') OR (SIZEOF(QUERY (pd <* 
              USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (dtm_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(dtm_rep.
              used_representation.items) = 3))) = 0))) = 0);
    WR7: NOT (SELF.description = 'circle') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (dtm_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* dtm_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'target diameter'))) = 1))) = 0))) =
               0);
    WR8: NOT (SELF.description = 'line') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (dtm_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* dtm_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'target length'))) = 1))) = 0))) = 0
              );
    WR9: NOT (SELF.description = 'rectangle') OR (SIZEOF(QUERY (pd <* 
              USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (dtm_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* dtm_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'target length'))) = 1))) = 0))) = 0
              );
    WR10: NOT (SELF.description = 'rectangle') OR (SIZEOF(QUERY (pd <* 
              USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (dtm_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* dtm_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'target width'))) = 1))) = 0))) = 0)
              ;
END_ENTITY; -- 10303-238: integrated_cnc_schema

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_shape_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(SELF.items) = 1;
    WR2: SIZEOF(QUERY (it <* SELF.items| ('INTEGRATED_CNC_SCHEMA.PLANE' IN 
              TYPEOF(it)))) = 1;
END_ENTITY; -- 10303-522: aic_machining_feature

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: 'INTEGRATED_CNC_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: integrated_cnc_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 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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'pocket depth occurrence') AND (SIZEOF(QUERY (
              sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| ((sar.description = 
              'path feature component usage') AND (sar.name = 
              'pocket depth')) AND (
              'INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF
              (sar)))| ('INTEGRATED_CNC_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)
              | (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))) = 1;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'boundary occurrence') AND (SIZEOF(QUERY (sdr 
              <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.CIRCULAR_CLOSED_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.NGON_CLOSED_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.RECTANGULAR_CLOSED_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.CLOSED_PATH_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.SQUARE_U_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.PARTIAL_CIRCULAR_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.ROUNDED_U_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.VEE_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.TEE_PROFILE', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'closed boundary occurrence') AND (SIZEOF(QUERY
               (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'open boundary occurrence') AND (SIZEOF(QUERY (
              sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| ('INTEGRATED_CNC_SCHEMA.SQUARE_U_PROFILE' IN 
              TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0);
    WR10: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'bottom condition occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 
              'pocket bottom usage') AND (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)))| ('INTEGRATED_CNC_SCHEMA.POCKET_BOTTOM' IN 
              TYPEOF(sdr.relating_shape_aspect)) AND (
              'INTEGRATED_CNC_SCHEMA.POCKET' IN TYPEOF(sdr.
              related_shape_aspect.of_shape.definition)))) = 1))) = 1))) = 
              0;
    WR11: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'change in boundary occurrence') AND (SIZEOF(
              QUERY (fcr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATING_SHAPE_ASPECT')| (sar.description = 'taper usage') 
              AND ('INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' 
              IN TYPEOF(sar)))| (('INTEGRATED_CNC_SCHEMA.TAPER' IN TYPEOF(
              fcr.relating_shape_aspect)) AND (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'enclosed boundary occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'bottom condition occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 
              'pocket bottom usage') AND (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)))| (('INTEGRATED_CNC_SCHEMA.POCKET_BOTTOM' IN 
              TYPEOF(sdr.relating_shape_aspect)) AND (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'bottom condition occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 
              'pocket bottom usage') AND (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)))| (('INTEGRATED_CNC_SCHEMA.POCKET_BOTTOM' IN 
              TYPEOF(sdr.relating_shape_aspect)) AND (
              'INTEGRATED_CNC_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
              )| ('INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(
              pds)) AND (SIZEOF(QUERY (csa <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| ((
              'INTEGRATED_CNC_SCHEMA.COMPOSITE_SHAPE_ASPECT' IN TYPEOF(csa)
              ) AND (csa.name = 'uncut area')) AND (SIZEOF(QUERY (sar <* 
              csa.component_relationships| (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)) AND (SIZEOF([ 'INTEGRATED_CNC_SCHEMA.BOSS', 
              'INTEGRATED_CNC_SCHEMA.PROTRUSION' ] * TYPEOF(sar.
              related_shape_aspect)) = 1))) = 1))) <= 1))) = 1);
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY pocket_bottom
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'radius'))) <= 1))) = 0))) = 0);
    WR10: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATING_SHAPE_ASPECT')| (sar.description = 
              'pocket bottom usage') AND (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)))| ((fcr.related_shape_aspect.description = 
              'bottom condition occurrence') AND (
              'INTEGRATED_CNC_SCHEMA.POCKET' IN TYPEOF(fcr.
              related_shape_aspect.of_shape.definition))) AND (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATING_SHAPE_ASPECT')| (sar.description = 
              'pocket bottom usage') AND (
              'INTEGRATED_CNC_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-522: aic_machining_feature

ENTITY point
  SUPERTYPE OF (ONEOF(cartesian_point, point_on_curve, point_on_surface, 
      degenerate_pcurve))
  SUBTYPE OF (geometric_representation_item);
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_surface
  SUBTYPE OF (point);
    basis_surface     : surface;
    point_parameter_u : parameter_value;
    point_parameter_v : parameter_value;
END_ENTITY; -- 10303-42: geometry_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);
  WHERE
    WR1: NOT ('INTEGRATED_CNC_SCHEMA.' + 
              'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE' IN TYPEOF(SELF)) 
              OR (SIZEOF(SELF\geometric_tolerance_with_datum_reference.
              datum_system) <= 3);
END_ENTITY; -- 10303-519: aic_geometric_tolerances

ENTITY precision_qualifier;
    precision_value : INTEGER;
END_ENTITY; -- 10303-45: qualified_measure_schema

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_category;
    name        : label;
    description : OPTIONAL text;
  DERIVE
    id : identifier := get_id_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 'INTEGRATED_CNC_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_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, 'INTEGRATED_CNC_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_formation;
    id          : identifier;
    description : OPTIONAL text;
    of_product  : product;
  UNIQUE
    UR1: id, of_product;
END_ENTITY; -- 10303-41: product_definition_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_relationship;
    id                          : identifier;
    name                        : label;
    description                 : OPTIONAL text;
    relating_product_definition : product_definition;
    related_product_definition  : product_definition;
END_ENTITY; -- 10303-41: product_definition_schema

ENTITY product_definition_shape
  SUBTYPE OF (property_definition);
  UNIQUE
    UR1: SELF\property_definition.definition;
  WHERE
    WR1: SIZEOF([ 'INTEGRATED_CNC_SCHEMA.CHARACTERIZED_PRODUCT_DEFINITION',
               'INTEGRATED_CNC_SCHEMA.CHARACTERIZED_OBJECT' ] * TYPEOF(SELF
              \property_definition.definition)) > 0;
END_ENTITY; -- 10303-41: product_property_definition_schema

ENTITY product_definition_usage
  SUPERTYPE OF (make_from_usage_option)
  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 ],
               'INTEGRATED_CNC_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_related_product_category
  SUBTYPE OF (product_category);
    products : SET [1:?] OF product;
END_ENTITY; -- 10303-41: product_definition_schema

ENTITY profile_floor
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'radius'))) = 1))) = 0))) = 0);
    WR7: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATING_SHAPE_ASPECT')| (sar.description = 
              'profile floor usage') AND (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)))| ('INTEGRATED_CNC_SCHEMA.OUTSIDE_PROFILE' IN 
              TYPEOF(fcr.related_shape_aspect.of_shape.definition)) AND (
              'INTEGRATED_CNC_SCHEMA.PROFILE_FLOOR' IN TYPEOF(fcr.
              relating_shape_aspect)))) >= 1;
    WR8: NOT (SELF.description IN [ 'planar', 'complex' ]) OR (SIZEOF(QUERY
               (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ((
              'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN TYPEOF
              (pdr.used_representation)) AND (pdr.used_representation.name 
              = 'floor'))) = 1))) = 1);
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY projected_zone_definition
  SUBTYPE OF (tolerance_zone_definition);
    projection_end   : shape_aspect;
    projected_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 property_definition;
    name        : label;
    description : OPTIONAL text;
    definition  : characterized_definition;
  DERIVE
    id : identifier := get_id_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 'INTEGRATED_CNC_SCHEMA.' + 
              'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
END_ENTITY; -- 10303-41: product_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, 'INTEGRATED_CNC_SCHEMA.' + 
              'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
    WR2: SIZEOF(USEDIN(SELF, 'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'shape volume occurrence') AND (SIZEOF(QUERY (
              sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 
              'volume shape usage') AND (
              'INTEGRATED_CNC_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)
              | ('INTEGRATED_CNC_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN 
              TYPEOF(pdr.used_representation)) AND (pdr.used_representation
              .name = 'maximum feature limit'))) >= 0;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY qualified_representation_item
  SUBTYPE OF (representation_item);
    qualifiers : SET [1:?] OF value_qualifier;
  WHERE
    WR1: SIZEOF(QUERY (temp <* qualifiers| (
              'INTEGRATED_CNC_SCHEMA.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 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 ratio_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'INTEGRATED_CNC_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 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 rectangular_closed_profile
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN TYPEOF(
              SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION.DEFINITION')| (SIZEOF(QUERY (pdr <* 
              USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ('INTEGRATED_CNC_SCHEMA.PLACEMENT'
               IN TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0)))
               = 0;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'width'))) = 1))) = 0))) = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'length'))) = 1))) = 0))) = 0;
    WR8: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'corner radius'))) <= 1))) = 0))) = 
              0;
END_ENTITY; -- 10303-522: aic_machining_feature

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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (SIZEOF(QUERY
               (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATING_SHAPE_ASPECT')| (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)))| ('INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT' IN 
              TYPEOF(sdr.related_shape_aspect)))) = 1))) <= 5))) = 0;
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.' + 'DEFINITION')|
               NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))) = 1))) = 0;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ((
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN TYPEOF
              (it)) AND ('INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ((
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN TYPEOF
              (it)) AND ('INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'row spacing'))) = 1))) = 0))) = 0;
    WR9: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'column spacing'))) = 1))) = 0))) = 
              0;
    WR10: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ('INTEGRATED_CNC_SCHEMA.PLACEMENT'
               IN TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0)))
               = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

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: (('INTEGRATED_CNC_SCHEMA.ELEMENTARY_SURFACE' IN TYPEOF(
              basis_surface)) AND NOT ('INTEGRATED_CNC_SCHEMA.PLANE' IN 
              TYPEOF(basis_surface)) OR (
              'INTEGRATED_CNC_SCHEMA.SURFACE_OF_REVOLUTION' IN TYPEOF(
              basis_surface))) OR (usense = (u2 > u1));
    WR4: (('INTEGRATED_CNC_SCHEMA.SPHERICAL_SURFACE' IN TYPEOF(
              basis_surface)) OR ('INTEGRATED_CNC_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 removal_volume
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'shape volume occurrence') AND (SIZEOF(QUERY (
              sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 
              'volume shape usage') AND ('INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF(sar)))| (sdr.
              relating_shape_aspect.description = 'volume shape'))) = 1))) 
              = 1))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))) = 1))) = 0;
    WR2: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATING_SHAPE_ASPECT')| (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)))| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.REPLICATE_FEATURE', 
              'INTEGRATED_CNC_SCHEMA.INSTANCED_FEATURE' ] * TYPEOF(fcr.
              related_shape_aspect)) >= 1) AND (fcr.name = 'pattern basis')
              )) = 1;
    WR3: SIZEOF(QUERY (sar <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATING_SHAPE_ASPECT')| NOT (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)))) + SIZEOF(QUERY (sar <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| NOT (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY 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, 'INTEGRATED_CNC_SCHEMA.' + 
              'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
    WR2: SIZEOF(USEDIN(SELF, 'INTEGRATED_CNC_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_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(SELF.mapping_origin, SELF.mapped_representation.
              context_of_items);
END_ENTITY; -- 10303-43: representation_schema

ENTITY representation_relationship;
    name        : label;
    description : OPTIONAL text;
    rep_1       : representation;
    rep_2       : representation;
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;
END_ENTITY; -- 10303-43: representation_schema

ENTITY requirement_for_action_resource
  SUBTYPE OF (action_resource_requirement);
    resources : SET [1:?] OF action_resource;
END_ENTITY; -- 10303-49: process_property_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 revolved_profile
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SELF\characterized_object.description IN [ 'groove', 'flat', 
              'round', 'open profile' ];
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'radius'))) = 1))) = 0))) = 0;
    WR4: SIZEOF(QUERY (pdr <* get_property_definition_representations(SELF)
              | ('INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'outer edge shape occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| ('INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'flat edge shape occurrence') AND (SIZEOF(QUERY
               (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| ('INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'rounded edge shape occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'sweep occurrence') AND (SIZEOF(QUERY (sdr <* 
              QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.SQUARE_U_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.PARTIAL_CIRCULAR_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.ROUNDED_U_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.VEE_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.TEE_PROFILE', 
              'INTEGRATED_CNC_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)
              | ('INTEGRATED_CNC_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN 
              TYPEOF(pdr.used_representation)) AND (pdr.used_representation
              .name = 'maximum feature limit'))) >= 0;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY rib_top
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'rib top condition occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'rib top usage') 
              AND ('INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' 
              IN TYPEOF(sar)))| ('INTEGRATED_CNC_SCHEMA.RIB_TOP_FLOOR' IN 
              TYPEOF(sdr.relating_shape_aspect)) AND (
              'INTEGRATED_CNC_SCHEMA.RIB_TOP' IN TYPEOF(sdr.
              related_shape_aspect.of_shape.definition)))) = 1))) = 1))) = 
              0;
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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)
              | ('INTEGRATED_CNC_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN 
              TYPEOF(pdr.used_representation)) AND (pdr.used_representation
              .name = 'maximum feature limit'))) >= 0;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY rib_top_floor
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN TYPEOF(
              SELF.of_shape.definition);
    WR2: SELF.description IN [ 'planar', 'complex' ];
    WR3: SIZEOF(QUERY (fcr <* QUERY (sar <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATING_SHAPE_ASPECT')| (sar.description = 'rib top usage')
               AND ('INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' 
              IN TYPEOF(sar)))| ((fcr.related_shape_aspect.description = 
              'rib top condition occurrence') AND (
              'INTEGRATED_CNC_SCHEMA.RIB_TOP' IN TYPEOF(fcr.
              related_shape_aspect.of_shape.definition))) AND (
              'INTEGRATED_CNC_SCHEMA.RIB_TOP_FLOOR' IN TYPEOF(fcr.
              relating_shape_aspect)))) >= 1;
    WR4: NOT (SELF.description = 'complex') OR (SIZEOF(QUERY (pd <* USEDIN(
              SELF, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'boundary occurrence') AND (SIZEOF(QUERY (sdr 
              <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.CIRCULAR_CLOSED_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.NGON_CLOSED_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.RECTANGULAR_CLOSED_PROFILE', 
              'INTEGRATED_CNC_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-522: aic_machining_feature

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 role_association;
    role           : object_role;
    item_with_role : role_select;
END_ENTITY; -- 10303-41: basic_attribute_schema

ENTITY round_hole
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'diameter occurrence') AND (SIZEOF(QUERY (sdr 
              <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| (
              'INTEGRATED_CNC_SCHEMA.CIRCULAR_CLOSED_PROFILE' IN TYPEOF(sdr
              .relating_shape_aspect)) AND (sdr.name = 'diameter'))) = 1)))
               = 1))) = 0;
    WR2: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'hole depth occurrence') AND (SIZEOF(QUERY (sdr
               <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 
              'path feature component usage') AND (
              'INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF
              (sar)))| (('INTEGRATED_CNC_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(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'bottom condition occurrence') AND (SIZEOF(
              QUERY (fcr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 
              'hole bottom usage') AND (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)))| ('INTEGRATED_CNC_SCHEMA.HOLE_BOTTOM' IN TYPEOF
              (fcr.relating_shape_aspect)) AND (
              'INTEGRATED_CNC_SCHEMA.ROUND_HOLE' IN TYPEOF(fcr.
              related_shape_aspect.of_shape.definition)))) = 1))) = 1))) = 
              0;
    WR4: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'change in diameter occurrence') AND (SIZEOF(
              QUERY (fcr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'taper usage') 
              AND ('INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' 
              IN TYPEOF(sar)))| ('INTEGRATED_CNC_SCHEMA.TAPER' IN TYPEOF(
              fcr.relating_shape_aspect)) AND (
              'INTEGRATED_CNC_SCHEMA.ROUND_HOLE' IN TYPEOF(fcr.
              related_shape_aspect.of_shape.definition)))) = 1))) <= 1))) =
               0;
    WR5: SIZEOF(QUERY (pdr <* get_property_definition_representations(SELF)
              | (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))) = 1;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY rounded_end
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'partial circular boundary occurrence') AND (
              SIZEOF(QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| (
              'INTEGRATED_CNC_SCHEMA.PARTIAL_CIRCULAR_PROFILE' IN TYPEOF(
              sdr.relating_shape_aspect)))) = 1))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'course of travel occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 
              'path feature component usage') AND (
              'INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF
              (sar)))| ('INTEGRATED_CNC_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)
              | ('INTEGRATED_CNC_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN 
              TYPEOF(pdr.used_representation)) AND (pdr.used_representation
              .name = 'maximum feature limit'))) >= 0;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY rounded_u_profile
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN TYPEOF(
              SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'width'))) = 1))) = 0))) = 0;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN TYPEOF
              (pdr.used_representation)) AND (pdr.used_representation.name 
              = 'profile limit'))) <= 1))) = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'depth'))) <= 1))) = 0))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY roundness_tolerance
  SUBTYPE OF (geometric_tolerance);
  WHERE
    WR1: NOT ('INTEGRATED_CNC_SCHEMA.' + 
              'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE' IN TYPEOF(SELF));
END_ENTITY; -- 10303-519: aic_geometric_tolerances

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 : 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 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: 'INTEGRATED_CNC_SCHEMA.PCURVE' IN TYPEOF(SELF\surface_curve.
              associated_geometry[1]);
    WR4: 'INTEGRATED_CNC_SCHEMA.PCURVE' IN TYPEOF(SELF\surface_curve.
              associated_geometry[2]);
END_ENTITY; -- 10303-42: geometry_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, 'INTEGRATED_CNC_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 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 shape_aspect;
    name                 : label;
    description          : OPTIONAL text;
    of_shape             : product_definition_shape;
    product_definitional : LOGICAL;
  DERIVE
    id : identifier := get_id_value(SELF);
  WHERE
    WR1: SIZEOF(USEDIN(SELF, 'INTEGRATED_CNC_SCHEMA.' + 
              'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
END_ENTITY; -- 10303-41: product_property_definition_schema

ENTITY shape_aspect_deriving_relationship
  SUBTYPE OF (shape_aspect_relationship);
  WHERE
    WR1: 'INTEGRATED_CNC_SCHEMA.DERIVED_SHAPE_ASPECT' IN TYPEOF(SELF\
              shape_aspect_relationship.relating_shape_aspect);
END_ENTITY; -- 10303-47: shape_aspect_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, 'INTEGRATED_CNC_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-522: aic_machining_feature

ENTITY shape_definition_representation
  SUBTYPE OF (property_definition_representation);
  WHERE
    WR1: ('INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(SELF.
              definition)) OR ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINITION' IN 
              TYPEOF(SELF.definition.definition));
    WR2: 'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION' IN TYPEOF(SELF.
              used_representation);
END_ENTITY; -- 10303-41: product_property_representation_schema

ENTITY shape_dimension_representation
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(QUERY (temp <* SELF\representation.items| NOT (
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN TYPEOF
              (temp)))) = 0;
    WR2: SIZEOF(SELF\representation.items) <= 3;
    WR3: SIZEOF(QUERY (pos_mri <* QUERY (real_mri <* SELF\representation.
              items| ('REAL' IN TYPEOF(real_mri\measure_with_unit.
              value_component)))| NOT (pos_mri\measure_with_unit.
              value_component > 0.0))) = 0;
END_ENTITY; -- 10303-47: shape_dimension_schema

ENTITY shape_representation
  SUBTYPE OF (representation);
END_ENTITY; -- 10303-41: product_property_representation_schema

ENTITY shape_representation_relationship
  SUBTYPE OF (representation_relationship);
  WHERE
    WR1: 'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION' IN TYPEOF(SELF\
              representation_relationship.rep_1) + TYPEOF(SELF\
              representation_relationship.rep_2);
END_ENTITY; -- 10303-41: product_property_representation_schema

ENTITY shape_representation_with_parameters
  SUBTYPE OF (shape_representation);
  WHERE
    WR1: SIZEOF(QUERY (it <* SELF.items| NOT (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.PLACEMENT', 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' ] * 
              TYPEOF(it)) = 1))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

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 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);
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: integrated_cnc_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 slot
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'swept shape occurrence') AND (SIZEOF(QUERY (
              sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.SQUARE_U_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.PARTIAL_CIRCULAR_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.ROUNDED_U_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.VEE_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.TEE_PROFILE', 
              'INTEGRATED_CNC_SCHEMA.OPEN_PATH_PROFILE' ] * TYPEOF(sdr.
              relating_shape_aspect)) = 1))) = 1))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'course of travel occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 
              'path feature component usage') AND ((sar.name = 
              'course of travel') AND (
              'INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF
              (sar))))| ('INTEGRATED_CNC_SCHEMA.PATH_FEATURE_COMPONENT' IN 
              TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0;
    WR4: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'end condition occurrence') AND (SIZEOF(QUERY (
              fcr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_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 (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)))| (('INTEGRATED_CNC_SCHEMA.SLOT_END' IN TYPEOF(
              fcr.relating_shape_aspect)) AND (fcr.relating_shape_aspect.
              description IN [ 'open', 'radiused', 'flat', 'woodruff' ])) 
              AND ('INTEGRATED_CNC_SCHEMA.SLOT' IN TYPEOF(fcr.
              related_shape_aspect.of_shape.definition)))) = 1))) = 2))) = 
              0;
    WR5: NOT (SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'end condition occurrence') AND (SIZEOF(QUERY (
              fcr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_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 (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)))| (('INTEGRATED_CNC_SCHEMA.SLOT_END' IN TYPEOF(
              fcr.relating_shape_aspect)) AND (fcr.relating_shape_aspect.
              description IN [ 'loop' ])) AND ('INTEGRATED_CNC_SCHEMA.SLOT'
               IN TYPEOF(fcr.related_shape_aspect.of_shape.definition)))) =
               1))) = 1))) = 0) OR (SIZEOF(QUERY (pds <* QUERY (pd <* 
              USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'course of travel occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 
              'path feature component usage') AND ((sar.name = 
              'course of travel') AND (
              'INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF
              (sar))))| ('INTEGRATED_CNC_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)
              | ('INTEGRATED_CNC_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN 
              TYPEOF(pdr.used_representation)) AND (pdr.used_representation
              .name = 'maximum feature limit'))) >= 0;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY slot_end
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))) = 1))) = 0);
    WR5: NOT (SELF.description IN [ 'flat' ]) OR (SIZEOF(QUERY (pd <* 
              USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')
              | NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION'
              )| NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
              IN TYPEOF(pdr.used_representation)))| NOT (SIZEOF(QUERY (it 
              <* impl_rep.used_representation.items| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_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 (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)))| ((fcr.related_shape_aspect.description = 
              'end condition occurrence') AND ('INTEGRATED_CNC_SCHEMA.SLOT'
               IN TYPEOF(fcr.related_shape_aspect.of_shape.definition))) 
              AND ('INTEGRATED_CNC_SCHEMA.SLOT_END' IN TYPEOF(fcr.
              relating_shape_aspect)))) >= 1;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY solid_angle_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'INTEGRATED_CNC_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_model
  SUPERTYPE OF (manifold_solid_brep)
  SUBTYPE OF (geometric_representation_item);
END_ENTITY; -- 10303-42: geometric_model_schema

ENTITY spherical_cap
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'radius'))) = 1))) = 0))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT' ] * 
              TYPEOF(it)) = 2) AND (it.name = 'internal angle'))) = 1))) = 
              0))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

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

ENTITY square_u_profile
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN TYPEOF(
              SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ('INTEGRATED_CNC_SCHEMA.PLACEMENT'
               IN TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0)))
               = 0;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'width'))) = 1))) = 0))) = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'first radius'))) <= 1))) = 0))) = 0
              ;
    WR8: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'second radius'))) <= 1))) = 0))) = 
              0;
    WR9: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT' ] * 
              TYPEOF(it)) = 2) AND (it.name = 'first angle'))) = 1))) = 0))
              ) = 0;
    WR10: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT' ] * 
              TYPEOF(it)) = 2) AND (it.name = 'second angle'))) = 1))) = 0)
              )) = 0;
    WR11: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.' + 'DEFINITION')|
               NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN TYPEOF
              (pdr.used_representation)) AND (pdr.used_representation.name 
              = 'profile limit'))) <= 1))) = 0;
    WR12: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'depth'))) <= 1))) = 0))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'course of travel occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 
              'path feature component usage') AND (
              'INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF
              (sar)))| ('INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'removal boundary occurrence') AND (SIZEOF(
              QUERY (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'profile usage') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| ('INTEGRATED_CNC_SCHEMA.VEE_PROFILE' IN TYPEOF
              (sdr.relating_shape_aspect)))) = 1))) = 1))) = 0;
    WR4: SIZEOF(QUERY (pdr <* get_property_definition_representations(SELF)
              | ('INTEGRATED_CNC_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN 
              TYPEOF(pdr.used_representation)) AND (pdr.used_representation
              .name = 'maximum feature limit'))) >= 0;
    WR5: SIZEOF(QUERY (pds <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(
              pds)) AND (SIZEOF(QUERY (csa <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| ((
              'INTEGRATED_CNC_SCHEMA.COMPOSITE_SHAPE_ASPECT' IN TYPEOF(csa)
              ) AND (csa.name = 'uncut area')) AND (SIZEOF(QUERY (sar <* 
              csa.component_relationships| (
              'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_RELATIONSHIP' IN 
              TYPEOF(sar)) AND (SIZEOF([ 'INTEGRATED_CNC_SCHEMA.BOSS', 
              'INTEGRATED_CNC_SCHEMA.PROTRUSION' ] * TYPEOF(sar.
              related_shape_aspect)) = 1))) = 1))) <= 1))) = 1;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY straightness_tolerance
  SUBTYPE OF (geometric_tolerance);
  WHERE
    WR1: NOT ('INTEGRATED_CNC_SCHEMA.' + 
              'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE' IN TYPEOF(SELF));
END_ENTITY; -- 10303-519: aic_geometric_tolerances

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_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: ('INTEGRATED_CNC_SCHEMA.PCURVE' IN TYPEOF(associated_geometry[1]))
               OR (master_representation <> pcurve_s1);
    WR3: ('INTEGRATED_CNC_SCHEMA.PCURVE' IN TYPEOF(associated_geometry[2]))
               OR (master_representation <> pcurve_s2);
    WR4: NOT ('INTEGRATED_CNC_SCHEMA.PCURVE' IN TYPEOF(curve_3d));
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_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 ('INTEGRATED_CNC_SCHEMA.CURVE_BOUNDED_SURFACE' IN TYPEOF(
              parent_surface));
END_ENTITY; -- 10303-42: geometry_schema

ENTITY surface_profile_tolerance
  SUBTYPE OF (geometric_tolerance);
  WHERE
    WR1: NOT ('INTEGRATED_CNC_SCHEMA.' + 
              'GEOMETRIC_TOLERANCE_WITH_DATUM_REFERENCE' IN TYPEOF(SELF)) 
              OR (SIZEOF(SELF\geometric_tolerance_with_datum_reference.
              datum_system) <= 3);
END_ENTITY; -- 10303-519: aic_geometric_tolerances

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_texture_representation
  SUBTYPE OF (representation);
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY swept_surface
  SUPERTYPE OF (ONEOF(surface_of_linear_extrusion, surface_of_revolution))
  SUBTYPE OF (surface);
    swept_curve : curve;
END_ENTITY; -- 10303-42: geometry_schema

ENTITY symmetric_shape_aspect
  SUBTYPE OF (shape_aspect);
  INVERSE
    basis_relationships : SET [1:?] OF shape_aspect_relationship FOR 
                             relating_shape_aspect;
  WHERE
    WR1: SIZEOF(QUERY (x <* SELF\symmetric_shape_aspect.basis_relationships
              | ('INTEGRATED_CNC_SCHEMA.CENTRE_OF_SYMMETRY' IN TYPEOF(x\
              shape_aspect_relationship.related_shape_aspect)))) >= 1;
END_ENTITY; -- 10303-47: shape_aspect_definition_schema

ENTITY symmetry_tolerance
  SUBTYPE OF (geometric_tolerance_with_datum_reference);
  WHERE
    WR1: SIZEOF(SELF\geometric_tolerance_with_datum_reference.datum_system)
               <= 3;
END_ENTITY; -- 10303-519: aic_geometric_tolerances

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: 'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))) = 1))) = 0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.DIRECTION_SHAPE_REPRESENTATION' IN 
              TYPEOF(pdr.used_representation)) AND (pdr.used_representation
              .name = 'direction'))) = 1))) = 0);
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY tapping_operation
  SUBTYPE OF (drilling_type_operation);
  WHERE
  WR1:  (SELF.description IN ['tapping','thread drilling']);

  WR2:  NOT (SELF.description = 'tapping') OR
        ((verify_required_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_required_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: integrated_cnc_schema

ENTITY tee_profile
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN TYPEOF(
              SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ('INTEGRATED_CNC_SCHEMA.PLACEMENT'
               IN TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0)))
               = 0;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'width'))) = 1))) = 0))) = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'depth'))) = 1))) = 0))) = 0;
    WR8: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'cross bar width'))) = 1))) = 0))) =
               0;
    WR9: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'cross bar depth'))) = 1))) = 0))) =
               0;
    WR10: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'first offset'))) = 1))) = 0))) = 0;
    WR11: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'second offset'))) = 1))) = 0))) = 0
              ;
    WR12: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT' ] * 
              TYPEOF(it)) = 2) AND (it.name = 'first angle'))) = 1))) = 0))
              ) = 0;
    WR13: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT' ] * 
              TYPEOF(it)) = 2) AND (it.name = 'second angle'))) = 1))) = 0)
              )) = 0;
    WR14: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'radius'))) <= 1))) = 0))) = 0;
    WR15: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.' + 'DEFINITION')|
               NOT (SIZEOF(QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN TYPEOF
              (pdr.used_representation)) AND (pdr.used_representation.name 
              = 'profile limit'))) <= 1))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY thread
  SUBTYPE OF (feature_definition);
  WHERE
    WR1: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| ((
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'major diameter'))) = 1))) = 0))) = 
              0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'minor diameter'))) <= 1))) = 0))) =
               0;
    WR4: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'pitch diameter'))) <= 1))) = 0))) =
               0;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.RATIO_MEASURE_WITH_UNIT' ] * TYPEOF(it
              )) = 2) AND (it.name = 'number of threads'))) = 1))) = 0))) =
               0;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (
              'INTEGRATED_CNC_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN 
              TYPEOF(it)) AND (it.name = 'fit class'))) = 1))) = 0))) = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (
              'INTEGRATED_CNC_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN 
              TYPEOF(it)) AND (it.name = 'form'))) = 1))) = 0))) = 0;
    WR8: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ((
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (
              'INTEGRATED_CNC_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN 
              TYPEOF(it)) AND (it.name = 'qualifier'))) <= 1))) = 0))) = 0;
    WR10: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ((
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'crest'))) <= 1))) = 0))) = 0;
    WR12: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'partial area occurrence') AND (SIZEOF(QUERY (
              sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 
              'applied area usage') AND (
              'INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF
              (sar)))| ('INTEGRATED_CNC_SCHEMA.APPLIED_AREA' IN TYPEOF(sdr.
              relating_shape_aspect)))) = 1))) = 1))) = 0;
    WR13: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (SIZEOF(QUERY
               (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'applied shape') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| ('INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT' IN 
              TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0;
    WR14: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (
              'INTEGRATED_CNC_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN 
              TYPEOF(it)) AND (it.name = 'fit class 2'))) <= 1))) = 0))) = 
              0;
    WR15: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'nominal size'))) <= 1))) = 0))) = 0
              ;
END_ENTITY; -- 10303-522: aic_machining_feature

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: integrated_cnc_schema

ENTITY time_measure_with_unit
  SUBTYPE OF (measure_with_unit);
  WHERE
    WR1: 'INTEGRATED_CNC_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;
  WHERE
    WR1: upper_bound\measure_with_unit.value_component > lower_bound\
              measure_with_unit.value_component;
    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 geometric_tolerance;
    form               : tolerance_zone_form;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY tolerance_zone_definition
  SUPERTYPE OF (ONEOF(projected_zone_definition, runout_zone_definition));
    zone       : tolerance_zone;
    boundaries : SET [1:?] OF shape_aspect;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY tolerance_zone_form;
    name : label;
END_ENTITY; -- 10303-47: shape_tolerance_schema

ENTITY topological_representation_item
  SUPERTYPE OF (ONEOF(vertex, edge, face_bound, face, connected_face_set, 
      loop ANDOR path))
  SUBTYPE OF (representation_item);
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 total_runout_tolerance
  SUBTYPE OF (geometric_tolerance_with_datum_reference);
  WHERE
    WR1: SIZEOF(SELF\geometric_tolerance_with_datum_reference.datum_system)
               <= 2;
END_ENTITY; -- 10303-519: aic_geometric_tolerances

ENTITY transition_feature
  SUPERTYPE OF (ONEOF(chamfer, edge_round, fillet))
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: SIZEOF([ 'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION', 
              'INTEGRATED_CNC_SCHEMA.COMPOUND_FEATURE' ] * TYPEOF(SELF.
              of_shape.definition)) = 1;
    WR2: SIZEOF([ 'INTEGRATED_CNC_SCHEMA.CHAMFER', 
              'INTEGRATED_CNC_SCHEMA.EDGE_ROUND', 
              'INTEGRATED_CNC_SCHEMA.FILLET' ] * TYPEOF(SELF)) = 1;
END_ENTITY; -- 10303-522: aic_machining_feature

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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ((
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN TYPEOF
              (it)) AND ('INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'major diameter'))) = 1))) = 0))) = 
              0;
    WR5: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'nominal diameter'))) = 1))) = 0))) 
              = 0;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.' + 'DEFINITION')|
               NOT (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'tooth depth'))) <= 1))) = 0))) = 0;
    WR7: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(
              it)) = 2) AND (it.name = 'root fillet'))) <= 1))) = 0))) = 0;
    WR8: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (
              'INTEGRATED_CNC_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN 
              TYPEOF(it)) AND (it.name = 'helix hand'))) = 1))) = 0))) = 0)
              ;
    WR11: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (sa_occ.
              description = 'partial area occurrence') AND (SIZEOF(QUERY (
              sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 
              'applied area usage') AND ('INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF(sar)))| (
              'INTEGRATED_CNC_SCHEMA.APPLIED_AREA' IN TYPEOF(sdr.
              relating_shape_aspect)))) = 1))) = 1))) = 0;
    WR12: SIZEOF(QUERY (pds <* QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd
              )))| NOT (SIZEOF(QUERY (sa_occ <* USEDIN(pds, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT.OF_SHAPE')| (SIZEOF(QUERY
               (sdr <* QUERY (sar <* USEDIN(sa_occ, 
              'INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 
              'RELATED_SHAPE_ASPECT')| (sar.description = 'applied shape') 
              AND ('INTEGRATED_CNC_SCHEMA.SHAPE_DEFINING_RELATIONSHIP' IN 
              TYPEOF(sar)))| ('INTEGRATED_CNC_SCHEMA.SHAPE_ASPECT' IN 
              TYPEOF(sdr.relating_shape_aspect)))) = 1))) = 1))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

ENTITY turning_type_operation
  SUBTYPE OF (machining_operation);
  WHERE
  WR1:  ((verify_optional_relating_amr_with_name  (SELF, 'approach',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'])) AND
         (verify_related_type_for_amr_with_name   (SELF, 'approach',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_APPROACH_RETRACT_STRATEGY']))
        );

  WR2:  ((verify_optional_relating_amr_with_name  (SELF, 'retract',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'])) AND
         (verify_related_type_for_amr_with_name   (SELF, 'retract',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.MACHINING_APPROACH_RETRACT_STRATEGY']))
        );

  WR3:  ((verify_optional_relating_amr_with_name  (SELF, 'machining',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'])) AND
         (verify_related_type_for_amr_with_name   (SELF, 'machining',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_STRATEGY_RELATIONSHIP'],
          ['INTEGRATED_CNC_SCHEMA.TURNING_TYPE_STRATEGY']))
        );

END_ENTITY; -- 10303-238: integrated_cnc_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, 'INTEGRATED_CNC_SCHEMA.' +
              'ACTION_PROPERTY_REPRESENTATION.PROPERTY') |
             (1 = SIZEOF (QUERY (it <* prep.representation.items |
                (('INTEGRATED_CNC_SCHEMA.COMPOUND_REPRESENTATION_ITEM'
                   IN TYPEOF(it)) AND
                 ('INTEGRATED_CNC_SCHEMA.LIST_REPRESENTATION_ITEM'
                   IN TYPEOF(it.item_element)) AND
                 (0 = SIZEOF (QUERY (ie <* it.item_element | NOT (SIZEOF([
                    'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM',
                    'INTEGRATED_CNC_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',
           ['INTEGRATED_CNC_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'])) AND
         (verify_rep_desc_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',
           ['INTEGRATED_CNC_SCHEMA.DIRECTION'])) AND

         (verify_optional_action_property     (SELF, 'back path direction')) AND
         (verify_rep_item_for_action_property (SELF, 'back path direction',
           ['INTEGRATED_CNC_SCHEMA.DIRECTION'])) AND

         (verify_optional_action_property     (SELF, 'lift direction')) AND
         (verify_rep_item_for_action_property (SELF, 'lift direction',
           ['INTEGRATED_CNC_SCHEMA.DIRECTION'])) AND

         (verify_optional_action_property     (SELF, 'stepover direction')) AND
         (verify_rep_item_for_action_property (SELF, 'stepover direction',
           ['INTEGRATED_CNC_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',
           ['INTEGRATED_CNC_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'])) AND
         (verify_rep_desc_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',
           ['INTEGRATED_CNC_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'])) AND
         (verify_rep_desc_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',
           ['INTEGRATED_CNC_SCHEMA.DIRECTION'])) AND

         (verify_optional_action_property     (SELF, 'stepover direction')) AND
         (verify_rep_item_for_action_property (SELF, 'stepover direction',
           ['INTEGRATED_CNC_SCHEMA.DIRECTION'])) AND

         (verify_optional_action_property     (SELF, 'stepover feedrate')) AND
         (verify_rep_type_for_action_property (SELF, 'stepover feedrate',
           ['INTEGRATED_CNC_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'])) AND
         (verify_rep_desc_for_action_property (SELF, 'stepover feedrate',
           ['feed speed', 'feed per revolution']))
        );

  WR8:  NOT (SELF.description = 'contour') OR
        ((verify_optional_action_property     (SELF, 'back path direction')) AND
         (verify_rep_item_for_action_property (SELF, 'back path direction',
           ['INTEGRATED_CNC_SCHEMA.DIRECTION'])) AND

         (verify_optional_action_property     (SELF, 'lift direction')) AND
         (verify_rep_item_for_action_property (SELF, 'lift direction',
           ['INTEGRATED_CNC_SCHEMA.DIRECTION'])) AND

         (verify_optional_action_property     (SELF, 'stepover direction')) AND
         (verify_rep_item_for_action_property (SELF, 'stepover direction',
           ['INTEGRATED_CNC_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',
          ['INTEGRATED_CNC_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'])) AND
         (verify_rep_desc_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',
           ['INTEGRATED_CNC_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'])) AND
         (verify_rep_desc_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',
           ['INTEGRATED_CNC_SCHEMA.MACHINING_FEED_SPEED_REPRESENTATION'])) AND
         (verify_rep_desc_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',
           ['INTEGRATED_CNC_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: integrated_cnc_schema

ENTITY type_qualifier;
    name : label;
END_ENTITY; -- 10303-45: qualified_measure_schema

ENTITY unary_boolean_expression
  ABSTRACT SUPERTYPE OF (not_expression)
  SUBTYPE OF (boolean_expression, unary_generic_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 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 uniform_curve
  SUBTYPE OF (b_spline_curve);
END_ENTITY; -- 10303-42: geometry_schema

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

ENTITY value_range
  SUBTYPE OF (compound_representation_item);
END_ENTITY; -- 10303-238: integrated_cnc_schema

ENTITY variable
  ABSTRACT SUPERTYPE OF (numeric_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 vee_profile
  SUBTYPE OF (shape_aspect);
  WHERE
    WR1: 'INTEGRATED_CNC_SCHEMA.FEATURE_COMPONENT_DEFINITION' IN TYPEOF(
              SELF.of_shape.definition);
    WR2: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))) = 1))) = 0;
    WR3: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| (
              SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ('INTEGRATED_CNC_SCHEMA.PLACEMENT'
               IN TYPEOF(it)) AND (it.name = 'orientation'))) = 1))) = 0)))
               = 0;
    WR6: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ((
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN TYPEOF
              (it)) AND ('INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT' ] * 
              TYPEOF(it)) = 2) AND (it.name = 'profile angle'))) = 1))) = 0
              ))) = 0;
    WR8: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| (SIZEOF([ 
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM', 
              'INTEGRATED_CNC_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT' ] * 
              TYPEOF(it)) = 2) AND (it.name = 'tilt angle'))) = 1))) = 0)))
               = 0;
    WR9: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (pdr <* USEDIN(pd, 'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.PLANAR_SHAPE_REPRESENTATION' IN TYPEOF
              (pdr.used_representation)) AND (pdr.used_representation.name 
              = 'profile limit'))) <= 1))) = 0;
    WR10: SIZEOF(QUERY (pd <* USEDIN(SELF, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ((
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN TYPEOF
              (it)) AND ('INTEGRATED_CNC_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, 
              'INTEGRATED_CNC_SCHEMA.PROPERTY_DEFINITION.DEFINITION')| NOT 
              (SIZEOF(QUERY (impl_rep <* QUERY (pdr <* USEDIN(pd, 
              'INTEGRATED_CNC_SCHEMA.' + 
              'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')| (
              'INTEGRATED_CNC_SCHEMA.' + 
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(pdr.
              used_representation)))| NOT (SIZEOF(QUERY (it <* impl_rep.
              used_representation.items| ((
              'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM' IN TYPEOF
              (it)) AND ('INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT' 
              IN TYPEOF(it\measure_with_unit.value_component))) AND (it.
              name = 'second length'))) <= 1))) = 0))) = 0;
END_ENTITY; -- 10303-522: aic_machining_feature

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 week_of_year_and_day_date
  SUBTYPE OF (date);
    week_component : week_in_year_number;
    day_component  : OPTIONAL day_in_week_number;
END_ENTITY; -- 10303-41: date_time_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

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 =
                 'integrated_cnc_schema'))))
        )));
END_RULE; -- 10303-238: integrated_cnc_schema

RULE approval_requires_approval_person_organization FOR
  (approval,
   approval_person_organization);
WHERE
  WR1:  (0 = SIZEOF (QUERY (app <* approval | NOT
           (1 <= SIZEOF (QUERY (apo <* approval_person_organization |
               (app :=: apo.authorized_approval))))
        )));
END_RULE; -- 10303-238: integrated_cnc_schema

RULE approval_requires_assignment FOR
  (approval,
   approval_assignment);
WHERE
  WR1:  (0 = SIZEOF (QUERY (app <* approval | NOT
           (1 <= SIZEOF (QUERY (aa <* approval_assignment |
               (app :=: aa.assigned_approval))))
        )));
END_RULE; -- 10303-238: integrated_cnc_schema

RULE chamfer_requires_faces_or_features FOR
  (chamfer,
   property_definition_representation,
   feature_component_relationship);
WHERE
  WR1:  (0 = SIZEOF (QUERY (cf <* chamfer | NOT (

  -- chamfer relates two sets of faces in AP-224 style
  ((1 = SIZEOF (QUERY (pdr <* property_definition_representation |
        ((pdr.used_representation.name = 'chamfer face') AND
         (pdr.definition.definition :=: cf) AND
         ('INTEGRATED_CNC_SCHEMA.FACE_SHAPE_REPRESENTATION'
           IN TYPEOF (pdr.used_representation)))))) AND

   (1 = SIZEOF (QUERY (fcr <* feature_component_relationship |
        ((fcr.relating_shape_aspect :=: cf) AND
         (fcr.related_shape_aspect.description = 'first offset') AND
         ('INTEGRATED_CNC_SCHEMA.CHAMFER_OFFSET'
           IN TYPEOF (fcr.related_shape_aspect)) AND
         ((1 = SIZEOF (QUERY (pdr <* property_definition_representation |
               ((pdr.used_representation.name = 'first face shape') AND
                (pdr.definition.definition :=: fcr.related_shape_aspect) AND
                ('INTEGRATED_CNC_SCHEMA.FACE_SHAPE_REPRESENTATION'
                  IN TYPEOF (pdr.used_representation)))
         )))) )))) AND

   (1 = SIZEOF (QUERY (fcr <* feature_component_relationship |
        ((fcr.relating_shape_aspect :=: cf) AND
         (fcr.related_shape_aspect.description = 'second offset') AND
         ('INTEGRATED_CNC_SCHEMA.CHAMFER_OFFSET'
           IN TYPEOF (fcr.related_shape_aspect)) AND
         ((1 = SIZEOF (QUERY (pdr <* property_definition_representation |
               ((pdr.used_representation.name = 'second face shape') AND
                (pdr.definition.definition :=: fcr.related_shape_aspect) AND
                ('INTEGRATED_CNC_SCHEMA.FACE_SHAPE_REPRESENTATION'
                  IN TYPEOF (pdr.used_representation)))
         )))) ))))
  )
  OR
  -- chamfer relates two features in ISO 14649 style
  ((1 = SIZEOF (QUERY (fcr <* feature_component_relationship |
        ((fcr.name = 'first feature') AND
         (fcr.relating_shape_aspect.of_shape.definition :=: cf) AND
         ('INTEGRATED_CNC_SCHEMA.COMPOSITE_SHAPE_ASPECT'
           IN TYPEOF (fcr.relating_shape_aspect))))))  AND

   (1 = SIZEOF (QUERY (fcr <* feature_component_relationship |
        ((fcr.name = 'second feature') AND
         (fcr.relating_shape_aspect.of_shape.definition :=: cf) AND
         ('INTEGRATED_CNC_SCHEMA.COMPOSITE_SHAPE_ASPECT'
           IN TYPEOF (fcr.relating_shape_aspect)))))))
   ))));
END_RULE; -- 10303-238: integrated_cnc_schema

RULE compatible_dimension FOR 
  (cartesian_point,
   direction,
   representation_context,
   geometric_representation_context);
  WHERE
    WR1: SIZEOF(QUERY (x <* cartesian_point| (SIZEOF(QUERY (y <* 
              geometric_representation_context| item_in_context(x, y) AND (
              HIINDEX(x.coordinates) <> y.coordinate_space_dimension))) > 0
              ))) = 0;
    WR2: SIZEOF(QUERY (x <* direction| (SIZEOF(QUERY (y <* 
              geometric_representation_context| item_in_context(x, y) AND (
              HIINDEX(x.direction_ratios) <> y.coordinate_space_dimension))
              ) > 0))) = 0;
END_RULE; -- 10303-42: geometry_schema

RULE dependent_instantiable_approval_status FOR
  (approval_status);
WHERE
  WR1:  (0 = SIZEOF (QUERY (ast <* approval_status | NOT
           (1 <= SIZEOF (USEDIN (ast, '')))
        )));
END_RULE; -- 10303-238: integrated_cnc_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: integrated_cnc_schema

RULE edge_round_requires_faces_or_features FOR
  (edge_round,
   property_definition_representation,
   feature_component_relationship);
WHERE
  WR1:  (0 = SIZEOF (QUERY (er <* edge_round | NOT (

  -- edge round relates two sets of faces in AP-224 style
  ((1 = SIZEOF (QUERY (pdr <* property_definition_representation |
        ((pdr.used_representation.name = 'edge round face') AND
         (pdr.definition.definition :=: er) AND
         ('INTEGRATED_CNC_SCHEMA.FACE_SHAPE_REPRESENTATION'
           IN TYPEOF (pdr.used_representation)))))) AND

   (1 = SIZEOF (QUERY (pdr <* property_definition_representation |
        ((pdr.used_representation.name = 'first face shape') AND
         (pdr.definition.definition :=: er) AND
         ('INTEGRATED_CNC_SCHEMA.FACE_SHAPE_REPRESENTATION'
           IN TYPEOF (pdr.used_representation)))))) AND

   (1 = SIZEOF (QUERY (pdr <* property_definition_representation |
        ((pdr.used_representation.name = 'second face shape') AND
         (pdr.definition.definition :=: er) AND
         ('INTEGRATED_CNC_SCHEMA.FACE_SHAPE_REPRESENTATION'
           IN TYPEOF (pdr.used_representation))))))
  )
  OR
  -- edge round relates two features in ISO 14649 style
  ((1 = SIZEOF (QUERY (fcr <* feature_component_relationship |
        ((fcr.name = 'first feature') AND
         (fcr.relating_shape_aspect.of_shape.definition :=: er) AND
         ('INTEGRATED_CNC_SCHEMA.COMPOSITE_SHAPE_ASPECT'
           IN TYPEOF (fcr.relating_shape_aspect))))))  AND

   (1 = SIZEOF (QUERY (fcr <* feature_component_relationship |
        ((fcr.name = 'second feature') AND
         (fcr.relating_shape_aspect.of_shape.definition :=: er) AND
         ('INTEGRATED_CNC_SCHEMA.COMPOSITE_SHAPE_ASPECT'
           IN TYPEOF (fcr.relating_shape_aspect)))))))
   ))));
END_RULE; -- 10303-238: integrated_cnc_schema

RULE feature_optional_machining_property_process FOR
  (shape_aspect,
   process_property_association);
WHERE
  WR1:  (0 = SIZEOF (QUERY (sa <* shape_aspect |
        (('INTEGRATED_CNC_SCHEMA.FEATURE_DEFINITION' IN TYPEOF (sa)) OR
         ('INTEGRATED_CNC_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: integrated_cnc_schema

RULE nc_variable_compatible_initial_value FOR
  (expression_representation_item,
   representation_item_relationship);
WHERE
  -- each nc_variable has at most one one initial value
  WR1: (0 = SIZEOF (QUERY (nv <* expression_representation_item |
            ('INTEGRATED_CNC_SCHEMA.NUMERIC_VARIABLE'
	      IN TYPEOF (nv)) AND NOT
            (1 >= SIZEOF (QUERY (rir <* representation_item_relationship |
                   (rir.description = 'initial value')  AND
                   (rir.relating_representation_item :=: nv)
	))))));

  -- the types on either side of the initial value relationship must match
  -- each nc_variable has at most one one initial value
  WR2: (0 = SIZEOF (QUERY (rir <* representation_item_relationship |
            (rir.description = 'initial value')  AND
            ('INTEGRATED_CNC_SCHEMA.NUMERIC_VARIABLE'
              IN TYPEOF (rir.relating_representation_item))
	    AND NOT
            ((('INTEGRATED_CNC_SCHEMA.INT_NUMERIC_VARIABLE'
                IN TYPEOF (rir.relating_representation_item)) AND
              ('INTEGRATED_CNC_SCHEMA.INT_LITERAL'
                IN TYPEOF (rir.related_representation_item)))
             OR
            ((('INTEGRATED_CNC_SCHEMA.REAL_NUMERIC_VARIABLE'
                IN TYPEOF (rir.relating_representation_item)) AND
              ('INTEGRATED_CNC_SCHEMA.REAL_LITERAL'
                IN TYPEOF (rir.related_representation_item)
	)))))));
END_RULE; -- 10303-238: integrated_cnc_schema

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: integrated_cnc_schema

RULE restrict_unneeded_feature_usage FOR (feature_definition);
  WHERE
  WR1:  (0 = SIZEOF (QUERY (fd <* feature_definition |
         ('INTEGRATED_CNC_SCHEMA.FILLET' IN TYPEOF(fd)) OR
         ('INTEGRATED_CNC_SCHEMA.GEAR' IN TYPEOF(fd)) OR
         ('INTEGRATED_CNC_SCHEMA.MARKING' IN TYPEOF(fd)) OR
         ('INTEGRATED_CNC_SCHEMA.PROTRUSION' IN TYPEOF(fd)) OR
         ('INTEGRATED_CNC_SCHEMA.RIB_TOP' IN TYPEOF(fd))
        )));
END_RULE; -- 10303-238: integrated_cnc_schema

RULE security_classification_requires_assignment FOR
  (security_classification,
   security_classification_assignment);
WHERE
  WR1:  (0 = SIZEOF (QUERY (sc <* security_classification  | NOT
           (1 <= SIZEOF (QUERY (sca <* security_classification_assignment |
               (sc :=: sca.assigned_security_classification))))
        )));
END_RULE; -- 10303-238: integrated_cnc_schema

FUNCTION acyclic (
    arg1 : generic_expression;
    arg2 : SET OF generic_expression 
    ) : BOOLEAN;
  LOCAL
    result : BOOLEAN;
  END_LOCAL;
    IF 'INTEGRATED_CNC_SCHEMA.SIMPLE_GENERIC_EXPRESSION' IN TYPEOF(arg1) 
      THEN
      RETURN (TRUE);
    END_IF;
    IF arg1 IN arg2 THEN
      RETURN (FALSE);
    END_IF;
    IF 'INTEGRATED_CNC_SCHEMA.UNARY_GENERIC_EXPRESSION' IN TYPEOF(arg1) 
      THEN
      RETURN (acyclic(arg1\unary_generic_expression.operand, arg2 + [ arg1 
        ]));
    END_IF;
    IF 'INTEGRATED_CNC_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 'INTEGRATED_CNC_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;
END_FUNCTION; -- 13584-20: iso13584_generic_expressions_schema

FUNCTION acyclic_curve_replica (
    rep    : curve_replica;
    parent : curve 
    ) : BOOLEAN;
    IF NOT ('INTEGRATED_CNC_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_mapped_representation (
    parent_set   : SET OF representation;
    children_set : SET OF representation_item 
    ) : BOOLEAN;
  LOCAL
    x : SET OF representation_item;
    y : SET OF representation_item;
  END_LOCAL;
    x := QUERY (z <* children_set| 'INTEGRATED_CNC_SCHEMA.MAPPED_ITEM' IN 
      TYPEOF(z));
    IF SIZEOF(x) > 0 THEN
      REPEAT i := 1 TO HIINDEX(x);
        IF x[i]\mapped_item.mapping_source.mapped_representation IN 
          parent_set THEN
          RETURN (FALSE);
        END_IF;
        IF NOT acyclic_mapped_representation((parent_set + x[i]\mapped_item
          .mapping_source.mapped_representation), x[i]\mapped_item.
          mapping_source.mapped_representation.items) THEN
          RETURN (FALSE);
        END_IF;
      END_REPEAT;
    END_IF;
    x := children_set - x;
    IF SIZEOF(x) > 0 THEN
      REPEAT i := 1 TO HIINDEX(x);
        y := QUERY (z <* bag_to_set(USEDIN(x[i], ''))| 
          'INTEGRATED_CNC_SCHEMA.REPRESENTATION_ITEM' IN TYPEOF(z));
        IF NOT acyclic_mapped_representation(parent_set, y) THEN
          RETURN (FALSE);
        END_IF;
      END_REPEAT;
    END_IF;
    RETURN (TRUE);
END_FUNCTION; -- 10303-43: representation_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, 'INTEGRATED_CNC_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;
    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, 'INTEGRATED_CNC_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_surface_replica (
    rep    : surface_replica;
    parent : surface 
    ) : BOOLEAN;
    IF NOT ('INTEGRATED_CNC_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 associated_surface (
    arg : pcurve_or_surface 
    ) : surface;
  LOCAL
    surf : surface;
  END_LOCAL;
    IF 'INTEGRATED_CNC_SCHEMA.PCURVE' IN TYPEOF(arg) THEN
      surf := arg.basis_surface;
    ELSE
      surf := arg;
    END_IF;
    RETURN (surf);
END_FUNCTION; -- 10303-42: geometry_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 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)).orientation, d1 ]);
END_FUNCTION; -- 10303-42: geometry_schema

FUNCTION closed_shell_reversed (
    a_shell : closed_shell 
    ) : oriented_closed_shell;
  LOCAL
    the_reverse : oriented_closed_shell;
  END_LOCAL;
    IF 'INTEGRATED_CNC_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 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 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 ('INTEGRATED_CNC_SCHEMA.PCURVE' IN TYPEOF(c\composite_curve.
        segments[k].parent_curve)) AND NOT (
        'INTEGRATED_CNC_SCHEMA.SURFACE_CURVE' IN TYPEOF(c\composite_curve.
        segments[k].parent_curve))) AND NOT (
        'INTEGRATED_CNC_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 ('INTEGRATED_CNC_SCHEMA.OPEN_SHELL' IN TYPEOF(m.sbsm_boundary[
        j])) AND NOT ('INTEGRATED_CNC_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_param_b_spline (
    degree    : INTEGER;
    up_knots  : INTEGER;
    up_cp     : INTEGER;
    knot_mult : LIST OF INTEGER;
    knots     : LIST 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_rectangular_composite_surface (
    s : rectangular_composite_surface 
    ) : BOOLEAN;
    REPEAT i := 1 TO s.n_u;
      REPEAT j := 1 TO s.n_v;
        IF NOT (('INTEGRATED_CNC_SCHEMA.B_SPLINE_SURFACE' IN TYPEOF(s.
          segments[i][j].parent_surface)) OR (
          'INTEGRATED_CNC_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 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 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 'INTEGRATED_CNC_SCHEMA.DERIVED_UNIT' IN TYPEOF(x) THEN
      REPEAT i := LOINDEX(x.elements) TO HIINDEX(x.elements);
        result.length_exponent := result.length_exponent + x.elements[i].
          exponent * x.elements[i].unit.dimensions.length_exponent;
        result.mass_exponent := result.mass_exponent + x.elements[i].
          exponent * x.elements[i].unit.dimensions.mass_exponent;
        result.time_exponent := result.time_exponent + x.elements[i].
          exponent * x.elements[i].unit.dimensions.time_exponent;
        result.electric_current_exponent := result.
          electric_current_exponent + x.elements[i].exponent * x.elements[i
          ].unit.dimensions.electric_current_exponent;
        result.thermodynamic_temperature_exponent := result.
          thermodynamic_temperature_exponent + x.elements[i].exponent * x.
          elements[i].unit.dimensions.thermodynamic_temperature_exponent;
        result.amount_of_substance_exponent := result.
          amount_of_substance_exponent + x.elements[i].exponent * x.
          elements[i].unit.dimensions.amount_of_substance_exponent;
        result.luminous_intensity_exponent := result.
          luminous_intensity_exponent + x.elements[i].exponent * x.elements
          [i].unit.dimensions.luminous_intensity_exponent;
      END_REPEAT;
    ELSE
      result := x.dimensions;
    END_IF;
    RETURN (result);
END_FUNCTION; -- 10303-41: measure_schema

FUNCTION dimension_of (
    item : geometric_representation_item 
    ) : dimension_count;
  LOCAL
    x : SET OF representation;
    y : representation_context;
    dim : dimension_count;
  END_LOCAL;
    IF 'INTEGRATED_CNC_SCHEMA.CARTESIAN_POINT' IN TYPEOF(item) THEN
      dim := SIZEOF(item\cartesian_point.coordinates);
      RETURN (dim);
    END_IF;
    IF 'INTEGRATED_CNC_SCHEMA.DIRECTION' IN TYPEOF(item) THEN
      dim := SIZEOF(item\direction.direction_ratios);
      RETURN (dim);
    END_IF;
    IF 'INTEGRATED_CNC_SCHEMA.VECTOR' IN TYPEOF(item) THEN
      dim := SIZEOF(item\vector.orientation\direction.direction_ratios);
      RETURN (dim);
    END_IF;
    x := using_representations(item);
    y := x[1].context_of_items;
    dim := y\geometric_representation_context.coordinate_space_dimension;
    RETURN (dim);
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, 1.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 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 edge_reversed (
    an_edge : edge 
    ) : oriented_edge;
  LOCAL
    the_reverse : oriented_edge;
  END_LOCAL;
    IF 'INTEGRATED_CNC_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 face_bound_reversed (
    a_face_bound : face_bound 
    ) : face_bound;
  LOCAL
    the_reverse : face_bound;
  END_LOCAL;
    IF 'INTEGRATED_CNC_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 'INTEGRATED_CNC_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 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 gbsf_check_curve (
    cv : representation_item 
    ) : BOOLEAN;
    IF SIZEOF([ 'INTEGRATED_CNC_SCHEMA.BOUNDED_CURVE', 
      'INTEGRATED_CNC_SCHEMA.CONIC', 'INTEGRATED_CNC_SCHEMA.CURVE_REPLICA',
       'INTEGRATED_CNC_SCHEMA.LINE', 
      'INTEGRATED_CNC_SCHEMA.OFFSET_CURVE_3D' ] * TYPEOF(cv)) > 1 THEN
      RETURN (FALSE);
    END_IF;
    IF SIZEOF([ 'INTEGRATED_CNC_SCHEMA.CIRCLE', 
      'INTEGRATED_CNC_SCHEMA.ELLIPSE', 
      'INTEGRATED_CNC_SCHEMA.TRIMMED_CURVE' ] * TYPEOF(cv)) = 1 THEN
      RETURN (TRUE);
    ELSE
      IF ('INTEGRATED_CNC_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 ('INTEGRATED_CNC_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 'INTEGRATED_CNC_SCHEMA.CURVE_REPLICA' IN TYPEOF(cv) THEN
            RETURN (gbsf_check_curve(cv\curve_replica.parent_curve));
          ELSE
            IF (('INTEGRATED_CNC_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 (
              'INTEGRATED_CNC_SCHEMA.POLYLINE' IN TYPEOF(cv\offset_curve_3d
              .basis_curve)) THEN
              RETURN (gbsf_check_curve(cv\offset_curve_3d.basis_curve));
            ELSE
              IF 'INTEGRATED_CNC_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 'INTEGRATED_CNC_SCHEMA.POLYLINE' IN TYPEOF(cv) THEN
                  IF SIZEOF(cv\polyline.points) >= 3 THEN
                    RETURN (TRUE);
                  END_IF;
                ELSE
                  IF 'INTEGRATED_CNC_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 'INTEGRATED_CNC_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 'INTEGRATED_CNC_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 'INTEGRATED_CNC_SCHEMA.CARTESIAN_POINT' IN TYPEOF(pnt) THEN
      RETURN (TRUE);
    ELSE
      IF 'INTEGRATED_CNC_SCHEMA.POINT_ON_CURVE' IN TYPEOF(pnt) THEN
        RETURN (gbsf_check_curve(pnt\point_on_curve.basis_curve));
      ELSE
        IF 'INTEGRATED_CNC_SCHEMA.POINT_ON_SURFACE' IN TYPEOF(pnt) THEN
          RETURN (gbsf_check_surface(pnt\point_on_surface.basis_surface));
        ELSE
          IF 'INTEGRATED_CNC_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 ('INTEGRATED_CNC_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([ 'INTEGRATED_CNC_SCHEMA.SPHERICAL_SURFACE', 
        'INTEGRATED_CNC_SCHEMA.TOROIDAL_SURFACE', 
        'INTEGRATED_CNC_SCHEMA.CURVE_BOUNDED_SURFACE', 
        'INTEGRATED_CNC_SCHEMA.RECTANGULAR_TRIMMED_SURFACE' ] * TYPEOF(sf))
         = 1 THEN
        RETURN (TRUE);
      ELSE
        IF ('INTEGRATED_CNC_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 'INTEGRATED_CNC_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 'INTEGRATED_CNC_SCHEMA.SURFACE_REPLICA' IN TYPEOF(sf) THEN
              RETURN (gbsf_check_surface(sf\surface_replica.parent_surface)
                );
            ELSE
              IF 'INTEGRATED_CNC_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 get_action_property (
    cad :       characterized_action_definition;
    prop_name : STRING
    ): SET OF action_property;

    RETURN (bag_to_set (QUERY (ap <*
        USEDIN (cad, 'INTEGRATED_CNC_SCHEMA.ACTION_PROPERTY.DEFINITION') |
        (ap.name = prop_name))));
END_FUNCTION; -- 10303-238: integrated_cnc_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 'INTEGRATED_CNC_SCHEMA.PCURVE' IN TYPEOF(c) THEN
      surfs := [ c\pcurve.basis_surface ];
    ELSE
      IF 'INTEGRATED_CNC_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 'INTEGRATED_CNC_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_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: integrated_cnc_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: integrated_cnc_schema

FUNCTION get_description_value (
    obj : description_attribute_select 
    ) : text;
  LOCAL
    description_bag : BAG OF description_attribute := USEDIN(obj, 
      'INTEGRATED_CNC_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_id_value (
    obj : id_attribute_select 
    ) : identifier;
  LOCAL
    id_bag : BAG OF id_attribute := USEDIN(obj, 'INTEGRATED_CNC_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_name_value (
    obj : name_attribute_select 
    ) : label;
  LOCAL
    name_bag : BAG OF name_attribute := USEDIN(obj, 
      'INTEGRATED_CNC_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_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, 
      'INTEGRATED_CNC_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], 
        'INTEGRATED_CNC_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,
       'INTEGRATED_CNC_SCHEMA.ACTION_METHOD_RELATIONSHIP.RELATING_METHOD')));
END_FUNCTION; -- 10303-238: integrated_cnc_schema

FUNCTION get_resource_property (
    crd :       characterized_resource_definition;
    prop_name : STRING
    ): SET OF resource_property;

    RETURN (bag_to_set (QUERY (rp <*
        USEDIN (crd, 'INTEGRATED_CNC_SCHEMA.RESOURCE_PROPERTY.RESOURCE') |
        (rp.name = prop_name))));
END_FUNCTION; -- 10303-238: integrated_cnc_schema

FUNCTION get_role (
    obj : role_select 
    ) : object_role;
  LOCAL
    role_bag : BAG OF role_association := USEDIN(obj, 
      'INTEGRATED_CNC_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 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 'INTEGRATED_CNC_SCHEMA.INT_LITERAL' IN TYPEOF(arg) THEN
      RETURN (TRUE);
    END_IF;
    IF 'INTEGRATED_CNC_SCHEMA.REAL_LITERAL' IN TYPEOF(arg) THEN
      RETURN (FALSE);
    END_IF;
    IF 'INTEGRATED_CNC_SCHEMA.INT_NUMERIC_VARIABLE' IN TYPEOF(arg) THEN
      RETURN (TRUE);
    END_IF;
    IF 'INTEGRATED_CNC_SCHEMA.REAL_NUMERIC_VARIABLE' 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 'INTEGRATED_CNC_SCHEMA.SIMPLE_NUMERIC_EXPRESSION' IN TYPEOF(arg)
      THEN
      RETURN (TRUE);
    END_IF;
    IF 'INTEGRATED_CNC_SCHEMA.NOT_EXPRESSION' IN TYPEOF(arg) THEN
      RETURN (is_SQL_mappable(arg\unary_generic_expression.operand));
    END_IF;
    IF ('INTEGRATED_CNC_SCHEMA.XOR_EXPRESSION' IN TYPEOF(arg)) THEN
      RETURN (FALSE);
    END_IF;
    IF ('INTEGRATED_CNC_SCHEMA.AND_EXPRESSION' IN TYPEOF(arg)) OR (
      'INTEGRATED_CNC_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 (((((('INTEGRATED_CNC_SCHEMA.COMPARISON_EQUAL' IN TYPEOF(arg)) OR (
      'INTEGRATED_CNC_SCHEMA.COMPARISON_GREATER' IN TYPEOF(arg))) OR (
      'INTEGRATED_CNC_SCHEMA.COMPARISON_GREATER_EQUAL' IN TYPEOF(arg))) OR
      ('INTEGRATED_CNC_SCHEMA.COMPARISON_LESS' IN TYPEOF(arg))) OR (
      'INTEGRATED_CNC_SCHEMA.COMPARISON_LESS_EQUAL' IN TYPEOF(arg))) OR (
      'INTEGRATED_CNC_SCHEMA.COMPARISON_NOT_EQUAL' IN TYPEOF(arg))) THEN
      RETURN (is_SQL_mappable(arg\comparison_expression.operands[1]) AND
        is_SQL_mappable(arg\comparison_expression.operands[2]));
    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, 'INTEGRATED_CNC_SCHEMA.REPRESENTATION.ITEMS') * 
      cntxt.representations_in_context) > 0 THEN
      RETURN (TRUE);
    ELSE
      y := QUERY (z <* USEDIN(item, '')| 
        'INTEGRATED_CNC_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_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 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 := 'INTEGRATED_CNC_SCHEMA.POLY_LOOP' IN TYPEOF(l[1]);
--    REPEAT i := 2 TO SIZEOF(l);
--      IF ('INTEGRATED_CNC_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;
    IF SIZEOF(QUERY (msbtype <* TYPEOF(brep)| msbtype LIKE 
      '*BREP_WITH_VOIDS')) >= 1 THEN
      RETURN (brep\brep_with_voids.voids + brep.outer);
    ELSE
      RETURN ([ brep.outer ]);
    END_IF;
END_FUNCTION; -- 10303-42: geometric_model_schema

FUNCTION msf_curve_check (
    cv : representation_item 
    ) : BOOLEAN;
    IF SIZEOF([ 'INTEGRATED_CNC_SCHEMA.BOUNDED_CURVE', 
      'INTEGRATED_CNC_SCHEMA.CONIC', 'INTEGRATED_CNC_SCHEMA.CURVE_REPLICA',
       'INTEGRATED_CNC_SCHEMA.LINE', 
      'INTEGRATED_CNC_SCHEMA.OFFSET_CURVE_3D' ] * TYPEOF(cv)) > 1 THEN
      RETURN (FALSE);
    END_IF;
    IF ('INTEGRATED_CNC_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([ 'INTEGRATED_CNC_SCHEMA.CONIC', 
        'INTEGRATED_CNC_SCHEMA.LINE' ] * TYPEOF(cv)) = 1 THEN
        RETURN (TRUE);
      ELSE
        IF 'INTEGRATED_CNC_SCHEMA.CURVE_REPLICA' IN TYPEOF(cv) THEN
          RETURN (msf_curve_check(cv\curve_replica.parent_curve));
        ELSE
          IF (('INTEGRATED_CNC_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 (
            'INTEGRATED_CNC_SCHEMA.POLYLINE' IN TYPEOF(cv\offset_curve_3d.
            basis_curve)) THEN
            RETURN (msf_curve_check(cv\offset_curve_3d.basis_curve));
          ELSE
            IF 'INTEGRATED_CNC_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 'INTEGRATED_CNC_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 'INTEGRATED_CNC_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 'INTEGRATED_CNC_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 'INTEGRATED_CNC_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 'INTEGRATED_CNC_SCHEMA.ELEMENTARY_SURFACE' IN TYPEOF(surf) THEN
      RETURN (TRUE);
    ELSE
      IF 'INTEGRATED_CNC_SCHEMA.SWEPT_SURFACE' IN TYPEOF(surf) THEN
        RETURN (msf_curve_check(surf\swept_surface.swept_curve));
      ELSE
        IF ('INTEGRATED_CNC_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 'INTEGRATED_CNC_SCHEMA.SURFACE_REPLICA' IN TYPEOF(surf) THEN
            RETURN (msf_surface_check(surf\surface_replica.parent_surface))
              ;
          ELSE
            IF ('INTEGRATED_CNC_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 normalise (
    arg : vector_or_direction 
    ) : vector_or_direction;
  LOCAL
    ndim : INTEGER;
    v : direction;
    result : vector_or_direction;
    vec : vector;
    mag : REAL;
  END_LOCAL;
    IF NOT EXISTS(arg) THEN
      result := ?;
    ELSE
      ndim := arg.dim;
      IF 'INTEGRATED_CNC_SCHEMA.VECTOR' IN TYPEOF(arg) THEN
        BEGIN
          v := dummy_gri || direction(arg.orientation.direction_ratios);
          IF arg.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 'INTEGRATED_CNC_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 open_shell_reversed (
    a_shell : open_shell 
    ) : oriented_open_shell;
  LOCAL
    the_reverse : oriented_open_shell;
  END_LOCAL;
    IF 'INTEGRATED_CNC_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 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 'INTEGRATED_CNC_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 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 'INTEGRATED_CNC_SCHEMA.VECTOR' IN TYPEOF(vec) THEN
        v := dummy_gri || direction(vec.orientation.direction_ratios);
        mag := scalar * vec.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 shell_reversed (
    a_shell : shell 
    ) : shell;
    IF 'INTEGRATED_CNC_SCHEMA.OPEN_SHELL' IN TYPEOF(a_shell) THEN
      RETURN (open_shell_reversed(a_shell));
    ELSE
      IF 'INTEGRATED_CNC_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 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 'INTEGRATED_CNC_SCHEMA.EDGE' IN TYPEOF(an_item) THEN
      RETURN (edge_reversed(an_item));
    END_IF;
    IF 'INTEGRATED_CNC_SCHEMA.PATH' IN TYPEOF(an_item) THEN
      RETURN (path_reversed(an_item));
    END_IF;
    IF 'INTEGRATED_CNC_SCHEMA.FACE_BOUND' IN TYPEOF(an_item) THEN
      RETURN (face_bound_reversed(an_item));
    END_IF;
    IF 'INTEGRATED_CNC_SCHEMA.FACE' IN TYPEOF(an_item) THEN
      RETURN (face_reversed(an_item));
    END_IF;
    IF 'INTEGRATED_CNC_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 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, ''))| (
      'INTEGRATED_CNC_SCHEMA.REPRESENTATION_ITEM' IN TYPEOF(z)) OR (
      'INTEGRATED_CNC_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, 'INTEGRATED_CNC_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], 
          'INTEGRATED_CNC_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_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_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_units (
    m : measure_with_unit
    ) : BOOLEAN;
    IF 'INTEGRATED_CNC_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) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'INTEGRATED_CNC_SCHEMA.TIME_MEASURE'
	IN TYPEOF(m.value_component) THEN
      IF derive_dimensional_exponents(m.unit_component) <>
        dimensional_exponents(0, 0, 1, 0, 0, 0, 0) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'INTEGRATED_CNC_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) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'INTEGRATED_CNC_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) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'INTEGRATED_CNC_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) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'INTEGRATED_CNC_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) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    IF 'INTEGRATED_CNC_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) THEN
        RETURN (FALSE);
      END_IF;
    END_IF;
    RETURN (TRUE);
END_FUNCTION; -- 10303-41: measure_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 'INTEGRATED_CNC_SCHEMA.VECTOR' IN TYPEOF(arg1) THEN
          mag1 := arg1.magnitude;
          vec1 := arg1.orientation;
        ELSE
          mag1 := 1.0;
          vec1 := arg1;
        END_IF;
        IF 'INTEGRATED_CNC_SCHEMA.VECTOR' IN TYPEOF(arg2) THEN
          mag2 := arg2.magnitude;
          vec2 := arg2.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,
        ['INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM',
         'INTEGRATED_CNC_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT']));
END_FUNCTION; -- 10303-238: integrated_cnc_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([
           'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM',
           'INTEGRATED_CNC_SCHEMA.PLANE_ANGLE_MEASURE_WITH_UNIT'] *
            TYPEOF(it)) = 2))));
END_FUNCTION; -- 10303-238: integrated_cnc_schema

FUNCTION verify_ball_endmill_edge_dimensions (
    rep : machining_tool_dimension_representation
    ): LOGICAL;

    LOCAL
      diameter : length_measure;
      dia_items : SET OF REPRESENTATION_ITEM :=
        QUERY (it <* rep.items | (it.name = 'diameter'));
    END_LOCAL;

    diameter := dia_items[1].value_component;

    RETURN
         ((0 = SIZEOF (QUERY ( it <* rep.items |
           (it.name = 'edge center horizontal') AND NOT
           (it.value_component = 0))))
          AND
          (0 = SIZEOF (QUERY ( it <* rep.items |
           (it.name = 'edge center vertical') AND NOT
           (it.value_component = diameter/2))))
          AND
          (0 = SIZEOF (QUERY ( it <* rep.items |
           (it.name = 'edge radius') AND NOT
           (it.value_component = diameter/2))))
          );
END_FUNCTION; -- 10303-238: integrated_cnc_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
          (('INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM'
            IN TYPEOF(it)) AND
           ('INTEGRATED_CNC_SCHEMA.COUNT_MEASURE'
            IN TYPEOF(it.value_component))))));
END_FUNCTION; -- 10303-238: integrated_cnc_schema

FUNCTION verify_descriptive_action_property (
    cad : 	characterized_action_definition;
    prop_name : STRING
    ): LOGICAL;

    RETURN (verify_rep_item_for_action_property(cad, prop_name,
        ['INTEGRATED_CNC_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM']));
END_FUNCTION; -- 10303-238: integrated_cnc_schema

FUNCTION verify_descriptive_rep_item (
    rep : 	representation;
    prop_name : STRING
    ): LOGICAL;

    RETURN (0 = SIZEOF (QUERY ( it <* rep.items |
          (it.name = prop_name) AND NOT (
           'INTEGRATED_CNC_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
            IN TYPEOF(it)))));
END_FUNCTION; -- 10303-238: integrated_cnc_schema

FUNCTION verify_enumeration_action_property (
    cad : 	  characterized_action_definition;
    prop_name :   STRING;
    prop_values : SET OF STRING
    ): LOGICAL;

    -- Each action property has at least one representation that contains
    -- a descriptive rep item, and that descriptive rep item has a value
    -- drawn from the prop_values set.

    -- there are no properties that do not have matching representations
    RETURN (0 = SIZEOF (QUERY (prop <* get_action_property (cad, prop_name) |

        NOT (
        -- there is at least one rep with matching rep items
        (0 < SIZEOF (QUERY (prep <* USEDIN (prop, 'INTEGRATED_CNC_SCHEMA.' +
                'ACTION_PROPERTY_REPRESENTATION.PROPERTY') |

           -- property representation has at least one matching rep item
           (0 < SIZEOF (QUERY (it <* prep.representation.items |
               (('INTEGRATED_CNC_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
                  IN TYPEOF(it)) AND
                (it.description IN prop_values))
           )))
        )))
    ))));
END_FUNCTION; -- 10303-238: integrated_cnc_schema

FUNCTION verify_enumeration_rep_item (
    rep : 	  representation;
    prop_name :   STRING;
    prop_values : SET OF STRING
    ): LOGICAL;

    RETURN (0 = SIZEOF (QUERY ( it <* rep.items |
          (it.name = prop_name) AND NOT
          (('INTEGRATED_CNC_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM'
            IN TYPEOF(it)) AND
           (it.description IN prop_values)))));
END_FUNCTION; -- 10303-238: integrated_cnc_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,
        ['INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM',
         'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT']));
END_FUNCTION; -- 10303-238: integrated_cnc_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([
           'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM',
           'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT'] *
            TYPEOF(it)) = 2))));
END_FUNCTION; -- 10303-238: integrated_cnc_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,
        ['INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM',
         'INTEGRATED_CNC_SCHEMA.LENGTH_MEASURE_WITH_UNIT']));
END_FUNCTION; -- 10303-238: integrated_cnc_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
          (('INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM'
            IN TYPEOF(it)) AND
           ('INTEGRATED_CNC_SCHEMA.NUMERIC_MEASURE'
            IN TYPEOF(it.value_component))))));
END_FUNCTION; -- 10303-238: integrated_cnc_schema

FUNCTION verify_numeric_measure_action_property (
    cad : 	characterized_action_definition;
    prop_name : STRING
    ): LOGICAL;

    -- All properties have matching representations.  The reason we test
    -- for "nothing matching the negation" rather than "something matching
    -- the positive" is so that we return true if there are no properties.
    --
    RETURN (0 = SIZEOF (QUERY (prop <* get_action_property (cad, prop_name) |

        -- property has no matching representations
        NOT (

        -- there is at least one rep with matching rep items
        (0 < SIZEOF (QUERY (prep <* USEDIN (prop, 'INTEGRATED_CNC_SCHEMA.' +
                'ACTION_PROPERTY_REPRESENTATION.PROPERTY') |

           -- property representation has at least one matching rep item
           (0 < SIZEOF (QUERY (it <* prep.representation.items |
               (('INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM'
                  IN TYPEOF(it)) AND
                ('INTEGRATED_CNC_SCHEMA.NUMERIC_MEASURE'
                  IN TYPEOF(it.value_component)))
           )))
        )))
    ))));
END_FUNCTION; -- 10303-238: integrated_cnc_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: integrated_cnc_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

        -- All properties need advanced brep shape reps
       (0 = SIZEOF (QUERY (prop <*
         USEDIN (mpe, 'INTEGRATED_CNC_SCHEMA.ACTION_PROPERTY.DEFINITION') |
         ((prop.name IN ['as-is shape', 'to-be shape', 'removal shape']) AND
          (0 = SIZEOF (QUERY (prep <* USEDIN (prop, 'INTEGRATED_CNC_SCHEMA.' +
             'ACTION_PROPERTY_REPRESENTATION.PROPERTY') |
             ('INTEGRATED_CNC_SCHEMA.ADVANCED_BREP_SHAPE_REPRESENTATION'
               IN TYPEOF (prep.representation))))))
          )))
      );
END_FUNCTION; -- 10303-238: integrated_cnc_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: integrated_cnc_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: integrated_cnc_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: integrated_cnc_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: integrated_cnc_schema

FUNCTION verify_parameter_action_property (
    cad : 	characterized_action_definition;
    prop_name : STRING
    ): LOGICAL;

    -- All properties have matching representations.  The reason we test
    -- for "nothing matching the negation" rather than "something matching
    -- the positive" is so that we return true if there are no properties.
    --
    RETURN (0 = SIZEOF (QUERY (prop <* get_action_property (cad, prop_name) |

        -- property has no matching representations
        NOT (

        -- there is at least one rep with matching rep items
        (0 < SIZEOF (QUERY (prep <* USEDIN (prop, 'INTEGRATED_CNC_SCHEMA.' +
                'ACTION_PROPERTY_REPRESENTATION.PROPERTY') |

           -- property representation has at least one matching rep item
           (0 < SIZEOF (QUERY (it <* prep.representation.items |
               (('INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM'
                  IN TYPEOF(it)) AND
                ('INTEGRATED_CNC_SCHEMA.PARAMETER_VALUE'
                  IN TYPEOF(it.value_component)))
           )))
        )))
    ))));
END_FUNCTION; -- 10303-238: integrated_cnc_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: integrated_cnc_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,
        ['INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM',
         'INTEGRATED_CNC_SCHEMA.RATIO_MEASURE_WITH_UNIT']));
END_FUNCTION; -- 10303-238: integrated_cnc_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([
           'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM',
           'INTEGRATED_CNC_SCHEMA.RATIO_MEASURE_WITH_UNIT'] *
            TYPEOF(it)) = 2))));
END_FUNCTION; -- 10303-238: integrated_cnc_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: integrated_cnc_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: integrated_cnc_schema

FUNCTION verify_rep_desc_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, 'INTEGRATED_CNC_SCHEMA.'+
               'ACTION_PROPERTY_REPRESENTATION.PROPERTY') |
               (prep.representation.description IN desc_names)
                )))
        )));
END_FUNCTION; -- 10303-238: integrated_cnc_schema

FUNCTION verify_rep_item_for_action_property (
    cad : 	     characterized_action_definition;
    prop_name :      STRING;
    rep_item_types : SET OF STRING
    ): LOGICAL;

    -- All properties have matching representations.  The reason we test
    -- for "nothing matching the negation" rather than "something matching
    -- the positive" is so that we return true if there are no properties.
    --
    RETURN (0 = SIZEOF (QUERY (prop <* get_action_property (cad, prop_name) |

        -- property has no matching representations
        NOT (

        -- there is at least one rep with matching rep items
        (0 < SIZEOF (QUERY (prep <* USEDIN (prop, 'INTEGRATED_CNC_SCHEMA.' +
                'ACTION_PROPERTY_REPRESENTATION.PROPERTY') |

           -- property representation has at least one matching rep item
           (0 < SIZEOF (QUERY (it <* prep.representation.items |
               (SIZEOF (rep_item_types * TYPEOF(it)) =
                SIZEOF (rep_item_types))))
           )))
        ))
    )));
END_FUNCTION; -- 10303-238: integrated_cnc_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, 'INTEGRATED_CNC_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: integrated_cnc_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, 'INTEGRATED_CNC_SCHEMA.'+
               'ACTION_PROPERTY_REPRESENTATION.PROPERTY') |

               (SIZEOF(rep_types * TYPEOF(prep.representation)) =
                SIZEOF(rep_types))
                )))
        )));
END_FUNCTION; -- 10303-238: integrated_cnc_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, 'INTEGRATED_CNC_SCHEMA.'+
               'RESOURCE_PROPERTY_REPRESENTATION.PROPERTY') |

               (SIZEOF(rep_types * TYPEOF(prep.representation)) =
                SIZEOF(rep_types))
                )))
        )));
END_FUNCTION; -- 10303-238: integrated_cnc_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: integrated_cnc_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: integrated_cnc_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: integrated_cnc_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: integrated_cnc_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: integrated_cnc_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
          (('INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM'
            IN TYPEOF(it)) AND
           ('INTEGRATED_CNC_SCHEMA.NUMERIC_MEASURE'
            IN TYPEOF(it.value_component))))));
END_FUNCTION; -- 10303-238: integrated_cnc_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,
        ['INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM',
         'INTEGRATED_CNC_SCHEMA.TIME_MEASURE_WITH_UNIT']));
END_FUNCTION; -- 10303-238: integrated_cnc_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([
           'INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM',
           'INTEGRATED_CNC_SCHEMA.TIME_MEASURE_WITH_UNIT'] *
            TYPEOF(it)) = 2))));
END_FUNCTION; -- 10303-238: integrated_cnc_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,
        ['INTEGRATED_CNC_SCHEMA.MEASURE_REPRESENTATION_ITEM',
         'INTEGRATED_CNC_SCHEMA.TIME_MEASURE_WITH_UNIT']));
END_FUNCTION; -- 10303-238: integrated_cnc_schema

END_SCHEMA; -- integrated_cnc_schema
