-- AIM shortform EXPRESS of ISO/IS 10303-214:2003
--
--
-- Title: Core data for automotive mechanical design processes
-- Author:  Ullrich Pfeifer-Silberbach
--              DiK, University of Technology, Darmstadt
--              Petersenstr. 30
--              D-64287 Darmstadt
--              Telephone:  +49 6151 16 3894
--              Telefacsimile:  +49 6151 16 6854
--              Email:  ap214@dik.tu-darmstadt.de
-- Date: 2003-01-16
--
-- Information object registration: Schema identification:
-- { iso standard 10303 part(214) version(2) object(1) automotive-design-schema(2) }
--

SCHEMA automotive_design;
USE FROM ISO13584_expressions_schema   -- ISO 13584-20
  (abs_function,
   acos_function,
   and_expression,
   asin_function,
   atan_function,
   binary_boolean_expression,
   binary_function_call,
   binary_numeric_expression,
   boolean_expression,
   boolean_literal,
   boolean_variable,
   comparison_equal,
   comparison_expression,
   comparison_greater,
   comparison_greater_equal,
   comparison_less,
   comparison_less_equal,
   comparison_not_equal,
   concat_expression,
   cos_function,
   div_expression,
   equals_expression,
   exp_function,
   expression,
   format_function,
   index_expression,
   int_literal,
   int_numeric_variable,
   int_value_function,
   interval_expression,
   length_function,
   like_expression,
   literal_number,
   log10_function,
   log2_function,
   log_function,
   maximum_function,
   minimum_function,
   minus_expression,
   minus_function,
   mod_expression,
   mult_expression,
   multiple_arity_boolean_expression,
   multiple_arity_function_call,
   multiple_arity_numeric_expression,
   not_expression,
   numeric_expression,
   numeric_variable,
   odd_function,
   or_expression,
   plus_expression,
   power_expression,
   real_literal,
   real_numeric_variable,
   simple_boolean_expression,
   simple_numeric_expression,
   simple_string_expression,
   sin_function,
   slash_expression,
   square_root_function,
   string_expression,
   string_literal,
   string_variable,
   substring_expression,
   tan_function,
   unary_boolean_expression,
   unary_function_call,
   unary_numeric_expression,
   value_function,
   variable,
   xor_expression);


REFERENCE FROM ISO13584_expressions_schema   -- ISO 13584-20
 (is_SQL_mappable,
  is_int_expr,
  used_functions);

USE FROM action_schema   -- ISO 10303-41
  (action,
   action_directive,
   action_method,
   action_method_relationship,
   action_relationship,
   action_request_solution,
   action_request_status,
   action_resource,
   action_resource_type,
   action_status,
   directed_action,
   executed_action,
   versioned_action_request);

USE FROM application_context_schema   -- ISO 10303-41
  (application_context,
   application_context_element,
   application_context_relationship,
   application_protocol_definition,
   product_definition_context);

USE FROM approval_schema   -- ISO 10303-41
  (approval,
   approval_date_time,
   approval_person_organization,
   approval_relationship,
   approval_role,
   approval_status);

USE FROM basic_attribute_schema   -- ISO 10303-41
  (description_attribute,
   description_attribute_select,
   id_attribute,
   id_attribute_select,
   name_attribute,
   name_attribute_select,
   object_role,
   role_association,
   role_select);

USE FROM certification_schema   -- ISO 10303-41
  (certification,
   certification_type);

USE FROM configuration_management_schema   -- ISO 10303-44
  (configurable_item,
   configuration_design,
   configuration_effectivity,
   configuration_item);

USE FROM contract_schema   -- ISO 10303-41
  (contract,
   contract_type);

USE FROM date_time_schema   -- ISO 10303-41
  (calendar_date,
   date,
   date_and_time,
   date_role,
   date_time_role,
   event_occurrence,
   event_occurrence_context_role,
   event_occurrence_role,
   local_time,
   relative_event_occurrence,
   time_interval,
   time_interval_role,
   time_interval_with_bounds);

USE FROM document_schema   -- ISO 10303-41
  (document,
   document_product_association,
   document_relationship,
   document_representation_type,
   document_type,
   document_usage_constraint);

USE FROM draughting_element_schema   -- ISO 10303-101
  (dimension_curve,
   dimension_curve_directed_callout,
   dimension_curve_terminator,
   draughting_callout,
   draughting_callout_relationship,
   leader_curve,
   leader_directed_callout,
   leader_terminator,
   projection_curve,
   projection_directed_callout,
   terminator_symbol);

USE FROM drawing_definition_schema   -- ISO 10303-101
  (draughting_title,
   drawing_definition,
   drawing_revision,
   drawing_revision_sequence,
   drawing_sheet_revision,
   drawing_sheet_revision_usage);

USE FROM effectivity_schema   -- ISO 10303-41
  (dated_effectivity,
   effectivity,
   effectivity_relationship,
   lot_effectivity,
   serial_numbered_effectivity,
   time_interval_based_effectivity);

USE FROM external_reference_schema   -- ISO 10303-41
  (external_source,
   externally_defined_item,
   externally_defined_item_relationship,
   pre_defined_item);

USE FROM geometric_model_schema   -- ISO 10303-42
  (block,
   boolean_result,
   brep_with_voids,
   csg_solid,
   edge_based_wireframe_model,
   extruded_face_solid,
   face_based_surface_model,
   faceted_brep,
   geometric_curve_set,
   geometric_set,
   half_space_solid,
   manifold_solid_brep,
   revolved_face_solid,
   right_angular_wedge,
   right_circular_cone,
   right_circular_cylinder,
   shell_based_surface_model,
   solid_model,
   solid_replica,
   sphere,
   swept_face_solid,
   torus);

USE FROM geometry_schema   -- ISO 10303-42
  (axis1_placement,
   axis2_placement_2d,
   axis2_placement_3d,
   b_spline_curve,
   b_spline_surface,
   bounded_curve,
   bounded_surface,
   cartesian_point,
   cartesian_transformation_operator,
   cartesian_transformation_operator_2d,
   cartesian_transformation_operator_3d,
   circle,
   composite_curve,
   conic,
   conical_surface,
   curve,
   curve_bounded_surface,
   cylindrical_surface,
   degenerate_pcurve,
   degenerate_toroidal_surface,
   direction,
   elementary_surface,
   ellipse,
   geometric_representation_context,
   geometric_representation_item,
   hyperbola,
   line,
   offset_curve_2d,
   offset_curve_3d,
   offset_surface,
   oriented_surface,
   parabola,
   pcurve,
   placement,
   plane,
   point,
   point_on_curve,
   point_on_surface,
   point_replica,
   polyline,
   rectangular_composite_surface,
   rectangular_trimmed_surface,
   spherical_surface,
   surface,
   surface_curve,
   surface_of_linear_extrusion,
   surface_of_revolution,
   toroidal_surface,
   trimmed_curve);

USE FROM group_schema   -- ISO 10303-41
  (group,
   group_relationship);

USE FROM kinematic_analysis_control_and_result_schema   -- ISO 10303-105
  (configuration_definition,
   configuration_interpolation,
   interpolated_configuration_sequence,
   kinematic_analysis_consistency,
   kinematic_analysis_result,
   kinematic_control,
   resulting_path);

USE FROM kinematic_structure_schema   -- ISO 10303-105
  (cylindrical_pair,
   cylindrical_pair_range,
   cylindrical_pair_value,
   fully_constrained_pair,
   gear_pair,
   gear_pair_range,
   gear_pair_value,
   initial_state,
   kinematic_ground_representation,
   kinematic_joint,
   kinematic_link,
   kinematic_link_representation,
   kinematic_link_representation_association,
   kinematic_link_representation_relation,
   kinematic_pair,
   kinematic_property_definition,
   kinematic_property_representation_relation,
   kinematic_structure,
   mechanism,
   mechanism_base_placement,
   pair_actuator,
   pair_value,
   planar_curve_pair,
   planar_curve_pair_range,
   planar_pair,
   planar_pair_range,
   planar_pair_value,
   point_on_planar_curve_pair,
   point_on_planar_curve_pair_range,
   point_on_planar_curve_pair_value,
   point_on_surface_pair,
   point_on_surface_pair_range,
   point_on_surface_pair_value,
   prismatic_pair,
   prismatic_pair_range,
   prismatic_pair_value,
   rack_and_pinion_pair,
   rack_and_pinion_pair_range,
   rack_and_pinion_pair_value,
   revolute_pair,
   revolute_pair_range,
   revolute_pair_value,
   rolling_curve_pair,
   rolling_curve_pair_value,
   rolling_surface_pair,
   rolling_surface_pair_value,
   screw_pair,
   screw_pair_range,
   screw_pair_value,
   simple_pair_range,
   sliding_curve_pair,
   sliding_curve_pair_value,
   sliding_surface_pair,
   sliding_surface_pair_value,
   spherical_pair,
   spherical_pair_range,
   spherical_pair_value,
   surface_pair,
   surface_pair_range,
   unconstrained_pair,
   unconstrained_pair_value,
   universal_pair,
   universal_pair_range,
   universal_pair_value,
   unlimited_range);

USE FROM management_resources_schema   -- ISO 10303-41
  (action_assignment,
   action_request_assignment,
   approval_assignment,
   attribute_classification_assignment,
   attribute_value_assignment,
   attribute_value_role,
   certification_assignment,
   classification_assignment,
   classification_role,
   contract_assignment,
   date_and_time_assignment,
   date_assignment,
   document_reference,
   document_usage_constraint_assignment,
   document_usage_role,
   effectivity_assignment,
   effectivity_context_assignment,
   effectivity_context_role,
   event_occurrence_assignment,
   event_occurrence_context_assignment,
   external_identification_assignment,
   group_assignment,
   identification_assignment,
   identification_role,
   name_assignment,
   organization_assignment,
   organizational_project_assignment,
   organizational_project_role,
   person_and_organization_assignment,
   security_classification_assignment,
   time_interval_assignment);

USE FROM material_property_definition_schema   -- ISO 10303-45
  (material_designation,
   material_designation_characterization,
   material_property,
   property_definition_relationship);

USE FROM material_property_representation_schema   -- ISO 10303-45
  (data_environment,
   material_property_representation);

USE FROM measure_schema   -- ISO 10303-41
  (amount_of_substance_measure,
   amount_of_substance_measure_with_unit,
   amount_of_substance_unit,
   area_measure,
   area_measure_with_unit,
   area_unit,
   celsius_temperature_measure,
   celsius_temperature_measure_with_unit,
   context_dependent_measure,
   context_dependent_unit,
   conversion_based_unit,
   count_measure,
   derived_unit,
   descriptive_measure,
   electric_current_measure,
   electric_current_measure_with_unit,
   electric_current_unit,
   global_unit_assigned_context,
   length_measure,
   length_measure_with_unit,
   length_unit,
   luminous_intensity_measure,
   luminous_intensity_measure_with_unit,
   luminous_intensity_unit,
   mass_measure,
   mass_measure_with_unit,
   mass_unit,
   measure_with_unit,
   named_unit,
   numeric_measure,
   parameter_value,
   plane_angle_measure,
   plane_angle_measure_with_unit,
   plane_angle_unit,
   positive_length_measure,
   positive_plane_angle_measure,
   positive_ratio_measure,
   ratio_measure,
   ratio_measure_with_unit,
   ratio_unit,
   si_unit,
   solid_angle_measure,
   solid_angle_measure_with_unit,
   solid_angle_unit,
   thermodynamic_temperature_measure,
   thermodynamic_temperature_measure_with_unit,
   thermodynamic_temperature_unit,
   time_measure,
   time_measure_with_unit,
   time_unit,
   volume_measure,
   volume_measure_with_unit,
   volume_unit);

USE FROM person_organization_schema   -- ISO 10303-41
  (address,
   organization,
   organization_relationship,
   organization_role,
   organizational_address,
   organizational_project,
   organizational_project_relationship,
   person,
   person_and_organization,
   person_and_organization_role,
   personal_address);

USE FROM presentation_appearance_schema   -- ISO 10303-46
  (approximation_tolerance,
   approximation_tolerance_deviation,
   approximation_tolerance_parameter,
   context_dependent_over_riding_styled_item,
   curve_style,
   curve_style_font,
   curve_style_rendering,
   curve_tolerance_deviation,
   curve_tolerance_parameter,
   externally_defined_curve_font,
   externally_defined_hatch_style,
   externally_defined_style,
   externally_defined_tile_style,
   fill_area_style,
   fill_area_style_colour,
   fill_area_style_hatching,
   fill_area_style_tiles,
   invisibility,
   null_style,
   over_riding_styled_item,
   point_style,
   pre_defined_curve_font,
   pre_defined_marker,
   pre_defined_presentation_style,
   presentation_style_assignment,
   presentation_style_by_context,
   styled_item,
   surface_side_style,
   surface_style_boundary,
   surface_style_control_grid,
   surface_style_fill_area,
   surface_style_parameter_line,
   surface_style_reflectance_ambient,
   surface_style_reflectance_ambient_diffuse,
   surface_style_reflectance_ambient_diffuse_specular,
   surface_style_rendering,
   surface_style_rendering_with_properties,
   surface_style_segmentation_curve,
   surface_style_silhouette,
   surface_style_transparent,
   surface_style_usage,
   symbol_style,
   text_style,
   text_style_with_box_characteristics,
   text_style_with_mirror,
   surface_tolerance_deviation,
   surface_tolerance_parameter,
   u_direction_count,
   v_direction_count);

USE FROM presentation_definition_schema   -- ISO 10303-46
  (annotation_curve_occurrence,
   annotation_fill_area,
   annotation_fill_area_occurrence,
   annotation_occurrence,
   annotation_occurrence_relationship,
   annotation_symbol,
   annotation_symbol_occurrence,
   annotation_text,
   annotation_text_character,
   annotation_text_occurrence,
   composite_text,
   composite_text_with_associated_curves,
   composite_text_with_blanking_box,
   composite_text_with_extent,
   defined_character_glyph,
   defined_symbol,
   externally_defined_character_glyph,
   externally_defined_symbol,
   pre_defined_symbol,
   symbol_representation,
   symbol_representation_map,
   text_literal,
   text_literal_with_associated_curves,
   text_literal_with_blanking_box,
   text_literal_with_delineation,
   text_literal_with_extent,
   text_string_representation);

USE FROM presentation_organization_schema   -- ISO 10303-46
  (area_in_set,
   camera_image,
   camera_model,
   camera_model_d2,
   camera_model_d3,
   camera_model_d3_with_hlhsr,
   camera_usage,
   light_source,
   light_source_ambient,
   light_source_directional,
   light_source_positional,
   light_source_spot,
   presentation_area,
   presentation_layer_assignment,
   presentation_representation,
   presentation_set,
   presentation_size,
   presentation_view,
   presented_item,
   presented_item_representation,
   view_volume);

REFERENCE FROM presentation_organization_schema    -- ISO 10303-46
   (aspect_ratio);

USE FROM presentation_resource_schema   -- ISO 10303-46
  (character_glyph_symbol,
   colour,
   colour_rgb,
   colour_specification,
   externally_defined_text_font,
   planar_box,
   planar_extent,
   pre_defined_colour,
   pre_defined_text_font,
   draughting_pre_defined_text_font);

USE FROM process_property_representation_schema   -- ISO 10303-49
  (action_property_representation,
   resource_property_representation);

USE FROM process_property_schema   -- ISO 10303-49
  (action_property,
   action_resource_requirement,
   process_product_association,
   process_property_association,
   product_definition_process,
   property_process,
   requirement_for_action_resource,
   resource_property,
   resource_requirement_type);

USE FROM product_concept_schema   -- ISO 10303-44
  (concept_feature_operator,
   concept_feature_relationship,
   concept_feature_relationship_with_condition,
   conditional_concept_feature,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_relationship);

USE FROM product_definition_schema   -- ISO 10303-41
  (product,
   product_category,
   product_category_relationship,
   product_definition,
   product_definition_context_association,
   product_definition_context_role,
   product_definition_effectivity,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_formation_with_specified_source,
   product_definition_relationship,
   product_definition_substitute,
   product_definition_with_associated_documents,
   product_related_product_category);

USE FROM product_property_definition_schema   -- ISO 10303-41
  (characterized_object,
   general_property,
   general_property_association,
   general_property_relationship,
   product_definition_shape,
   property_definition,
   shape_aspect,
   shape_aspect_relationship);

REFERENCE FROM product_property_definition_schema   -- ISO 10303-41
  (get_shape_aspects);

USE FROM product_property_representation_schema   -- ISO 10303-41
  (context_dependent_shape_representation,
   property_definition_representation,
   shape_definition_representation,
   shape_representation,
   shape_representation_relationship);

REFERENCE FROM product_property_representation_schema   -- ISO 10303-41
  (get_property_definition_representations);

USE FROM product_structure_schema   -- ISO 10303-44
  (alternate_product_relationship,
   assembly_component_usage,
   assembly_component_usage_substitute,
   make_from_usage_option,
   next_assembly_usage_occurrence,
   product_definition_occurrence_relationship,
   product_definition_usage,
   promissory_usage_occurrence,
   quantified_assembly_component_usage,
   specified_higher_usage_occurrence);

USE FROM qualified_measure_schema   -- ISO 10303-45
  (descriptive_representation_item,
   measure_qualification,
   measure_representation_item,
   precision_qualifier,
   qualified_representation_item,
   standard_uncertainty,
   type_qualifier,
   uncertainty_qualifier);

USE FROM representation_schema   -- ISO 10303-43
  (compound_representation_item,
   founded_item,
   functionally_defined_transformation,
   global_uncertainty_assigned_context,
   item_defined_transformation,
   list_representation_item,
   mapped_item,
   representation,
   representation_context,
   representation_item,
   representation_map,
   representation_relationship,
   representation_relationship_with_transformation,
   set_representation_item,
   uncertainty_assigned_representation,
   uncertainty_measure_with_unit,
   value_representation_item);

REFERENCE FROM representation_schema   -- ISO 10303-43
  (using_representations);

USE FROM security_classification_schema   -- ISO 10303-41
  (security_classification,
   security_classification_level);

USE FROM shape_aspect_definition_schema   -- ISO 10303-47
  (apex,
   centre_of_symmetry,
   composite_shape_aspect,
   datum,
   datum_feature,
   datum_reference,
   datum_target,
   derived_shape_aspect,
   extension,
   geometric_alignment,
   geometric_intersection,
   limit_condition,
   parallel_offset,
   perpendicular_to,
   referenced_modified_datum,
   shape_aspect_deriving_relationship,
   tangent);

USE FROM shape_dimension_schema   -- ISO 10303-47
  (angular_location,
   angular_size,
   dimensional_characteristic_representation,
   dimensional_location,
   dimensional_location_with_path,
   dimensional_size,
   dimensional_size_with_path,
   shape_dimension_representation);

USE FROM shape_tolerance_schema   -- ISO 10303-47
  (geometric_tolerance,
   geometric_tolerance_relationship,
   geometric_tolerance_with_datum_reference,
   geometric_tolerance_with_defined_unit,
   limits_and_fits,
   modified_geometric_tolerance,
   plus_minus_tolerance,
   projected_zone_definition,
   runout_zone_definition,
   runout_zone_orientation,
   tolerance_value,
   tolerance_zone,
   tolerance_zone_definition,
   tolerance_zone_form);

USE FROM support_resource_schema   -- ISO 10303-41
  (label,
   identifier);

REFERENCE FROM support_resource_schema   -- ISO 10303-41
  (bag_to_set,
   type_check_function);

USE FROM topology_schema   -- ISO 10303-42
  (closed_shell,
   connected_edge_set,
   connected_face_set,
   connected_face_sub_set,
   edge,
   edge_curve,
   edge_loop,
   face,
   face_bound,
   face_outer_bound,
   face_surface,
   loop,
   open_shell,
   oriented_closed_shell,
   oriented_edge,
   oriented_face,
   path,
   poly_loop,
   seam_edge,
   subedge,
   subface,
   topological_representation_item,
   vertex,
   vertex_loop,
   vertex_point);

USE FROM ISO13584_generic_expressions_schema;   -- ISO 13584-20

USE FROM aic_advanced_brep;   -- ISO 10303-514

USE FROM aic_associative_draughting_elements;   -- ISO 10303-520

USE FROM aic_csg;   -- ISO 10303-515

USE FROM aic_draughting_annotation;   -- ISO 10303-504

USE FROM aic_draughting_elements;   -- ISO 10303-506

USE FROM aic_edge_based_wireframe;   -- ISO 10303-501

USE FROM aic_faceted_brep;   -- ISO 10303-512

USE FROM aic_geometric_tolerances;   -- ISO 10303-519

USE FROM aic_geometrically_bounded_2d_wireframe;   -- ISO 10303-503

USE FROM aic_geometrically_bounded_surface;   -- ISO 10303-507

USE FROM aic_geometrically_bounded_wireframe;   -- ISO 10303-510

USE FROM aic_manifold_subsurface;   -- ISO 10303-521

USE FROM aic_manifold_surface;   -- ISO 10303-509

USE FROM aic_mechanical_design_geometric_presentation;   -- ISO 10303-517

USE FROM aic_non_manifold_surface;   -- ISO 10303-508

USE FROM aic_topologically_bounded_surface;   -- ISO 10303-511

-- GL - new USE FROMs in order to take entities from stepmod
(* Not use this one for now
USE FROM aic_drawing_structure_and_administration(
	draughting_specification_reference,
	specified_item);
*)
USE FROM Activity_mim(
	applied_action_assignment);

USE FROM Approval_mim(
	applied_approval_assignment,
	approval_item);

-- TODO USE FROM Camera_view_3d_mim(
-- TODO	camera_image_2d_with_scale);

USE FROM Certification_mim(
	applied_certification_assignment,
	certification_item);

USE FROM Classification_assignment_mim(
	applied_classification_assignment,
	classification_item);

USE FROM classification_schema(
	class);

USE FROM Classification_with_attributes_mim(
	characterized_class,
	class_system);

USE FROM Compound_shape_representation_mim(
    compound_shape_representation);

USE FROM Construction_geometry_mim(
	constructive_geometry_representation,
	constructive_geometry_representation_relationship);

USE FROM Contract_mim(
	applied_contract_assignment,
	contract_item);

USE FROM Curve_appearance_mim(
	pre_defined_point_marker_symbol,
	pre_defined_terminator_symbol,
	vector_style);
	
USE FROM Date_time_assignment_mim(
	applied_date_and_time_assignment,
	applied_date_assignment,
	date_and_time_item,
	date_item);

USE FROM Default_tolerance_mim(
	default_tolerance_table,
	default_tolerance_table_cell);

USE FROM Dimension_tolerance_mim(
	directed_dimensional_location);

USE FROM Document_assignment_mim(
	applied_document_reference,
	applied_document_usage_constraint_assignment,
	document_product_equivalence,
	document_reference_item);

USE FROM Draughting_element_specialisations_mim(
	surface_condition_callout);

USE FROM Draughting_annotation_mim(
	pre_defined_dimension_symbol,
	pre_defined_geometrical_tolerance_symbol,
	pre_defined_surface_condition_symbol);

USE FROM Effectivity_application_mim(
	applied_effectivity_assignment,
	effectivity_item);

USE FROM Event_assignment_mim(
	applied_event_occurrence_assignment,
	event_occurrence_item);

USE FROM Extended_measure_representation_mim(
	value_range);

USE FROM External_class_mim(
	externally_defined_class);

USE FROM External_item_identification_assignment_mim(
	applied_external_identification_assignment,
	external_identification_item);

USE FROM External_properties_mim(
	externally_defined_general_property);

USE FROM Feature_and_connection_zone_mim(
	location_shape_representation);

USE FROM File_identification_mim(
	document_file);

USE FROM Generic_material_aspects_mim(
	general_material_property);

USE FROM Geometric_tolerance_mim(
	placed_datum_target_feature,
	shape_representation_with_parameters);

USE FROM Group_mim(
	applied_group_assignment);

USE FROM Camera_view_3d_mim(
	hidden_element_over_riding_styled_item);

USE FROM Identification_assignment_mim(
	applied_identification_assignment,
	identification_item);

USE FROM Inertia_characteristics_mim(
	moments_of_inertia_representation);

USE FROM Layer_assignment_mim(
	rep_item_group);

USE FROM Multi_linguism_mim(
	attribute_language_item,
	attribute_language_assignment,
	language,
	multi_language_attribute_assignment,
	multi_language_attribute_item);

USE FROM Name_assignment_mim(
	applied_name_assignment,
	name_item);

USE FROM Person_organization_mim(
	person_and_organization_address);

USE FROM Person_organization_assignment_mim(
	applied_organization_assignment,
	applied_person_and_organization_assignment,
	organization_item,
	person_and_organization_item);

USE FROM Plib_class_reference_mim(
	known_source);

USE FROM Presentation_hierarchy_mim(
	applied_presented_item,
	presented_item_select);

USE FROM Product_class_mim(
	category_usage_item,
	exclusive_product_concept_feature_category,
	inclusion_product_concept_feature,
	package_product_concept_feature,
	product_class,
	product_concept_feature_category,
	product_concept_feature_category_usage);

USE FROM Project_mim(
	applied_organizational_project_assignment);

USE FROM Security_classification_mim(
	applied_security_classification_assignment,
	security_classification_item);

USE FROM Shape_feature_mim(
	instanced_feature,
	placed_feature);

USE FROM Specification_based_configuration_mim(
	configured_effectivity_assignment,
	configured_effectivity_context_assignment,
	configured_effectivity_context_item,
	configured_effectivity_item);

USE FROM Specification_control_mim(
	class_usage_effectivity_context_assignment,
	class_usage_effectivity_context_item);

USE FROM Specified_product_mim(
	product_identification,
	product_specification);

USE FROM Surface_conditions_mim(
	contact_ratio_representation,
	hardness_representation,
--	physically_modelled_product_definition,
	surface_texture_representation,
	tactile_appearance_representation,
	visual_appearance_representation);

USE FROM Time_interval_assignment_mim(
	applied_time_interval_assignment,
	time_interval_item);
	
USE FROM Value_with_unit_extension_mim(
	expression_conversion_based_unit);

USE FROM Work_request_mim(
	applied_action_request_assignment,
	action_request_item);

TYPE action_item = SELECT
  (action,
   action_directive,
   action_method,
   action_property,
   action_relationship,
   action_request_solution,
   alternate_product_relationship,
   applied_action_assignment,
   applied_classification_assignment,
   applied_person_and_organization_assignment,
   approval_status,
   assembly_component_usage_substitute,
   certification,
   class,
   class_system,
   configuration_design,
   configuration_effectivity,
   configuration_item,
   configured_effectivity_assignment,
   contract,
   document_file,
   draughting_model,
   drawing_revision,
   executed_action,
   general_property,
   material_designation,
   mechanical_design_geometric_presentation_representation,
   organization_relationship,
   organizational_project,
   person_and_organization,
   presentation_area,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_feature_category,
   product_concept_feature_category_usage,
   product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   product_definition_substitute,
   property_definition,
   requirement_for_action_resource,
   resource_property,
   security_classification,
   security_classification_level,
   shape_aspect,
   shape_representation,
   versioned_action_request);
END_TYPE;

TYPE automotive_design_action_request_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON action_request_item WITH 
  (action,
   action_method,
   action_property,
   action_relationship,
   alternate_product_relationship,
   assembly_component_usage_substitute,
   configuration_design,
   configuration_effectivity,
   configuration_item,
   configured_effectivity_assignment,
   document_file,
   draughting_model,
   drawing_revision,
   general_property,
   material_designation,
   mechanical_design_geometric_presentation_representation,
   presentation_area,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_feature_category,
   product_concept_feature_category_usage,
   product_definition,
   product_definition_formation,
   product_definition_relationship,
   product_definition_substitute,
   property_definition,
   resource_property,
   shape_aspect,
   shape_representation);
END_TYPE;

TYPE automotive_design_approval_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON approval_item WITH 
  (action,
   action_directive,
   action_property,
   action_request_solution,
   alternate_product_relationship,
   applied_action_assignment,
   applied_classification_assignment,
   assembly_component_usage_substitute,
   certification,
   class,
   class_system,
   configuration_design,
   configuration_effectivity,
   configured_effectivity_assignment,
   contract,
   document_file,
   draughting_model,
   drawing_revision,
   executed_action,
   general_property,
   material_designation,
   mechanical_design_geometric_presentation_representation,
   organizational_project,
   presentation_area,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_feature_category,
   product_concept_feature_category_usage,
   product_definition,
   product_definition_formation,
   product_definition_relationship,
   product_definition_substitute,
   property_definition,
   resource_property,
   shape_representation,
   versioned_action_request);
END_TYPE;

TYPE automotive_design_attribute_language_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON attribute_language_item WITH 
  (action,
   action_directive,
   action_method,
   action_property,
   action_relationship,
   alternate_product_relationship,
   application_context,
   approval_relationship,
   assembly_component_usage_substitute,
   attribute_value_assignment,
   certification,
   configuration_design,
   configuration_item,
   contract,
   data_environment,
   date_role,
   date_time_role,
   descriptive_representation_item,
   document_relationship,
   draughting_title,
   effectivity,
   effectivity_relationship,
   event_occurrence,
   external_source,
   general_property,
   general_property_relationship,
   geometric_representation_item,
   geometric_tolerance,
   group,
   group_relationship,
   identification_role,
   kinematic_pair,
   mapped_item,
   name_assignment,
   organization_relationship,
   organization_role,
   organizational_project,
   organizational_project_relationship,
   pair_actuator,
   person_and_organization_role,
   presentation_layer_assignment,
   process_product_association,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_relationship,
   product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   product_definition_substitute,
   product_related_product_category,
   property_definition,
   property_definition_relationship,
   representation,
   representation_relationship,
   requirement_for_action_resource,
   resource_property,
   resource_requirement_type,
   security_classification,
   shape_aspect,
   shape_aspect_relationship,
   styled_item,
   time_interval_role,
   topological_representation_item,
   uncertainty_measure_with_unit,
   uncertainty_qualifier,
   versioned_action_request);
END_TYPE;
(* Reuse from Product_class_mim
TYPE category_usage_item = SELECT
  (product_class);
END_TYPE;
*)
TYPE automotive_design_certification_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON certification_item WITH 
  (product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship);
END_TYPE;

TYPE automotive_design_classification_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON classification_item WITH 
  (action,
   action_directive,
   action_method,
   action_property,
   action_relationship,
   approval_status,
   class,
   configuration_item,
   contract,
   document_file,
   document_type,
   executed_action,
   feature_definition,
   general_feature,
   general_property,
   material_designation,
   organizational_project,
   planar_extent,
   plus_minus_tolerance,
   process_operation,
   product,
   product_concept,
   product_concept_feature_category,
   product_definition,
   product_definition_formation,
   product_definition_relationship,
   property_definition,
   resource_property,
   security_classification_level,
   shape_aspect,
   versioned_action_request);
END_TYPE;
(* Reuse from Specification_control_mim
TYPE class_usage_effectivity_context_item = SELECT
  (product_definition);
END_TYPE;
*)
(* Reuse from Specification_based_configuration_mim
TYPE configured_effectivity_context_item = SELECT
  (product_concept_feature_association);
END_TYPE;
*)
TYPE automotive_design_configured_effectivity_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON configured_effectivity_item WITH 
  (action_relationship,
   process_plan,
   product_definition,
   product_process_plan);
END_TYPE;

TYPE automotive_design_contract_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON contract_item WITH 
  (drawing_revision,
   executed_action,
   product_definition_formation);
END_TYPE;

TYPE automotive_design_date_and_time_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON date_and_time_item WITH 
  (action,
   action_directive,
   action_method,
   action_property,
   action_relationship,
   action_request_solution,
   alternate_product_relationship,
   applied_action_assignment,
   applied_classification_assignment,
   applied_organization_assignment,
   applied_person_and_organization_assignment,
   approval_person_organization,
   approval_status,
   assembly_component_usage_substitute,
   certification,
   class,
   class_system,
   configuration_design,
   configuration_item,
   configured_effectivity_assignment,
   contract,
   document_file,
   draughting_model,
   drawing_revision,
   effectivity,
   event_occurrence,
   executed_action,
   general_property,
   material_designation,
   mechanical_design_geometric_presentation_representation,
   organization_relationship,
   organizational_project,
   person_and_organization,
   presentation_area,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_feature_category,
   product_concept_feature_category_usage,
   product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   product_definition_substitute,
   property_definition,
   requirement_for_action_resource,
   resource_property,
   security_classification,
   security_classification_level,
   shape_representation,
   versioned_action_request);
END_TYPE;

TYPE automotive_design_date_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON date_item WITH 
  (action,
   action_directive,
   action_method,
   action_property,
   action_relationship,
   action_request_solution,
   alternate_product_relationship,
   applied_action_assignment,
   applied_classification_assignment,
   applied_organization_assignment,
   applied_person_and_organization_assignment,
   approval_person_organization,
   approval_status,
   assembly_component_usage_substitute,
   certification,
   class,
   class_system,
   configuration_design,
   configuration_item,
   configured_effectivity_assignment,
   contract,
   document_file,
   draughting_model,
   drawing_revision,
   effectivity,
   event_occurrence,
   executed_action,
   general_property,
   material_designation,
   mechanical_design_geometric_presentation_representation,
   organization_relationship,
   organizational_project,
   person_and_organization,
   presentation_area,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_feature_category,
   product_concept_feature_category_usage,
   product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   product_definition_substitute,
   property_definition,
   requirement_for_action_resource,
   resource_property,
   security_classification,
   security_classification_level,
   shape_representation,
   versioned_action_request);
END_TYPE;

TYPE automotive_design_document_reference_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON document_reference_item WITH 
  (action_directive,
   action_method,
   action_relationship,
   applied_action_assignment,
   approval,
   certification,
   class,
   class_system,
   configuration_design,
   configuration_item,
   contract,
   descriptive_representation_item,
   executed_action,
   feature_definition,
   general_property,
   material_designation,
   organization,
   organizational_project,
   person,
   presentation_area,
   process_plan,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_category,
   product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_process,
   product_definition_relationship,
   product_definition_substitute,
   product_related_product_category,
   property_definition,
   representation,
   resource_requirement_type,
   retention,
   security_classification,
   shape_aspect,
   shape_aspect_relationship,
   versioned_action_request);
END_TYPE;

TYPE automotive_design_effectivity_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON effectivity_item WITH 
  (action,
   action_method,
   action_method_relationship,
   action_property,
   action_relationship,
   assembly_component_usage_substitute,
   class_system,
   configuration_design,
   configuration_item,
   configured_effectivity_assignment,
   document_file,
   draughting_model,
   drawing_revision,
   general_property,
   material_designation,
   mechanical_design_geometric_presentation_representation,
   presentation_area,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_feature_category,
   product_concept_feature_category_usage,
   product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   product_definition_substitute,
   property_definition,
   requirement_for_action_resource,
   resource_property,
   security_classification,
   shape_aspect,
   shape_representation);
END_TYPE;

TYPE automotive_design_event_occurrence_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON event_occurrence_item WITH 
  (action,
   action_directive,
   action_method,
   action_property,
   action_relationship,
   action_request_solution,
   alternate_product_relationship,
   applied_action_assignment,
   applied_classification_assignment,
   applied_person_and_organization_assignment,
   approval_status,
   assembly_component_usage_substitute,
   certification,
   class,
   class_system,
   configuration_design,
   configuration_effectivity,
   configuration_item,
   configured_effectivity_assignment,
   contract,
   document_file,
   draughting_model,
   drawing_revision,
   executed_action,
   general_property,
   material_designation,
   mechanical_design_geometric_presentation_representation,
   organization_relationship,
   organizational_project,
   person_and_organization,
   presentation_area,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_feature_category,
   product_concept_feature_category_usage,
   product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   product_definition_substitute,
   property_definition,
   requirement_for_action_resource,
   resource_property,
   security_classification,
   security_classification_level,
   shape_representation,
   versioned_action_request);
END_TYPE;

TYPE automotive_design_external_identification_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON external_identification_item WITH 
  (document_file,
   externally_defined_class,
   externally_defined_general_property,
   product_definition);
END_TYPE;

TYPE group_item = SELECT
  (geometric_representation_item,
   mapped_item,
   product_concept_feature,
   shape_aspect,
   styled_item,
   topological_representation_item);
END_TYPE;

TYPE automotive_design_identification_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON identification_item WITH 
  (action,
   action_directive,
   action_method,
   action_property,
   applied_identification_assignment,
   approval_status,
   class,
   class_system,
   configuration_item,
   dimensional_size,
   document_file,
   document_type,
   draughting_model,
   effectivity,
   general_property,
   measure_representation_item,
   mechanical_design_geometric_presentation_representation,
   organization,
   person_and_organization,
   presentation_area,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_category,
   product_definition,
   product_definition_formation,
   product_definition_relationship,
   property_definition,
   property_definition_relationship,
   security_classification_level,
   shape_aspect_relationship,
   shape_representation);
END_TYPE;

TYPE language_item = SELECT
  (representation);
END_TYPE;

TYPE automotive_design_multi_language_attribute_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON multi_language_attribute_item WITH 
  (action,
   action_directive,
   action_method,
   action_property,
   action_relationship,
   alternate_product_relationship,
   application_context,
   approval_relationship,
   assembly_component_usage_substitute,
   certification,
   configuration_design,
   configuration_item,
   contract,
   data_environment,
   date_role,
   date_time_role,
   descriptive_representation_item,
   document_relationship,
   draughting_title,
   effectivity,
   effectivity_relationship,
   event_occurrence,
   external_source,
   general_property,
   general_property_relationship,
   geometric_representation_item,
   geometric_tolerance,
   group,
   group_relationship,
   identification_role,
   kinematic_pair,
   mapped_item,
   name_assignment,
   organization_relationship,
   organization_role,
   organizational_project,
   organizational_project_relationship,
   pair_actuator,
   person_and_organization_role,
   presentation_layer_assignment,
   process_product_association,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_relationship,
   product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   product_definition_substitute,
   product_related_product_category,
   property_definition,
   property_definition_relationship,
   representation,
   representation_relationship,
   requirement_for_action_resource,
   resource_property,
   resource_requirement_type,
   security_classification,
   shape_aspect,
   shape_aspect_relationship,
   styled_item,
   time_interval_role,
   topological_representation_item,
   uncertainty_measure_with_unit,
   uncertainty_qualifier,
   versioned_action_request);
END_TYPE;

TYPE automotive_design_name_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON name_item WITH 
  (kinematic_joint,
   kinematic_link,
   kinematic_structure);
END_TYPE;

TYPE organizational_project_item = SELECT
  (configuration_item,
  executed_action,
  product,
   product_concept,
   product_definition,
   product_definition_formation
   );
END_TYPE;

TYPE automotive_design_organization_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON organization_item WITH 
  (action,
   action_directive,
   action_method,
   action_property,
   action_relationship,
   action_request_solution,
   alternate_product_relationship,
   applied_action_assignment,
   applied_classification_assignment,
   applied_identification_assignment,
   applied_organization_assignment,
   applied_person_and_organization_assignment,
   approval,
   approval_status,
   assembly_component_usage_substitute,
   certification,
   class,
   class_system,
   configuration_design,
   configuration_effectivity,
   configuration_item,
   configured_effectivity_assignment,
   contract,
   document_file,
   draughting_model,
   drawing_revision,
   effectivity,
   event_occurrence,
   executed_action,
   general_property,
   material_designation,
   mechanical_design_geometric_presentation_representation,
   organization_relationship,
   organizational_project,
   person_and_organization,
   presentation_area,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_feature_category,
   product_concept_feature_category_usage,
   product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   product_definition_substitute,
   property_definition,
   requirement_for_action_resource,
   resource_property,
   security_classification,
   security_classification_level,
   shape_representation,
   versioned_action_request);
END_TYPE;

TYPE automotive_design_person_and_organization_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON person_and_organization_item WITH 
  (action,
   action_directive,
   action_method,
   action_property,
   action_relationship,
   action_request_solution,
   alternate_product_relationship,
   applied_action_assignment,
   applied_classification_assignment,
   applied_organization_assignment,
   applied_person_and_organization_assignment,
   approval_status,
   assembly_component_usage_substitute,
   certification,
   class,
   class_system,
   configuration_design,
   configuration_effectivity,
   configuration_item,
   configured_effectivity_assignment,
   contract,
   document_file,
   draughting_model,
   drawing_revision,
   event_occurrence,
   executed_action,
   general_property,
   material_designation,
   mechanical_design_geometric_presentation_representation,
   organization_relationship,
   organizational_project,
   person_and_organization,
   presentation_area,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_feature_category,
   product_concept_feature_category_usage,
   product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   product_definition_substitute,
   property_definition,
   requirement_for_action_resource,
   resource_property,
   security_classification,
   security_classification_level,
   shape_representation,
   versioned_action_request);
END_TYPE;

TYPE automotive_design_presented_item_select = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON presented_item_select WITH 
  (action,
   action_method,
   action_relationship,
   product_concept,
   product_concept_feature,
   product_concept_feature_category,
   product_definition,
   product_definition_formation,
   product_definition_relationship);
END_TYPE;

TYPE automotive_design_security_classification_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON security_classification_item WITH 
  (action,
   action_directive,
   action_property,
   applied_action_assignment,
   assembly_component_usage_substitute,
   class_system,
   configuration_design,
   configuration_effectivity,
   configured_effectivity_assignment,
   document_file,
   draughting_model,
   drawing_revision,
   executed_action,
   general_property,
   material_designation,
   mechanical_design_geometric_presentation_representation,
   organizational_project,
   presentation_area,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_category,
   product_definition,
   product_definition_formation,
   product_definition_relationship,
   property_definition,
   resource_property,
   shape_representation,
   versioned_action_request);
END_TYPE;
(* Reuse from aic_drawing_structure_and_administration - NOT USE IT FOR NOW *)
TYPE specified_item = SELECT
  (drawing_revision);
END_TYPE;

TYPE automotive_design_time_interval_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON time_interval_item WITH 
  (action,
   action_directive,
   action_method,
   action_property,
   action_relationship,
   action_request_solution,
   alternate_product_relationship,
   applied_action_assignment,
   applied_classification_assignment,
   applied_person_and_organization_assignment,
   approval_status,
   assembly_component_usage_substitute,
   certification,
   class,
   class_system,
   configuration_design,
   configuration_effectivity,
   configuration_item,
   configured_effectivity_assignment,
   contract,
   document_file,
   draughting_model,
   drawing_revision,
   executed_action,
   general_property,
   material_designation,
   mechanical_design_geometric_presentation_representation,
   organization_relationship,
   organizational_project,
   person_and_organization,
   presentation_area,
   product,
   product_concept,
   product_concept_feature,
   product_concept_feature_association,
   product_concept_feature_category,
   product_concept_feature_category_usage,
   product_definition,
   product_definition_formation,
   product_definition_formation_relationship,
   product_definition_relationship,
   product_definition_substitute,
   property_definition,
   requirement_for_action_resource,
   resource_property,
   security_classification,
   security_classification_level,
   shape_representation,
   versioned_action_request);
END_TYPE;
(* Reuse from Activity_mim
ENTITY applied_action_assignment
  SUBTYPE OF (action_assignment);
  items : SET [1:?] OF action_item;
END_ENTITY;
*)
(* Reuse from Work_request_mim
ENTITY applied_action_request_assignment
  SUBTYPE OF (action_request_assignment);
  items : SET [1:?] OF action_request_item;
END_ENTITY;
*)
(* Reuse from Approval_mim
ENTITY applied_approval_assignment
  SUBTYPE OF (approval_assignment);
  items : SET [1:?] OF approval_item;
END_ENTITY;
*)

(** TODO - find out where to move it *)
ENTITY camera_image_2d_with_scale
  SUBTYPE OF (camera_image);
DERIVE
  scale : positive_ratio_measure := (SELF\mapped_item.mapping_target\planar_extent.size_in_x);
WHERE
  WR1: ('PRESENTATION_ORGANIZATION_SCHEMA.CAMERA_MODEL_D2' IN TYPEOF(SELF\mapped_item.mapping_source.mapping_origin));
  WR2: aspect_ratio (SELF\mapped_item.mapping_target) = aspect_ratio (SELF\mapped_item.mapping_source.mapping_origin\camera_model_d2.view_window);
  WR3: SELF\mapped_item.mapping_source.mapping_origin\camera_model_d2.view_window_clipping;
END_ENTITY;


ENTITY applied_area
  SUBTYPE OF (shape_aspect);
WHERE
 WR1: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND {2<= SIZEOF ( pdr.
     used_representation.items ) <=3} ) ) =1;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | NOT ( i.name IN ['orientation'
     , 'effective length' , 'maximum length' ] ) ) ) >0 ) ) )
     =0;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='orientation' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'PLACEMENT' IN TYPEOF ( i ) ) ) ) =1
     ) ) ) =1;
 WR5: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'effective length' )
     AND ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1;
 WR6: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'effective length' )
     AND ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1;
 WR7: SIZEOF ( QUERY ( sar <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATING_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'applied area usage' ) AND ( (
     'AUTOMOTIVE_DESIGN.'+ 'THREAD' IN TYPEOF ( sar.
     relating_shape_aspect.of_shape. definition ) ) OR ( (
     'AUTOMOTIVE_DESIGN.'+
     'EXTERNALLY_DEFINED_FEATURE_DEFINITION' IN TYPEOF ( sar.
     relating_shape_aspect.of_shape. definition ) ) AND ( sar.
     relating_shape_aspect.of_shape.
     definition\externally_defined_item. item_id =
     'external thread' ) AND ( sar.
     relating_shape_aspect.of_shape.
     definition\externally_defined_item. source.source_id =
     'external thread specification' ) ) ) AND ( sar.
     relating_shape_aspect.of_shape. definition.description =
     'partial area occurrence' ) ) ) =1;
END_ENTITY;
(* Reuse from Certification_mim
ENTITY applied_certification_assignment
  SUBTYPE OF (certification_assignment);
  items : SET [1:?] OF certification_item;
END_ENTITY;
*)
(* Reuse from Classification_assignment_mim
ENTITY applied_classification_assignment
  SUBTYPE OF (classification_assignment);
  items : SET [1:?] OF classification_item;
WHERE
 WR1: NOT ( 'AUTOMOTIVE_DESIGN.'+ 'CLASS' IN TYPEOF (
     SELF.assigned_class ) ) OR ( SIZEOF ( QUERY ( i <*
     SELF.items | SIZEOF ( ['AUTOMOTIVE_DESIGN.'+ 'ACTION' ,
     'AUTOMOTIVE_DESIGN.'+ 'ACTION_DIRECTIVE' ,
     'AUTOMOTIVE_DESIGN.'+ 'ACTION_METHOD' ,
     'AUTOMOTIVE_DESIGN.'+ 'ACTION_PROPERTY' ,
     'AUTOMOTIVE_DESIGN.'+ 'APPLICATION_CONTEXT' ,
     'AUTOMOTIVE_DESIGN.'+ 'APPROVAL_STATUS' ,
     'AUTOMOTIVE_DESIGN.'+ 'ASSEMBLY_COMPONENT_USAGE' ,
     'AUTOMOTIVE_DESIGN.'+ 'CONFIGURATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'CONTRACT' , 'AUTOMOTIVE_DESIGN.'+
     'DOCUMENT_TYPE' , 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_DEFINITION' , 'AUTOMOTIVE_DESIGN.'+
     'GENERAL_PROPERTY' , 'AUTOMOTIVE_DESIGN.'+
     'MATERIAL_DESIGNATION' , 'AUTOMOTIVE_DESIGN.'+
     'ORGANIZATIONAL_PROJECT' , 'AUTOMOTIVE_DESIGN.'+ 'PRODUCT'
     , 'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_CONCEPT' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_CONCEPT_FEATURE_CATEGORY' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_DEFINITION' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_DEFINITION_FORMATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'PROPERTY_DEFINITION' ,
     'AUTOMOTIVE_DESIGN.'+ 'RESOURCE_PROPERTY' ,
     'AUTOMOTIVE_DESIGN.'+ 'SECURITY_CLASSIFICATION_LEVEL' ,
     'AUTOMOTIVE_DESIGN.'+ 'SHAPE_ASPECT' ,
     'AUTOMOTIVE_DESIGN.'+ 'VERSIONED_ACTION_REQUEST']* TYPEOF (
     i ) ) <>1 ) ) =0 ) ;
 WR2: NOT ( ( 'AUTOMOTIVE_DESIGN.'+ 'GROUP' IN TYPEOF (
     SELF.assigned_class ) ) AND ( SELF.assigned_class\
     group.name ='E' ) AND ( SELF.assigned_class\
     group.description = 'dimensioning principle' ) ) OR (
     SIZEOF ( QUERY ( i <* SELF.items | NOT (
     'AUTOMOTIVE_DESIGN.'+ 'PLUS_MINUS_TOLERANCE' IN TYPEOF ( i
     ) ) ) ) =0 ) ;
 WR3: NOT ( ( 'AUTOMOTIVE_DESIGN.'+ 'CLASS_SYSTEM' IN TYPEOF (
     SELF.assigned_class ) ) AND ( SELF.role. name =
     'class system membership' ) ) OR ( SIZEOF ( QUERY ( i <*
     SELF.items | SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'APPROVAL_STATUS' , 'AUTOMOTIVE_DESIGN.'+ 'CLASS' ,
     'AUTOMOTIVE_DESIGN.'+ 'DESCRIPTIVE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'DOCUMENT_TYPE' ,
     'AUTOMOTIVE_DESIGN.'+ 'SECURITY_CLASSIFICATION_LEVEL' ,
     'AUTOMOTIVE_DESIGN.'+ 'APPROVAL_STATUS']* TYPEOF ( i ) )
     <>1 ) ) =0 ) ;
END_ENTITY;
*)
(* Reuse from Contract_mim
ENTITY applied_contract_assignment
  SUBTYPE OF (contract_assignment);
  items : SET [1:?] OF contract_item;
END_ENTITY;
*)
(* Reuse from Date_time_assignment_mim
ENTITY applied_date_and_time_assignment
  SUBTYPE OF (date_and_time_assignment);
  items : SET [1:?] OF date_and_time_item;
END_ENTITY;

ENTITY applied_date_assignment
  SUBTYPE OF (date_assignment);
  items : SET [1:?] OF date_item;
WHERE
 WR1: ( NOT ( SELF.role. name = 'actual end' ) ) OR
     item_correlation ( SELF.items , ['ACTION' ,
     'ORGANIZATIONAL_PROJECT' , 'EFFECTIVITY'] ) ;
END_ENTITY;
*)
(* Reuse from Document_assignment_mim
ENTITY applied_document_reference
  SUBTYPE OF (document_reference);
  items : SET [1:?] OF document_reference_item;
WHERE
 WR1: ( NOT ( SELF.role. name = 'general tolerance definition' )
     ) OR item_correlation ( SELF.items , ['REPRESENTATION'] ) ;
 WR2: ( SELF.role. name = 'general tolerance definition' ) OR
     item_correlation ( SELF.items , ['ACTION' ,
     'ACTION_DIRECTIVE' , 'ACTION_METHOD' ,
     'ACTION_RELATIONSHIP' , 'APPLIED_ACTION_ASSIGNMENT' ,
     'APPROVAL' , 'CERTIFICATION' , 'CLASS' , 'CLASS_SYSTEM' ,
     'CONFIGURATION_DESIGN' , 'CONFIGURATION_ITEM' , 'CONTRACT'
     , 'FEATURE_DEFINITION' , 'GENERAL_PROPERTY' ,
     'MATERIAL_DESIGNATION' , 'ORGANIZATION' ,
     'ORGANIZATIONAL_PROJECT' , 'PERSON' , 'PRODUCT_CONCEPT' ,
     'PRODUCT_CONCEPT_FEATURE' ,
     'PRODUCT_CONCEPT_FEATURE_CATEGORY' , 'PRODUCT_DEFINITION' ,
     'PRODUCT_DEFINITION_FORMATION' ,
     'PRODUCT_DEFINITION_FORMATION_RELATIONSHIP' ,
     'PRODUCT_DEFINITION_RELATIONSHIP' ,
     'PRODUCT_DEFINITION_SUBSTITUTE' ,
     'PRODUCT_RELATED_PRODUCT_CATEGORY' , 'PROPERTY_DEFINITION'
     , 'REPRESENTATION' , 'RESOURCE_REQUIREMENT_TYPE' ,
     'SECURITY_CLASSIFICATION' , 'SHAPE_ASPECT' ,
     'SHAPE_ASPECT_RELATIONSHIP' , 'VERSIONED_ACTION_REQUEST'] )
     ;
END_ENTITY;

ENTITY applied_document_usage_constraint_assignment
  SUBTYPE OF (document_usage_constraint_assignment);
  items : SET [1:?] OF document_reference_item;
END_ENTITY;
*)
(* Reuse from Effectivity_application_mim
ENTITY applied_effectivity_assignment
  SUBTYPE OF (effectivity_assignment);
  items : SET [1:?] OF effectivity_item;
WHERE
 WR1: SIZEOF ( ['AUTOMOTIVE_DESIGN.'+ 'LOT_EFFECTIVITY' ,
     'AUTOMOTIVE_DESIGN.'+ 'SERIAL_NUMBERED_EFFECTIVITY' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_DEFINITION_EFFECTIVITY']*
     TYPEOF ( SELF.assigned_effectivity ) ) =0;
END_ENTITY;
*)
(* Reuse from Event_assignment_mim
ENTITY applied_event_occurrence_assignment
  SUBTYPE OF (event_occurrence_assignment);
  items : SET [1:?] OF event_occurrence_item;
END_ENTITY;
*)
(* Reuse from 
ENTITY applied_external_identification_assignment
  SUBTYPE OF (external_identification_assignment);
  items : SET [1:?] OF external_identification_item;
WHERE
 WR1: ( NOT ( SELF.role. name =
     'alternative document id and location' ) ) OR
     item_correlation ( SELF.items , ['DOCUMENT_FILE'] ) ;
 WR2: ( NOT ( SELF.role. name ='version' ) ) OR item_correlation
     ( SELF.items , ['EXTERNALLY_DEFINED_CLASS' ,
     'EXTERNALLY_DEFINED_GENERAL_PROPERTY'] ) ;
END_ENTITY;
*)
(* Reuse from Group_mim
ENTITY applied_group_assignment
  SUBTYPE OF (group_assignment);
  items : SET [1:?] OF group_item;
WHERE
 WR1: ( NOT ( SELF.role. name ='exclusiveness' ) ) OR
     item_correlation ( SELF.items , ['ACTION'] ) ;
 WR2: ( NOT ( SELF.role. name ='simultaneity' ) ) OR
     item_correlation ( SELF.items , ['ACTION'] ) ;
 WR3: ( NOT ( SELF.role. name = 'specification category member'
     ) ) OR item_correlation ( SELF.items ,
     ['PRODUCT_CONCEPT_FEATURE'] ) ;
 WR4: ( NOT ( SELF.role. name = 'group membership' ) ) OR
     item_correlation ( SELF.items ,
     ['GEOMETRIC_REPRESENTATION_ITEM' , 'SHAPE_ASPECT'] ) ;
 WR5: ( NOT ( SELF.role. name = 'group membership' ) ) OR ( (
     SIZEOF ( SELF.items ) = SIZEOF ( QUERY ( i <* SELF.items |
     'AUTOMOTIVE_DESIGN.'+ 'GEOMETRIC_REPRESENTATION_ITEM' IN
     TYPEOF ( i ) ) ) ) OR ( SIZEOF ( SELF.items ) = SIZEOF (
     QUERY ( i <* SELF.items | 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_ASPECT' IN TYPEOF ( i ) ) ) ) ) ;
END_ENTITY;
*)
(* Reuse from Identification_assignment_mim
ENTITY applied_identification_assignment
  SUBTYPE OF (identification_assignment);
  items : SET [1:?] OF identification_item;
WHERE
 WR1: ( NOT ( SELF.role. name ='version' ) ) OR item_correlation
     ( SELF.items , ['ACTION' , 'ACTION_DIRECTIVE' ,
     'SHAPE_REPRESENTATION' , 'EFFECTIVITY' , 'PRODUCT_CONCEPT'
     , 'CONFIGURATION_ITEM' , 'PRODUCT_DEFINITION' ,
     'PRODUCT_CONCEPT_FEATURE' , 'DOCUMENT_FILE' , 'CLASS' ,
     'APPLIED_IDENTIFICATION_ASSIGNMENT' , 'DRAUGHTING_MODEL' ,
     'MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION' ,
     'PRESENTATION_AREA'] ) ;
 WR2: ( NOT ( SELF.role. name = 'lot context' ) ) OR
     item_correlation ( SELF.items , ['PRODUCT'] ) ;
 WR3: ( NOT ( SELF.role. name = 'property change id context' ) )
     OR item_correlation ( SELF.items ,
     ['PROPERTY_DEFINITION_RELATIONSHIP' ,
     'SHAPE_ASPECT_RELATIONSHIP' , 'ACTION_PROPERTY'] ) ;
 WR4: ( NOT ( SELF.role. name = 'size id' ) ) OR
     item_correlation ( SELF.items , ['DIMENSIONAL_SIZE'] ) ;
 WR5: ( NOT ( SELF.role. name = 'model change id' ) ) OR
     item_correlation ( SELF.items , ['PROPERTY_DEFINITION' ,
     'ACTION_PROPERTY'] ) ;
 WR6: ( NOT ( SELF.role. name ='alias' ) ) OR item_correlation (
     SELF.items , ['APPLICATION_CONTEXT' , 'APPROVAL_STATUS' ,
     'ASSEMBLY_COMPONENT_USAGE' , 'CLASS' , 'CLASS_SYSTEM' ,
     'DOCUMENT_TYPE' , 'DRAUGHTING_MODEL' , 'GENERAL_PROPERTY' ,
     'MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION' ,
     'ORGANIZATION' , 'PRODUCT' , 'PRODUCT_CONCEPT' ,
     'PRODUCT_CONCEPT_FEATURE' ,
     'PRODUCT_CONCEPT_FEATURE_CATEGORY' , 'PRODUCT_DEFINITION' ,
     'PRODUCT_DEFINITION_FORMATION' , 'PROPERTY_DEFINITION' ,
     'SECURITY_CLASSIFICATION_LEVEL' , 'SHAPE_REPRESENTATION'] )
     ;
END_ENTITY;
*)
ENTITY applied_ineffectivity_assignment
  SUBTYPE OF (effectivity_assignment);
  items : SET [1:?] OF effectivity_item;
WHERE
 WR1: SIZEOF ( ['AUTOMOTIVE_DESIGN.'+ 'LOT_EFFECTIVITY' ,
     'AUTOMOTIVE_DESIGN.'+ 'SERIAL_NUMBERED_EFFECTIVITY' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_DEFINITION_EFFECTIVITY']*
     TYPEOF ( SELF.assigned_effectivity ) ) =0;
END_ENTITY;
(* Reuse from Name_assignment_mim
ENTITY applied_name_assignment
  SUBTYPE OF (name_assignment);
  items : SET [1:?] OF name_item;
WHERE
 WR1: ( NOT ( SELF.role. name = 'kinematic element name' ) ) OR
     item_correlation ( SELF.items , ['KINEMATIC_STRUCTURE' ,
     'KINEMATIC_JOINT' , 'KINEMATIC_LINK'] ) ;
END_ENTITY;
*)
(* Resue from Person_organization_assignment_mim
ENTITY applied_organization_assignment
  SUBTYPE OF (organization_assignment);
  items : SET [1:?] OF organization_item;
WHERE
 WR1: ( NOT ( SELF.role. name = 'organization in contract' ) )
     OR item_correlation ( SELF.items , ['CONTRACT'] ) ;
 WR2: ( NOT ( SELF.role. name = 'signing for contract' ) ) OR
     item_correlation ( SELF.items ,
     ['APPLIED_ORGANIZATION_ASSIGNMENT'] ) ;
 WR3: ( NOT ( SELF.role. name = 'validity context' ) ) OR
     item_correlation ( SELF.items , ['ACTION_PROPERTY' ,
     'RESOURCE_PROPERTY' , 'PROPERTY_DEFINITION'] ) ;
 WR4: ( NOT ( SELF.role. name = 'alias scope' ) ) OR
     item_correlation ( SELF.items ,
     ['APPLIED_IDENTIFICATION_ASSIGNMENT'] ) ;
END_ENTITY;
*)
(* Reuse from Project_mim
ENTITY applied_organizational_project_assignment
  SUBTYPE OF (organizational_project_assignment);
  items : SET [1:?] OF organizational_project_item;
END_ENTITY;
*)
(* Reuse from Person_organization_assignment_mim
ENTITY applied_person_and_organization_assignment
  SUBTYPE OF (person_and_organization_assignment);
  items : SET [1:?] OF person_and_organization_item;
WHERE
 WR1: ( NOT ( SELF.role. name = 'signing for contract' ) ) OR
     item_correlation ( SELF.items ,
     ['APPLIED_ORGANIZATION_ASSIGNMENT'] ) ;
END_ENTITY;
*)
(* Reuse from Presentation_hierarchy_mim
ENTITY applied_presented_item
  SUBTYPE OF (presented_item);
  items : SET [1:?] OF presented_item_select;
END_ENTITY;
*)
(* Reuse from Security_classification_mim
ENTITY applied_security_classification_assignment
  SUBTYPE OF (security_classification_assignment);
  items : SET [1:?] OF security_classification_item;
END_ENTITY;
*)
(* Reuse from Time_interval_assignment_mim
ENTITY applied_time_interval_assignment
  SUBTYPE OF (time_interval_assignment);
  items : SET [1:?] OF time_interval_item;
END_ENTITY;
*)
(* Reuse from Multi_linguism_mim
ENTITY attribute_language_assignment
  SUBTYPE OF (attribute_classification_assignment);
  items : SET [1:?] OF attribute_language_item;
DERIVE
language : label := SELF\attribute_classification_assignment.
                       assigned_class.name;
WHERE
 WR1:SELF\attribute_classification_assignment. role.name IN
     ['primary' , 'translated'];
 WR2:'AUTOMOTIVE_DESIGN.'+'LANGUAGE' IN TYPEOF (
     SELF\attribute_classification_assignment. assigned_class )
     ;
END_ENTITY;
*)
ENTITY barring_hole
  SUBTYPE OF (feature_definition);
WHERE
 WR1: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     name = 'hole profile' ) AND ( sa. description =
     'closed profile occurrence' ) AND ( SIZEOF ( QUERY ( sar <*
     USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'profile usage' ) AND ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'CIRCULAR_CLOSED_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'NGON_CLOSED_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'RECTANGULAR_CLOSED_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'CLOSED_PATH_PROFILE']* TYPEOF ( sar.
     relating_shape_aspect ) ) =1 ) ) ) =1 ) ) ) =1;
 WR2: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     name = 'barring profile' ) AND ( sa. description =
     'closed profile occurrence' ) AND ( SIZEOF ( QUERY ( sar <*
     USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'profile usage' ) ) ) =1 ) ) ) =1;
 WR3: ( SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) |
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr
     <* get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND {1<= SIZEOF ( pdr.
     used_representation.items ) <=2} ) ) =1 ) ;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | NOT ( i.name IN ['orientation'
     , 'base radius' ] ) ) ) >0 ) ) ) =0;
 WR5: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'base radius' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) <>1 ) )
     ) =0;
END_ENTITY;

ENTITY bead
  SUBTYPE OF (feature_definition);
WHERE
 WR1: ( SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) |
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) <=1 ) AND ( SIZEOF ( QUERY ( pdr
     <* get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) >2 ) ) ) =0 ) ;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | NOT ( i.name IN ['orientation'
     , 'base radius' ] ) ) ) >0 ) ) ) =0;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'base radius' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) >1 ) )
     ) =0;
 WR4: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     name = 'sweep path' ) AND ( sa. description =
     'path feature component occurrence' ) AND ( SIZEOF ( QUERY
     ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'path feature component usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'PATH_FEATURE_COMPONENT' IN TYPEOF (
     sar. relating_shape_aspect ) ) ) ) =1 ) ) ) =1;
 WR5: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     name = 'bead profile' ) AND ( sa. description =
     'open profile occurrence' ) AND ( SIZEOF ( QUERY ( sar <*
     USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'profile usage' ) AND ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'OPEN_PATH_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'PARTIAL_CIRCULAR_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'ROUNDED_U_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'SQUARE_U_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'TEE_PROFILE' , 'AUTOMOTIVE_DESIGN.'+
     'VEE_PROFILE']* TYPEOF ( sar. relating_shape_aspect ) ) =1
     ) ) ) =1 ) ) ) =1;
 WR6: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     name = 'end condition' ) AND ( sa. description =
     'bead end occurrence' ) AND ( SIZEOF ( QUERY ( sar <*
     USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. name = 'bead end usage' ) AND ( sar. description =
     'starting' ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'BEAD_END' IN TYPEOF ( sar. relating_shape_aspect ) ) ) )
     =1 ) ) ) =1;
 WR7: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     name = 'end condition' ) AND ( sa. description =
     'bead end occurrence' ) AND ( SIZEOF ( QUERY ( sar <*
     USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. name = 'bead end usage' ) AND ( sar. description =
     'ending' ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'BEAD_END' IN TYPEOF ( sar. relating_shape_aspect ) ) ) )
     =1 ) ) ) =1;
END_ENTITY;

ENTITY bead_end
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'FEATURE_COMPONENT_DEFINITION' IN
     TYPEOF ( SELF.of_shape. definition ) ;
 WR2:SELF.description IN ['linear' , 'open' , 'radiused'];
 WR3: ( SELF.description<>'linear' ) XOR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) >0 ) ;
 WR4: ( SELF.description<>'linear' ) OR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =2 ) ) ) =1 ) ;
 WR5: ( SELF.description<>'linear' ) OR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'end length' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1 ) ;
 WR6: ( SELF.description<>'linear' ) OR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name = 'end shape' ) AND (
     i\descriptive_representation_item. description IN
     ['straight' , 'tapered'] ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) ) ) =1
     ) ) ) =1 ) ;
 WR7: SIZEOF ( QUERY ( sar <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATING_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. name = 'bead end usage' ) AND ( sar. description IN [
     'starting' , 'ending'
     ] ) AND ( 'AUTOMOTIVE_DESIGN.'+ 'BEAD' IN TYPEOF ( sar.
     related_shape_aspect.of_shape. definition ) ) AND ( sar.
     related_shape_aspect.of_shape.
     definition\characterized_object. name = 'end condition' )
     AND ( sar. related_shape_aspect.of_shape.
     definition\characterized_object. description =
     'bead end occurrence' ) ) ) =1;
END_ENTITY;

ENTITY boss
  SUBTYPE OF (feature_definition);
WHERE
 WR1:SELF.description IN ['circular' , 'rectangular' ,
     'complex'];
 WR2: ( SELF.description<>'circular' ) OR ( SIZEOF ( QUERY ( sa
     <* get_shape_aspects ( SELF ) | ( sa. description =
     'circular profile occurrence' ) AND ( SIZEOF ( QUERY ( sar
     <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'profile usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'CIRCULAR_CLOSED_PROFILE' IN TYPEOF (
     sar. relating_shape_aspect ) ) ) ) =1 ) ) ) =1 ) ;
 WR3: ( SELF.description<>'complex' ) OR ( SIZEOF ( QUERY ( sa
     <* get_shape_aspects ( SELF ) | ( sa. description =
     'enclosed boundary occurrence' ) AND ( SIZEOF ( QUERY ( sar
     <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'profile usage' ) AND ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'CLOSED_PATH_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'NGON_CLOSED_PROFILE']* TYPEOF ( sar.
     relating_shape_aspect ) ) =1 ) ) ) =1 ) ) ) =1 ) ;
 WR4: ( SELF.description<>'rectangular' ) OR ( SIZEOF ( QUERY (
     sa <* get_shape_aspects ( SELF ) | ( sa. description =
     'rectangular profile occurrence' ) AND ( SIZEOF ( QUERY (
     sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'profile usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'RECTANGULAR_CLOSED_PROFILE' IN
     TYPEOF ( sar. relating_shape_aspect ) ) ) ) =1 ) ) ) =1 ) ;
 WR5: ( SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) |
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) <=1 ) AND ( SIZEOF ( QUERY ( pdr
     <* get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND NOT ( {1<= SIZEOF ( pdr.
     used_representation.items ) <=2} ) ) ) =0 ) ;
 WR6: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | NOT ( i.name IN ['orientation'
     , 'fillet radius' ] ) ) ) >0 ) ) ) =0;
 WR7: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'fillet radius' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) >1 ) )
     ) =0;
 WR8: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'boss hight occurrence' ) AND ( SIZEOF (
     QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. name = 'boss hight' ) AND ( sar. description =
     'path feature component usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'PATH_FEATURE_COMPONENT' IN TYPEOF (
     sar. relating_shape_aspect ) ) AND ( sar.
     relating_shape_aspect.description ='linear' ) ) ) =1 ) ) )
     =1;
 WR9: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'top condition occurrence' ) AND ( SIZEOF (
     QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'boss top usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'BOSS_TOP' IN TYPEOF ( sar.
     relating_shape_aspect ) ) ) ) =1 ) ) ) =1;
 WR10: NOT ( SELF.description IN ['rectangular' , 'complex'] )
     OR ( SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | (
     sa. description = 'change in boundary occurrence' ) AND (
     SIZEOF ( QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'taper usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'TAPER' IN TYPEOF ( sar.
     relating_shape_aspect ) ) AND ( sar.
     relating_shape_aspect.description IN [ 'angle taper' ,
     'directed taper' ] ) ) ) =1 ) ) ) <=1 ) ;
 WR11: ( SELF.description<>'circular' ) OR ( SIZEOF ( QUERY ( sa
     <* get_shape_aspects ( SELF ) | ( sa. description =
     'change in diameter occurrence' ) AND ( SIZEOF ( QUERY (
     sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'taper usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'TAPER' IN TYPEOF ( sar.
     relating_shape_aspect ) ) AND ( sar.
     relating_shape_aspect.description IN [ 'angle taper' ,
     'diameter taper' ] ) ) ) =1 ) ) ) <=1 ) ;
END_ENTITY;

ENTITY boss_top
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'FEATURE_COMPONENT_DEFINITION' IN
     TYPEOF ( SELF.of_shape. definition ) ;
 WR2:SELF.description IN ['planar' , 'complex'];
 WR3: ( SELF.description<>'planar' ) OR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'DIRECTION_SHAPE_REPRESENTATION' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1 ) ;
 WR4: ( SELF.description<>'planar' ) OR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'LOCATION_SHAPE_REPRESENTATION' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1 ) ;
 WR5: ( SELF.description<>'complex' ) OR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FACE_SHAPE_REPRESENTATION' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1 ) ;
 WR6: SIZEOF ( QUERY ( sar <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATING_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. name = 'boss top usage' ) AND ( sar. description IN [
     'starting' , 'ending' ] ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'BOSS' IN TYPEOF ( sar.
     related_shape_aspect ) ) AND ( sar.
     related_shape_aspect.name = 'top condition occurrence' ) )
     ) =1;
 WR7: ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) <=1 ) AND ( SIZEOF ( QUERY (
     pdr <* get_shape_aspect_property_definition_representations
     ( SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) >1 ) ) ) =0 ) ;
 WR8: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( ( SIZEOF ( pdr.
     used_representation.items ) =0 ) XOR ( SIZEOF ( QUERY ( i
     <* pdr. used_representation.items | ( i.name= 'top radius'
     ) AND ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) ) <=1;
END_ENTITY;
(* Reuse from Camera_view_mim
ENTITY camera_image_2d_with_scale
  SUBTYPE OF (camera_image);
DERIVE
scale: positive_ratio_measure :=
       (SELF\mapped_item.mapping_target\planar_extent.size_in_x) /
       (SELF\mapped_item.mapping_source.mapping_origin\
             camera_model_d2.view_window\planar_extent.size_in_x);
WHERE
 WR1: ( 'AUTOMOTIVE_DESIGN.'+ 'CAMERA_MODEL_D2' IN TYPEOF (
     SELF\mapped_item. mapping_source.mapping_origin ) ) ;
 WR2:aspect_ratio ( SELF\mapped_item. mapping_target )
     =aspect_ratio ( SELF\mapped_item.
     mapping_source.mapping_origin\ camera_model_d2.view_window
     ) ;
 WR3:SELF\mapped_item. mapping_source.mapping_origin\
     camera_model_d2.view_window_clipping;
END_ENTITY;
*)
ENTITY chamfer
  SUBTYPE OF (transition_feature);
WHERE
 WR1: SIZEOF ( QUERY ( sar <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATING_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'CHAMFER_OFFSET' IN TYPEOF ( sar.
     related_shape_aspect ) ) AND ( sar.
     related_shape_aspect.description = 'first offset' ) ) ) =1;
 WR2: SIZEOF ( QUERY ( sar <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATING_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'CHAMFER_OFFSET' IN TYPEOF ( sar.
     related_shape_aspect ) ) AND ( sar.
     related_shape_aspect.description = 'second offset' ) ) )
     =1;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'FACE_SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) AND ( pdr.
     used_representation.name = 'chamfer face' ) ) ) =1;
END_ENTITY;

ENTITY chamfer_offset
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:SELF.description IN [ 'first offset' , 'second offset' ];
 WR2: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =1 ) ) ) =1;
 WR4: ( SELF.description<> 'first offset' ) OR ( SIZEOF ( QUERY
     ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'offset amount' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1 ) ;
 WR5: ( SELF.description<> 'second offset' ) OR ( SIZEOF ( QUERY
     ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'offset amount' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) OR
     ( SIZEOF ( QUERY ( i <* pdr. used_representation.items | (
     i.name= 'offset angle' ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT' IN TYPEOF ( i ) ) ) ) =1 )
     ) ) ) =1 ) ;
 WR6: SIZEOF ( QUERY ( sar <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'CHAMFER' IN TYPEOF ( sar.
     relating_shape_aspect ) ) ) ) >=1;
 WR7: ( SELF.description<> 'first offset' ) OR ( SIZEOF ( QUERY
     ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'FACE_SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) AND ( pdr.
     used_representation.name = 'first face shape' ) ) ) =1 ) ;
 WR8: ( SELF.description<> 'second offset' ) OR ( SIZEOF ( QUERY
     ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'FACE_SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) AND ( pdr.
     used_representation.name = 'second face shape' ) ) ) =1 ) ;
END_ENTITY;
(* Reuse from Classification_with_attributes_mim
ENTITY characterized_class
  SUBTYPE OF (characterized_object, class);
END_ENTITY;
*)
ENTITY circular_closed_profile
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'FEATURE_COMPONENT_DEFINITION' IN
     TYPEOF ( SELF.of_shape. definition ) ;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =2 ) ) ) =1;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='orientation' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'PLACEMENT' IN TYPEOF ( i ) ) ) ) =1
     ) ) ) =1;
 WR5: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='diameter' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1;
END_ENTITY;

ENTITY circular_pattern
  SUBTYPE OF (replicate_feature);
WHERE
 WR1: ( SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr
     <* get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND {2<= SIZEOF ( pdr.
     used_representation.items ) <=5} ) ) =1 ) ;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='diameter' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) <=1;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name=
     'base feature rotation' ) AND ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1
     ) ) ) <=1;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'number of features'
     ) AND ( 'AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM'
     IN TYPEOF ( i ) ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'COUNT_MEASURE' IN TYPEOF ( i\measure_with_unit.
     value_component ) ) ) ) =1 ) ) ) =1;
 WR5: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'angular spacing' )
     AND ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1;
END_ENTITY;
(* Reuse from classification_schema
ENTITY class
  SUBTYPE OF (group);
END_ENTITY;
*)
(* Reuse from Classification_with_attributes_mim
ENTITY class_system
  SUBTYPE OF (group);
END_ENTITY;
*)
(* Reuse from Specification_control_mim
ENTITY class_usage_effectivity_context_assignment
  SUBTYPE OF (effectivity_context_assignment);
  items : SET [1:?] OF class_usage_effectivity_context_item;
WHERE
 WR1:SELF.role. name = 'class usage influence' ;
 WR2: SIZEOF ( QUERY ( i <* SELF.items | NOT (
     'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_DEFINITION' IN TYPEOF ( i )
     ) ) ) =0;
 WR3: ( 'AUTOMOTIVE_DESIGN.'+ 'APPLIED_EFFECTIVITY_ASSIGNMENT'
     IN TYPEOF ( SELF.assigned_effectivity_assignment ) ) AND (
     SIZEOF ( TYPEOF ( SELF.assigned_effectivity_assignment.
     assigned_effectivity ) ) =1 ) AND (
     SELF.assigned_effectivity_assignment.
     assigned_effectivity.id = 'class usage' ) AND ( SIZEOF (
     QUERY ( i <* SELF.assigned_effectivity_assignment\
     applied_effectivity_assignment.items | NOT (
     'AUTOMOTIVE_DESIGN.'+
     'PRODUCT_CONCEPT_FEATURE_CATEGORY_USAGE' IN TYPEOF ( i ) )
     ) ) =0 ) ;
END_ENTITY;
*)
ENTITY closed_path_profile
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'FEATURE_COMPONENT_DEFINITION' IN
     TYPEOF ( SELF.of_shape. definition ) ;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =1 ) ) ) =1;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='orientation' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'PLACEMENT' IN TYPEOF ( i ) ) ) ) =1
     ) ) ) =1;
 WR5: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | 'AUTOMOTIVE_DESIGN.'+ 'PATH_SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) ) =1;
 WR6: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'PATH_SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) AND ( SIZEOF ( QUERY
     ( i <* pdr. used_representation.items | ( i.name=
     'profile shape' ) ) ) =1 ) ) ) =1;
END_ENTITY;

ENTITY composite_hole
  SUBTYPE OF (compound_feature);
WHERE
 WR1:SELF\characterized_object. description IN ['counterbore' ,
     'countersunk'];
 WR2: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+ 'COMPOSITE_SHAPE_ASPECT' IN TYPEOF (
     sa ) ) AND ( sa. name = 'compound feature in solid' ) AND (
     SIZEOF ( QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
     ) | 'AUTOMOTIVE_DESIGN.'+ 'FEATURE_COMPONENT_RELATIONSHIP'
     IN TYPEOF ( sar ) ) ) =2 ) ) ) =1;
 WR3: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+ 'COMPOSITE_SHAPE_ASPECT' IN TYPEOF (
     sa ) ) AND ( sa. name = 'compound feature in solid' ) AND (
     SIZEOF ( QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
     ) | 'AUTOMOTIVE_DESIGN.'+ 'FEATURE_COMPONENT_RELATIONSHIP'
     IN TYPEOF ( sar ) ) ) =2 ) AND ( SIZEOF (
     get_round_holes_for_composite_hole ( bag_to_set ( USEDIN (
     sa ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
     ) ) ) ) =2 ) ) ) =1;
 WR4: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+ 'COMPOSITE_SHAPE_ASPECT' IN TYPEOF (
     sa ) ) AND ( sa. name = 'compound feature in solid' ) AND (
     SIZEOF ( QUERY ( rh1 <* get_round_holes_for_composite_hole
     ( bag_to_set ( USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
     ) ) ) | ( SIZEOF ( QUERY ( rh2 <*
     get_round_holes_for_composite_hole ( bag_to_set ( USEDIN (
     sa ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
     ) ) ) | ( rh1:<>:rh2 ) AND ( get_diameter_for_round_hole (
     rh1 ) =get_diameter_for_round_hole ( rh2 ) ) ) ) =0 ) ) )
     =0 ) ) ) =1;
 WR5: ( SELF.description<>'countersunk' ) OR ( SIZEOF ( QUERY (
     sa <* get_shape_aspects ( SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'COMPOSITE_SHAPE_ASPECT' IN TYPEOF ( sa ) ) AND ( sa. name
     = 'compound feature in solid' ) AND ( SIZEOF ( QUERY ( rh
     <* get_round_holes_for_composite_hole ( bag_to_set ( USEDIN
     ( sa ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
     ) ) ) | ( SIZEOF ( QUERY ( sa1 <* get_shape_aspects ( rh )
     | ( sa. description = 'change in diameter occurrence' ) AND
     ( SIZEOF ( QUERY ( sar <* USEDIN ( sa1 ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
     ) | ( sar. description = 'taper usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'TAPER' IN TYPEOF ( sar.
     relating_shape_aspect ) ) ) ) =1 ) ) ) =1 ) ) ) =1 ) ) ) =1
     ) ;
END_ENTITY;

ENTITY compound_feature
  SUBTYPE OF (feature_definition);
WHERE
 WR1: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     name IN [ 'compound feature in solid' ,
     'compound feature in panel' ] ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'COMPOSITE_SHAPE_ASPECT' IN TYPEOF ( sa ) ) ) ) =1;
 WR2: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+ 'COMPOSITE_SHAPE_ASPECT' IN TYPEOF (
     sa ) ) AND ( SIZEOF ( QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
     ) | NOT ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) ) ) >0
     ) ) ) =0;
 WR3: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+ 'COMPOSITE_SHAPE_ASPECT' IN TYPEOF (
     sa ) ) AND ( SIZEOF ( QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
     ) | NOT ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'INSTANCED_FEATURE' , 'AUTOMOTIVE_DESIGN.'+
     'PLACED_FEATURE' , 'AUTOMOTIVE_DESIGN.'+ 'APPLIED_AREA' ,
     'AUTOMOTIVE_DESIGN.'+ 'TRANSITION_FEATURE']*TYPEOF ( sar.
     related_shape_aspect ) ) =1 ) ) ) >0 ) ) ) =0;
 WR4: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+ 'COMPOSITE_SHAPE_ASPECT' IN TYPEOF (
     sa ) ) AND ( SIZEOF ( QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'PLACED_FEATURE' IN TYPEOF (
     sar. related_shape_aspect ) ) AND ( SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( sar.
     related_shape_aspect.of_shape. definition ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'element placement' )
     AND ( 'AUTOMOTIVE_DESIGN.'+ 'PLACEMENT' IN TYPEOF ( i ) ) )
     ) <>1 ) ) ) >0 ) ) ) >0 ) ) ) =0;
 WR5: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     name = 'compound feature in solid' ) AND ( SIZEOF ( QUERY (
     sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
     ) | ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+ 'TRANSITION_FEATURE'
     , 'AUTOMOTIVE_DESIGN.'+ 'BOSS' , 'AUTOMOTIVE_DESIGN.'+
     'APPLIED_AREA']*TYPEOF ( sar. related_shape_aspect ) ) +
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+ 'SLOT' ,
     'AUTOMOTIVE_DESIGN.'+ 'POCKET' , 'AUTOMOTIVE_DESIGN.'+
     'ROUND_HOLE' , 'AUTOMOTIVE_DESIGN.'+ 'RIB' ,
     'AUTOMOTIVE_DESIGN.'+ 'COMPOUND_FEATURE']*TYPEOF ( sar.
     related_shape_aspect.of_shape. definition ) ) =0 ) ) ) >0 )
     ) ) =0;
 WR6: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     name = 'compound feature in panel' ) AND ( SIZEOF ( QUERY (
     sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
     ) | ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'TRANSITION_FEATURE']*TYPEOF ( sar. related_shape_aspect )
     ) + SIZEOF ( ['AUTOMOTIVE_DESIGN.'+ 'BEAD' ,
     'AUTOMOTIVE_DESIGN.'+ 'HOLE_IN_PANEL' ,
     'AUTOMOTIVE_DESIGN.'+ 'FEATURE_IN_PANEL' ,
     'AUTOMOTIVE_DESIGN.'+ 'JOGGLE' , 'AUTOMOTIVE_DESIGN.'+
     'LOCATOR' , 'AUTOMOTIVE_DESIGN.'+
     'COMPOUND_FEATURE']*TYPEOF ( sar.
     related_shape_aspect.of_shape. definition ) ) =0 ) ) ) >0 )
     ) ) =0;
 WR7: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     name = 'compound feature in panel' ) AND ( SIZEOF ( QUERY (
     sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'COMPOUND_FEATURE' IN TYPEOF (
     sar. related_shape_aspect.of_shape. definition ) ) AND (
     sar. related_shape_aspect.name =
     'compound feature in solid' ) ) ) >0 ) ) ) + SIZEOF ( QUERY
     ( sa <* get_shape_aspects ( SELF ) | ( sa. name =
     'compound feature in solid' ) AND ( SIZEOF ( QUERY ( sar <*
     USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'COMPOUND_FEATURE' IN TYPEOF (
     sar. related_shape_aspect.of_shape. definition ) ) AND (
     sar. related_shape_aspect.name =
     'compound feature in panel' ) ) ) >0 ) ) ) =0;
END_ENTITY;

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

ENTITY configured_effectivity_context_assignment
  SUBTYPE OF (effectivity_context_assignment);
  items : SET [1:?] OF configured_effectivity_context_item;
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'CONFIGURED_EFFECTIVITY_ASSIGNMENT'
     IN TYPEOF ( SELF.assigned_effectivity_assignment ) ;
 WR2: SIZEOF ( SELF.items ) =1;
END_ENTITY;
*)
(* Reuse from Construction_geometry_mim
ENTITY constructive_geometry_representation
  SUBTYPE OF (representation);
WHERE
 WR1: ( 'AUTOMOTIVE_DESIGN.'+ 'GEOMETRIC_REPRESENTATION_CONTEXT'
     IN TYPEOF ( SELF.context_of_items ) ) AND (
     {2<=SELF.context_of_items\
     geometric_representation_context.coordinate_space_dimension<=3}
     ) ;
 WR2: SIZEOF ( QUERY ( cgr_i <* SELF.items | SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'PLACEMENT' , 'AUTOMOTIVE_DESIGN.'+
     'CURVE' , 'AUTOMOTIVE_DESIGN.'+ 'EDGE' ,
     'AUTOMOTIVE_DESIGN.'+ 'FACE' , 'AUTOMOTIVE_DESIGN.'+
     'POINT' , 'AUTOMOTIVE_DESIGN.'+ 'SURFACE' ,
     	'AUTOMOTIVE_DESIGN.'+ 'FACE_SURFACE' ,
     'AUTOMOTIVE_DESIGN.'+ 'VERTEX_POINT']* TYPEOF ( cgr_i ) )
     <>1 ) ) =0;
 WR3: SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'REPRESENTATION_RELATIONSHIP.'+
     'REP_2' ) ) >0;
 WR4: SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'REPRESENTATION_MAP.'+
     'MAPPED_REPRESENTATION' ) ) =0;
END_ENTITY;

ENTITY constructive_geometry_representation_relationship
  SUBTYPE OF (representation_relationship);
WHERE
 WR1: ( SELF.rep_1. context_of_items:=:SELF.rep_2.
     context_of_items ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'GEOMETRIC_REPRESENTATION_CONTEXT' IN TYPEOF ( SELF.rep_1.
     context_of_items ) ) ;
 WR2:'AUTOMOTIVE_DESIGN.'+
     'CONSTRUCTIVE_GEOMETRY_REPRESENTATION' IN TYPEOF (
     SELF.rep_2 ) ;
 WR3: SIZEOF ( ['AUTOMOTIVE_DESIGN.'+ 'SHAPE_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+
     'CONSTRUCTIVE_GEOMETRY_REPRESENTATION']* TYPEOF (
     SELF.rep_1 ) ) =1;
 WR4: NOT (
     'AUTOMOTIVE_DESIGN.'+'REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION'
     IN TYPEOF ( SELF ) ) ;
END_ENTITY;
*)
(* Reuse from Surface_conditions_mim
ENTITY contact_ratio_representation
  SUBTYPE OF (representation);
WHERE
 WR1: ( SIZEOF ( SELF.items ) =1 ) AND ( SIZEOF ( QUERY ( i <*
     SELF.items | ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'VALUE_RANGE']* TYPEOF ( i ) ) =1 ) AND ( i.name =
     'ratio value' ) ) ) =1 ) ;
 WR2: ( SIZEOF ( QUERY ( pdr <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
     'USED_REPRESENTATION' ) | pdr. name =
     'contact ratio reference' ) ) =1 ) AND ( SIZEOF ( QUERY (
     pdr <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
     'USED_REPRESENTATION' ) | ( pdr. name =
     'contact ratio reference' ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'PHYSICALLY_MODELLED_PRODUCT_DEFINITION' IN TYPEOF ( pdr.
     definition.definition ) ) ) ) =1 ) ;
 WR3: ( SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
     'USED_REPRESENTATION' ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr
     <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
     'USED_REPRESENTATION' ) | SIZEOF ( QUERY ( gpa <* USEDIN (
     pdr. definition ,
     'AUTOMOTIVE_DESIGN.'+'GENERAL_PROPERTY_ASSOCIATION.'+
     'DERIVED_DEFINITION' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'GENERAL_PROPERTY' IN TYPEOF ( gpa. base_definition ) ) AND
     ( gpa. base_definition.name ='surface_condition' ) ) ) =1 )
     ) =1 ) ;
END_ENTITY;
*)
(* Reuse from Default_tolerance_mim
ENTITY default_tolerance_table
  SUBTYPE OF (representation);
WHERE
 WR1: SIZEOF ( QUERY ( i <* SELF.items | NOT (
     'AUTOMOTIVE_DESIGN.'+ 'DEFAULT_TOLERANCE_TABLE_CELL' IN
     TYPEOF ( i ) ) ) ) =0;
 WR2: ( SIZEOF ( QUERY ( rr <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'REPRESENTATION_RELATIONSHIP.'+
     'REP_1' ) | rr. name<> 'general tolerance definition' ) )
     =0 ) AND ( SIZEOF ( QUERY ( rr <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'REPRESENTATION_RELATIONSHIP.'+
     'REP_1' ) | ( rr. name = 'general tolerance definition' )
     AND ( rr. rep_2.name<> 'default tolerances' ) ) ) =0 ) AND
     ( SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'REPRESENTATION_RELATIONSHIP.'+
     'REP_2' ) ) =0 ) ;
END_ENTITY;

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

INVERSE
associated_variable_environment: environment FOR semantics;
END_ENTITY;

ENTITY directed_angle
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'FEATURE_COMPONENT_DEFINITION' IN
     TYPEOF ( SELF.of_shape. definition ) ;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =1 ) ) ) =1;
 WR4:SELF.description IN [ 'punch direction' , 'profile normal'
     , 'surface normal' ];
 WR5: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='angle' ) AND ( SIZEOF
     ( ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1
     ) ) ) =1;
END_ENTITY;
(* Reuse from Dimension_tolerance_mim
ENTITY directed_dimensional_location
  SUBTYPE OF (dimensional_location);
END_ENTITY;
*)
ENTITY direction_shape_representation
  SUBTYPE OF (shape_representation);
WHERE
 WR1: SIZEOF ( SELF.items ) =1;
 WR2: SIZEOF ( QUERY ( i <* SELF.items | 'AUTOMOTIVE_DESIGN.'+
     'DIRECTION' IN TYPEOF ( i ) ) ) =1;
END_ENTITY;
(* Reuse from File_identification_mim
ENTITY document_file
  SUBTYPE OF (document,characterized_object);
WHERE
 WR1:SELF\characterized_object. name ='';
 WR2: NOT EXISTS ( SELF\characterized_object. description ) ;
 WR3: SIZEOF ( QUERY ( drt <* SELF\document.
     representation_types | drt. name IN ['digital' ,
     'physical'] ) ) =1;
END_ENTITY;
*)
(* Reuse from Document_assignment_mim
ENTITY document_product_equivalence
  SUBTYPE OF (document_product_association);
WHERE
 WR1:SELF.name ='equivalence';
 WR2: NOT ( 'AUTOMOTIVE_DESIGN.'+ 'PRODUCT' IN TYPEOF (
     SELF.related_product ) ) OR ( ( SELF.relating_document.
     kind.product_data_type =
     'configuration controlled document' ) AND ( SIZEOF ( QUERY
     ( prpc <* USEDIN ( SELF.related_product ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_RELATED_PRODUCT_CATEGORY.'+
     'PRODUCTS' ) | prpc. name ='document' ) ) =1 ) ) ;
 WR3: NOT ( 'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_DEFINITION_FORMATION'
     IN TYPEOF ( SELF.related_product ) ) OR ( (
     SELF.relating_document. kind.product_data_type =
     'configuration controlled document version' ) AND ( SIZEOF
     ( QUERY ( prpc <* USEDIN (
     SELF.related_product\product_definition_formation.
     of_product ,
     'AUTOMOTIVE_DESIGN.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
     ) | prpc. name ='document' ) ) =1 ) ) ;
 WR4: NOT ( 'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_DEFINITION' IN TYPEOF
     ( SELF.related_product ) ) OR ( ( SELF.relating_document.
     kind.product_data_type =
     'configuration controlled document definition' ) AND (
     SIZEOF ( QUERY ( prpc <* USEDIN (
     SELF.related_product\product_definition.
     formation.of_product ,
     'AUTOMOTIVE_DESIGN.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
     ) | prpc. name ='document' ) ) =1 ) ) ;
END_ENTITY;
*)

ENTITY draughting_specification_reference
  SUBTYPE OF (document_reference);
  specified_items : SET [1:?] OF specified_item;
WHERE
 WR1: ( SELF.assigned_document. kind.product_data_type =
     'draughting specification' ) ;
END_ENTITY;

ENTITY drawing_sheet_layout
  SUBTYPE OF (draughting_symbol_representation);
END_ENTITY;

ENTITY edge_round
  SUBTYPE OF (transition_feature);
WHERE
 WR1: ( SELF.description<> 'constant radius' ) XOR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1 ) ;
 WR2: ( SELF.description<> 'constant radius' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND {1<= SIZEOF ( pdr.
     used_representation.items ) <=3} ) ) =1 ) ;
 WR3: ( SELF.description<> 'constant radius' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | NOT ( i.name IN ['radius' ,
     'first offset' , 'second offset' ] ) ) ) >0 ) ) ) =0 ) ;
 WR4: ( SELF.description<> 'constant radius' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='radius' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1 ) ;
 WR5: ( SELF.description<> 'constant radius' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'first offset' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) <=1 ) )
     ) =1 ) ;
 WR6: ( SELF.description<> 'constant radius' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'second offset' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) <=1 ) )
     ) =1 ) ;
 WR7: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'FACE_SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) AND ( pdr.
     used_representation.name = 'first face shape' ) ) ) =1;
 WR8: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'FACE_SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) AND ( pdr.
     used_representation.name = 'second face shape' ) ) ) =1;
 WR9: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'FACE_SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) AND ( pdr.
     used_representation.name = 'edge round face' ) ) ) =1;
END_ENTITY;

ENTITY element_delivery
  SUBTYPE OF (action);
WHERE
 WR1: ( SIZEOF ( QUERY ( aa <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.ACTION_ASSIGNMENT.ASSIGNED_ACTION' ) |
     'AUTOMOTIVE_DESIGN.'+ 'APPLIED_ACTION_ASSIGNMENT' IN TYPEOF
     ( aa ) ) ) =1 ) AND ( SIZEOF ( QUERY ( aaa <* USEDIN ( SELF
     , 'AUTOMOTIVE_DESIGN.'+'ACTION_ASSIGNMENT.'+
     'ASSIGNED_ACTION' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'APPLIED_ACTION_ASSIGNMENT' IN TYPEOF ( aaa ) ) AND ( aaa.
     role.name = 'deliverable element' ) AND ( SIZEOF ( aaa.
     items ) =1 ) AND ( SIZEOF ( QUERY ( i <* aaa. items | (
     'AUTOMOTIVE_DESIGN.'+ 'APPLIED_ACTION_ASSIGNMENT' IN TYPEOF
     ( i ) ) AND ( SIZEOF ( i\applied_action_assignment. items )
     =1 ) AND ( SIZEOF ( QUERY ( i1 <* aaa\
     applied_action_assignment.items | ( 'AUTOMOTIVE_DESIGN.'+
     'CONFIGURATION_ITEM' IN TYPEOF ( i1 ) ) OR ( (
     'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_DEFINITION' IN TYPEOF ( i1 )
     ) AND ( i1\ product_definition.frame_of_reference. name =
     'physical occurrence' ) ) OR ( ( 'AUTOMOTIVE_DESIGN.'+
     'PRODUCT_DEFINITION_FORMATION' IN TYPEOF ( i1 ) ) AND (
     SIZEOF ( QUERY ( prpc <* USEDIN ( i1 ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_RELATED_PRODUCT_CATEGORY.'+
     'PRODUCTS' ) | prpc\ product_category.name IN ['part' ,
     'raw material' , 'tool'] ) ) =1 ) ) ) ) =1 ) ) ) =1 ) ) )
     =1 ) ;
 WR2: ( SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+	'APPLIED_ORGANIZATION_ASSIGNMENT.'+
     'ITEMS' ) ) =1 ) AND ( SIZEOF ( QUERY ( aoa <* USEDIN (
     SELF ,
     'AUTOMOTIVE_DESIGN.'+	'APPLIED_ORGANIZATION_ASSIGNMENT.'+
     'ITEMS' ) | 	aoa. role.name ='destination' ) ) =1 ) ;
 WR3: ( SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+	'ACTION_PROPERTY.'+ 'DEFINITION' ) )
     =1 ) AND ( SIZEOF ( QUERY ( ap <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'ACTION_PROPERTY.'+ 'DEFINITION' ) |
     SIZEOF ( USEDIN ( ap ,
     'AUTOMOTIVE_DESIGN.'+'ACTION_PROPERTY_REPRESENTATION.'+
     'PROPERTY' ) ) =1 ) ) =1 ) AND ( SIZEOF ( QUERY ( ap <*
     USEDIN ( SELF , 'AUTOMOTIVE_DESIGN.'+'ACTION_PROPERTY.'+
     'DEFINITION' ) | SIZEOF ( QUERY ( apr <* USEDIN ( ap ,
     'AUTOMOTIVE_DESIGN.'+	'ACTION_PROPERTY_REPRESENTATION.'+
     'PROPERTY' ) | ( apr. representation.name =
     'delivery quantity' ) AND ( SIZEOF ( apr.
     representation.items ) =1 ) AND ( SIZEOF ( QUERY ( i <*
     apr. representation.items | SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'VALUE_RANGE']* TYPEOF ( i ) ) =1 ) ) =1 ) ) ) =1 ) ) =1 )
     ;
 WR4: SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'ACTION_RELATIONSHIP.'+
     'RELATING_ACTION' ) ) + SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'ACTION_RELATIONSHIP.'+
     'RELATED_ACTION' ) ) =0;
END_ENTITY;
(* Reuse from Product_class_mim
ENTITY exclusive_product_concept_feature_category
  SUBTYPE OF (product_concept_feature_category);
END_ENTITY;
*)
(* Reuse from Value_with_unit_extension_mim
ENTITY expression_conversion_based_unit
  SUBTYPE OF (context_dependent_unit, variable_semantics);
INVERSE
associated_variable_environment: environment FOR semantics;
END_ENTITY;
*)
(* Reuse from External_class_mim
ENTITY externally_defined_class
  SUBTYPE OF (class,externally_defined_item);
END_ENTITY;
*)
ENTITY externally_defined_feature_definition
  SUBTYPE OF (feature_definition,externally_defined_item);
WHERE
 WR1: ( SELF\externally_defined_item. item_id =
     'external thread' ) AND ( SELF\externally_defined_item.
     source.source_id = 'external feature specification' ) ;
 WR2: ( SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.APPLIED_CLASSIFICATION_ASSIGNMENT.ITEMS'
     ) ) =1 ) OR ( SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.APPLIED_DOCUMENT_REFERENCE.ITEMS' ) ) +
     SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.APPLIED_DOCUMENT_USAGE_CONSTRAINT_ASSIGNMENT.ITEMS'
     ) ) =1 ) ;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND NOT ( {6<= SIZEOF ( pdr.
     used_representation.items ) <=7} ) ) ) =0;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
     i.name = 'thread side' ) AND (
     i\descriptive_representation_item. description IN
     ['internal' , 'external'] ) ) ) =1 ) ) ) =1;
 WR5: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'LENGTH_MEASURE_WITH_UNIT']*TYPEOF (
     i ) ) =2 ) AND ( i.name = 'major diameter' ) ) ) =1 ) ) )
     =1;
 WR6: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'RATIO_MEASURE_WITH_UNIT']*TYPEOF ( i
     ) ) =2 ) AND ( i.name = 'number of threads' ) ) ) =1 ) ) )
     =1;
 WR7: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
     i.name = 'fit class' ) ) ) =1 ) ) ) =1;
 WR8: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
     i.name ='form' ) ) ) =1 ) ) ) =1;
 WR9: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
     i.name ='hand' ) AND ( i\descriptive_representation_item.
     description IN [ 'left hand' , 'right hand' ] ) ) ) =1 ) )
     ) =1;
 WR10: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
     i.name ='qualifier' ) ) ) =1 ) ) ) <=1;
 WR11: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( NOT ( i.name IN [
     'thread side' , 'major diameter' , 'number of threads' ,
     'fit class' , 'form' , 'hand' , 'qualifier'] ) ) ) ) >0 ) )
     ) =0;
END_ENTITY;
(* Reuse from External_properties_mim
ENTITY externally_defined_general_property
  SUBTYPE OF (general_property,externally_defined_item);
END_ENTITY;
*)
ENTITY face_shape_representation
  SUBTYPE OF (shape_representation);
WHERE
 WR1: SIZEOF ( SELF.items ) =1;
 WR2: SIZEOF ( QUERY ( i <* SELF.items | SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'FACE' , 'AUTOMOTIVE_DESIGN.'+
     'CLOSED_SHELL' , 'AUTOMOTIVE_DESIGN.'+ 'OPEN_SHELL']*TYPEOF
     ( i ) ) =1 ) ) =1;
END_ENTITY;

ENTITY feature_component_definition
  SUBTYPE OF (characterized_object);
WHERE
 WR1: SIZEOF ( get_shape_aspects ( SELF ) ) =1;
END_ENTITY;

ENTITY feature_component_relationship
  SUBTYPE OF (shape_aspect_relationship);
WHERE
 WR1: ( 'AUTOMOTIVE_DESIGN.'+ 'TRANSITION_FEATURE' IN TYPEOF (
     SELF.related_shape_aspect ) ) OR ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'FEATURE_DEFINITION' ,
     'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_DEFINITION']*TYPEOF (
     SELF.related_shape_aspect. of_shape.definition ) ) =1 ) ;
END_ENTITY;

ENTITY feature_definition
  SUBTYPE OF (characterized_object);
WHERE
 WR1: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) |
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) <=1;
 WR2: ( SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) |
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) =0 ) OR ( SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='orientation' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'PLACEMENT' IN TYPEOF ( i ) ) ) ) <=1
     ) ) ) =1 ) ;
 WR3: NOT ( ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+ 'BARRING_HOLE' ,
     'AUTOMOTIVE_DESIGN.'+ 'BEAD' , 'AUTOMOTIVE_DESIGN.'+
     'HOLE_IN_PANEL' , 'AUTOMOTIVE_DESIGN.'+ 'FEATURE_IN_PANEL'
     , 'AUTOMOTIVE_DESIGN.'+ 'JOGGLE' , 'AUTOMOTIVE_DESIGN.'+
     'LOCATOR']*TYPEOF ( SELF ) ) =1 ) OR (
     'AUTOMOTIVE_DESIGN.'+ 'COMPOUND_FEATURE' IN TYPEOF ( SELF )
     ) AND ( SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) |
     ( sa. name = 'compound feature in panel' ) ) ) =1 ) ) OR (
     ( SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) |
     'AUTOMOTIVE_DESIGN.'+ 'DIRECTION_SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) ) <=1 ) AND ( (
     SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) |
     'AUTOMOTIVE_DESIGN.'+ 'DIRECTION_SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) ) =0 ) OR ( SIZEOF (
     QUERY ( pdr <* get_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'DIRECTION_SHAPE_REPRESENTATION' IN TYPEOF ( pdr.
     used_representation ) ) AND ( pdr. used_representation.name
     = 'punch direction' ) ) ) =1 ) ) ) ;
 WR4: ( SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) |
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) =0 ) OR ( SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'GEOMETRIC_REPRESENTATION_CONTEXT' IN TYPEOF ( pdr.
     used_representation.context_of_items ) ) AND ( pdr.
     used_representation.context_of_items\
     geometric_representation_context.coordinate_space_dimension
     =3 ) ) ) =1 ) ;
 WR5: NOT ( ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+ 'BOSS' ,
     'AUTOMOTIVE_DESIGN.'+ 'RIB' , 'AUTOMOTIVE_DESIGN.'+ 'SLOT'
     , 'AUTOMOTIVE_DESIGN.'+ 'ROUND_HOLE' ,
     'AUTOMOTIVE_DESIGN.'+ 'POCKET']*TYPEOF ( SELF ) ) =1 ) OR (
     'AUTOMOTIVE_DESIGN.'+ 'COMPOUND_FEATURE' IN TYPEOF ( SELF )
     ) AND ( SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) |
     ( 'AUTOMOTIVE_DESIGN.'+ 'COMPOSITE_SHAPE_ASPECT' IN TYPEOF
     ( sa ) ) AND ( sa. name = 'compound feature in solid' ) ) )
     =1 ) ) OR ( ( SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) |
     'AUTOMOTIVE_DESIGN.'+ 'DIRECTION_SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) ) =1 ) AND ( SIZEOF (
     QUERY ( pdr <* get_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'DIRECTION_SHAPE_REPRESENTATION' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name ='orientation' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'PLACEMENT' IN TYPEOF ( i ) ) ) ) =1
     ) ) ) =1 ) ) ;
 WR6: SIZEOF ( ['AUTOMOTIVE_DESIGN.'+ 'BEAD' ,
     'AUTOMOTIVE_DESIGN.'+ 'BARRING_HOLE' ,
     'AUTOMOTIVE_DESIGN.'+ 'BOSS' , 'AUTOMOTIVE_DESIGN.'+
     'COMPOUND_FEATURE' , 'AUTOMOTIVE_DESIGN.'+
     'EXTERNALLY_DEFINED_FEATURE_DEFINITION' ,
     'AUTOMOTIVE_DESIGN.'+ 'FEATURE_IN_PANEL' ,
     'AUTOMOTIVE_DESIGN.'+ 'GENERAL_FEATURE' ,
     'AUTOMOTIVE_DESIGN.'+ 'HOLE_IN_PANEL' ,
     'AUTOMOTIVE_DESIGN.'+ 'JOGGLE' , 'AUTOMOTIVE_DESIGN.'+
     'LOCATOR' , 'AUTOMOTIVE_DESIGN.'+ 'POCKET' ,
     'AUTOMOTIVE_DESIGN.'+ 'RIB' , 'AUTOMOTIVE_DESIGN.'+
     'REPLICATE_FEATURE' , 'AUTOMOTIVE_DESIGN.'+ 'ROUND_HOLE' ,
     'AUTOMOTIVE_DESIGN.'+ 'SLOT' , 'AUTOMOTIVE_DESIGN.'+
     'THREAD']* TYPEOF ( SELF ) ) <=1;
END_ENTITY;

ENTITY feature_in_panel
  SUBTYPE OF (feature_definition);
WHERE
 WR1:SELF.description IN ['pocket' , 'boss' , 'stairstep'];
 WR2: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND NOT ( {2<= SIZEOF ( pdr.
     used_representation.items ) <=3} ) ) ) =0;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | NOT ( i.name IN ['orientation'
     , 'base radius' , 'target radius' ] ) ) ) >0 ) ) ) =0;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'base radius' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1;
 WR5: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'target radius' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1;
 WR6: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     name = 'base boundary' ) AND ( sa. description IN [
     'directed angle occurrence' , 'closed profile occurrence' ]
     ) ) ) =1;
 WR7: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     name = 'target boundary' ) AND ( sa. description IN [
     'directed angle occurrence' , 'closed profile occurrence' ]
     ) ) ) =1;
 WR8: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'directed angle occurrence' ) ) ) <=1;
 WR9: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'directed angle occurrence' ) AND ( SIZEOF (
     QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. name = 'directed angle usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'DIRECTED_ANGLE' IN TYPEOF ( sar.
     relating_shape_aspect ) ) ) ) =1 ) ) ) = SIZEOF ( QUERY (
     sa <* get_shape_aspects ( SELF ) | ( sa. description =
     'directed angle occurrence' ) ) ) ;
 WR10: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'closed profile occurrence' ) AND ( SIZEOF (
     QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'profile usage' ) AND ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'CIRCULAR_CLOSED_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'NGON_CLOSED_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'RECTANGULAR_CLOSED_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'CLOSED_PATH_PROFILE']* TYPEOF ( sar.
     relating_shape_aspect ) ) =1 ) ) ) =1 ) ) ) = SIZEOF (
     QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'closed profile occurrence' ) ) ) ;
 WR11: ( SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) |
     'AUTOMOTIVE_DESIGN.'+ 'FACE_SHAPE_REPRESENTATION' IN TYPEOF
     ( pdr. used_representation ) ) ) <=1 ) AND ( SIZEOF ( QUERY
     ( pdr <* get_property_definition_representations ( SELF ) |
     ( 'AUTOMOTIVE_DESIGN.'+ 'FACE_SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) AND NOT ( pdr.
     used_representation.name = 'target face' ) ) ) =0 ) ;
 WR12: ( SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | (
     sa. name = 'target boundary' ) AND ( sa. description =
     'directed angle occurrence' ) ) ) =0 ) OR ( SIZEOF ( QUERY
     ( pdr <* get_property_definition_representations ( SELF ) |
     ( 'AUTOMOTIVE_DESIGN.'+ 'FACE_SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) ) ) =1 ) ;
END_ENTITY;

ENTITY feature_pattern
  SUBTYPE OF (replicate_feature);
WHERE
 WR1: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name =
     'added instance placement' ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'PLACEMENT' IN TYPEOF ( i ) ) ) ) >1 ) ) ) =1;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | NOT ( 'AUTOMOTIVE_DESIGN.'+
     'PLACEMENT' IN TYPEOF ( i ) ) ) ) >0 ) ) ) =0;
END_ENTITY;

ENTITY featured_shape
  SUBTYPE OF (product_definition_shape);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_DEFINITION' IN TYPEOF (
     SELF.definition ) ;
 WR2: ( SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_RELATIONSHIP.'+'RELATED_PROPERTY_DEFINITION'
     ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_RELATIONSHIP.'+
     'RELATED_PROPERTY_DEFINITION' ) | ( pdr. name =
     'featured shape sequence' ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'PRODUCT_DEFINITION_SHAPE' IN TYPEOF ( pdr.
     relating_property_definition ) ) AND ( pdr.
     relating_property_definition:<>:SELF ) ) ) =1 ) ;
 WR3: SIZEOF ( QUERY ( pdr <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_RELATIONSHIP.'+
     'RELATED_PROPERTY_DEFINITION' ) | SELF.definition:=:pdr.
     relating_property_definition.definition ) ) =1;
 WR4: SIZEOF ( QUERY ( sa <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT.'+ 'OF_SHAPE' ) | SIZEOF
     ( ['AUTOMOTIVE_DESIGN.'+ 'PLACED_FEATURE' ,
     'AUTOMOTIVE_DESIGN.'+ 'INSTANCED_FEATURE']* TYPEOF ( sa ) )
     =1 ) ) >=1;
END_ENTITY;

ENTITY fillet
  SUBTYPE OF (transition_feature);
WHERE
 WR1: ( SELF.description<> 'constant radius' ) XOR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1 ) ;
 WR2: ( SELF.description<> 'constant radius' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND {1<= SIZEOF ( pdr.
     used_representation.items ) <=3} ) ) =1 ) ;
 WR3: ( SELF.description<> 'constant radius' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | NOT ( i.name IN ['radius' ,
     'first offset' , 'second offset' ] ) ) ) >0 ) ) ) =0 ) ;
 WR4: ( SELF.description<> 'constant radius' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='radius' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1 ) ;
 WR5: ( SELF.description<> 'constant radius' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'first offset' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) <=1 ) )
     ) =1 ) ;
 WR6: ( SELF.description<> 'constant radius' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'second offset' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) <=1 ) )
     ) =1 ) ;
 WR7: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'FACE_SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) AND ( SIZEOF ( QUERY
     ( i <* pdr. used_representation.items | ( i.name=
     'first face shape' ) ) ) =1 ) ) ) =1;
 WR8: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'FACE_SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) AND ( SIZEOF ( QUERY
     ( i <* pdr. used_representation.items | ( i.name=
     'second face shape' ) ) ) =1 ) ) ) =1;
 WR9: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'FACE_SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) AND ( SIZEOF ( QUERY
     ( i <* pdr. used_representation.items | ( i.name=
     'fillet face' ) ) ) =1 ) ) ) =1;
END_ENTITY;

ENTITY general_feature
  SUBTYPE OF (feature_definition);
WHERE
 WR1: ( SIZEOF ( get_property_definition_representations ( SELF
     ) ) <=1 ) AND ( SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) |
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) <=1 ) ;
 WR2: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | sa.
     description = 'course of travel occurrence' ) ) = SIZEOF (
     QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'course of travel occurrence' ) AND ( SIZEOF
     ( QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. name = 'course of travel' ) ) ) =1 ) ) ) ;
 WR3: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | sa.
     description = 'course of travel occurrence' ) ) = SIZEOF (
     QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'course of travel occurrence' ) AND ( SIZEOF
     ( QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'PATH_FEATURE_COMPONENT' IN TYPEOF (
     sar. relating_shape_aspect ) ) ) ) =1 ) ) ) ;
 WR4: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | sa.
     description = 'boundary occurrence' ) ) = SIZEOF ( QUERY (
     sa <* get_shape_aspects ( SELF ) | ( sa. description =
     'boundary occurrence' ) AND ( SIZEOF ( QUERY ( sar <*
     USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'profile usage' ) ) ) =1 ) ) ) ;
 WR5: ( SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+ 'COMPOSITE_SHAPE_ASPECT' IN TYPEOF (
     sa ) ) ) ) <=1 ) AND ( SIZEOF ( QUERY ( sa <*
     get_shape_aspects ( SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'COMPOSITE_SHAPE_ASPECT' IN TYPEOF ( sa ) ) AND ( sa. name
     = 'general compound feature' ) AND ( SIZEOF ( QUERY ( sar
     <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATING_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'INSTANCED_FEATURE' IN TYPEOF ( sar.
     related_shape_aspect ) ) ) ) >=2 ) ) ) <=1 ) ;
END_ENTITY;
(* Reuse from Generic_material_aspects_mim
ENTITY general_material_property
  SUBTYPE OF (general_property);
WHERE
 WR1: SIZEOF ( QUERY ( gpa <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.GENERAL_PROPERTY_ASSOCIATION.'+'BASE_DEFINITION'
     ) | NOT ( 'AUTOMOTIVE_DESIGN.'+ 'MATERIAL_PROPERTY' IN
     TYPEOF ( gpa. derived_definition ) ) ) ) =0;
END_ENTITY;
*)
(* Reuse from Surface_conditions_mim
ENTITY hardness_representation
  SUBTYPE OF (representation);
WHERE
 WR1: ( {2<= SIZEOF ( SELF.items ) <=4} ) AND ( SIZEOF ( QUERY (
     i <* items | ( 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
     i.name IN [ 'measuring method' , 'measuring position' ] ) )
     ) + SIZEOF ( QUERY ( i <* items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'VALUE_RANGE']* TYPEOF ( i ) ) =1 )
     AND ( i.name IN ['depth' , 'hardness'] ) ) ) = SIZEOF (
     SELF.items ) ) ;
 WR2: SIZEOF ( QUERY ( i <* SELF.items | i.name =
     'measuring method' ) ) =1;
 WR3: SIZEOF ( QUERY ( i <* SELF.items | i.name ='hardness' ) )
     =1;
 WR4: SIZEOF ( QUERY ( i <* SELF.items | i.name =
     'measuring position' ) ) <=1;
 WR5: SIZEOF ( QUERY ( i <* SELF.items | i.name ='depth' ) )
     <=1;
 WR6: ( SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
     'USED_REPRESENTATION' ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr
     <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
     'USED_REPRESENTATION' ) | SIZEOF ( QUERY ( gpa <* USEDIN (
     pdr. definition ,
     'AUTOMOTIVE_DESIGN.'+'GENERAL_PROPERTY_ASSOCIATION.'+
     'DERIVED_DEFINITION' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'GENERAL_PROPERTY' IN TYPEOF ( gpa. base_definition ) ) AND
     ( gpa. base_definition.name ='surface_condition' ) ) ) =1 )
     ) =1 ) ;
END_ENTITY;
*)
(* Reuse from Hidden_element_handling_mim
ENTITY hidden_element_over_riding_styled_item
  SUBTYPE OF (context_dependent_over_riding_styled_item);
WHERE
 WR1: SIZEOF ( SELF.style_context ) =1;
 WR2:'AUTOMOTIVE_DESIGN.'+ 'PRESENTATION_VIEW' IN TYPEOF (
     SELF.style_context[1] ) ;
 WR3:'AUTOMOTIVE_DESIGN.'+ 'CAMERA_IMAGE' IN TYPEOF ( SELF.item
     ) ;
 WR4:'AUTOMOTIVE_DESIGN.'+ 'CAMERA_MODEL_D3_WITH_HLHSR' IN
     TYPEOF ( SELF.item\ mapped_item.mapping_source.
     mapping_origin ) ;
 WR5: SIZEOF ( QUERY ( rep <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.REPRESENTATION.ITEMS' ) |
     'AUTOMOTIVE_DESIGN.'+ 'PRESENTATION_VIEW' IN TYPEOF ( rep )
     ) ) >0;
END_ENTITY;
*)
ENTITY hole_bottom
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'FEATURE_COMPONENT_DEFINITION' IN
     TYPEOF ( SELF.of_shape. definition ) ;
 WR2:SELF.description IN ['through' , 'flat' , 'flat with taper'
     , 		 'flat with radius' , 'spherical' , 'conical'];
 WR3: NOT ( SELF.description IN ['through' , 'flat'] ) OR (
     SIZEOF (
     get_shape_aspect_property_definition_representations ( SELF
     ) ) =0 ) ;
 WR4: NOT ( SELF.description IN [ 'flat with radius' ,
     'flat with taper' , 'spherical' , 'conical'] ) OR ( SIZEOF
     ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1 ) ;
 WR5: ( SELF.description<> 'flat with taper' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =2 ) ) ) =1 ) ;
 WR6: ( SELF.description<>'conical' ) OR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND {1<= SIZEOF ( pdr.
     used_representation.items ) <=2} ) ) =1 ) ;
 WR7: NOT ( SELF.description IN [ 'flat with radius' ,
     'spherical'] ) OR ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =1 ) ) ) =1 ) ;
 WR8: ( SELF.description<> 'flat with radius' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'corner radius' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1 ) ;
 WR9: ( SELF.description<>'spherical' ) OR ( SIZEOF ( QUERY (
     pdr <* get_shape_aspect_property_definition_representations
     ( SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='radius' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1 ) ;
 WR10: ( SELF.description<>'conical' ) OR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'tip radius' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) <=1 ) )
     ) =1 ) ;
 WR11: ( SELF.description<>'conical' ) OR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'tip angle' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1
     ) ) ) =1 ) ;
 WR12: ( SELF.description<> 'flat with taper' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'final diameter' )
     AND ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1 ) ;
 WR13: ( SELF.description<> 'flat with taper' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'taper diameter' )
     AND ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1
     ) ) ) =1 ) ;
 WR14: SIZEOF ( QUERY ( sar <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATING_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'hole bottom usage' ) AND ( sar.
     related_shape_aspect.description =
     'bottom condition occurrence' ) ) ) =1;
 WR15: ( SELF.description ='through' ) OR ( SIZEOF ( QUERY ( sar
     <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATING_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. name IN [ 'starting' , 'ending' ] ) )
     ) =1 ) ;
END_ENTITY;

ENTITY hole_in_panel
  SUBTYPE OF (feature_definition);
WHERE
 WR1: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     name = 'hole profile' ) AND ( sa. description =
     'closed profile occurrence' ) AND ( SIZEOF ( QUERY ( sar <*
     USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'profile usage' ) AND ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'CIRCULAR_CLOSED_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'NGON_CLOSED_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'RECTANGULAR_CLOSED_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'CLOSED_PATH_PROFILE']* TYPEOF ( sar.
     relating_shape_aspect ) ) =1 ) ) ) =1 ) ) ) =1;
 WR2: SIZEOF ( get_property_definition_representations ( SELF )
     ) = SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | SIZEOF (
     pdr. used_representation.items ) =1 ) ) ;
END_ENTITY;

ENTITY homokinetic_pair
  SUBTYPE OF (universal_pair);
WHERE
 WR1: NOT EXISTS ( SELF.input_skew_angle ) ;
END_ENTITY;
(* Reuse from Product_class_mim
ENTITY inclusion_product_concept_feature
  SUBTYPE OF (conditional_concept_feature);
WHERE
 WR1: NOT ( 'AUTOMOTIVE_DESIGN.'+
     'PACKAGE_PRODUCT_CONCEPT_FEATURE' IN TYPEOF ( SELF ) ) ;
 WR2: SIZEOF ( QUERY ( cfr <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.CONCEPT_FEATURE_RELATIONSHIP.'+'RELATING_PRODUCT_CONCEPT_FEATURE'
     ) | 'AUTOMOTIVE_DESIGN.'+
     'CONCEPT_FEATURE_RELATIONSHIP_WITH_CONDITION' IN TYPEOF (
     cfr ) ) ) + SIZEOF ( QUERY ( cfr <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.CONCEPT_FEATURE_RELATIONSHIP.'+'RELATED_PRODUCT_CONCEPT_FEATURE'
     ) | 'AUTOMOTIVE_DESIGN.'+
     'CONCEPT_FEATURE_RELATIONSHIP_WITH_CONDITION' IN TYPEOF (
     cfr ) ) ) =0;
 WR3:SELF.condition. conditional_operator.name ='implication';
END_ENTITY;
*)
(* Reuse from Shape_feature_mim
ENTITY instanced_feature
  SUBTYPE OF (shape_aspect,feature_definition);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_DEFINITION' IN TYPEOF (
     SELF.of_shape. definition ) ;
 WR2:SELF.product_definitional;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'PLANAR_SHAPE_REPRESENTATION'
     IN TYPEOF ( pdr. used_representation ) ) AND ( pdr.
     used_representation.name = 'maximum feature limit' ) ) )
     =1;
END_ENTITY;
*)
ENTITY joggle
  SUBTYPE OF (feature_definition);
WHERE
 WR1: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND NOT ( {5<= SIZEOF ( pdr.
     used_representation.items ) <=10} ) ) ) =0;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | NOT ( i.name IN ['orientation'
     , 'base radius 1' , 'base radius 2' , 'direction angle 1' ,
     'direction angle 2' , 'height' , 'slope angle 1' ,
     'slope angle 2' , 'top radius 1' , 'top radius 2' ] ) ) )
     >0 ) ) ) =0;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'direction angle 1' )
     AND ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1
     ) ) ) =1;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'direction angle 2' )
     AND ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1
     ) ) ) =1;
 WR5: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='height' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) <=1;
 WR6: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'slope angle 1' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1
     ) ) ) =1;
 WR7: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'slope angle 2' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1
     ) ) ) =1;
 WR8: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     name = 'defining path' ) AND ( sa. description =
     'path feature component occurrence' ) AND ( SIZEOF ( QUERY
     ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'path feature component usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'PATH_FEATURE_COMPONENT' IN TYPEOF (
     sar. relating_shape_aspect ) ) AND ( sar.
     relating_shape_aspect.description ='linear' ) ) ) =1 ) ) )
     =1;
 WR9: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     name ='termination' ) AND ( sa. description =
     'joggle termination occurrence' ) AND ( SIZEOF ( QUERY (
     sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. name = 'joggle termination usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'JOGGLE_TERMINATION' IN TYPEOF ( sar.
     relating_shape_aspect ) ) ) ) =1 ) ) ) =1;
 WR10: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'base radius 1' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) <=1;
 WR11: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'base radius 2' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) <=1;
 WR12: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'top radius 1' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) <=1;
 WR13: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'top radius 2' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) <=1;
END_ENTITY;

ENTITY joggle_termination
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'FEATURE_COMPONENT_DEFINITION' IN
     TYPEOF ( SELF.of_shape. definition ) ;
 WR2:SELF.description IN [ 'value termination' ,
     'face termination' ];
 WR3: ( SELF.description = 'value termination' ) XOR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =0 ) ;
 WR4: ( SELF.description<> 'value termination' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =2 ) ) ) =1 ) ;
 WR5: ( SELF.description<> 'value termination' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='depth' ) AND ( SIZEOF
     ( ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'LENGTH_MEASURE_WITH_UNIT']*TYPEOF (
     i ) ) =2 ) ) ) =1 ) ) ) =1 ) ;
 WR6: ( SELF.description<> 'value termination' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='angle' ) AND ( SIZEOF
     ( ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1
     ) ) ) =1 ) ;
 WR7: SIZEOF ( QUERY ( sar <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATING_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. name = 'joggle termination usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'JOGGLE' IN TYPEOF ( sar.
     related_shape_aspect.of_shape. definition ) ) AND ( sar.
     related_shape_aspect.of_shape.
     definition\characterized_object. name ='termination' ) AND
     ( sar. related_shape_aspect.of_shape.
     definition\characterized_object. description =
     'joggle termination occurrence' ) ) ) =1;
END_ENTITY;
(* Reuse from Plib_class_reference_mim
ENTITY known_source
  SUBTYPE OF (external_source, pre_defined_item);
END_ENTITY;
*)
(* Reuse from Multi_linguism_mim
ENTITY language
  SUBTYPE OF (group);
END_ENTITY;
*)
ENTITY language_assignment
  SUBTYPE OF (classification_assignment);
  items : SET [1:?] OF language_item;
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'LANGUAGE' IN TYPEOF (
     SELF.assigned_class ) ;
 WR2:SELF.role. name ='language';
 WR3: SIZEOF ( SELF.items ) = SIZEOF ( QUERY ( i <* SELF.items |
     ( 'AUTOMOTIVE_DESIGN.'+ 'REPRESENTATION' IN TYPEOF ( i ) )
     AND ( i\representation. name = 'document content' ) ) ) ;
END_ENTITY;
(* Reuse from Feature_and_connection_zone_mim
ENTITY location_shape_representation
  SUBTYPE OF (shape_representation);
WHERE
 WR1: SIZEOF ( SELF.items ) =1;
 WR2: SIZEOF ( QUERY ( i <* SELF.items | 'AUTOMOTIVE_DESIGN.'+
     'POINT' IN TYPEOF ( i ) ) ) =1;
END_ENTITY;
*)
ENTITY locator
  SUBTYPE OF (feature_definition);
WHERE
 WR1: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND NOT ( {2<= SIZEOF ( pdr.
     used_representation.items ) <=5} ) ) ) =0;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='diameter' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'tip radius' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) <=1;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'tip angle' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1
     ) ) ) =1;
 WR5: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'base radius' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) <=1;
END_ENTITY;

ENTITY modified_pattern
  SUBTYPE OF (replicate_feature);
WHERE
 WR1: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | (
     SIZEOF ( QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATING_SHAPE_ASPECT' ) | ( sar. description =
     'base pattern' ) AND ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'CIRCULAR_PATTERN' , 'AUTOMOTIVE_DESIGN.'+
     'RECTANGULAR_PATTERN']* TYPEOF ( sar.
     related_shape_aspect.of_shape. definition ) ) =1 ) ) ) =1 )
     ) ) =1;
 WR2: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | (
     SIZEOF ( QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATING_SHAPE_ASPECT' ) | ( SIZEOF ( QUERY ( sar1 <*
     USEDIN ( sar. related_shape_aspect ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( sar.
     related_shape_aspect:<>:sar1. related_shape_aspect ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+ 'PATTERN_OFFSET_MEMBERSHIP'
     , 'AUTOMOTIVE_DESIGN.'+ 'PATTERN_OMIT_MEMBERSHIP']* TYPEOF
     ( sar1 ) ) =1 ) ) ) =1 ) ) ) >=1 ) ) ) =1;
END_ENTITY;
(* Reuse from Inertia_characteristics_mim
ENTITY moments_of_inertia_representation
  SUBTYPE OF (representation);
WHERE
 WR1: ( SIZEOF ( SELF.items ) =1 ) AND ( SIZEOF ( QUERY ( i <*
     SELF.items | ( 'AUTOMOTIVE_DESIGN.'+
     'COMPOUND_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
     i.name = 'moments of inertia matrix' ) ) ) =1 ) ;
 WR2: SIZEOF ( QUERY ( i <* SELF.items | ( 'AUTOMOTIVE_DESIGN.'+
     'COMPOUND_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
     SIZEOF ( i\compound_representation_item. item_element ) =3
     ) AND ( 'AUTOMOTIVE_DESIGN.'+ 'LIST_REPRESENTATION_ITEM' IN
     TYPEOF ( i\compound_representation_item. item_element ) )
     AND value_range_aggregate_rep_item (
     i\compound_representation_item. item_element ) ) ) =1;
END_ENTITY;
*)
(* Reuse from Multi_linguism_mim
ENTITY multi_language_attribute_assignment
  SUBTYPE OF (attribute_value_assignment);
  items : SET [1:?] OF multi_language_attribute_item;
DERIVE
language : label := get_multi_language(SELF);
WHERE
 WR1:SELF\attribute_value_assignment. role.name =
     'alternate language' ;
 WR2: ( SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.ATTRIBUTE_LANGUAGE_ASSIGNMENT.ITEMS' ) )
     =1 ) AND ( SIZEOF ( QUERY ( ala <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ala. attribute_name ='attribute_value' ) ) =1 )
     ;
END_ENTITY;
*)
ENTITY named_unit_variable
  SUBTYPE OF (named_unit, variable_semantics);

INVERSE
associated_variable_environment: environment FOR semantics;
END_ENTITY;

ENTITY ngon_closed_profile
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'FEATURE_COMPONENT_DEFINITION' IN
     TYPEOF ( SELF.of_shape. definition ) ;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND {3<= SIZEOF ( pdr.
     used_representation.items ) <=4} ) ) =1;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | NOT ( i.name IN ['orientation'
     , 'number of sides' , 'circumscibed diameter' ,
     'diameter across flats' , 'corner radius' ] ) ) ) =0 ) ) )
     =1;
 WR5: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( 'AUTOMOTIVE_DESIGN.'+
     'PLACEMENT' IN TYPEOF ( i ) ) AND ( i.name ='orientation' )
     ) ) =1 ) ) ) =1;
 WR6: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'number of sides' )
     AND ( 'AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM'
     IN TYPEOF ( i ) ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'COUNT_MEASURE' IN TYPEOF ( i\measure_with_unit.
     value_component ) ) ) ) =1 ) ) ) =1;
 WR7: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name IN [
     'circumscribed diameter' , 'diameter across flats' ] ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1;
 WR8: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name = 'corner radius' ) )
     ) <=1 ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name = 'corner radius' )
     AND ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =
     SIZEOF ( QUERY ( i <* pdr. used_representation.items | (
     i.name = 'corner radius' ) ) ) ) ) ) =1;
END_ENTITY;

ENTITY open_path_profile
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'FEATURE_COMPONENT_DEFINITION' IN
     TYPEOF ( SELF.of_shape. definition ) ;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =1 ) ) ) =1;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( 'AUTOMOTIVE_DESIGN.'+
     'PLACEMENT' IN TYPEOF ( i ) ) AND ( i.name ='orientation' )
     ) ) =1 ) ) ) =1;
 WR5: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'PATH_SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) ) ) =1;
 WR6: ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'PLANAR_SHAPE_REPRESENTATION'
     IN TYPEOF ( pdr. used_representation ) ) ) ) <=1 ) AND (
     SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'PLANAR_SHAPE_REPRESENTATION'
     IN TYPEOF ( pdr. used_representation ) ) ) ) = SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'PLANAR_SHAPE_REPRESENTATION'
     IN TYPEOF ( pdr. used_representation ) ) AND ( pdr.
     used_representation.name = 'profile limit' ) ) ) ) ;
END_ENTITY;
(* Reuse from Product_class_mim
ENTITY package_product_concept_feature
  SUBTYPE OF (product_concept_feature);
WHERE
 WR1: NOT ( 'AUTOMOTIVE_DESIGN.'+ 'CONDITIONAL_CONCEPT_FEATURE'
     IN TYPEOF ( SELF ) ) ;
 WR2: SIZEOF ( QUERY ( cfr <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.CONCEPT_FEATURE_RELATIONSHIP.'+'RELATING_PRODUCT_CONCEPT_FEATURE'
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'CONCEPT_FEATURE_RELATIONSHIP_WITH_CONDITION' IN TYPEOF (
     cfr ) ) AND ( SIZEOF ( QUERY ( ipcf <* USEDIN ( cfr ,
     'AUTOMOTIVE_DESIGN.CONDITIONAL_CONCEPT_FEATURE.'+'CONDITION'
     ) | 'AUTOMOTIVE_DESIGN.'+
     'INCLUSION_PRODUCT_CONCEPT_FEATURE' IN TYPEOF ( ipcf ) ) )
     =1 ) ) ) >0;
END_ENTITY;
*)
ENTITY partial_circular_profile
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'FEATURE_COMPONENT_DEFINITION' IN
     TYPEOF ( SELF.of_shape. definition ) ;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =3 ) ) ) =1;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | NOT ( i.name IN ['orientation'
     , 'sweep angle' , 'radius'] ) ) ) =0 ) ) ) =1;
 WR5: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( 'AUTOMOTIVE_DESIGN.'+
     'PLACEMENT' IN TYPEOF ( i ) ) AND ( i.name ='orientation' )
     ) ) =1 ) ) ) =1;
 WR6: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='radius' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1;
 WR7: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'sweep angle' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1
     ) ) ) =1;
 WR8: ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'PLANAR_SHAPE_REPRESENTATION'
     IN TYPEOF ( pdr. used_representation ) ) ) ) <=1 ) AND (
     SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'PLANAR_SHAPE_REPRESENTATION'
     IN TYPEOF ( pdr. used_representation ) ) ) ) = SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'PLANAR_SHAPE_REPRESENTATION'
     IN TYPEOF ( pdr. used_representation ) ) AND ( pdr.
     used_representation.name = 'profile limit' ) ) ) ) ;
END_ENTITY;

ENTITY path_feature_component
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'FEATURE_COMPONENT_DEFINITION' IN
     TYPEOF ( SELF.of_shape. definition ) ;
 WR2:SELF.description IN [ 'partial circular' ,
     'complete circular' , 'linear' , 'complex'];
 WR3: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( 'AUTOMOTIVE_DESIGN.'+
     'PLACEMENT' IN TYPEOF ( i ) ) AND ( i.name ='orientation' )
     ) ) =1 ) ) ) =1;
 WR5: ( SELF.description<> 'partial circular' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =3 ) ) ) =1 ) ;
 WR6: ( SELF.description<> 'partial circular' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='radius' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1 ) ;
 WR7: ( SELF.description<> 'partial circular' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'sweep angle' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1
     ) ) ) =1 ) ;
 WR8: ( SELF.description<> 'complete circular' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =2 ) ) ) =1 ) ;
 WR9: ( SELF.description<> 'complete circular' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='radius' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1 ) ;
 WR10: ( SELF.description<>'linear' ) OR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =2 ) ) ) =1 ) ;
 WR11: ( SELF.description<>'linear' ) OR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='distance' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1 ) ;
 WR12: ( SELF.description<>'complex' ) OR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'PATH_SHAPE_REPRESENTATION' IN TYPEOF ( pdr.
     used_representation ) ) AND ( pdr. name= 'sweep path' ) ) )
     =1 ) AND ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'PATH_SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) AND ( pdr. name=
     'sweep path' ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'path curve' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'CURVE' IN TYPEOF ( i ) ) ) ) =1 ) )
     ) =1 ) ;
 WR13: ( SELF.description<>'complex' ) OR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =1 ) ) ) =1 ) ;
END_ENTITY;

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

ENTITY pattern_offset_membership
  SUBTYPE OF (feature_component_relationship);
WHERE
 WR1: SIZEOF ( ['AUTOMOTIVE_DESIGN.'+ 'CIRCULAR_PATTERN' ,
     'AUTOMOTIVE_DESIGN.'+ 'RECTANGULAR_PATTERN']* TYPEOF (
     SELF.relating_shape_aspect. of_shape.definition ) ) =1;
 WR2: SIZEOF ( QUERY ( sar <* USEDIN ( SELF.related_shape_aspect
     ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'MODIFIED_PATTERN' IN TYPEOF ( sar.
     relating_shape_aspect.of_shape. definition ) ) AND ( sar.
     description = 'modified pattern' ) ) ) >=1;
 WR3: SIZEOF ( get_property_definition_representations (
     SELF.related_shape_aspect. of_shape.definition ) ) =1;
 WR4: NOT ( 'AUTOMOTIVE_DESIGN.'+ 'CIRCULAR_PATTERN' IN TYPEOF (
     SELF.relating_shape_aspect. of_shape.definition ) ) OR (
     SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations (
     SELF.related_shape_aspect. of_shape.definition ) | ( SIZEOF
     ( pdr. used_representation.items ) =2 ) ) ) =1 ) ;
 WR5: NOT ( 'AUTOMOTIVE_DESIGN.'+ 'CIRCULAR_PATTERN' IN TYPEOF (
     SELF.relating_shape_aspect. of_shape.definition ) ) OR (
     SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations (
     SELF.related_shape_aspect. of_shape.definition ) | ( SIZEOF
     ( QUERY ( i <* pdr. used_representation.items | ( i.name=
     'index number' ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'COUNT_MEASURE' IN TYPEOF (
     i\measure_with_unit. value_component ) ) ) ) =1 ) ) ) =1 )
     ;
 WR6: NOT ( 'AUTOMOTIVE_DESIGN.'+ 'CIRCULAR_PATTERN' IN TYPEOF (
     SELF.relating_shape_aspect. of_shape.definition ) ) OR (
     SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations (
     SELF.related_shape_aspect. of_shape.definition ) | ( SIZEOF
     ( QUERY ( i <* pdr. used_representation.items | (
     i.name='offset' ) AND ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1
     ) ) ) =1 ) ;
 WR7: NOT ( 'AUTOMOTIVE_DESIGN.'+ 'RECTANGULAR_PATTERN' IN
     TYPEOF ( SELF.relating_shape_aspect. of_shape.definition )
     ) OR ( SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations (
     SELF.related_shape_aspect. of_shape.definition ) | ( SIZEOF
     ( pdr. used_representation.items ) =3 ) ) ) =1 ) ;
 WR8: NOT ( 'AUTOMOTIVE_DESIGN.'+ 'RECTANGULAR_PATTERN' IN
     TYPEOF ( SELF.relating_shape_aspect. of_shape.definition )
     ) OR ( SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations (
     SELF.related_shape_aspect. of_shape.definition ) | ( SIZEOF
     ( QUERY ( i <* pdr. used_representation.items | ( i.name=
     'row index' ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'COUNT_MEASURE' IN TYPEOF (
     i\measure_with_unit. value_component ) ) ) ) =1 ) ) ) =1 )
     ;
 WR9: NOT ( 'AUTOMOTIVE_DESIGN.'+ 'RECTANGULAR_PATTERN' IN
     TYPEOF ( SELF.relating_shape_aspect. of_shape.definition )
     ) OR ( SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations (
     SELF.related_shape_aspect. of_shape.definition ) | ( SIZEOF
     ( QUERY ( i <* pdr. used_representation.items | ( i.name=
     'column index' ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'COUNT_MEASURE' IN TYPEOF (
     i\measure_with_unit. value_component ) ) ) ) =1 ) ) ) =1 )
     ;
 WR10: NOT ( 'AUTOMOTIVE_DESIGN.'+ 'RECTANGULAR_PATTERN' IN
     TYPEOF ( SELF.relating_shape_aspect. of_shape.definition )
     ) OR ( SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations (
     SELF.related_shape_aspect. of_shape.definition ) | ( SIZEOF
     ( QUERY ( i <* pdr. used_representation.items | ( i.name=
     'offset distance' ) AND ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1 ) ;
 WR11: NOT ( 'AUTOMOTIVE_DESIGN.'+ 'RECTANGULAR_PATTERN' IN
     TYPEOF ( SELF.relating_shape_aspect. of_shape.definition )
     ) OR ( SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations (
     SELF.related_shape_aspect. of_shape.definition ) | (
     'AUTOMOTIVE_DESIGN.'+ 'DIRECTION_SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) AND ( pdr.
     used_representation.name = 'offset direction' ) ) ) =1 ) ;
END_ENTITY;

ENTITY pattern_omit_membership
  SUBTYPE OF (feature_component_relationship);
WHERE
 WR1: SIZEOF ( ['AUTOMOTIVE_DESIGN.'+ 'CIRCULAR_PATTERN' ,
     'AUTOMOTIVE_DESIGN.'+ 'RECTANGULAR_PATTERN']* TYPEOF (
     SELF.relating_shape_aspect. of_shape.definition ) ) =1;
 WR2: SIZEOF ( QUERY ( sar <* USEDIN ( SELF.related_shape_aspect
     ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'MODIFIED_PATTERN' IN TYPEOF ( sar.
     relating_shape_aspect.of_shape. definition ) ) AND ( sar.
     description = 'modified pattern' ) ) ) >=1;
 WR3: SIZEOF ( get_property_definition_representations (
     SELF.related_shape_aspect. of_shape.definition ) ) =1;
 WR4: NOT ( 'AUTOMOTIVE_DESIGN.'+ 'CIRCULAR_PATTERN' IN TYPEOF (
     SELF.relating_shape_aspect. of_shape.definition ) ) OR (
     SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations (
     SELF.related_shape_aspect. of_shape.definition ) | ( SIZEOF
     ( pdr. used_representation.items ) =1 ) ) ) =1 ) ;
 WR5: NOT ( 'AUTOMOTIVE_DESIGN.'+ 'CIRCULAR_PATTERN' IN TYPEOF (
     SELF.relating_shape_aspect. of_shape.definition ) ) OR (
     SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations (
     SELF.related_shape_aspect. of_shape.definition ) | ( SIZEOF
     ( QUERY ( i <* pdr. used_representation.items | ( i.name=
     'index number' ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'COUNT_MEASURE' IN TYPEOF (
     i\measure_with_unit. value_component ) ) ) ) =1 ) ) ) =1 )
     ;
 WR6: NOT ( 'AUTOMOTIVE_DESIGN.'+ 'RECTANGULAR_PATTERN' IN
     TYPEOF ( SELF.relating_shape_aspect. of_shape.definition )
     ) OR ( SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations (
     SELF.related_shape_aspect. of_shape.definition ) | ( SIZEOF
     ( pdr. used_representation.items ) =2 ) ) ) =1 ) ;
 WR7: NOT ( 'AUTOMOTIVE_DESIGN.'+ 'RECTANGULAR_PATTERN' IN
     TYPEOF ( SELF.relating_shape_aspect. of_shape.definition )
     ) OR ( SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations (
     SELF.related_shape_aspect. of_shape.definition ) | ( SIZEOF
     ( QUERY ( i <* pdr. used_representation.items | ( i.name=
     'row index' ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'COUNT_MEASURE' IN TYPEOF (
     i\measure_with_unit. value_component ) ) ) ) =1 ) ) ) =1 )
     ;
 WR8: NOT ( 'AUTOMOTIVE_DESIGN.'+ 'RECTANGULAR_PATTERN' IN
     TYPEOF ( SELF.relating_shape_aspect. of_shape.definition )
     ) OR ( SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations (
     SELF.related_shape_aspect. of_shape.definition ) | ( SIZEOF
     ( QUERY ( i <* pdr. used_representation.items | ( i.name=
     'column index' ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'COUNT_MEASURE' IN TYPEOF (
     i\measure_with_unit. value_component ) ) ) ) =1 ) ) ) =1 )
     ;
END_ENTITY;
(* Reuse from Person_organization_mim
ENTITY person_and_organization_address
  SUBTYPE OF (organizational_address,personal_address);
WHERE
 WR1: SIZEOF ( SELF\personal_address. people ) =1;
 WR2: SIZEOF ( SELF\organizational_address. organizations ) =1;
 WR3: SIZEOF ( QUERY ( pao <* USEDIN ( SELF.people[1] ,
     'AUTOMOTIVE_DESIGN.PERSON_AND_ORGANIZATION.THE_PERSON' ) |
     pao. the_organization:=:SELF\organizational_address.
     organizations[1] ) ) =1;
END_ENTITY;
*)

ENTITY physically_modelled_product_definition
  SUBTYPE OF (product_definition_with_associated_documents);
WHERE
 WR1:SELF.frame_of_reference\ application_context_element.name =
     'physical model occurrence' ;
 WR2: ( SIZEOF ( documentation_ids ) =1 ) AND ( SIZEOF ( QUERY (
     d <* documentation_ids | ( SIZEOF ( QUERY ( drt <*
     d.representation_types | ( drt. name ='physical' ) ) ) =1 )
     ) ) =1 ) ;
END_ENTITY;

(* Reuse from Geometric_tolerance_mim 
ENTITY placed_datum_target_feature
  SUBTYPE OF (datum_target);
WHERE
 WR1:SELF.description IN ['point' , 'line' , 'rectangle' ,
     'circle'];
 WR2: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) =1;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='orientation' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'PLACEMENT' IN TYPEOF ( i ) ) ) ) =1
     ) ) ) =1;
 WR4: ( SELF.description<>'point' ) OR ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =1 ) ) ) =1 ) ;
 WR5: ( SELF.description<>'circle' ) OR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =2 ) ) ) =1 ) ;
 WR6: ( SELF.description<>'rectangle' ) OR ( SIZEOF ( QUERY (
     pdr <* get_shape_aspect_property_definition_representations
     ( SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =3 ) ) ) =1 ) ;
 WR7: ( SELF.description<>'circle' ) OR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'target diameter' )
     AND ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1 ) ;
 WR8: ( SELF.description<>'line' ) OR ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'target length' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1 ) ;
 WR9: ( SELF.description<>'rectangle' ) OR ( SIZEOF ( QUERY (
     pdr <* get_shape_aspect_property_definition_representations
     ( SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'target length' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1 ) ;
 WR10: ( SELF.description<>'rectangle' ) OR ( SIZEOF ( QUERY (
     pdr <* get_shape_aspect_property_definition_representations
     ( SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'target width' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1 ) ;
END_ENTITY;
*)
(* Reuse from Shape_feature_mim
ENTITY placed_feature
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_DEFINITION' IN TYPEOF (
     SELF.of_shape. definition ) ;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) AND ( pdr.
     used_representation.name = 'feature definition placement' )
     AND ( SIZEOF ( QUERY ( i <* pdr. used_representation.items
     | ( 'AUTOMOTIVE_DESIGN.'+ 'MAPPED_ITEM' IN TYPEOF ( i ) )
     AND ( SIZEOF ( QUERY ( pdr1 <* USEDIN ( i\mapped_item.
     mapping_source.mapped_representation ,
     'AUTOMOTIVE_DESIGN.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION'
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'FEATURE_DEFINITION' IN TYPEOF
     ( pdr1. definition\property_definition. definition ) ) ) )
     =1 ) ) ) =1 ) ) ) =1;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'PLANAR_SHAPE_REPRESENTATION'
     IN TYPEOF ( pdr. used_representation ) ) AND ( pdr.
     used_representation.name = 'maximum feature limit' ) ) )
     =1;
END_ENTITY;
*)
ENTITY planar_shape_representation
  SUBTYPE OF (shape_representation);
WHERE
 WR1: SIZEOF ( SELF.items ) =1;
 WR2: SIZEOF ( QUERY ( i <* SELF.items | 'AUTOMOTIVE_DESIGN.'+
     'PLANE' IN TYPEOF ( i ) ) ) =1;
 WR3:SELF.name IN [ 'profile limit' , 'maximum feature limit' ];
 WR4: ( SELF.name<> 'maximum feature limit' ) OR ( SIZEOF (
     QUERY ( pdr <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION'
     ) | SIZEOF ( QUERY ( sa <* get_shape_aspects ( pdr.
     definition\property_definition. definition ) | SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'INSTANCED_FEATURE' ,
     'AUTOMOTIVE_DESIGN.'+ 'PLACED_FEATURE']* TYPEOF ( sa ) ) =1
     ) ) =1 ) ) =1 ) ;
 WR5: ( SELF.name<> 'profile limit' ) OR ( SIZEOF ( QUERY ( pdr
     <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION'
     ) | SIZEOF ( QUERY ( sa <* get_shape_aspects ( pdr.
     definition\property_definition. definition ) | SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'OPEN_PATH_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'PARTIAL_CIRCULAR_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'ROUNDED_U_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'SQUARE_U_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'TEE_PROFILE' , 'AUTOMOTIVE_DESIGN.'+
     'VEE_PROFILE']* TYPEOF ( sa ) ) =1 ) ) =1 ) ) =1 ) ;
END_ENTITY;

ENTITY pocket
  SUBTYPE OF (feature_definition);
WHERE
 WR1:SELF.description IN [ 'open rectangular' ,
     'closed rectangular' , 'complex'];
 WR2: ( SELF.description<>'complex' ) OR ( SIZEOF ( QUERY ( sa
     <* get_shape_aspects ( SELF ) | ( sa. description =
     'boundary occurrence' ) AND ( SIZEOF ( QUERY ( sar <*
     USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'profile usage' ) AND ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'CIRCULAR_CLOSED_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'NGON_CLOSED_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'CLOSED_PATH_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'PARTIAL_CIRCULAR_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'ROUNDED_U_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'VEE_PROFILE' , 'AUTOMOTIVE_DESIGN.'+
     'TEE_PROFILE' , 'AUTOMOTIVE_DESIGN.'+ 'OPEN_PATH_PROFILE']*
     TYPEOF ( sar. relating_shape_aspect ) ) =1 ) ) ) =1 ) ) )
     =1 ) ;
 WR3: ( SELF.description<> 'closed rectangular' ) OR ( SIZEOF (
     QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'closed boundary occurrence' ) AND ( SIZEOF (
     QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'profile usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'RECTANGULAR_CLOSED_PROFILE' IN
     TYPEOF ( sar. relating_shape_aspect ) ) ) ) =1 ) ) ) =1 ) ;
 WR4: ( SELF.description<> 'open rectangular' ) OR ( SIZEOF (
     QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'open boundary occurrence' ) AND ( SIZEOF (
     QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'profile usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'SQUARE_U_PROFILE' IN TYPEOF ( sar.
     relating_shape_aspect ) ) ) ) =1 ) ) ) =1 ) ;
 WR5: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'pocket depth occurrence' ) AND ( SIZEOF (
     QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. name = 'pocket depth' ) AND ( sar. description =
     'path feature component usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'PATH_FEATURE_COMPONENT' IN TYPEOF (
     sar. relating_shape_aspect ) ) AND ( sar.
     relating_shape_aspect.description ='linear' ) ) ) =1 ) ) )
     =1;
 WR6: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'bottom condition occurrence' ) AND ( SIZEOF
     ( QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'pocket bottom usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'POCKET_BOTTOM' IN TYPEOF ( sar.
     relating_shape_aspect ) ) ) ) =1 ) ) ) =1;
 WR7: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'change in boundary occurrence' ) AND (
     SIZEOF ( QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'taper usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'TAPER' IN TYPEOF ( sar.
     relating_shape_aspect ) ) AND ( sar.
     relating_shape_aspect.description IN [ 'angle taper' ,
     'directed taper' ] ) ) ) =1 ) ) ) <=1;
 WR8: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND NOT ( {1<= SIZEOF ( pdr.
     used_representation.items ) <=2} ) ) ) =0;
 WR9: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | NOT ( i.name IN ['orientation'
     , 'fillet radius 1' ] ) ) ) >0 ) ) ) =0;
 WR10: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'base radius' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) <=1;
END_ENTITY;

ENTITY pocket_bottom
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ '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 ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) <=1 ) AND ( SIZEOF ( QUERY (
     pdr <* get_shape_aspect_property_definition_representations
     ( SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =1 ) AND ( SIZEOF ( QUERY ( i
     <* pdr. used_representation.items | ( i.name='radius' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) <=1 ) ;
 WR4: NOT ( SELF.description IN ['planar' , 'complex'] ) OR (
     SIZEOF ( QUERY ( sar <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. name IN [ 'starting' , 'ending' ] ) ) )
     =1 ) ;
 WR5: ( SELF.description<>'complex' ) OR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FACE_SHAPE_REPRESENTATION' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FACE_SHAPE_REPRESENTATION' IN TYPEOF ( pdr.
     used_representation ) ) AND ( pdr. used_representation.name
     ='floor' ) ) ) =1 ) ;
 WR6: ( SELF.description<>'planar' ) OR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'LOCATION_SHAPE_REPRESENTATION' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'LOCATION_SHAPE_REPRESENTATION' IN TYPEOF ( pdr.
     used_representation ) ) AND ( pdr. used_representation.name
     = 'floor location' ) ) ) =1 ) ;
 WR7: ( SELF.description<>'planar' ) OR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'DIRECTION_SHAPE_REPRESENTATION' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'DIRECTION_SHAPE_REPRESENTATION' IN TYPEOF ( pdr.
     used_representation ) ) AND ( pdr. used_representation.name
     = 'floor normal' ) ) ) =1 ) ;
 WR8: ( SELF.description<>'through' ) OR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =0 ) ;
 WR9: ( SIZEOF ( QUERY ( sar <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) ) ) =1
     ) AND ( SIZEOF ( QUERY ( sar <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT'
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'pocket bottom usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'POCKET' IN TYPEOF ( sar.
     related_shape_aspect.of_shape. definition ) ) AND ( sar.
     related_shape_aspect.of_shape.
     definition\characterized_object. description =
     'bottom condition occurrence' ) ) ) =1 ) ;
END_ENTITY;

ENTITY point_placement_shape_representation
  SUBTYPE OF (shape_representation);
WHERE
 WR1: SIZEOF ( QUERY ( i <* SELF.items | SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'COMPOUND_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'MAPPED_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'AXIS2_PLACEMENT_3D']* TYPEOF ( i ) ) <>1 ) ) =0;
 WR2: SIZEOF ( QUERY ( i <* SELF.items | SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'COMPOUND_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'MAPPED_ITEM']* TYPEOF ( i ) ) =1 ) )
     >0;
END_ENTITY;
(* Reuse from Draughting_annotation_mim
ENTITY pre_defined_dimension_symbol
  SUBTYPE OF (pre_defined_symbol);
WHERE
 WR1:SELF.name IN [ 'arc length' , 'conical taper' ,
     'counterbore' , 'countersink' , 'depth' , 'diameter' ,
     'plus minus' , 'radius' , 'slope' , 'spherical diameter' ,
     'spherical radius' , 'square'];
END_ENTITY;

ENTITY pre_defined_geometrical_tolerance_symbol
  SUBTYPE OF (pre_defined_symbol);
WHERE
 WR1:SELF.name IN ['angularity' , 'basic dimension' ,
     'blanked datum reference' , 'circular runout' ,
     'circularity' , 'concentricity' , 'cylindricity' ,
     'datum target identification' , 'diameter' ,
     'filled datum reference' , 'flatness' ,
     'least material condition' , 'maximum material condition' ,
     'parallelism' , 'perpendicularity' , 'position' ,
     'profile of a line' , 'profile of a surface' ,
     'projected tolerance zone' , 'regardless of feature size' ,
     'straightness' , 'symmetry' , 'total runout' ];
END_ENTITY;

ENTITY pre_defined_point_marker_symbol
  SUBTYPE OF (pre_defined_marker,pre_defined_symbol);
WHERE
 WR1:SELF.name IN ['asterisk' , 'circle' , 'dot' , 'plus' ,
     'square' , 'triangle' , 'x'];
END_ENTITY;

ENTITY pre_defined_surface_condition_symbol
  SUBTYPE OF (pre_defined_symbol);
WHERE
 WR1:SELF.name IN ['000' , '010' , '020' , '030' , '040' , '050'
     , '060' , '070' , '001' , '011' , '021' , '031' , '041' ,
     '051' , '061' , '071' , '100' , '110' , '120' , '130' ,
     '140' , '150' , '160' , '170' , '101' , '111' , '121' ,
     '131' , '141' , '151' , '161' , '171' , '200' , '210' ,
     '220' , '230' , '240' , '250' , '260' , '270' , '201' ,
     '211' , '221' , '231' , '241' , '251' , '261' , '271'];
END_ENTITY;
*)
(* Reuse from Curve_appearance_mim
ENTITY pre_defined_terminator_symbol
  SUBTYPE OF (pre_defined_symbol);
WHERE
 WR1:SELF.name IN [ 'blanked arrow' , 'blanked box' ,
     'blanked dot' , 'dimension origin' , 'filled arrow' ,
     'filled box' , 'filled dot' , 'integral symbol' ,
     'open arrow' , 'slash' , 'unfilled arrow', 'filled triangle' ];
END_ENTITY;
*)
ENTITY process_operation
  SUBTYPE OF (action_method);
WHERE
 WR1: SIZEOF ( QUERY ( amr <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.ACTION_METHOD_RELATIONSHIP.'+'RELATING_METHOD'
     ) | NOT ( 'AUTOMOTIVE_DESIGN.'+ 'PROCESS_OPERATION' IN
     TYPEOF ( amr. related_method ) ) OR ( SELF:=:amr.
     related_method ) ) ) =0;
 WR2: SIZEOF ( QUERY ( amr <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.ACTION_METHOD_RELATIONSHIP.'+'RELATED_METHOD'
     ) | NOT ( 'AUTOMOTIVE_DESIGN.'+ 'PROCESS_OPERATION' IN
     TYPEOF ( amr. relating_method ) ) OR ( SELF:=:amr.
     relating_method ) ) ) =0;
END_ENTITY;

ENTITY process_plan
  SUBTYPE OF (action);
WHERE
 WR1: SIZEOF ( QUERY ( ar <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'ACTION_RELATIONSHIP.'+
     'RELATED_ACTION' ) | SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'PROCESS_PLAN' , 'AUTOMOTIVE_DESIGN.'+
     'PRODUCT_PROCESS_PLAN']* TYPEOF ( ar. relating_action ) )
     <>1 ) ) =0;
 WR2: SIZEOF ( QUERY ( ar <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'ACTION_RELATIONSHIP.'+
     'RELATING_ACTION' ) | ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'PROCESS_PLAN' , 'AUTOMOTIVE_DESIGN.'+
     'PRODUCT_PROCESS_PLAN']* TYPEOF ( ar. related_action ) ) =1
     ) OR ( ( ar. name = 'process operation occurrence' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'PROCESS_OPERATION' IN TYPEOF ( ar.
     related_action.chosen_method ) ) ) ) ) = SIZEOF ( USEDIN (
     SELF , 'AUTOMOTIVE_DESIGN.'+'ACTION_RELATIONSHIP.'+
     'RELATING_ACTION' ) ) ;
END_ENTITY;
(* Reuse from Product_class_mim
ENTITY product_class
  SUBTYPE OF (product_concept,characterized_object);
END_ENTITY;
*)
(* Reuse from Product_class_mim
ENTITY product_concept_feature_category
  SUBTYPE OF (group);
WHERE
 WR1: SIZEOF ( QUERY ( aga <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.GROUP_ASSIGNMENT.'+'ASSIGNED_GROUP' ) |
     ( 'AUTOMOTIVE_DESIGN.'+ 'APPLIED_GROUP_ASSIGNMENT' IN
     TYPEOF ( aga ) ) AND ( ( aga. role.name<>
     'specification category member' ) OR ( SIZEOF ( QUERY ( i
     <* aga. items | ( 'AUTOMOTIVE_DESIGN.'+
     'PRODUCT_CONCEPT_FEATURE' IN TYPEOF ( i ) ) AND NOT (
     'AUTOMOTIVE_DESIGN.'+ 'CONDITIONAL_CONCEPT_FEATURE' IN
     TYPEOF ( i ) ) ) ) <> SIZEOF ( aga. items ) ) ) ) ) =0;
END_ENTITY;
*)
(* Reuse from Product_class_mim
ENTITY product_concept_feature_category_usage
  SUBTYPE OF (group_assignment);
  items : SET [1:?] OF category_usage_item;
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_CONCEPT_FEATURE_CATEGORY' IN
     TYPEOF ( SELF.assigned_group ) ;
 WR2:SELF.role. name IN [ 'mandatory category usage' ,
     'optional category usage' ];
END_ENTITY;
*)
ENTITY product_definition_resource
  SUBTYPE OF (action_resource,product_definition);
WHERE
 WR1: SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'REQUIREMENT_FOR_ACTION_RESOURCE.'+
     'RESOURCES' ) ) >0;
 WR2:SELF.frame_of_reference. name IN ['part definition' ,
     'part occurrence' , 'physical occurrence' ];
END_ENTITY;
(* Reuse from Specified_product_mim
ENTITY product_identification
  SUBTYPE OF (configuration_item,characterized_object);
WHERE
 WR1: SIZEOF ( QUERY ( cd <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.CONFIGURATION_DESIGN.CONFIGURATION' ) |
     ( 'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_DEFINITION_FORMATION' IN
     TYPEOF ( cd. design ) ) AND ( SIZEOF ( QUERY ( prpc <*
     USEDIN ( cd. design\product_definition_formation.
     of_product ,
     'AUTOMOTIVE_DESIGN.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
     ) | prpc. name IN ['part' , 'raw material' , 'tool'] ) ) >0
     ) ) ) <=1;
 WR2:'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_CLASS' IN TYPEOF (
     SELF.item_concept ) ;
 WR3: NOT ( 'AUTOMOTIVE_DESIGN.'+ 'CONFIGURABLE_ITEM' IN TYPEOF
     ( SELF ) ) OR ( 'AUTOMOTIVE_DESIGN.'+
     'PRODUCT_SPECIFICATION' IN TYPEOF ( SELF ) ) ;
END_ENTITY;
*)
ENTITY product_process_plan
  SUBTYPE OF (product_definition_process);
WHERE
 WR1: SIZEOF ( QUERY ( ar <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'ACTION_RELATIONSHIP.'+
     'RELATED_ACTION' ) | SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'PROCESS_PLAN' , 'AUTOMOTIVE_DESIGN.'+
     'PRODUCT_PROCESS_PLAN']* TYPEOF ( ar. relating_action ) )
     <>1 ) ) =0;
 WR2: SIZEOF ( QUERY ( ar <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'ACTION_RELATIONSHIP.'+
     'RELATING_ACTION' ) | ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'PROCESS_PLAN' , 'AUTOMOTIVE_DESIGN.'+
     'PRODUCT_PROCESS_PLAN']* TYPEOF ( ar. related_action ) ) =1
     ) OR ( ( ar. name = 'process operation occurrence' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'PROCESS_OPERATION' IN TYPEOF ( ar.
     related_action.chosen_method ) ) ) ) ) = SIZEOF ( USEDIN (
     SELF , 'AUTOMOTIVE_DESIGN.'+'ACTION_RELATIONSHIP.'+
     'RELATING_ACTION' ) ) ;
 WR3: SIZEOF ( QUERY ( ppa <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'PROCESS_PRODUCT_ASSOCIATION.'+
     'PROCESS' ) | ( ppa. name<> 'produced output' ) OR NOT (
     'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_DEFINITION' IN TYPEOF ( ppa.
     defined_product ) ) ) ) =0;
END_ENTITY;
(* Reuse from Specified_product_mim
ENTITY product_specification
  SUBTYPE OF (product_identification,configurable_item);
END_ENTITY;
*)
ENTITY rectangular_closed_profile
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'FEATURE_COMPONENT_DEFINITION' IN
     TYPEOF ( SELF.of_shape. definition ) ;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND {3<= SIZEOF ( pdr.
     used_representation.items ) <=4} ) ) =1;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | NOT ( i.name IN ['orientation'
     , 'length' , 'width' , 'corner radius' ] ) ) ) >0 ) ) ) =0;
 WR5: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( 'AUTOMOTIVE_DESIGN.'+
     'PLACEMENT' IN TYPEOF ( i ) ) AND ( i.name ='orientation' )
     ) ) =1 ) ) ) =1;
 WR6: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'LENGTH_MEASURE_WITH_UNIT']*TYPEOF (
     i ) ) =2 ) AND ( i.name ='width' ) ) ) =1 ) ) ) =1;
 WR7: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'LENGTH_MEASURE_WITH_UNIT']*TYPEOF (
     i ) ) =2 ) AND ( i.name ='length' ) ) ) =1 ) ) ) =1;
 WR8: ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name = 'corner radius' ) )
     ) =1 ) ) ) <=1 ) AND ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'LENGTH_MEASURE_WITH_UNIT']*TYPEOF (
     i ) ) =2 ) ) ) =1 ) ) ) <=1 ) ;
END_ENTITY;

ENTITY rectangular_pattern
  SUBTYPE OF (replicate_feature);
WHERE
 WR1: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+ 'DIRECTION_SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) AND ( pdr.
     used_representation.name = 'row layout direction' ) ) ) =1;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+ 'DIRECTION_SHAPE_REPRESENTATION' IN
     TYPEOF ( pdr. used_representation ) ) AND ( pdr.
     used_representation.name = 'column layout direction' ) ) )
     =1;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =5 ) ) ) =1;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'number of rows' )
     AND ( 'AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM'
     IN TYPEOF ( i ) ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'COUNT_MEASURE' IN TYPEOF ( i\measure_with_unit.
     value_component ) ) ) ) =1 ) ) ) =1;
 WR5: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'number of columnws'
     ) AND ( 'AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM'
     IN TYPEOF ( i ) ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'COUNT_MEASURE' IN TYPEOF ( i\measure_with_unit.
     value_component ) ) ) ) =1 ) ) ) =1;
 WR6: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'row spacing' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1;
 WR7: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'column spacing' )
     AND ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1;
END_ENTITY;

ENTITY replicate_feature
  SUBTYPE OF (feature_definition);
WHERE
 WR1: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='orientation' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'PLACEMENT' IN TYPEOF ( i ) ) ) ) =1
     ) ) ) =1;
 WR3: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | (
     SIZEOF ( QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATING_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. name = 'pattern basis' ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_DEFINITION' IN TYPEOF ( sar.
     related_shape_aspect.of_shape. definition ) ) ) ) =1 ) ) )
     =1;
END_ENTITY;

ENTITY retention
  SUBTYPE OF (action);
WHERE
 WR1: SIZEOF ( QUERY ( aa <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'ACTION_ASSIGNMENT.'+
     'ASSIGNED_ACTION' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'APPLIED_ACTION_ASSIGNMENT' IN TYPEOF ( aa ) ) AND ( aa.
     role.name ='retention' ) ) ) >=1;
 WR2: ( SIZEOF ( QUERY ( atia <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_TIME_INTERVAL_ASSIGNMENT.'+
     'ITEMS' ) | ( atia. role.name = 'minimum retention period'
     ) ) ) =1 ) AND ( SIZEOF ( QUERY ( atia <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_TIME_INTERVAL_ASSIGNMENT.'+
     'ITEMS' ) | ( atia. role.name = 'maximum retention period'
     ) ) ) =1 ) AND ( SIZEOF ( QUERY ( atia1 <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_TIME_INTERVAL_ASSIGNMENT.'+
     'ITEMS' ) | ( atia1. role.name = 'minimum retention period'
     ) AND ( 'AUTOMOTIVE_DESIGN.'+ 'TIME_INTERVAL_WITH_BOUNDS'
     IN TYPEOF ( atia1. assigned_time_interval ) ) AND ( EXISTS
     ( atia1. assigned_time_interval\time_interval_with_bounds.
     secondary_bound ) OR EXISTS ( atia1.
     assigned_time_interval\time_interval_with_bounds. duration
     ) ) AND ( SIZEOF ( QUERY ( atia2 <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_TIME_INTERVAL_ASSIGNMENT.'+
     'ITEMS' ) | ( atia2. role.name = 'maximum retention period'
     ) AND ( 'AUTOMOTIVE_DESIGN.'+ 'TIME_INTERVAL_WITH_BOUNDS'
     IN TYPEOF ( atia2. assigned_time_interval ) ) AND ( EXISTS
     ( atia2. assigned_time_interval\time_interval_with_bounds.
     secondary_bound ) OR EXISTS ( atia2.
     assigned_time_interval\time_interval_with_bounds. duration
     ) ) AND ( atia1.
     assigned_time_interval\time_interval_with_bounds.
     primary_bound:=:atia2.
     assigned_time_interval\time_interval_with_bounds.
     primary_bound ) ) ) =1 ) ) ) =1 ) ;
 WR3: SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'ACTION_RELATIONSHIP.'+
     'RELATING_ACTION' ) ) + SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'ACTION_RELATIONSHIP.'+
     'RELATED_ACTION' ) ) =0;
END_ENTITY;

ENTITY rib
  SUBTYPE OF (feature_definition);
WHERE
 WR1: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND NOT ( {1<= SIZEOF ( pdr.
     used_representation.items ) <=3} ) ) ) =0;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | NOT ( i.name IN ['orientation'
     , 'fillet radius' , 'shoulder radius' ] ) ) ) >0 ) ) ) =0;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'fillet radius' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) <=1;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'shoulder radius' )
     AND ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) <=1;
 WR5: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'swept shape occurrence' ) AND ( SIZEOF (
     QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'profile usage' ) AND ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'PARTIAL_CIRCULAR_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'SQUARE_U_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'ROUNDED_U_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'TEE_PROFILE' , 'AUTOMOTIVE_DESIGN.'+
     'VEE_PROFILE' , 'AUTOMOTIVE_DESIGN.'+ 'OPEN_PATH_PROFILE']*
     TYPEOF ( sar. relating_shape_aspect ) ) =1 ) ) ) =1 ) ) )
     =1;
 WR6: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'course of travel occurrence' ) AND ( SIZEOF
     ( QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. name = 'course of travel' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'PATH_FEATURE_COMPONENT' IN TYPEOF (
     sar. relating_shape_aspect ) ) ) ) =1 ) ) ) =1;
 WR7: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'change in boundary occurrence' ) AND (
     SIZEOF ( QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'taper usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'TAPER' IN TYPEOF ( sar.
     relating_shape_aspect ) ) AND ( sar.
     relating_shape_aspect.description = 'directed taper' ) ) )
     =1 ) ) ) <=1;
END_ENTITY;

ENTITY round_hole
  SUBTYPE OF (feature_definition);
WHERE
 WR1: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'diameter occurrence' ) AND ( SIZEOF ( QUERY
     ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. name ='diameter' ) AND ( sar. description =
     'profile usage' ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'CIRCULAR_CLOSED_PROFILE' IN TYPEOF ( sar.
     relating_shape_aspect ) ) ) ) =1 ) ) ) =1;
 WR2: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'hole depth occurrence' ) AND ( SIZEOF (
     QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. name = 'hole depth' ) AND ( sar. description =
     'path feature component usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'PATH_FEATURE_COMPONENT' IN TYPEOF (
     sar. relating_shape_aspect ) ) AND ( sar.
     relating_shape_aspect.description ='linear' ) ) ) =1 ) ) )
     =1;
 WR3: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'bottom condition occurrence' ) AND ( SIZEOF
     ( QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'hole bottom usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'HOLE_BOTTOM' IN TYPEOF ( sar.
     relating_shape_aspect ) ) ) ) =1 ) ) ) <=1;
 WR4: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'change in diameter occurrence' ) AND (
     SIZEOF ( QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'taper usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'TAPER' IN TYPEOF ( sar.
     relating_shape_aspect ) ) ) ) =1 ) ) ) =1;
 WR5: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) <>1 ) ) ) =0;
END_ENTITY;

ENTITY rounded_u_profile
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'FEATURE_COMPONENT_DEFINITION' IN
     TYPEOF ( SELF.of_shape. definition ) ;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =2 ) ) ) =1;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | NOT ( i.name IN ['width' ,
     'orientation'] ) ) ) >0 ) ) ) =0;
 WR5: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( 'AUTOMOTIVE_DESIGN.'+
     'PLACEMENT' IN TYPEOF ( i ) ) AND ( i.name ='orientation' )
     ) ) =1 ) ) ) =1;
 WR6: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'LENGTH_MEASURE_WITH_UNIT']*TYPEOF (
     i ) ) =2 ) AND ( i.name ='width' ) ) ) =1 ) ) ) =1;
 WR7: ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'PLANAR_SHAPE_REPRESENTATION'
     IN TYPEOF ( pdr. used_representation ) ) ) ) <=1 ) AND (
     SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'PLANAR_SHAPE_REPRESENTATION'
     IN TYPEOF ( pdr. used_representation ) ) AND ( pdr.
     used_representation.name = 'profile limit' ) ) ) <=1 ) ;
END_ENTITY;

ENTITY shape_aspect_transition
  SUBTYPE OF (shape_aspect_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( pdr_1 <*
     get_shape_aspect_property_definition_representations (
     SELF.relating_shape_aspect ) | SIZEOF ( QUERY ( pdr_2 <*
     get_shape_aspect_property_definition_representations (
     SELF.related_shape_aspect ) | SIZEOF ( QUERY ( item_1 <*
     pdr_1. used_representation.items | SIZEOF ( QUERY ( item_2
     <* pdr_2. used_representation.items | NOT ( ( (
     'AUTOMOTIVE_DESIGN.'+ 'EDGE' IN TYPEOF ( item_1 ) ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'EDGE' IN TYPEOF ( item_2 ) ) ) XOR (
     ( 'AUTOMOTIVE_DESIGN.'+ 'FACE' IN TYPEOF ( item_1 ) ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'FACE' IN TYPEOF ( item_2 ) ) ) ) ) )
     >0 ) ) >0 ) ) >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( pdr_1 <*
     get_shape_aspect_property_definition_representations (
     SELF.relating_shape_aspect ) | SIZEOF ( QUERY ( pdr_2 <*
     get_shape_aspect_property_definition_representations (
     SELF.related_shape_aspect ) | SIZEOF ( QUERY ( item_1 <*
     pdr_1. used_representation.items | SIZEOF ( QUERY ( item_2
     <* pdr_2. used_representation.items | (
     'AUTOMOTIVE_DESIGN.'+ 'EDGE' IN TYPEOF ( item_1 ) ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'EDGE' IN TYPEOF ( item_2 ) ) AND NOT
     ( ( item_1\ edge.edge_start:=:item_2\ edge.edge_start ) OR
     ( item_1\ edge.edge_start:=:item_2\ edge.edge_end ) OR (
     item_1\ edge.edge_end:=:item_2\ edge.edge_start ) OR (
     item_1\ edge.edge_end:=:item_2\ edge.edge_end ) ) ) ) >0 )
     ) >0 ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( pdr_1 <*
     get_shape_aspect_property_definition_representations (
     SELF.relating_shape_aspect ) | SIZEOF ( QUERY ( pdr_2 <*
     get_shape_aspect_property_definition_representations (
     SELF.related_shape_aspect ) | SIZEOF ( QUERY ( item_1 <*
     pdr_1. used_representation.items | SIZEOF ( QUERY ( item_2
     <* pdr_2. used_representation.items | (
     'AUTOMOTIVE_DESIGN.'+ 'FACE' IN TYPEOF ( item_1 ) ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'FACE' IN TYPEOF ( item_2 ) ) AND (
     SIZEOF ( QUERY ( f_1 <* item_1\ face.bounds | (
     'AUTOMOTIVE_DESIGN.'+ 'EDGE_LOOP' IN TYPEOF ( f_1. bound )
     ) AND ( SIZEOF ( QUERY ( f_2 <* item_2\ face.bounds | (
     'AUTOMOTIVE_DESIGN.'+ 'EDGE_LOOP' IN TYPEOF ( f_2. bound )
     ) AND ( SIZEOF ( QUERY ( oe_1 <* f_1. bound\path. edge_list
     | SIZEOF ( QUERY ( oe_2 <* f_2. bound\path. edge_list |
     oe_1. edge_element:=:oe_2. edge_element ) ) =0 ) ) =0 ) ) )
     =0 ) ) ) =0 ) ) ) =0 ) ) =0 ) ) =0 ) ) =0;
 WR4:SELF.name IN ['g0' , 'g1' , 'g2'];
END_ENTITY;

ENTITY shape_defining_relationship
  SUBTYPE OF (shape_aspect_relationship);
WHERE
 WR1: ( SELF\shape_aspect_relationship. description<>
     'profile usage' ) OR ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'RECTANGULAR_CLOSED_PROFILE' , 'AUTOMOTIVE_DESIGN.'+
     'CIRCULAR_CLOSED_PROFILE' , 'AUTOMOTIVE_DESIGN.'+
     'NGON_CLOSED_PROFILE' , 'AUTOMOTIVE_DESIGN.'+
     'CLOSED_PATH_PROFILE' , 'AUTOMOTIVE_DESIGN.'+
     'OPEN_PATH_PROFILE' , 'AUTOMOTIVE_DESIGN.'+
     'PARTIAL_CIRCULAR_PROFILE' , 'AUTOMOTIVE_DESIGN.'+
     'ROUNDED_U_PROFILE' , 'AUTOMOTIVE_DESIGN.'+
     'SQUARE_U_PROFILE' , 'AUTOMOTIVE_DESIGN.'+ 'TEE_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'VEE_PROFILE']* TYPEOF (
     SELF\shape_aspect_relationship. relating_shape_aspect ) )
     =1 ) ;
 WR2: ( SELF\shape_aspect_relationship. description<>
     'path feature component usage' ) OR ( 'AUTOMOTIVE_DESIGN.'+
     'PATH_FEATURE_COMPONENT' IN TYPEOF (
     SELF\shape_aspect_relationship. relating_shape_aspect ) ) ;
END_ENTITY;
(* Reuse from Geometric_tolerance_mim
ENTITY shape_representation_with_parameters
  SUBTYPE OF (shape_representation);
WHERE
 WR1: SIZEOF ( QUERY ( i <* SELF.items | SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'PLACEMENT' , 'AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM']* TYPEOF ( i ) ) =1 ) ) =
     SIZEOF ( SELF.items ) ;
END_ENTITY;
*)
ENTITY slot
  SUBTYPE OF (feature_definition);
WHERE
 WR1: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =1 ) ) ) =1;
 WR2: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'swept shape occurrence' ) AND ( SIZEOF (
     QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. description = 'profile usage' ) AND ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'SQUARE_U_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'PARTIAL_CIRCULAR_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'ROUNDED_U_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'VEE_PROFILE' , 'AUTOMOTIVE_DESIGN.'+
     'TEE_PROFILE' , 'AUTOMOTIVE_DESIGN.'+ 'OPEN_PATH_PROFILE']*
     TYPEOF ( sar. relating_shape_aspect ) ) =1 ) ) ) =1 ) ) )
     =1;
 WR3: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'course of travel occurrence' ) AND ( SIZEOF
     ( QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. name = 'course of travel' ) AND ( sar. description =
     'path feature component usage' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'PATH_FEATURE_COMPONENT' IN TYPEOF (
     sar. relating_shape_aspect ) ) ) ) =1 ) ) ) =1;
 WR4: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'end condition occurrence' ) AND ( SIZEOF (
     QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. name = 'starting' ) AND ( sar. description
     = 'slot end usage' ) AND ( 'AUTOMOTIVE_DESIGN.'+ 'SLOT_END'
     IN TYPEOF ( sar. relating_shape_aspect ) ) ) ) =1 ) ) ) =1;
 WR5: SIZEOF ( QUERY ( sa <* get_shape_aspects ( SELF ) | ( sa.
     description = 'end condition occurrence' ) AND ( SIZEOF (
     QUERY ( sar <* USEDIN ( sa ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATED_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. name = 'ending' ) AND ( sar. description
     = 'slot end usage' ) AND ( 'AUTOMOTIVE_DESIGN.'+ 'SLOT_END'
     IN TYPEOF ( sar. relating_shape_aspect ) ) ) ) =1 ) ) ) =1;
END_ENTITY;

ENTITY slot_end
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'FEATURE_COMPONENT_DEFINITION' IN
     TYPEOF ( SELF.of_shape. definition ) ;
 WR2:SELF.description IN ['open' , 'radiused' , 'flat' ,
     'woodruff'];
 WR3: ( SELF.description IN ['open' , 'radiused'] ) XOR ( SIZEOF
     ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =0 ) ;
 WR4: NOT ( SELF.description IN ['flat' , 'woodruff'] ) XOR (
     SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1 ) ;
 WR5: ( SELF.description<>'flat' ) OR ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =2 ) ) ) =1 ) ;
 WR6: ( SELF.description<>'flat' ) OR ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'first radius' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1 ) ;
 WR7: ( SELF.description<>'flat' ) OR ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'second radius' ) AND
     ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1 ) ;
 WR8: ( SELF.description<>'woodruff' ) OR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =1 ) ) ) =1 ) ;
 WR9: ( SELF.description<>'woodruff' ) OR ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='radius' ) AND (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1 ) ;
 WR10: SIZEOF ( QUERY ( sar <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATING_SHAPE_ASPECT' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( sar ) ) AND (
     sar. name IN [ 'starting' ,
     'ending' ] ) AND ( sar. description =
     'slot end usage' ) AND ( 'AUTOMOTIVE_DESIGN.'+ 'SLOT' IN
     TYPEOF ( sar. related_shape_aspect.of_shape. definition ) )
     AND ( sar. related_shape_aspect.of_shape.
     definition\characterized_object. name = 'end condition' )
     AND ( sar. related_shape_aspect.of_shape.
     definition\characterized_object. description =
     'slot end occurrence' ) ) ) =1;
END_ENTITY;

ENTITY square_u_profile
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'FEATURE_COMPONENT_DEFINITION' IN
     TYPEOF ( SELF.of_shape. definition ) ;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND {4<= SIZEOF ( pdr.
     used_representation.items ) <=6} ) ) =1;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | NOT ( i.name IN ['orientation'
     , 'width' , 'first angle' , 'second angle' , 'first radius'
     , 'second radius' ] ) ) ) >0 ) ) ) =0;
 WR5: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( 'AUTOMOTIVE_DESIGN.'+
     'PLACEMENT' IN TYPEOF ( i ) ) AND ( i.name ='orientation' )
     ) ) =1 ) ) ) =1;
 WR6: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'LENGTH_MEASURE_WITH_UNIT']*TYPEOF (
     i ) ) =2 ) AND ( i.name ='width' ) ) ) =1 ) ) ) =1;
 WR7: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) AND (
     i.name = 'first angle' ) ) ) =1 ) ) ) =1;
 WR8: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) AND (
     i.name = 'second angle' ) ) ) =1 ) ) ) =1;
 WR9: ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name = 'first radius' ) ) )
     =1 ) ) ) <=1 ) AND ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'LENGTH_MEASURE_WITH_UNIT']*TYPEOF (
     i ) ) =2 ) AND ( i.name = 'first radius' ) ) ) =1 ) ) ) <=1
     ) ;
 WR10: ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name = 'second radius' ) )
     ) =1 ) ) ) <=1 ) AND ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'LENGTH_MEASURE_WITH_UNIT']*TYPEOF (
     i ) ) =2 ) AND ( i.name = 'second radius' ) ) ) =1 ) ) )
     <=1 ) ;
 WR11: ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'PLANAR_SHAPE_REPRESENTATION'
     IN TYPEOF ( pdr. used_representation ) ) ) ) <=1 ) AND (
     SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'PLANAR_SHAPE_REPRESENTATION'
     IN TYPEOF ( pdr. used_representation ) ) AND ( pdr.
     used_representation.name = 'profile limit' ) ) ) <=1 ) ;
END_ENTITY;
(* Reuse from Draughting_element_specializations_mim
ENTITY surface_condition_callout
  SUBTYPE OF (draughting_callout);
WHERE
 WR1: SIZEOF ( QUERY ( c <* SELF.contents | SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'ANNOTATION_CURVE_OCCURRENCE' ,
     'AUTOMOTIVE_DESIGN.'+ 'ANNOTATION_SYMBOL_OCCURRENCE' ,
     'AUTOMOTIVE_DESIGN.'+ 'ANNOTATION_TEXT_OCCURRENCE']* TYPEOF
     ( c ) ) <>1 ) ) =0;
END_ENTITY;
*)
(* Reuse from Surface_conditions_mim
ENTITY surface_texture_representation
  SUBTYPE OF (representation);
WHERE
 WR1: SIZEOF ( QUERY ( i <* SELF.items | SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'VALUE_RANGE' , 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM']* TYPEOF ( i ) ) <>1 ) )
     =0;
 WR2: ( SIZEOF ( QUERY ( i <* SELF.items | 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) ) =1 )
     AND ( SIZEOF ( QUERY ( i <* SELF.items | (
     'AUTOMOTIVE_DESIGN.'+ 'DESCRIPTIVE_REPRESENTATION_ITEM' IN
     TYPEOF ( i ) ) AND ( i.name = 'measuring method' ) ) ) =1 )
     ;
 WR3: SIZEOF ( QUERY ( i <* SELF.items | SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'VALUE_RANGE']* TYPEOF ( i ) ) =1 ) )
     >0;
 WR4: ( SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'REPRESENTATION_RELATIONSHIP.'+
     'REP_1' ) ) <=1 ) AND ( SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'REPRESENTATION_RELATIONSHIP.'+
     'REP_2' ) ) =0 ) AND ( SIZEOF ( QUERY ( rr <* USEDIN ( SELF
     , 'AUTOMOTIVE_DESIGN.'+'REPRESENTATION_RELATIONSHIP.'+
     'REP_1' ) | rr. rep_2.name = 'measuring direction' ) ) =
     SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'REPRESENTATION_RELATIONSHIP.'+
     'REP_1' ) ) ) ;
 WR5: ( SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
     'USED_REPRESENTATION' ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr
     <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
     'USED_REPRESENTATION' ) | SIZEOF ( QUERY ( gpa <* USEDIN (
     pdr. definition ,
     'AUTOMOTIVE_DESIGN.'+'GENERAL_PROPERTY_ASSOCIATION.'+
     'DERIVED_DEFINITION' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'GENERAL_PROPERTY' IN TYPEOF ( gpa. base_definition ) ) AND
     ( gpa. base_definition.name ='surface_condition' ) ) ) =1 )
     ) =1 ) ;
END_ENTITY;
*)
(* Reuse from Surface_conditions_mim
ENTITY tactile_appearance_representation
  SUBTYPE OF (representation);
WHERE
 WR1: SIZEOF ( QUERY ( i <* SELF.items | SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'VALUE_RANGE']* TYPEOF ( i ) ) <>1 )
     ) =0;
 WR2: SIZEOF ( QUERY ( i <* SELF.items | name ='depth' ) ) <=1;
 WR3: ( SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
     'USED_REPRESENTATION' ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr
     <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
     'USED_REPRESENTATION' ) | SIZEOF ( QUERY ( gpa <* USEDIN (
     pdr. definition ,
     'AUTOMOTIVE_DESIGN.'+'GENERAL_PROPERTY_ASSOCIATION.'+
     'DERIVED_DEFINITION' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'GENERAL_PROPERTY' IN TYPEOF ( gpa. base_definition ) ) AND
     ( gpa. base_definition.name ='surface_condition' ) ) ) =1 )
     ) =1 ) ;
END_ENTITY;
*)
ENTITY taper
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'FEATURE_COMPONENT_DEFINITION' IN
     TYPEOF ( SELF.of_shape. definition ) ;
 WR2:SELF.description IN [ 'angle taper' , 'diameter taper' ,
     'directed taper' ];
 WR3: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( pdr.
     used_representation.items ) =1 ) ) ) =1;
 WR5: ( SELF.description<> 'angle taper' ) OR ( SIZEOF ( QUERY (
     pdr <* get_shape_aspect_property_definition_representations
     ( SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) AND (
     i.name = 'taper angle' ) ) ) =1 ) ) ) =1 ) ;
 WR6: ( SELF.description<> 'diameter taper' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'LENGTH_MEASURE_WITH_UNIT']*TYPEOF (
     i ) ) =2 ) AND ( i.name = 'taper diameter' ) ) ) =1 ) ) )
     =1 ) ;
 WR7: ( SELF.description<> 'directed taper' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) AND (
     i.name ='angle' ) ) ) =1 ) ) ) =1 ) ;
 WR8: ( SELF.description<> 'directed taper' ) OR ( SIZEOF (
     QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'DIRECTION_SHAPE_REPRESENTATION' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr
     <* get_shape_aspect_property_definition_representations (
     SELF ) | ( 'AUTOMOTIVE_DESIGN.'+
     'DIRECTION_SHAPE_REPRESENTATION' IN TYPEOF ( pdr.
     used_representation ) ) AND ( pdr. used_representation.name
     ='direction' ) ) ) =1 ) ;
END_ENTITY;

ENTITY tee_profile
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'FEATURE_COMPONENT_DEFINITION' IN
     TYPEOF ( SELF.of_shape. definition ) ;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND {9<= SIZEOF ( pdr.
     used_representation.items ) <=10} ) ) =1;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | NOT ( i.name IN ['orientation'
     , 'width' , 'depth' , 'cross bar width' , 'cross bar depth'
     , 'first offset' , 'second offset' , 'first angle' ,
     'second angle' , 'radius'] ) ) ) >0 ) ) ) =0;
 WR5: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( 'AUTOMOTIVE_DESIGN.'+
     'PLACEMENT' IN TYPEOF ( i ) ) AND ( i.name ='orientation' )
     ) ) =1 ) ) ) =1;
 WR6: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'LENGTH_MEASURE_WITH_UNIT']*TYPEOF (
     i ) ) =2 ) AND ( i.name ='width' ) ) ) =1 ) ) ) =1;
 WR7: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'LENGTH_MEASURE_WITH_UNIT']*TYPEOF (
     i ) ) =2 ) AND ( i.name ='depth' ) ) ) =1 ) ) ) =1;
 WR8: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'LENGTH_MEASURE_WITH_UNIT']*TYPEOF (
     i ) ) =2 ) AND ( i.name = 'cross bar width' ) ) ) =1 ) ) )
     =1;
 WR9: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'LENGTH_MEASURE_WITH_UNIT']*TYPEOF (
     i ) ) =2 ) AND ( i.name = 'cross bar depth' ) ) ) =1 ) ) )
     =1;
 WR10: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'LENGTH_MEASURE_WITH_UNIT']*TYPEOF (
     i ) ) =2 ) AND ( i.name = 'first offset' ) ) ) =1 ) ) ) =1;
 WR11: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'LENGTH_MEASURE_WITH_UNIT']*TYPEOF (
     i ) ) =2 ) AND ( i.name = 'second offset' ) ) ) =1 ) ) )
     =1;
 WR12: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) AND (
     i.name = 'first angle' ) ) ) =1 ) ) ) =1;
 WR13: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) AND (
     i.name = 'second angle' ) ) ) =1 ) ) ) =1;
 WR14: ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name ='radius' ) ) ) =1 ) )
     ) <=1 ) AND ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'LENGTH_MEASURE_WITH_UNIT']*TYPEOF (
     i ) ) =2 ) AND ( i.name ='radius' ) ) ) =1 ) ) ) <=1 ) ;
 WR15: ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'PLANAR_SHAPE_REPRESENTATION'
     IN TYPEOF ( pdr. used_representation ) ) ) ) <=1 ) AND (
     SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'PLANAR_SHAPE_REPRESENTATION'
     IN TYPEOF ( pdr. used_representation ) ) AND ( pdr.
     used_representation.name = 'profile limit' ) ) ) <=1 ) ;
END_ENTITY;

ENTITY thread
  SUBTYPE OF (feature_definition);
WHERE
 WR1: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND NOT ( {7<= SIZEOF ( pdr.
     used_representation.items ) <=10} ) ) ) =0;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | (
     i\descriptive_representation_item. description IN
     ['internal' , 'external'] ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) ) ) =1
     ) ) ) =1;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'major diameter' )
     AND ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'minor diameter' )
     AND ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) <=1;
 WR5: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'pitch diameter' )
     AND ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) )
     ) =1;
 WR6: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='crest' ) AND ( SIZEOF
     ( ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'LENGTH_MEASURE_WITH_UNIT']*TYPEOF (
     i ) ) =2 ) ) ) =1 ) ) ) <=1;
 WR7: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'number of threads' )
     AND ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'RATIO_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) ) ) =1 ) ) )
     =1;
 WR8: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name= 'fit class' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'DESCRIPTIVE_REPRESENTATION_ITEM' IN
     TYPEOF ( i ) ) ) ) =1 ) ) ) =1;
 WR9: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='form' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'DESCRIPTIVE_REPRESENTATION_ITEM' IN
     TYPEOF ( i ) ) ) ) =1 ) ) ) =1;
 WR10: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='hand' ) AND (
     i\descriptive_representation_item. description IN [
     'left hand' , 'right hand' ] ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) ) ) =1
     ) ) ) =1;
 WR11: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name='qualifier' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'DESCRIPTIVE_REPRESENTATION_ITEM' IN
     TYPEOF ( i ) ) ) ) =1 ) ) ) <=1;
 WR12: SIZEOF ( QUERY ( pdr <*
     get_property_definition_representations ( SELF ) | (
     'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | NOT ( i.name IN [ 'thread side'
     , 'major diameter' , 'minor diameter' , 'pitch diameter' ,
     'crest' , 'number of threads' , 'fit class' , 'form' ,
     'hand' , 'qualifier'] ) ) ) >0 ) ) ) =0;
END_ENTITY;

ENTITY transition_feature
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_DEFINITION' IN TYPEOF (
     SELF.of_shape. definition ) ;
 WR2: SIZEOF ( ['AUTOMOTIVE_DESIGN.'+ 'CHAMFER' ,
     'AUTOMOTIVE_DESIGN.'+ 'EDGE_ROUND' , 'AUTOMOTIVE_DESIGN.'+
     'FILLET']* TYPEOF ( SELF ) ) =1;
END_ENTITY;
(* Reuse from Extended_measure_representation_mim
ENTITY value_range
  SUBTYPE OF (compound_representation_item);
WHERE
 WR1: ( 'AUTOMOTIVE_DESIGN.'+ 'SET_REPRESENTATION_ITEM' IN
     TYPEOF ( item_element ) ) AND value_range_wr1 (
     item_element ) ;
 WR2:value_range_wr2 ( item_element ) ;
 WR3:value_range_wr3 ( item_element ) ;
END_ENTITY;
*)
(* Reuse from Curve_appearance_mim
ENTITY vector_style
  SUBTYPE OF (pre_defined_terminator_symbol,curve_style);
END_ENTITY;
*)
ENTITY vee_profile
  SUBTYPE OF (shape_aspect);
WHERE
 WR1:'AUTOMOTIVE_DESIGN.'+ 'FEATURE_COMPONENT_DEFINITION' IN
     TYPEOF ( SELF.of_shape. definition ) ;
 WR2: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) ) ) =1;
 WR3: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND {3<= SIZEOF ( pdr.
     used_representation.items ) <=4} ) ) =1;
 WR4: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | NOT ( i.name IN ['orientation'
     , 'profile angle' , 'tilt angle' , 'profile radius' ] ) ) )
     >0 ) ) ) =0;
 WR5: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( 'AUTOMOTIVE_DESIGN.'+
     'PLACEMENT' IN TYPEOF ( i ) ) AND ( i.name ='orientation' )
     ) ) =1 ) ) ) =1;
 WR6: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) AND (
     i.name = 'profile angle' ) ) ) =1 ) ) ) =1;
 WR7: SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_MEASURE_WITH_UNIT']*TYPEOF ( i ) ) =2 ) AND (
     i.name = 'tilt angle' ) ) ) =1 ) ) ) =1;
 WR8: ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name = 'profile radius' ) )
     ) =1 ) ) ) <=1 ) AND ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF ( pdr.
     used_representation ) ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( i.name = 'profile radius' )
     AND ( 'AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM'
     IN TYPEOF ( i ) ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_MEASURE_WITH_UNIT' IN TYPEOF ( i ) ) ) ) =1 ) ) )
     <=1 ) ;
 WR9: ( SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'PLANAR_SHAPE_REPRESENTATION'
     IN TYPEOF ( pdr. used_representation ) ) ) ) <=1 ) AND (
     SIZEOF ( QUERY ( pdr <*
     get_shape_aspect_property_definition_representations ( SELF
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'PLANAR_SHAPE_REPRESENTATION'
     IN TYPEOF ( pdr. used_representation ) ) AND ( pdr.
     used_representation.name = 'profile limit' ) ) ) <=1 ) ;
END_ENTITY;
(* Reuse from Surface_conditions_mim
ENTITY visual_appearance_representation
  SUBTYPE OF (representation);
WHERE
 WR1: ( {2<= SIZEOF ( SELF.items ) <=5} ) AND ( SIZEOF ( QUERY (
     i <* items | ( 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
     i.name IN [ 'colour id' , 'colour name' , 'lustre' ,
     'pattern' , 'transparency'] ) ) ) = SIZEOF ( SELF.items ) )
     ;
 WR2: SIZEOF ( QUERY ( i <* SELF.items | i.name = 'colour id' )
     ) =1;
 WR3: SIZEOF ( QUERY ( i <* SELF.items | i.name ='lustre' ) )
     =1;
 WR4: SIZEOF ( QUERY ( i <* SELF.items | i.name = 'colour name'
     ) ) <=1;
 WR5: SIZEOF ( QUERY ( i <* SELF.items | i.name ='pattern' ) )
     <=1;
 WR6: SIZEOF ( QUERY ( i <* SELF.items | i.name ='transparency'
     ) ) <=1;
 WR7: ( SIZEOF ( USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
     'USED_REPRESENTATION' ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr
     <* USEDIN ( SELF ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
     'USED_REPRESENTATION' ) | SIZEOF ( QUERY ( gpa <* USEDIN (
     pdr. definition ,
     'AUTOMOTIVE_DESIGN.'+'GENERAL_PROPERTY_ASSOCIATION.'+
     'DERIVED_DEFINITION' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'GENERAL_PROPERTY' IN TYPEOF ( gpa. base_definition ) ) AND
     ( gpa. base_definition.name ='surface_condition' ) ) ) =1 )
     ) =1 ) ;
END_ENTITY;
*)
RULE application_protocol_definition_required FOR
    (application_context);
WHERE
 WR1: SIZEOF ( QUERY ( ac <* application_context | ( SIZEOF (
     QUERY ( apd <* USEDIN ( ac ,
     'AUTOMOTIVE_DESIGN.APPLICATION_PROTOCOL_DEFINITION.APPLICATION'
     ) | apd. application_interpreted_model_schema_name
     ='automotive_design' ) ) >0 ) ) ) >0;
END_RULE;

RULE approval_person_organization_requires_date_time FOR
    (approval_person_organization);
WHERE
 WR1: SIZEOF ( QUERY ( apo <* approval_person_organization | 	 (
     SIZEOF ( QUERY ( u <* USEDIN ( apo ,
     'AUTOMOTIVE_DESIGN.'+		'APPLIED_DATE_ASSIGNMENT.'+ 'ITEMS'
     ) | 	 ( u.role. name = 'sign off' ) ) ) +	 SIZEOF ( QUERY (
     u <* USEDIN ( apo ,
     'AUTOMOTIVE_DESIGN.'+		'APPLIED_DATE_AND_TIME_ASSIGNMENT.'+
     'ITEMS' ) | 	 ( u.role. name = 'sign off' ) ) 	 ) ) <>1 ) )
     =0;
END_RULE;

RULE approval_requires_approval_assignment FOR
    (approval);
WHERE
 WR1: SIZEOF ( QUERY ( a <* approval | SIZEOF ( USEDIN ( a ,
     'AUTOMOTIVE_DESIGN.APPROVAL_ASSIGNMENT.ASSIGNED_APPROVAL' )
     ) =0 ) ) =0;
END_RULE;

RULE complex_product_requires_product_definition FOR
    (product_definition,
     product_definition_formation,
     product_related_product_category);
WHERE
 WR1: SIZEOF ( QUERY ( pdf <* product_definition_formation | ( (
     SIZEOF ( QUERY ( prpc <* USEDIN ( pdf. of_product ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_RELATED_PRODUCT_CATEGORY.'+
     'PRODUCTS' ) | prpc. name ='functionality' ) ) =1 ) AND (
     SIZEOF ( QUERY ( pd <* USEDIN ( pdf ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_DEFINITION.'+ 'FORMATION' ) |
     pd. frame_of_reference.name = 'functional definition' ) )
     <>1 ) ) OR ( ( SIZEOF ( QUERY ( prpc <* USEDIN ( pdf.
     of_product ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_RELATED_PRODUCT_CATEGORY.'+
     'PRODUCTS' ) | prpc. name = 'conceptual design' ) ) =1 )
     AND ( SIZEOF ( QUERY ( pd <* USEDIN ( pdf ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_DEFINITION.'+ 'FORMATION' ) |
     pd. frame_of_reference.name = 'conceptual definition' ) )
     <>1 ) ) OR ( ( SIZEOF ( QUERY ( prpc <* USEDIN ( pdf.
     of_product ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_RELATED_PRODUCT_CATEGORY.'+
     'PRODUCTS' ) | prpc. name = 'alternative solution' ) ) =1 )
     AND ( SIZEOF ( QUERY ( pd <* USEDIN ( pdf ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_DEFINITION.'+ 'FORMATION' ) |
     pd. frame_of_reference.name = 'alternative definition' ) )
     <>1 ) ) ) ) =0;
END_RULE;

RULE compound_features_of_equal_type FOR
    (compound_feature,
     shape_aspect_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( sar <* shape_aspect_relationship | 
     ( sar.name = 'compound feature ordering' ) AND  (( SIZEOF ( QUERY (
     fcr <* USEDIN ( sar. relating_shape_aspect ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( fcr ) ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'COMPOSITE_SHAPE_ASPECT' IN TYPEOF (
     fcr. relating_shape_aspect ) ) AND ( fcr.
     relating_shape_aspect.name IN [ 'compound feature in solid'
     , 'compound feature in panel' ] ) ) ) =0 ) AND ( SIZEOF (
     QUERY ( fcr <* USEDIN ( sar. related_shape_aspect ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'
     ) | ( 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' IN TYPEOF ( fcr ) ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'COMPOSITE_SHAPE_ASPECT' IN TYPEOF (
     fcr. relating_shape_aspect ) ) AND ( fcr.
     relating_shape_aspect.name IN [ 'compound feature in solid'
     , 'compound feature in panel' ] ) ) ) =0 )) ) ) =0;
END_RULE;

RULE consistent_uncertainty FOR
    (global_uncertainty_assigned_context,
     qualified_representation_item,
     uncertainty_assigned_representation);
WHERE
 WR1: SIZEOF ( QUERY ( guac <*
     global_uncertainty_assigned_context | SIZEOF ( QUERY ( u1
     <* guac.uncertainty | SIZEOF ( QUERY ( u2 <*
     guac.uncertainty | u2.name =u1.name ) ) >1 ) ) >0 ) ) =0 ;
 WR2: SIZEOF ( QUERY ( uar <*
     uncertainty_assigned_representation | SIZEOF ( QUERY ( u1
     <* uar. uncertainty | SIZEOF ( QUERY ( u2 <* uar.
     uncertainty | u2. name =u1. name ) ) >0 ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( qri <* qualified_representation_item |
     SIZEOF ( QUERY ( u1 <* qri. qualifiers | (
     'AUTOMOTIVE_DESIGN.'+ 'UNCERTAINTY_QUALIFIER' IN TYPEOF (
     u1 ) ) AND ( SIZEOF ( QUERY ( u2 <* qri. qualifiers | (
     'AUTOMOTIVE_DESIGN.'+ 'UNCERTAINTY_QUALIFIER' IN TYPEOF (
     u2 ) ) AND ( u2\ uncertainty_qualifier.measure_name =u1\
     uncertainty_qualifier.measure_name ) ) ) >0 ) ) ) >0 ) )
     =0;
END_RULE;

RULE coordinated_assembly_and_shape FOR
    (next_assembly_usage_occurrence);
WHERE
 WR1: SIZEOF ( QUERY ( nauo <* next_assembly_usage_occurrence |
     NOT ( assembly_shape_is_defined ( nauo ) ) ) ) =0;
END_RULE;

RULE curve_font_usage FOR
    (curve_style_font,
     externally_defined_curve_font,
     pre_defined_curve_font);
WHERE
 WR1: SIZEOF ( QUERY ( csf <* curve_style_font | ( SIZEOF (
     USEDIN ( csf , 'AUTOMOTIVE_DESIGN.CURVE_STYLE.CURVE_FONT' )
     ) =0 ) ) ) =0;
 WR2: SIZEOF ( QUERY ( pdcf <* pre_defined_curve_font | ( SIZEOF
     ( USEDIN ( pdcf ,
     'AUTOMOTIVE_DESIGN.CURVE_STYLE.CURVE_FONT' ) ) =0 ) ) ) =0;
 WR3: SIZEOF ( QUERY ( edcf <* externally_defined_curve_font |
     NOT ( SIZEOF ( USEDIN ( edcf ,
     'AUTOMOTIVE_DESIGN.'+'CURVE_STYLE.'+ 'CURVE_FONT' ) ) >=1 )
     ) ) =0;
END_RULE;

RULE dependent_instantiable_action_directive FOR
    (action_directive);
WHERE
 WR1: SIZEOF ( QUERY ( a <* action_directive | NOT ( SIZEOF (
     USEDIN ( a , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_action_resource_type FOR
    (action_resource_type);
WHERE
 WR1: SIZEOF ( QUERY ( a <* action_resource_type | NOT ( SIZEOF
     ( USEDIN ( a , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_approval_role FOR
    (approval_role);
WHERE
 WR1: SIZEOF ( QUERY ( a <* approval_role | NOT ( SIZEOF (
     USEDIN ( a , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_attribute_value_role FOR
    (attribute_value_role);
WHERE
 WR1: SIZEOF ( QUERY ( a <* attribute_value_role | NOT ( SIZEOF
     ( USEDIN ( a , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_classification_role FOR
    (classification_role);
WHERE
 WR1: SIZEOF ( QUERY ( c <* classification_role | NOT ( SIZEOF (
     USEDIN ( c , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_colour_rgb FOR
    (colour_rgb);
WHERE
 WR1: SIZEOF ( QUERY ( c <* colour_rgb | NOT ( SIZEOF ( USEDIN (
     c , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_contract_type FOR
    (contract_type);
WHERE
 WR1: SIZEOF ( QUERY ( c <* contract_type | NOT ( SIZEOF (
     USEDIN ( c , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_curve_style FOR
    (curve_style);
WHERE
 WR1: SIZEOF ( QUERY ( c <* curve_style | NOT ( SIZEOF ( USEDIN
     ( c , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_date FOR
    (date);
WHERE
 WR1: SIZEOF ( QUERY ( d <* date | NOT ( SIZEOF ( USEDIN ( d ,
     '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_date_and_time FOR
    (date_and_time);
WHERE
 WR1: SIZEOF ( QUERY ( d <* date_and_time | NOT ( SIZEOF (
     USEDIN ( d , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_date_role FOR
    (date_role);
WHERE
 WR1: SIZEOF ( QUERY ( d <* date_role | NOT ( SIZEOF ( USEDIN (
     d , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_date_time_role FOR
    (date_time_role);
WHERE
 WR1: SIZEOF ( QUERY ( d <* date_time_role | NOT ( SIZEOF (
     USEDIN ( d , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_derived_unit FOR
    (derived_unit);
WHERE
 WR1: SIZEOF ( QUERY ( d <* derived_unit | NOT ( SIZEOF ( USEDIN
     ( d , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_dimensional_size FOR
    (dimensional_size);
WHERE
 WR1: SIZEOF ( QUERY ( d <* dimensional_size | NOT ( SIZEOF (
     USEDIN ( d , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_document_usage_role FOR
    (document_usage_role);
WHERE
 WR1: SIZEOF ( QUERY ( d <* document_usage_role | NOT ( SIZEOF (
     USEDIN ( d , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_effectivity_context_role FOR
    (effectivity_context_role);
WHERE
 WR1: SIZEOF ( QUERY ( e <* effectivity_context_role | NOT (
     SIZEOF ( USEDIN ( e , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_event_occurrence_role FOR
    (event_occurrence_role);
WHERE
 WR1: SIZEOF ( QUERY ( e <* event_occurrence_role | NOT ( SIZEOF
     ( USEDIN ( e , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_externally_defined_symbol FOR
    (externally_defined_symbol);
WHERE
 WR1: SIZEOF ( QUERY ( e <* externally_defined_symbol | NOT (
     SIZEOF ( USEDIN ( e , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_fill_area_style FOR
    (fill_area_style);
WHERE
 WR1: SIZEOF ( QUERY ( f <* fill_area_style | NOT ( SIZEOF (
     USEDIN ( f , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_fill_area_style_colour FOR
    (fill_area_style_colour);
WHERE
 WR1: SIZEOF ( QUERY ( f <* fill_area_style_colour | NOT (
     SIZEOF ( USEDIN ( f , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_identification_role FOR
    (identification_role);
WHERE
 WR1: SIZEOF ( QUERY ( i <* identification_role | NOT ( SIZEOF (
     USEDIN ( i , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_measure_with_unit FOR
    (measure_with_unit);
WHERE
 WR1: SIZEOF ( QUERY ( m <* measure_with_unit | NOT ( SIZEOF (
     USEDIN ( m , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_named_unit FOR
    (named_unit);
WHERE
 WR1: SIZEOF ( QUERY ( n <* named_unit | NOT ( SIZEOF ( USEDIN (
     n , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_object_role FOR
    (object_role);
WHERE
 WR1: SIZEOF ( QUERY ( o <* object_role | NOT ( SIZEOF ( USEDIN
     ( o , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_organization_role FOR
    (organization_role);
WHERE
 WR1: SIZEOF ( QUERY ( o <* organization_role | NOT ( SIZEOF (
     USEDIN ( o , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_organizational_project_role FOR
    (organizational_project_role);
WHERE
 WR1: SIZEOF ( QUERY ( o <* organizational_project_role | NOT (
     SIZEOF ( USEDIN ( o , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_person_and_organization_role FOR
    (person_and_organization_role);
WHERE
 WR1: SIZEOF ( QUERY ( p <* person_and_organization_role | NOT (
     SIZEOF ( USEDIN ( p , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_pre_defined_colour FOR
    (pre_defined_colour);
WHERE
 WR1: SIZEOF ( QUERY ( p <* pre_defined_colour | NOT ( SIZEOF (
     USEDIN ( p , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_pre_defined_symbol FOR
    (pre_defined_symbol);
WHERE
 WR1: SIZEOF ( QUERY ( p <* pre_defined_symbol | NOT ( SIZEOF (
     USEDIN ( p , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_precision_qualifier FOR
    (precision_qualifier);
WHERE
 WR1: SIZEOF ( QUERY ( p <* precision_qualifier | NOT ( SIZEOF (
     USEDIN ( p , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_presentation_style_by_context FOR
    (presentation_style_by_context);
WHERE
 WR1: SIZEOF ( QUERY ( p <* presentation_style_by_context | NOT
     ( SIZEOF ( USEDIN ( p , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_product_definition_context_role FOR
    (product_definition_context_role);
WHERE
 WR1: SIZEOF ( QUERY ( p <* product_definition_context_role |
     NOT ( SIZEOF ( USEDIN ( p , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_resource_requirement_type FOR
    (resource_requirement_type);
WHERE
 WR1: SIZEOF ( QUERY ( r <* resource_requirement_type | NOT (
     SIZEOF ( USEDIN ( r , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_retention FOR
    (retention);
WHERE
 WR1: SIZEOF ( QUERY ( r <* retention | NOT ( SIZEOF ( USEDIN (
     r , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_standard_uncertainty FOR
    (standard_uncertainty);
WHERE
 WR1: SIZEOF ( QUERY ( s <* standard_uncertainty | NOT ( SIZEOF
     ( USEDIN ( s , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_symbol_colour FOR
    (symbol_colour);
WHERE
 WR1: SIZEOF ( QUERY ( s <* symbol_colour | NOT ( SIZEOF (
     USEDIN ( s , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_text_style FOR
    (text_style);
WHERE
 WR1: SIZEOF ( QUERY ( t <* text_style | NOT ( SIZEOF ( USEDIN (
     t , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_text_style_for_defined_font FOR
    (text_style_for_defined_font);
WHERE
 WR1: SIZEOF ( QUERY ( t <* text_style_for_defined_font | NOT (
     SIZEOF ( USEDIN ( t , '' ) ) >0 ) ) ) =0;
END_RULE;

 RULE dependent_instantiable_time_interval_role FOR (time_interval_role);
  WHERE
 wr1: SIZEOF ( QUERY ( t <* time_interval_role | NOT (
     SIZEOF ( USEDIN ( t , '' ) ) >0 ) ) ) =  0;
END_RULE;  -- 10303-214: automotive_design 

RULE dependent_instantiable_tolerance_value FOR
    (tolerance_value);
WHERE
 WR1: SIZEOF ( QUERY ( t <* tolerance_value | NOT ( SIZEOF (
     USEDIN ( t , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_type_qualifier FOR
    (type_qualifier);
WHERE
 WR1: SIZEOF ( QUERY ( t <* type_qualifier | NOT ( SIZEOF (
     USEDIN ( t , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE dependent_instantiable_uncertainty_qualifier FOR
    (uncertainty_qualifier);
WHERE
 WR1: SIZEOF ( QUERY ( u <* uncertainty_qualifier | NOT ( SIZEOF
     ( USEDIN ( u , '' ) ) >0 ) ) ) =0;
END_RULE;

RULE design_constraint_requires_product_definition FOR
    (product_definition,
     product_definition_formation,
     product_related_product_category);
WHERE
 WR1: SIZEOF ( QUERY ( pdf <* product_definition_formation | (
     SIZEOF ( QUERY ( prpc <* USEDIN ( pdf. of_product ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_RELATED_PRODUCT_CATEGORY.'+
     'PRODUCTS' ) | prpc. name ='requirement' ) ) >0 ) AND (
     SIZEOF ( QUERY ( pd <* USEDIN ( pdf ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_DEFINITION.'+ 'FORMATION' ) |
     pd. frame_of_reference.name =
     'design constraint definition' ) ) <>1 ) ) ) =0;
END_RULE;

RULE dimensionality_is_two_or_three FOR
    (geometric_representation_context);
WHERE
 WR1: SIZEOF ( QUERY ( g <* geometric_representation_context |
     NOT ( ( g.coordinate_space_dimension =2 ) OR (
     g.coordinate_space_dimension =3 ) ) ) ) =0;
END_RULE;

RULE draughting_subfigure_representation_layers FOR
    (draughting_subfigure_representation);
WHERE
 WR1: SIZEOF ( QUERY ( dsr <*
     draughting_subfigure_representation | NOT ( SIZEOF ( QUERY
     ( item <* dsr\ representation.items | (
     'AUTOMOTIVE_DESIGN.'+ 'ANNOTATION_OCCURRENCE' IN TYPEOF (
     item ) ) AND ( SIZEOF ( USEDIN ( item ,
     'AUTOMOTIVE_DESIGN.'+'PRESENTATION_LAYER_ASSIGNMENT.'+'ASSIGNED_ITEMS'
     ) ) =0 ) ) ) =0 ) ) ) =0;
END_RULE;

RULE drawing_sheet_annotation_layers FOR
    (drawing_sheet_revision);
WHERE
 WR1: SIZEOF ( QUERY ( dsr <* drawing_sheet_revision | NOT (
     SIZEOF ( QUERY ( ao <* QUERY ( it <* dsr\
     representation.items | ( 'AUTOMOTIVE_DESIGN.'+
     'ANNOTATION_OCCURRENCE' IN TYPEOF ( it ) ) ) | NOT ( SIZEOF
     ( USEDIN ( ao ,
     'AUTOMOTIVE_DESIGN.'+'PRESENTATION_LAYER_ASSIGNMENT.'+'ASSIGNED_ITEMS'
     ) ) >=1 ) ) ) =0 ) ) ) =0;
END_RULE;

RULE drawing_sheet_layout_usage FOR
    (mapped_item);
WHERE
 WR1: SIZEOF ( QUERY ( dsl <* QUERY ( mi <* mapped_item | (
     'AUTOMOTIVE_DESIGN.'+ 'DRAWING_SHEET_LAYOUT' IN TYPEOF (
     mi. mapping_source.mapped_representation ) ) ) | NOT (
     SIZEOF ( USEDIN ( dsl , '' ) ) = SIZEOF ( QUERY ( dsr <*
     USEDIN ( dsl , 'AUTOMOTIVE_DESIGN.'+'REPRESENTATION.'+
     'ITEMS' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'DRAWING_SHEET_REVISION' IN TYPEOF ( dsr ) ) ) ) ) ) ) =0;
END_RULE;

RULE drawing_view_annotation_layers FOR
    (presentation_view);
WHERE
 WR1: SIZEOF ( QUERY ( pv <* presentation_view | NOT ( SIZEOF (
     QUERY ( ao <* QUERY ( it <* pv\ representation.items | (
     'AUTOMOTIVE_DESIGN.'+'ANNOTATION_OCCURRENCE' IN TYPEOF ( it
     ) ) ) | NOT ( SIZEOF ( USEDIN ( ao ,
     'AUTOMOTIVE_DESIGN.'+'PRESENTATION_LAYER_ASSIGNMENT.'+'ASSIGNED_ITEMS'
     ) ) >=1 ) ) ) =0 ) ) ) =0;
END_RULE;

RULE event_occurrence_requires_event_occurrence_assignment FOR
    (event_occurrence,
     event_occurrence_assignment,
     relative_event_occurrence);
WHERE
 WR1: SIZEOF ( QUERY ( eo <* event_occurrence | ( SIZEOF (
     USEDIN ( eo ,
     'AUTOMOTIVE_DESIGN.'+'RELATIVE_EVENT_OCCURRENCE.'+
     'BASE_EVENT' ) ) =0 ) AND ( SIZEOF ( USEDIN ( eo ,
     'AUTOMOTIVE_DESIGN.'+'EVENT_OCCURRENCE_ASSIGNMENT.'+
     'ASSIGNED_EVENT_OCCURRENCE' ) ) =0 ) ) ) =0;
END_RULE;

RULE executed_action_requires_action_status FOR
    (executed_action);
WHERE
 WR1: SIZEOF ( QUERY ( ea <* executed_action | SIZEOF ( USEDIN (
     ea , 'AUTOMOTIVE_DESIGN.'+'ACTION_STATUS.'+
     'ASSIGNED_ACTION' ) ) >1 ) ) =0;
END_RULE;

RULE externally_defined_class_with_known_source_requirement FOR
    (externally_defined_class);
WHERE
 WR1: SIZEOF ( QUERY ( edc <* externally_defined_class | (
     'AUTOMOTIVE_DESIGN.'+ 'KNOWN_SOURCE' IN TYPEOF ( edc.
     source ) ) AND ( SIZEOF ( QUERY ( aoa <* USEDIN ( edc ,
     'AUTOMOTIVE_DESIGN.APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS' )
     | aoa. role.name = 'class supplier' ) ) =0 ) ) ) =0;
END_RULE;

RULE fill_area_style_tile_symbol_constraint FOR
    (fill_area_style_tile_symbol_with_style);
WHERE
 WR1: SIZEOF ( QUERY ( fast <*
     fill_area_style_tile_symbol_with_style | ( (
     'AUTOMOTIVE_DESIGN.'+ 'DEFINED_SYMBOL' IN TYPEOF ( fast.
     symbol\styled_item. item ) ) AND NOT (
     'AUTOMOTIVE_DESIGN.'+ 'EXTERNALLY_DEFINED_SYMBOL' IN TYPEOF
     ( fast. symbol\styled_item.item\ defined_symbol.definition
     ) ) ) ) ) =0;
END_RULE;

RULE full_model_change_completeness_for_action_property FOR
    (action_property);
WHERE
 WR1: SIZEOF ( QUERY ( ap <* action_property | ( ap. name =
     'full model change' ) AND ( SIZEOF ( QUERY ( apr <* USEDIN
     ( ap ,
     'AUTOMOTIVE_DESIGN.'+'ACTION_PROPERTY_REPRESENTATION.'+
     'PROPERTY' ) | apr. name = 'original representation' ) ) =0
     ) ) ) =0;
 WR2: SIZEOF ( QUERY ( ap <* action_property | ( ap. name =
     'full model change' ) AND ( SIZEOF ( QUERY ( apr <* USEDIN
     ( ap ,
     'AUTOMOTIVE_DESIGN.'+'ACTION_PROPERTY_REPRESENTATION.'+
     'PROPERTY' ) | apr. name = 'replacement representation' ) )
     =0 ) ) ) =0;
 WR3: SIZEOF ( QUERY ( ap <* action_property | SIZEOF ( QUERY (
     apr1 <* USEDIN ( ap ,
     'AUTOMOTIVE_DESIGN.'+'ACTION_PROPERTY_REPRESENTATION.'+
     'PROPERTY' ) | ( apr1. name = 'added elements' ) AND (
     SIZEOF ( QUERY ( apr2 <* USEDIN ( ap ,
     'AUTOMOTIVE_DESIGN.'+'ACTION_PROPERTY_REPRESENTATION.'+
     'PROPERTY' ) | ( apr2. name = 'replacement representation'
     ) AND ( SIZEOF ( QUERY ( i1 <* apr1. representation.items |
     SIZEOF ( QUERY ( i2 <* apr2. representation.items | i1:=:i2
     ) ) >0 ) ) <> SIZEOF ( apr1. representation.items ) ) ) )
     >0 ) ) ) >0 ) ) =0;
 WR4: SIZEOF ( QUERY ( ap <* action_property | SIZEOF ( QUERY (
     apr1 <* USEDIN ( ap ,
     'AUTOMOTIVE_DESIGN.'+'ACTION_PROPERTY_REPRESENTATION.'+
     'PROPERTY' ) | ( apr1. name = 'deleted elements' ) AND (
     SIZEOF ( QUERY ( apr2 <* USEDIN ( ap ,
     'AUTOMOTIVE_DESIGN.'+'ACTION_PROPERTY_REPRESENTATION.'+
     'PROPERTY' ) | ( apr2. name = 'original representation' )
     AND ( SIZEOF ( QUERY ( i1 <* apr1. representation.items |
     SIZEOF ( QUERY ( i2 <* apr2. representation.items | i1:=:i2
     ) ) >0 ) ) <> SIZEOF ( apr1. representation.items ) ) ) )
     >0 ) ) ) >0 ) ) =0;
END_RULE;

RULE full_model_change_completeness_for_property_definition FOR
    (property_definition);
WHERE
 WR1: SIZEOF ( QUERY ( pd <* property_definition | ( pd. name =
     'full model change' ) AND ( SIZEOF ( QUERY ( pdr <* USEDIN
     ( pd ,
     'AUTOMOTIVE_DESIGN.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
     ) | pdr. name = 'original representation' ) ) =0 ) ) ) =0;
 WR2: SIZEOF ( QUERY ( pd <* property_definition | ( pd. name =
     'full model change' ) AND ( SIZEOF ( QUERY ( pdr <* USEDIN
     ( pd ,
     'AUTOMOTIVE_DESIGN.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
     ) | pdr. name = 'replacement representation' ) ) =0 ) ) )
     =0;
 WR3: SIZEOF ( QUERY ( pd <* property_definition | ( SIZEOF (
     QUERY ( pdr <* USEDIN ( pd ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
     'DEFINITION' ) | ( pdr. name = 'added elements' ) AND (
     SIZEOF ( QUERY ( i <* pdr. used_representation.items |
     SIZEOF ( QUERY ( pdr1 <* USEDIN ( pd ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
     'DEFINITION' ) | ( pdr1. name =
     'replacement representation' ) AND ( NOT ( i IN pdr1.
     used_representation.items ) ) ) ) >0 ) ) >0 ) ) ) >0 ) ) )
     =0;
 WR4: SIZEOF ( QUERY ( pd <* property_definition | ( SIZEOF (
     QUERY ( pdr <* USEDIN ( pd ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
     'DEFINITION' ) | ( pdr. name = 'deleted elements' ) AND (
     SIZEOF ( QUERY ( i <* pdr. used_representation.items |
     SIZEOF ( QUERY ( pdr1 <* USEDIN ( pd ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
     'DEFINITION' ) | ( pdr1. name = 'original representation' )
     AND ( NOT ( i IN pdr1. used_representation.items ) ) ) ) >0
     ) ) >0 ) ) ) >0 ) ) ) =0;
END_RULE;

RULE global_length_and_angle_units_2d_or_3d FOR
    (global_unit_assigned_context);
WHERE
 WR1: SIZEOF ( QUERY ( guac <* global_unit_assigned_context |
     SIZEOF ( guac. units ) <2 ) ) =0;
 WR2: SIZEOF ( QUERY ( guac <* global_unit_assigned_context | (
     SIZEOF ( QUERY ( x <* guac. units | 'AUTOMOTIVE_DESIGN.'+
     'LENGTH_UNIT' IN TYPEOF ( x ) ) ) <>1 ) OR ( SIZEOF ( QUERY
     ( x <* guac. units | 'AUTOMOTIVE_DESIGN.'+
     'PLANE_ANGLE_UNIT' IN TYPEOF ( x ) ) ) <>1 ) ) ) =0;
END_RULE;

RULE person_requires_person_and_organization FOR
    (person);
WHERE
 WR1: SIZEOF ( QUERY ( p <* person | 	 SIZEOF ( USEDIN ( p ,
     'AUTOMOTIVE_DESIGN.PERSON_AND_ORGANIZATION.THE_PERSON' ) 	
     ) =0 ) ) =0;
END_RULE;

RULE physical_instance_requires_product_definition FOR
    (product_definition,
     product_definition_formation,
     product_related_product_category);
WHERE
 WR1: SIZEOF ( QUERY ( pdf <* product_definition_formation | (
     SIZEOF ( QUERY ( prpc <* USEDIN ( pdf. of_product ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_RELATED_PRODUCT_CATEGORY.'+
     'PRODUCTS' ) | prpc. name = 'physically realized product' )
     ) >0 ) AND ( SIZEOF ( QUERY ( pd <* USEDIN ( pdf ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_DEFINITION.'+ 'FORMATION' ) |
     pd. frame_of_reference.name = 'physical occurrence' ) ) <>1
     ) ) ) =0;
END_RULE;

RULE plib_class_reference_requires_version FOR
    (externally_defined_class);
WHERE
 WR1: SIZEOF ( QUERY ( edc <* externally_defined_class | (
     'AUTOMOTIVE_DESIGN.'+ 'KNOWN_SOURCE' IN TYPEOF ( edc.
     source ) ) AND ( SIZEOF ( QUERY ( aei <* USEDIN ( edc ,
     'AUTOMOTIVE_DESIGN.APPLIED_EXTERNAL_IDENTIFICATION_ASSIGNMENT.ITEMS'
     ) | aei. role.name ='version' ) ) <>1 ) ) ) =0;
 WR2: SIZEOF ( QUERY ( edc <* externally_defined_class | (
     'AUTOMOTIVE_DESIGN.'+ 'KNOWN_SOURCE' IN TYPEOF ( edc.
     source ) ) AND ( SIZEOF ( QUERY ( aei <* USEDIN ( edc ,
     'AUTOMOTIVE_DESIGN.APPLIED_IDENTIFICATION_ASSIGNMENT.ITEMS'
     ) | aei. role.name ='version' ) ) >0 ) ) ) =0;
END_RULE;

RULE plib_property_reference_requires_name_scope FOR
    (externally_defined_general_property);
WHERE
 WR1: SIZEOF ( QUERY ( edgp <*
     externally_defined_general_property | (
     'AUTOMOTIVE_DESIGN.'+ 'KNOWN_SOURCE' IN TYPEOF ( edgp.
     source ) ) AND ( SIZEOF ( QUERY ( edir <* USEDIN ( edgp ,
     'AUTOMOTIVE_DESIGN.'+'EXTERNALLY_DEFINED_ITEM_RELATIONSHIP.'+
     'RELATING_ITEM' ) | ( edir. name = 'name scope' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'EXTERNALLY_DEFINED_CLASS' IN TYPEOF
     ( edir. related_item ) ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'KNOWN_SOURCE' IN TYPEOF ( edir. related_item.source ) ) )
     ) <>1 ) ) ) =0;
END_RULE;

RULE plib_property_reference_requires_version FOR
    (externally_defined_general_property);
WHERE
 WR1: SIZEOF ( QUERY ( edgp <*
     externally_defined_general_property | (
     'AUTOMOTIVE_DESIGN.'+ 'KNOWN_SOURCE' IN TYPEOF ( edgp.
     source ) ) AND ( SIZEOF ( QUERY ( edir <* USEDIN ( edgp ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_EXTERNAL_IDENTIFICATION_ASSIGNMENT.'+
     'ITEMS' ) | ( edir. role.name ='version' ) ) ) <>1 ) ) )
     =0;
END_RULE;

RULE presentation_layer_assignment_constraint_2d_or_3d FOR
    (presentation_layer_assignment);
WHERE
 WR1: SIZEOF ( QUERY ( pla <* presentation_layer_assignment |
     NOT ( SIZEOF ( QUERY ( pnt <* QUERY ( item <* pla.
     assigned_items | ( 'AUTOMOTIVE_DESIGN.'+ 'POINT' IN TYPEOF
     ( item ) ) ) | NOT ( SIZEOF ( QUERY ( rep <* USEDIN ( pnt ,
     'AUTOMOTIVE_DESIGN.REPRESENTATION.ITEMS' ) | (
     'AUTOMOTIVE_DESIGN.'+ 'SHAPE_REPRESENTATION' IN TYPEOF (
     rep ) ) ) ) =0 ) ) ) =0 ) ) ) =0;
 WR2: SIZEOF ( QUERY ( pla <* presentation_layer_assignment |
     NOT ( SIZEOF ( QUERY ( crv <* QUERY ( item <* pla.
     assigned_items | ( 'AUTOMOTIVE_DESIGN.'+ 'CURVE' IN TYPEOF
     ( item ) ) ) | NOT ( SIZEOF ( QUERY ( rep <* USEDIN ( crv ,
     'AUTOMOTIVE_DESIGN.REPRESENTATION.ITEMS' ) | (
     'AUTOMOTIVE_DESIGN.'+ 'SHAPE_REPRESENTATION' IN TYPEOF (
     rep ) ) ) ) =0 ) ) ) =0 ) ) ) =0;
 WR3: SIZEOF ( QUERY ( pla <* presentation_layer_assignment |
     NOT ( SIZEOF ( QUERY ( srf <* QUERY ( item <* pla.
     assigned_items | ( 'AUTOMOTIVE_DESIGN.'+ 'SURFACE' IN
     TYPEOF ( item ) ) ) | NOT ( SIZEOF ( QUERY ( rep <* USEDIN
     ( srf , 'AUTOMOTIVE_DESIGN.REPRESENTATION.ITEMS' ) | (
     'AUTOMOTIVE_DESIGN.'+ 'SHAPE_REPRESENTATION' IN TYPEOF (
     rep ) ) ) ) =0 ) ) ) =0 ) ) ) =0;
 WR4: SIZEOF ( QUERY ( pla <* presentation_layer_assignment |
     NOT ( SIZEOF ( QUERY ( ao <* QUERY ( item <* pla.
     assigned_items | ( 'AUTOMOTIVE_DESIGN.'+
     'ANNOTATION_OCCURRENCE' IN TYPEOF ( item ) ) ) | NOT (
     SIZEOF ( QUERY ( ur <* using_representations ( ao ) | NOT (
     SIZEOF ( TYPEOF ( ur )
     *['AUTOMOTIVE_DESIGN.'+'DRAUGHTING_SUBFIGURE_REPRESENTATION'
     , 'AUTOMOTIVE_DESIGN.'+ 'DRAUGHTING_MODEL' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRESENTATION_AREA' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRESENTATION_VIEW'] ) =1 ) ) ) =0 )
     ) ) =0 ) ) ) =0;
END_RULE;

RULE presentation_view_presented_once FOR
    (presentation_view);
WHERE
 WR1: SIZEOF ( QUERY ( pv <* presentation_view | ( SIZEOF (
     QUERY ( rm <* USEDIN ( pv ,
     'AUTOMOTIVE_DESIGN.REPRESENTATION_MAP.'+'MAPPED_REPRESENTATION'
     ) | ( SIZEOF ( USEDIN ( rm ,
     'AUTOMOTIVE_DESIGN.MAPPED_ITEM.MAPPING_SOURCE' ) ) <>1 ) OR
     ( SIZEOF ( QUERY ( mi <* USEDIN ( rm ,
     'AUTOMOTIVE_DESIGN.MAPPED_ITEM.MAPPING_SOURCE' ) | ( SIZEOF
     ( USEDIN ( mi , 'AUTOMOTIVE_DESIGN.REPRESENTATION.ITEMS' )
     ) <>1 ) OR ( SIZEOF ( QUERY ( r <* USEDIN ( mi ,
     'AUTOMOTIVE_DESIGN.REPRESENTATION.ITEMS' ) | NOT (
     'AUTOMOTIVE_DESIGN.'+ 'PRESENTATION_AREA' IN TYPEOF ( r ) )
     ) ) <>0 ) ) ) <>0 ) ) ) <>0 ) ) ) =0;
END_RULE;

 RULE product_concept_feature_requires_category 
    FOR (product_concept_feature,
      product_concept_feature_category);
  WHERE
 wr1:
     SIZEOF ( QUERY ( pcf <* product_concept_feature |
     (SIZEOF(['AUTOMOTIVE_DESIGN.' + 'INCLUSION_PRODUCT_CONCEPT_FEATURE',
      'AUTOMOTIVE_DESIGN.' + 'CONDITIONAL_CONCEPT_FEATURE'] * TYPEOF(pcf))
      = 0) AND (SIZEOF ( QUERY ( aga <* USEDIN ( pcf ,
     'AUTOMOTIVE_DESIGN.' + 'APPLIED_GROUP_ASSIGNMENT.' +
     'ITEMS' ) | ( aga.role.name = 
     'specification category member' ) AND (
     'AUTOMOTIVE_DESIGN.' + 'PRODUCT_CONCEPT_FEATURE_CATEGORY'
     IN TYPEOF ( aga.assigned_group ) ) ) ) <>1 ) ) ) =  0;
END_RULE;

RULE product_definition_replacement_requires_effectivity_assignment FOR
    (applied_effectivity_assignment,
     product_definition_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( pdr <* product_definition_relationship |
     ( pdr. name = 'definition replacement' ) AND ( SIZEOF (
     USEDIN ( pdr ,
     'AUTOMOTIVE_DESIGN.APPLIED_EFFECTIVITY_ASSIGNMENT.ITEMS' )
     ) =0 ) ) ) =0;
END_RULE;

RULE product_requires_category FOR
    (product,
     product_related_product_category);
WHERE
 WR1: SIZEOF ( QUERY ( p <* product | SIZEOF ( USEDIN ( p ,
     'AUTOMOTIVE_DESIGN.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
     ) ) =0 ) ) =0;
END_RULE;

 RULE product_requires_id_owner FOR (product);
  WHERE
 WR1: SIZEOF ( QUERY ( prod <* product | ( SIZEOF ( QUERY (
     prpc <* USEDIN ( prod ,
     'AUTOMOTIVE_DESIGN.' +
     'PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS') |
      prpc.name IN  ['part' , 'tool' , 'raw material' ] ) )
     >0 ) AND ( SIZEOF ( QUERY ( apoa <* USEDIN ( prod ,
     'AUTOMOTIVE_DESIGN.' +
     'APPLIED_PERSON_AND_ORGANIZATION_ASSIGNMENT.ITEMS'
     ) | apoa\ person_and_organization_assignment.role.name =
     'id owner' ) ) +
     SIZEOF ( QUERY ( oa <* USEDIN ( prod ,
     'AUTOMOTIVE_DESIGN.' +
     'APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS'
     ) | oa\ organization_assignment.role.name = 'id owner' ) )
     <>  1 ) ) ) =  0;
END_RULE;

RULE product_requires_version FOR
    (product);
WHERE
 WR1: SIZEOF ( QUERY ( prod <* product | ( SIZEOF ( USEDIN (
     prod ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_DEFINITION_FORMATION.'+
     'OF_PRODUCT' ) ) =0 ) ) ) =0;
END_RULE;

RULE restrict_action_resource_requirement_for_process_operation FOR
    (action,
     action_resource_requirement);
WHERE
 WR1: SIZEOF ( QUERY ( a <* action | ( a.name =
     'process operation' ) AND ( SIZEOF ( QUERY ( arr <* USEDIN
     ( a , 'AUTOMOTIVE_DESIGN.'+'ACTION_RESOURCE_REQUIREMENT.'+
     'OPERATIONS' ) | arr. name = 'reference tool' ) ) >1 ) ) )
     =0;
 WR2: SIZEOF ( QUERY ( arr <* action_resource_requirement | (
     arr. name = 'reference tool' ) AND ( NOT (
     'AUTOMOTIVE_DESIGN.'+ 'REQUIREMENT_FOR_ACTION_RESOURCE' IN
     TYPEOF ( arr ) ) ) AND ( SIZEOF ( QUERY ( ar <* arr\
     requirement_for_action_resource.resources |
     'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_DEFINITION_RESOURCE' IN
     TYPEOF ( ar ) ) ) <>1 ) ) ) =0;
 WR3: SIZEOF ( QUERY ( arr <* action_resource_requirement | (
     arr. name<> 'reference tool' ) AND ( arr. name<>
     'non reference tool' ) ) ) =0;
END_RULE;

RULE restrict_alternative_definition FOR
    (product_definition,
     product_definition_context);
WHERE
 WR1: SIZEOF ( QUERY ( pd <* product_definition | ( pd.
     frame_of_reference.name = 'alternative definition' ) AND (
     SIZEOF ( QUERY ( pdr <* USEDIN ( pd ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_DEFINITION_RELATIONSHIP.'+
     'RELATED_PRODUCT_DEFINITION' ) | pdr. name =
     'solution alternative definition' ) ) <>1 ) ) ) =0;
 WR2: SIZEOF ( QUERY ( pd <* product_definition | ( pd.
     frame_of_reference.name = 'alternative definition' ) AND
     NOT ( pd. name IN ['technical' , 'supplier' , 'final' ,
     'technical supplier' , 'technical final' , 'supplier final'
     , 'technical supplier final' , ''] ) ) ) =0;
 WR3: SIZEOF ( QUERY ( pd <* product_definition | ( pd.
     frame_of_reference.name = 'alternative definition' ) AND (
     pd. name IN ['supplier' , 'technical supplier' ,
     'supplier final' , 'technical supplier final' ] ) AND (
     SIZEOF ( QUERY ( aoa <* USEDIN ( pd.formation ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_ORGANIZATION_ASSIGNMENT.'+
     'ITEMS' ) | aoa. role.name ='supplier' ) ) <>1 ) ) ) =0;
 WR4: SIZEOF ( QUERY ( pd <* product_definition | ( pd.
     frame_of_reference.name = 'alternative definition' ) AND (
     pd. name IN ['final' , 'technical final' , 'supplier final'
     , 'technical supplier final' ] ) AND ( SIZEOF ( QUERY ( pdr
     <* USEDIN ( pd ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_DEFINITION_RELATIONSHIP.'+
     'RELATING_PRODUCT_DEFINITION' ) | pdr. name =
     'final specification' ) ) =0 ) AND ( SIZEOF ( QUERY ( pd <*
     USEDIN ( pd , 'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION.'+
     'DEFINITION' ) | SIZEOF ( QUERY ( pdr <* USEDIN ( pd ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
     'DEFINITION' ) | ( pdr. used_representation.name =
     'final item characteristics' ) AND ( SIZEOF ( QUERY ( i <*
     pdr. used_representation.items | 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) ) =
     SIZEOF ( pdr. used_representation.items ) ) AND ( SIZEOF (
     pdr. used_representation.items ) >=2 ) AND ( SIZEOF ( QUERY
     ( i <* pdr. used_representation.items | i.name =
     'final item status' ) ) =1 ) ) ) >0 ) ) =0 ) ) ) =0;
END_RULE;

RULE restrict_applied_action_assignment FOR
    (applied_action_assignment,
     object_role);
WHERE
 WR1: SIZEOF ( QUERY ( aaa <* applied_action_assignment | ( aaa.
     role.description = 'activity element' ) AND NOT (
     'AUTOMOTIVE_DESIGN.'+ 'EXECUTED_ACTION' IN TYPEOF ( aaa.
     assigned_action ) ) ) ) =0;
 WR2: SIZEOF ( QUERY ( aaa <* applied_action_assignment | ( aaa.
     role.description = 'activity element' ) AND NOT
     item_correlation ( aaa. items , ['ACTION' , 'ACTION_METHOD'
     , 'ACTION_PROPERTY' , 'ASSEMBLY_COMPONENT_USAGE_SUBSTITUTE'
     , 'CONFIGURATION_ITEM' , 'CONFIGURATION_EFFECTIVITY' ,
     'CONFIGURED_EFFECTIVITY_ASSIGNMENT' , 'DOCUMENT_FILE' ,
     'DRAUGHTING_MODEL' , 'DRAWING_REVISION' ,
     'GENERAL_PROPERTY' , 'MATERIAL_DESIGNATION' ,
     'MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION' ,
     'PRESENTATION_AREA' , 'PRODUCT' , 'PRODUCT_CONCEPT' ,
     'PRODUCT_CONCEPT_FEATURE' ,
     'PRODUCT_CONCEPT_FEATURE_ASSOCIATION' ,
     'PRODUCT_CONCEPT_FEATURE_CATEGORY' ,
     'PRODUCT_CONCEPT_FEATURE_CATEGORY_USAGE' ,
     'PRODUCT_DEFINITION' , 'PRODUCT_DEFINITION_FORMATION' ,
     'PRODUCT_DEFINITION_RELATIONSHIP' ,
     'PRODUCT_DEFINITION_SUBSTITUTE' , 'PROPERTY_DEFINITION' ,
     'RESOURCE_PROPERTY' , 'SHAPE_ASPECT' ,
     'SHAPE_REPRESENTATION'] ) ) ) =0;
 WR3: SIZEOF ( QUERY ( aaa <* applied_action_assignment | ( NOT
     EXISTS ( aaa. role ) OR ( aaa. role.description =
     'activity element' ) ) AND ( SIZEOF ( QUERY ( i <* aaa.
     items | 'AUTOMOTIVE_DESIGN.'+ 'APPLIED_ACTION_ASSIGNMENT'
     IN TYPEOF ( i ) ) ) >0 ) ) ) =0;
 WR4: SIZEOF ( QUERY ( aaa <* applied_action_assignment | ( aaa.
     role.name = 'deliverable element' ) AND ( NOT (
     'AUTOMOTIVE_DESIGN.'+ 'ELEMENT_DELIVERY' IN TYPEOF ( aaa.
     assigned_action ) ) OR ( SIZEOF ( QUERY ( i <* aaa. items |
     'AUTOMOTIVE_DESIGN.'+ 'APPLIED_ACTION_ASSIGNMENT' IN TYPEOF
     ( i ) ) ) >1 ) OR ( SIZEOF ( QUERY ( i <* aaa. items | (
     'AUTOMOTIVE_DESIGN.'+ 'APPLIED_ACTION_ASSIGNMENT' IN TYPEOF
     ( i ) ) AND ( i\action_assignment. role.description<>
     'activity element' ) ) ) >0 ) ) ) ) =0;
 WR5: SIZEOF ( QUERY ( aaa <* applied_action_assignment | ( aaa.
     role.name ='retention' ) AND NOT ( 'AUTOMOTIVE_DESIGN.'+
     'RETENTION' IN TYPEOF ( aaa. assigned_action ) ) ) ) =0;
 WR6: SIZEOF ( QUERY ( aaa <* applied_action_assignment | ( aaa.
     role.name ='retention' ) AND NOT item_correlation ( aaa.
     items , ['ACTION' , 'ACTION_DIRECTIVE' , 'ACTION_PROPERTY'
     , 'ACTION_RELATIONSHIP' , 'APPLIED_ACTION_ASSIGNMENT' ,
     'APPLIED_CLASSIFICATION_ASSIGNMENT' ,
     'ASSEMBLY_COMPONENT_USAGE_SUBSTITUTE' , 'CERTIFICATION' ,
     'CLASS_SYSTEM' , 'CONFIGURATION_EFFECTIVITY' ,
     'CONFIGURATION_ITEM' , 'CONFIGURED_EFFECTIVITY_ASSIGNMENT'
     , 'DOCUMENT_FILE' , 'DRAUGHTING_MODEL' , 'DRAWING_REVISION'
     , 'GENERAL_PROPERTY' , 'MATERIAL_DESIGNATION' ,
     'MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION' ,
     'ORGANIZATIONAL_PROJECT' , 'PRESENTATION_AREA' , 'PRODUCT'
     , 'PRODUCT_CONCEPT' , 'PRODUCT_CONCEPT_FEATURE' ,
     'PRODUCT_CONCEPT_FEATURE_ASSOCIATION' ,
     'PRODUCT_CONCEPT_FEATURE_CATEGORY' ,
     'PRODUCT_CONCEPT_FEATURE_CATEGORY_USAGE' ,
     'PRODUCT_DEFINITION' , 'PRODUCT_DEFINITION_FORMATION' ,
     'PRODUCT_DEFINITION_RELATIONSHIP' ,
     'PRODUCT_DEFINITION_SUBSTITUTE' , 'PROPERTY_DEFINITION' ,
     'RESOURCE_PROPERTY' , 'SHAPE_REPRESENTATION' ,
     'VERSIONED_ACTION_REQUEST'] ) ) ) =0;
 WR7: SIZEOF ( QUERY ( aaa <* applied_action_assignment | ( aaa.
     role.name = 'test activity' ) AND NOT item_correlation (
     aaa. items , ['PROPERTY_DEFINITION'] ) ) ) =0;
END_RULE;

RULE restrict_applied_action_request_assignment FOR
    (applied_action_request_assignment,
     object_role);
WHERE
 WR1: SIZEOF ( QUERY ( aara <* applied_action_request_assignment
     | aara. role.name<>'scope' ) ) =0;
END_RULE;

RULE restrict_applied_classification_assignment_role FOR
    (applied_classification_assignment);
WHERE
 WR1: SIZEOF ( QUERY ( aca <* applied_classification_assignment
     | ( 'AUTOMOTIVE_DESIGN.'+ 'CLASS' IN TYPEOF ( aca.
     assigned_class ) ) AND NOT ( aca. role.name IN
     ['definitional' , 'non-definitional' , ''] ) ) ) =0;
 WR2: SIZEOF ( QUERY ( aca <* applied_classification_assignment
     | ( aca. role.name IN ['definitional' , 'non-definitional'
     , ''] ) AND NOT ( 'AUTOMOTIVE_DESIGN.'+ 'CLASS' IN TYPEOF (
     aca. assigned_class ) ) ) ) =0;
 WR3: SIZEOF ( QUERY ( aca <* applied_classification_assignment
     | ( 'AUTOMOTIVE_DESIGN.'+ 'CLASS_SYSTEM' IN TYPEOF ( aca.
     assigned_class ) ) AND ( aca. role.name<>
     'class system membership' ) ) ) =0;
 WR4: SIZEOF ( QUERY ( aca <* applied_classification_assignment
     | ( aca. role.name = 'class system membership' ) AND NOT (
     'AUTOMOTIVE_DESIGN.'+ 'CLASS_SYSTEM' IN TYPEOF ( aca.
     assigned_class ) ) ) ) =0;
END_RULE;

RULE restrict_applied_event_occurrence_assignment FOR
    (applied_event_occurrence_assignment);
WHERE
 WR1: SIZEOF ( QUERY ( eo <* applied_event_occurrence_assignment
     | ( eo\ event_occurrence_assignment.role. name =
     'event context' ) AND ( SIZEOF ( eo. items ) >1 ) ) ) =0;
END_RULE;

RULE restrict_applied_organizational_project_assignment FOR
    (applied_organizational_project_assignment,
     object_role);
WHERE
 WR1: SIZEOF ( QUERY ( aopa <*
     applied_organizational_project_assignment | ( aopa.
     role.name = 'affecting project' ) AND NOT item_correlation
     ( aopa. items , ['PRODUCT_CONCEPT'] ) ) ) =0;
 WR2: SIZEOF ( QUERY ( aopa <*
     applied_organizational_project_assignment | ( aopa.
     role.name = 'work program' ) AND NOT item_correlation (
     aopa. items , ['EXECUTED_ACTION'] ) ) ) =0;
END_RULE;

RULE restrict_approval FOR
    (approval,
     approval_date_time);
WHERE
 WR1: SIZEOF ( QUERY ( a <* approval | SIZEOF ( USEDIN ( a ,
     'AUTOMOTIVE_DESIGN.APPROVAL_DATE_TIME.DATED_APPROVAL' ) )
     >2 ) ) =0;
 WR2: SIZEOF ( QUERY ( adt <* approval_date_time | ( NOT EXISTS
     ( adt. role ) ) OR ( NOT ( adt. role.name IN ['actual' ,
     'planned'] ) ) ) ) =0;
 WR3: SIZEOF ( QUERY ( a <* approval | SIZEOF ( QUERY ( adt <*
     USEDIN ( a , 'AUTOMOTIVE_DESIGN.'+'APPROVAL_DATE_TIME.'+
     'DATED_APPROVAL' ) | adt. role.name ='actual' ) ) >1 ) )
     =0;
 WR4: SIZEOF ( QUERY ( a <* approval | SIZEOF ( QUERY ( adt <*
     USEDIN ( a , 'AUTOMOTIVE_DESIGN.'+'APPROVAL_DATE_TIME.'+
     'DATED_APPROVAL' ) | adt. role.name ='planned' ) ) >1 ) )
     =0;
END_RULE;

RULE restrict_camera_image_in_view FOR
    (camera_image,
     presentation_view);
WHERE
 WR1: SIZEOF ( QUERY ( ci <* camera_image | ( SIZEOF ( QUERY ( r
     <* USEDIN ( ci , 'AUTOMOTIVE_DESIGN.REPRESENTATION.ITEMS' )
     | ( 'AUTOMOTIVE_DESIGN.'+ 'PRESENTATION_VIEW' IN TYPEOF ( r
     ) ) ) ) ) <>1 ) ) =0;
 WR2: SIZEOF ( QUERY ( pv <* presentation_view | ( SIZEOF (
     QUERY ( ri <* pv\ representation.items |
     'AUTOMOTIVE_DESIGN.'+ 'CAMERA_IMAGE' IN TYPEOF ( ri ) ) ) )
     >1 ) ) =0;
END_RULE;

RULE restrict_centre_of_mass_representation FOR
    (representation);
WHERE
 WR1: SIZEOF ( QUERY ( r <* representation | ( r.name =
     'centre of mass' ) AND ( ( SIZEOF ( r.items ) <>1 ) OR (
     SIZEOF ( QUERY ( i <* r.items | ( 'AUTOMOTIVE_DESIGN.'+
     'POINT' IN TYPEOF ( i ) ) AND ( i.name = 'centre point' ) )
     ) <>1 ) ) ) ) =0;
END_RULE;

RULE restrict_class_system_assignment_for_approval_status FOR
    (applied_classification_assignment,
     approval_status);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* approval_status | SIZEOF ( QUERY (
     ia <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_CLASSIFICATION_ASSIGNMENT.'+
     'ITEMS' ) | ia. role.name = 'class system membership' ) )
     >1 ) ) =0;
END_RULE;

RULE restrict_class_system_assignment_for_class FOR
    (applied_classification_assignment,
     class);
WHERE
 WR1: SIZEOF ( QUERY ( c <* class | SIZEOF ( QUERY ( aca <*
     USEDIN ( c ,
     'AUTOMOTIVE_DESIGN.'+'CLASSIFICATION_ASSIGNMENT.'+
     'ASSIGNED_CLASS' ) | ( ( aca. role.name =
     'class system membership' ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'APPLIED_CLASSIFICATION_ASSIGNMENT' IN TYPEOF ( aca ) ) ) )
     ) >1 ) ) =0;
END_RULE;

RULE restrict_class_system_assignment_for_descriptive_representation_item FOR
    (applied_classification_assignment,
     descriptive_representation_item);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* descriptive_representation_item |
     SIZEOF ( QUERY ( ia <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_CLASSIFICATION_ASSIGNMENT.'+
     'ITEMS' ) | ia. role.name = 'class system membership' ) )
     >1 ) ) =0;
END_RULE;

RULE restrict_class_system_assignment_for_document_type FOR
    (applied_classification_assignment,
     document_type);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* document_type | SIZEOF ( QUERY (
     ia <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_CLASSIFICATION_ASSIGNMENT.'+
     'ITEMS' ) | ia. role.name = 'class system membership' ) )
     >1 ) ) =0;
END_RULE;

RULE restrict_class_system_assignment_for_planar_extent FOR
    (applied_classification_assignment,
     planar_extent);
WHERE
 WR1: SIZEOF ( QUERY ( pe <* planar_extent | ( pe\
     representation_item.name = 'size format' ) AND ( SIZEOF (
     QUERY ( aca <* USEDIN ( pe ,
     'AUTOMOTIVE_DESIGN.APPLIED_CLASSIFICATION_ASSIGNMENT.ITEMS'
     ) | aca\ classification_assignment.role. name =
     'class system membership' ) ) >1 ) ) ) =0;
END_RULE;

RULE restrict_class_system_assignment_for_security_classification_level FOR
    (applied_classification_assignment,
     security_classification_level);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* security_classification_level |
     SIZEOF ( QUERY ( ia <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_CLASSIFICATION_ASSIGNMENT.'+
     'ITEMS' ) | ia. role.name = 'class system membership' ) )
     >1 ) ) =0;
END_RULE;

RULE restrict_concept_feature_operator FOR
    (concept_feature_operator);
WHERE
 WR1: SIZEOF ( QUERY ( cfo <* concept_feature_operator | NOT (
     cfo. name IN ['and' , 'or' , 'oneof' , 'not' ,
     'implication'] ) ) ) =0;
 WR2: SIZEOF ( QUERY ( cfo <* concept_feature_operator | ( cfo.
     name ='implication' ) AND ( SIZEOF ( QUERY ( cfrwc <*
     USEDIN ( cfo ,
     'AUTOMOTIVE_DESIGN.'+'CONCEPT_FEATURE_RELATIONSHIP_WITH_CONDITION.'+
     'CONDITIONAL_OPERATOR' ) | SIZEOF ( QUERY ( ccf <* USEDIN (
     cfrwc ,
     'AUTOMOTIVE_DESIGN.'+'CONDITIONAL_CONCEPT_FEATURE.'+
     'CONDITION' ) | NOT ( 'AUTOMOTIVE_DESIGN.'+
     'INCLUSION_PRODUCT_CONCEPT_FEATURE' IN TYPEOF ( ccf ) ) ) )
     >0 ) ) >0 ) ) ) =0;
 WR3: SIZEOF( QUERY (cfo <* concept_feature_operator | (cfo.name = 'not')
      AND (SIZEOF(QUERY(cfrwc <* USEDIN(cfo, 'AUTOMOTIVE_DESIGN.' + 
      'CONCEPT_FEATURE_RELATIONSHIP_WITH_CONDITION.' + 
      'CONDITIONAL_OPERATOR') | cfrwc.related_product_concept_feature 
      :<>: cfrwc.relating_product_concept_feature)) >0 ) ) ) = 0;
END_RULE;

RULE restrict_configuration_design_for_product_class FOR
    (configuration_design,
     product_class);
WHERE
 WR1: SIZEOF ( QUERY ( cd <* configuration_design | ( cd. name
     ='functionality' ) AND ( NOT ( 'AUTOMOTIVE_DESIGN.'+
     'PRODUCT_DEFINITION' IN TYPEOF ( cd. design ) ) OR ( cd.
     design\product_definition. frame_of_reference.name<>
     'functional definition' ) ) ) ) =0;
 WR2: SIZEOF ( QUERY ( cd <* configuration_design | ( cd. name
     ='realization' ) AND ( NOT ( 'AUTOMOTIVE_DESIGN.'+
     'PRODUCT_DEFINITION' IN TYPEOF ( cd. design ) ) OR ( cd.
     design\product_definition. frame_of_reference.name<>
     'conceptual definition' ) ) ) ) =0;
 WR3: SIZEOF ( QUERY ( cd <* configuration_design | ( cd. name
     IN ['functionality' , 'realization'] ) AND ( NOT (
     'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_CLASS' IN TYPEOF ( cd.
     configuration.item_concept ) ) ) ) ) =0;
 WR4: SIZEOF ( QUERY (cd <* configuration_design | (cd.name =
     'design constraint usage') AND (NOT('AUTOMOTIVE_DESIGN.' +
     'PRODUCT_DEFINITION' IN TYPEOF ( cd.design ) ) OR
     (cd.design\product_definition.frame_of_reference.name <>
     'design constraint definition')))) = 0;
 WR5: SIZEOF ( QUERY ( cd <* configuration_design | ( cd. name =
     'physical instance basis' ) AND ( NOT (
     'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_DEFINITION' IN TYPEOF ( cd.
     design ) ) OR ( cd. design\product_definition.
     frame_of_reference.name<> 'physical occurrence' ) ) ) ) =0;
 WR6: SIZEOF ( QUERY ( cd <* configuration_design | ( cd. name =
     'physical instance basis' ) AND ( NOT (
     'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_IDENTIFICATION' IN TYPEOF (
     cd. configuration ) ) ) ) ) =0;
END_RULE;

RULE restrict_default_settings FOR
    (applied_document_reference,
     representation);
WHERE
 WR1: ( SIZEOF ( QUERY ( r <* representation | ( r.name =
     'default tolerances' ) AND ( r.context_of_items.
     context_type = 'default setting' ) AND ( SIZEOF ( r.items )
     <>1 ) ) ) =0 ) AND ( SIZEOF ( QUERY ( r <* representation |
     ( r.name = 'default tolerances' ) AND ( r.context_of_items.
     context_type = 'default setting' ) AND ( SIZEOF ( QUERY ( i
     <* r.items | ( 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
     i.name = 'tolerance class' ) ) ) <>1 ) ) ) =0 ) ;
 WR2: SIZEOF ( QUERY ( r <* representation | ( r.name =
     'default tolerances' ) AND ( r.context_of_items.
     context_type = 'default setting' ) AND ( SIZEOF ( QUERY (
     adr <* USEDIN ( r ,
     'AUTOMOTIVE_DESIGN.APPLIED_DOCUMENT_REFERENCE.ITEMS' ) |
     adr. role.name = 'general tolerance definition' ) ) +
     SIZEOF ( QUERY ( rr <* USEDIN ( r ,
     'AUTOMOTIVE_DESIGN.REPRESENTATION_RELATIONSHIP.REP_2' ) | (
     rr. name = 'general tolerance definition' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'DEFAULT_TOLERANCE_TABLE' IN TYPEOF (
     rr. rep_1 ) ) ) ) <>1 ) ) ) =0;
END_RULE;

RULE restrict_default_thickness FOR
    (representation);
WHERE
 WR1: ( SIZEOF ( QUERY ( r <* representation | ( r.name =
     'default thickness' ) AND ( r.context_of_items.
     context_type = 'default setting' ) AND ( SIZEOF ( QUERY ( i
     <* r.items | ( 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) ) ) >1
     ) ) ) =0 ) AND ( SIZEOF ( QUERY ( r <* representation | (
     r.name = 'default thickness' ) AND ( r.context_of_items.
     context_type = 'default setting' ) AND ( SIZEOF ( QUERY ( i
     <* r.items | ( 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
     i.name<> 'parameter name' ) ) ) >0 ) ) ) =0 ) ;
 WR2: ( SIZEOF ( QUERY ( r <* representation | ( r.name =
     'default thickness' ) AND ( r.context_of_items.
     context_type = 'default setting' ) AND ( SIZEOF ( r.items )
     >2 ) ) ) =0 ) AND ( SIZEOF ( QUERY ( r <* representation |
     ( r.name = 'default thickness' ) AND ( r.context_of_items.
     context_type = 'default setting' ) AND ( SIZEOF ( QUERY ( i
     <* r.items | ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM']* TYPEOF ( i ) ) <>1 ) ) ) >0
     ) ) ) =0 ) ;
 WR3: SIZEOF ( QUERY ( r <* representation | ( r.name =
     'default thickness' ) AND ( r.context_of_items.
     context_type = 'default setting' ) AND ( SIZEOF ( QUERY ( i
     <* r.items | ( 'AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
     i.name = 'thickness value' ) ) ) <>1 ) ) ) =0;
END_RULE;

RULE restrict_drawing FOR
    (draughting_title,
     drawing_revision);
WHERE
 WR1:-- drawing_requires_sheets:

     ( SIZEOF ( QUERY ( dr <* drawing_revision | ( SIZEOF ( dr.
     areas ) =0 ) OR ( SIZEOF ( QUERY ( ais <* dr. areas | NOT (
     'AUTOMOTIVE_DESIGN.'+ 'DRAWING_SHEET_REVISION' IN TYPEOF (
     ais. area ) ) ) ) >0 ) ) ) =0 ) ;
 WR2:-- drawing_title:

     SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( USEDIN (
     dr , 'AUTOMOTIVE_DESIGN.'+'DRAUGHTING_TITLE.'+ 'ITEMS' ) )
     >1 ) ) =0;
 WR3:-- sheet_title:

     SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY (
     ais <* dr. areas | SIZEOF ( USEDIN ( ais. area ,
     'AUTOMOTIVE_DESIGN.'+'DRAUGHTING_TITLE.'+ 'ITEMS' ) ) >1 )
     ) >0 ) ) =0;
 WR4:-- allowable_items_of_sheet:

     SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY (
     ais <* dr. areas | SIZEOF ( QUERY ( item <* ais. area.items
     | SIZEOF ( TYPEOF ( item ) *['AUTOMOTIVE_DESIGN.'+
     'STYLED_ITEM' , 'AUTOMOTIVE_DESIGN.'+ 'MAPPED_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'AXIS2_PLACEMENT' ,
     'AUTOMOTIVE_DESIGN.'+ 'PLANAR_BOX'] ) <>1 ) ) >0 ) ) >0 ) )
     =0;
 WR5:-- sheet_contains_view_or_annotation:

     SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY (
     ais <* dr. areas | SIZEOF ( QUERY ( item <* ais. area.items
     | SIZEOF ( TYPEOF ( item ) *['AUTOMOTIVE_DESIGN.'+
     'STYLED_ITEM' , 'AUTOMOTIVE_DESIGN.'+ 'MAPPED_ITEM'] ) >0 )
     ) =0 ) ) >0 ) ) =0;
 WR6:-- planar_box_in_sheet:

     SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY (
     ais <* dr. areas | SIZEOF ( QUERY ( p_b <* QUERY ( item <*
     ais. area.items | 'AUTOMOTIVE_DESIGN.'+ 'PLANAR_BOX' IN
     TYPEOF ( item ) ) | SIZEOF ( USEDIN ( p_b ,
     'AUTOMOTIVE_DESIGN.'+'PRESENTATION_SIZE.'+ 'SIZE' ) ) <>1 )
     ) >0 ) ) >0 ) ) =0;
 WR7:-- sheets_contain_views:

     SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY (
     ais <* dr. areas | SIZEOF ( QUERY ( mi <* QUERY ( item <*
     ais. area.items | 'AUTOMOTIVE_DESIGN.'+ 'MAPPED_ITEM' IN
     TYPEOF ( item ) ) | 'AUTOMOTIVE_DESIGN.'+
     'PRESENTATION_VIEW' IN TYPEOF ( mi\
     mapped_item.mapping_source. mapped_representation ) ) ) =0
     ) ) >0 ) ) =0;
 WR8:-- sheets_contain_placements:

     SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY (
     ais <* dr. areas | SIZEOF ( QUERY ( a2p <* QUERY ( item <*
     ais. area.items | 'AUTOMOTIVE_DESIGN.'+ 'AXIS2_PLACEMENT'
     IN TYPEOF ( item ) ) | SIZEOF ( USEDIN ( a2p ,
     'AUTOMOTIVE_DESIGN.'+'MAPPED_ITEM.'+ 'MAPPING_TARGET' ) )
     =0 ) ) >0 ) ) >0 ) ) =0;
 WR9:-- sheets_have_unique_context:

     SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY (
     ais <* dr. areas | SIZEOF ( ais.
     area.context_of_items.representations_in_context ) >1 ) )
     >0 ) ) =0;
 WR10:-- views_presented_once:

     SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY (
     ais <* dr. areas | SIZEOF ( QUERY ( mi <* QUERY ( item <*
     ais. area.items | 'AUTOMOTIVE_DESIGN.'+ 'MAPPED_ITEM' IN
     TYPEOF ( item ) ) | SIZEOF ( USEDIN ( mi\
     mapped_item.mapping_source. mapped_representation ,
     'AUTOMOTIVE_DESIGN.'+'REPRESENTATION_MAP.'+
     'MAPPED_REPRESENTATION' ) ) <>1 ) ) >0 ) ) >0 ) ) =0;
 WR11:-- allowable_items_of_view:

     SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY (
     ais <* dr. areas | SIZEOF ( QUERY ( mi <* QUERY ( item <*
     ais. area.items | 'AUTOMOTIVE_DESIGN.'+ 'MAPPED_ITEM' IN
     TYPEOF ( item ) ) | SIZEOF ( QUERY ( pv_item <* mi\
     mapped_item.mapping_source.mapped_representation. items |
     SIZEOF ( TYPEOF ( pv_item ) *['AUTOMOTIVE_DESIGN.'+
     'STYLED_ITEM' , 'AUTOMOTIVE_DESIGN.'+ 'CAMERA_IMAGE' ,
     'AUTOMOTIVE_DESIGN.'+ 'AXIS2_PLACEMENT'] ) <>1 ) ) >0 ) )
     >0 ) ) >0 ) ) =0;
 WR12:-- views_contain_one_placement:

     SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY (
     ais <* dr. areas | SIZEOF ( QUERY ( mi <* QUERY ( item <*
     ais. area.items | 'AUTOMOTIVE_DESIGN.'+ 'MAPPED_ITEM' IN
     TYPEOF ( item ) ) | SIZEOF ( QUERY ( a2p <* QUERY ( pv_item
     <* mi\ mapped_item.mapping_source.mapped_representation.
     items | 'AUTOMOTIVE_DESIGN.'+ 'AXIS2_PLACEMENT' IN TYPEOF (
     pv_item ) ) | SIZEOF ( QUERY ( rm <* USEDIN ( a2p ,
     'AUTOMOTIVE_DESIGN.'+'REPRESENTATION_MAP.'+
     'MAPPING_ORIGIN' ) | SIZEOF ( QUERY ( mi <* QUERY ( item <*
     ais. area.items | 'AUTOMOTIVE_DESIGN.'+ 'MAPPED_ITEM' IN
     TYPEOF ( item ) ) | mi\ mapped_item.mapping_source:=:rm ) )
     >0 ) ) =1 ) ) <>1 ) ) >0 ) ) >0 ) ) =0;
 WR13:-- views_have_unique_context:

     SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY (
     ais <* dr. areas | SIZEOF ( QUERY ( mi <* QUERY ( item <*
     ais. area.items | 'AUTOMOTIVE_DESIGN.'+ 'MAPPED_ITEM' IN
     TYPEOF ( item ) ) | SIZEOF ( mi\
     mapped_item.mapping_source.
     mapped_representation.context_of_items.
     representations_in_context ) <>1 ) ) >0 ) ) >0 ) ) =0;
END_RULE;

RULE restrict_effectivity_assignment_for_class_category_usage 
     FOR (applied_effectivity_assignment,
              product_concept_feature_category_usage);
  WHERE
 wr1: SIZEOF( QUERY( aea <* applied_effectivity_assignment |
      ((SIZEOF( QUERY( i <* aea.items |
      ('AUTOMOTIVE_DESIGN.PRODUCT_CONCEPT_FEATURE_CATEGORY_USAGE' IN
      TYPEOF(i)) )) > 0) AND ((SIZEOF( QUERY( i <* aea.items |
      ('AUTOMOTIVE_DESIGN.PRODUCT_CONCEPT_FEATURE_CATEGORY_USAGE' IN
      TYPEOF(i)) )) <> SIZEOF(aea.items)) OR
      (SIZEOF(TYPEOF(aea.assigned_effectivity) * 
      ['AUTOMOTIVE_DESIGN.TIME_INTERVAL_BASED_EFFECTIVITY',
       'AUTOMOTIVE_DESIGN.DATED_EFFECTIVITY',
       'AUTOMOTIVE_DESIGN.SERIAL_NUMBERED_EFFECTIVITY',
       'AUTOMOTIVE_DESIGN.LOT_EFFECTIVITY',
       'AUTOMOTIVE_DESIGN.PRODUCT_DEFINITION_EFFECTIVITY']) > 0) OR
      (aea.assigned_effectivity.id <> 'class usage') OR
      (SIZEOF( QUERY ( cueca <* USEDIN(aea,'AUTOMOTIVE_DESIGN.' +
      'EFFECTIVITY_CONTEXT_ASSIGNMENT.ASSIGNED_EFFECTIVITY_ASSIGNMENT') |
      'AUTOMOTIVE_DESIGN.CLASS_USAGE_EFFECTIVITY_CONTEXT_ASSIGNMENT' 
      IN TYPEOF (cueca ) )) = 0)) ))) = 0;
END_RULE;


RULE restrict_effectivity_for_effectivity_relationship FOR
    (effectivity_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( er <* effectivity_relationship | ( SIZEOF
     ( ['AUTOMOTIVE_DESIGN.'+ 'LOT_EFFECTIVITY' ,
     'AUTOMOTIVE_DESIGN.'+ 'SERIAL_NUMBERED_EFFECTIVITY' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_DEFINITION_EFFECTIVITY']*
     TYPEOF ( er. relating_effectivity ) ) >0 ) OR ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'LOT_EFFECTIVITY' ,
     'AUTOMOTIVE_DESIGN.'+ 'SERIAL_NUMBERED_EFFECTIVITY' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_DEFINITION_EFFECTIVITY']*
     TYPEOF ( er. related_effectivity ) ) >0 ) ) ) =0;
END_RULE;

RULE restrict_effectivity_usage FOR
    (configured_effectivity_assignment,
     effectivity);
WHERE
 WR1: SIZEOF ( QUERY ( e <* effectivity | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'DATED_EFFECTIVITY' ,
     'AUTOMOTIVE_DESIGN.'+ 'TIME_INTERVAL_BASED_EFFECTIVITY']*
     TYPEOF ( e ) ) =0 ) AND ( ( SIZEOF ( QUERY ( er <* USEDIN (
     e ,
     'AUTOMOTIVE_DESIGN.EFFECTIVITY_RELATIONSHIP.'+'RELATED_EFFECTIVITY'
     ) | er. name ='inheritance' ) ) =0 ) AND ( ( e.id =
     'configuration validity' ) AND ( SIZEOF ( QUERY ( cea <*
     USEDIN ( e ,
     'AUTOMOTIVE_DESIGN.EFFECTIVITY_ASSIGNMENT.ASSIGNED_EFFECTIVITY'
     ) | 'AUTOMOTIVE_DESIGN.'+
     'CONFIGURED_EFFECTIVITY_ASSIGNMENT' IN TYPEOF ( cea ) ) )
     =0 ) ) AND ( ( e.id = 'class usage' ) AND ( SIZEOF ( QUERY
     ( aea <* USEDIN ( e ,
     'AUTOMOTIVE_DESIGN.'+'EFFECTIVITY_ASSIGNMENT.'+
     'ASSIGNED_EFFECTIVITY' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'APPLIED_EFFECTIVITY_ASSIGNMENT' IN TYPEOF ( aea ) ) AND (
     SIZEOF ( QUERY ( i <* aea. items | 'AUTOMOTIVE_DESIGN.'+
     'PRODUCT_CONCEPT_FEATURE_CATEGORY_USAGE' IN TYPEOF ( i ) )
     ) >0 ) ) ) =0 ) ) ) ) ) =0;
END_RULE;

RULE restrict_externally_defined_item_relationship FOR
    (externally_defined_item_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( edir <*
     externally_defined_item_relationship | ( edir. name =
     'name scope' ) AND ( NOT ( 'AUTOMOTIVE_DESIGN.'+
     'EXTERNALLY_DEFINED_GENERAL_PROPERTY' IN TYPEOF ( edir.
     relating_item ) ) OR NOT ( 'AUTOMOTIVE_DESIGN.'+
     'KNOWN_SOURCE' IN TYPEOF ( edir. relating_item.source ) )
     OR NOT ( 'AUTOMOTIVE_DESIGN.'+ 'EXTERNALLY_DEFINED_CLASS'
     IN TYPEOF ( edir. related_item ) ) OR NOT (
     'AUTOMOTIVE_DESIGN.'+ 'KNOWN_SOURCE' IN TYPEOF ( edir.
     related_item.source ) ) ) ) ) =0;
END_RULE;

RULE restrict_group_relationship_for_general_classification_hierarchy FOR
    (class,
     group_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( gr <* group_relationship | ( gr. name =
     'class hierarchy' ) AND ( NOT ( 'AUTOMOTIVE_DESIGN.'+
     'CLASS' IN TYPEOF ( gr. related_group ) ) OR NOT (
     'AUTOMOTIVE_DESIGN.'+ 'CLASS' IN TYPEOF ( gr.
     relating_group ) ) ) ) ) =0;
END_RULE;

RULE restrict_group_relationship_for_specification_category FOR
    (group_relationship,
     product_concept_feature_category);
WHERE
 WR1: SIZEOF ( QUERY ( gr <* group_relationship | ( gr. name =
     'specification category hierarchy' ) AND ( NOT (
     'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_CONCEPT_FEATURE_CATEGORY' IN
     TYPEOF ( gr. related_group ) ) OR NOT (
     'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_CONCEPT_FEATURE_CATEGORY' IN
     TYPEOF ( gr. relating_group ) ) ) ) ) =0;
END_RULE;

RULE restrict_multi_language_for_action FOR
    (action);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* action | SIZEOF ( QUERY ( mlaa <*
     USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) AND (
     mlaa. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* action | SIZEOF ( QUERY ( ala <*
     USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) AND (
     ala. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* action | ( SIZEOF ( QUERY ( mlaa1
     <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_action_directive FOR
    (action_directive);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* action_directive | SIZEOF ( QUERY
     ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'comment' ) ) ) >0 ) )
     =0;
 WR2: SIZEOF ( QUERY ( ent <* action_directive | SIZEOF ( QUERY
     ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'comment' ) ) ) >0 ) )
     =0;
 WR3: SIZEOF ( QUERY ( ent <* action_directive | ( SIZEOF (
     QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_action_method FOR
    (action_method);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* action_method | SIZEOF ( QUERY (
     mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) AND (
     mlaa. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* action_method | SIZEOF ( QUERY (
     ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) AND (
     ala. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* action_method | ( SIZEOF ( QUERY (
     mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_action_property FOR
    (action_property);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* action_property | SIZEOF ( QUERY (
     mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* action_property | SIZEOF ( QUERY (
     ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* action_property | ( SIZEOF ( QUERY
     ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_action_relationship FOR
    (action_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* action_relationship | SIZEOF (
     QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* action_relationship | SIZEOF (
     QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* action_relationship | ( SIZEOF (
     QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_alternate_product_relationship FOR
    (alternate_product_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* alternate_product_relationship |
     SIZEOF ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'basis' ) ) ) >0 ) )
     =0;
 WR2: SIZEOF ( QUERY ( ent <* alternate_product_relationship |
     SIZEOF ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'basis' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* alternate_product_relationship | (
     SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_application_context FOR
    (application_context);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* application_context | SIZEOF (
     QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* application_context | SIZEOF (
     QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* application_context | ( SIZEOF (
     QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_approval_relationship FOR
    (approval_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* approval_relationship | SIZEOF (
     QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* approval_relationship | SIZEOF (
     QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* approval_relationship | ( SIZEOF (
     QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_assembly_component_usage_substitute FOR
    (assembly_component_usage_substitute);
WHERE
 WR1: SIZEOF ( QUERY ( ent <*
     assembly_component_usage_substitute | SIZEOF ( QUERY ( mlaa
     <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'definition' ) ) ) >0 )
     ) =0;
 WR2: SIZEOF ( QUERY ( ent <*
     assembly_component_usage_substitute | SIZEOF ( QUERY ( ala
     <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'definition' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <*
     assembly_component_usage_substitute | ( SIZEOF ( QUERY (
     mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_certification FOR
    (certification);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* certification | SIZEOF ( QUERY (
     mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'name' ) AND ( mlaa.
     attribute_name<>'purpose' ) ) ) >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* certification | SIZEOF ( QUERY (
     ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'name' ) AND ( ala.
     attribute_name<>'purpose' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* certification | ( SIZEOF ( QUERY (
     mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_configuration_design FOR
    (configuration_design);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* configuration_design | SIZEOF (
     QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* configuration_design | SIZEOF (
     QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* configuration_design | ( SIZEOF (
     QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_configuration_item FOR
    (configuration_item);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* configuration_item | SIZEOF (
     QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) AND (
     mlaa. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* configuration_item | SIZEOF (
     QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) AND (
     ala. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* configuration_item | ( SIZEOF (
     QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_contract FOR
    (contract);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* contract | SIZEOF ( QUERY ( mlaa
     <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'purpose' ) ) ) >0 ) )
     =0;
 WR2: SIZEOF ( QUERY ( ent <* contract | SIZEOF ( QUERY ( ala <*
     USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'purpose' ) ) ) >0 ) )
     =0;
 WR3: SIZEOF ( QUERY ( ent <* contract | ( SIZEOF ( QUERY (
     mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_data_environment FOR
    (data_environment);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* data_environment | SIZEOF ( QUERY
     ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* data_environment | SIZEOF ( QUERY
     ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* data_environment | ( SIZEOF (
     QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_date_role FOR
    (date_role);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* date_role | SIZEOF ( QUERY ( mlaa
     <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* date_role | SIZEOF ( QUERY ( ala
     <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* date_role | ( SIZEOF ( QUERY (
     mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_date_time_role FOR
    (date_time_role);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* date_time_role | SIZEOF ( QUERY (
     mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* date_time_role | SIZEOF ( QUERY (
     ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* date_time_role | ( SIZEOF ( QUERY
     ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_descriptive_representation_item FOR
    (descriptive_representation_item);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* descriptive_representation_item |
     SIZEOF ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* descriptive_representation_item |
     SIZEOF ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* descriptive_representation_item |
     ( SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_document_relationship FOR
    (document_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* document_relationship | SIZEOF (
     QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* document_relationship | SIZEOF (
     QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* document_relationship | ( SIZEOF (
     QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_draughting_title FOR
    (draughting_title);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* draughting_title | SIZEOF ( QUERY
     ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'contents' ) ) ) >0 ) )
     =0;
 WR2: SIZEOF ( QUERY ( ent <* draughting_title | SIZEOF ( QUERY
     ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'contents' ) AND ( ala.
     attribute_name<>'language' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* draughting_title | ( SIZEOF (
     QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_effectivity FOR
    (effectivity);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* effectivity | SIZEOF ( QUERY (
     mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* effectivity | SIZEOF ( QUERY ( ala
     <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* effectivity | ( SIZEOF ( QUERY (
     mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_effectivity_relationship FOR
    (effectivity_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* effectivity_relationship | SIZEOF
     ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* effectivity_relationship | SIZEOF
     ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* effectivity_relationship | (
     SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_event_occurrence FOR
    (event_occurrence);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* event_occurrence | SIZEOF ( QUERY
     ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* event_occurrence | SIZEOF ( QUERY
     ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* event_occurrence | ( SIZEOF (
     QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_external_source FOR
    (external_source);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* external_source | SIZEOF ( QUERY (
     mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* external_source | SIZEOF ( QUERY (
     ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* external_source | ( SIZEOF ( QUERY
     ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_general_property FOR
    (general_property);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* general_property | SIZEOF ( QUERY
     ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* general_property | SIZEOF ( QUERY
     ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* general_property | ( SIZEOF (
     QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_general_property_relationship FOR
    (general_property_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* general_property_relationship |
     SIZEOF ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* general_property_relationship |
     SIZEOF ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* general_property_relationship | (
     SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_geometric_representation_item FOR
    (geometric_representation_item);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* geometric_representation_item |
     SIZEOF ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* geometric_representation_item |
     SIZEOF ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* geometric_representation_item | (
     SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_geometric_tolerance FOR
    (geometric_tolerance);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* geometric_tolerance | SIZEOF (
     QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) AND (
     mlaa. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* geometric_tolerance | SIZEOF (
     QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) AND (
     ala. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* geometric_tolerance | ( SIZEOF (
     QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_group FOR
    (group);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* group | SIZEOF ( QUERY ( mlaa <*
     USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) AND (
     mlaa. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* group | SIZEOF ( QUERY ( ala <*
     USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) AND (
     ala. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* group | ( SIZEOF ( QUERY ( mlaa1
     <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_group_relationship FOR
    (group_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* group_relationship | SIZEOF (
     QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* group_relationship | SIZEOF (
     QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* group_relationship | ( SIZEOF (
     QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_identification_role FOR
    (identification_role);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* identification_role | SIZEOF (
     QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* identification_role | SIZEOF (
     QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* identification_role | ( SIZEOF (
     QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_kinematic_pair FOR
    (kinematic_pair);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* kinematic_pair | SIZEOF ( QUERY (
     mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* kinematic_pair | SIZEOF ( QUERY (
     ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* kinematic_pair | ( SIZEOF ( QUERY
     ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_mapped_item FOR
    (mapped_item);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* mapped_item | SIZEOF ( QUERY (
     mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* mapped_item | SIZEOF ( QUERY ( ala
     <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* mapped_item | ( SIZEOF ( QUERY (
     mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_name_assignment FOR
    (name_assignment);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* name_assignment | SIZEOF ( QUERY (
     mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'assigned_name' ) ) )
     >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* name_assignment | SIZEOF ( QUERY (
     ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'assigned_name' ) ) ) >0
     ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* name_assignment | ( SIZEOF ( QUERY
     ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_organization_relationship FOR
    (organization_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* organization_relationship | SIZEOF
     ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* organization_relationship | SIZEOF
     ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* organization_relationship | (
     SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_organization_role FOR
    (organization_role);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* organization_role | SIZEOF ( QUERY
     ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* organization_role | SIZEOF ( QUERY
     ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* organization_role | ( SIZEOF (
     QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_organizational_project FOR
    (organizational_project);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* organizational_project | SIZEOF (
     QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) AND (
     mlaa. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* organizational_project | SIZEOF (
     QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) AND (
     ala. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* organizational_project | ( SIZEOF
     ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_organizational_project_relationship FOR
    (organizational_project_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( ent <*
     organizational_project_relationship | SIZEOF ( QUERY ( mlaa
     <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <*
     organizational_project_relationship | SIZEOF ( QUERY ( ala
     <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <*
     organizational_project_relationship | ( SIZEOF ( QUERY (
     mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_pair_actuator FOR
    (pair_actuator);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* pair_actuator | SIZEOF ( QUERY (
     mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* pair_actuator | SIZEOF ( QUERY (
     ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* pair_actuator | ( SIZEOF ( QUERY (
     mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_person_and_organization_role FOR
    (person_and_organization_role);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* person_and_organization_role |
     SIZEOF ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* person_and_organization_role |
     SIZEOF ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* person_and_organization_role | (
     SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_presentation_layer_assignment FOR
    (presentation_layer_assignment);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* presentation_layer_assignment |
     SIZEOF ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* presentation_layer_assignment |
     SIZEOF ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* presentation_layer_assignment | (
     SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_process_product_association FOR
    (process_product_association);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* process_product_association |
     SIZEOF ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* process_product_association |
     SIZEOF ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* process_product_association | (
     SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_product FOR
    (product);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* product | SIZEOF ( QUERY ( mlaa <*
     USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) AND (
     mlaa. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* product | SIZEOF ( QUERY ( ala <*
     USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) AND (
     ala. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* product | ( SIZEOF ( QUERY ( mlaa1
     <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_product_concept FOR
    (product_concept);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* product_concept | SIZEOF ( QUERY (
     mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) AND (
     mlaa. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* product_concept | SIZEOF ( QUERY (
     ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) AND (
     ala. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* product_concept | ( SIZEOF ( QUERY
     ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_product_concept_feature FOR
    (product_concept_feature);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* product_concept_feature | SIZEOF (
     QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) AND (
     mlaa. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* product_concept_feature | SIZEOF (
     QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) AND (
     ala. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* product_concept_feature | ( SIZEOF
     ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_product_concept_feature_association FOR
    (product_concept_feature_association);
WHERE
 WR1: SIZEOF ( QUERY ( ent <*
     product_concept_feature_association | SIZEOF ( QUERY ( mlaa
     <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <*
     product_concept_feature_association | SIZEOF ( QUERY ( ala
     <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <*
     product_concept_feature_association | ( SIZEOF ( QUERY (
     mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_product_concept_relationship FOR
    (product_concept_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* product_concept_relationship |
     SIZEOF ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* product_concept_relationship |
     SIZEOF ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* product_concept_relationship | (
     SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_product_definition FOR
    (product_definition);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* product_definition | SIZEOF (
     QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) AND (
     mlaa. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* product_definition | SIZEOF (
     QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) AND (
     ala. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* product_definition | ( SIZEOF (
     QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_product_definition_formation FOR
    (product_definition_formation);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* product_definition_formation |
     SIZEOF ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* product_definition_formation |
     SIZEOF ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* product_definition_formation | (
     SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_product_definition_formation_relationship FOR
    (product_definition_formation_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( ent <*
     product_definition_formation_relationship | SIZEOF ( QUERY
     ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <*
     product_definition_formation_relationship | SIZEOF ( QUERY
     ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <*
     product_definition_formation_relationship | ( SIZEOF (
     QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_product_definition_relationship FOR
    (product_definition_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* product_definition_relationship |
     SIZEOF ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* product_definition_relationship |
     SIZEOF ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* product_definition_relationship |
     ( SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_product_definition_substitute FOR
    (product_definition_substitute);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* product_definition_substitute |
     SIZEOF ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* product_definition_substitute |
     SIZEOF ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* product_definition_substitute | (
     SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_product_related_product_category FOR
    (product_related_product_category);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* product_related_product_category |
     SIZEOF ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* product_related_product_category |
     SIZEOF ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* product_related_product_category |
     ( SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_property_definition FOR
    (property_definition);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* property_definition | SIZEOF (
     QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) AND (
     mlaa. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* property_definition | SIZEOF (
     QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) AND (
     ala. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* property_definition | ( SIZEOF (
     QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_property_definition_relationship FOR
    (property_definition_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* property_definition_relationship |
     SIZEOF ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* property_definition_relationship |
     SIZEOF ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* property_definition_relationship |
     ( SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_representation FOR
    (representation);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* representation | SIZEOF ( QUERY (
     mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) AND (
     mlaa. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* representation | SIZEOF ( QUERY (
     ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) AND (
     ala. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* representation | ( SIZEOF ( QUERY
     ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_representation_relationship FOR
    (representation_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* representation_relationship |
     SIZEOF ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* representation_relationship |
     SIZEOF ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* representation_relationship | (
     SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_requirement_for_action_resource FOR
    (requirement_for_action_resource);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* requirement_for_action_resource |
     SIZEOF ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* requirement_for_action_resource |
     SIZEOF ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* requirement_for_action_resource |
     ( SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_resource_property FOR
    (resource_property);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* resource_property | SIZEOF ( QUERY
     ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* resource_property | SIZEOF ( QUERY
     ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* resource_property | ( SIZEOF (
     QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_resource_requirement_type FOR
    (resource_requirement_type);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* resource_requirement_type | SIZEOF
     ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* resource_requirement_type | SIZEOF
     ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* resource_requirement_type | (
     SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_security_classification FOR
    (security_classification);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* security_classification | SIZEOF (
     QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'name' ) AND ( mlaa.
     attribute_name<>'purpose' ) ) ) >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* security_classification | SIZEOF (
     QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'name' ) AND ( ala.
     attribute_name<>'purpose' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* security_classification | ( SIZEOF
     ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_shape_aspect FOR
    (shape_aspect);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* shape_aspect | SIZEOF ( QUERY (
     mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* shape_aspect | SIZEOF ( QUERY (
     ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* shape_aspect | ( SIZEOF ( QUERY (
     mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_shape_aspect_relationship FOR
    (shape_aspect_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* shape_aspect_relationship | SIZEOF
     ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* shape_aspect_relationship | SIZEOF
     ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* shape_aspect_relationship | (
     SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_styled_item FOR
    (styled_item);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* styled_item | SIZEOF ( QUERY (
     mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* styled_item | SIZEOF ( QUERY ( ala
     <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* styled_item | ( SIZEOF ( QUERY (
     mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_time_interval_role FOR
    (time_interval_role);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* time_interval_role | SIZEOF (
     QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* time_interval_role | SIZEOF (
     QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* time_interval_role | ( SIZEOF (
     QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_topological_representation_item FOR
    (topological_representation_item);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* topological_representation_item |
     SIZEOF ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* topological_representation_item |
     SIZEOF ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'name' ) ) ) >0 ) ) =0;
 WR3: SIZEOF ( QUERY ( ent <* topological_representation_item |
     ( SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_uncertainty_measure_with_unit FOR
    (uncertainty_measure_with_unit);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* uncertainty_measure_with_unit |
     SIZEOF ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* uncertainty_measure_with_unit |
     SIZEOF ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* uncertainty_measure_with_unit | (
     SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_uncertainty_qualifier FOR
    (uncertainty_qualifier);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* uncertainty_qualifier | SIZEOF (
     QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* uncertainty_qualifier | SIZEOF (
     QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* uncertainty_qualifier | ( SIZEOF (
     QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_multi_language_for_versioned_action_request FOR
    (versioned_action_request);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* versioned_action_request | SIZEOF
     ( QUERY ( mlaa <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa. attribute_name<>'description' ) ) ) >0
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ent <* versioned_action_request | SIZEOF
     ( QUERY ( ala <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala. attribute_name<>'description' ) ) ) >0 )
     ) =0;
 WR3: SIZEOF ( QUERY ( ent <* versioned_action_request | (
     SIZEOF ( QUERY ( mlaa1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( mlaa2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.'+
     'ITEMS' ) | ( mlaa1. attribute_name =mlaa2. attribute_name
     ) AND ( mlaa1. language =mlaa2. language ) ) ) >1 ) ) +
     SIZEOF ( QUERY ( ala1 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | SIZEOF ( QUERY ( ala2 <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'ATTRIBUTE_LANGUAGE_ASSIGNMENT.'+
     'ITEMS' ) | ( ala1. attribute_name =ala2. attribute_name )
     AND ( ala1. language =ala2. language ) ) ) >1 ) ) ) >0 ) )
     =0;
END_RULE;

RULE restrict_name_assignment_for_kinematic_joint FOR
    (kinematic_joint);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* kinematic_joint | SIZEOF ( USEDIN
     ( ent , 'AUTOMOTIVE_DESIGN.'+'APPLIED_NAME_ASSIGNMENT.'+
     'ITEMS' ) ) >1 ) ) =0;
END_RULE;

RULE restrict_name_assignment_for_kinematic_link FOR
    (kinematic_link);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* kinematic_link | SIZEOF ( USEDIN (
     ent , 'AUTOMOTIVE_DESIGN.'+'APPLIED_NAME_ASSIGNMENT.'+
     'ITEMS' ) ) >1 ) ) =0;
END_RULE;

RULE restrict_name_assignment_for_kinematic_structure FOR
    (kinematic_structure);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* kinematic_structure | SIZEOF (
     USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_NAME_ASSIGNMENT.'+ 'ITEMS' )
     ) >1 ) ) =0;
END_RULE;

RULE restrict_name_for_known_source FOR
    (known_source);
WHERE
 WR1: SIZEOF ( QUERY ( ks <* known_source | ( ks. name<>
     'ISO 13584 library' ) ) ) =0;
END_RULE;

RULE restrict_part_occurrence FOR
    (product_definition,
     product_definition_occurrence_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( pd <* product_definition | ( pd.
     frame_of_reference.name = 'part occurrence' ) AND ( NOT (
     pd. name IN [ 'single instance' , 'selected instance' ,
     'quantified instance' , 'specified instance' ] ) ) ) ) =0;
 WR2: SIZEOF ( QUERY ( pd <* product_definition | ( pd.
     frame_of_reference.name = 'part occurrence' ) AND ( SIZEOF
     ( QUERY ( pdr <* USEDIN ( pd ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_DEFINITION_RELATIONSHIP.'+
     'RELATED_PRODUCT_DEFINITION' ) | pdr. name =
     'definition usage' ) ) <>1 ) AND ( SIZEOF ( QUERY ( cd <*
     USEDIN ( pd , 'AUTOMOTIVE_DESIGN.'+'CONFIGURATION_DESIGN.'+
     'DESIGN' ) | ( cd. name = 'occurrence usage definition' )
     AND ( NOT ( 'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_IDENTIFICATION'
     IN TYPEOF ( cd. configuration ) ) ) ) ) <>1 ) ) ) =0;
 WR3: SIZEOF ( QUERY ( pd <* product_definition | ( pd.
     frame_of_reference.name = 'part occurrence' ) AND ( SIZEOF
     ( QUERY ( cd <* USEDIN ( pd ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_DEFINITION_RELATIONSHIP.'+
     'RELATED_PRODUCT_DEFINITION' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'PRODUCT_DEFINITION_USAGE' IN TYPEOF ( cd ) ) ) ) =0 ) AND
     ( SIZEOF ( USEDIN ( pd ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_DEFINITION_OCCURRENCE_RELATIONSHIP.'+
     'OCCURRENCE' ) ) =0 ) ) ) =0;
 WR4: SIZEOF ( QUERY ( pd <* product_definition | ( pd.
     frame_of_reference.name = 'part occurrence' ) AND ( pd.
     name = 'selected instance' ) AND ( SIZEOF ( QUERY ( prd <*
     USEDIN ( pd ,
     'AUTOMOTIVE_DESIGN.PROPERTY_DEFINITION.DEFINITION' ) | (
     prd. name = 'occurrence selection' ) AND ( SIZEOF ( QUERY (
     pdr <* USEDIN ( prd ,
     'AUTOMOTIVE_DESIGN.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION'
     ) | ( pdr. used_representation.name = 'selection criteria'
     ) AND ( SIZEOF ( pdr. used_representation.items ) =2 ) AND
     ( SIZEOF ( QUERY ( i <* pdr. used_representation.items | (
     SIZEOF ( ['AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'VALUE_RANGE']* TYPEOF ( i ) ) =1 ) AND ( i.name =
     'selection quantity' ) ) ) =1 ) AND ( SIZEOF ( QUERY ( i <*
     pdr. used_representation.items | ( 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
     i.name = 'selection control' ) ) ) =1 ) ) ) =1 ) ) ) =0 ) )
     ) =0;
 WR5: SIZEOF ( QUERY ( pd <* product_definition | ( pd.
     frame_of_reference.name = 'part occurrence' ) AND ( pd.
     name = 'quantified instance' ) AND ( SIZEOF ( QUERY ( ppd
     <* USEDIN ( pd ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION.'+ 'DEFINITION' )
     | ( ppd. name = 'occurrence quantity' ) AND ( SIZEOF (
     QUERY ( pdr <* USEDIN ( ppd ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
     'DEFINITION' ) | ( pdr. used_representation.name
     ='quantity' ) AND ( SIZEOF ( pdr. used_representation.items
     ) =1 ) AND ( SIZEOF ( QUERY ( i <* pdr.
     used_representation.items | ( 'AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND (
     i.name = 'quantity measure' ) ) ) =1 ) ) ) =1 ) ) ) =0 ) )
     ) =0;
 WR6: SIZEOF ( QUERY ( pd <* product_definition | ( pd.
     frame_of_reference.name = 'part occurrence' ) AND ( pd.
     name = 'specified instance' ) AND ( SIZEOF ( QUERY ( pdor
     <* USEDIN ( pd ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_DEFINITION_OCCURRENCE_RELATIONSHIP.'+
     'OCCURRENCE' ) | 'AUTOMOTIVE_DESIGN.'+
     'SPECIFIED_HIGHER_USAGE_OCCURRENCE' IN TYPEOF ( pdor.
     occurrence_usage ) ) ) =0 ) ) ) =0;
END_RULE;

RULE restrict_process_product_association FOR
    (process_product_association);
WHERE
 WR1: SIZEOF ( QUERY ( ppa <* process_product_association | NOT
     ( ppa. name IN ['input' , 'output' , 'produced output' ] )
     ) ) =0;
 WR2: SIZEOF ( QUERY ( ppa <* process_product_association | NOT
     ( ppa. name IN ['input' , 'output'] ) OR ( SIZEOF ( QUERY (
     ar <* USEDIN ( ppa. process ,
     'AUTOMOTIVE_DESIGN.'+'ACTION_RELATIONSHIP.'+
     'RELATED_ACTION' ) | ar. name =
     'process operation occurrence' ) ) =0 ) ) ) =0;
 WR3: SIZEOF ( QUERY ( ppa <* process_product_association | (
     ppa. name<> 'produced output' ) OR ( (
     'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_DEFINITION' IN TYPEOF ( ppa.
     defined_product ) ) AND ( SIZEOF ( QUERY ( prpc <* USEDIN (
     ppa. defined_product\product_definition.
     formation.of_product ,
     'AUTOMOTIVE_DESIGN.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
     ) | prpc. name IN ['part' , 'tool' , 'raw material' ] ) )
     =0 ) ) ) ) =0;
END_RULE;

RULE restrict_product_categories_for_tool_part_relationship FOR
    (product_definition_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( pdr <* product_definition_relationship |
     ( pdr. name = 'tool part relationship' ) AND ( ( SIZEOF (
     QUERY ( prpc <* USEDIN ( pdr.
     relating_product_definition.formation. of_product ,
     		'AUTOMOTIVE_DESIGN.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
     ) | prpc. name ='tool'	 ) ) <1 ) OR 	 ( SIZEOF ( QUERY (
     prpc <* USEDIN ( pdr. related_product_definition.formation.
     of_product ,
     'AUTOMOTIVE_DESIGN.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
     ) | prpc. name ='part'	 ) ) <1 ) ) ) ) =0;
END_RULE;

RULE restrict_product_category_for_product FOR
    (product);
WHERE
 WR1: SIZEOF ( QUERY ( p <* product | SIZEOF ( QUERY ( prpc <*
     USEDIN ( p ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_RELATED_PRODUCT_CATEGORY.'+
     'PRODUCTS' ) | prpc. name IN ['part' , 'raw material' ,
     'tool' , 'document' , 'functionality' ,
     'conceptual product' , 'alternative solution' ,
     'requirement' , 'physically realized product','tool','raw material' ] ) ) =0 ) )
     =0;
 WR2: SIZEOF ( QUERY ( p <* product | SIZEOF ( QUERY ( prpc <*
     USEDIN ( p ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_RELATED_PRODUCT_CATEGORY.'+
     'PRODUCTS' ) | prpc. name IN ['part' , 'raw material', 'tool', 'document' ,
     'functionality' , 'conceptual product' ,
     'alternative solution' , 'requirement' ,
     'physically realized product' ] ) ) >1 ) ) =0;
END_RULE;

RULE restrict_product_definition_context_for_external_properties FOR
    (general_property_association,
     product_definition);
WHERE
 WR1: SIZEOF ( QUERY (pd <* product_definition | ( SIZEOF (
      QUERY ( propd <* USEDIN ( pd , 'AUTOMOTIVE_DESIGN.' +
      'PROPERTY_DEFINITION.DEFINITION' ) | SIZEOF ( QUERY (
      gpa <* USEDIN ( propd , 'AUTOMOTIVE_DESIGN.' +
      'GENERAL_PROPERTY_ASSOCIATION.DERIVED_DEFINITION' )
      | 'AUTOMOTIVE_DESIGN.' +
      'EXTERNALLY_DEFINED_GENERAL_PROPERTY' IN TYPEOF (
      gpa.base_definition ) ) ) > 0 ) ) > 0 ) AND ( SIZEOF (
      QUERY ( pdca <* USEDIN ( pd, 'AUTOMOTIVE_DESIGN.' +
      'PRODUCT_DEFINITION_CONTEXT_ASSOCIATION.DEFINITION' )
      | (pdca.frame_of_reference.name = 'external') AND
      (pdca.role.name = 'external') ) ) = 0 ) ) ) = 0;
END_RULE;

RULE restrict_product_definition_context_for_product FOR
    (product_definition,
     product_related_product_category);
WHERE
 WR1: SIZEOF ( QUERY ( pd <* product_definition | ( pd.
     frame_of_reference.name IN [ 'part definition' ,
     'part occurrence' ] ) AND ( SIZEOF ( QUERY ( prpc <* USEDIN
     ( pd. formation.of_product ,
     'AUTOMOTIVE_DESIGN.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
     ) | prpc. name IN ['part' , 'raw material' , 'tool'] ) ) =0
     ) ) ) =0;
 WR2: SIZEOF ( QUERY ( pd <* product_definition | ( pd.
     frame_of_reference.name = 'functional definition' ) AND (
     SIZEOF ( QUERY ( prpc <* USEDIN ( pd. formation.of_product
     ,
     'AUTOMOTIVE_DESIGN.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
     ) | prpc. name ='functionality' ) ) =0 ) ) ) =0;
 WR3: SIZEOF ( QUERY ( pd <* product_definition | ( pd.
     frame_of_reference.name = 'conceptual definition' ) AND (
     SIZEOF ( QUERY ( prpc <* USEDIN ( pd. formation.of_product
     ,
     'AUTOMOTIVE_DESIGN.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
     ) | prpc. name = 'conceptual product' ) ) =0 ) ) ) =0;
 WR4: SIZEOF ( QUERY ( pd <* product_definition | ( pd.
     frame_of_reference.name = 'alternative definition' ) AND (
     SIZEOF ( QUERY ( prpc <* USEDIN ( pd. formation.of_product
     ,
     'AUTOMOTIVE_DESIGN.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS'
     ) | prpc. name = 'alternative solution' ) ) =0 ) ) ) =0;
 WR5: SIZEOF ( QUERY ( pd <* product_definition | ( pd.
     frame_of_reference.name = 'design constraint definition' )
     AND ( SIZEOF ( QUERY ( prpc <* USEDIN ( pd.
     formation.of_product ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_RELATED_PRODUCT_CATEGORY.'+
     'PRODUCTS' ) | prpc. name ='requirement' ) ) =0 ) ) ) =0;
 WR6: SIZEOF ( QUERY ( pd <* product_definition | ( pd.
     frame_of_reference.name = 'physical occurrence' ) AND (
     SIZEOF ( QUERY ( prpc <* USEDIN ( pd. formation.of_product
     , 'AUTOMOTIVE_DESIGN.'+'PRODUCT_RELATED_PRODUCT_CATEGORY.'+
     'PRODUCTS' ) | prpc. name = 'physically realized product' )
     ) =0 ) ) ) =0;
 WR7: SIZEOF ( QUERY ( pd <* product_definition | ( pd.
     frame_of_reference.name = 'physical document definition' )
     AND ( SIZEOF ( QUERY ( prpc <* USEDIN ( pd.
     formation.of_product ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_RELATED_PRODUCT_CATEGORY.'+
     'PRODUCTS' ) | prpc. name ='document' ) ) =0 ) ) ) =0;
END_RULE;

RULE restrict_product_definition_for_mating_tree FOR
    (product_definition);
WHERE
 WR1: SIZEOF ( QUERY ( pd <* product_definition | ( SIZEOF (
     QUERY ( pdca <* USEDIN ( pd ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_DEFINITION_CONTEXT_ASSOCIATION.'+
     'DEFINITION' ) | pdca. frame_of_reference.name =
     'mating definition' ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr <*
     USEDIN ( pd ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_DEFINITION_RELATIONSHIP.'+
     'RELATING_PRODUCT_DEFINITION' ) | pdr. name =
     'mating membership' ) ) <>2 ) ) ) =0;
 WR2: SIZEOF ( QUERY ( pd <* product_definition | ( SIZEOF (
     QUERY ( pdca <* USEDIN ( pd ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_DEFINITION_CONTEXT_ASSOCIATION.'+
     'DEFINITION' ) | pdca. frame_of_reference.name =
     'mating definition' ) ) =1 ) AND NOT ( {1<= SIZEOF ( QUERY
     ( pdr <* USEDIN ( pd ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_DEFINITION_RELATIONSHIP.'+
     'RELATING_PRODUCT_DEFINITION' ) | ( pdr. name =
     'mating membership' ) AND ( pdr.
     related_product_definition.frame_of_reference. name =
     'part occurrence' ) ) ) <=2} ) ) ) =0;
 WR3: SIZEOF ( QUERY ( pd <* product_definition | ( SIZEOF (
     QUERY ( pdca <* USEDIN ( pd ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_DEFINITION_CONTEXT_ASSOCIATION.'+
     'DEFINITION' ) | pdca. frame_of_reference.name =
     'mating definition' ) ) =1 ) AND ( SIZEOF ( QUERY ( pdr <*
     USEDIN ( pd ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_DEFINITION_RELATIONSHIP.'+
     'RELATING_PRODUCT_DEFINITION' ) | ( pdr. name =
     'mating membership' ) AND ( SIZEOF ( QUERY ( pdca <* USEDIN
     ( pdr. related_product_definition ,
     'AUTOMOTIVE_DESIGN.PRODUCT_DEFINITION_CONTEXT_ASSOCIATION.DEFINITION'
     ) | pdca. frame_of_reference.name = 'mating definition' ) )
     =1 ) ) ) >1 ) ) ) =0;
END_RULE;

RULE restrict_product_definition_substitute FOR
    (product_definition_substitute);
WHERE
 WR1: SIZEOF ( QUERY ( pds <* product_definition_substitute | (
     SIZEOF ( USEDIN ( pds ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_EFFECTIVITY_ASSIGNMENT.'+
     'ITEMS' ) ) =0 ) ) ) =0;
 WR2: SIZEOF ( QUERY ( pds <* product_definition_substitute |
     pds. substitute_definition.frame_of_reference. name<>
     'part occurrence' ) ) =0;
 WR3: SIZEOF ( QUERY ( pds <* product_definition_substitute | (
     ( 'AUTOMOTIVE_DESIGN.'+ 'ASSEMBLY_COMPONENT_USAGE' IN
     TYPEOF ( pds. context_relationship ) ) AND ( SIZEOF (
     USEDIN ( pds. context_relationship ,
     'AUTOMOTIVE_DESIGN.'+'PRODUCT_DEFINITION_OCCURRENCE_RELATIONSHIP.'+
     'OCCURRENCE_USAGE' ) ) =0 ) ) AND ( ( 'AUTOMOTIVE_DESIGN.'+
     'PRODUCT_DEFINITION_RELATIONSHIP' IN TYPEOF ( pds.
     context_relationship ) ) AND ( pds.
     context_relationship.related_product_definition.
     frame_of_reference.name<> 'part occurrence' ) ) ) ) =0;
END_RULE;

RULE restrict_product_definitions_for_product_definition_relationship FOR
    (assembly_component_usage,
     product_definition_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( pdr <* product_definition_relationship |
     ( pdr. name = 'definition usage' ) AND ( ( pdr.
     relating_product_definition.frame_of_reference. name<>
     'part definition' ) OR ( pdr.
     related_product_definition.frame_of_reference. name<>
     'part occurrence' ) ) ) ) =0;
 WR2: SIZEOF ( QUERY ( pdr <* product_definition_relationship |
     ( pdr. name IN [ 'geometrical relationship' ,
     'definition replacement' ] ) AND ( ( pdr.
     relating_product_definition.frame_of_reference. name<>
     'part definition' ) OR ( pdr.
     related_product_definition.frame_of_reference. name<>
     'part definition' ) ) ) ) =0;
 WR3: SIZEOF ( QUERY ( pdr <* product_definition_relationship |
     ( 'AUTOMOTIVE_DESIGN.'+ 'ASSEMBLY_COMPONENT_USAGE' IN
     TYPEOF ( pdr ) ) AND ( ( pdr.
     relating_product_definition.frame_of_reference. name<>
     'part definition' ) OR ( pdr.
     related_product_definition.frame_of_reference. name<>
     'part definition' ) ) AND ( ( pdr.
     relating_product_definition.frame_of_reference. name<>
     'physical occurrence' ) OR ( pdr.
     related_product_definition.frame_of_reference. name<>
     'physical occurrence' ) ) ) ) =0;
 WR4: SIZEOF ( QUERY ( pdr <* product_definition_relationship |
     ( 'AUTOMOTIVE_DESIGN.'+ 'ASSEMBLY_COMPONENT_USAGE' IN
     TYPEOF ( pdr ) ) AND ( pdr. name =
     'selected instance usage' ) AND ( ( pdr.
     relating_product_definition.frame_of_reference. name<>
     'part definition' ) OR ( pdr.
     related_product_definition.frame_of_reference. name<>
     'part definition' ) ) ) ) =0;
 WR5: SIZEOF ( QUERY ( pdr <* product_definition_relationship |
     ( pdr. name = 'physical realization' ) AND ( ( pdr.
     relating_product_definition.frame_of_reference. name<>
     'part definition' ) OR ( pdr.
     related_product_definition.frame_of_reference. name<>
     'physical occurrence' ) ) ) ) =0;
 WR6: SIZEOF ( QUERY ( pdr <* product_definition_relationship |
     ( pdr. name = 'physical occurrence usage' ) AND ( NOT (
     'AUTOMOTIVE_DESIGN.'+ 'ASSEMBLY_COMPONENT_USAGE' IN TYPEOF
     ( pdr ) ) OR ( pdr.
     relating_product_definition.frame_of_reference. name<>
     'physical occurrence' ) OR ( pdr.
     related_product_definition.frame_of_reference. name<>
     'physical occurrence' ) ) ) ) =0;
 WR7: SIZEOF ( QUERY ( pdr <* product_definition_relationship |
     ( pdr. name = 'solution alternative definition' ) AND ( NOT
     ( pdr. relating_product_definition.frame_of_reference. name
     IN [ 'alternative definition' , 'functional definition' ,
     'conceptual definition' ] ) OR ( pdr.
     related_product_definition.frame_of_reference. name<>
     'alternative definition' ) ) ) ) =0;
 WR8: SIZEOF ( QUERY ( pdr <* product_definition_relationship |
     ( pdr. name = 'collection membership' ) AND ( ( pdr.
     relating_product_definition.frame_of_reference. name<>
     'part definition' ) OR ( pdr.
     related_product_definition.frame_of_reference. name<>
     'part occurrence' ) OR ( SIZEOF ( QUERY ( pdca <* USEDIN (
     pdr. relating_product_definition ,
     'AUTOMOTIVE_DESIGN.PRODUCT_DEFINITION_CONTEXT_ASSOCIATION.DEFINITION'
     ) | ( pdca. role.name = 'part definition type' ) AND (
     pdca. frame_of_reference.name = 'collection definition' ) )
     ) =0 ) ) ) ) =0;
 WR9: SIZEOF ( QUERY ( pdr <* product_definition_relationship |
     ( pdr. name = 'design constraint association' ) AND ( (
     pdr. relating_product_definition.frame_of_reference. name<>
     'design constraint definition' ) OR NOT ( pdr.
     related_product_definition.frame_of_reference. name IN [
     'alternative definition' , 'functional definition' ,
     'conceptual definition' ] ) ) ) ) =0;
 WR10: SIZEOF ( QUERY ( pdr <* product_definition_relationship |
     ( pdr. name = 'final specification' ) AND ( NOT ( pdr.
     relating_product_definition.name IN ['final' ,
     'technical final' , 'supplier final' ,
     'technical supplier final' ] ) OR ( pdr.
     relating_product_definition.frame_of_reference. name<>
     'alternative definition' )  OR NOT ( pdr.
     related_product_definition.frame_of_reference.name IN [ 'part definition' ,
     'physical occurrence' ] ) ) ) ) =0;
END_RULE;

RULE restrict_properties_of_document_file FOR
    (document_file);
WHERE
 WR1: SIZEOF ( QUERY ( df <* document_file | SIZEOF ( QUERY ( pd
     <* USEDIN ( df ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION.'+ 'DEFINITION' )
     | pd. name = 'document property' ) ) >1 ) ) =0;
 WR2: SIZEOF ( QUERY ( df <* document_file | SIZEOF ( QUERY ( rt
     <* df. representation_types | ( 'AUTOMOTIVE_DESIGN.'+
     'DOCUMENT_REPRESENTATION_TYPE' IN TYPEOF ( rt ) ) AND ( rt.
     name IN ['digital' , 'physical'] ) ) ) =0 ) ) =0;
END_RULE;

RULE restrict_properties_of_document_representation FOR
    (product_definition);
WHERE
 WR1: SIZEOF ( QUERY ( pd <* product_definition | ( pd.
     frame_of_reference.name IN [ 'physical document definition'
     , 'digital document definition' ,
     'physical model occurrence' ] ) AND ( SIZEOF ( QUERY ( pd1
     <* USEDIN ( pd ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION.'+ 'DEFINITION' )
     | pd1. name = 'document property' ) ) >1 ) ) ) =0;
END_RULE;

RULE restrict_representation_for_document_content_property FOR
    (representation,
     representation_item);
WHERE
 WR1: SIZEOF ( QUERY ( r <* representation | ( r.name =
     'document content' ) AND ( ( SIZEOF ( r.items ) <1 ) OR (
     SIZEOF ( r.items ) >3 ) ) ) ) =0;
 WR2: SIZEOF ( QUERY ( ri <* representation_item | ( SIZEOF (
     QUERY ( r <* USEDIN ( ri ,
     'AUTOMOTIVE_DESIGN.REPRESENTATION.ITEMS' ) | r.name =
     'document content' ) ) >0 ) AND NOT ( ri. name IN [
     'detail level' , 'geometry type' , 'real world scale' ] ) )
     ) =0;
 WR3: SIZEOF ( QUERY ( r <* representation | ( r.name =
     'document content' ) AND ( SIZEOF ( QUERY ( i <* r.items |
     ( i.name = 'detail level' ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) ) ) >1
     ) ) ) =0;
 WR4: SIZEOF ( QUERY ( r <* representation | ( r.name =
     'document content' ) AND ( SIZEOF ( QUERY ( i <* r.items |
     ( i.name = 'geometry type' ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) ) ) >1
     ) ) ) =0;
 WR5: SIZEOF ( QUERY ( r <* representation | ( r.name =
     'document content' ) AND ( SIZEOF ( QUERY ( i <* r.items |
     ( i.name = 'real world scale' ) AND ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'VALUE_REPRESENTATION_ITEM']* TYPEOF
     ( i ) ) =1 ) ) ) >1 ) ) ) =0;
END_RULE;

RULE restrict_representation_for_document_creation_property FOR
    (representation,
     representation_item);
WHERE
 WR1: SIZEOF ( QUERY ( r <* representation | ( r.name =
     'document creation' ) AND ( ( SIZEOF ( r.items ) <1 ) OR (
     SIZEOF ( r.items ) >3 ) ) ) ) =0;
 WR2: SIZEOF ( QUERY ( ri <* representation_item | ( SIZEOF (
     QUERY ( r <* USEDIN ( ri ,
     'AUTOMOTIVE_DESIGN.REPRESENTATION.ITEMS' ) | r.name =
     'document creation' ) ) >0 ) AND NOT ( ri. name IN [
     'creating interface' , 'creating system' ,
     'operating system' ] ) ) ) =0;
 WR3: SIZEOF ( QUERY ( r <* representation | ( r.name =
     'document creation' ) AND ( SIZEOF ( QUERY ( i <* r.items |
     ( i.name = 'creating interface' ) AND (
     'AUTOMOTIVE_DESIGN.'+ 'DESCRIPTIVE_REPRESENTATION_ITEM' IN
     TYPEOF ( i ) ) ) ) >1 ) ) ) =0;
 WR4: SIZEOF ( QUERY ( r <* representation | ( r.name =
     'document creation' ) AND ( SIZEOF ( QUERY ( i <* r.items |
     ( i.name = 'creating system' ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) ) ) <>1
     ) ) ) =0;
 WR5: SIZEOF ( QUERY ( r <* representation | ( r.name =
     'document creation' ) AND ( SIZEOF ( QUERY ( i <* r.items |
     ( i.name = 'operating system' ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) ) ) >1
     ) ) ) =0;
END_RULE;

RULE restrict_representation_for_document_format_property FOR
    (representation,
     representation_item);
WHERE
 WR1: SIZEOF ( QUERY ( r <* representation | ( r.name =
     'document format' ) AND ( ( SIZEOF ( r.items ) <1 ) OR (
     SIZEOF ( r.items ) >3 ) ) ) ) =0;
 WR2: SIZEOF ( QUERY ( ri <* representation_item | ( SIZEOF (
     QUERY ( r <* USEDIN ( ri ,
     'AUTOMOTIVE_DESIGN.REPRESENTATION.ITEMS' ) | r.name =
     'document format' ) ) >0 ) AND NOT ( ri. name IN [
     'character code' , 'data format' ] ) ) ) =0;
 WR3: SIZEOF ( QUERY ( r <* representation | ( r.name =
     'document format' ) AND ( SIZEOF ( QUERY ( i <* r.items | (
     i.name = 'character code' ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) ) ) >1
     ) ) ) =0;
 WR4: SIZEOF ( QUERY ( r <* representation | ( r.name =
     'document format' ) AND ( SIZEOF ( QUERY ( i <* r.items | (
     i.name = 'data format' ) AND ( 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) ) ) >1
     ) ) ) =0;
 WR5: SIZEOF ( QUERY ( r <* representation | ( r.name = 
     'document format' ) AND ( SIZEOF ( QUERY ( i <* r.items
     | ( i.name =  'size format' ) AND ( 'AUTOMOTIVE_DESIGN.'
     + 'PLANAR_EXTENT' IN TYPEOF ( i ) ) ) )
     >1 ) ) ) =  0;
END_RULE;

RULE restrict_representation_for_document_properties FOR
    (property_definition,
     representation,
     representation_context);
WHERE
 WR1: SIZEOF ( QUERY ( pd <* property_definition | ( pd. name =
     'document property' ) AND ( SIZEOF ( QUERY ( pdr <* USEDIN
     ( pd ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_REPRESENTATION.'+'DEFINITION'
     ) | NOT ( pdr. used_representation.name IN [
     'document content' , 'document creation' ,
     'document format' , 'document size' ] ) ) ) >0 ) ) ) =0;
 WR2: SIZEOF ( QUERY ( r <* representation | ( r.name IN [
     'document content' , 'document creation' ,
     'document format' , 'document size' ] ) AND ( SIZEOF (
     QUERY ( pdr <* USEDIN ( r ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_REPRESENTATION.'+'USED_REPRESENTATION'
     ) | ( 'AUTOMOTIVE_DESIGN.'+ 'PROPERTY_DEFINITION' IN TYPEOF
     ( pdr. definition ) ) AND ( pdr. definition.name =
     'document property' ) ) ) =0 ) ) ) =0;
 WR3: SIZEOF ( QUERY ( r <* representation | ( r.name IN [
     'document content' , 'document creation' ,
     'document format' , 'document size' ] ) AND (
     r.context_of_items. context_type<> 'document parameters' )
     ) ) =0;
 WR4: SIZEOF ( QUERY ( rc <* representation_context | ( rc.
     context_type = 'document parameters' ) AND ( SIZEOF ( QUERY
     ( r <* USEDIN ( rc ,
     'AUTOMOTIVE_DESIGN.REPRESENTATION.CONTEXT_OF_ITEMS' ) | NOT
     ( r.name IN [ 'document content' , 'document creation' ,
     'document format' , 'document size' ] ) ) ) >0 ) ) ) =0;
END_RULE;

RULE restrict_representation_for_document_size_property FOR
    (representation,
     representation_item);
WHERE
 WR1: SIZEOF ( QUERY ( r <* representation | ( r.name =
     'document size' ) AND ( ( SIZEOF ( r.items ) <1 ) OR (
     SIZEOF ( r.items ) >2 ) ) ) ) =0;
 WR2: SIZEOF ( QUERY ( ri <* representation_item | ( SIZEOF (
     QUERY ( r <* USEDIN ( ri ,
     'AUTOMOTIVE_DESIGN.REPRESENTATION.ITEMS' ) | r.name =
     'document size' ) ) >0 ) AND NOT ( ri. name IN [
     'file size' , 'page count' ] ) ) ) =0;
 WR3: SIZEOF ( QUERY ( r <* representation | ( r.name =
     'document size' ) AND ( SIZEOF ( QUERY ( i <* r.items | (
     i.name = 'file size' ) AND ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'VALUE_RANGE' , 'AUTOMOTIVE_DESIGN.'+
     'VALUE_REPRESENTATION_ITEM']* TYPEOF ( i ) ) =1 ) ) ) >1 )
     ) ) =0;
 WR4: SIZEOF ( QUERY ( r <* representation | ( r.name =
     'document size' ) AND ( SIZEOF ( QUERY ( i <* r.items | (
     i.name = 'page count' ) AND ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'VALUE_RANGE' , 'AUTOMOTIVE_DESIGN.'+
     'VALUE_REPRESENTATION_ITEM']* TYPEOF ( i ) ) =1 ) ) ) >1 )
     ) ) =0;
END_RULE;

 RULE restrict_representation_for_surface_condition FOR (
      property_definition_representation);
  WHERE
 WR1: SIZEOF(QUERY(pdr <* property_definition_representation |
      NOT surface_condition_correlation(pdr.definition, pdr.used_representation
      ) ))=0;
END_RULE;

RULE restrict_representation_item_for_hybrid_geometric_model_3d FOR
    (shape_representation);
WHERE
 WR1: SIZEOF ( QUERY ( sr <* shape_representation | ( sr. name =
     'hybrid 3d shape representation' ) AND ( SIZEOF ( QUERY ( i
     <* sr. items | NOT ( 'AUTOMOTIVE_DESIGN.'+
     'GEOMETRIC_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) ) ) >0 )
     ) ) =0;
END_RULE;

RULE restrict_treatment_result FOR
    (representation);
WHERE
 WR1: ( SIZEOF ( QUERY ( r <* representation | ( r.name =
     'treatment result' ) AND ( SIZEOF ( r.items ) >2 ) ) ) =0 )
     AND ( SIZEOF ( QUERY ( r <* representation | ( r.name =
     'treatment result' ) AND ( SIZEOF ( QUERY ( i <* r.items |
     NOT ( 'AUTOMOTIVE_DESIGN.'+
     'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) ) ) >0
     ) ) ) =0 ) ;
 WR2: SIZEOF ( QUERY ( r <* representation | ( r.name =
     'treatment result' ) AND ( SIZEOF ( QUERY ( i <* r.items |
     i.name ='result' ) ) =0 ) ) ) =0;
 WR3: SIZEOF ( QUERY ( r <* representation | ( r.name =
     'treatment result' ) AND ( SIZEOF ( QUERY ( i <* r.items |
     i.name ='purpose' ) ) >1 ) ) ) =0;
END_RULE;

RULE restrict_version_assignment_for_action FOR
    (action);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* action | SIZEOF ( QUERY ( ia <*
     USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_IDENTIFICATION_ASSIGNMENT.'+
     'ITEMS' ) | ia. role.name ='version' ) ) >1 ) ) =0;
END_RULE;

RULE restrict_version_assignment_for_action_directive FOR
    (action_directive);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* action_directive | SIZEOF ( QUERY
     ( ia <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_IDENTIFICATION_ASSIGNMENT.'+
     'ITEMS' ) | ia. role.name ='version' ) ) >1 ) ) =0;
END_RULE;

RULE restrict_version_assignment_for_action_method FOR
    (action_method);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* action_method | SIZEOF ( QUERY (
     ia <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_IDENTIFICATION_ASSIGNMENT.'+
     'ITEMS' ) | ia. role.name ='version' ) ) >1 ) ) =0;
END_RULE;

RULE restrict_version_assignment_for_applied_identification_assignment FOR
    (applied_identification_assignment);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* applied_identification_assignment
     | SIZEOF ( QUERY ( ia <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_IDENTIFICATION_ASSIGNMENT.'+
     'ITEMS' ) | ia. role.name ='version' ) ) >1 ) ) =0;
END_RULE;

RULE restrict_version_assignment_for_class FOR
    (class);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* class | SIZEOF ( QUERY ( ia <*
     USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_IDENTIFICATION_ASSIGNMENT.'+
     'ITEMS' ) | ia. role.name ='version' ) ) >1 ) ) =0;
END_RULE;

RULE restrict_version_assignment_for_configuration_item FOR
    (configuration_item);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* configuration_item | SIZEOF (
     QUERY ( ia <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_IDENTIFICATION_ASSIGNMENT.'+
     'ITEMS' ) | ia. role.name ='version' ) ) >1 ) ) =0;
END_RULE;

RULE restrict_version_assignment_for_document_file FOR
    (document_file);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* document_file | SIZEOF ( QUERY (
     ia <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_IDENTIFICATION_ASSIGNMENT.'+
     'ITEMS' ) | ia. role.name ='version' ) ) >1 ) ) =0;
END_RULE;

RULE restrict_version_assignment_for_draughting_model FOR
    (draughting_model);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* draughting_model | SIZEOF ( QUERY
     ( ia <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_IDENTIFICATION_ASSIGNMENT.'+
     'ITEMS' ) | ia. role.name ='version' ) ) >1 ) ) =0;
END_RULE;

RULE restrict_version_assignment_for_effectivity FOR
    (effectivity);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* effectivity | SIZEOF ( QUERY ( ia
     <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_IDENTIFICATION_ASSIGNMENT.'+
     'ITEMS' ) | ia. role.name ='version' ) ) >1 ) ) =0;
END_RULE;

RULE restrict_version_assignment_for_general_property FOR
    (general_property);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* general_property | SIZEOF ( QUERY
     ( ia <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_IDENTIFICATION_ASSIGNMENT.'+
     'ITEMS' ) | ia. role.name ='version' ) ) >1 ) ) =0;
END_RULE;

RULE restrict_version_assignment_for_mechanical_design_geometric_presentation_representation FOR
    (mechanical_design_geometric_presentation_representation);
WHERE
 WR1: SIZEOF ( QUERY ( ent <*
     mechanical_design_geometric_presentation_representation |
     SIZEOF ( QUERY ( ia <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_IDENTIFICATION_ASSIGNMENT.'+
     'ITEMS' ) | ia. role.name ='version' ) ) >1 ) ) =0;
END_RULE;

RULE restrict_version_assignment_for_presentation_area FOR
    (presentation_area);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* presentation_area | SIZEOF ( QUERY
     ( ia <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_IDENTIFICATION_ASSIGNMENT.'+
     'ITEMS' ) | ia. role.name ='version' ) ) >1 ) ) =0;
END_RULE;

RULE restrict_version_assignment_for_product_concept FOR
    (product_concept);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* product_concept | SIZEOF ( QUERY (
     ia <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_IDENTIFICATION_ASSIGNMENT.'+
     'ITEMS' ) | ia. role.name ='version' ) ) >1 ) ) =0;
END_RULE;

RULE restrict_version_assignment_for_product_concept_feature FOR
    (product_concept_feature);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* product_concept_feature | SIZEOF (
     QUERY ( ia <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_IDENTIFICATION_ASSIGNMENT.'+
     'ITEMS' ) | ia. role.name ='version' ) ) >1 ) ) =0;
END_RULE;

RULE restrict_version_assignment_for_shape_representation FOR
    (shape_representation);
WHERE
 WR1: SIZEOF ( QUERY ( ent <* shape_representation | SIZEOF (
     QUERY ( ia <* USEDIN ( ent ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_IDENTIFICATION_ASSIGNMENT.'+
     'ITEMS' ) | ia. role.name ='version' ) ) >1 ) ) =0;
END_RULE;

RULE restrict_viewing_plane_usage FOR
    (geometric_tolerance);
WHERE
 WR1: SIZEOF ( QUERY ( gt <* geometric_tolerance | SIZEOF (
     QUERY ( sar <* USEDIN ( gt. toleranced_shape_aspect ,
     'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.'+'RELATING_SHAPE_ASPECT'
     ) | sar. name = 'affected plane association' ) ) >1 ) ) =0;
 WR2: SIZEOF ( QUERY ( gt <* geometric_tolerance | SIZEOF (
     QUERY ( sar <* USEDIN ( gt. toleranced_shape_aspect ,
     'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+
     'RELATING_SHAPE_ASPECT' ) | ( sar. name =
     'affected plane association' ) AND NOT ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'LINE_PROFILE_TOLERANCE' ,
     'AUTOMOTIVE_DESIGN.'+ 'PARALLELISM_TOLERANCE' ,
     'AUTOMOTIVE_DESIGN.'+ 'PERPENDICULARITY_TOLERANCE' ,
     'AUTOMOTIVE_DESIGN.'+ 'POSITION_TOLERANCE' ,
     'AUTOMOTIVE_DESIGN.'+ 'STRAIGHTNESS_TOLERANCE' ,
     'AUTOMOTIVE_DESIGN.'+ 'SYMMETRY_TOLERANCE']* TYPEOF ( gt )
     ) <>1 ) ) ) >0 ) ) =0;
END_RULE;

RULE restrict_zone_boundary FOR
    (tolerance_zone_definition);
WHERE
 WR1: SIZEOF ( QUERY ( tzd <* tolerance_zone_definition | SIZEOF
     ( tzd. boundaries ) >2 ) ) =0;
END_RULE;

RULE retention_requires_retention_assignment FOR
    (retention);
WHERE
 WR1: SIZEOF ( QUERY ( r <* retention | SIZEOF ( QUERY ( aa <*
     USEDIN ( r , 'AUTOMOTIVE_DESIGN.'+'ACTION_ASSIGNMENT.'+
     'ASSIGNED_ACTION' ) | ( 'AUTOMOTIVE_DESIGN.'+
     'APPLIED_ACTION_ASSIGNMENT' IN TYPEOF ( aa ) ) AND ( aa.
     role.name ='retention' ) ) ) =0 ) ) =0;
END_RULE;

RULE security_classification_requires_security_classification_assignment FOR
    (security_classification);
WHERE
 WR1: SIZEOF ( QUERY ( sc <* security_classification | SIZEOF (
     USEDIN ( sc ,
     'AUTOMOTIVE_DESIGN.'+'SECURITY_CLASSIFICATION_ASSIGNMENT.'+
     'ASSIGNED_SECURITY_CLASSIFICATION' ) ) =0 ) ) =0;
END_RULE;

RULE selected_instance_usage_requires_representation FOR
    (assembly_component_usage,
     representation);
WHERE
 WR1: SIZEOF ( QUERY ( acr <* assembly_component_usage | ( acr.
     name = 'selected instance usage' ) AND ( SIZEOF ( QUERY (
     pd <* USEDIN ( acr ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION.'+ 'DEFINITION' )
     | ( pd. name = 'occurrence selection' ) AND ( SIZEOF (
     QUERY ( pdr <* USEDIN ( pd ,
     'AUTOMOTIVE_DESIGN.'+'PROPERTY_DEFINITION_REPRESENTATION.'+
     'DEFINITION' ) | ( pdr. used_representation.name =
     'selection criteria' ) AND ( SIZEOF ( pdr.
     used_representation.items ) =2 ) AND ( SIZEOF ( QUERY ( i
     <* pdr. used_representation.items | ( SIZEOF (
     ['AUTOMOTIVE_DESIGN.'+ 'MEASURE_REPRESENTATION_ITEM' ,
     'AUTOMOTIVE_DESIGN.'+ 'VALUE_RANGE']* TYPEOF ( i ) ) =1 )
     AND ( i.name = 'selection quantity' ) ) ) =1 ) AND ( SIZEOF
     ( QUERY ( i <* pdr. used_representation.items | (
     'AUTOMOTIVE_DESIGN.'+ 'DESCRIPTIVE_REPRESENTATION_ITEM' IN
     TYPEOF ( i ) ) AND ( i.name = 'selection control' ) ) ) =1
     ) ) ) >0 ) ) ) =0 ) ) ) =0;
END_RULE;

RULE sheets_belong_to_one_drawing FOR
    (drawing_sheet_revision);
WHERE
 WR1: SIZEOF ( QUERY ( dsr <* drawing_sheet_revision | SIZEOF (
     QUERY ( dsru <* USEDIN ( dsr ,
     'AUTOMOTIVE_DESIGN.AREA_IN_SET.AREA' ) | (
     'AUTOMOTIVE_DESIGN.'+ 'DRAWING_SHEET_REVISION_USAGE' IN
     TYPEOF ( dsru ) ) ) ) <>1 ) ) =0;
END_RULE;

RULE styled_curve FOR
    (styled_item);
WHERE
 WR1: SIZEOF ( QUERY ( si <* styled_item | (
     'AUTOMOTIVE_DESIGN.'+ 'CURVE' IN TYPEOF ( si. item ) ) AND
     ( SIZEOF ( QUERY ( psa <* si. styles | ( SIZEOF ( QUERY (
     cs <* psa. styles | ( 'AUTOMOTIVE_DESIGN.'+ 'CURVE_STYLE'
     IN TYPEOF ( cs ) ) ) ) >0 ) ) ) <>1 ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_action FOR
    (action);
WHERE
 WR1: SIZEOF ( QUERY ( a <* action | NOT ( type_check_function (
     a , ['AUTOMOTIVE_DESIGN.'+ 'ELEMENT_DELIVERY' ,
     'AUTOMOTIVE_DESIGN.'+ 'EXECUTED_ACTION' ,
     'AUTOMOTIVE_DESIGN.'+ 'PROCESS_PLAN' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_DEFINITION_PROCESS' ,
     'AUTOMOTIVE_DESIGN.'+ 'PROPERTY_PROCESS' ,
     'AUTOMOTIVE_DESIGN.'+ 'RETENTION'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_characterized_object FOR
    (characterized_object);
WHERE
 WR1: SIZEOF ( QUERY ( co <* characterized_object | NOT (
     type_check_function ( co , ['AUTOMOTIVE_DESIGN.'+
     'CHARACTERIZED_CLASS' , 'AUTOMOTIVE_DESIGN.'+
     'DOCUMENT_FILE' , 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_DEFINITION' , 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_DEFINITION' , 'AUTOMOTIVE_DESIGN.'+
     'PRODUCT_CLASS' , 'AUTOMOTIVE_DESIGN.'+
     'PRODUCT_IDENTIFICATION'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_classification_assignment FOR
    (classification_assignment);
WHERE
 WR1: SIZEOF ( QUERY ( ca <* classification_assignment | NOT (
     type_check_function ( ca , ['AUTOMOTIVE_DESIGN.'+
     'APPLIED_CLASSIFICATION_ASSIGNMENT' , 'AUTOMOTIVE_DESIGN.'+
     'LANGUAGE_ASSIGNMENT'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_colour FOR
    (colour);
WHERE
 WR1: SIZEOF ( QUERY ( c <* colour | NOT ( type_check_function (
     c , ['AUTOMOTIVE_DESIGN.'+ 'COLOUR_SPECIFICATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRE_DEFINED_COLOUR'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_compound_representation_item FOR
    (compound_representation_item);
WHERE
 WR1: SIZEOF ( QUERY ( cri <* compound_representation_item | NOT
     ( type_check_function ( cri , ['AUTOMOTIVE_DESIGN.'+
     'DEFAULT_TOLERANCE_TABLE_CELL' , 'AUTOMOTIVE_DESIGN.'+
     'VALUE_RANGE'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_document_reference FOR
    (document_reference);
WHERE
 WR1: SIZEOF ( QUERY ( dr <* document_reference | NOT (
     type_check_function ( dr , ['AUTOMOTIVE_DESIGN.'+
     'APPLIED_DOCUMENT_REFERENCE' , 'AUTOMOTIVE_DESIGN.'+
     'DRAUGHTING_SPECIFICATION_REFERENCE'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_effectivity FOR
    (effectivity);
WHERE
 WR1: SIZEOF ( QUERY ( e <* effectivity | NOT (
     type_check_function ( e , ['AUTOMOTIVE_DESIGN.'+
     'PRODUCT_DEFINITION_EFFECTIVITY' , 'AUTOMOTIVE_DESIGN.'+
     'TIME_INTERVAL_BASED_EFFECTIVITY'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_effectivity_assignment FOR
    (effectivity_assignment);
WHERE
 WR1: SIZEOF ( QUERY ( ea <* effectivity_assignment | NOT (
     type_check_function ( ea , ['AUTOMOTIVE_DESIGN.'+
     'APPLIED_EFFECTIVITY_ASSIGNMENT' , 'AUTOMOTIVE_DESIGN.'+
     'APPLIED_INEFFECTIVITY_ASSIGNMENT' , 'AUTOMOTIVE_DESIGN.'+
     'CONFIGURED_EFFECTIVITY_ASSIGNMENT'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_effectivity_context_assignment FOR
    (effectivity_context_assignment);
WHERE
 WR1: SIZEOF ( QUERY ( eca <* effectivity_context_assignment |
     NOT ( type_check_function ( eca , ['AUTOMOTIVE_DESIGN.'+
     'CLASS_USAGE_EFFECTIVITY_CONTEXT_ASSIGNMENT' ,
     'AUTOMOTIVE_DESIGN.'+
     'CONFIGURED_EFFECTIVITY_CONTEXT_ASSIGNMENT'] , 3 ) ) ) )
     =0;
END_RULE;

RULE subtype_exclusiveness_externally_defined_item FOR
    (externally_defined_item);
WHERE
 WR1: SIZEOF ( QUERY ( edi <* externally_defined_item | NOT (
     type_check_function ( edi , ['AUTOMOTIVE_DESIGN.'+
     'EXTERNALLY_DEFINED_CHARACTER_GLYPH' ,
     'AUTOMOTIVE_DESIGN.'+ 'EXTERNALLY_DEFINED_CLASS' ,
     'AUTOMOTIVE_DESIGN.'+ 'EXTERNALLY_DEFINED_CURVE_FONT' ,
     'AUTOMOTIVE_DESIGN.'+
     'EXTERNALLY_DEFINED_FEATURE_DEFINITION' ,
     'AUTOMOTIVE_DESIGN.'+ 'EXTERNALLY_DEFINED_GENERAL_PROPERTY'
     , 'AUTOMOTIVE_DESIGN.'+ 'EXTERNALLY_DEFINED_HATCH_STYLE' ,
     'AUTOMOTIVE_DESIGN.'+ 'EXTERNALLY_DEFINED_STYLE' ,
     'AUTOMOTIVE_DESIGN.'+ 'EXTERNALLY_DEFINED_SYMBOL' ,
     'AUTOMOTIVE_DESIGN.'+ 'EXTERNALLY_DEFINED_TEXT_FONT' ,
     'AUTOMOTIVE_DESIGN.'+ 'EXTERNALLY_DEFINED_TILE_STYLE'] , 3
     ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_feature_component_relationship FOR
    (feature_component_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( fcr <* feature_component_relationship |
     NOT ( type_check_function ( fcr , ['AUTOMOTIVE_DESIGN.'+
     'PATTERN_OFFSET_MEMBERSHIP' , 'AUTOMOTIVE_DESIGN.'+
     'PATTERN_OMIT_MEMBERSHIP'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_feature_definition FOR
    (feature_definition);
WHERE
 WR1: SIZEOF ( QUERY ( fd <* feature_definition | NOT (
     type_check_function ( fd , ['AUTOMOTIVE_DESIGN.'+
     'BARRING_HOLE' , 'AUTOMOTIVE_DESIGN.'+ 'BEAD' ,
     'AUTOMOTIVE_DESIGN.'+ 'BOSS' , 'AUTOMOTIVE_DESIGN.'+
     'COMPOUND_FEATURE' , 'AUTOMOTIVE_DESIGN.'+
     'EXTERNALLY_DEFINED_FEATURE_DEFINITION' ,
     'AUTOMOTIVE_DESIGN.'+ 'FEATURE_IN_PANEL' ,
     'AUTOMOTIVE_DESIGN.'+ 'GENERAL_FEATURE' ,
     'AUTOMOTIVE_DESIGN.'+ 'HOLE_IN_PANEL' ,
     'AUTOMOTIVE_DESIGN.'+ 'JOGGLE' , 'AUTOMOTIVE_DESIGN.'+
     'LOCATOR' , 'AUTOMOTIVE_DESIGN.'+ 'POCKET' ,
     'AUTOMOTIVE_DESIGN.' + 'REPLICATE_FEATURE' ,
     'AUTOMOTIVE_DESIGN.'+ 'RIB' , 'AUTOMOTIVE_DESIGN.'+
     'ROUND_HOLE' , 'AUTOMOTIVE_DESIGN.'+ 'SLOT' ,
     'AUTOMOTIVE_DESIGN.'+ 'THREAD'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_founded_item FOR
    (founded_item);
WHERE
 WR1: SIZEOF ( QUERY ( fi <* founded_item | NOT (
     type_check_function ( fi , ['AUTOMOTIVE_DESIGN.'+
     'COMPOSITE_CURVE_SEGMENT' , 'AUTOMOTIVE_DESIGN.'+
     'SURFACE_PATCH' , 'AUTOMOTIVE_DESIGN.'+ 'VIEW_VOLUME'] , 3
     ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_geometric_tolerance FOR
    (geometric_tolerance);
WHERE
 WR1: SIZEOF ( QUERY ( gt <* geometric_tolerance | NOT (
     type_check_function ( gt , ['AUTOMOTIVE_DESIGN.'+
     'ANGULARITY_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'CIRCULAR_RUNOUT_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'COAXIALITY_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'CONCENTRICITY_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'CYLINDRICITY_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'FLATNESS_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'LINE_PROFILE_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'PARALLELISM_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'PERPENDICULARITY_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'POSITION_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'ROUNDNESS_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'STRAIGHTNESS_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'SURFACE_PROFILE_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'SYMMETRY_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'TOTAL_RUNOUT_TOLERANCE'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_group FOR
    (group);
WHERE
 WR1: SIZEOF ( QUERY ( g <* group | NOT ( type_check_function (
     g , ['AUTOMOTIVE_DESIGN.'+ 'CLASS' , 'AUTOMOTIVE_DESIGN.'+
     'CLASS_SYSTEM' , 'AUTOMOTIVE_DESIGN.'+ 'LANGUAGE' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRODUCT_CONCEPT_FEATURE_CATEGORY' ,
     'AUTOMOTIVE_DESIGN.'+ 'REP_ITEM_GROUP'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_group_assignment FOR
    (group_assignment);
WHERE
 WR1: SIZEOF ( QUERY ( ga <* group_assignment | NOT (
     type_check_function ( ga , ['AUTOMOTIVE_DESIGN.'+
     'APPLIED_GROUP_ASSIGNMENT' , 'AUTOMOTIVE_DESIGN.'+
     'PRODUCT_CONCEPT_FEATURE_CATEGORY_USAGE'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_identification_assignment FOR
    (identification_assignment);
WHERE
 WR1: SIZEOF ( QUERY ( ia <* identification_assignment | NOT (
     type_check_function ( ia , ['AUTOMOTIVE_DESIGN.'+
     'APPLIED_IDENTIFICATION_ASSIGNMENT' , 'AUTOMOTIVE_DESIGN.'+
     'EXTERNAL_IDENTIFICATION_ASSIGNMENT'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_mapped_item FOR
    (mapped_item);
WHERE
 WR1: SIZEOF ( QUERY ( mi <* mapped_item | NOT (
     type_check_function ( mi , ['AUTOMOTIVE_DESIGN.'+
     'ANNOTATION_SYMBOL' , 'AUTOMOTIVE_DESIGN.'+
     'ANNOTATION_TEXT' , 'AUTOMOTIVE_DESIGN.'+
     'ANNOTATION_TEXT_CHARACTER' , 'AUTOMOTIVE_DESIGN.'+
     'CAMERA_IMAGE' , 'AUTOMOTIVE_DESIGN.'+
     'DIMENSION_TEXT_ASSOCIATIVITY'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_pre_defined_item FOR
    (pre_defined_item);
WHERE
 WR1: SIZEOF ( QUERY ( pdi <* pre_defined_item | NOT (
     type_check_function ( pdi , ['AUTOMOTIVE_DESIGN.'+
     'KNOWN_SOURCE' , 'AUTOMOTIVE_DESIGN.'+ 'PRE_DEFINED_COLOUR'
     , 'AUTOMOTIVE_DESIGN.'+ 'PRE_DEFINED_CURVE_FONT' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRE_DEFINED_MARKER' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRE_DEFINED_PRESENTATION_STYLE' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRE_DEFINED_SYMBOL' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRE_DEFINED_TEXT_FONT'] , 3 ) ) ) )
     =0;
END_RULE;

RULE subtype_exclusiveness_pre_defined_symbol FOR
    (pre_defined_symbol);
WHERE
 WR1: SIZEOF ( QUERY ( pds <* pre_defined_symbol | NOT (
     type_check_function ( pds , ['AUTOMOTIVE_DESIGN.'+
     'PRE_DEFINED_DIMENSION_SYMBOL' , 'AUTOMOTIVE_DESIGN.'+
     'PRE_DEFINED_GEOMETRICAL_TOLERANCE_SYMBOL' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRE_DEFINED_POINT_MARKER_SYMBOL' ,
     'AUTOMOTIVE_DESIGN.'+
     'PRE_DEFINED_SURFACE_CONDITION_SYMBOL' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRE_DEFINED_TERMINATOR_SYMBOL'] , 3
     ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_presentation_area FOR
    (presentation_area);
WHERE
 WR1: SIZEOF ( QUERY ( pa <* presentation_area | NOT (
     type_check_function ( pa , ['AUTOMOTIVE_DESIGN.'+
     'DRAWING_SHEET_REVISION' , 'AUTOMOTIVE_DESIGN.'+
     'MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_AREA'] , 3 ) ) )
     ) =0;
END_RULE;

RULE subtype_exclusiveness_presentation_representation FOR
    (presentation_representation);
WHERE
 WR1: SIZEOF ( QUERY ( pr <* presentation_representation | NOT (
     type_check_function ( pr , ['AUTOMOTIVE_DESIGN.'+
     'PRESENTATION_AREA' , 'AUTOMOTIVE_DESIGN.'+
     'PRESENTATION_VIEW'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_property_definition FOR
    (property_definition);
WHERE
 WR1: SIZEOF ( QUERY ( pd <* property_definition | NOT (
     type_check_function ( pd , ['AUTOMOTIVE_DESIGN.'+
     'KINEMATIC_PROPERTY_DEFINITION' , 'AUTOMOTIVE_DESIGN.'+
     'MATERIAL_PROPERTY' , 'AUTOMOTIVE_DESIGN.'+
     'PRODUCT_DEFINITION_SHAPE'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_property_definition_representation FOR
    (property_definition_representation);
WHERE
 WR1: SIZEOF ( QUERY ( pdr <* property_definition_representation
     | NOT ( type_check_function ( pdr , ['AUTOMOTIVE_DESIGN.'+
     'KINEMATIC_PROPERTY_REPRESENTATION_RELATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'MATERIAL_PROPERTY_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'SHAPE_DEFINITION_REPRESENTATION'] ,
     3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_replicate_feature FOR
    (replicate_feature);
WHERE
 WR1: SIZEOF ( QUERY ( rf <* replicate_feature | NOT (
     type_check_function ( rf , ['AUTOMOTIVE_DESIGN.'+
     'CIRCULAR_PATTERN' , 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_PATTERN' , 'AUTOMOTIVE_DESIGN.'+
     'MODIFIED_PATTERN' , 'AUTOMOTIVE_DESIGN.'+
     'RECTANGULAR_PATTERN'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_representation FOR
    (representation);
WHERE
 WR1: SIZEOF ( QUERY ( r <* representation | NOT (
     type_check_function ( r , ['AUTOMOTIVE_DESIGN.'+
     'CONSTRUCTIVE_GEOMETRY_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'CONTACT_RATIO_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'DEFAULT_TOLERANCE_TABLE' ,
     'AUTOMOTIVE_DESIGN.'+ 'DEFINITIONAL_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'DRAUGHTING_MODEL' ,
     'AUTOMOTIVE_DESIGN.'+ 'FOUNDED_KINEMATIC_PATH' ,
     'AUTOMOTIVE_DESIGN.'+ 'HARDNESS_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+
     'KINEMATIC_FRAME_BACKGROUND_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'KINEMATIC_GROUND_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'KINEMATIC_LINK_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+
     'MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'MOMENTS_OF_INERTIA_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRESENTATION_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'SHAPE_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'SURFACE_TEXTURE_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'SYMBOL_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'TACTILE_APPEARANCE_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'TEXT_STRING_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'VISUAL_APPEARANCE_REPRESENTATION'] ,
     3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_representation_item FOR
    (representation_item);
WHERE
 WR1: SIZEOF ( QUERY ( ri <* representation_item | NOT (
     type_check_function ( ri , ['AUTOMOTIVE_DESIGN.'+
     'COMPOUND_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'KINEMATIC_PATH' , 'AUTOMOTIVE_DESIGN.'+
     'MEASURE_REPRESENTATION_ITEM' , 'AUTOMOTIVE_DESIGN.'+
     'REP_ITEM_GROUP' , 'AUTOMOTIVE_DESIGN.'+
     'VALUE_REPRESENTATION_ITEM'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_representation_map FOR
    (representation_map);
WHERE
 WR1: SIZEOF ( QUERY ( rm <* representation_map | NOT (
     type_check_function ( rm , ['AUTOMOTIVE_DESIGN.'+
     'CAMERA_USAGE' , 'AUTOMOTIVE_DESIGN.'+
     'SYMBOL_REPRESENTATION_MAP'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_representation_relationship FOR
    (representation_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( rr <* representation_relationship | NOT (
     type_check_function ( rr , ['AUTOMOTIVE_DESIGN.'+
     'CONSTRUCTIVE_GEOMETRY_REPRESENTATION_RELATIONSHIP' ,
     'AUTOMOTIVE_DESIGN.'+
     'KINEMATIC_LINK_REPRESENTATION_ASSOCIATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'MOTION_LINK_RELATIONSHIP'] , 3 ) ) )
     ) =0;
END_RULE;

RULE subtype_exclusiveness_representation_relationship_with_transformation FOR
    (representation_relationship_with_transformation);
WHERE
 WR1: SIZEOF ( QUERY ( rrwt <*
     representation_relationship_with_transformation | NOT (
     type_check_function ( rrwt , ['AUTOMOTIVE_DESIGN.'+
     'KINEMATIC_FRAME_BACKGROUND_REPRESENTATION_ASSOCIATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'MECHANISM_BASE_PLACEMENT'] , 3 ) ) )
     ) =0;
END_RULE;

RULE subtype_exclusiveness_shape_aspect FOR
    (shape_aspect);
WHERE
 WR1: SIZEOF ( QUERY ( sa <* shape_aspect | NOT (
     type_check_function ( sa , ['AUTOMOTIVE_DESIGN.'+
     'APPLIED_AREA' , 'AUTOMOTIVE_DESIGN.'+ 'BEAD_END' ,
     'AUTOMOTIVE_DESIGN.'+ 'BOSS_TOP' , 'AUTOMOTIVE_DESIGN.'+
     'CHAMFER_OFFSET' , 'AUTOMOTIVE_DESIGN.'+
     'CIRCULAR_CLOSED_PROFILE' , 'AUTOMOTIVE_DESIGN.'+
     'CLOSED_PATH_PROFILE' , 'AUTOMOTIVE_DESIGN.'+
     'DIRECTED_ANGLE' , 'AUTOMOTIVE_DESIGN.'+ 'HOLE_BOTTOM' ,
     'AUTOMOTIVE_DESIGN.'+ 'INSTANCED_FEATURE' ,
     'AUTOMOTIVE_DESIGN.'+ 'JOGGLE_TERMINATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'NGON_CLOSED_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'OPEN_PATH_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'PARTIAL_CIRCULAR_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'PATH_FEATURE_COMPONENT' ,
     'AUTOMOTIVE_DESIGN.'+ 'PLACED_FEATURE' ,
     'AUTOMOTIVE_DESIGN.'+ 'POCKET_BOTTOM' ,
     'AUTOMOTIVE_DESIGN.'+ 'RECTANGULAR_CLOSED_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'ROUNDED_U_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+ 'SLOT_END' , 'AUTOMOTIVE_DESIGN.'+
     'SQUARE_U_PROFILE' , 'AUTOMOTIVE_DESIGN.'+ 'TAPER' ,
     'AUTOMOTIVE_DESIGN.'+ 'TEE_PROFILE' ,
     'AUTOMOTIVE_DESIGN.'+
     'TOLERANCE_ZONE' , 'AUTOMOTIVE_DESIGN.'+
     'TRANSITION_FEATURE' , 'AUTOMOTIVE_DESIGN.'+ 'VEE_PROFILE']
     , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_shape_aspect_relationship FOR
    (shape_aspect_relationship);
WHERE
 WR1: SIZEOF ( QUERY ( sar <* shape_aspect_relationship | NOT (
     type_check_function ( sar , ['AUTOMOTIVE_DESIGN.'+
     'DIMENSIONAL_LOCATION' , 'AUTOMOTIVE_DESIGN.'+
     'FEATURE_COMPONENT_RELATIONSHIP' , 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_ASPECT_ASSOCIATIVITY' , 'AUTOMOTIVE_DESIGN.'+
     'SHAPE_ASPECT_DERIVING_RELATIONSHIP' ,
     'AUTOMOTIVE_DESIGN.'+ 'SHAPE_ASPECT_TRANSITION' ,
     'AUTOMOTIVE_DESIGN.'+ 'SHAPE_DEFINING_RELATIONSHIP'] , 3 )
     ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_shape_representation_feature_geometry FOR
    (shape_representation);
WHERE
 WR1: SIZEOF ( QUERY ( sr <* shape_representation | NOT (
     type_check_function ( sr , ['AUTOMOTIVE_DESIGN.'+
     'DIRECTION_SHAPE_REPRESENTATION' , 'AUTOMOTIVE_DESIGN.'+
     'FACE_SHAPE_REPRESENTATION' , 'AUTOMOTIVE_DESIGN.'+
     'LOCATION_SHAPE_REPRESENTATION' , 'AUTOMOTIVE_DESIGN.'+
     'PATH_SHAPE_REPRESENTATION' , 'AUTOMOTIVE_DESIGN.'+
     'PLANAR_SHAPE_REPRESENTATION'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_shape_representation_geometry FOR
    (shape_representation);
WHERE
 WR1: SIZEOF ( QUERY ( sr <* shape_representation | NOT (
     type_check_function ( sr , ['AUTOMOTIVE_DESIGN.'+
     'ADVANCED_BREP_SHAPE_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'COMPOUND_SHAPE_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'CSG_SHAPE_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+
     'EDGE_BASED_WIREFRAME_SHAPE_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'FACETED_BREP_SHAPE_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+
     'GEOMETRICALLY_BOUNDED_2D_WIREFRAME_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+
     'GEOMETRICALLY_BOUNDED_SURFACE_SHAPE_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+
     'GEOMETRICALLY_BOUNDED_WIREFRAME_SHAPE_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+
     'MANIFOLD_SURFACE_SHAPE_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+
     'NON_MANIFOLD_SURFACE_SHAPE_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+
     'POINT_PLACEMENT_SHAPE_REPRESENTATION'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_symbol_representation FOR
    (symbol_representation);
WHERE
 WR1: SIZEOF ( QUERY ( sr <* symbol_representation | NOT (
     type_check_function ( sr , ['AUTOMOTIVE_DESIGN.'+
     'CHARACTER_GLYPH_SYMBOL' , 'AUTOMOTIVE_DESIGN.'+
     'DRAUGHTING_SUBFIGURE_REPRESENTATION' ,
     'AUTOMOTIVE_DESIGN.'+ 'DRAUGHTING_SYMBOL_REPRESENTATION'] ,
     3 ) ) ) ) =0;
END_RULE;

RULE subtype_exclusiveness_transition_feature FOR
    (transition_feature);
WHERE
 WR1: SIZEOF ( QUERY ( tf <* transition_feature | NOT (
     type_check_function ( tf , ['AUTOMOTIVE_DESIGN.'+ 'CHAMFER'
     , 'AUTOMOTIVE_DESIGN.'+ 'EDGE_ROUND' ,
     'AUTOMOTIVE_DESIGN.'+ 'FILLET'] , 3 ) ) ) ) =0;
END_RULE;

RULE subtype_mandatory_address FOR
    (address);
WHERE
 WR1: SIZEOF ( QUERY ( a <* address | NOT ( type_check_function
     ( a , ['AUTOMOTIVE_DESIGN.'+ 'ORGANIZATIONAL_ADDRESS' ,
     'AUTOMOTIVE_DESIGN.'+ 'PERSONAL_ADDRESS'] , 0 ) ) ) ) =0;
END_RULE;

RULE subtype_mandatory_annotation_occurrence FOR
    (annotation_occurrence);
WHERE
 WR1: SIZEOF ( QUERY ( ao <* annotation_occurrence | NOT (
     type_check_function ( ao , ['AUTOMOTIVE_DESIGN.'+
     'ANNOTATION_CURVE_OCCURRENCE' , 'AUTOMOTIVE_DESIGN.'+
     'ANNOTATION_FILL_AREA_OCCURRENCE' , 'AUTOMOTIVE_DESIGN.'+
     'ANNOTATION_SYMBOL_OCCURRENCE' , 'AUTOMOTIVE_DESIGN.'+
     'ANNOTATION_TEXT_OCCURRENCE' , 'AUTOMOTIVE_DESIGN.'+
     'DRAUGHTING_ANNOTATION_OCCURRENCE'] , 0 ) ) ) ) =0;
END_RULE;

RULE subtype_mandatory_camera_image FOR
    (camera_image);
WHERE
 WR1: SIZEOF ( QUERY ( ci <* camera_image | NOT (
     type_check_function ( ci , ['AUTOMOTIVE_DESIGN.'+
     'CAMERA_IMAGE_2D_WITH_SCALE' , 'AUTOMOTIVE_DESIGN.'+
     'CAMERA_IMAGE_3D_WITH_SCALE'] , 0 ) ) ) ) =0;
END_RULE;

RULE subtype_mandatory_camera_model FOR
    (camera_model);
WHERE
 WR1: SIZEOF ( QUERY ( cm <* camera_model | NOT (
     type_check_function ( cm , ['AUTOMOTIVE_DESIGN.'+
     'CAMERA_MODEL_D2' , 'AUTOMOTIVE_DESIGN.'+
     'CAMERA_MODEL_D3'] , 0 ) ) ) ) =0;
END_RULE;

RULE subtype_mandatory_colour_specification FOR
    (colour_specification);
WHERE
 WR1: SIZEOF ( QUERY ( cs <* colour_specification | NOT (
     type_check_function ( cs , ['AUTOMOTIVE_DESIGN.'+
     'COLOUR_RGB'] , 0 ) ) ) ) =0;
END_RULE;

RULE subtype_mandatory_configurable_item FOR
    (configurable_item);
WHERE
 WR1: SIZEOF ( QUERY ( ci <* configurable_item | NOT (
     type_check_function ( ci , ['AUTOMOTIVE_DESIGN.'+
     'PRODUCT_SPECIFICATION'] , 0 ) ) ) ) =0;
END_RULE;

RULE subtype_mandatory_document_product_association FOR
    (document_product_association);
WHERE
 WR1: SIZEOF ( QUERY ( dpa <* document_product_association | NOT
     ( type_check_function ( dpa , ['AUTOMOTIVE_DESIGN.'+
     'DOCUMENT_PRODUCT_EQUIVALENCE'] , 0 ) ) ) ) =0;
END_RULE;

RULE subtype_mandatory_draughting_callout FOR
    (draughting_callout);
WHERE
 WR1: SIZEOF ( QUERY ( dc <* draughting_callout | NOT (
     type_check_function ( dc , ['AUTOMOTIVE_DESIGN.'+
     'DATUM_FEATURE_CALLOUT' , 'AUTOMOTIVE_DESIGN.'+
     'DATUM_TARGET_CALLOUT' , 'AUTOMOTIVE_DESIGN.'+
     'DIMENSION_CURVE_DIRECTED_CALLOUT' , 'AUTOMOTIVE_DESIGN.'+
     'DRAUGHTING_ELEMENTS' , 'AUTOMOTIVE_DESIGN.'+
     'GEOMETRICAL_TOLERANCE_CALLOUT' , 'AUTOMOTIVE_DESIGN.'+
     'LEADER_DIRECTED_CALLOUT' , 'AUTOMOTIVE_DESIGN.'+
     'PROJECTION_DIRECTED_CALLOUT' , 'AUTOMOTIVE_DESIGN.'+
     'STRUCTURED_DIMENSION_CALLOUT' , 'AUTOMOTIVE_DESIGN.'+
     'SURFACE_CONDITION_CALLOUT'] , 0 ) ) ) ) =0;
END_RULE;

RULE subtype_mandatory_externally_defined_item FOR
    (externally_defined_item);
WHERE
 WR1: SIZEOF ( QUERY ( edi <* externally_defined_item | NOT (
     type_check_function ( edi , ['AUTOMOTIVE_DESIGN.'+
     'EXTERNALLY_DEFINED_CHARACTER_GLYPH' ,
     'AUTOMOTIVE_DESIGN.'+ 'EXTERNALLY_DEFINED_CLASS' ,
     'AUTOMOTIVE_DESIGN.'+ 'EXTERNALLY_DEFINED_CURVE_FONT' ,
     'AUTOMOTIVE_DESIGN.'+
     'EXTERNALLY_DEFINED_FEATURE_DEFINITION' ,
     'AUTOMOTIVE_DESIGN.'+ 'EXTERNALLY_DEFINED_GENERAL_PROPERTY'
     , 'AUTOMOTIVE_DESIGN.'+ 'EXTERNALLY_DEFINED_HATCH_STYLE' ,
     'AUTOMOTIVE_DESIGN.'+ 'EXTERNALLY_DEFINED_STYLE' ,
     'AUTOMOTIVE_DESIGN.'+ 'EXTERNALLY_DEFINED_SYMBOL' ,
     'AUTOMOTIVE_DESIGN.'+ 'EXTERNALLY_DEFINED_TEXT_FONT' ,
     'AUTOMOTIVE_DESIGN.'+ 'EXTERNALLY_DEFINED_TILE_STYLE'] , 0
     ) ) ) ) =0;
END_RULE;

RULE subtype_mandatory_founded_item FOR
    (founded_item);
WHERE
 WR1: SIZEOF ( QUERY ( fi <* founded_item | NOT (
     type_check_function ( fi , ['AUTOMOTIVE_DESIGN.'+
     'COMPOSITE_CURVE_SEGMENT' , 'AUTOMOTIVE_DESIGN.'+
     'SURFACE_PATCH' , 'AUTOMOTIVE_DESIGN.'+ 'VIEW_VOLUME',
     -- GL added more entities from p46
'PRESENTATION_APPEARANCE_SCHEMA.'+'PRESENTATION_STYLE_ASSIGNMENT',
'PRESENTATION_APPEARANCE_SCHEMA.'+'PRE_DEFINED_PRESENTATION_STYLE',
'PRESENTATION_APPEARANCE_SCHEMA.'+'POINT_STYLE',
'PRESENTATION_APPEARANCE_SCHEMA.'+'CURVE_STYLE',
'PRESENTATION_APPEARANCE_SCHEMA.'+'CHARACTER_GLYPH_STYLE_OUTLINE',
'PRESENTATION_APPEARANCE_SCHEMA.'+'CHARACTER_GLYPH_STYLE_STROKE',
'PRESENTATION_APPEARANCE_SCHEMA.'+'SURFACE_STYLE_BOUNDARY',
'PRESENTATION_APPEARANCE_SCHEMA.'+'SURFACE_STYLE_CONTROL_GRID',
'PRESENTATION_APPEARANCE_SCHEMA.'+'SURFACE_STYLE_PARAMETER_LINE',
'PRESENTATION_APPEARANCE_SCHEMA.'+'SURFACE_STYLE_SEGMENTATION_CURVE',
'PRESENTATION_APPEARANCE_SCHEMA.'+'SURFACE_STYLE_SILHOUETTE',
'PRESENTATION_APPEARANCE_SCHEMA.'+'SURFACE_SIDE_STYLE',
'PRESENTATION_APPEARANCE_SCHEMA.'+'SURFACE_STYLE_USAGE',
'PRESENTATION_APPEARANCE_SCHEMA.'+'SYMBOL_STYLE',
'PRESENTATION_APPEARANCE_SCHEMA.'+'FILL_AREA_STYLE',
'PRESENTATION_APPEARANCE_SCHEMA.'+'SURFACE_STYLE_FILL_AREA',
'PRESENTATION_APPEARANCE_SCHEMA.'+'TEXT_STYLE',
'PRESENTATION_APPEARANCE_SCHEMA.'+'APPROXIMATION_TOLERANCE',
'PRESENTATION_APPEARANCE_SCHEMA.'+'APPROXIMATION_TOLERANCE_DEVIATION',
'PRESENTATION_APPEARANCE_SCHEMA.'+'APPROXIMATION_TOLERANCE_PARAMETER',
'PRESENTATION_APPEARANCE_SCHEMA.'+'EXTERNALLY_DEFINED_STYLE',
'PRESENTATION_APPEARANCE_SCHEMA.'+'SYMBOL_ELEMENT_STYLE',
'PRESENTATION_APPEARANCE_SCHEMA.'+'CURVE_STYLE_FONT_PATTERN',
'PRESENTATION_APPEARANCE_SCHEMA.'+'CURVE_STYLE_FONT',
'PRESENTATION_APPEARANCE_SCHEMA.'+'CURVE_STYLE_FONT_AND_SCALING'     
     ] , 0
     ) ) ) ) =0;
END_RULE;

RULE subtype_mandatory_geometric_tolerance FOR
    (geometric_tolerance);
WHERE
 WR1: SIZEOF ( QUERY ( gt <* geometric_tolerance | NOT (
     type_check_function ( gt , ['AUTOMOTIVE_DESIGN.'+
     'ANGULARITY_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'CIRCULAR_RUNOUT_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'COAXIALITY_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'CONCENTRICITY_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'CYLINDRICITY_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'FLATNESS_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'LINE_PROFILE_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'PARALLELISM_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'PERPENDICULARITY_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'POSITION_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'ROUNDNESS_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'STRAIGHTNESS_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'SURFACE_PROFILE_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'SYMMETRY_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+
     'TOTAL_RUNOUT_TOLERANCE'] , 0 ) ) ) ) =0;
END_RULE;

RULE subtype_mandatory_pre_defined_colour FOR
    (pre_defined_colour);
WHERE
 WR1: SIZEOF ( QUERY ( pdc <* pre_defined_colour | NOT (
     type_check_function ( pdc , ['AUTOMOTIVE_DESIGN.'+
     'DRAUGHTING_PRE_DEFINED_COLOUR'] , 0 ) ) ) ) =0;
END_RULE;

RULE subtype_mandatory_pre_defined_curve_font FOR
    (pre_defined_curve_font);
WHERE
 WR1: SIZEOF ( QUERY ( pdcf <* pre_defined_curve_font | NOT (
     type_check_function ( pdcf , ['AUTOMOTIVE_DESIGN.'+
     'DRAUGHTING_PRE_DEFINED_CURVE_FONT'] , 0 ) ) ) ) =0;
END_RULE;

RULE subtype_mandatory_pre_defined_item FOR
    (pre_defined_item);
WHERE
 WR1: SIZEOF ( QUERY ( pdi <* pre_defined_item | NOT (
     type_check_function ( pdi , ['AUTOMOTIVE_DESIGN.'+
     'KNOWN_SOURCE' , 'AUTOMOTIVE_DESIGN.'+ 'PRE_DEFINED_COLOUR'
     , 'AUTOMOTIVE_DESIGN.'+ 'PRE_DEFINED_CURVE_FONT' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRE_DEFINED_MARKER' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRE_DEFINED_PRESENTATION_STYLE' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRE_DEFINED_SYMBOL' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRE_DEFINED_TEXT_FONT'] , 0 ) ) ) )
     =0;
END_RULE;

RULE subtype_mandatory_pre_defined_symbol FOR
    (pre_defined_symbol);
WHERE
 WR1: SIZEOF ( QUERY ( pds <* pre_defined_symbol | NOT (
     type_check_function ( pds , ['AUTOMOTIVE_DESIGN.'+
     'PRE_DEFINED_GEOMETRICAL_TOLERANCE_SYMBOL' ,
     'AUTOMOTIVE_DESIGN.'+
     'PRE_DEFINED_SURFACE_CONDITION_SYMBOL' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRE_DEFINED_DIMENSION_SYMBOL' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRE_DEFINED_POINT_MARKER_SYMBOL' ,
     'AUTOMOTIVE_DESIGN.'+ 'PRE_DEFINED_TERMINATOR_SYMBOL'] , 0
     ) ) ) ) =0;
END_RULE;

 RULE subtype_mandatory_pre_defined_text_font FOR (pre_defined_text_font);
  WHERE
   wr1 : SIZEOF(QUERY(pdtf <* pre_defined_text_font | NOT (
         type_check_function (pdtf,['AUTOMOTIVE_DESIGN.' + 
         'DRAUGHTING_PRE_DEFINED_TEXT_FONT'],0)))) = 0;
 END_RULE;
-- 10303-46: presentation_resource_schema

RULE terminator_symbol_constraint FOR
    (terminator_symbol);
WHERE
 WR1: SIZEOF ( QUERY ( ts <* terminator_symbol | ( (
     'AUTOMOTIVE_DESIGN.'+ 'DEFINED_SYMBOL' IN TYPEOF ( ts. item
     ) ) AND NOT ( 'AUTOMOTIVE_DESIGN.'+
     'PRE_DEFINED_TERMINATOR_SYMBOL' IN TYPEOF ( ts.
     item\defined_symbol. definition ) ) ) ) ) =0;
END_RULE;

RULE text_font_usage FOR
    (externally_defined_text_font,
     pre_defined_text_font);
WHERE
 WR1: SIZEOF ( QUERY ( pdtf <* pre_defined_text_font | SIZEOF (
     USEDIN ( pdtf , 'AUTOMOTIVE_DESIGN.TEXT_LITERAL.FONT' ) )
     =0 ) ) =0;
 WR2: SIZEOF ( QUERY ( edtf <* externally_defined_text_font |
     SIZEOF ( USEDIN ( edtf ,
     'AUTOMOTIVE_DESIGN.TEXT_LITERAL.FONT' ) ) =0 ) ) =0;
END_RULE;

RULE versioned_action_request_requires_date_and_person_or_organization FOR
    (versioned_action_request);
WHERE
 WR1: SIZEOF ( QUERY ( va <* versioned_action_request | ( SIZEOF
     ( QUERY ( adapaoa <* USEDIN ( va ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_PERSON_AND_ORGANIZATION_ASSIGNMENT.'+
     'ITEMS' ) | adapaoa. role.name ='requestor' ) ) + SIZEOF (
     QUERY ( adaoa <* USEDIN ( va ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_ORGANIZATION_ASSIGNMENT.'+
     'ITEMS' ) | adaoa. role.name ='requestor' ) ) ) =0 ) ) =0;
 WR2: SIZEOF ( QUERY ( va <* versioned_action_request | ( SIZEOF
     ( QUERY ( adapaoa <* USEDIN ( va ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_PERSON_AND_ORGANIZATION_ASSIGNMENT.'+
     'ITEMS' ) | adapaoa. role.name =
     'notified person or organization' ) ) + SIZEOF ( QUERY (
     adaoa <* USEDIN ( va ,
     'AUTOMOTIVE_DESIGN.'+'APPLIED_ORGANIZATION_ASSIGNMENT.'+
     'ITEMS' ) | adaoa. role.name =
     'notified person or organization' ) ) ) =0 ) ) =0;
END_RULE;

RULE versioned_action_request_requires_status FOR
    (action_request_status,
     versioned_action_request);
WHERE
 WR1: SIZEOF ( QUERY ( ar <* versioned_action_request | NOT (
     SIZEOF ( QUERY ( ars <* action_request_status | ar:=:ars.
     assigned_request ) ) =1 ) ) ) =0;
END_RULE;

FUNCTION assembly_shape_is_defined
  (assy: next_assembly_usage_occurrence) : BOOLEAN;
  LOCAL
        sdr_set : SET OF shape_definition_representation := [];
        srr_set : SET OF shape_representation_relationship := [];
        sdr1_set : SET OF shape_definition_representation := [];
        pd_set : SET OF property_definition := [];
        pdr_set : SET OF product_definition_relationship := [];
        pds_set : SET OF product_definition_shape := [];
	prop_set : SET OF property_definition := [];
  END_LOCAL;

  -- Gather all instances of shape_definition_representation where the
  -- component part has a representation defined for it.

  pd_set := bag_to_set( USEDIN(assy.related_product_definition,
            'AUTOMOTIVE_DESIGN.PROPERTY_DEFINITION.DEFINITION'));
  pdr_set := QUERY( pdr <* bag_to_set(USEDIN
            (assy.related_product_definition,
            'AUTOMOTIVE_DESIGN.PRODUCT_DEFINITION_RELATIONSHIP.' +
            'RELATED_PRODUCT_DEFINITION')) |
             SIZEOF( USEDIN( pdr,
            'AUTOMOTIVE_DESIGN.PROPERTY_DEFINITION.DEFINITION'))
             > 0);
  IF SIZEOF(pd_set) > 0 THEN
      REPEAT i:=1 TO HIINDEX(pd_set);
       sdr_set := sdr_set + QUERY( pdr <* USEDIN(pd_set[i],
      'AUTOMOTIVE_DESIGN.PROPERTY_DEFINITION_REPRESENTATION.'+
      'DEFINITION') |
      'AUTOMOTIVE_DESIGN.SHAPE_DEFINITION_REPRESENTATION' IN
       TYPEOF(pdr));
      END_REPEAT;
  END_IF;
  IF SIZEOF(pdr_set) > 0 THEN
      --mp: first, get all the property_definitions 
      --that reference the elements of pdr_set
      REPEAT i:=1 TO HIINDEX(pdr_set);
        prop_set := prop_set + bag_to_set(USEDIN(pdr_set[i],
       'AUTOMOTIVE_DESIGN.PROPERTY_DEFINITION.DEFINITION'));
      END_REPEAT;
      --mp: now, get all the shape_definition_representations
      -- that are reps of the properties found
      IF SIZEOF (prop_set) > 0 THEN
        REPEAT i:=1 TO HIINDEX(prop_set);
         sdr_set := sdr_set + QUERY( pdr <* USEDIN(prop_set[i],
         'AUTOMOTIVE_DESIGN.' + 
         'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') |
         'AUTOMOTIVE_DESIGN.SHAPE_DEFINITION_REPRESENTATION' IN
         TYPEOF(pdr));
        END_REPEAT;
      END_IF;
  END_IF;


  -- If there is a representation defined for the component part

  IF SIZEOF (sdr_set) > 0 THEN

    -- For each representation of the shape of the component part gather
    -- all instances of shape_representation_relationship where the
    -- representation of component part is related to another
    -- representation.

    REPEAT i := 1 TO HIINDEX (sdr_set);
      srr_set := QUERY (rr <* bag_to_set (
               USEDIN (sdr_set[i]\
               property_definition_representation.used_representation,
               'AUTOMOTIVE_DESIGN.REPRESENTATION_RELATIONSHIP.REP_2')) |
               'AUTOMOTIVE_DESIGN.SHAPE_REPRESENTATION_RELATIONSHIP' IN
               TYPEOF (rr));

      -- If there is a shape_representation_relationship where the component
      -- component part's shape_representation is related to another shape_-
      -- representation.

      pd_set := bag_to_set(USEDIN(assy.relating_product_definition,
             'AUTOMOTIVE_DESIGN.PROPERTY_DEFINITION.DEFINITION'));

      IF SIZEOF(pd_set) > 0 THEN
          REPEAT i:=1 TO HIINDEX(pd_set);
             sdr1_set := sdr1_set + QUERY( pdr <* USEDIN(pd_set[i],
             'AUTOMOTIVE_DESIGN.PROPERTY_DEFINITION_REPRESENTATION.'+
             'DEFINITION') |
             'AUTOMOTIVE_DESIGN.SHAPE_DEFINITION_REPRESENTATION' IN
             TYPEOF(pdr));
          END_REPEAT;
      END_IF;

      IF ( (SIZEOF(sdr_set) > 0) AND (SIZEOF(sdr1_set) > 0) ) THEN

        IF SIZEOF (srr_set) > 0 THEN

          -- For each shape_representation_relationship in that set

          REPEAT j := 1 TO HIINDEX (srr_set);

            -- If the other shape_representation in the shape_representa-
            -- tion_relationship is the  shape_representation of the assembly
            -- product_definition in at least one instance.

            IF SIZEOF (QUERY (pdr <* bag_to_set (USEDIN
              (srr_set[j]\representation_relationship.rep_1,
              'AUTOMOTIVE_DESIGN.PROPERTY_DEFINITION_REPRESENTATION.' +
              'USED_REPRESENTATION')) |
              'AUTOMOTIVE_DESIGN.SHAPE_DEFINITION_REPRESENTATION' IN
              TYPEOF (pdr)) * sdr1_set) >= 1 THEN

              -- If the shape_representation_relationship and the
              -- product_definition_relationship of each occurrence
              -- of the component
              -- and assembly relationship is not given via the
              -- context_dependent_shape_representation then return FALSE

              pds_set := QUERY(x <*  bag_to_set( USEDIN(assy,
                 'AUTOMOTIVE_DESIGN.PROPERTY_DEFINITION.DEFINITION')) |
                 'AUTOMOTIVE_DESIGN.PRODUCT_DEFINITION_SHAPE'  IN
                  TYPEOF(x));

              IF SIZEOF(pds_set) = 0 THEN
                RETURN (FALSE);
              END_IF;

              REPEAT k:=1 TO HIINDEX(pds_set);
                IF SIZEOF (QUERY (cdsr <*
                  USEDIN (pds_set[k], 'AUTOMOTIVE_DESIGN.' +
                  'CONTEXT_DEPENDENT_SHAPE_REPRESENTATION.' +
                  'REPRESENTED_PRODUCT_RELATION') |
                  (cdsr.representation_relation :=: srr_set[j]) )) > 0
                  THEN RETURN (FALSE);
                END_IF;
              END_REPEAT;
            END_IF;
          END_REPEAT;
        END_IF;
      END_IF;
    END_REPEAT;
  END_IF;

  -- If the shape of the component is not specified or there are no
  -- violations then return TRUE

  RETURN (TRUE);
END_FUNCTION; -- assembly_shape_is_defined

FUNCTION default_tolerance_table_cell_wr2(
    agg: AGGREGATE OF representation_item): BOOLEAN;
   BEGIN
     IF SIZEOF(agg) <= 5 THEN
       RETURN(TRUE);
     ELSE
       RETURN(FALSE);
     END_IF;
   END;
END_FUNCTION; -- default_tolerance_table_cell_wr2

FUNCTION default_tolerance_table_cell_wr3(
       agg: AGGREGATE OF representation_item): BOOLEAN;
 BEGIN
   IF (SIZEOF(QUERY ( i <* agg | 
         (('AUTOMOTIVE_DESIGN.MEASURE_REPRESENTATION_ITEM' 
         IN TYPEOF(i)) AND 
          (i\representation_item.name = 
         'significant number of digits')) 
         )) = 1) OR 
     ((SIZEOF(QUERY ( i <* agg | 
         (('AUTOMOTIVE_DESIGN.MEASURE_REPRESENTATION_ITEM' 
         IN TYPEOF(i)) AND 
          (i\representation_item.name = 'lower limit')) 
        )) = 1) AND 
      (SIZEOF( QUERY ( i <* agg | 
         (('AUTOMOTIVE_DESIGN.MEASURE_REPRESENTATION_ITEM' 
         IN TYPEOF(i)) AND 
          (i\representation_item.name = 'upper limit'))
        )) = 1))
   THEN
     RETURN(TRUE);
   ELSE
     RETURN(FALSE);
   END_IF;
 END;
END_FUNCTION; -- default_tolerance_table_cell_wr3

FUNCTION default_tolerance_table_cell_wr4(
    agg: AGGREGATE OF representation_item): BOOLEAN;
  BEGIN
   IF (SIZEOF(QUERY ( i <* agg | 
         (('AUTOMOTIVE_DESIGN.MEASURE_REPRESENTATION_ITEM' 
         IN TYPEOF(i)) AND 
          (i\representation_item.name = 
         'plus minus tolerance value')) 
        )) = 1) OR 
     ((SIZEOF(QUERY ( i <* agg | 
         (('AUTOMOTIVE_DESIGN.MEASURE_REPRESENTATION_ITEM' 
         IN TYPEOF(i)) AND 
          (i\representation_item.name = 'lower tolerance value')) 
        )) = 1) AND 
       (SIZEOF( QUERY ( i <* agg | 
         (('AUTOMOTIVE_DESIGN.MEASURE_REPRESENTATION_ITEM' 
         IN TYPEOF(i)) AND 
          (i\representation_item.name = 'upper tolerance value'))
        )) = 1))
   THEN
     RETURN(TRUE);
   ELSE
     RETURN(FALSE);
   END_IF;
  END;

END_FUNCTION; -- default_tolerance_table_cell_wr4

FUNCTION default_tolerance_table_cell_wr5(
     agg: AGGREGATE OF representation_item): BOOLEAN;
  BEGIN
    IF (SIZEOF(QUERY ( i <* agg | 
          ('AUTOMOTIVE_DESIGN.DESCRIPTIVE_REPRESENTATION_ITEM' 
          IN TYPEOF(i)) 
         )) <= 1) AND 
       (SIZEOF(QUERY ( i <* agg | 
          ('AUTOMOTIVE_DESIGN.DESCRIPTIVE_REPRESENTATION_ITEM' 
          IN TYPEOF(i)) 
         )) = 
        SIZEOF(QUERY ( i <* agg | 
          (('AUTOMOTIVE_DESIGN.DESCRIPTIVE_REPRESENTATION_ITEM' 
          IN TYPEOF(i)) AND 
           (i\representation_item.name = 'cell description'))) )) 
    THEN
      RETURN(TRUE);
    ELSE
      RETURN(FALSE);
    END_IF;
  END;
END_FUNCTION; -- default_tolerance_table_cell_wr5

FUNCTION get_diameter_for_round_hole
      ( rh : round_hole ) : REAL;

      LOCAL
      sa_set : SET OF shape_aspect;
      sar_set : SET OF shape_aspect_relationship;
      pdr_set : SET OF property_definition_representation;
      ri_set : SET OF representation_item;
      END_LOCAL;

 sa_set := get_shape_aspects(rh);
 REPEAT i:=1 to HIINDEX(sa_set);
  IF (sa_set[i].description = 'diameter occurrence')
   THEN
     sar_set := bag_to_set(USEDIN(sa_set[i],'AUTOMOTIVE_DESIGN.'+
                'SHAPE_ASPECT_RELATIONSHIP.RELATED_SHAPE_ASPECT'));
     REPEAT j:=1 to HIINDEX(sar_set);
      IF ((sar_set[j].name = 'diameter') AND
          (sar_set[j].description = 'profile usage') AND
          ('AUTOMOTIVE_DESIGN.SHAPE_DEFINING_RELATIONSHIP' IN TYPEOF
          (sar_set[j])) AND
          ('AUTOMOTIVE_DESIGN.CIRCULAR_CLOSED_PROFILE' IN TYPEOF
          (sar_set[j].relating_shape_aspect)))
       THEN
         pdr_set := get_shape_aspect_property_definition_representations
                    (sar_set[j].relating_shape_aspect);
         REPEAT k:=1 to HIINDEX(pdr_set);
          IF ('AUTOMOTIVE_DESIGN.SHAPE_REPRESENTATION_WITH_PARAMETERS' 
             IN TYPEOF(pdr_set[k].used_representation))
           THEN
            ri_set := pdr_set[k].used_representation.items;
            REPEAT l:=1 to HIINDEX(ri_set);
             IF (('AUTOMOTIVE_DESIGN.MEASURE_REPRESENTATION_ITEM' 
                IN TYPEOF(ri_set[l])) AND
                 ('AUTOMOTIVE_DESIGN.LENGTH_MEASURE_WITH_UNIT' 
                 IN TYPEOF(ri_set[l])))
              THEN
               RETURN (ri_set[l]\measure_with_unit.value_component);
             END_IF;
            END_REPEAT;
          END_IF;
         END_REPEAT;
      END_IF;
     END_REPEAT;
  END_IF;
 END_REPEAT;
 RETURN(?);
END_FUNCTION;





FUNCTION get_multi_language 
(x : multi_language_attribute_assignment) : label;
LOCAL
alas : BAG OF attribute_language_assignment := 
         USEDIN(x, 'AUTOMOTIVE_DESIGN.'+
               'ATTRIBUTE_LANGUAGE_ASSIGNMENT.ITEMS');
-- note: sizeof(alas) has to be 1 due to
-- multi_language_attribute_assignment.wr2
END_LOCAL;
IF SIZEOF(alas) > 0 THEN RETURN(alas[1].language);
END_IF;
RETURN (?);
END_FUNCTION;

FUNCTION get_round_holes_for_composite_hole
      ( sar_instance_set : SET OF shape_aspect_relationship )
       : SET OF round_hole;

      LOCAL
      rh_set : SET OF round_hole := [];
      pdr_set : SET OF property_definition_representation;
      pdr_set1 : SET OF property_definition_representation;
      ri_set : SET OF representation_item;
      END_LOCAL;

 REPEAT i:=1 to HIINDEX (sar_instance_set);
   IF (SIZEOF (['AUTOMOTIVE_DESIGN.INSTANCED_FEATURE' , 
             'AUTOMOTIVE_DESIGN.ROUND_HOLE'] * TYPEOF
   (sar_instance_set[i].related_shape_aspect)) >= 2)
   THEN
    rh_set := rh_set + sar_instance_set[i].related_shape_aspect;
  END_IF;
  IF ('AUTOMOTIVE_DESIGN.PLACED_FEATURE' IN TYPEOF
     (sar_instance_set[i]))
   THEN
     pdr_set := get_shape_aspect_property_definition_representations
                (sar_instance_set[i].related_shape_aspect);
     REPEAT j:=1 to HIINDEX(pdr_set);
      IF ((pdr_set[j].used_representation.name = 
         'feature definition placement') AND
          ('AUTOMOTIVE_DESIGN.SHAPE_REPRESENTATION' IN TYPEOF
          (pdr_set[j].used_representation)))
       THEN
         ri_set := pdr_set[j].used_representation.items;
         REPEAT k:=1 to HIINDEX(ri_set);
          IF (('AUTOMOTIVE_DESIGN.MAPPED_ITEM' IN TYPEOF
             (ri_set[k])) AND
              ('AUTOMOTIVE_DESIGN.'+
              'SHAPE_REPRESENTATION_WITH_PARAMETERS' IN
               TYPEOF(ri_set[k]\mapped_item.mapping_source.
                     mapped_representation)))
           THEN
             pdr_set1 := bag_to_set (USEDIN(ri_set[k]\mapped_item.mapping_source.mapped_representation ,
              'AUTOMOTIVE_DESIGN.PROPERTY_DEFINITION_REPRESENTATION.'+
              'USED_REPRESENTATION'));
             REPEAT l:=1 to HIINDEX(pdr_set1);
              IF ('AUTOMOTIVE_DESIGN.ROUND_HOLE' IN TYPEOF
                 (pdr_set1[l].definition.definition))
               THEN
                rh_set := rh_set + pdr_set1[l].definition.definition;
              END_IF;
             END_REPEAT;
          END_IF;
         END_REPEAT;
      END_IF;
     END_REPEAT;
  END_IF;
 END_REPEAT;

 RETURN (rh_set);
END_FUNCTION;



FUNCTION get_shape_aspect_property_definition_representations
      ( s_a_instance : shape_aspect )
       : SET OF property_definition_representation;

      LOCAL
      pd_set : SET OF property_definition := [];
      pdr_set : SET OF property_definition_representation := [];
      END_LOCAL;

 pd_set := bag_to_set (USEDIN (s_a_instance,
      'AUTOMOTIVE_DESIGN.PROPERTY_DEFINITION.DEFINITION'));
 IF (SIZEOF (pd_set) < 1 ) THEN RETURN (pdr_set);
 END_IF;

 REPEAT i:= 1 to HIINDEX (pd_set);
    pdr_set := pdr_set + (QUERY( pdr <* USEDIN (pd_set[i],
    'AUTOMOTIVE_DESIGN.PROPERTY_DEFINITION_REPRESENTATION.'+
    'DEFINITION') |
    'AUTOMOTIVE_DESIGN.SHAPE_DEFINITION_REPRESENTATION' 
    IN TYPEOF(pdr)));
 END_REPEAT;
 RETURN (pdr_set);
END_FUNCTION;

FUNCTION item_correlation 
         (items :   SET OF GENERIC;
          c_items:  SET OF STRING):LOGICAL;
 LOCAL
  c_types   : SET OF STRING := [];
  c_hit     : INTEGER := 0;
 END_LOCAL;
 
 REPEAT i:=1 TO HIINDEX(c_items);
  c_types := c_types + ['AUTOMOTIVE_DESIGN.' + c_items[i]];
 END_REPEAT;

 REPEAT i:=1 TO HIINDEX(items);
  IF (SIZEOF(c_types * TYPEOF(items[i])) = 1)
   THEN
    c_hit := c_hit + 1;
  END_IF;
 END_REPEAT;

 IF (SIZEOF(items) = c_hit)
  THEN
   RETURN(TRUE);
  ELSE
   RETURN(FALSE);
 END_IF;
 END_FUNCTION;

FUNCTION surface_condition_correlation (pd: property_definition; rep: representation): LOGICAL;
   CASE pd.name OF
      'visual appearance', 'tactile appearance', 'contact ratio', 'hardness', 'treatment result',
      'surface texture' : RETURN(pd.name = rep.name);
   OTHERWISE : RETURN(UNKNOWN);
   END_CASE;
END_FUNCTION;

 FUNCTION value_range_aggregate_rep_item
          (agg : AGGREGATE OF representation_item) : BOOLEAN;

  FUNCTION cri (agg : AGGREGATE OF representation_item) : BOOLEAN;
  BEGIN
   IF SIZEOF(QUERY( i1 <* agg |
      ('AUTOMOTIVE_DESIGN.MEASURE_REPRESENTATION_ITEM'
       IN TYPEOF (i1)) AND (SIZEOF ( QUERY (i2 <* agg |
       ('AUTOMOTIVE_DESIGN.MEASURE_REPRESENTATION_ITEM'
        IN TYPEOF (i2)) AND (i1 :<>: i2) AND 
        (i1\measure_with_unit.unit_component :=: i2\
         measure_with_unit.unit_component) ) ) = 1 ))) = 2 
   THEN
     RETURN (TRUE);
    ELSE
     RETURN (FALSE);
   END_IF;
  END;
 END_FUNCTION;

  BEGIN
   IF ((SIZEOF(agg) = 3) AND
       (SIZEOF(QUERY(i <* agg | 
               ('AUTOMOTIVE_DESIGN.COMPOUND_REPRESENTATION_ITEM' IN
                 TYPEOF(i)) AND
               cri(i\compound_representation_item.item_element)
             )) = 1))
    THEN
     RETURN (TRUE);
    ELSE
     RETURN (FALSE);
   END_IF;
  END;
 END_FUNCTION;

FUNCTION value_range_wr1(
     agg: AGGREGATE OF representation_item): BOOLEAN;
  BEGIN
    IF (SIZEOF(agg) = 2) AND ((SIZEOF(QUERY ( i1 <* agg | (
    'AUTOMOTIVE_DESIGN.MEASURE_REPRESENTATION_ITEM' IN TYPEOF
    (i1)) ))
    = 2) OR (SIZEOF(QUERY ( i2 <* agg | (
    'AUTOMOTIVE_DESIGN.VALUE_REPRESENTATION_ITEM' IN TYPEOF
    (i2)) ))
    = 2)) THEN
      RETURN(TRUE);
    ELSE
      RETURN(FALSE);
    END_IF;
  END;

END_FUNCTION; -- value_range_wr1

FUNCTION value_range_wr2(
      agg: AGGREGATE OF representation_item): BOOLEAN;
  BEGIN
    IF (SIZEOF(QUERY ( i <* agg | (i.name = 'upper limit')
        )) = 1)
    AND (SIZEOF(QUERY ( i <* agg | (i.name = 'lower limit')
         )) = 1)
     THEN
      RETURN(TRUE);
    ELSE
      RETURN(FALSE);
    END_IF;
  END;

END_FUNCTION; -- value_range_wr2

FUNCTION value_range_wr3(
    agg: AGGREGATE OF representation_item): BOOLEAN;
  BEGIN
    IF (SIZEOF(QUERY ( i <* agg | (
    'AUTOMOTIVE_DESIGN.MEASURE_REPRESENTATION_ITEM' IN 
    TYPEOF(i)) ))
    <> 2) OR (SIZEOF(QUERY ( i1 <* agg | 
     ('AUTOMOTIVE_DESIGN.MEASURE_REPRESENTATION_ITEM' 
     IN TYPEOF (i1))
     AND
     (SIZEOF(QUERY ( i2 <* agg
     | ((i1\measure_with_unit.unit_component
    :=: i2\measure_with_unit.unit_component) OR
     (i1\measure_with_unit.unit_component :=:
     i2\measure_with_unit.unit_component)) ))
    = 2) )) = 2) THEN
      RETURN(TRUE);
    ELSE
      RETURN(FALSE);
    END_IF;
  END;

END_FUNCTION; -- value_range_wr3

END_SCHEMA;  -- automotive_design