SCHEMA step_ship_schema; (* Constructed by merging: * - AP215 (wg3n1232_ap215.exp) * - AP216 (wg3n1134_ap216.exp) * - AP218 (wg3n1342_ap218.exp) * - AP203 (wg3n916_ap203.exp) *) CONSTANT dummy_gri : geometric_representation_item := representation_item('') || geometric_representation_item(); dummy_tri : topological_representation_item := representation_item('') || topological_representation_item(); END_CONSTANT; -- ONLY IN AP215/AP216 TYPE action_item = SELECT (action_request_solution, -- Common document, -- AP215 only executed_action, -- Common group, -- AP215 only product, -- Common product_definition, -- Common product_definition_relationship, -- Common product_definition_shape, -- Common product_related_product_category, -- Common property_definition); -- Common END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE action_request_item = SELECT (action, -- Common executed_action, -- Common group, -- AP218 only product, -- AP218 only product_definition, -- AP218 only product_definition_relationship, -- AP218 only product_definition_shape, -- AP218 only property_definition); -- AP218 only END_TYPE; TYPE ahead_or_behind = ENUMERATION OF (exact, ahead, behind); END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE amount_of_substance_measure = REAL; END_TYPE; TYPE approval_item = SELECT (certification, -- AP203 only change, -- AP203 only change_request, -- AP203 only configuration_effectivity, -- AP203 only configuration_item, -- AP203 only contract, -- AP203 only product_definition, -- Common product_definition_formation, -- AP203 only product_definition_shape, -- AP215/AP216/AP218 only product_related_product_category, -- AP215/AP216 only property_definition, -- AP215/AP216/AP218 only security_classification, -- AP203 only start_request, -- AP203 only start_work); -- AP203 only END_TYPE; TYPE area_measure = REAL; END_TYPE; -- ONLY IN AP216/AP218 TYPE attribute_type = SELECT (label, text); END_TYPE; TYPE axis2_placement = SELECT (axis2_placement_2d, axis2_placement_3d); END_TYPE; TYPE b_spline_curve_form = ENUMERATION OF (elliptic_arc, polyline_form, parabolic_arc, circular_arc, unspecified, hyperbolic_arc); END_TYPE; TYPE b_spline_surface_form = ENUMERATION OF (surf_of_linear_extrusion, plane_surf, generalised_cone, toroidal_surf, conical_surf, spherical_surf, unspecified, ruled_surf, surf_of_revolution, cylindrical_surf, quadric_surf); END_TYPE; -- ONLY IN AP203/AP216/AP218 TYPE boolean_operand = SELECT (solid_model); END_TYPE; -- ONLY IN AP216/AP218 TYPE celsius_temperature_measure = REAL; END_TYPE; -- ONLY IN AP203 TYPE certification_item = SELECT (supplied_part_relationship); END_TYPE; -- ONLY IN AP203 TYPE change_request_item = SELECT (product_definition_formation); END_TYPE; -- ONLY IN AP218 TYPE characterized_action_definition = SELECT (action, action_method); END_TYPE; TYPE characterized_definition = SELECT (characterized_object, -- AP215/AP216/AP218 only characterized_product_definition, -- Common shape_definition); -- Common END_TYPE; TYPE characterized_product_definition = SELECT (product_definition, product_definition_relationship); END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE classification_item = SELECT (action, -- Common action_request_solution, -- Common applied_action_request_assignment, -- AP215/AP216 only approval, -- AP215/AP216 only axis2_placement_3d, -- AP216 only compound_representation_item, -- Common document, -- AP215/AP216 only document_reference, -- AP216 only edge_curve, -- AP216 only executed_action, -- AP215/AP216 only external_source, -- AP215/AP216 only group, -- Common identification_assignment_relationship, -- AP215/AP216 only measure_with_unit, -- AP216 only product, -- Common product_definition, -- Common product_definition_relationship, -- Common product_definition_shape, -- Common product_definition_with_associated_documents, -- AP218 only product_related_product_category, -- Common property_definition, -- Common property_definition_relationship, -- AP218 only property_definition_representation, -- AP215/AP216 only representation, -- Common representation_relationship, -- AP216 only shape_aspect, -- AP215/AP218 only shape_aspect_relationship, -- AP218 only shape_representation, -- AP216 only versioned_action_request, -- Common vertex_point); -- AP216 only END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE compound_item_definition = SELECT (list_representation_item, set_representation_item); END_TYPE; -- ONLY IN AP218 TYPE configuration_design_item = SELECT (product_definition, product_definition_formation); END_TYPE; -- ONLY IN AP203/AP215/AP218 TYPE context_dependent_measure = REAL; END_TYPE; -- ONLY IN AP203 TYPE contract_item = SELECT (product_definition_formation); END_TYPE; TYPE count_measure = NUMBER; END_TYPE; TYPE curve_on_surface = SELECT (pcurve, surface_curve, composite_curve_on_surface); END_TYPE; TYPE date_and_time_item = SELECT (action, -- AP215/AP216/AP218 only action_request_solution, -- AP215/AP216/AP218 only approval_person_organization, -- AP203 only certification, -- AP203 only change, -- AP203 only change_request, -- AP203 only contract, -- AP203 only executed_action, -- AP215/AP216 only product_definition, -- Common property_definition, -- AP215 only property_definition_representation, -- AP215 only security_classification, -- AP203 only start_request, -- AP203 only start_work, -- AP203 only versioned_action_request); -- AP215/AP216/AP218 only END_TYPE; -- ONLY IN AP216/AP218 TYPE date_time_or_event_occurrence = SELECT (date_time_select); END_TYPE; TYPE date_time_select = SELECT (date, local_time, date_and_time); END_TYPE; TYPE day_in_month_number = INTEGER; WHERE wr1: (1 <= SELF) AND (SELF <= 31); END_TYPE; TYPE day_in_week_number = INTEGER; WHERE wr1: (1 <= SELF) AND (SELF <= 7); END_TYPE; TYPE day_in_year_number = INTEGER; WHERE wr1: (1 <= SELF) AND (SELF <= 366); END_TYPE; -- ONLY IN AP216/AP218 TYPE derived_property_select = SELECT (property_definition); END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE description_attribute_select = SELECT (action_request_solution, -- Common application_context, -- Common approval_role, -- Common date_time_role, -- Common effectivity, -- AP215/AP216 only external_source, -- Common organization_role, -- Common person_and_organization, -- Common person_and_organization_role, -- Common person_role, -- Common property_definition_representation, -- Common representation); -- Common END_TYPE; -- ONLY IN AP203 TYPE descriptive_measure = STRING; END_TYPE; TYPE dimension_count = INTEGER; WHERE wr1: SELF > 0; END_TYPE; TYPE document_reference_item = SELECT (action, -- AP215/AP216 only group, -- AP218 only product, -- AP215/AP216 only product_definition, -- AP203/AP215/AP216 only property_definition, -- AP215/AP216/AP218 only shape_aspect); -- AP203 only END_TYPE; -- ONLY IN AP215/AP216 TYPE effectivity_item = SELECT (product_definition, product_definition_shape, product_related_product_category, property_definition); END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE electric_current_measure = REAL; END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE external_identification_item = SELECT (action, -- AP215/AP216 only document, -- Common document_reference, -- AP218 only product, -- Common product_definition, -- Common product_definition_relationship, -- AP216 only product_definition_shape, -- AP218 only property_definition, -- Common shape_aspect); -- AP215/AP218 only END_TYPE; TYPE founded_item_select = SELECT (founded_item, representation_item); END_TYPE; -- ONLY IN AP203/AP216/AP218 TYPE geometric_set_select = SELECT (point, curve, surface); END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE group_item = SELECT (applied_external_identification_assignment, -- AP215 only approval, -- Common document, -- AP215 only group, -- AP215 only identification_assignment_relationship, -- AP215/AP216 only product, -- AP215 only product_definition, -- Common product_definition_relationship, -- Common product_definition_shape, -- AP215/AP218 only product_definition_with_associated_documents, -- AP218 only product_related_product_category, -- AP215 only property_definition, -- AP215 only representation, -- AP218 only shape_aspect); -- AP218 only END_TYPE; TYPE hour_in_day = INTEGER; WHERE wr1: (0 <= SELF) AND (SELF < 24); END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE id_attribute_select = SELECT (action, -- Common address, -- Common application_context, -- Common group, -- Common organizational_project, -- Common product_category, -- Common property_definition, -- Common representation, -- Common shape_aspect, -- Common shape_aspect_relationship); -- AP218 only END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE identification_item = SELECT (action, -- AP215/AP216 only action_request_solution, -- Common compound_representation_item, -- AP216 only document, -- AP215/AP216 only executed_action, -- Common externally_defined_class, -- AP218 only externally_defined_general_property, -- AP218 only group, -- Common product, -- Common product_definition, -- Common product_definition_relationship, -- Common product_definition_shape, -- Common product_related_product_category, -- Common property_definition, -- Common property_definition_relationship, -- AP218 only representation, -- AP218 only shape_aspect, -- AP218 only shape_aspect_relationship, -- AP218 only versioned_action_request); -- Common END_TYPE; TYPE identifier = STRING; END_TYPE; TYPE knot_type = ENUMERATION OF (uniform_knots, quasi_uniform_knots, piecewise_bezier_knots, unspecified); END_TYPE; TYPE label = STRING; END_TYPE; TYPE length_measure = REAL; END_TYPE; TYPE list_of_reversible_topology_item = LIST [0:?] OF reversible_topology_item; END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE list_representation_item = LIST [1:?] OF representation_item; END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE luminous_intensity_measure = REAL; END_TYPE; TYPE mass_measure = REAL; END_TYPE; TYPE measure_value = SELECT (amount_of_substance_measure, -- AP215/AP216/AP218 only area_measure, -- Common celsius_temperature_measure, -- AP216/AP218 only context_dependent_measure, -- AP203/AP215/AP218 only count_measure, -- Common descriptive_measure, -- AP203 only electric_current_measure, -- AP215/AP216/AP218 only length_measure, -- Common luminous_intensity_measure, -- AP215/AP216/AP218 only mass_measure, -- Common parameter_value, -- Common plane_angle_measure, -- Common positive_length_measure, -- Common positive_plane_angle_measure, -- Common ratio_measure, -- AP215/AP216/AP218 only solid_angle_measure, -- Common thermodynamic_temperature_measure, -- AP215/AP216/AP218 only time_measure, -- AP215/AP216/AP218 only volume_measure); -- Common END_TYPE; TYPE minute_in_hour = INTEGER; WHERE wr1: (0 <= SELF) AND (SELF <= 59); END_TYPE; TYPE month_in_year_number = INTEGER; WHERE wr1: (1 <= SELF) AND (SELF <= 12); END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE name_attribute_select = SELECT (action_request_solution, -- Common address, -- Common derived_unit, -- Common effectivity, -- AP215/AP216 only person_and_organization, -- Common product_definition, -- Common property_definition_representation); -- Common END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE organization_item = SELECT (document, -- Common externally_defined_class, -- AP218 only known_source, -- AP218 only product_definition, -- Common property_definition); -- Common END_TYPE; TYPE parameter_value = REAL; END_TYPE; TYPE pcurve_or_surface = SELECT (pcurve, surface); END_TYPE; TYPE person_and_organization_item = SELECT (action, -- AP215/AP216 only action_request_solution, -- AP215/AP216/AP218 only change, -- AP203 only change_request, -- AP203 only configuration_item, -- AP203 only contract, -- AP203 only document, -- AP215/AP216/AP218 only executed_action, -- AP215/AP216/AP218 only product, -- AP203 only product_definition, -- AP203 only product_definition_formation, -- AP203 only security_classification, -- AP203 only start_request, -- AP203 only start_work, -- AP203 only versioned_action_request); -- AP215/AP216/AP218 only END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE person_item = SELECT (action_request_solution, -- AP218 only document, -- Common executed_action, -- AP218 only versioned_action_request); -- AP218 only END_TYPE; TYPE person_organization_select = SELECT (person, organization, person_and_organization); END_TYPE; TYPE plane_angle_measure = REAL; END_TYPE; TYPE positive_length_measure = length_measure; WHERE wr1: SELF > 0; END_TYPE; TYPE positive_plane_angle_measure = plane_angle_measure; WHERE wr1: SELF > 0; END_TYPE; TYPE preferred_surface_curve_representation = ENUMERATION OF (pcurve_s2, pcurve_s1, curve_3d); END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE product_or_formation_or_definition = SELECT (product, product_definition_formation, product_definition); END_TYPE; -- ONLY IN AP218 TYPE property_or_shape_select = SELECT (property_definition, shape_definition); END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE ratio_measure = REAL; END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE represented_definition = SELECT (general_property, -- AP218 only property_definition, -- Common property_definition_relationship, -- Common shape_aspect, -- Common shape_aspect_relationship); -- AP218 only END_TYPE; TYPE reversible_topology = SELECT (reversible_topology_item, list_of_reversible_topology_item, set_of_reversible_topology_item); END_TYPE; TYPE reversible_topology_item = SELECT (edge, path, face, face_bound, closed_shell, open_shell); END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE role_select = SELECT (action_assignment, -- AP216 only action_request_assignment, -- Common approval_assignment, -- Common approval_date_time, -- Common document_reference, -- Common effectivity_assignment, -- AP215/AP216 only group_assignment); -- Common END_TYPE; TYPE second_in_minute = REAL; WHERE wr1: (0 <= SELF) AND (SELF <= 60); END_TYPE; -- ONLY IN AP203 TYPE security_classification_item = SELECT (product_definition_formation, assembly_component_usage); END_TYPE; TYPE set_of_reversible_topology_item = SET [0:?] OF reversible_topology_item; END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE set_representation_item = SET [1:?] OF representation_item; END_TYPE; TYPE shape_definition = SELECT (product_definition_shape, -- Common shape_aspect, -- Common shape_aspect_relationship); -- AP203/AP218 only END_TYPE; TYPE shell = SELECT (closed_shell, -- Common open_shell, -- Common vertex_shell, -- AP203 only wire_shell); -- AP203 only END_TYPE; TYPE si_prefix = ENUMERATION OF (exa, pico, mega, femto, atto, centi, nano, hecto, micro, tera, giga, milli, peta, deci, kilo, deca); END_TYPE; TYPE si_unit_name = ENUMERATION OF (hertz, degree_celsius, siemens, sievert, lux, watt, ohm, second, becquerel, pascal, henry, tesla, volt, joule, kelvin, ampere, gram, steradian, mole, lumen, gray, candela, farad, radian, newton, metre, weber, coulomb); END_TYPE; TYPE solid_angle_measure = REAL; END_TYPE; -- ONLY IN AP203 TYPE source = ENUMERATION OF (made, bought, not_known); END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE source_item = SELECT (identifier); END_TYPE; -- ONLY IN AP203 TYPE start_request_item = SELECT (product_definition_formation); END_TYPE; -- ONLY IN AP203/AP216/AP218 TYPE supported_item = SELECT (action, -- Common action_directive, -- AP203 only action_method); -- Common END_TYPE; -- ONLY IN AP216/AP218 TYPE surface_boundary = SELECT (degenerate_pcurve); END_TYPE; TYPE surface_model = SELECT (face_based_surface_model, -- AP215/AP216/AP218 only shell_based_surface_model); -- AP203 only END_TYPE; TYPE text = STRING; END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE thermodynamic_temperature_measure = REAL; END_TYPE; -- ONLY IN AP215/AP216/AP218 TYPE time_measure = REAL; END_TYPE; TYPE transformation = SELECT (item_defined_transformation, functionally_defined_transformation); END_TYPE; TYPE transition_code = ENUMERATION OF (discontinuous, cont_same_gradient_same_curvature, cont_same_gradient, continuous); END_TYPE; -- ONLY IN AP203/AP218 TYPE trimming_preference = ENUMERATION OF (cartesian, parameter, unspecified); END_TYPE; -- ONLY IN AP203/AP216/AP218 TYPE trimming_select = SELECT (cartesian_point, parameter_value); END_TYPE; TYPE unit = SELECT (derived_unit, -- AP215/AP216/AP218 only named_unit); -- Common END_TYPE; TYPE vector_or_direction = SELECT (vector, direction); END_TYPE; TYPE volume_measure = REAL; END_TYPE; TYPE week_in_year_number = INTEGER; WHERE wr1: (1 <= SELF) AND (SELF <= 53); END_TYPE; -- ONLY IN AP203/AP216/AP218 TYPE wireframe_model = SELECT (edge_based_wireframe_model, -- Common shell_based_wireframe_model); -- AP203 only END_TYPE; -- ONLY IN AP203 TYPE work_item = SELECT (product_definition_formation); END_TYPE; TYPE year_number = INTEGER; END_TYPE; ENTITY action; name : label; description : OPTIONAL text; chosen_method : action_method; DERIVE id : identifier := get_id_value(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1; END_ENTITY; -- ONLY IN AP203/AP215/AP216 ENTITY action_assignment ABSTRACT SUPERTYPE; assigned_action : action; DERIVE role : object_role := get_role(SELF); WHERE wr1: (SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1); END_ENTITY; -- ONLY IN AP203 ENTITY action_directive; name : label; description : text; analysis : text; comment : text; requests : SET [1:?] OF versioned_action_request; END_ENTITY; ENTITY action_method; name : label; description : OPTIONAL text; consequence : text; purpose : text; END_ENTITY; -- ONLY IN AP216 ENTITY action_relationship; name : label; description : OPTIONAL text; relating_action : action; related_action : action; END_ENTITY; ENTITY action_request_assignment ABSTRACT SUPERTYPE; assigned_action_request : versioned_action_request; DERIVE role : object_role := get_role(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1; END_ENTITY; ENTITY action_request_solution; method : action_method; request : versioned_action_request; DERIVE description : text := get_description_value(SELF); name : label := get_name_value(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1; wr2: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1; END_ENTITY; -- ONLY IN AP203 ENTITY action_request_status; status : label; assigned_request : versioned_action_request; END_ENTITY; -- ONLY IN AP203 ENTITY action_status; status : label; assigned_action : executed_action; END_ENTITY; ENTITY address; internal_location : OPTIONAL label; street_number : OPTIONAL label; street : OPTIONAL label; postal_box : OPTIONAL label; town : OPTIONAL label; region : OPTIONAL label; postal_code : OPTIONAL label; country : OPTIONAL label; facsimile_number : OPTIONAL label; telephone_number : OPTIONAL label; electronic_mail_address : OPTIONAL label; telex_number : OPTIONAL label; DERIVE name : label := get_name_value(SELF); url : identifier := get_id_value(SELF); WHERE wr1: ((((((((((EXISTS(internal_location) OR EXISTS(street_number)) OR EXISTS(street)) OR EXISTS(postal_box)) OR EXISTS(town)) OR EXISTS(region)) OR EXISTS(postal_code)) OR EXISTS(country)) OR EXISTS(facsimile_number)) OR EXISTS(telephone_number)) OR EXISTS(electronic_mail_address)) OR EXISTS(telex_number); END_ENTITY; -- ONLY IN AP203/AP218 ENTITY advanced_brep_shape_representation SUBTYPE OF (shape_representation); WHERE wr1: (SIZEOF(QUERY ( it <* SELF.items | (NOT (SIZEOF([ 'STEP_SHIP_SCHEMA.MANIFOLD_SOLID_BREP', 'STEP_SHIP_SCHEMA.FACETED_BREP', 'STEP_SHIP_SCHEMA.MAPPED_ITEM', 'STEP_SHIP_SCHEMA.AXIS2_PLACEMENT_3D'] * TYPEOF(it)) = 1)) )) = 0); wr2: (SIZEOF(QUERY ( it <* SELF.items | (SIZEOF([ 'STEP_SHIP_SCHEMA.MANIFOLD_SOLID_BREP', 'STEP_SHIP_SCHEMA.MAPPED_ITEM'] * TYPEOF(it)) = 1) )) > 0); wr3: (SIZEOF(QUERY ( msb <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.MANIFOLD_SOLID_BREP' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( csh <* msb_shells(msb) | (NOT ( SIZEOF(QUERY ( fcs <* csh\connected_face_set.cfs_faces | ( NOT ('STEP_SHIP_SCHEMA.ADVANCED_FACE' IN TYPEOF(fcs))) )) = 0)) )) = 0)) )) = 0); wr4: (SIZEOF(QUERY ( msb <* QUERY ( it <* items | ( 'STEP_SHIP_SCHEMA.MANIFOLD_SOLID_BREP' IN TYPEOF(it)) ) | ('STEP_SHIP_SCHEMA.ORIENTED_CLOSED_SHELL' IN TYPEOF(msb\manifold_solid_brep.outer)) )) = 0); wr5: (SIZEOF(QUERY ( brv <* QUERY ( it <* items | ( 'STEP_SHIP_SCHEMA.BREP_WITH_VOIDS' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( csh <* brv\brep_with_voids.voids | csh\ oriented_closed_shell.orientation )) = 0)) )) = 0); wr6: (SIZEOF(QUERY ( mi <* QUERY ( it <* items | ( 'STEP_SHIP_SCHEMA.MAPPED_ITEM' IN TYPEOF(it)) ) | ( NOT ( 'STEP_SHIP_SCHEMA.ADVANCED_BREP_SHAPE_REPRESENTATION' IN TYPEOF(mi\mapped_item.mapping_source. mapped_representation))) )) = 0); END_ENTITY; ENTITY advanced_face SUBTYPE OF (face_surface); WHERE wr1 : SIZEOF(['STEP_SHIP_SCHEMA.ELEMENTARY_SURFACE', 'STEP_SHIP_SCHEMA.B_SPLINE_SURFACE', 'STEP_SHIP_SCHEMA.SWEPT_SURFACE'] * TYPEOF( face_geometry)) = 1; wr2 : SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* bounds | ( 'STEP_SHIP_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)) ) | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds.bound\path. edge_list | (NOT ('STEP_SHIP_SCHEMA.EDGE_CURVE' IN TYPEOF(oe\oriented_edge.edge_element))) )) = 0)) )) = 0; wr3 : SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* bounds | ( 'STEP_SHIP_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)) ) | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds.bound\path. edge_list | (NOT (SIZEOF(['STEP_SHIP_SCHEMA.LINE', 'STEP_SHIP_SCHEMA.CONIC', 'STEP_SHIP_SCHEMA.POLYLINE', 'STEP_SHIP_SCHEMA.SURFACE_CURVE', 'STEP_SHIP_SCHEMA.B_SPLINE_CURVE'] * TYPEOF(oe. edge_element\edge_curve.edge_geometry)) = 1)) )) = 0)) )) = 0; wr4 : SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* bounds | ( 'STEP_SHIP_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)) ) | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds.bound\path. edge_list | (NOT ((('STEP_SHIP_SCHEMA.VERTEX_POINT' IN TYPEOF(oe\edge.edge_start)) AND ( 'STEP_SHIP_SCHEMA.CARTESIAN_POINT' IN TYPEOF(oe\ edge.edge_start\vertex_point.vertex_geometry))) AND (( 'STEP_SHIP_SCHEMA.VERTEX_POINT' IN TYPEOF(oe\edge. edge_end)) AND ('STEP_SHIP_SCHEMA.CARTESIAN_POINT' IN TYPEOF(oe\edge.edge_end\vertex_point.vertex_geometry))))) )) = 0)) )) = 0; wr5 : SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* bounds | ( 'STEP_SHIP_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)) ) | ('STEP_SHIP_SCHEMA.ORIENTED_PATH' IN TYPEOF( elp_fbnds.bound)) )) = 0; wr6 : (NOT ('STEP_SHIP_SCHEMA.SWEPT_SURFACE' IN TYPEOF( face_geometry))) OR (SIZEOF([ 'STEP_SHIP_SCHEMA.LINE', 'STEP_SHIP_SCHEMA.CONIC', 'STEP_SHIP_SCHEMA.POLYLINE', 'STEP_SHIP_SCHEMA.B_SPLINE_CURVE'] * TYPEOF( face_geometry\swept_surface.swept_curve)) = 1); wr7 : SIZEOF(QUERY ( vlp_fbnds <* QUERY ( bnds <* bounds | ( 'STEP_SHIP_SCHEMA.VERTEX_LOOP' IN TYPEOF(bnds.bound)) ) | (NOT (('STEP_SHIP_SCHEMA.VERTEX_POINT' IN TYPEOF(vlp_fbnds\face_bound.bound\vertex_loop.loop_vertex)) AND ('STEP_SHIP_SCHEMA.CARTESIAN_POINT' IN TYPEOF( vlp_fbnds\face_bound.bound\vertex_loop.loop_vertex\ vertex_point.vertex_geometry)))) )) = 0; wr8 : SIZEOF(QUERY ( bnd <* bounds | (NOT (SIZEOF([ 'STEP_SHIP_SCHEMA.EDGE_LOOP', 'STEP_SHIP_SCHEMA.VERTEX_LOOP'] * TYPEOF(bnd.bound)) = 1)) )) = 0; wr9 : SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* bounds | ( 'STEP_SHIP_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)) ) | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds.bound\path. edge_list | (('STEP_SHIP_SCHEMA.SURFACE_CURVE' IN TYPEOF(oe\oriented_edge.edge_element\edge_curve. edge_geometry)) AND (NOT (SIZEOF(QUERY ( sc_ag <* oe. edge_element\edge_curve.edge_geometry\surface_curve. associated_geometry | (NOT ( 'STEP_SHIP_SCHEMA.PCURVE' IN TYPEOF(sc_ag))) )) = 0))) )) = 0)) )) = 0; wr10: ((NOT ('STEP_SHIP_SCHEMA.SWEPT_SURFACE' IN TYPEOF( face_geometry))) OR ((NOT ( 'STEP_SHIP_SCHEMA.POLYLINE' IN TYPEOF(face_geometry \swept_surface.swept_curve))) OR (SIZEOF(face_geometry\ swept_surface.swept_curve\polyline.points) >= 3))) AND ( SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* bounds | ( 'STEP_SHIP_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)) ) | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds.bound\path. edge_list | (('STEP_SHIP_SCHEMA.POLYLINE' IN TYPEOF(oe\oriented_edge.edge_element\edge_curve. edge_geometry)) AND (NOT (SIZEOF(oe\oriented_edge. edge_element\edge_curve.edge_geometry\polyline.points) >= 3))) )) = 0)) )) = 0); END_ENTITY; -- ONLY IN AP203 ENTITY alternate_product_relationship; name : label; definition : text; alternate : product; base : product; basis : text; UNIQUE ur1 : alternate, base; WHERE wr1: (alternate :<>: base); END_ENTITY; -- ONLY IN AP216 ENTITY amount_of_substance_unit SUBTYPE OF (named_unit); WHERE wr1: ((SELF\named_unit.dimensions.length_exponent = 0) AND (SELF\ named_unit.dimensions.mass_exponent = 0) AND (SELF\ named_unit.dimensions.time_exponent = 0) AND (SELF\ named_unit.dimensions.electric_current_exponent = 0) AND ( SELF\named_unit.dimensions. thermodynamic_temperature_exponent = 0) AND (SELF\named_unit .dimensions.amount_of_substance_exponent = 1) AND (SELF\ named_unit.dimensions.luminous_intensity_exponent = 0)); END_ENTITY; ENTITY application_context; application : label; DERIVE description : text := get_description_value(SELF); id : identifier := get_id_value(SELF); INVERSE context_elements : SET [1:?] OF application_context_element FOR frame_of_reference; WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1; wr2: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1; END_ENTITY; ENTITY application_context_element SUPERTYPE OF (ONEOF (product_context,product_definition_context)); name : label; frame_of_reference : application_context; END_ENTITY; ENTITY application_protocol_definition; status : label; application_interpreted_model_schema_name : label; application_protocol_year : year_number; application : application_context; END_ENTITY; -- ONLY IN AP215/AP216 ENTITY applied_action_assignment SUBTYPE OF (action_assignment); items : SET [1:?] OF action_item; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY applied_action_request_assignment SUBTYPE OF (action_request_assignment); items : SET [1:?] OF action_request_item; END_ENTITY; ENTITY applied_approval_assignment SUBTYPE OF (approval_assignment); items : SET [1:?] OF approval_item; END_ENTITY; -- ONLY IN AP203 ENTITY applied_certification_assignment SUBTYPE OF (certification_assignment); items : SET [1:?] OF certification_item; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY applied_classification_assignment SUBTYPE OF (classification_assignment); items : SET [1:?] OF classification_item; END_ENTITY; -- ONLY IN AP203 ENTITY applied_contract_assignment SUBTYPE OF (contract_assignment); items : SET [1:?] OF contract_item; END_ENTITY; ENTITY applied_date_and_time_assignment SUBTYPE OF (date_and_time_assignment); items : SET [1:?] OF date_and_time_item; END_ENTITY; ENTITY applied_document_reference SUBTYPE OF (document_reference); items : SET [1:?] OF document_reference_item; END_ENTITY; -- ONLY IN AP215/AP216 ENTITY applied_effectivity_assignment SUBTYPE OF (effectivity_assignment); items : SET [1:?] OF effectivity_item; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY applied_external_identification_assignment SUBTYPE OF (external_identification_assignment); items : SET [1:?] OF external_identification_item; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY applied_group_assignment SUBTYPE OF (group_assignment); items : SET [1:?] OF group_item; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY applied_identification_assignment SUBTYPE OF (identification_assignment); items : SET [1:?] OF identification_item; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY applied_organization_assignment SUBTYPE OF (organization_assignment); items : SET [1:?] OF organization_item; END_ENTITY; ENTITY applied_person_and_organization_assignment SUBTYPE OF (person_and_organization_assignment); items : SET [1:?] OF person_and_organization_item; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY applied_person_assignment SUBTYPE OF (person_assignment); items : SET [1:?] OF person_item; END_ENTITY; -- ONLY IN AP203 ENTITY applied_security_classification_assignment SUBTYPE OF (security_classification_assignment); items : SET [1:?] OF security_classification_item; END_ENTITY; ENTITY approval; status : approval_status; level : label; END_ENTITY; ENTITY approval_assignment ABSTRACT SUPERTYPE; assigned_approval : approval; DERIVE role : object_role := get_role(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1; END_ENTITY; ENTITY approval_date_time; date_time : date_time_select; dated_approval : approval; DERIVE role : object_role := get_role(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1; END_ENTITY; ENTITY approval_person_organization; person_organization : person_organization_select; authorized_approval : approval; role : approval_role; END_ENTITY; -- ONLY IN AP203 ENTITY approval_relationship; name : label; description : text; relating_approval : approval; related_approval : approval; END_ENTITY; ENTITY approval_role; role : label; DERIVE description : text := get_description_value(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1; END_ENTITY; ENTITY approval_status; name : label; END_ENTITY; -- ONLY IN AP203 ENTITY area_measure_with_unit SUBTYPE OF (measure_with_unit); WHERE wr1: ('STEP_SHIP_SCHEMA.AREA_UNIT' IN TYPEOF(SELF\ measure_with_unit.unit_component)); END_ENTITY; -- ONLY IN AP203 ENTITY area_unit SUBTYPE OF (named_unit); WHERE wr1: ((SELF\named_unit.dimensions.length_exponent = 2) AND (SELF\ named_unit.dimensions.mass_exponent = 0) AND (SELF\ named_unit.dimensions.time_exponent = 0) AND (SELF\ named_unit.dimensions.electric_current_exponent = 0) AND ( SELF\named_unit.dimensions. thermodynamic_temperature_exponent = 0) AND (SELF\named_unit .dimensions.amount_of_substance_exponent = 0) AND (SELF\ named_unit.dimensions.luminous_intensity_exponent = 0)); END_ENTITY; -- ONLY IN AP203 ENTITY assembly_component_usage SUPERTYPE OF (ONEOF (next_assembly_usage_occurrence, specified_higher_usage_occurrence,promissory_usage_occurrence)) SUBTYPE OF (product_definition_usage); reference_designator : OPTIONAL identifier; END_ENTITY; -- ONLY IN AP203 ENTITY assembly_component_usage_substitute; name : label; definition : text; base : assembly_component_usage; substitute : assembly_component_usage; UNIQUE ur1 : base, substitute; WHERE wr1: (base.relating_product_definition :=: substitute. relating_product_definition); wr2: (base :<>: substitute); END_ENTITY; ENTITY axis1_placement SUBTYPE OF (placement); axis : OPTIONAL direction; DERIVE z : direction := NVL(normalise(axis),dummy_gri || direction([0,0,1])); WHERE wr1: SELF\geometric_representation_item.dim = 3; END_ENTITY; ENTITY axis2_placement_2d SUBTYPE OF (placement); ref_direction : OPTIONAL direction; DERIVE p : LIST [2:2] OF direction := build_2axes(ref_direction); WHERE wr1: SELF\geometric_representation_item.dim = 2; END_ENTITY; ENTITY axis2_placement_3d SUBTYPE OF (placement); axis : OPTIONAL direction; ref_direction : OPTIONAL direction; DERIVE p : LIST [3:3] OF direction := build_axes(axis,ref_direction); WHERE wr1: SELF\placement.location.dim = 3; wr2: (NOT EXISTS(axis)) OR (axis.dim = 3); wr3: (NOT EXISTS(ref_direction)) OR (ref_direction.dim = 3); wr4: ((NOT EXISTS(axis)) OR (NOT EXISTS(ref_direction))) OR ( cross_product(axis,ref_direction).magnitude > 0); END_ENTITY; ENTITY b_spline_curve SUPERTYPE OF (ONEOF (uniform_curve,b_spline_curve_with_knots, quasi_uniform_curve,bezier_curve) ANDOR rational_b_spline_curve) SUBTYPE OF (bounded_curve); degree : INTEGER; control_points_list : LIST [2:?] OF cartesian_point; curve_form : b_spline_curve_form; closed_curve : LOGICAL; self_intersect : LOGICAL; DERIVE upper_index_on_control_points : INTEGER := SIZEOF( control_points_list) - 1; control_points : ARRAY [0: upper_index_on_control_points] OF cartesian_point := list_to_array( control_points_list,0, upper_index_on_control_points); WHERE wr1: ((('STEP_SHIP_SCHEMA.UNIFORM_CURVE' IN TYPEOF(SELF)) OR ('STEP_SHIP_SCHEMA.QUASI_UNIFORM_CURVE' IN TYPEOF( SELF))) OR ('STEP_SHIP_SCHEMA.BEZIER_CURVE' IN TYPEOF(SELF))) OR ( 'STEP_SHIP_SCHEMA.B_SPLINE_CURVE_WITH_KNOTS' IN TYPEOF(SELF)); END_ENTITY; ENTITY b_spline_curve_with_knots SUBTYPE OF (b_spline_curve); knot_multiplicities : LIST [2:?] OF INTEGER; knots : LIST [2:?] OF parameter_value; knot_spec : knot_type; DERIVE upper_index_on_knots : INTEGER := SIZEOF(knots); WHERE wr1: constraints_param_b_spline(degree,upper_index_on_knots, upper_index_on_control_points,knot_multiplicities,knots); wr2: SIZEOF(knot_multiplicities) = upper_index_on_knots; END_ENTITY; ENTITY b_spline_surface SUPERTYPE OF (ONEOF (b_spline_surface_with_knots,uniform_surface, quasi_uniform_surface,bezier_surface) ANDOR rational_b_spline_surface) SUBTYPE OF (bounded_surface); u_degree : INTEGER; v_degree : INTEGER; control_points_list : LIST [2:?] OF LIST [2:?] OF cartesian_point; surface_form : b_spline_surface_form; u_closed : LOGICAL; v_closed : LOGICAL; self_intersect : LOGICAL; DERIVE u_upper : INTEGER := SIZEOF(control_points_list) - 1; v_upper : INTEGER := SIZEOF(control_points_list[1]) - 1; control_points : ARRAY [0:u_upper] OF ARRAY [0:v_upper] OF cartesian_point := make_array_of_array( control_points_list,0,u_upper,0,v_upper); WHERE wr1: ((('STEP_SHIP_SCHEMA.UNIFORM_SURFACE' IN TYPEOF(SELF)) OR ('STEP_SHIP_SCHEMA.QUASI_UNIFORM_SURFACE' IN TYPEOF(SELF))) OR ('STEP_SHIP_SCHEMA.BEZIER_SURFACE' IN TYPEOF(SELF))) OR ( 'STEP_SHIP_SCHEMA.B_SPLINE_SURFACE_WITH_KNOTS' IN TYPEOF(SELF)); END_ENTITY; ENTITY b_spline_surface_with_knots SUBTYPE OF (b_spline_surface); u_multiplicities : LIST [2:?] OF INTEGER; v_multiplicities : LIST [2:?] OF INTEGER; u_knots : LIST [2:?] OF parameter_value; v_knots : LIST [2:?] OF parameter_value; knot_spec : knot_type; DERIVE knot_u_upper : INTEGER := SIZEOF(u_knots); knot_v_upper : INTEGER := SIZEOF(v_knots); WHERE wr1: constraints_param_b_spline(SELF\b_spline_surface.u_degree, knot_u_upper,SELF\b_spline_surface.u_upper,u_multiplicities, u_knots); wr2: constraints_param_b_spline(SELF\b_spline_surface.v_degree, knot_v_upper,SELF\b_spline_surface.v_upper,v_multiplicities, v_knots); wr3: SIZEOF(u_multiplicities) = knot_u_upper; wr4: SIZEOF(v_multiplicities) = knot_v_upper; END_ENTITY; ENTITY bezier_curve SUBTYPE OF (b_spline_curve); END_ENTITY; ENTITY bezier_surface SUBTYPE OF (b_spline_surface); END_ENTITY; -- ONLY IN AP203 ENTITY boundary_curve SUBTYPE OF (composite_curve_on_surface); WHERE wr1: SELF\composite_curve.closed_curve; END_ENTITY; ENTITY bounded_curve SUPERTYPE OF (ONEOF (polyline,b_spline_curve,bounded_pcurve, bounded_surface_curve,composite_curve)) SUBTYPE OF (curve); END_ENTITY; ENTITY bounded_pcurve SUBTYPE OF (pcurve, bounded_curve); WHERE wr1: 'STEP_SHIP_SCHEMA.BOUNDED_CURVE' IN TYPEOF(SELF\pcurve. reference_to_curve.items[1]); END_ENTITY; ENTITY bounded_surface SUPERTYPE OF (b_spline_surface) SUBTYPE OF (surface); END_ENTITY; ENTITY bounded_surface_curve SUBTYPE OF (surface_curve, bounded_curve); WHERE wr1: 'STEP_SHIP_SCHEMA.BOUNDED_CURVE' IN TYPEOF(SELF\ surface_curve.curve_3d); END_ENTITY; -- ONLY IN AP203/AP218 ENTITY brep_with_voids SUBTYPE OF (manifold_solid_brep); voids : SET [1:?] OF oriented_closed_shell; END_ENTITY; ENTITY calendar_date SUBTYPE OF (date); day_component : day_in_month_number; month_component : month_in_year_number; WHERE wr1: valid_calendar_date(SELF); END_ENTITY; ENTITY cartesian_point SUBTYPE OF (point); coordinates : LIST [1:3] OF length_measure; END_ENTITY; ENTITY cartesian_transformation_operator SUPERTYPE OF (cartesian_transformation_operator_3d) SUBTYPE OF (geometric_representation_item, functionally_defined_transformation); axis1 : OPTIONAL direction; axis2 : OPTIONAL direction; local_origin : cartesian_point; scale : OPTIONAL REAL; DERIVE scl : REAL := NVL(scale,1); WHERE wr1: scl > 0; END_ENTITY; ENTITY cartesian_transformation_operator_3d SUBTYPE OF (cartesian_transformation_operator); axis3 : OPTIONAL direction; DERIVE u : LIST [3:3] OF direction := base_axis(3,SELF\ cartesian_transformation_operator.axis1,SELF\ cartesian_transformation_operator.axis2,axis3); WHERE wr1: SELF\geometric_representation_item.dim = 3; END_ENTITY; -- ONLY IN AP203 ENTITY certification; name : label; purpose : text; kind : certification_type; END_ENTITY; -- ONLY IN AP203 ENTITY certification_assignment ABSTRACT SUPERTYPE; assigned_certification : certification; END_ENTITY; -- ONLY IN AP203 ENTITY certification_type; description : label; END_ENTITY; -- ONLY IN AP203 ENTITY change SUBTYPE OF (action_assignment); items : SET [1:?] OF work_item; END_ENTITY; -- ONLY IN AP203 ENTITY change_request SUBTYPE OF (action_request_assignment); items : SET [1:?] OF change_request_item; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY characterized_object; name : label; description : OPTIONAL text; END_ENTITY; ENTITY circle SUBTYPE OF (conic); radius : positive_length_measure; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY class SUBTYPE OF (group); WHERE wr1: SIZEOF(QUERY ( oa <* USEDIN(SELF, 'STEP_SHIP_SCHEMA.GROUP_ASSIGNMENT.ASSIGNED_GROUP') | (NOT ('STEP_SHIP_SCHEMA.APPLIED_GROUP_ASSIGNMENT' IN TYPEOF(oa))) )) = 0; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY classification_assignment ABSTRACT SUPERTYPE; assigned_class : group; role : classification_role; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY classification_role; name : label; description : OPTIONAL text; END_ENTITY; ENTITY closed_shell SUBTYPE OF (connected_face_set); END_ENTITY; ENTITY composite_curve SUBTYPE OF (bounded_curve); segments : LIST [1:?] OF composite_curve_segment; self_intersect : LOGICAL; DERIVE n_segments : INTEGER := SIZEOF(segments); closed_curve : LOGICAL := segments[n_segments].transition <> discontinuous; WHERE wr1: ((NOT closed_curve) AND (SIZEOF(QUERY ( temp <* segments | ( temp.transition = discontinuous) )) = 1)) OR (closed_curve AND (SIZEOF(QUERY ( temp <* segments | (temp.transition = discontinuous) )) = 0)); END_ENTITY; ENTITY composite_curve_on_surface SUBTYPE OF (composite_curve); DERIVE basis_surface : SET [0:2] OF surface := get_basis_surface(SELF); WHERE wr1: SIZEOF(basis_surface) > 0; wr2: constraints_composite_curve_on_surface(SELF); END_ENTITY; ENTITY composite_curve_segment SUBTYPE OF (founded_item); transition : transition_code; same_sense : BOOLEAN; parent_curve : curve; INVERSE using_curves : BAG [1:?] OF composite_curve FOR segments; WHERE wr1: 'STEP_SHIP_SCHEMA.BOUNDED_CURVE' IN TYPEOF(parent_curve); END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY compound_representation_item SUBTYPE OF (representation_item); item_element : compound_item_definition; END_ENTITY; -- ONLY IN AP203 ENTITY configuration_design; configuration : configuration_item; design : product_definition_formation; UNIQUE ur1 : configuration, design; END_ENTITY; -- ONLY IN AP203 ENTITY configuration_effectivity SUBTYPE OF (product_definition_effectivity); configuration : configuration_design; UNIQUE ur1 : configuration, usage, id; WHERE wr1: ('STEP_SHIP_SCHEMA.PRODUCT_DEFINITION_USAGE' IN TYPEOF( SELF\product_definition_effectivity.usage)); END_ENTITY; -- ONLY IN AP203 ENTITY configuration_item; id : identifier; name : label; description : OPTIONAL text; item_concept : product_concept; purpose : OPTIONAL label; UNIQUE ur1 : id; END_ENTITY; ENTITY conic SUPERTYPE OF (ONEOF (circle,ellipse,hyperbola,parabola)) SUBTYPE OF (curve); position : axis2_placement; END_ENTITY; ENTITY conical_surface SUBTYPE OF (elementary_surface); radius : length_measure; semi_angle : plane_angle_measure; WHERE wr1: radius >= 0; END_ENTITY; -- ONLY IN AP203/AP216/AP218 ENTITY connected_edge_set SUBTYPE OF (topological_representation_item); ces_edges : SET [1:?] OF edge; END_ENTITY; ENTITY connected_face_set SUPERTYPE OF (ONEOF (closed_shell,open_shell)) SUBTYPE OF (topological_representation_item); cfs_faces : SET [1:?] OF face; END_ENTITY; -- ONLY IN AP203 ENTITY context_dependent_shape_representation; representation_relation : shape_representation_relationship; represented_product_relation : product_definition_shape; WHERE wr1: ('STEP_SHIP_SCHEMA.PRODUCT_DEFINITION_RELATIONSHIP' IN TYPEOF(SELF.represented_product_relation.definition)); END_ENTITY; ENTITY context_dependent_unit SUBTYPE OF (named_unit); name : label; END_ENTITY; -- ONLY IN AP203 ENTITY contract; name : label; purpose : text; kind : contract_type; END_ENTITY; -- ONLY IN AP203 ENTITY contract_assignment ABSTRACT SUPERTYPE; assigned_contract : contract; END_ENTITY; -- ONLY IN AP203 ENTITY contract_type; description : label; END_ENTITY; -- ONLY IN AP203/AP216/AP218 ENTITY conversion_based_unit SUBTYPE OF (named_unit); name : label; conversion_factor : measure_with_unit; END_ENTITY; ENTITY coordinated_universal_time_offset; hour_offset : INTEGER; minute_offset : OPTIONAL INTEGER; sense : ahead_or_behind; DERIVE actual_minute_offset : INTEGER := NVL(minute_offset,0); WHERE wr1: (0 <= hour_offset) AND (hour_offset < 24); wr2: (0 <= actual_minute_offset) AND (actual_minute_offset <= 59); wr3: NOT (((hour_offset <> 0) OR (actual_minute_offset <> 0)) AND ( sense = exact)); END_ENTITY; ENTITY curve SUPERTYPE OF (ONEOF (line,conic,pcurve,surface_curve,offset_curve_3d, curve_replica)) SUBTYPE OF (geometric_representation_item); END_ENTITY; -- ONLY IN AP203 ENTITY curve_bounded_surface SUBTYPE OF (bounded_surface); basis_surface : surface; boundaries : SET [1:?] OF boundary_curve; implicit_outer : BOOLEAN; WHERE wr1: (NOT (implicit_outer AND ( 'STEP_SHIP_SCHEMA.OUTER_BOUNDARY_CURVE' IN TYPEOF( boundaries)))); wr2: ((NOT implicit_outer) OR ( 'STEP_SHIP_SCHEMA.BOUNDED_SURFACE' IN TYPEOF( basis_surface))); wr3: (SIZEOF(QUERY ( temp <* boundaries | ( 'STEP_SHIP_SCHEMA.OUTER_BOUNDARY_CURVE' IN TYPEOF(temp)) )) <= 1); wr4: (SIZEOF(QUERY ( temp <* boundaries | (temp\ composite_curve_on_surface.basis_surface[1] <> SELF. basis_surface) )) = 0); END_ENTITY; ENTITY curve_replica SUBTYPE OF (curve); parent_curve : curve; transformation : cartesian_transformation_operator; WHERE wr1: transformation.dim = parent_curve.dim; wr2: acyclic_curve_replica(SELF,parent_curve); END_ENTITY; ENTITY cylindrical_surface SUBTYPE OF (elementary_surface); radius : positive_length_measure; END_ENTITY; ENTITY date SUPERTYPE OF (ONEOF (calendar_date,ordinal_date, week_of_year_and_day_date)); year_component : year_number; END_ENTITY; ENTITY date_and_time; date_component : date; time_component : local_time; END_ENTITY; ENTITY date_and_time_assignment ABSTRACT SUPERTYPE; assigned_date_and_time : date_and_time; role : date_time_role; END_ENTITY; ENTITY date_time_role; name : label; DERIVE description : text := get_description_value(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1; END_ENTITY; -- ONLY IN AP203 ENTITY dated_effectivity SUBTYPE OF (effectivity); effectivity_start_date : date_and_time; effectivity_end_date : OPTIONAL date_and_time; END_ENTITY; ENTITY definitional_representation SUBTYPE OF (representation); WHERE wr1: 'STEP_SHIP_SCHEMA.PARAMETRIC_REPRESENTATION_CONTEXT' IN TYPEOF(SELF\representation.context_of_items); END_ENTITY; ENTITY degenerate_pcurve SUBTYPE OF (point); basis_surface : surface; reference_to_curve : definitional_representation; WHERE wr1: SIZEOF(reference_to_curve\representation.items) = 1; wr2: 'STEP_SHIP_SCHEMA.CURVE' IN TYPEOF(reference_to_curve\ representation.items[1]); wr3: reference_to_curve\representation.items[1]\ geometric_representation_item.dim = 2; END_ENTITY; ENTITY degenerate_toroidal_surface SUBTYPE OF (toroidal_surface); select_outer : BOOLEAN; WHERE wr1: major_radius < minor_radius; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY derived_unit; elements : SET [1:?] OF derived_unit_element; DERIVE name : label := get_name_value(SELF); WHERE wr1: (SIZEOF(elements) > 1) OR ((SIZEOF(elements) = 1) AND (elements [1].exponent <> 1)); wr2: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY derived_unit_element; unit : named_unit; exponent : REAL; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY description_attribute; attribute_value : text; described_item : description_attribute_select; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY descriptive_representation_item SUBTYPE OF (representation_item); description : text; END_ENTITY; -- ONLY IN AP203 ENTITY design_make_from_relationship SUBTYPE OF (product_definition_relationship); END_ENTITY; ENTITY dimensional_exponents; length_exponent : REAL; mass_exponent : REAL; time_exponent : REAL; electric_current_exponent : REAL; thermodynamic_temperature_exponent : REAL; amount_of_substance_exponent : REAL; luminous_intensity_exponent : REAL; END_ENTITY; -- ONLY IN AP203 ENTITY directed_action SUBTYPE OF (executed_action); directive : action_directive; END_ENTITY; ENTITY direction SUBTYPE OF (geometric_representation_item); direction_ratios : LIST [2:3] OF REAL; WHERE wr1: SIZEOF(QUERY ( tmp <* direction_ratios | (tmp <> 0) )) > 0; END_ENTITY; ENTITY document; id : identifier; name : label; description : OPTIONAL text; kind : document_type; INVERSE representation_types : SET [0:?] OF document_representation_type FOR represented_document; END_ENTITY; ENTITY document_reference ABSTRACT SUPERTYPE; assigned_document : document; source : label; DERIVE role : object_role := get_role(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1; END_ENTITY; -- ONLY IN AP203 ENTITY document_relationship; name : label; description : text; relating_document : document; related_document : document; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY document_representation_type; name : label; represented_document : document; END_ENTITY; ENTITY document_type; product_data_type : label; END_ENTITY; ENTITY document_usage_constraint; source : document; subject_element : label; subject_element_value : text; END_ENTITY; -- ONLY IN AP203 ENTITY document_with_class SUBTYPE OF (document); class : identifier; END_ENTITY; ENTITY edge SUPERTYPE OF (ONEOF (edge_curve,oriented_edge)) SUBTYPE OF (topological_representation_item); edge_start : vertex; edge_end : vertex; END_ENTITY; -- ONLY IN AP203/AP216/AP218 ENTITY edge_based_wireframe_model SUBTYPE OF (geometric_representation_item); ebwm_boundary : SET [1:?] OF connected_edge_set; END_ENTITY; -- ONLY IN AP203/AP216/AP218 ENTITY edge_based_wireframe_shape_representation SUBTYPE OF (shape_representation); WHERE wr1: (SIZEOF(QUERY ( it <* SELF.items | (NOT (SIZEOF([ 'STEP_SHIP_SCHEMA.EDGE_BASED_WIREFRAME_MODEL', 'STEP_SHIP_SCHEMA.MAPPED_ITEM', 'STEP_SHIP_SCHEMA.AXIS2_PLACEMENT_3D'] * TYPEOF(it)) = 1)) )) = 0); wr2: (SIZEOF(QUERY ( it <* SELF.items | (SIZEOF([ 'STEP_SHIP_SCHEMA.EDGE_BASED_WIREFRAME_MODEL', 'STEP_SHIP_SCHEMA.MAPPED_ITEM'] * TYPEOF(it)) = 1) )) >= 1); wr3: (SIZEOF(QUERY ( ebwm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.EDGE_BASED_WIREFRAME_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( eb <* ebwm\ edge_based_wireframe_model.ebwm_boundary | (NOT (SIZEOF( QUERY ( edges <* eb.ces_edges | (NOT ( 'STEP_SHIP_SCHEMA.EDGE_CURVE' IN TYPEOF(edges))) )) = 0)) )) = 0)) )) = 0); wr4: (SIZEOF(QUERY ( ebwm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.EDGE_BASED_WIREFRAME_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( eb <* ebwm\ edge_based_wireframe_model.ebwm_boundary | (NOT (SIZEOF( QUERY ( pline_edges <* QUERY ( edges <* eb.ces_edges | ( 'STEP_SHIP_SCHEMA.POLYLINE' IN TYPEOF(edges\ edge_curve.edge_geometry)) ) | (NOT (SIZEOF(pline_edges\ edge_curve.edge_geometry\polyline.points) > 2)) )) = 0)) )) = 0)) )) = 0); wr5: (SIZEOF(QUERY ( ebwm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.EDGE_BASED_WIREFRAME_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( eb <* ebwm\ edge_based_wireframe_model.ebwm_boundary | (NOT (SIZEOF( QUERY ( edges <* eb.ces_edges | (NOT (( 'STEP_SHIP_SCHEMA.VERTEX_POINT' IN TYPEOF(edges. edge_start)) AND ('STEP_SHIP_SCHEMA.VERTEX_POINT' IN TYPEOF(edges.edge_end)))) )) = 0)) )) = 0)) )) = 0); wr6: (SIZEOF(QUERY ( ebwm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.EDGE_BASED_WIREFRAME_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( eb <* ebwm\ edge_based_wireframe_model.ebwm_boundary | (NOT (SIZEOF( QUERY ( edges <* eb.ces_edges | (NOT valid_wireframe_edge_curve(edges\edge_curve.edge_geometry)) )) = 0)) )) = 0)) )) = 0); wr7: (SIZEOF(QUERY ( ebwm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.EDGE_BASED_WIREFRAME_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( eb <* ebwm\ edge_based_wireframe_model.ebwm_boundary | (NOT (SIZEOF( QUERY ( edges <* eb.ces_edges | (NOT ( valid_wireframe_vertex_point(edges.edge_start\vertex_point. vertex_geometry) AND valid_wireframe_vertex_point(edges. edge_end\vertex_point.vertex_geometry))) )) = 0)) )) = 0)) )) = 0); wr8: (SIZEOF(QUERY ( mi <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.MAPPED_ITEM' IN TYPEOF(it)) ) | ( NOT (('STEP_SHIP_SCHEMA.' + 'EDGE_BASED_WIREFRAME_SHAPE_REPRESENTATION') IN TYPEOF(mi\ mapped_item.mapping_source.mapped_representation))) )) = 0); wr9: (SELF.context_of_items\geometric_representation_context. coordinate_space_dimension = 3); END_ENTITY; ENTITY edge_curve SUBTYPE OF (edge, geometric_representation_item); edge_geometry : curve; same_sense : BOOLEAN; END_ENTITY; ENTITY edge_loop SUBTYPE OF (loop, path); DERIVE ne : INTEGER := SIZEOF(SELF\path.edge_list); WHERE wr1: SELF\path.edge_list[1].edge_start :=: SELF\path.edge_list[ne]. edge_end; END_ENTITY; -- ONLY IN AP203/AP215/AP216 ENTITY effectivity SUPERTYPE OF (serial_numbered_effectivity); id : identifier; DERIVE name : label := get_name_value(SELF); description : text := get_description_value(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1; wr2: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1; END_ENTITY; -- ONLY IN AP215/AP216 ENTITY effectivity_assignment ABSTRACT SUPERTYPE; assigned_effectivity : effectivity; DERIVE role : object_role := get_role(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1; END_ENTITY; -- ONLY IN AP216 ENTITY electric_current_unit SUBTYPE OF (named_unit); WHERE wr1: ((SELF\named_unit.dimensions.length_exponent = 0) AND (SELF\ named_unit.dimensions.mass_exponent = 0) AND (SELF\ named_unit.dimensions.time_exponent = 0) AND (SELF\ named_unit.dimensions.electric_current_exponent = 1) AND ( SELF\named_unit.dimensions. thermodynamic_temperature_exponent = 0) AND (SELF\named_unit .dimensions.amount_of_substance_exponent = 0) AND (SELF\ named_unit.dimensions.luminous_intensity_exponent = 0)); END_ENTITY; ENTITY elementary_surface SUPERTYPE OF (ONEOF (plane,cylindrical_surface,conical_surface, spherical_surface,toroidal_surface)) SUBTYPE OF (surface); position : axis2_placement_3d; END_ENTITY; ENTITY ellipse SUBTYPE OF (conic); semi_axis_1 : positive_length_measure; semi_axis_2 : positive_length_measure; END_ENTITY; ENTITY evaluated_degenerate_pcurve SUBTYPE OF (degenerate_pcurve); equivalent_point : cartesian_point; END_ENTITY; ENTITY executed_action SUBTYPE OF (action); END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY external_identification_assignment ABSTRACT SUPERTYPE SUBTYPE OF (identification_assignment); source : external_source; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY external_source; source_id : source_item; DERIVE description : text := get_description_value(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY external_source_relationship; name : label; description : OPTIONAL text; relating_source : external_source; related_source : external_source; END_ENTITY; -- ONLY IN AP218 ENTITY externally_defined_class SUBTYPE OF (class, externally_defined_item); END_ENTITY; -- ONLY IN AP218 ENTITY externally_defined_general_property SUBTYPE OF (general_property, externally_defined_item); END_ENTITY; -- ONLY IN AP216/AP218 ENTITY externally_defined_item; item_id : source_item; source : external_source; END_ENTITY; ENTITY face SUPERTYPE OF (ONEOF (face_surface,oriented_face)) SUBTYPE OF (topological_representation_item); bounds : SET [1:?] OF face_bound; WHERE wr1: NOT mixed_loop_type_set(list_to_set(list_face_loops(SELF))); wr2: SIZEOF(QUERY ( temp <* bounds | ( 'STEP_SHIP_SCHEMA.FACE_OUTER_BOUND' IN TYPEOF(temp)) )) <= 1; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY face_based_surface_model SUBTYPE OF (geometric_representation_item); fbsm_faces : SET [1:?] OF connected_face_set; END_ENTITY; ENTITY face_bound SUBTYPE OF (topological_representation_item); bound : loop; orientation : BOOLEAN; END_ENTITY; ENTITY face_outer_bound SUBTYPE OF (face_bound); END_ENTITY; ENTITY face_surface SUBTYPE OF (face, geometric_representation_item); face_geometry : surface; same_sense : BOOLEAN; WHERE wr1: NOT ('STEP_SHIP_SCHEMA.ORIENTED_SURFACE' IN TYPEOF( face_geometry)); END_ENTITY; -- ONLY IN AP203/AP216/AP218 ENTITY faceted_brep SUBTYPE OF (manifold_solid_brep); END_ENTITY; -- ONLY IN AP203 ENTITY faceted_brep_shape_representation SUBTYPE OF (shape_representation); WHERE wr1: (SIZEOF(QUERY ( it <* items | (NOT (SIZEOF([ 'STEP_SHIP_SCHEMA.FACETED_BREP', 'STEP_SHIP_SCHEMA.MAPPED_ITEM', 'STEP_SHIP_SCHEMA.AXIS2_PLACEMENT_3D'] * TYPEOF(it)) = 1)) )) = 0); wr2: (SIZEOF(QUERY ( it <* items | (SIZEOF([ 'STEP_SHIP_SCHEMA.FACETED_BREP', 'STEP_SHIP_SCHEMA.MAPPED_ITEM'] * TYPEOF(it)) = 1) )) > 0); wr3: (SIZEOF(QUERY ( fbrep <* QUERY ( it <* items | ( 'STEP_SHIP_SCHEMA.FACETED_BREP' IN TYPEOF(it)) ) | ( NOT (SIZEOF(QUERY ( csh <* msb_shells(fbrep) | (NOT (SIZEOF( QUERY ( fcs <* csh\connected_face_set.cfs_faces | (NOT (( 'STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fcs)) AND ( 'STEP_SHIP_SCHEMA.PLANE' IN TYPEOF(fcs\face_surface. face_geometry)) AND ('STEP_SHIP_SCHEMA.CARTESIAN_POINT' IN TYPEOF(fcs\face_surface.face_geometry\elementary_surface. position.location)))) )) = 0)) )) = 0)) )) = 0); wr4: (SIZEOF(QUERY ( fbrep <* QUERY ( it <* items | ( 'STEP_SHIP_SCHEMA.FACETED_BREP' IN TYPEOF(it)) ) | ( NOT (SIZEOF(QUERY ( csh <* msb_shells(fbrep) | (NOT (SIZEOF( QUERY ( fcs <* csh\connected_face_set.cfs_faces | (NOT ( SIZEOF(QUERY ( bnds <* fcs.bounds | ( 'STEP_SHIP_SCHEMA.FACE_OUTER_BOUND' IN TYPEOF(bnds)) )) = 1)) )) = 0)) )) = 0)) )) = 0); wr5: (SIZEOF(QUERY ( msb <* QUERY ( it <* items | ( 'STEP_SHIP_SCHEMA.MANIFOLD_SOLID_BREP' IN TYPEOF(it)) ) | ('STEP_SHIP_SCHEMA.ORIENTED_CLOSED_SHELL' IN TYPEOF( msb\manifold_solid_brep.outer)) )) = 0); wr6: (SIZEOF(QUERY ( brv <* QUERY ( it <* items | ( 'STEP_SHIP_SCHEMA.BREP_WITH_VOIDS' IN TYPEOF(it)) ) | ( NOT (SIZEOF(QUERY ( csh <* brv\brep_with_voids.voids | csh\ oriented_closed_shell.orientation )) = 0)) )) = 0); wr7: (SIZEOF(QUERY ( mi <* QUERY ( it <* items | ( 'STEP_SHIP_SCHEMA.MAPPED_ITEM' IN TYPEOF(it)) ) | (NOT ('STEP_SHIP_SCHEMA.FACETED_BREP_SHAPE_REPRESENTATION' IN TYPEOF(mi\mapped_item.mapping_source. mapped_representation))) )) = 0); END_ENTITY; ENTITY founded_item; END_ENTITY; ENTITY functionally_defined_transformation; name : label; description : OPTIONAL text; END_ENTITY; -- ONLY IN AP218 ENTITY general_property; id : identifier; name : label; description : OPTIONAL text; END_ENTITY; -- ONLY IN AP203/AP216/AP218 ENTITY geometric_curve_set SUBTYPE OF (geometric_set); WHERE wr1: (SIZEOF(QUERY ( temp <* SELF\geometric_set.elements | ( 'STEP_SHIP_SCHEMA.SURFACE' IN TYPEOF(temp)) )) = 0); END_ENTITY; ENTITY geometric_representation_context SUBTYPE OF (representation_context); coordinate_space_dimension : dimension_count; END_ENTITY; ENTITY geometric_representation_item SUPERTYPE OF (ONEOF (point,direction,vector,placement, cartesian_transformation_operator,curve,surface,edge_curve, face_surface,poly_loop,vertex_point,face_based_surface_model)) SUBTYPE OF (representation_item); DERIVE dim : dimension_count := dimension_of(SELF); WHERE wr1: SIZEOF(QUERY ( using_rep <* using_representations(SELF) | (NOT ('STEP_SHIP_SCHEMA.GEOMETRIC_REPRESENTATION_CONTEXT' IN TYPEOF(using_rep.context_of_items))) )) = 0; END_ENTITY; -- ONLY IN AP203/AP216/AP218 ENTITY geometric_set SUPERTYPE OF (geometric_curve_set) SUBTYPE OF (geometric_representation_item); elements : SET [1:?] OF geometric_set_select; END_ENTITY; -- ONLY IN AP203 ENTITY geometrically_bounded_surface_shape_representation SUBTYPE OF (shape_representation); WHERE wr1: (SIZEOF(QUERY ( it <* SELF.items | (NOT (SIZEOF([ 'STEP_SHIP_SCHEMA.GEOMETRIC_SET', 'STEP_SHIP_SCHEMA.MAPPED_ITEM', 'STEP_SHIP_SCHEMA.AXIS2_PLACEMENT_3D'] * TYPEOF(it)) = 1)) )) = 0); wr2: (SIZEOF(QUERY ( it <* SELF.items | (SIZEOF([ 'STEP_SHIP_SCHEMA.GEOMETRIC_SET', 'STEP_SHIP_SCHEMA.MAPPED_ITEM'] * TYPEOF(it)) = 1) )) > 0); wr3: (SIZEOF(QUERY ( mi <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.MAPPED_ITEM' IN TYPEOF(it)) ) | (NOT ((('STEP_SHIP_SCHEMA.' + 'GEOMETRICALLY_BOUNDED_SURFACE_SHAPE_REPRESENTATION') IN TYPEOF(mi\mapped_item.mapping_source.mapped_representation)) AND (SIZEOF(QUERY ( mr_it <* mi\mapped_item.mapping_source. mapped_representation.items | ( 'STEP_SHIP_SCHEMA.GEOMETRIC_SET' IN TYPEOF(mr_it)) )) > 0))) )) = 0); wr4: (SIZEOF(QUERY ( gs <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.GEOMETRIC_SET' IN TYPEOF(it)) ) | ( NOT (SIZEOF(QUERY ( pnt <* QUERY ( gsel <* gs\geometric_set. elements | ('STEP_SHIP_SCHEMA.POINT' IN TYPEOF(gsel)) ) | (NOT gbsf_check_point(pnt)) )) = 0)) )) = 0); wr5: (SIZEOF(QUERY ( gs <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.GEOMETRIC_SET' IN TYPEOF(it)) ) | ( NOT (SIZEOF(QUERY ( cv <* QUERY ( gsel <* gs\geometric_set. elements | ('STEP_SHIP_SCHEMA.CURVE' IN TYPEOF(gsel)) ) | (NOT gbsf_check_curve(cv)) )) = 0)) )) = 0); wr6: (SIZEOF(QUERY ( gs <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.GEOMETRIC_SET' IN TYPEOF(it)) ) | ( NOT (SIZEOF(QUERY ( sf <* QUERY ( gsel <* gs\geometric_set. elements | ('STEP_SHIP_SCHEMA.SURFACE' IN TYPEOF(gsel)) ) | (NOT gbsf_check_surface(sf)) )) = 0)) )) = 0); wr7: (SIZEOF(QUERY ( gs <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.GEOMETRIC_SET' IN TYPEOF(it)) ) | ( SIZEOF(QUERY ( gsel <* gs\geometric_set.elements | ( 'STEP_SHIP_SCHEMA.SURFACE' IN TYPEOF(gsel)) )) > 0) )) > 0); END_ENTITY; -- ONLY IN AP203/AP218 ENTITY geometrically_bounded_wireframe_shape_representation SUBTYPE OF (shape_representation); WHERE wr1: (SIZEOF(QUERY ( it <* SELF.items | (NOT (SIZEOF(TYPEOF(it) * [ 'STEP_SHIP_SCHEMA.GEOMETRIC_CURVE_SET', 'STEP_SHIP_SCHEMA.AXIS2_PLACEMENT_3D', 'STEP_SHIP_SCHEMA.MAPPED_ITEM']) = 1)) )) = 0); wr2: (SIZEOF(QUERY ( it <* SELF.items | (SIZEOF(TYPEOF(it) * [ 'STEP_SHIP_SCHEMA.GEOMETRIC_CURVE_SET', 'STEP_SHIP_SCHEMA.MAPPED_ITEM']) = 1) )) >= 1); wr3: (SIZEOF(QUERY ( gcs <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.GEOMETRIC_CURVE_SET' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( crv <* QUERY ( elem <* gcs\ geometric_set.elements | ('STEP_SHIP_SCHEMA.CURVE' IN TYPEOF(elem)) ) | (NOT valid_geometrically_bounded_wf_curve( crv)) )) = 0)) )) = 0); wr4: (SIZEOF(QUERY ( gcs <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.GEOMETRIC_CURVE_SET' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( pnts <* QUERY ( elem <* gcs\ geometric_set.elements | ('STEP_SHIP_SCHEMA.POINT' IN TYPEOF(elem)) ) | (NOT valid_geometrically_bounded_wf_point( pnts)) )) = 0)) )) = 0); wr5: (SIZEOF(QUERY ( gcs <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.GEOMETRIC_CURVE_SET' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cnc <* QUERY ( elem <* gcs\ geometric_set.elements | ('STEP_SHIP_SCHEMA.CONIC' IN TYPEOF(elem)) ) | (NOT ( 'STEP_SHIP_SCHEMA.AXIS2_PLACEMENT_3D' IN TYPEOF(cnc\ conic.position))) )) = 0)) )) = 0); wr6: (SIZEOF(QUERY ( gcs <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.GEOMETRIC_CURVE_SET' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( pline <* QUERY ( elem <* gcs\ geometric_set.elements | ('STEP_SHIP_SCHEMA.POLYLINE' IN TYPEOF(elem)) ) | (NOT (SIZEOF(pline\polyline.points) > 2)) )) = 0)) )) = 0); wr7: (SIZEOF(QUERY ( mi <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.MAPPED_ITEM' IN TYPEOF(it)) ) | ( NOT (('STEP_SHIP_SCHEMA.' + 'GEOMETRICALLY_BOUNDED_WIREFRAME_SHAPE_REPRESENTATION') IN TYPEOF(mi\mapped_item.mapping_source.mapped_representation))) )) = 0); END_ENTITY; ENTITY global_uncertainty_assigned_context SUBTYPE OF (representation_context); uncertainty : SET [1:?] OF uncertainty_measure_with_unit; END_ENTITY; ENTITY global_unit_assigned_context SUBTYPE OF (representation_context); units : SET [1:?] OF unit; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY group; name : label; description : OPTIONAL text; DERIVE id : identifier := get_id_value(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY group_assignment ABSTRACT SUPERTYPE; assigned_group : group; DERIVE role : object_role := get_role(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'ROLE_ASSOCIATION.ITEM_WITH_ROLE')) <= 1; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY group_relationship; name : label; description : OPTIONAL text; relating_group : group; related_group : group; END_ENTITY; ENTITY hyperbola SUBTYPE OF (conic); semi_axis : positive_length_measure; semi_imag_axis : positive_length_measure; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY id_attribute; attribute_value : identifier; identified_item : id_attribute_select; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY identification_assignment ABSTRACT SUPERTYPE; assigned_id : identifier; role : identification_role; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY identification_assignment_relationship; name : label; description : OPTIONAL text; relating_identification_assignment : identification_assignment; related_identification_assignment : identification_assignment; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY identification_role; name : label; description : OPTIONAL text; END_ENTITY; ENTITY intersection_curve SUBTYPE OF (surface_curve); WHERE wr1: SIZEOF(SELF\surface_curve.associated_geometry) = 2; wr2: associated_surface(SELF\surface_curve.associated_geometry[1]) <> associated_surface(SELF\surface_curve.associated_geometry [2]); END_ENTITY; ENTITY item_defined_transformation; name : label; description : OPTIONAL text; transform_item_1 : representation_item; transform_item_2 : representation_item; END_ENTITY; -- ONLY IN AP218 ENTITY known_source SUBTYPE OF (pre_defined_item, external_source); WHERE wr1: (SELF\pre_defined_item.name = 'ISO 13584 library'); wr2: (SIZEOF(QUERY ( oa <* USEDIN(SELF,'STEP_SHIP_SCHEMA.APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS') | ((NOT ('STEP_SHIP_SCHEMA.ORGANIZATION_ASSIGNMENT' IN TYPEOF(oa))) AND (oa.role.name = 'library supplier')) )) = 0); END_ENTITY; -- ONLY IN AP203/AP216 ENTITY length_measure_with_unit SUBTYPE OF (measure_with_unit); WHERE wr1: ('STEP_SHIP_SCHEMA.LENGTH_UNIT' IN TYPEOF(SELF\ measure_with_unit.unit_component)); END_ENTITY; ENTITY length_unit SUBTYPE OF (named_unit); WHERE wr1: ((((((SELF\named_unit.dimensions.length_exponent = 1) AND (SELF \named_unit.dimensions.mass_exponent = 0)) AND (SELF\ named_unit.dimensions.time_exponent = 0)) AND (SELF\ named_unit.dimensions.electric_current_exponent = 0)) AND ( SELF\named_unit.dimensions. thermodynamic_temperature_exponent = 0)) AND (SELF\ named_unit.dimensions.amount_of_substance_exponent = 0)) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0); END_ENTITY; -- ONLY IN AP218 ENTITY library_applied_version_assignment SUBTYPE OF (applied_external_identification_assignment); WHERE wr1: (SELF\identification_assignment.role.name = 'property version'); wr2: (SIZEOF(SELF\applied_external_identification_assignment.items) = 1); wr3: ('STEP_SHIP_SCHEMA.KNOWN_SOURCE' IN TYPEOF(SELF\ external_identification_assignment.source)); END_ENTITY; -- ONLY IN AP218 ENTITY library_class_version_assignment SUBTYPE OF (applied_external_identification_assignment); WHERE wr1: (SELF\identification_assignment.role.name = 'class version'); wr2: (SIZEOF(SELF\applied_external_identification_assignment.items) > 1); wr3: ('STEP_SHIP_SCHEMA.KNOWN_SOURCE' IN TYPEOF(SELF\ external_identification_assignment.source)); END_ENTITY; ENTITY line SUBTYPE OF (curve); pnt : cartesian_point; dir : vector; WHERE wr1: dir.dim = pnt.dim; END_ENTITY; ENTITY local_time; hour_component : hour_in_day; minute_component : OPTIONAL minute_in_hour; second_component : OPTIONAL second_in_minute; zone : coordinated_universal_time_offset; WHERE wr1: valid_time(SELF); END_ENTITY; ENTITY loop SUPERTYPE OF (ONEOF (vertex_loop,edge_loop,poly_loop)) SUBTYPE OF (topological_representation_item); END_ENTITY; -- ONLY IN AP203 ENTITY lot_effectivity SUBTYPE OF (effectivity); effectivity_lot_id : identifier; effectivity_lot_size : measure_with_unit; END_ENTITY; -- ONLY IN AP215/AP216 ENTITY luminous_intensity_unit SUBTYPE OF (named_unit); WHERE wr1: ((((((SELF\named_unit.dimensions.length_exponent = 0) AND (SELF \named_unit.dimensions.mass_exponent = 0)) AND (SELF\ named_unit.dimensions.time_exponent = 0)) AND (SELF\ named_unit.dimensions.electric_current_exponent = 0)) AND ( SELF\named_unit.dimensions. thermodynamic_temperature_exponent = 0)) AND (SELF\ named_unit.dimensions.amount_of_substance_exponent = 0)) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 1); END_ENTITY; -- ONLY IN AP203/AP216/AP218 ENTITY manifold_solid_brep SUBTYPE OF (solid_model); outer : closed_shell; END_ENTITY; -- ONLY IN AP203 ENTITY manifold_surface_shape_representation SUBTYPE OF (shape_representation); WHERE wr1 : (SIZEOF(QUERY ( it <* SELF.items | (NOT (SIZEOF([ 'STEP_SHIP_SCHEMA.SHELL_BASED_SURFACE_MODEL', 'STEP_SHIP_SCHEMA.MAPPED_ITEM', 'STEP_SHIP_SCHEMA.AXIS2_PLACEMENT_3D'] * TYPEOF(it)) = 1)) )) = 0); wr2 : (SIZEOF(QUERY ( it <* SELF.items | (SIZEOF([ 'STEP_SHIP_SCHEMA.SHELL_BASED_SURFACE_MODEL', 'STEP_SHIP_SCHEMA.MAPPED_ITEM'] * TYPEOF(it)) = 1) )) > 0); wr3 : (SIZEOF(QUERY ( mi <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.MAPPED_ITEM' IN TYPEOF(it)) ) | ( NOT (('STEP_SHIP_SCHEMA.'+ 'MANIFOLD_SURFACE_SHAPE_REPRESENTATION' IN TYPEOF(mi\mapped_item.mapping_source. mapped_representation)) AND (SIZEOF(QUERY ( mr_it <* mi\ mapped_item.mapping_source.mapped_representation.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN TYPEOF(mr_it)) )) > 0))) )) = 0); wr4 : (SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( sh <* sbsm\ shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF([ 'STEP_SHIP_SCHEMA.OPEN_SHELL', 'STEP_SHIP_SCHEMA.ORIENTED_CLOSED_SHELL', 'STEP_SHIP_SCHEMA.CLOSED_SHELL'] * TYPEOF(sh)) = 1)) )) = 0)) )) = 0); wr5 : (SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* sbsm\ shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF( QUERY ( fa <* cfs\connected_face_set.cfs_faces | (NOT ( SIZEOF(['STEP_SHIP_SCHEMA.FACE_SURFACE', 'STEP_SHIP_SCHEMA.ORIENTED_FACE'] * TYPEOF(fa)) = 1)) )) = 0)) )) = 0)) )) = 0); wr6 : (SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* sbsm\ shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF( QUERY ( f_sf <* QUERY ( fa <* cfs\connected_face_set. cfs_faces | ('STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fa)) ) | (NOT (( 'STEP_SHIP_SCHEMA.ADVANCED_FACE' IN TYPEOF(f_sf)) OR ( SIZEOF(['STEP_SHIP_SCHEMA.B_SPLINE_SURFACE', 'STEP_SHIP_SCHEMA.ELEMENTARY_SURFACE', 'STEP_SHIP_SCHEMA.OFFSET_SURFACE', 'STEP_SHIP_SCHEMA.SURFACE_REPLICA', 'STEP_SHIP_SCHEMA.SWEPT_SURFACE'] * TYPEOF(f_sf\ face_surface.face_geometry)) = 1))) )) = 0)) )) = 0)) )) = 0); wr7 : (SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* sbsm\ shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF( QUERY ( fa <* cfs\connected_face_set.cfs_faces | (NOT (( 'STEP_SHIP_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR msf_surface_check(fa\face_surface.face_geometry))) )) = 0)) )) = 0)) )) = 0); wr8 : (SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* sbsm\ shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF( QUERY ( fa <* cfs\connected_face_set.cfs_faces | (NOT (( 'STEP_SHIP_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR ( SIZEOF(QUERY ( bnds <* fa.bounds | (NOT (SIZEOF([ 'STEP_SHIP_SCHEMA.EDGE_LOOP', 'STEP_SHIP_SCHEMA.VERTEX_LOOP'] * TYPEOF(bnds.bound)) = 1)) )) = 0))) )) = 0)) )) = 0)) )) = 0); wr9 : (SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* sbsm\ shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF( QUERY ( fa <* cfs\connected_face_set.cfs_faces | (NOT (( 'STEP_SHIP_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR ( SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* fa.bounds | ( 'STEP_SHIP_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)) ) | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds\path.edge_list | ( NOT ('STEP_SHIP_SCHEMA.EDGE_CURVE' IN TYPEOF(oe. edge_element))))) = 0)))) = 0))))) = 0)) )) = 0)) )) = 0); wr10: (SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* sbsm\ shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF( QUERY ( fa <* cfs\connected_face_set.cfs_faces | (NOT (( 'STEP_SHIP_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR ( SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* fa.bounds | ( 'STEP_SHIP_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)) ) | (NOT (SIZEOF(QUERY ( oe_cv <* QUERY ( oe <* elp_fbnds\ path.edge_list | ('STEP_SHIP_SCHEMA.EDGE_CURVE' IN TYPEOF(oe.edge_element)) ) | (NOT (SIZEOF([ 'STEP_SHIP_SCHEMA.B_SPLINE_CURVE', 'STEP_SHIP_SCHEMA.CONIC', 'STEP_SHIP_SCHEMA.CURVE_REPLICA', 'STEP_SHIP_SCHEMA.LINE', 'STEP_SHIP_SCHEMA.OFFSET_CURVE_3D', 'STEP_SHIP_SCHEMA.PCURVE', 'STEP_SHIP_SCHEMA.POLYLINE', 'STEP_SHIP_SCHEMA.SURFACE_CURVE'] * TYPEOF(oe_cv. edge_element\edge_curve.edge_geometry)) = 1)) )) = 0)) )) = 0))) )) = 0)) )) = 0)) )) = 0); wr11: (SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* sbsm\ shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF( QUERY ( fa <* cfs\connected_face_set.cfs_faces | (NOT (( 'STEP_SHIP_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR ( SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* fa.bounds | ( 'STEP_SHIP_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)) ) | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds\path.edge_list | ( NOT msf_curve_check(oe.edge_element\edge_curve. edge_geometry)) )) = 0)) )) = 0))) )) = 0)) )) = 0)) )) = 0); wr12: (SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* sbsm\ shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF( QUERY ( fa <* cfs\connected_face_set.cfs_faces | (NOT (( 'STEP_SHIP_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR ( SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* fa.bounds | ( 'STEP_SHIP_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)) ) | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds\path.edge_list | ( NOT (('STEP_SHIP_SCHEMA.VERTEX_POINT' IN TYPEOF(oe. edge_element.edge_start)) AND ( 'STEP_SHIP_SCHEMA.VERTEX_POINT' IN TYPEOF(oe. edge_element.edge_end)))) )) = 0)) )) = 0))) )) = 0)) )) = 0)) )) = 0); wr13: (SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* sbsm\ shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF( QUERY ( fa <* cfs\connected_face_set.cfs_faces | (NOT (( 'STEP_SHIP_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR ( SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* fa.bounds | ( 'STEP_SHIP_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds.bound)) ) | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds\path.edge_list | ( NOT ((SIZEOF(['STEP_SHIP_SCHEMA.CARTESIAN_POINT', 'STEP_SHIP_SCHEMA.DEGENERATE_PCURVE', 'STEP_SHIP_SCHEMA.POINT_ON_CURVE', 'STEP_SHIP_SCHEMA.POINT_ON_SURFACE'] * TYPEOF(oe. edge_element.edge_start\vertex_point.vertex_geometry)) = 1) AND (SIZEOF(['STEP_SHIP_SCHEMA.CARTESIAN_POINT', 'STEP_SHIP_SCHEMA.DEGENERATE_PCURVE', 'STEP_SHIP_SCHEMA.POINT_ON_CURVE', 'STEP_SHIP_SCHEMA.POINT_ON_SURFACE'] * TYPEOF(oe. edge_element.edge_end\vertex_point.vertex_geometry)) = 1))) )) = 0)) )) = 0))) )) = 0)) )) = 0)) )) = 0); wr14: (SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* sbsm\ shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF( QUERY ( fa <* cfs\connected_face_set.cfs_faces | (NOT (( 'STEP_SHIP_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR ( SIZEOF(QUERY ( vlp_fbnds <* QUERY ( bnds <* fa.bounds | ( 'STEP_SHIP_SCHEMA.VERTEX_LOOP' IN TYPEOF(bnds.bound)) ) | (NOT ('STEP_SHIP_SCHEMA.VERTEX_POINT' IN TYPEOF( vlp_fbnds\vertex_loop.loop_vertex))) )) = 0))) )) = 0)) )) = 0)) )) = 0); wr15: (SIZEOF(QUERY ( sbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* sbsm\ shell_based_surface_model.sbsm_boundary | (NOT (SIZEOF( QUERY ( fa <* cfs\connected_face_set.cfs_faces | (NOT (( 'STEP_SHIP_SCHEMA.ADVANCED_FACE' IN TYPEOF(fa)) OR ( SIZEOF(QUERY ( vlp_fbnds <* QUERY ( bnds <* fa.bounds | ( 'STEP_SHIP_SCHEMA.VERTEX_LOOP' IN TYPEOF(bnds.bound)) ) | (NOT (SIZEOF(['STEP_SHIP_SCHEMA.CARTESIAN_POINT', 'STEP_SHIP_SCHEMA.DEGENERATE_PCURVE', 'STEP_SHIP_SCHEMA.POINT_ON_CURVE', 'STEP_SHIP_SCHEMA.POINT_ON_SURFACE'] * TYPEOF( vlp_fbnds\vertex_loop.loop_vertex\vertex_point. vertex_geometry)) = 1)) )) = 0))) )) = 0)) )) = 0)) )) = 0); END_ENTITY; ENTITY mapped_item SUBTYPE OF (representation_item); mapping_source : representation_map; mapping_target : representation_item; WHERE wr1: acyclic_mapped_representation(using_representations(SELF),[SELF]); END_ENTITY; -- ONLY IN AP203/AP216 ENTITY mass_measure_with_unit SUBTYPE OF (measure_with_unit); WHERE wr1: ('STEP_SHIP_SCHEMA.MASS_UNIT' IN TYPEOF(SELF\ measure_with_unit.unit_component)); END_ENTITY; -- ONLY IN AP203/AP215/AP216 ENTITY mass_unit SUBTYPE OF (named_unit); WHERE wr1: ((((((SELF\named_unit.dimensions.length_exponent = 0) AND (SELF \named_unit.dimensions.mass_exponent = 1)) AND (SELF\ named_unit.dimensions.time_exponent = 0)) AND (SELF\ named_unit.dimensions.electric_current_exponent = 0)) AND ( SELF\named_unit.dimensions. thermodynamic_temperature_exponent = 0)) AND (SELF\ named_unit.dimensions.amount_of_substance_exponent = 0)) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0); END_ENTITY; ENTITY measure_with_unit; value_component : measure_value; unit_component : unit; WHERE wr1: valid_units(SELF); END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY name_attribute; attribute_value : label; named_item : name_attribute_select; END_ENTITY; ENTITY named_unit SUPERTYPE OF (ONEOF (si_unit,context_dependent_unit) ANDOR ONEOF ( length_unit,mass_unit,time_unit,thermodynamic_temperature_unit, luminous_intensity_unit,plane_angle_unit, ratio_unit)); dimensions : dimensional_exponents; END_ENTITY; -- ONLY IN AP203 ENTITY next_assembly_usage_occurrence SUBTYPE OF (assembly_component_usage); END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY non_manifold_surface_shape_representation SUBTYPE OF (shape_representation); WHERE wr1 : SIZEOF(QUERY ( it <* SELF.items | (NOT (SIZEOF([ 'STEP_SHIP_SCHEMA.FACE_BASED_SURFACE_MODEL', 'STEP_SHIP_SCHEMA.MAPPED_ITEM', 'STEP_SHIP_SCHEMA.AXIS2_PLACEMENT_3D'] * TYPEOF(it)) = 1)) )) = 0; wr2 : SIZEOF(QUERY ( it <* SELF.items | (SIZEOF([ 'STEP_SHIP_SCHEMA.FACE_BASED_SURFACE_MODEL', 'STEP_SHIP_SCHEMA.MAPPED_ITEM'] * TYPEOF(it)) = 1) )) > 0; wr3 : SIZEOF(QUERY ( mi <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.MAPPED_ITEM' IN TYPEOF(it)) ) | ( NOT ((('STEP_SHIP_SCHEMA.' + 'NON_MANIFOLD_SURFACE_SHAPE_REPRESENTATION') IN TYPEOF(mi\ mapped_item.mapping_source.mapped_representation)) AND ( SIZEOF(QUERY ( mr_it <* mi\mapped_item.mapping_source. mapped_representation.items | ( 'STEP_SHIP_SCHEMA.FACE_BASED_SURFACE_MODEL' IN TYPEOF(mr_it)) )) > 0))) )) = 0; wr4 : SIZEOF(QUERY ( fbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.FACE_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* fbsm\ face_based_surface_model.fbsm_faces | (NOT (SIZEOF( QUERY ( fa <* cfs.cfs_faces | (NOT (SIZEOF([ 'STEP_SHIP_SCHEMA.FACE_SURFACE', 'STEP_SHIP_SCHEMA.ORIENTED_FACE'] * TYPEOF(fa)) = 1)) )) = 0)) )) = 0)) )) = 0; wr5 : SIZEOF(QUERY ( fbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.FACE_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* fbsm\ face_based_surface_model.fbsm_faces | (NOT (SIZEOF( QUERY ( f_sf <* QUERY ( fa <* cfs.cfs_faces | (( 'STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fa)) OR ( 'STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fa\ oriented_face.face_element))) ) | (NOT (( 'STEP_SHIP_SCHEMA.ADVANCED_FACE' IN TYPEOF(f_sf)) OR (SIZEOF(['STEP_SHIP_SCHEMA.B_SPLINE_SURFACE', 'STEP_SHIP_SCHEMA.ELEMENTARY_SURFACE', 'STEP_SHIP_SCHEMA.OFFSET_SURFACE', 'STEP_SHIP_SCHEMA.SURFACE_REPLICA', 'STEP_SHIP_SCHEMA.SWEPT_SURFACE'] * TYPEOF(f_sf\ face_surface.face_geometry)) = 1))) )) = 0)) )) = 0)) )) = 0; wr6 : SIZEOF(QUERY ( fbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.FACE_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* fbsm\ face_based_surface_model.fbsm_faces | (NOT (SIZEOF( QUERY ( f_sf <* QUERY ( fa <* cfs.cfs_faces | (( 'STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fa)) OR ( 'STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fa\ oriented_face.face_element))) ) | (NOT (( 'STEP_SHIP_SCHEMA.ADVANCED_FACE' IN TYPEOF(f_sf)) OR nmsf_surface_check(f_sf\face_surface.face_geometry))) )) = 0)) )) = 0)) )) = 0; wr7 : SIZEOF(QUERY ( fbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.FACE_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* fbsm\ face_based_surface_model.fbsm_faces | (NOT (SIZEOF( QUERY ( f_sf <* QUERY ( fa <* cfs.cfs_faces | (( 'STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fa)) OR ( 'STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fa\ oriented_face.face_element))) ) | (NOT (( 'STEP_SHIP_SCHEMA.ADVANCED_FACE' IN TYPEOF(f_sf)) OR (SIZEOF(QUERY ( bnds <* f_sf.bounds | (NOT (SIZEOF([ 'STEP_SHIP_SCHEMA.EDGE_LOOP', 'STEP_SHIP_SCHEMA.VERTEX_LOOP'] * TYPEOF(bnds.bound)) = 1)) )) = 0))) )) = 0)) )) = 0)) )) = 0; wr8 : SIZEOF(QUERY ( fbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.FACE_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* fbsm\ face_based_surface_model.fbsm_faces | (NOT (SIZEOF( QUERY ( f_sf <* QUERY ( fa <* cfs.cfs_faces | (( 'STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fa)) OR ( 'STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fa\ oriented_face.face_element))) ) | (NOT (( 'STEP_SHIP_SCHEMA.ADVANCED_FACE' IN TYPEOF(f_sf)) OR (SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* f_sf.bounds | ('STEP_SHIP_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds. bound)) ) | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds\path. edge_list | (NOT ('STEP_SHIP_SCHEMA.EDGE_CURVE' IN TYPEOF(oe.edge_element))) )) = 0)) )) = 0))) )) = 0)) )) = 0)) )) = 0; wr9 : SIZEOF(QUERY ( fbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.FACE_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* fbsm\ face_based_surface_model.fbsm_faces | (NOT (SIZEOF( QUERY ( f_sf <* QUERY ( fa <* cfs.cfs_faces | (( 'STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fa)) OR ( 'STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fa\ oriented_face.face_element))) ) | (NOT (( 'STEP_SHIP_SCHEMA.ADVANCED_FACE' IN TYPEOF(f_sf)) OR (SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* f_sf.bounds | ('STEP_SHIP_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds. bound)) ) | (NOT (SIZEOF(QUERY ( oe_cv <* QUERY ( oe <* elp_fbnds\path.edge_list | ( 'STEP_SHIP_SCHEMA.EDGE_CURVE' IN TYPEOF(oe. edge_element)) ) | (NOT (SIZEOF([ 'STEP_SHIP_SCHEMA.B_SPLINE_CURVE', 'STEP_SHIP_SCHEMA.CONIC', 'STEP_SHIP_SCHEMA.CURVE_REPLICA', 'STEP_SHIP_SCHEMA.LINE', 'STEP_SHIP_SCHEMA.OFFSET_CURVE_3D', 'STEP_SHIP_SCHEMA.PCURVE', 'STEP_SHIP_SCHEMA.POLYLINE', 'STEP_SHIP_SCHEMA.SURFACE_CURVE'] * TYPEOF(oe_cv. edge_element\edge_curve.edge_geometry)) = 1)) )) = 0)) )) = 0))) )) = 0)) )) = 0)) )) = 0; wr10: SIZEOF(QUERY ( fbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.FACE_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* fbsm\ face_based_surface_model.fbsm_faces | (NOT (SIZEOF( QUERY ( f_sf <* QUERY ( fa <* cfs.cfs_faces | (( 'STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fa)) OR ( 'STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fa\ oriented_face.face_element))) ) | (NOT (( 'STEP_SHIP_SCHEMA.ADVANCED_FACE' IN TYPEOF(f_sf)) OR (SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* f_sf.bounds | ('STEP_SHIP_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds. bound)) ) | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds\path. edge_list | (NOT nmsf_curve_check(oe.edge_element\ edge_curve.edge_geometry)) )) = 0)) )) = 0))) )) = 0)) )) = 0)) )) = 0; wr11: SIZEOF(QUERY ( fbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.FACE_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* fbsm\ face_based_surface_model.fbsm_faces | (NOT (SIZEOF( QUERY ( f_sf <* QUERY ( fa <* cfs.cfs_faces | (( 'STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fa)) OR ( 'STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fa\ oriented_face.face_element))) ) | (NOT (( 'STEP_SHIP_SCHEMA.ADVANCED_FACE' IN TYPEOF(f_sf)) OR (SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* f_sf.bounds | ('STEP_SHIP_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds. bound)) ) | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds\path. edge_list | (NOT (('STEP_SHIP_SCHEMA.VERTEX_POINT' IN TYPEOF(oe.edge_element.edge_start)) AND ( 'STEP_SHIP_SCHEMA.VERTEX_POINT' IN TYPEOF(oe. edge_element.edge_end)))) )) = 0)) )) = 0))) )) = 0)) )) = 0)) )) = 0; wr12: SIZEOF(QUERY ( fbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.FACE_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* fbsm\ face_based_surface_model.fbsm_faces | (NOT (SIZEOF( QUERY ( f_sf <* QUERY ( fa <* cfs.cfs_faces | (( 'STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fa)) OR ( 'STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fa\ oriented_face.face_element))) ) | (NOT (( 'STEP_SHIP_SCHEMA.ADVANCED_FACE' IN TYPEOF(f_sf)) OR (SIZEOF(QUERY ( elp_fbnds <* QUERY ( bnds <* f_sf.bounds | ('STEP_SHIP_SCHEMA.EDGE_LOOP' IN TYPEOF(bnds. bound)) ) | (NOT (SIZEOF(QUERY ( oe <* elp_fbnds\path. edge_list | (NOT ((SIZEOF([ 'STEP_SHIP_SCHEMA.CARTESIAN_POINT', 'STEP_SHIP_SCHEMA.DEGENERATE_PCURVE', 'STEP_SHIP_SCHEMA.POINT_ON_CURVE', 'STEP_SHIP_SCHEMA.POINT_ON_SURFACE'] * TYPEOF(oe. edge_element.edge_start\vertex_point.vertex_geometry)) = 1) AND (SIZEOF(['STEP_SHIP_SCHEMA.CARTESIAN_POINT', 'STEP_SHIP_SCHEMA.DEGENERATE_PCURVE', 'STEP_SHIP_SCHEMA.POINT_ON_CURVE', 'STEP_SHIP_SCHEMA.POINT_ON_SURFACE'] * TYPEOF(oe. edge_element.edge_end\vertex_point.vertex_geometry)) = 1))) )) = 0)) )) = 0))) )) = 0)) )) = 0)) )) = 0; wr13: SIZEOF(QUERY ( fbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.FACE_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* fbsm\ face_based_surface_model.fbsm_faces | (NOT (SIZEOF( QUERY ( f_sf <* QUERY ( fa <* cfs.cfs_faces | (( 'STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fa)) OR ( 'STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fa\ oriented_face.face_element))) ) | (NOT (( 'STEP_SHIP_SCHEMA.ADVANCED_FACE' IN TYPEOF(f_sf)) OR (SIZEOF(QUERY ( vlp_fbnds <* QUERY ( bnds <* f_sf.bounds | ('STEP_SHIP_SCHEMA.VERTEX_LOOP' IN TYPEOF(bnds. bound)) ) | (NOT ('STEP_SHIP_SCHEMA.VERTEX_POINT' IN TYPEOF(vlp_fbnds\vertex_loop.loop_vertex))) )) = 0))) )) = 0)) )) = 0)) )) = 0; wr14: SIZEOF(QUERY ( fbsm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.FACE_BASED_SURFACE_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( cfs <* fbsm\ face_based_surface_model.fbsm_faces | (NOT (SIZEOF( QUERY ( f_sf <* QUERY ( fa <* cfs.cfs_faces | (( 'STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fa)) OR ( 'STEP_SHIP_SCHEMA.FACE_SURFACE' IN TYPEOF(fa\ oriented_face.face_element))) ) | (NOT (( 'STEP_SHIP_SCHEMA.ADVANCED_FACE' IN TYPEOF(f_sf)) OR (SIZEOF(QUERY ( vlp_fbnds <* QUERY ( bnds <* f_sf.bounds | ('STEP_SHIP_SCHEMA.VERTEX_LOOP' IN TYPEOF(bnds. bound)) ) | (NOT (SIZEOF([ 'STEP_SHIP_SCHEMA.CARTESIAN_POINT', 'STEP_SHIP_SCHEMA.DEGENERATE_PCURVE', 'STEP_SHIP_SCHEMA.POINT_ON_CURVE', 'STEP_SHIP_SCHEMA.POINT_ON_SURFACE'] * TYPEOF( vlp_fbnds\vertex_loop.loop_vertex\vertex_point. vertex_geometry)) = 1)) )) = 0))) )) = 0)) )) = 0)) )) = 0; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY object_role; name : label; description : OPTIONAL text; END_ENTITY; ENTITY offset_curve_3d SUBTYPE OF (curve); basis_curve : curve; distance : length_measure; self_intersect : LOGICAL; ref_direction : direction; WHERE wr1: (basis_curve.dim = 3) AND (ref_direction.dim = 3); END_ENTITY; ENTITY offset_surface SUBTYPE OF (surface); basis_surface : surface; distance : length_measure; self_intersect : LOGICAL; END_ENTITY; ENTITY open_shell SUBTYPE OF (connected_face_set); END_ENTITY; ENTITY ordinal_date SUBTYPE OF (date); day_component : day_in_year_number; WHERE wr1: ((NOT leap_year(SELF.year_component)) AND ((1 <= day_component) AND (day_component <= 365))) OR (leap_year(SELF. year_component) AND ((1 <= day_component) AND (day_component <= 366))); END_ENTITY; ENTITY organization; id : OPTIONAL identifier; name : label; description : OPTIONAL text; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY organization_assignment ABSTRACT SUPERTYPE; assigned_organization : organization; role : organization_role; END_ENTITY; -- ONLY IN AP203 ENTITY organization_relationship; name : label; description : text; relating_organization : organization; related_organization : organization; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY organization_role; name : label; DERIVE description : text := get_description_value(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1; END_ENTITY; ENTITY organizational_address SUBTYPE OF (address); organizations : SET [1:?] OF organization; description : OPTIONAL text; END_ENTITY; ENTITY organizational_project; name : label; description : OPTIONAL text; responsible_organizations : SET [1:?] OF organization; DERIVE id : identifier := get_id_value(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1; END_ENTITY; ENTITY oriented_closed_shell SUBTYPE OF (closed_shell); closed_shell_element : closed_shell; orientation : BOOLEAN; DERIVE SELF\connected_face_set.cfs_faces : SET [1:?] OF face := conditional_reverse(SELF. orientation,SELF. closed_shell_element.cfs_faces); WHERE wr1: NOT ('STEP_SHIP_SCHEMA.ORIENTED_CLOSED_SHELL' IN TYPEOF(SELF.closed_shell_element)); END_ENTITY; ENTITY oriented_edge SUBTYPE OF (edge); edge_element : edge; orientation : BOOLEAN; DERIVE SELF\edge.edge_start : vertex := boolean_choose(SELF.orientation, SELF.edge_element.edge_start,SELF. edge_element.edge_end); SELF\edge.edge_end : vertex := boolean_choose(SELF.orientation, SELF.edge_element.edge_end,SELF. edge_element.edge_start); WHERE wr1: NOT ('STEP_SHIP_SCHEMA.ORIENTED_EDGE' IN TYPEOF(SELF. edge_element)); END_ENTITY; ENTITY oriented_face SUBTYPE OF (face); face_element : face; orientation : BOOLEAN; DERIVE SELF\face.bounds : SET [1:?] OF face_bound := conditional_reverse( SELF.orientation,SELF.face_element.bounds); WHERE wr1: NOT ('STEP_SHIP_SCHEMA.ORIENTED_FACE' IN TYPEOF(SELF. face_element)); END_ENTITY; ENTITY oriented_open_shell SUBTYPE OF (open_shell); open_shell_element : open_shell; orientation : BOOLEAN; DERIVE SELF\connected_face_set.cfs_faces : SET [1:?] OF face := conditional_reverse(SELF. orientation,SELF. open_shell_element.cfs_faces); WHERE wr1: NOT ('STEP_SHIP_SCHEMA.ORIENTED_OPEN_SHELL' IN TYPEOF( SELF.open_shell_element)); END_ENTITY; ENTITY oriented_path SUBTYPE OF (path); path_element : path; orientation : BOOLEAN; DERIVE SELF\path.edge_list : LIST [1:?] OF UNIQUE oriented_edge := conditional_reverse(SELF.orientation,SELF. path_element.edge_list); WHERE wr1: NOT ('STEP_SHIP_SCHEMA.ORIENTED_PATH' IN TYPEOF(SELF. path_element)); END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY oriented_surface SUBTYPE OF (surface); orientation : BOOLEAN; END_ENTITY; -- ONLY IN AP203 ENTITY outer_boundary_curve SUBTYPE OF (boundary_curve); END_ENTITY; ENTITY parabola SUBTYPE OF (conic); focal_dist : length_measure; WHERE wr1: focal_dist <> 0; END_ENTITY; ENTITY parametric_representation_context SUBTYPE OF (representation_context); END_ENTITY; ENTITY path SUPERTYPE OF (ONEOF (edge_loop,oriented_path)) SUBTYPE OF (topological_representation_item); edge_list : LIST [1:?] OF UNIQUE oriented_edge; WHERE wr1: path_head_to_tail(SELF); END_ENTITY; ENTITY pcurve SUBTYPE OF (curve); basis_surface : surface; reference_to_curve : definitional_representation; WHERE wr1: SIZEOF(reference_to_curve\representation.items) = 1; wr2: 'STEP_SHIP_SCHEMA.CURVE' IN TYPEOF(reference_to_curve\ representation.items[1]); wr3: reference_to_curve\representation.items[1]\ geometric_representation_item.dim = 2; END_ENTITY; ENTITY person; id : identifier; last_name : OPTIONAL label; first_name : OPTIONAL label; middle_names : OPTIONAL LIST [1:?] OF label; prefix_titles : OPTIONAL LIST [1:?] OF label; suffix_titles : OPTIONAL LIST [1:?] OF label; WHERE wr1: EXISTS(last_name) OR EXISTS(first_name); END_ENTITY; ENTITY person_and_organization; the_person : person; the_organization : organization; DERIVE name : label := get_name_value(SELF); description : text := get_description_value(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1; wr2: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1; END_ENTITY; ENTITY person_and_organization_assignment ABSTRACT SUPERTYPE; assigned_person_and_organization : person_and_organization; role : person_and_organization_role; END_ENTITY; ENTITY person_and_organization_role; name : label; DERIVE description : text := get_description_value(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY person_assignment ABSTRACT SUPERTYPE; assigned_person : person; role : person_role; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY person_role; name : label; DERIVE description : text := get_description_value(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1; END_ENTITY; ENTITY personal_address SUBTYPE OF (address); people : SET [1:?] OF person; description : OPTIONAL text; END_ENTITY; ENTITY placement SUPERTYPE OF (ONEOF (axis1_placement,axis2_placement_2d, axis2_placement_3d)) SUBTYPE OF (geometric_representation_item); location : cartesian_point; END_ENTITY; ENTITY plane SUBTYPE OF (elementary_surface); END_ENTITY; -- ONLY IN AP203/AP216 ENTITY plane_angle_measure_with_unit SUBTYPE OF (measure_with_unit); WHERE wr1: ('STEP_SHIP_SCHEMA.PLANE_ANGLE_UNIT' IN TYPEOF(SELF\ measure_with_unit.unit_component)); END_ENTITY; ENTITY plane_angle_unit SUBTYPE OF (named_unit); WHERE wr1: ((((((SELF\named_unit.dimensions.length_exponent = 0) AND (SELF \named_unit.dimensions.mass_exponent = 0)) AND (SELF\ named_unit.dimensions.time_exponent = 0)) AND (SELF\ named_unit.dimensions.electric_current_exponent = 0)) AND ( SELF\named_unit.dimensions. thermodynamic_temperature_exponent = 0)) AND (SELF\ named_unit.dimensions.amount_of_substance_exponent = 0)) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0); END_ENTITY; ENTITY point SUPERTYPE OF (ONEOF (cartesian_point,point_on_curve,point_on_surface, degenerate_pcurve)) SUBTYPE OF (geometric_representation_item); END_ENTITY; ENTITY point_on_curve SUBTYPE OF (point); basis_curve : curve; point_parameter : parameter_value; END_ENTITY; ENTITY point_on_surface SUBTYPE OF (point); basis_surface : surface; point_parameter_u : parameter_value; point_parameter_v : parameter_value; END_ENTITY; -- ONLY IN AP203/AP216/AP218 ENTITY point_replica SUBTYPE OF (point); parent_pt : point; transformation : cartesian_transformation_operator; WHERE wr1: (transformation.dim = parent_pt.dim); wr2: acyclic_point_replica(SELF,parent_pt); END_ENTITY; ENTITY poly_loop SUBTYPE OF (loop, geometric_representation_item); polygon : LIST [3:?] OF UNIQUE cartesian_point; END_ENTITY; ENTITY polyline SUBTYPE OF (bounded_curve); points : LIST [2:?] OF cartesian_point; END_ENTITY; -- ONLY IN AP218 ENTITY pre_defined_item; name : label; END_ENTITY; ENTITY product; id : identifier; name : label; description : OPTIONAL text; frame_of_reference : SET [1:?] OF product_context; END_ENTITY; ENTITY product_category; name : label; description : OPTIONAL text; DERIVE id : identifier := get_id_value(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1; END_ENTITY; -- ONLY IN AP203/AP216/AP218 ENTITY product_category_relationship; name : label; description : OPTIONAL text; category : product_category; sub_category : product_category; WHERE wr1: acyclic_product_category_relationship(SELF,[SELF.sub_category]); END_ENTITY; -- ONLY IN AP203 ENTITY product_concept; id : identifier; name : label; description : text; market_context : product_concept_context; UNIQUE ur1 : id; END_ENTITY; -- ONLY IN AP203 ENTITY product_concept_context SUBTYPE OF (application_context_element); market_segment_type : label; END_ENTITY; ENTITY product_context SUBTYPE OF (application_context_element); discipline_type : label; END_ENTITY; ENTITY product_definition; id : identifier; description : OPTIONAL text; formation : product_definition_formation; frame_of_reference : product_definition_context; DERIVE name : label := get_name_value(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1; END_ENTITY; ENTITY product_definition_context SUBTYPE OF (application_context_element); life_cycle_stage : label; END_ENTITY; -- ONLY IN AP203 ENTITY product_definition_effectivity SUBTYPE OF (effectivity); usage : product_definition_relationship; UNIQUE ur1 : usage, id; END_ENTITY; ENTITY product_definition_formation; id : identifier; description : OPTIONAL text; of_product : product; UNIQUE ur1 : id, of_product; END_ENTITY; -- ONLY IN AP203 ENTITY product_definition_formation_with_specified_source SUBTYPE OF (product_definition_formation); make_or_buy : source; END_ENTITY; ENTITY product_definition_relationship; id : identifier; name : label; description : OPTIONAL text; relating_product_definition : product_definition; related_product_definition : product_definition; END_ENTITY; ENTITY product_definition_shape SUBTYPE OF (property_definition); UNIQUE ur1 : definition; WHERE wr1: SIZEOF([ 'STEP_SHIP_SCHEMA.CHARACTERIZED_PRODUCT_DEFINITION', 'STEP_SHIP_SCHEMA.CHARACTERIZED_OBJECT'] * TYPEOF( SELF\property_definition.definition)) > 0; END_ENTITY; -- ONLY IN AP203 ENTITY product_definition_usage SUPERTYPE OF (assembly_component_usage) SUBTYPE OF (product_definition_relationship); UNIQUE ur1 : id, relating_product_definition, related_product_definition; WHERE wr1: acyclic_product_definition_relationship(SELF,[SELF\ product_definition_relationship.related_product_definition], 'STEP_SHIP_SCHEMA.PRODUCT_DEFINITION_USAGE'); END_ENTITY; -- ONLY IN AP203/AP215/AP218 ENTITY product_definition_with_associated_documents SUBTYPE OF (product_definition); documentation_ids : SET [1:?] OF document; END_ENTITY; ENTITY product_related_product_category SUBTYPE OF (product_category); products : SET [1:?] OF product; END_ENTITY; -- ONLY IN AP203 ENTITY promissory_usage_occurrence SUBTYPE OF (assembly_component_usage); END_ENTITY; ENTITY property_definition; name : label; description : OPTIONAL text; definition : characterized_definition; DERIVE id : identifier := get_id_value(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY property_definition_relationship; name : label; description : text; relating_property_definition : property_definition; related_property_definition : property_definition; END_ENTITY; ENTITY property_definition_representation; definition : represented_definition; used_representation : representation; DERIVE description : text := get_description_value(SELF); name : label := get_name_value(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1; wr2: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'NAME_ATTRIBUTE.NAMED_ITEM')) <= 1; END_ENTITY; -- ONLY IN AP203 ENTITY quantified_assembly_component_usage SUBTYPE OF (assembly_component_usage); quantity : measure_with_unit; END_ENTITY; ENTITY quasi_uniform_curve SUBTYPE OF (b_spline_curve); END_ENTITY; ENTITY quasi_uniform_surface SUBTYPE OF (b_spline_surface); END_ENTITY; -- ONLY IN AP215/AP216 ENTITY ratio_unit SUBTYPE OF (named_unit); WHERE wr1: ((((((SELF\named_unit.dimensions.length_exponent = 0) AND (SELF \named_unit.dimensions.mass_exponent = 0)) AND (SELF\ named_unit.dimensions.time_exponent = 0)) AND (SELF\ named_unit.dimensions.electric_current_exponent = 0)) AND ( SELF\named_unit.dimensions. thermodynamic_temperature_exponent = 0)) AND (SELF\ named_unit.dimensions.amount_of_substance_exponent = 0)) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0); END_ENTITY; ENTITY rational_b_spline_curve SUBTYPE OF (b_spline_curve); weights_data : LIST [2:?] OF REAL; DERIVE weights : ARRAY [0:upper_index_on_control_points] OF REAL := list_to_array(weights_data,0, upper_index_on_control_points); WHERE wr1: SIZEOF(weights_data) = SIZEOF(SELF\b_spline_curve. control_points_list); wr2: curve_weights_positive(SELF); END_ENTITY; ENTITY rational_b_spline_surface SUBTYPE OF (b_spline_surface); weights_data : LIST [2:?] OF LIST [2:?] OF REAL; DERIVE weights : ARRAY [0:u_upper] OF ARRAY [0:v_upper] OF REAL := make_array_of_array(weights_data,0,u_upper,0,v_upper); WHERE wr1: (SIZEOF(weights_data) = SIZEOF(SELF\b_spline_surface. control_points_list)) AND (SIZEOF(weights_data[1]) = SIZEOF( SELF\b_spline_surface.control_points_list[1])); wr2: surface_weights_positive(SELF); END_ENTITY; -- ONLY IN AP203 ENTITY rectangular_composite_surface SUBTYPE OF (bounded_surface); segments : LIST [1:?] OF LIST [1:?] OF surface_patch; DERIVE n_u : INTEGER := SIZEOF(segments); n_v : INTEGER := SIZEOF(segments[1]); WHERE wr1: ([] = QUERY ( s <* segments | (n_v <> SIZEOF(s)) )); wr2: constraints_rectangular_composite_surface(SELF); END_ENTITY; -- ONLY IN AP203 ENTITY rectangular_trimmed_surface SUBTYPE OF (bounded_surface); basis_surface : surface; u1 : parameter_value; u2 : parameter_value; v1 : parameter_value; v2 : parameter_value; usense : BOOLEAN; vsense : BOOLEAN; WHERE wr1: (u1 <> u2); wr2: (v1 <> v2); wr3: ((('STEP_SHIP_SCHEMA.ELEMENTARY_SURFACE' IN TYPEOF( basis_surface)) AND (NOT ('STEP_SHIP_SCHEMA.PLANE' IN TYPEOF(basis_surface)))) OR ( 'STEP_SHIP_SCHEMA.SURFACE_OF_REVOLUTION' IN TYPEOF( basis_surface)) OR (usense = (u2 > u1))); wr4: (('STEP_SHIP_SCHEMA.SPHERICAL_SURFACE' IN TYPEOF( basis_surface)) OR ('STEP_SHIP_SCHEMA.TOROIDAL_SURFACE' IN TYPEOF(basis_surface)) OR (vsense = (v2 > v1))); END_ENTITY; -- ONLY IN AP203/AP218 ENTITY reparametrised_composite_curve_segment SUBTYPE OF (composite_curve_segment); param_length : parameter_value; WHERE wr1: (param_length > 0); END_ENTITY; ENTITY representation; name : label; items : SET [1:?] OF representation_item; context_of_items : representation_context; DERIVE id : identifier := get_id_value(SELF); description : text := get_description_value(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1; wr2: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1; END_ENTITY; ENTITY representation_context; context_identifier : identifier; context_type : text; INVERSE representations_in_context : SET [1:?] OF representation FOR context_of_items; END_ENTITY; ENTITY representation_item; name : label; WHERE wr1: SIZEOF(using_representations(SELF)) > 0; END_ENTITY; ENTITY representation_map; mapping_origin : representation_item; mapped_representation : representation; INVERSE map_usage : SET [1:?] OF mapped_item FOR mapping_source; WHERE wr1: item_in_context(SELF.mapping_origin,SELF.mapped_representation. context_of_items); END_ENTITY; ENTITY representation_relationship; name : label; description : OPTIONAL text; rep_1 : representation; rep_2 : representation; END_ENTITY; -- ONLY IN AP203 ENTITY representation_relationship_with_transformation SUBTYPE OF (representation_relationship); transformation_operator : transformation; WHERE wr1: (SELF\representation_relationship.rep_1.context_of_items :<>: SELF\representation_relationship.rep_2.context_of_items); END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY role_association; role : object_role; item_with_role : role_select; END_ENTITY; ENTITY seam_curve SUBTYPE OF (surface_curve); WHERE wr1: SIZEOF(SELF\surface_curve.associated_geometry) = 2; wr2: associated_surface(SELF\surface_curve.associated_geometry[1]) = associated_surface(SELF\surface_curve.associated_geometry[2]); wr3: 'STEP_SHIP_SCHEMA.PCURVE' IN TYPEOF(SELF\surface_curve. associated_geometry[1]); wr4: 'STEP_SHIP_SCHEMA.PCURVE' IN TYPEOF(SELF\surface_curve. associated_geometry[2]); END_ENTITY; -- ONLY IN AP203 ENTITY security_classification; name : label; purpose : text; security_level : security_classification_level; END_ENTITY; -- ONLY IN AP203 ENTITY security_classification_assignment ABSTRACT SUPERTYPE; assigned_security_classification : security_classification; END_ENTITY; -- ONLY IN AP203 ENTITY security_classification_level; name : label; END_ENTITY; -- ONLY IN AP203/AP215/AP216 ENTITY serial_numbered_effectivity SUBTYPE OF (effectivity); effectivity_start_id : identifier; effectivity_end_id : OPTIONAL identifier; END_ENTITY; ENTITY shape_aspect; name : label; description : OPTIONAL text; of_shape : product_definition_shape; product_definitional : LOGICAL; DERIVE id : identifier := get_id_value(SELF); WHERE wr1: SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1; END_ENTITY; -- ONLY IN AP203/AP218 ENTITY shape_aspect_relationship; name : label; description : OPTIONAL text; relating_shape_aspect : shape_aspect; related_shape_aspect : shape_aspect; DERIVE id : identifier := get_id_value(SELF); WHERE wr1: (SIZEOF(USEDIN(SELF,'STEP_SHIP_SCHEMA.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1); END_ENTITY; ENTITY shape_definition_representation SUBTYPE OF (property_definition_representation); WHERE wr1: (('STEP_SHIP_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(SELF.definition)) OR ( 'STEP_SHIP_SCHEMA.SHAPE_DEFINITION' IN TYPEOF(SELF.definition.definition))); wr2: ('STEP_SHIP_SCHEMA.SHAPE_REPRESENTATION' IN TYPEOF(SELF.used_representation)); END_ENTITY; ENTITY shape_representation SUBTYPE OF (representation); END_ENTITY; -- ONLY IN AP203 ENTITY shape_representation_relationship SUBTYPE OF (representation_relationship); WHERE wr1: ('STEP_SHIP_SCHEMA.SHAPE_REPRESENTATION' IN (TYPEOF(SELF\ representation_relationship.rep_1) + TYPEOF(SELF\ representation_relationship.rep_2))); END_ENTITY; -- ONLY IN AP203 ENTITY shell_based_surface_model SUBTYPE OF (geometric_representation_item); sbsm_boundary : SET [1:?] OF shell; WHERE wr1: constraints_geometry_shell_based_surface_model(SELF); END_ENTITY; -- ONLY IN AP203 ENTITY shell_based_wireframe_model SUBTYPE OF (geometric_representation_item); sbwm_boundary : SET [1:?] OF shell; WHERE wr1: constraints_geometry_shell_based_wireframe_model(SELF); END_ENTITY; -- ONLY IN AP203 ENTITY shell_based_wireframe_shape_representation SUBTYPE OF (shape_representation); WHERE wr1 : (SIZEOF(QUERY ( it <* SELF.items | (NOT (SIZEOF([ 'STEP_SHIP_SCHEMA.SHELL_BASED_WIREFRAME_MODEL', 'STEP_SHIP_SCHEMA.MAPPED_ITEM', 'STEP_SHIP_SCHEMA.AXIS2_PLACEMENT_3D'] * TYPEOF(it)) = 1)) )) = 0); wr2 : (SIZEOF(QUERY ( it <* SELF.items | (SIZEOF([ 'STEP_SHIP_SCHEMA.SHELL_BASED_WIREFRAME_MODEL', 'STEP_SHIP_SCHEMA.MAPPED_ITEM'] * TYPEOF(it)) = 1) )) >= 1); wr3 : (SIZEOF(QUERY ( sbwm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( ws <* QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary | ( 'STEP_SHIP_SCHEMA.WIRE_SHELL' IN TYPEOF(sb)) ) | (NOT (SIZEOF(QUERY ( eloop <* QUERY ( wsb <* ws\wire_shell. wire_shell_extent | ('STEP_SHIP_SCHEMA.EDGE_LOOP' IN TYPEOF(wsb)) ) | (NOT (SIZEOF(QUERY ( el <* eloop\path. edge_list | (NOT ('STEP_SHIP_SCHEMA.EDGE_CURVE' IN TYPEOF(el.edge_element))) )) = 0)) )) = 0)) )) = 0)) )) = 0); wr4 : (SIZEOF(QUERY ( sbwm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( ws <* QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary | ( 'STEP_SHIP_SCHEMA.WIRE_SHELL' IN TYPEOF(sb)) ) | (NOT (SIZEOF(QUERY ( eloop <* QUERY ( wsb <* ws\wire_shell. wire_shell_extent | ('STEP_SHIP_SCHEMA.EDGE_LOOP' IN TYPEOF(wsb)) ) | (NOT (SIZEOF(QUERY ( pline_el <* QUERY ( el <* eloop\path.edge_list | ( 'STEP_SHIP_SCHEMA.POLYLINE' IN TYPEOF(el.edge_element\ edge_curve.edge_geometry)) ) | (NOT (SIZEOF(pline_el. edge_element\edge_curve.edge_geometry\polyline.points) > 2)) )) = 0)) )) = 0)) )) = 0)) )) = 0); wr5 : (SIZEOF(QUERY ( sbwm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( ws <* QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary | ( 'STEP_SHIP_SCHEMA.WIRE_SHELL' IN TYPEOF(sb)) ) | (NOT (SIZEOF(QUERY ( eloop <* QUERY ( wsb <* ws\wire_shell. wire_shell_extent | ('STEP_SHIP_SCHEMA.EDGE_LOOP' IN TYPEOF(wsb)) ) | (NOT (SIZEOF(QUERY ( el <* eloop\path. edge_list | (NOT valid_wireframe_edge_curve(el.edge_element \edge_curve.edge_geometry)) )) = 0)) )) = 0)) )) = 0)) )) = 0); wr6 : (SIZEOF(QUERY ( sbwm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( ws <* QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary | ( 'STEP_SHIP_SCHEMA.WIRE_SHELL' IN TYPEOF(sb)) ) | (NOT (SIZEOF(QUERY ( eloop <* QUERY ( wsb <* ws\wire_shell. wire_shell_extent | ('STEP_SHIP_SCHEMA.EDGE_LOOP' IN TYPEOF(wsb)) ) | (NOT (SIZEOF(QUERY ( el <* eloop\path. edge_list | (NOT (('STEP_SHIP_SCHEMA.VERTEX_POINT' IN TYPEOF(el.edge_element.edge_start)) AND ( 'STEP_SHIP_SCHEMA.VERTEX_POINT' IN TYPEOF(el. edge_element.edge_end)))) )) = 0)) )) = 0)) )) = 0)) )) = 0); wr7 : (SIZEOF(QUERY ( sbwm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( ws <* QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary | ( 'STEP_SHIP_SCHEMA.WIRE_SHELL' IN TYPEOF(sb)) ) | (NOT (SIZEOF(QUERY ( eloop <* QUERY ( wsb <* ws\wire_shell. wire_shell_extent | ('STEP_SHIP_SCHEMA.EDGE_LOOP' IN TYPEOF(wsb)) ) | (NOT (SIZEOF(QUERY ( el <* eloop\path. edge_list | (NOT (valid_wireframe_vertex_point(el. edge_element.edge_start\vertex_point.vertex_geometry) AND valid_wireframe_vertex_point(el.edge_element.edge_end\ vertex_point.vertex_geometry))) )) = 0)) )) = 0)) )) = 0)) )) = 0); wr8 : (SIZEOF(QUERY ( sbwm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( ws <* QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary | ( 'STEP_SHIP_SCHEMA.WIRE_SHELL' IN TYPEOF(sb)) ) | (NOT (SIZEOF(QUERY ( vloop <* QUERY ( wsb <* ws\wire_shell. wire_shell_extent | ('STEP_SHIP_SCHEMA.VERTEX_LOOP' IN TYPEOF(wsb)) ) | (NOT ( 'STEP_SHIP_SCHEMA.VERTEX_POINT' IN TYPEOF(vloop\ vertex_loop.loop_vertex))) )) = 0)) )) = 0)) )) = 0); wr9 : (SIZEOF(QUERY ( sbwm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( ws <* QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary | ( 'STEP_SHIP_SCHEMA.WIRE_SHELL' IN TYPEOF(sb)) ) | (NOT (SIZEOF(QUERY ( vloop <* QUERY ( wsb <* ws\wire_shell. wire_shell_extent | ('STEP_SHIP_SCHEMA.VERTEX_LOOP' IN TYPEOF(wsb)) ) | (NOT valid_wireframe_vertex_point(vloop\ vertex_loop.loop_vertex\vertex_point.vertex_geometry)) )) = 0)) )) = 0)) )) = 0); wr10: (SIZEOF(QUERY ( sbwm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( vs <* QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary | ( 'STEP_SHIP_SCHEMA.VERTEX_SHELL' IN TYPEOF(sb)) ) | ( NOT ('STEP_SHIP_SCHEMA.VERTEX_POINT' IN TYPEOF(vs\ vertex_shell.vertex_shell_extent.loop_vertex))) )) = 0)) )) = 0); wr11: (SIZEOF(QUERY ( sbwm <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.SHELL_BASED_WIREFRAME_MODEL' IN TYPEOF(it)) ) | (NOT (SIZEOF(QUERY ( vs <* QUERY ( sb <* sbwm\shell_based_wireframe_model.sbwm_boundary | ( 'STEP_SHIP_SCHEMA.VERTEX_SHELL' IN TYPEOF(sb)) ) | ( NOT valid_wireframe_vertex_point(vs\vertex_shell. vertex_shell_extent.loop_vertex\vertex_point. vertex_geometry)) )) = 0)) )) = 0); wr12: (SIZEOF(QUERY ( mi <* QUERY ( it <* SELF.items | ( 'STEP_SHIP_SCHEMA.MAPPED_ITEM' IN TYPEOF(it)) ) | ( NOT (('STEP_SHIP_SCHEMA.' + 'SHELL_BASED_WIREFRAME_SHAPE_REPRESENTATION') IN TYPEOF(mi\ mapped_item.mapping_source.mapped_representation))) )) = 0); wr13: (SELF.context_of_items\geometric_representation_context. coordinate_space_dimension = 3); END_ENTITY; ENTITY si_unit SUBTYPE OF (named_unit); prefix : OPTIONAL si_prefix; name : si_unit_name; DERIVE SELF\named_unit.dimensions : dimensional_exponents := dimensions_for_si_unit(name); END_ENTITY; -- ONLY IN AP203/AP216 ENTITY solid_angle_measure_with_unit SUBTYPE OF (measure_with_unit); WHERE wr1: ('STEP_SHIP_SCHEMA.SOLID_ANGLE_UNIT' IN TYPEOF(SELF\ measure_with_unit.unit_component)); END_ENTITY; -- ONLY IN AP203/AP216 ENTITY solid_angle_unit SUBTYPE OF (named_unit); WHERE wr1: ((SELF\named_unit.dimensions.length_exponent = 0) AND (SELF\ named_unit.dimensions.mass_exponent = 0) AND (SELF\ named_unit.dimensions.time_exponent = 0) AND (SELF\ named_unit.dimensions.electric_current_exponent = 0) AND ( SELF\named_unit.dimensions. thermodynamic_temperature_exponent = 0) AND (SELF\named_unit .dimensions.amount_of_substance_exponent = 0) AND (SELF\ named_unit.dimensions.luminous_intensity_exponent = 0)); END_ENTITY; -- ONLY IN AP203/AP216/AP218 ENTITY solid_model SUPERTYPE OF (manifold_solid_brep) SUBTYPE OF (geometric_representation_item); END_ENTITY; -- ONLY IN AP203 ENTITY specified_higher_usage_occurrence SUBTYPE OF (assembly_component_usage); upper_usage : assembly_component_usage; next_usage : next_assembly_usage_occurrence; UNIQUE ur1 : upper_usage, next_usage; WHERE wr1: (SELF :<>: upper_usage); wr2: (SELF\product_definition_relationship. relating_product_definition :=: upper_usage. relating_product_definition); wr3: (SELF\product_definition_relationship. related_product_definition :=: next_usage. related_product_definition); wr4: (upper_usage.related_product_definition :=: next_usage. relating_product_definition); wr5: (NOT ('STEP_SHIP_SCHEMA.PROMISSORY_USAGE_OCCURRENCE' IN TYPEOF(upper_usage))); END_ENTITY; ENTITY spherical_surface SUBTYPE OF (elementary_surface); radius : positive_length_measure; END_ENTITY; -- ONLY IN AP203 ENTITY start_request SUBTYPE OF (action_request_assignment); items : SET [1:?] OF start_request_item; END_ENTITY; -- ONLY IN AP203 ENTITY start_work SUBTYPE OF (action_assignment); items : SET [1:?] OF work_item; END_ENTITY; -- ONLY IN AP216 ENTITY subface SUBTYPE OF (face); parent_face : face; WHERE wr1: (NOT mixed_loop_type_set(list_to_set(list_face_loops(SELF)) + list_to_set(list_face_loops(parent_face)))); END_ENTITY; -- ONLY IN AP203 ENTITY supplied_part_relationship SUBTYPE OF (product_definition_relationship); END_ENTITY; ENTITY surface SUPERTYPE OF (ONEOF (elementary_surface,swept_surface,bounded_surface, offset_surface,surface_replica)) SUBTYPE OF (geometric_representation_item); END_ENTITY; ENTITY surface_curve SUPERTYPE OF (ONEOF (intersection_curve,seam_curve) ANDOR bounded_surface_curve) SUBTYPE OF (curve); curve_3d : curve; associated_geometry : LIST [1:2] OF pcurve_or_surface; master_representation : preferred_surface_curve_representation; DERIVE basis_surface : SET [1:2] OF surface := get_basis_surface(SELF); WHERE wr1: curve_3d.dim = 3; wr2: ('STEP_SHIP_SCHEMA.PCURVE' IN TYPEOF( associated_geometry[1])) OR (master_representation <> pcurve_s1); wr3: ('STEP_SHIP_SCHEMA.PCURVE' IN TYPEOF( associated_geometry[2])) OR (master_representation <> pcurve_s2); wr4: NOT ('STEP_SHIP_SCHEMA.PCURVE' IN TYPEOF(curve_3d)); END_ENTITY; ENTITY surface_of_linear_extrusion SUBTYPE OF (swept_surface); extrusion_axis : vector; END_ENTITY; ENTITY surface_of_revolution SUBTYPE OF (swept_surface); axis_position : axis1_placement; DERIVE axis_line : line := (dummy_gri || curve()) || line(axis_position. location,dummy_gri || vector(axis_position.z,1)); END_ENTITY; -- ONLY IN AP203 ENTITY surface_patch SUBTYPE OF (founded_item); parent_surface : bounded_surface; u_transition : transition_code; v_transition : transition_code; u_sense : BOOLEAN; v_sense : BOOLEAN; INVERSE using_surfaces : BAG [1:?] OF rectangular_composite_surface FOR segments; WHERE wr1: (NOT ('STEP_SHIP_SCHEMA.CURVE_BOUNDED_SURFACE' IN TYPEOF( parent_surface))); END_ENTITY; ENTITY surface_replica SUBTYPE OF (surface); parent_surface : surface; transformation : cartesian_transformation_operator_3d; WHERE wr1: acyclic_surface_replica(SELF,parent_surface); END_ENTITY; ENTITY swept_surface SUPERTYPE OF (ONEOF (surface_of_linear_extrusion,surface_of_revolution)) SUBTYPE OF (surface); swept_curve : curve; END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY thermodynamic_temperature_unit SUBTYPE OF (named_unit); WHERE wr1: ((((((SELF\named_unit.dimensions.length_exponent = 0) AND (SELF \named_unit.dimensions.mass_exponent = 0)) AND (SELF\ named_unit.dimensions.time_exponent = 0)) AND (SELF\ named_unit.dimensions.electric_current_exponent = 0)) AND ( SELF\named_unit.dimensions. thermodynamic_temperature_exponent = 1)) AND (SELF\ named_unit.dimensions.amount_of_substance_exponent = 0)) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0); END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY time_unit SUBTYPE OF (named_unit); WHERE wr1: ((((((SELF\named_unit.dimensions.length_exponent = 0) AND (SELF \named_unit.dimensions.mass_exponent = 0)) AND (SELF\ named_unit.dimensions.time_exponent = 1)) AND (SELF\ named_unit.dimensions.electric_current_exponent = 0)) AND ( SELF\named_unit.dimensions. thermodynamic_temperature_exponent = 0)) AND (SELF\ named_unit.dimensions.amount_of_substance_exponent = 0)) AND (SELF\named_unit.dimensions.luminous_intensity_exponent = 0); END_ENTITY; ENTITY topological_representation_item SUPERTYPE OF (ONEOF (vertex,edge,face_bound,face,connected_face_set, loop ANDOR path)) SUBTYPE OF (representation_item); END_ENTITY; ENTITY toroidal_surface SUBTYPE OF (elementary_surface); major_radius : positive_length_measure; minor_radius : positive_length_measure; END_ENTITY; -- ONLY IN AP203/AP218 ENTITY trimmed_curve SUBTYPE OF (bounded_curve); basis_curve : curve; trim_1 : SET [1:2] OF trimming_select; trim_2 : SET [1:2] OF trimming_select; sense_agreement : BOOLEAN; master_representation : trimming_preference; WHERE wr1: ((HIINDEX(trim_1) = 1) OR (TYPEOF(trim_1[1]) <> TYPEOF(trim_1[2]))); wr2: ((HIINDEX(trim_2) = 1) OR (TYPEOF(trim_2[1]) <> TYPEOF(trim_2[2]))); END_ENTITY; ENTITY uncertainty_measure_with_unit SUBTYPE OF (measure_with_unit); name : label; description : OPTIONAL text; WHERE wr1: valid_measure_value(SELF\measure_with_unit.value_component); END_ENTITY; ENTITY uniform_curve SUBTYPE OF (b_spline_curve); END_ENTITY; ENTITY uniform_surface SUBTYPE OF (b_spline_surface); END_ENTITY; -- ONLY IN AP215/AP216/AP218 ENTITY value_representation_item SUBTYPE OF (representation_item); value_component : measure_value; WHERE wr1: SIZEOF(QUERY ( rep <* using_representations(SELF) | (NOT ( 'STEP_SHIP_SCHEMA.GLOBAL_UNIT_ASSIGNED_CONTEXT' IN TYPEOF(rep.context_of_items))) )) = 0; END_ENTITY; ENTITY vector SUBTYPE OF (geometric_representation_item); orientation : direction; magnitude : length_measure; WHERE wr1: magnitude >= 0; END_ENTITY; ENTITY versioned_action_request; id : identifier; version : label; purpose : text; description : OPTIONAL text; END_ENTITY; ENTITY vertex SUBTYPE OF (topological_representation_item); END_ENTITY; ENTITY vertex_loop SUBTYPE OF (loop); loop_vertex : vertex; END_ENTITY; ENTITY vertex_point SUBTYPE OF (vertex, geometric_representation_item); vertex_geometry : point; END_ENTITY; -- ONLY IN AP203 ENTITY vertex_shell SUBTYPE OF (topological_representation_item); vertex_shell_extent : vertex_loop; END_ENTITY; -- ONLY IN AP203 ENTITY volume_measure_with_unit SUBTYPE OF (measure_with_unit); WHERE wr1: ('STEP_SHIP_SCHEMA.VOLUME_UNIT' IN TYPEOF(SELF\ measure_with_unit.unit_component)); END_ENTITY; -- ONLY IN AP203 ENTITY volume_unit SUBTYPE OF (named_unit); WHERE wr1: ((SELF\named_unit.dimensions.length_exponent = 3) AND (SELF\ named_unit.dimensions.mass_exponent = 0) AND (SELF\ named_unit.dimensions.time_exponent = 0) AND (SELF\ named_unit.dimensions.electric_current_exponent = 0) AND ( SELF\named_unit.dimensions. thermodynamic_temperature_exponent = 0) AND (SELF\named_unit .dimensions.amount_of_substance_exponent = 0) AND (SELF\ named_unit.dimensions.luminous_intensity_exponent = 0)); END_ENTITY; ENTITY week_of_year_and_day_date SUBTYPE OF (date); week_component : week_in_year_number; day_component : OPTIONAL day_in_week_number; END_ENTITY; -- ONLY IN AP203 ENTITY wire_shell SUBTYPE OF (topological_representation_item); wire_shell_extent : SET [1:?] OF loop; WHERE wr1: (NOT mixed_loop_type_set(wire_shell_extent)); END_ENTITY; -- ONLY IN AP215/AP216/AP218 RULE action_request_solution_connected_to_action FOR (action_request_solution, action ); LOCAL t1_set : SET OF action_request_solution := []; t2_set : SET OF action := []; set_3 : SET OF action_method := []; violate : LOGICAL := FALSE; END_LOCAL; t1_set := QUERY (a <* action_request_solution| VALUE_IN(WHICH_CLASS(a), 'change plan')); t2_set := QUERY (b <* action| VALUE_IN(WHICH_CLASS(b), 'change')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; set_3 := []; REPEAT j := 1 TO HIINDEX(t2_set); set_3 := set_3 + [ t2_set[j].chosen_method ]; END_REPEAT; violate := VALUE_IN(set_3, t1_set[i].method); END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE action_request_solution_with_identification_assignment FOR (APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF action_request_solution := []; t2_set: SET OF applied_identification_assignment := []; arg_list: LIST OF STRING := ['change plan']; violation: LOGICAL := FALSE; END_LOCAL; REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = arg_LIST[j]); END_REPEAT; REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_IDENTIFICATION_ASSIGNMENT.ITEMS')); t2_set := QUERY ( j <* t2_set | j.role.name = 'globally unambiguous identifier'); violation := NOT (SIZEOF(t2_set) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE action_with_identification_assignment FOR (APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF action := []; t2_set: SET OF applied_identification_assignment := []; arg_list: LIST OF STRING := ['change', 'versionable object change event', 'check']; violation: LOGICAL := FALSE; END_LOCAL; REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = arg_LIST[j]); END_REPEAT; REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_IDENTIFICATION_ASSIGNMENT.ITEMS')); t2_set := QUERY ( j <* t2_set | j.role.name = 'globally unambiguous identifier'); violation := NOT (SIZEOF(t2_set) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP203 RULE acu_requires_security_classification FOR (assembly_component_usage, applied_security_classification_assignment); WHERE wr1: (SIZEOF(QUERY ( acu <* assembly_component_usage | (NOT (SIZEOF( QUERY ( ccdsc <* applied_security_classification_assignment | (acu IN ccdsc.items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE alternative_version_relationship_has_mandatory_description FOR (identification_assignment_relationship ); LOCAL t1_set : SET OF identification_assignment_relationship := []; violate : LOGICAL := FALSE; END_LOCAL; t1_set := QUERY (i <* identification_assignment_relationship| VALUE_IN(WHICH_CLASS(i), 'alternative version relationship')); violate := SIZEOF(QUERY (k <* t1_set | NOT EXISTS(k.description))) > 0; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE alternative_version_relationship_has_unique_versions FOR (identification_assignment_relationship ); LOCAL t1_set : SET OF identification_assignment_relationship := []; violate : LOGICAL := FALSE; END_LOCAL; t1_set := QUERY (a <* identification_assignment_relationship| VALUE_IN(WHICH_CLASS(a), 'alternative version relationship')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; violate := t1_set[i].relating_identification_assignment.assigned_id = t1_set[i].related_identification_assignment.assigned_id; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE alternative_version_relationship_versionable_object FOR (applied_identification_assignment, identification_assignment_relationship); LOCAL violate: LOGICAL := FALSE; END_LOCAL; REPEAT i := 1 TO HIINDEX(applied_identification_assignment) BY 1 WHILE NOT violate; IF ( (SIZEOF(USEDIN(applied_identification_assignment[i], ('STEP_SHIP_SCHEMA.IDENTIFICATION_ASSIGNMENT_RELATIONSHIP.' +'RELATING_IDENTIFICATION_ASSIGNMENT'))) > 0) OR (SIZEOF(USEDIN(applied_identification_assignment[i], ('STEP_SHIP_SCHEMA.IDENTIFICATION_ASSIGNMENT_RELATIONSHIP.' +'RELATED_IDENTIFICATION_ASSIGNMENT'))) > 0) ) THEN REPEAT j := 1 to HIINDEX(applied_identification_assignment[i].items) BY 1 WHILE NOT violate; violate := NOT VALUE_IN(which_class( applied_identification_assignment [i].items[j]),'versionable object'); END_REPEAT; END_IF; END_REPEAT; WHERE wr1: NOT violate; END_RULE; -- ONLY IN AP203 RULE application_context_requires_ap_definition FOR (application_context, application_protocol_definition); WHERE wr1: (SIZEOF(QUERY ( ac <* application_context | (NOT (SIZEOF( QUERY ( apd <* application_protocol_definition | ((ac :=: apd. application) AND (apd. application_interpreted_model_schema_name = 'step_ship_schema')) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP215/AP218 RULE applied_approval_assignment_has_exactly_one_elements FOR (object_role, applied_approval_assignment ); WHERE WR1: SIZEOF(QUERY (ass_inst <* applied_approval_assignment| NOT ((ass_inst.role.NAME = 'subject') AND (SIZEOF(ass_inst.items) = 1)))) = 0; END_RULE; -- ONLY IN AP215/AP218 RULE applied_group_assignment_has_at_least_one_elements FOR (object_role, applied_group_assignment ); WHERE WR1: SIZEOF(QUERY (ass_inst <* applied_group_assignment| NOT (((ass_inst.role.NAME = 'approvals') AND (SIZEOF(ass_inst.items) >= 1)) AND (SIZEOF(QUERY (item <* ass_inst.items | NOT ('STEP_SHIP_SCHEMA.APPROVAL' IN TYPEOF(item)))) = 0)))) = 0; END_RULE; -- ONLY IN AP203 RULE approval_date_time_constraints FOR (approval_date_time); WHERE wr1: (SIZEOF(QUERY ( adt <* approval_date_time | (NOT (SIZEOF(TYPEOF( adt.date_time) * ['STEP_SHIP_SCHEMA.DATE_AND_TIME']) = 1)) )) = 0); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE approval_event_with_approval_date_time FOR(approval); LOCAL t1_set: SET OF approval := []; t2_set: SET OF approval_date_time := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(i <* approval | VALUE_IN(WHICH_CLASS(i), 'approval event')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPROVAL_DATE_TIME.' + 'DATED_APPROVAL')); violate := NOT (SIZEOF(t2_set) = 1); END_REPEAT; WHERE wr1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE approval_event_with_approval_person_organization FOR(approval); LOCAL t1_set: SET OF approval := []; t2_set: SET OF approval_person_organization := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(i <* approval | VALUE_IN(WHICH_CLASS(i), 'approval event')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPROVAL_PERSON_ORGANIZATION.' + 'AUTHORIZED_APPROVAL')); violate := NOT (SIZEOF(t2_set) = 1); END_REPEAT; WHERE wr1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE approval_history_approves_same_definition FOR (applied_group_assignment, applied_approval_assignment); LOCAL t2_set: SET OF APPLIED_GROUP_ASSIGNMENT := []; t3_set: SET OF APPROVAL :=[]; t4_set: SET OF group_item :=[]; t5_set: SET OF APPLIED_APPROVAL_ASSIGNMENT := []; violate: LOGICAL := FALSE; END_LOCAL; t2_set := QUERY(a <* APPLIED_GROUP_ASSIGNMENT | VALUE_IN(WHICH_CLASS(a.ASSIGNED_GROUP), 'approval history')); t3_set := QUERY(b <* t2_set[1].items | 'STEP_SHIP_SCHEMA.APPROVAL' IN TYPEOF(b)); t4_set := QUERY(b <* t2_set[1].items | VALUE_IN(WHICH_CLASS(b), 'definition')); violate := NOT(SIZEOF(t4_set) = 1); REPEAT i := 1 TO HIINDEX(t3_set) WHILE NOT violate; t5_set := QUERY(a <* APPLIED_APPROVAL_ASSIGNMENT | (a.ASSIGNED_APPROVAL = t3_set[i]) AND (NOT (VALUE_IN(a.ITEMS, t4_set[1])))); violate := (SIZEOF(t5_set) > 0); END_REPEAT; WHERE wr1: NOT violate; wr2: (SIZEOF(t4_set) = 1); END_RULE; -- ONLY IN AP218 RULE approval_history_contains_approval_elements FOR (object_role, applied_group_assignment); LOCAL t3_set : SET OF approval := []; gr_ass_set : SET OF applied_group_assignment := []; violation : LOGICAL := FALSE; valid_items_set : SET OF approval_item := []; t1_set : SET OF applied_approval_assignment := []; first_runs : LOGICAL := TRUE; END_LOCAL; gr_ass_set := QUERY ( aga <* applied_group_assignment | ((aga.role. name = 'approvals') AND ('approval history' IN which_class(aga. assigned_group))) ); REPEAT i := 1 TO HIINDEX(gr_ass_set) BY 1 WHILE NOT violation; t3_set := QUERY ( aga_item <* gr_ass_set[i].items | ( 'STEP_SHIP_SCHEMA.APPROVAL' IN TYPEOF(aga_item)) ); REPEAT j := 1 TO HIINDEX(t3_set) BY 1; t1_set := QUERY ( aga <* bag_to_set(USEDIN(t3_set[j], 'STEP_SHIP_SCHEMA.' + 'APPROVAL_ASSIGNMENT.ASSIGNED_APPROVAL')) | (aga.role.name = 'subject') ); REPEAT k := 1 TO HIINDEX(t1_set) BY 1; IF first_runs AND (SIZEOF(t1_set[k].items) > 0) THEN valid_items_set := t1_set[k].items; first_runs := FALSE; ELSE REPEAT l := 1 TO HIINDEX(t1_set[k].items) BY 1; violation := t1_set[k].items[l] :<>: valid_items_set[l]; END_REPEAT; END_IF; END_REPEAT; END_REPEAT; first_runs := TRUE; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE approval_history_has_at_least_one_member FOR (GROUP, APPLIED_GROUP_ASSIGNMENT); LOCAL t1_set: SET OF GROUP := []; t2_set: SET OF APPLIED_GROUP_ASSIGNMENT := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(i <* group | VALUE_IN(WHICH_CLASS(i), 'approval history')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; t2_set := QUERY(a <* APPLIED_GROUP_ASSIGNMENT | a.ASSIGNED_GROUP = t1_set[i]); violate := NOT(SIZEOF(t2_set) = 1); END_REPEAT; WHERE wr1: NOT violate; END_RULE; -- ONLY IN AP203 RULE approval_person_organization_constraints FOR ( approval_person_organization); WHERE wr1: (SIZEOF(QUERY ( apo <* approval_person_organization | (NOT ( SIZEOF(TYPEOF(apo.person_organization) * [ 'STEP_SHIP_SCHEMA.PERSON_AND_ORGANIZATION']) = 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE approval_requires_approval_date_time FOR (approval, approval_date_time); WHERE wr1: (SIZEOF(QUERY ( app <* approval | (NOT (SIZEOF(QUERY ( adt <* approval_date_time | (app :=: adt.dated_approval) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE approval_requires_approval_person_organization FOR (approval, approval_person_organization); WHERE wr1: (SIZEOF(QUERY ( app <* approval | (NOT (SIZEOF(QUERY ( apo <* approval_person_organization | (app :=: apo. authorized_approval) )) >= 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE approvals_are_assigned FOR (approval, approval_assignment); WHERE wr1: (SIZEOF(QUERY ( app <* approval | (NOT (SIZEOF(QUERY ( aa <* approval_assignment | (app :=: aa.assigned_approval) )) >= 1)) )) = 0); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE approvals_references_approval_history FOR(applied_group_assignment, group); LOCAL t1_set: SET OF group := []; a_set: SET OF applied_group_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* group | VALUE_IN(WHICH_CLASS(a), 'approval history')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_group_assignment | NOT ((b.assigned_group = t1_set[i]) AND (b.role.name = 'approvals'))); violate := SIZEOF(a_set) > 0; END_REPEAT; WHERE wr1: NOT violate; END_RULE; -- ONLY IN AP203 RULE as_required_quantity FOR (measure_with_unit); WHERE wr1: (SIZEOF(QUERY ( m <* measure_with_unit | (( 'STEP_SHIP_SCHEMA.DESCRIPTIVE_MEASURE' IN TYPEOF(m. value_component)) AND (NOT (m.value_component = 'as_required'))) )) = 0); END_RULE; -- ONLY IN AP218 RULE assembly_relationship_has_product_definition FOR (group, applied_classification_assignment); LOCAL cl_ass : SET OF applied_classification_assignment := []; clfied_inst : SET OF product_definition_relationship := []; END_LOCAL; cl_ass := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'assembly relationship') ); REPEAT i := 1 TO HIINDEX(cl_ass) BY 1; clfied_inst := clfied_inst + cl_ass[i].items; END_REPEAT; WHERE wr1: ((SIZEOF(QUERY ( pdr <* clfied_inst | (NOT (SIZEOF(which_class( pdr.relating_product_definition)) > 0)) )) - SIZEOF( QUERY ( pdr <* clfied_inst | (NOT (SIZEOF(which_class(pdr. related_product_definition)) > 0)) ))) = 0); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE author_for_change_plan FOR(applied_person_and_organization_assignment, action_request_solution); LOCAL t1_set: SET OF action_request_solution := []; a_set: SET OF applied_person_and_organization_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* action_request_solution | VALUE_IN(WHICH_CLASS(a), 'change plan')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_person_and_organization_assignment | (VALUE_IN(b.items, t1_set[i]) AND (b.role.name = 'author'))); violate := SIZEOF(a_set) <> 1; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP216/AP218 RULE author_for_change_realisation FOR ( applied_person_and_organization_assignment, executed_action); LOCAL violate : LOGICAL := FALSE; t1_set : SET OF executed_action := []; a_set : SET OF applied_person_and_organization_assignment := []; END_LOCAL; t1_set := QUERY ( a <* executed_action | VALUE_IN(which_class(a), 'change realization') ); REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violate; a_set := QUERY ( b <* applied_person_and_organization_assignment | ( VALUE_IN(b.items,t1_set[i]) AND (b.role.name = 'author')) ); violate := SIZEOF(a_set) <> 1; END_REPEAT; WHERE wr1: (NOT violate); END_RULE; -- ONLY IN AP215 RULE author_for_change_realization FOR(applied_person_and_organization_assignment,executed_action); LOCAL t1_set: SET OF executed_action := []; a_set: SET OF applied_person_and_organization_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* executed_action | VALUE_IN(WHICH_CLASS(a), 'change realization')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_person_and_organization_assignment | (VALUE_IN(b.items, t1_set[i]) AND (b.role.name = 'author'))); violate := SIZEOF(a_set) <> 1; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE author_for_change_request FOR(applied_person_and_organization_assignment, versioned_action_request); LOCAL t1_set: SET OF versioned_action_request := []; a_set: SET OF applied_person_and_organization_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* versioned_action_request | VALUE_IN(WHICH_CLASS(a), 'change request')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_person_and_organization_assignment | (VALUE_IN(b.items, t1_set[i]) AND (b.role.name = 'author'))); violate := SIZEOF(a_set) <> 1; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE caused_by_for_check FOR(applied_person_and_organization_assignment, action); LOCAL t1_set: SET OF action := []; a_set: SET OF applied_person_and_organization_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* action | VALUE_IN(WHICH_CLASS(a), 'check')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_person_and_organization_assignment | (VALUE_IN(b.items, t1_set[i]) AND (b.role.name = 'caused by'))); violate := SIZEOF(a_set) <> 1; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE caused_by_for_envisaged_version_creation FOR(applied_person_and_organization_assignment, action); LOCAL t1_set: SET OF action := []; a_set: SET OF applied_person_and_organization_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* action | VALUE_IN(WHICH_CLASS(a), 'envisaged version creation')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_person_and_organization_assignment | (VALUE_IN(b.items, t1_set[i]) AND (b.role.name = 'caused by'))); violate := SIZEOF(a_set) <> 1; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE caused_by_for_version_creation FOR(applied_person_and_organization_assignment, action); LOCAL t1_set: SET OF action := []; a_set: SET OF applied_person_and_organization_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* action | VALUE_IN(WHICH_CLASS(a), 'version creation')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_person_and_organization_assignment | (VALUE_IN(b.items, t1_set[i]) AND (b.role.name = 'caused by'))); violate := SIZEOF(a_set) <> 1; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE caused_by_for_version_deletion FOR(applied_person_and_organization_assignment, action); LOCAL t1_set: SET OF action := []; a_set: SET OF applied_person_and_organization_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* action | VALUE_IN(WHICH_CLASS(a), 'version deletion')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_person_and_organization_assignment | (VALUE_IN(b.items, t1_set[i]) AND (b.role.name = 'caused by'))); violate := SIZEOF(a_set) <> 1; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE caused_by_for_version_modification FOR(applied_person_and_organization_assignment, action); LOCAL t1_set: SET OF action := []; a_set: SET OF applied_person_and_organization_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* action | VALUE_IN(WHICH_CLASS(a), 'version modification')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_person_and_organization_assignment | (VALUE_IN(b.items, t1_set[i]) AND (b.role.name = 'caused by'))); violate := SIZEOF(a_set) <> 1; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE caused_when_for_check FOR(applied_date_and_time_assignment, action); LOCAL t1_set: SET OF action := []; a_set: SET OF applied_date_and_time_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* action | VALUE_IN(WHICH_CLASS(a), 'check')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_date_and_time_assignment | (VALUE_IN(b.items, t1_set[i]) AND (b.role.name = 'caused when'))); violate := SIZEOF(a_set) <> 1; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE caused_when_for_envisaged_version_creation FOR(applied_date_and_time_assignment, action); LOCAL t1_set: SET OF action := []; a_set: SET OF applied_date_and_time_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* action | VALUE_IN(WHICH_CLASS(a), 'envisaged version creation')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_date_and_time_assignment | (VALUE_IN(b.items, t1_set[i]) AND (b.role.name = 'caused when'))); violate := SIZEOF(a_set) <> 1; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE caused_when_for_version_creation FOR(applied_date_and_time_assignment, action); LOCAL t1_set: SET OF action := []; a_set: SET OF applied_date_and_time_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* action | VALUE_IN(WHICH_CLASS(a), 'version creation')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_date_and_time_assignment | (VALUE_IN(b.items, t1_set[i]) AND (b.role.name = 'caused when'))); violate := SIZEOF(a_set) <> 1; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE caused_when_for_version_deletion FOR(applied_date_and_time_assignment, action); LOCAL t1_set: SET OF action := []; a_set: SET OF applied_date_and_time_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* action | VALUE_IN(WHICH_CLASS(a), 'version deletion')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_date_and_time_assignment | (VALUE_IN(b.items, t1_set[i]) AND (b.role.name = 'caused when'))); violate := SIZEOF(a_set) <> 1; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE caused_when_for_version_modification FOR(applied_date_and_time_assignment, action); LOCAL t1_set: SET OF action := []; a_set: SET OF applied_date_and_time_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* action | VALUE_IN(WHICH_CLASS(a), 'version modification')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_date_and_time_assignment | (VALUE_IN(b.items, t1_set[i]) AND (b.role.name = 'caused when'))); violate := SIZEOF(a_set) <> 1; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE centre_location_compound_representation_has_specified_name FOR (APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF Compound_representation_item := []; t2_set: SET OF representation_item := []; arg_list: LIST OF STRING := ['longitudinal location', 'transversal location', 'vertical location']; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.ASSIGNED_CLASS.NAME = 'centre location'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i:=1 TO HIINDEX(t1_set) WHILE (NOT violation); REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); t2_set := t1_set[i].item_element; violation := (SIZEOF(QUERY(items <* t2_set | items.name = arg_list[j])) <> 1); END_REPEAT; END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP203 RULE certification_requires_approval FOR (certification, applied_approval_assignment); WHERE wr1: (SIZEOF(QUERY ( cert <* certification | (NOT (SIZEOF( QUERY ( ccda <* applied_approval_assignment | (cert IN ccda.items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE certification_requires_date_time FOR (certification, applied_date_and_time_assignment); WHERE wr1: (SIZEOF(QUERY ( cert <* certification | (NOT (SIZEOF( QUERY ( ccdta <* applied_date_and_time_assignment | (cert IN ccdta.items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE change_impact_with_versionable_object_change_event FOR(applied_action_request_assignment); LOCAL t1_set: SET OF applied_action_request_assignment := []; a_set: SET OF action := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(b <* applied_action_request_assignment | (b.role.name= 'change impact')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* t1_set[i].items | ('STEP_SHIP_SCHEMA.ACTION' IN TYPEOF(b)) AND VALUE_IN(WHICH_CLASS(b), 'versionable object change event')); violate := SIZEOF(a_set) = 0; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE change_plan_has_mandatory_attribute_description FOR (action_request_solution); LOCAL t1_set: SET OF action_request_solution := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(i <* action_request_solution | VALUE_IN(WHICH_CLASS(i), 'change plan')); violate := (SIZEOF(QUERY(k <* t1_set | NOT EXISTS (k.description))) > 0); WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP203 RULE change_request_requires_approval FOR (change_request, applied_approval_assignment); WHERE wr1: (SIZEOF(QUERY ( cr <* change_request | (NOT (SIZEOF( QUERY ( ccda <* applied_approval_assignment | (cr IN ccda.items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE change_request_requires_date_time FOR (change_request, applied_date_and_time_assignment); WHERE wr1: (SIZEOF(QUERY ( cr <* change_request | (NOT (SIZEOF( QUERY ( ccdta <* applied_date_and_time_assignment | (cr IN ccdta.items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE change_request_requires_person_organization FOR (change_request, applied_person_and_organization_assignment); WHERE wr1: (SIZEOF(QUERY ( cr <* change_request | (NOT (SIZEOF( QUERY ( ccpoa <* applied_person_and_organization_assignment | (cr IN ccpoa.items) )) >= 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE change_requires_approval FOR (change, applied_approval_assignment); WHERE wr1: (SIZEOF(QUERY ( chg <* change | (NOT (SIZEOF(QUERY ( ccda <* applied_approval_assignment | (chg IN ccda.items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE change_requires_date_time FOR (change, applied_date_and_time_assignment); WHERE wr1: (SIZEOF(QUERY ( chg <* change | (NOT (SIZEOF(QUERY ( ccdta <* applied_date_and_time_assignment | ((chg IN ccdta.items) AND (ccdta.role.name = 'start_date')) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE class_and_statutory_designation_has_properties FOR (property_definition_representation, applied_classification_assignment); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_list: LIST OF product_definition := []; t2_set: SET OF property_definition_representation := []; t3_list: LIST OF property_definition := []; t4_list: LIST OF product_definition := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'class and statutory designation'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_list := t1_list + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; t2_set:= QUERY(i <* PROPERTY_DEFINITION_REPRESENTATION | i.NAME = 'class and statutory designation'); REPEAT i := 1 TO HIINDEX(t2_set); t3_list := t3_list + t2_set[i].definition; END_REPEAT; REPEAT i := 1 TO HIINDEX(t3_list); t4_list := t4_list + t3_list[i].definition; END_REPEAT; violation := t1_list <> t4_list; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE class_notation_with_named_representation_items FOR (representation); LOCAL reps: BAG OF REPRESENTATION := []; arg_list: LIST OF STRING := ['class notations hull', 'class notations machinery']; violation: LOGICAL := FALSE; END_LOCAL; reps := QUERY( temp_rep <* representation | SIZEOF ( QUERY( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.'+ 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'class notation') ) ) > 0 ); REPEAT i:=1 TO HIINDEX(reps) WHILE (NOT violation); REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); violation := (SIZEOF(QUERY(rep_item <* reps[i].items | rep_item.name = arg_list[j])) < 1); END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE class_parameters_has_properties FOR (property_definition_representation, applied_classification_assignment); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: LIST OF product_definition := []; t2_set: SET OF property_definition_representation := []; t3_set: LIST OF property_definition := []; t4_set: LIST OF product_definition := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'class parameters'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; t2_set:= QUERY(i <* PROPERTY_DEFINITION_REPRESENTATION | i.NAME = 'class parameters'); REPEAT i := 1 TO HIINDEX(t2_set); t3_set := t3_set + t2_set[i].definition; END_REPEAT; REPEAT i := 1 TO HIINDEX(t3_set); t4_set := t4_set + t3_set[i].definition; END_REPEAT; violation := t1_set <> t4_set; WHERE WR1: NOT violation; END_RULE; RULE compatible_dimension FOR (cartesian_point, direction, representation_context, geometric_representation_context ); WHERE WR1: SIZEOF(QUERY (x <* cartesian_point| (SIZEOF(QUERY (y <* geometric_representation_context| item_in_context(x, y) AND (HIINDEX(x.coordinates) <> y.coordinate_space_dimension))) > 0))) = 0; WR2: SIZEOF(QUERY (x <* direction| (SIZEOF(QUERY (y <* geometric_representation_context| item_in_context(x, y) AND (HIINDEX(x.direction_ratios) <> y.coordinate_space_dimension))) > 0))) = 0; END_RULE; -- ONLY IN AP216 RULE compound_representation_item_with_class_id_knot FOR ( applied_classification_assignment); LOCAL t3_set : SET OF representation_item := []; violation : LOGICAL := FALSE; t1_set : SET OF compound_representation_item := []; c_a_set : SET OF applied_classification_assignment := []; c_a_set2 : SET OF applied_classification_assignment := []; l_rep_item : list_representation_item; t2_set : SET OF compound_representation_item := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'knot') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; c_a_set2 := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'ship curve') ); REPEAT i := 1 TO HIINDEX(c_a_set2) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set2[i].items) BY 1; t2_set := t2_set + c_a_set2[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; l_rep_item := t1_set[i].item_element; REPEAT j := 1 TO HIINDEX(t1_set[i].item_element) BY 1; t3_set := t3_set + l_rep_item[j]; END_REPEAT; violation := SIZEOF(t3_set * t2_set) < 2; t3_set := []; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE compound_representation_item_with_hydrostatic_properties FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF compound_representation_item := []; c_a_set : SET OF applied_classification_assignment := []; arg_list : LIST OF STRING := ['hydrostatic property value']; t2_set : LIST OF representation_item := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'hydrostatic properties for constant floating position') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; t2_set := t1_set[i].item_element; violation := SIZEOF(QUERY ( items <* t2_set | (items.name = arg_list[j]) )) < 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE compound_representation_item_with_section_identifier FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF compound_representation_item := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF applied_identification_assignment := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'section of offset point table') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'APPLIED_IDENTIFICATION_ASSIGNMENT' + '.ITEMS')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.role. name = 'section identifier') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP203 RULE configuration_item_requires_approval FOR (configuration_item, applied_approval_assignment); WHERE wr1: (SIZEOF(QUERY ( ci <* configuration_item | (NOT (SIZEOF( QUERY ( ccda <* applied_approval_assignment | (ci IN ccda.items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE configuration_item_requires_person_organization FOR ( configuration_item, applied_person_and_organization_assignment); WHERE wr1: (SIZEOF(QUERY ( ci <* configuration_item | (NOT (SIZEOF( QUERY ( ccdpoa <* applied_person_and_organization_assignment | (ci IN ccdpoa.items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE contract_requires_approval FOR (contract, applied_approval_assignment); WHERE wr1: (SIZEOF(QUERY ( c <* contract | (NOT (SIZEOF(QUERY ( ccda <* applied_approval_assignment | (c IN ccda.items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE contract_requires_person_organization FOR (contract, applied_person_and_organization_assignment); WHERE wr1: (SIZEOF(QUERY ( c <* contract | (NOT (SIZEOF(QUERY ( ccdpoa <* applied_person_and_organization_assignment | (c IN ccdpoa. items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP203 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,'STEP_SHIP_SCHEMA')) )) = 0); END_RULE; -- ONLY IN AP218 RULE corrugated_structure_design_definition_has_at_least_one_class FOR ( product_definition_shape, shape_aspect, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'corrugated structure design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); violation := SIZEOF(QUERY ( t2_inst <* t2_set | ('border' IN which_class(t2_inst)) )) < 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE corrugated_structure_design_definition_has_at_most_one_class FOR ( product_definition_shape, shape_aspect, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'corrugated structure design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); violation := SIZEOF(QUERY ( t2_inst <* t2_set | ('moulded surface' IN which_class(t2_inst)) )) > 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215/AP216 RULE date_time_for_change_plan FOR(applied_date_and_time_assignment, action_request_solution); LOCAL t1_set: SET OF action_request_solution := []; a_set: SET OF applied_date_and_time_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* action_request_solution | VALUE_IN(WHICH_CLASS(a), 'change plan')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_date_and_time_assignment | (VALUE_IN(b.items, t1_set[i]) AND (b.role.name = 'date time'))); violate := SIZEOF(a_set) <> 1; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP216/AP218 RULE date_time_for_change_realisation FOR ( applied_date_and_time_assignment, executed_action); LOCAL violate : LOGICAL := FALSE; t1_set : SET OF executed_action := []; a_set : SET OF applied_date_and_time_assignment := []; END_LOCAL; t1_set := QUERY ( a <* executed_action | VALUE_IN(which_class(a), 'change realisation') ); REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violate; a_set := QUERY ( b <* applied_date_and_time_assignment | (VALUE_IN(b .items,t1_set[i]) AND (b.role.name = 'date time')) ); violate := SIZEOF(a_set) <> 1; END_REPEAT; WHERE wr1: (NOT violate); END_RULE; -- ONLY IN AP215 RULE date_time_for_change_realization FOR(applied_date_and_time_assignment, executed_action); LOCAL t1_set: SET OF executed_action := []; a_set: SET OF applied_date_and_time_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* executed_action | VALUE_IN(WHICH_CLASS(a), 'change realization')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_date_and_time_assignment | (VALUE_IN(b.items, t1_set[i]) AND (b.role.name = 'date time'))); violate := SIZEOF(a_set) <> 1; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE date_time_for_change_request FOR(applied_date_and_time_assignment, versioned_action_request); LOCAL t1_set: SET OF versioned_action_request := []; a_set: SET OF applied_date_and_time_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* versioned_action_request | VALUE_IN(WHICH_CLASS(a), 'change request')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_date_and_time_assignment | (VALUE_IN(b.items, t1_set[i]) AND (b.role.name = 'date time'))); violate := SIZEOF(a_set) <> 1; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP218 RULE define_maximum_permissible_still_water_bending_moment_values FOR ( product_definition, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'maximum permissible still water bending moment') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'maximum permissible still water bending moment values') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE define_maximum_permissible_still_water_shear_force_values FOR ( product_definition, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'maximum permissible still water shear force') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'maximum permissible still water shear force values') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE definition_for_design_still_water_bending_moment_parameters FOR ( product_definition, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'design still water bending moment') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'design still water bending moment parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE definition_for_design_vertical_wave_bending_moment_parameters FOR ( product_definition, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'design vertical wave bending moment') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'design vertical wave bending moment parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE definition_for_design_vertical_wave_shear_force_parameters FOR ( product_definition, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'design vertical wave shear force') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'design vertical wave shear force parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP203 RULE dependent_instantiable_action_directive FOR (action_directive); WHERE wr1: (SIZEOF(QUERY ( ad <* action_directive | (NOT (SIZEOF(USEDIN(ad, '')) >= 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE dependent_instantiable_approval_status FOR (approval_status); WHERE wr1: (SIZEOF(QUERY ( ast <* approval_status | (NOT (SIZEOF(USEDIN(ast, '')) >= 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE dependent_instantiable_certification_type FOR (certification_type); WHERE wr1: (SIZEOF(QUERY ( ct <* certification_type | (NOT (SIZEOF(USEDIN(ct, '')) >= 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE dependent_instantiable_contract_type FOR (contract_type); WHERE wr1: (SIZEOF(QUERY ( ct <* contract_type | (NOT (SIZEOF(USEDIN(ct,'')) >= 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE dependent_instantiable_date FOR (date); WHERE wr1: (SIZEOF(QUERY ( dt <* date | (NOT (SIZEOF(USEDIN(dt,'')) >= 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE dependent_instantiable_date_time_role FOR (date_time_role); WHERE wr1: (SIZEOF(QUERY ( dtr <* date_time_role | (NOT (SIZEOF(USEDIN(dtr, '')) >= 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE dependent_instantiable_document_type FOR (document_type); WHERE wr1: (SIZEOF(QUERY ( dt <* document_type | (NOT (SIZEOF(USEDIN(dt,'')) >= 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE dependent_instantiable_named_unit FOR (named_unit); WHERE wr1: (SIZEOF(QUERY ( nu <* named_unit | (NOT (SIZEOF(USEDIN(nu,'')) >= 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE dependent_instantiable_parametric_representation_context FOR ( parametric_representation_context); WHERE wr1: (SIZEOF(QUERY ( prc <* parametric_representation_context | (NOT ( SIZEOF(USEDIN(prc,'')) >= 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE dependent_instantiable_person_and_organization_role FOR ( person_and_organization_role); WHERE wr1: (SIZEOF(QUERY ( poar <* person_and_organization_role | (NOT ( SIZEOF(USEDIN(poar,'')) >= 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE dependent_instantiable_representation_item FOR (representation_item); WHERE wr1: (SIZEOF(QUERY ( ri <* representation_item | (NOT (SIZEOF(USEDIN( ri,'')) >= 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE dependent_instantiable_security_classification_level FOR ( security_classification_level); WHERE wr1: (SIZEOF(QUERY ( scl <* security_classification_level | (NOT ( SIZEOF(USEDIN(scl,'')) >= 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE dependent_instantiable_shape_representation FOR ( shape_representation); WHERE wr1: (SIZEOF(QUERY ( sr <* shape_representation | (NOT (SIZEOF(USEDIN( sr,'')) >= 1)) )) = 0); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE document_has_at_least_one_references FOR(document); LOCAL t1_set: SET OF document := []; t2_set: SET OF document_representation_type := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(i <* document | VALUE_IN(WHICH_CLASS(i), 'document')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.DOCUMENT_REPRESENTATION_TYPE.'+ 'REPRESENTED_DOCUMENT')); violate := SIZEOF(t2_set) < 1; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE document_has_exactly_one_author FOR(document); LOCAL bag_1: BAG OF applied_person_assignment := []; bag_2: BAG OF applied_person_and_organization_assignment := []; bag_3: BAG OF applied_organization_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; REPEAT i := 1 TO SIZEOF(document) WHILE (NOT violate); bag_1 := USEDIN(document[i], 'STEP_SHIP_SCHEMA.' + 'APPLIED_PERSON_ASSIGNMENT.ITEMS'); bag_1 := QUERY( assign <* bag_1 | assign.role.name = 'author'); bag_2 := USEDIN(document[i], 'STEP_SHIP_SCHEMA.' + 'APPLIED_PERSON_AND_ORGANIZATION_ASSIGNMENT.ITEMS'); bag_2 := QUERY( assign <* bag_2 | assign.role.name = 'author'); bag_3 := USEDIN(document[i], 'STEP_SHIP_SCHEMA.' + 'APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS'); bag_3 := QUERY( assign <* bag_3 | assign.role.name = 'author'); violate := NOT ((SIZEOF( bag_1 ) + SIZEOF( bag_2 )+ SIZEOF( bag_3 ))= 1); END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP218 RULE document_reference_has_at_least_one_references FOR (document, document_usage_constraint); LOCAL violate : LOGICAL := FALSE; t1_set : SET OF document := []; t2_set : SET OF document_usage_constraint := []; END_LOCAL; t1_set := QUERY ( i <* document | VALUE_IN(which_class(i), 'document reference') ); REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violate; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.DOCUMENT_USAGE_CONSTRAINT.SOURCE')); violate := SIZEOF(t2_set) < 1; END_REPEAT; WHERE wr1: (NOT violate); END_RULE; -- ONLY IN AP218 RULE document_reference_reference_with_address_with_references FOR ( document, document_usage_constraint); LOCAL violate : LOGICAL := FALSE; t1_set : SET OF document := []; t2_set : SET OF document_usage_constraint := []; END_LOCAL; t1_set := QUERY ( i <* document | VALUE_IN(which_class(i), 'document reference reference with address') ); REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violate; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.DOCUMENT_USAGE_CONSTRAINT.SOURCE')); violate := SIZEOF(t2_set) < 1; END_REPEAT; WHERE wr1: (NOT violate); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE document_reference_with_address_has_at_least_one_references FOR(document); LOCAL t1_set: SET OF document := []; t2_set: SET OF applied_external_identification_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(i <* document | VALUE_IN(WHICH_CLASS(i), 'document reference with address')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_EXTERNAL_IDENTIFICATION_ASSIGNMENT.ITEMS')); violate := SIZEOF(t2_set) < 1; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP203 RULE document_to_product_definition FOR ( applied_document_reference); WHERE wr1: (SIZEOF(QUERY ( sp <* applied_document_reference | (NOT (( (('STEP_SHIP_SCHEMA.DOCUMENT_RELATIONSHIP.' + 'RELATING_DOCUMENT') IN ROLESOF(sp\document_reference. assigned_document)) AND (SIZEOF(QUERY ( it <* sp.items | (NOT ('STEP_SHIP_SCHEMA.PRODUCT_DEFINITION' IN TYPEOF(it))) )) = 0)) OR (NOT (('STEP_SHIP_SCHEMA.DOCUMENT_RELATIONSHIP.' + 'RELATING_DOCUMENT') IN ROLESOF(sp\document_reference. assigned_document))))) )) = 0); END_RULE; -- ONLY IN AP203 RULE effectivity_requires_approval FOR (effectivity, applied_approval_assignment); WHERE wr1: (SIZEOF(QUERY ( eff <* effectivity | (NOT (SIZEOF( QUERY ( ccda <* applied_approval_assignment | (eff IN ccda.items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE envisaged_version_creation_has_mandatory_attribute_description FOR (action); LOCAL t1_set: SET OF action := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(i <* action | VALUE_IN(WHICH_CLASS(i), 'envisaged version creation')); violate := (SIZEOF(QUERY(k <* t1_set | NOT EXISTS (k.description))) > 0); WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE executed_action_with_identification_assignment FOR (APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF executed_action := []; t2_set: SET OF applied_identification_assignment := []; arg_list: LIST OF STRING := [ 'change realization']; violation: LOGICAL := FALSE; END_LOCAL; REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = arg_LIST[j]); END_REPEAT; REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_IDENTIFICATION_ASSIGNMENT.ITEMS')); t2_set := QUERY ( j <* t2_set | j.role.name = 'globally unambiguous identifier'); violation := NOT (SIZEOF(T2_SET) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215/AP216 RULE external_instance_reference_has_same_identifier FOR (applied_external_identification_assignment); LOCAL violation : LOGICAL := FALSE; extref_set : SET OF applied_external_identification_assignment := []; aia_set : SET OF applied_identification_assignment := []; END_LOCAL; extref_set := QUERY ( i <* applied_external_identification_assignment | (i.role.name = 'external instance reference') ); REPEAT i := 1 TO HIINDEX(extref_set) BY 1 WHILE NOT violation; aia_set := USEDIN(extref_set[i].items[1], 'STEP_SHIP_SCHEMA.APPLIED_IDENTIFICATION_ASSIGNMENT.ITEMS'); violation := NOT (aia_set[1].assigned_id = extref_set[i].assigned_id); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP218 RULE externally_defined_class_with_known_source_requirement FOR ( externally_defined_class); WHERE wr1: (SIZEOF(QUERY ( edc <* externally_defined_class | (( 'STEP_SHIP_SCHEMA.KNOWN_SOURCE' IN TYPEOF(edc.source)) AND (SIZEOF(QUERY ( aoa <* USEDIN(edc,'STEP_SHIP_SCHEMA.APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS') | (aoa.role.name = 'library supplier') )) = 0)) )) = 0); END_RULE; -- ONLY IN AP218 RULE flare_area_parameters_has_exactly_two_representation_items FOR ( representation, property_definition_representation); LOCAL violation : LOGICAL := FALSE; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'flare area parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; violation := SIZEOF(reps[i].items) > 2; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215/AP216 RULE floating_position_compound_representation_with_name FOR (APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF Compound_representation_item := []; t2_set: SET OF representation_item := []; arg_list: LIST OF STRING := ['moulded form displacement', 'draught at amidships', 'length of waterline', 'breadth of waterline', 'angle of trim', 'angle of heel']; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.Assigned_class.name = 'floating position'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i:=1 TO HIINDEX(t1_set) WHILE (NOT violation); REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); t2_set := t1_set[i].item_element; violation := (SIZEOF(QUERY(items <* t2_set | items.name = arg_list[j])) <> 1); END_REPEAT; END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215/AP218 RULE freeboard_characteristics_has_properties FOR (property_definition_representation, applied_classification_assignment); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: LIST OF product_definition := []; t2_set: SET OF property_definition_representation := []; t3_set: LIST OF property_definition := []; t4_set: LIST OF product_definition := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'freeboard characteristics'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; t2_set:= QUERY(i <* PROPERTY_DEFINITION_REPRESENTATION | i.NAME = 'freeboard characteristics'); REPEAT i := 1 TO HIINDEX(t2_set); t3_set := t3_set + t2_set[i].definition; END_REPEAT; REPEAT i := 1 TO HIINDEX(t3_set); t4_set := t4_set + t3_set[i].definition; END_REPEAT; violation := t1_set <> t4_set; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP203 RULE geometric_representation_item_3d FOR (geometric_representation_item); WHERE wr1: (SIZEOF(QUERY ( gri <* geometric_representation_item | (NOT (( dimension_of(gri) = 3) OR (SIZEOF(QUERY ( ur <* using_representations(gri) | ( 'STEP_SHIP_SCHEMA.DEFINITIONAL_REPRESENTATION' IN TYPEOF( ur)) )) > 0))) )) = 0); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE global_axis_placement_has_properties FOR (property_definition_representation, group, applied_classification_assignment); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: LIST OF product_definition := []; t2_set: SET OF property_definition_representation := []; t3_set: LIST OF property_definition := []; t4_set: LIST OF product_definition := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'global axis placement'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; t2_set:= QUERY(i <* PROPERTY_DEFINITION_REPRESENTATION | i.NAME = 'global axis placement'); REPEAT i := 1 TO HIINDEX(t2_set); t3_set := t3_set + t2_set[i].definition; END_REPEAT; REPEAT i := 1 TO HIINDEX(t3_set); t4_set := t4_set + t3_set[i].definition; END_REPEAT; violation := t1_set <> t4_set; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE global_id_is_unique FOR (APPLIED_IDENTIFICATION_ASSIGNMENT); LOCAL set_1: SET OF APPLIED_IDENTIFICATION_ASSIGNMENT:= []; bag_2: BAG OF STRING := []; violation: LOGICAL := FALSE; END_LOCAL; set_1 := QUERY(i <* APPLIED_IDENTIFICATION_ASSIGNMENT | (i.role.name = 'globally unambiguous identifier')); REPEAT i := 1 TO HIINDEX(set_1); bag_2 := bag_2 + [set_1[i].assigned_id]; END_REPEAT; violation := SIZEOF (QUERY(i <* set_1 | (SIZEOF(i.items) = 1))) <> SIZEOF(set_1); WHERE WR1: VALUE_UNIQUE(bag_2); WR2: NOT violation; END_RULE; -- ONLY IN AP203 RULE global_unit_assignment FOR (global_unit_assigned_context); WHERE wr1: (SIZEOF(QUERY ( guac <* global_unit_assigned_context | (NOT ( SIZEOF(guac.units) = 3)) )) = 0); wr2: (SIZEOF(QUERY ( guac <* global_unit_assigned_context | (NOT (( SIZEOF(QUERY ( u <* guac.units | ( 'STEP_SHIP_SCHEMA.LENGTH_UNIT' IN TYPEOF(u)) )) = 1) AND (SIZEOF(QUERY ( u <* guac.units | ( 'STEP_SHIP_SCHEMA.PLANE_ANGLE_UNIT' IN TYPEOF(u)) )) = 1) AND (SIZEOF(QUERY ( u <* guac.units | ( 'STEP_SHIP_SCHEMA.SOLID_ANGLE_UNIT' IN TYPEOF(u)) )) = 1))) )) = 0); END_RULE; -- ONLY IN AP218 RULE group_with_identification_assignment FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF group := []; c_a_set : SET OF applied_classification_assignment := []; arg_list : LIST OF STRING := [ 'structural cutout boundary relationship']; t2_set : SET OF group := []; END_LOCAL; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = arg_list[j]) ); END_REPEAT; REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_IDENTIFICATION_ASSIGNMENT.ITEMS')); violation := NOT (SIZEOF(t2_set) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE homogeneous_ship_material_property_has_named_references FOR ( object_role, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF applied_document_reference := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'homogeneous_ship material property') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_DOCUMENT_REFERENCE.ITEMS')); violation := SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.role.name = 'material reference') )) > 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE hull_cross_section_contains_specified_classes FOR ( applied_group_assignment, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; cl_ass : SET OF applied_classification_assignment := []; gr_ass : SET OF applied_group_assignment := []; pd : SET OF product_definition := []; groups : SET OF group := []; END_LOCAL; cl_ass := QUERY ( i <* applied_classification_assignment | ((i.role. name = 'class membership') AND (i.assigned_class.name = 'hull cross section')) ); REPEAT i := 1 TO HIINDEX(cl_ass) BY 1; REPEAT j := 1 TO HIINDEX(cl_ass[i].items) BY 1; pd := pd + cl_ass[i].items[j]; END_REPEAT; END_REPEAT; gr_ass := QUERY ( i <* applied_group_assignment | (i.role.name = 'equivalence') ); REPEAT i := 1 TO HIINDEX(gr_ass) BY 1; REPEAT j := 1 TO HIINDEX(gr_ass[i].items) BY 1; IF gr_ass[i].items[j] IN pd THEN groups := groups + gr_ass[i].assigned_group; END_IF; END_REPEAT; END_REPEAT; gr_ass := QUERY ( i <* applied_group_assignment | (((SIZEOF(i.items) <> 0) AND (i.role.name = 'item structure')) AND (i.assigned_group IN groups)) ); REPEAT i := 1 TO HIINDEX(gr_ass) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( inst <* gr_ass[i].items | (( 'compartment' IN which_class(inst)) AND ('structural system' IN which_class(inst))) )) > 0; END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP218 RULE hull_cross_section_design_definition_for_representation_items FOR ( property_definition_representation, representation); LOCAL violation : LOGICAL := FALSE; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'hull cross section design definition parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; violation := SIZEOF(reps[i].items) > 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE hull_cross_section_design_has_at_least_one_revision_with_context FOR ( group, applied_classification_assignment); LOCAL gr_ass_set : SET OF applied_group_assignment := []; violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'hull cross section design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; gr_ass_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_GROUP_ASSIGNMENT.ITEMS')); violation := SIZEOF(QUERY ( aga <* gr_ass_set | ((aga.role.name = 'members') AND ('revision with context' IN which_class(aga. assigned_group))) )) < 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE hull_cross_section_design_has_at_most_one_revision_with_context FOR ( group, applied_classification_assignment); LOCAL gr_ass_set : SET OF applied_group_assignment := []; violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'hull cross section design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; gr_ass_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_GROUP_ASSIGNMENT.ITEMS')); violation := SIZEOF(QUERY ( aga <* gr_ass_set | ((aga.role.name = 'members') AND ('revision with context' IN which_class(aga. assigned_group))) )) > 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE hull_cross_section_has_at_least_one_revision_with_context FOR ( object_role, group, applied_classification_assignment); LOCAL gr_ass_set : SET OF applied_group_assignment := []; violation : LOGICAL := FALSE; t1_set : SET OF product_definition := []; c_a_set : SET OF applied_classification_assignment := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'hull cross section') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; gr_ass_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_GROUP_ASSIGNMENT.ITEMS')); violation := SIZEOF(QUERY ( aga <* gr_ass_set | ((aga.role.name = 'context of revision') AND ('revision with context' IN which_class(aga.assigned_group))) )) < 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE hull_cross_section_optionally_contains_specified_classes FOR (group, applied_classification_assignment, applied_group_assignment); LOCAL violation : LOGICAL := FALSE; cl_ass : SET OF applied_classification_assignment := []; gr_ass : SET OF applied_group_assignment := []; pd : SET OF product_definition := []; groups : SET OF group := []; END_LOCAL; cl_ass := QUERY ( i <* applied_classification_assignment | ((i.role. name = 'class membership') AND (i.assigned_class.name = 'hull cross section')) ); REPEAT i := 1 TO HIINDEX(cl_ass) BY 1; pd := pd + cl_ass[i].items; END_REPEAT; gr_ass := QUERY ( i <* applied_group_assignment | (i.role.name = 'equivalence') ); REPEAT i := 1 TO HIINDEX(gr_ass) BY 1; REPEAT j := 1 TO HIINDEX(gr_ass[i].items) BY 1; IF gr_ass[i].items[j] IN pd THEN groups := groups + gr_ass[i].assigned_group; END_IF; END_REPEAT; END_REPEAT; gr_ass := QUERY ( i <* applied_group_assignment | ((SIZEOF(i.items) <> 0) AND (i.role.name = 'item structure') AND (i.assigned_group IN groups)) ); REPEAT i := 1 TO HIINDEX(gr_ass) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( inst <* gr_ass[i].items | ( 'structural system' IN which_class(inst)) )) = 0; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE hull_cross_section_result_for_representation_item FOR ( representation, representation_item, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; c_a_set : SET OF applied_classification_assignment := []; arg_list : LIST OF STRING := [ 'actual first moment horizontal', 'actual first moment vertical', 'actual inertia cross','actual inertia horizontal', 'actual inertia torsion','actual inertia vertical', 'actual neutral axis position horizontal', 'actual neutral axis position vertical', 'actual section area', 'actual section modulus bottom', 'actual section modulus coaming', 'actual section modulus deck', 'actual stress bottom','actual stress coaming', 'actual stress deck', 'actual twist centre horizontal', 'actual twist centre vertical', 'direction largest inertia', 'direction least inertia','max moment', 'max shear force','meter weight','min moment', 'min shear force', 'required section modulus bottom', 'required section modulus coaming', 'required section modulus deck', 'required stress bottom','required stress coaming', 'required stress deck']; classed_rep_set : SET OF representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'hull cross section result') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; classed_rep_set := classed_rep_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(classed_rep_set) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* classed_rep_set[i].items | (rep_item.name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE hull_moulded_form_design_parameter_with_class_references FOR ( applied_classification_assignment); LOCAL t3_set : SET OF representation := []; violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'hull moulded form design parameter') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'DEFINITION')); REPEAT j := 1 TO HIINDEX(t2_set) BY 1; t3_set := t3_set + t2_set[j].used_representation; END_REPEAT; violation := SIZEOF(QUERY ( t2_inst <* t3_set | ('midship tumble' IN which_class(t2_inst)) )) > 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE hydrostatic_properties_with_specified_class FOR ( applied_classification_assignment); LOCAL t3_set : SET OF representation_item := []; violation : LOGICAL := FALSE; t1_set : SET OF compound_representation_item := []; c_a_set : SET OF applied_classification_assignment := []; c_a_set2 : SET OF applied_classification_assignment := []; l_rep_item : list_representation_item; t2_set : SET OF compound_representation_item := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'hydrostatic properties for constant floating position') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; c_a_set2 := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'floating position') ); REPEAT i := 1 TO HIINDEX(c_a_set2) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set2[i].items) BY 1; t2_set := t2_set + c_a_set2[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; l_rep_item := t1_set[i].item_element; REPEAT j := 1 TO HIINDEX(t1_set[i].item_element) BY 1; t3_set := t3_set + l_rep_item[j]; END_REPEAT; violation := SIZEOF(t3_set * t2_set) <> 1; t3_set := []; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE hydrostatic_property_with_specified_name FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF compound_representation_item := []; c_a_set : SET OF applied_classification_assignment := []; arg_list : LIST OF STRING := ['property type']; t2_set : SET OF representation_item := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'hydrostatic property') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; t2_set := t1_set[i].item_element; violation := SIZEOF(QUERY ( items <* t2_set | (items.name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE identification_role_optional_attribute_description_required FOR (identification_role ); WHERE WR1: SIZEOF(QUERY (i <* identification_role | (i.NAME = 'external reference') AND NOT EXISTS(i.description))) = 0; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE initiator_for_change_request FOR(applied_person_and_organization_assignment, versioned_action_request); LOCAL t1_set: SET OF versioned_action_request := []; a_set: SET OF applied_person_and_organization_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* versioned_action_request | VALUE_IN(WHICH_CLASS(a), 'change request')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_person_and_organization_assignment | (VALUE_IN(b.items, t1_set[i]) AND (b.role.name = 'initiator'))); violate := SIZEOF(a_set) <> 1; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP218 RULE library_manufacturing_definition_for_class_references FOR ( shape_aspect, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'library manufacturing definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); violation := SIZEOF(QUERY ( t2_inst <* t2_set | ('source' IN which_class(t2_inst)) )) < 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215/AP218 RULE lightship_definition_has_properties FOR (property_definition_representation, group, applied_classification_assignment); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: LIST OF product_definition := []; t2_set: SET OF property_definition_representation := []; t3_set: LIST OF property_definition := []; t4_set: LIST OF product_definition := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'lightship definition'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; t2_set:= QUERY(i <* PROPERTY_DEFINITION_REPRESENTATION | i.NAME = 'lightship definition parameters'); REPEAT i := 1 TO HIINDEX(t2_set); t3_set := t3_set + t2_set[i].definition; END_REPEAT; REPEAT i := 1 TO HIINDEX(t3_set); t4_set := t4_set + t3_set[i].definition; END_REPEAT; violation := t1_set <> t4_set; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE mandatory_entity_type_for_external_instance_reference FOR(external_source, external_source_relationship); LOCAL bag_1: BAG OF external_source := []; violate: LOGICAL := FALSE; END_LOCAL; bag_1 := QUERY(a <* external_source | a.description = 'schema name'); REPEAT i := 1 TO SIZEOF(bag_1) WHILE (NOT violate); violate := (SIZEOF( QUERY(a <* external_source_relationship | (a.relating_source :=: bag_1[i]) AND (a.related_source.description = 'entity type'))) = 0 ); END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP218 RULE maximum_of_one_representation_items_for_class_library_definition FOR ( representation, applied_classification_assignment, classification_role, group); LOCAL var_representation : BAG OF representation := []; END_LOCAL; var_representation := QUERY ( temp1 <* representation | (SIZEOF( QUERY ( temp2 <* bag_to_set(USEDIN(temp1, 'STEP_SHIP_SCHEMA.APPLIED_CLASSIFICATION_ASSIGNMENT.ITEMS')) | ((temp2\classification_assignment.role.name = 'class membership') AND (temp2\classification_assignment.assigned_class\group.name = 'library definition')) )) > 0) ); WHERE wr1: (SIZEOF(QUERY ( temp3 <* var_representation | (SIZEOF(temp3.items) > 1) )) = 0); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE members_is_referenced_by_at_least_one_revision FOR(applied_group_assignment, group); LOCAL t1_set: SET OF group := []; a_set: SET OF applied_group_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* group | VALUE_IN(WHICH_CLASS(a), 'revision')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_group_assignment | (b.assigned_group :=: t1_set[i]) AND (b.role.name = 'members')); violate := SIZEOF(a_set) < 1; END_REPEAT; WHERE wr1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE no_approvals_except_in_approval_history FOR (approval); LOCAL t1_set: SET OF approval := []; t2_set: SET OF APPLIED_GROUP_ASSIGNMENT := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* approval | VALUE_IN(WHICH_CLASS(a), 'approval event')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_GROUP_ASSIGNMENT.ITEMS')); violate := (SIZEOF(t2_set) = 0); REPEAT k := 1 TO HIINDEX(t2_set) WHILE NOT violate; violate := NOT (VALUE_IN(WHICH_CLASS(t2_set[k].ASSIGNED_GROUP), 'approval history')); END_REPEAT; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP203 RULE no_shape_for_make_from FOR (design_make_from_relationship); WHERE wr1: (SIZEOF(QUERY ( dmfr <* design_make_from_relationship | (NOT ( SIZEOF(QUERY ( pd <* USEDIN(dmfr,'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION.DEFINITION') | ( 'STEP_SHIP_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd)) )) = 0)) )) = 0); END_RULE; -- ONLY IN AP203 RULE no_shape_for_supplied_part FOR (supplied_part_relationship); WHERE wr1: (SIZEOF(QUERY ( spr <* supplied_part_relationship | (NOT (SIZEOF( QUERY ( pd <* USEDIN(spr,'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION.DEFINITION') | ( 'STEP_SHIP_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd)) )) = 0)) )) = 0); END_RULE; -- ONLY IN AP216 RULE offset_point_table_model_compound_representation_has_name FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF compound_representation_item := []; c_a_set : SET OF applied_classification_assignment := []; arg_list : LIST OF STRING := ['offset point table type']; t2_set : SET OF representation_item := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'offset point table model') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; t2_set := t1_set[i].item_element; violation := SIZEOF(QUERY ( items <* t2_set | (items.name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE panel_system_design_definition_has_at_least_one_class FOR ( shape_aspect, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'panel system design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); violation := SIZEOF(QUERY ( t2_inst <* t2_set | ('border' IN which_class(t2_inst)) )) < 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE panel_system_design_definition_has_at_most_one_class FOR ( shape_aspect, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'panel system design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); violation := SIZEOF(QUERY ( t2_inst <* t2_set | ('moulded surface' IN which_class(t2_inst)) )) > 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE panel_system_optionally_contains_specified_classes FOR (group, applied_classification_assignment, applied_group_assignment); LOCAL violation : LOGICAL := FALSE; cl_ass : SET OF applied_classification_assignment := []; gr_ass : SET OF applied_group_assignment := []; pd : SET OF product_definition := []; groups : SET OF group := []; END_LOCAL; cl_ass := QUERY ( i <* applied_classification_assignment | ((i.role. name = 'class membership') AND (i.assigned_class.name = 'panel system')) ); REPEAT i := 1 TO HIINDEX(cl_ass) BY 1; pd := pd + cl_ass[i].items; END_REPEAT; gr_ass := QUERY ( i <* applied_group_assignment | (i.role.name = 'equivalence') ); REPEAT i := 1 TO HIINDEX(gr_ass) BY 1; REPEAT j := 1 TO HIINDEX(gr_ass[i].items) BY 1; IF gr_ass[i].items[j] IN pd THEN groups := groups + gr_ass[i].assigned_group; END_IF; END_REPEAT; END_REPEAT; gr_ass := QUERY ( i <* applied_group_assignment | ((SIZEOF(i.items) <> 0) AND (i.role.name = 'item structure') AND (i.assigned_group IN groups)) ); REPEAT i := 1 TO HIINDEX(gr_ass) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( inst <* gr_ass[i].items | ('plate' IN which_class(inst)) )) = 0; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE plate_design_definition_has_at_least_one_class_references FOR ( shape_aspect, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'plate design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); violation := SIZEOF(QUERY ( t2_inst <* t2_set | ('border' IN which_class(t2_inst)) )) < 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE plate_design_definition_has_at_most_one_class_references FOR ( shape_aspect, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'plate design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); violation := SIZEOF(QUERY ( t2_inst <* t2_set | ('moulded surface' IN which_class(t2_inst)) )) > 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE plate_manufacturing_definition_has_class_references FOR ( shape_aspect, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'plate manufacturing definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); violation := SIZEOF(QUERY ( t2_inst <* t2_set | ('outer contour' IN which_class(t2_inst)) )) < 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE principal_characteristics_has_properties FOR (property_definition_representation, applied_classification_assignment); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: LIST OF product_definition := []; t2_set: SET OF property_definition_representation := []; t3_set: LIST OF property_definition := []; t4_set: LIST OF product_definition := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'principal characteristics'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; t2_set:= QUERY(i <* PROPERTY_DEFINITION_REPRESENTATION | i.NAME = 'principal characteristics'); REPEAT i := 1 TO HIINDEX(t2_set); t3_set := t3_set + t2_set[i].definition; END_REPEAT; REPEAT i := 1 TO HIINDEX(t3_set); t4_set := t4_set + t3_set[i].definition; END_REPEAT; violation := t1_set <> t4_set; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP203 RULE product_concept_requires_configuration_item FOR (product_concept, configuration_item); WHERE wr1: (SIZEOF(QUERY ( pc <* product_concept | (NOT (SIZEOF( QUERY ( ci <* configuration_item | (pc :=: ci.item_concept) )) >= 1)) )) = 0); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE product_definition_for_call_sign FOR(applied_classification_assignment); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF product_definition := []; t2_set: SET OF applied_identification_assignment := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'ship designation'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_IDENTIFICATION_ASSIGNMENT.ITEMS')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.role.name = 'call sign')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215 RULE product_definition_for_certifying_organization FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF product_definition := []; t2_set: SET OF applied_organization_assignment := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.name = 'coating certification'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.role.name = 'certifying organization')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE product_definition_for_class_notation FOR(applied_classification_assignment); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF product_definition := []; t2_set: SET OF property_definition := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'class and statutory designation'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION.DEFINITION')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | 'class notation' IN WHICH_CLASS(t2_inst))) = 1); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP218 RULE product_definition_for_design_still_water_shear_force_values FOR ( product_definition, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'design still water shear force') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'design still water shear force values') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE product_definition_for_expiry_date FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF product_definition := []; t2_set: SET OF applied_date_and_time_assignment := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.name = 'coating certification'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'APPLIED_DATE_AND_TIME_ASSIGNMENT.ITEMS')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.role.name = 'expiry date')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE product_definition_for_flag_state FOR(applied_classification_assignment); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF product_definition := []; t2_set: SET OF applied_identification_assignment := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'ship designation'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_IDENTIFICATION_ASSIGNMENT.ITEMS')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.role.name = 'flag state')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP216 RULE product_definition_for_hydrostatic_definition_requires_reference FOR ( applied_classification_assignment); LOCAL t3_set : SET OF property_definition_representation := []; violation : LOGICAL := FALSE; t4_set : SET OF property_definition := []; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; c2_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'hydrostatic definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; c2_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'hydrostatic table') ); REPEAT i := 1 TO HIINDEX(c2_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c2_a_set[i].items) BY 1; t2_set := t2_set + c2_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t2_set) BY 1; t3_set := t3_set + bag_to_set(USEDIN(t2_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION')); END_REPEAT; REPEAT i := 1 TO HIINDEX(t3_set) BY 1; t4_set := t4_set + t3_set[i].definition; END_REPEAT; violation := t1_set <> t4_set; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE product_definition_for_loadline FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF product_definition := []; t2_set: SET OF property_definition := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.name = 'freeboard characteristics'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION.DEFINITION')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | 'loadline' IN WHICH_CLASS(t2_inst))) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215/AP216 RULE product_definition_for_managing_company FOR(applied_classification_assignment); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF product_definition := []; t2_set: SET OF applied_organization_assignment := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'owner designation'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.role.name = 'managing company')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215/AP216 RULE product_definition_for_ordering_company FOR(applied_classification_assignment); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF product_definition := []; t2_set: SET OF applied_organization_assignment := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'owner designation'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.role.name = 'ordering company')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215/AP216 RULE product_definition_for_owning_company FOR(applied_classification_assignment); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF product_definition := []; t2_set: SET OF applied_organization_assignment := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'owner designation'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.role.name = 'owning company')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE product_definition_for_port_of_registration FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF product_definition := []; t2_set: SET OF applied_identification_assignment := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'ship designation'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_IDENTIFICATION_ASSIGNMENT.ITEMS')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.role.name = 'port of registration')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE product_definition_for_regulation FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF product_definition := []; t2_set: SET OF property_definition := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'class and statutory designation'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION.DEFINITION')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | 'regulation' IN WHICH_CLASS(t2_inst))) = 1); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE product_definition_for_shipyard FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF product_definition := []; t2_set: SET OF applied_organization_assignment := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'shipyard designation'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.role.name = 'shipyard')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP216 RULE product_definition_for_stability_definition FOR ( applied_classification_assignment); LOCAL t3_set : SET OF property_definition_representation := []; violation : LOGICAL := FALSE; t4_set : SET OF property_definition := []; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; c2_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'stability definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; c2_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'stability table') ); REPEAT i := 1 TO HIINDEX(c2_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c2_a_set[i].items) BY 1; t2_set := t2_set + c2_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t2_set) BY 1; t3_set := t3_set + bag_to_set(USEDIN(t2_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION')); END_REPEAT; REPEAT i := 1 TO HIINDEX(t3_set) BY 1; t4_set := t4_set + t3_set[i].definition; END_REPEAT; violation := t1_set <> t4_set; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_has_references_with_class_loadline FOR ( product_definition, property_definition, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'freeboard characteristics') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | ('loadline' IN which_class(t2_inst)) )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_local_coordinate_system_with_station_reference FOR ( product_definition, property_definition, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'hull cross section') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | ( 'local co ordinate system with station reference' IN which_class( t2_inst)) )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215/AP216 RULE product_definition_relationship_references_are_distinct FOR (product_definition_relationship); LOCAL cyclic_relationship: LOGICAL := FALSE; END_LOCAL; REPEAT i := 1 TO HIINDEX(product_definition_relationship) WHILE NOT cyclic_relationship; cyclic_relationship:= product_definition_relationship[i].related_product_definition :=: product_definition_relationship[i].relating_product_definition; END_REPEAT; WHERE wr1: NOT cyclic_relationship; END_RULE; -- ONLY IN AP216 RULE product_definition_relationship_related_to_class_moulded_form FOR ( applied_classification_assignment); LOCAL t3_set : SET OF product_definition := []; violation : LOGICAL := FALSE; t1_set : SET OF product_definition_relationship := []; c_a_set : SET OF applied_classification_assignment := []; c2_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF product_definition := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'moulded form relationship') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1; t2_set := t2_set + t1_set[i].related_product_definition; t2_set := t2_set + t1_set[i].relating_product_definition; END_REPEAT; c2_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'moulded form') ); REPEAT i := 1 TO HIINDEX(c2_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c2_a_set[i].items) BY 1; t3_set := t3_set + c2_a_set[i].items[j]; END_REPEAT; END_REPEAT; violation := NOT (t2_set <= t3_set); WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_relationship_with_definable_object FOR ( product_definition_relationship, group, applied_classification_assignment); LOCAL clfied_inst : SET OF classification_item := []; END_LOCAL; REPEAT i := 1 TO HIINDEX(applied_classification_assignment) BY 1; IF applied_classification_assignment[i].assigned_class.name = 'definable object' THEN clfied_inst := clfied_inst + applied_classification_assignment[i]. items; END_IF; END_REPEAT; WHERE wr1: (SIZEOF(QUERY ( i <* clfied_inst | (NOT (i.id LIKE '*.*')) )) = 0); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE product_definition_relationship_with_identification_assignment FOR (APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF product_definition_relationship := []; t2_set: SET OF applied_identification_assignment := []; arg_list: LIST OF STRING := ['space arrangement relationship']; violation: LOGICAL := FALSE; END_LOCAL; REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = arg_LIST[j]); END_REPEAT; REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_IDENTIFICATION_ASSIGNMENT.ITEMS')); t2_set := QUERY ( j <* t2_set | j.role.name = 'globally unambiguous identifier'); violation := NOT (SIZEOF(T2_SET) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP203 RULE product_definition_requires_approval FOR (product_definition, applied_approval_assignment); WHERE wr1: (SIZEOF(QUERY ( pd <* product_definition | (NOT (SIZEOF( QUERY ( ccda <* applied_approval_assignment | (pd IN ccda.items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE product_definition_requires_date_time FOR (product_definition, applied_date_and_time_assignment); WHERE wr1: (SIZEOF(QUERY ( pd <* product_definition | (NOT (SIZEOF( QUERY ( ccdta <* applied_date_and_time_assignment | (pd IN ccdta.items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE product_definition_requires_person_organization FOR ( product_definition, applied_person_and_organization_assignment); WHERE wr1: (SIZEOF(QUERY ( pd <* product_definition | (NOT (SIZEOF( QUERY ( ccdpoa <* applied_person_and_organization_assignment | (pd IN ccdpoa.items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_assembly_manufacturing FOR ( property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'assembly manufacturing definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'assembly manufacturing definition parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_bevel_design_parameters FOR ( product_definition_shape, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'bevel design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'bevel design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_beveled_groove_weld_design FOR ( product_definition_shape, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'beveled groove weld') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'beveled groove weld design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_butt_groove_weld_design FOR ( product_definition_shape, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'butt groove weld') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'butt groove weld design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_circular_cutout_design_parameters FOR ( product_definition_shape, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'circular cutout design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'circular cutout design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_class_torch_vector FOR ( product_definition_shape, shape_aspect, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'weld manufacturing definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | ('torch vector' IN which_class(t2_inst)) )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_continuous_fillet_weld_design FOR ( product_definition_shape, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'continuous fillet weld') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'continuous fillet weld design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_corrugated_part_design FOR ( product_definition_shape, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'corrugated part design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'corrugated part design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_corrugated_structure_design FOR ( product_definition_shape, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'corrugated structure design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = ' corrugated structure design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_corrugation FOR ( product_definition_shape, shape_aspect, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'corrugated part design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | ('corrugation' IN which_class(t2_inst)) )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE product_definition_shape_for_deck_zone_design FOR (applied_classification_assignment ); LOCAL c_a_set : SET OF applied_classification_assignment := []; t1_set : SET OF product_definition_shape := []; t2_set : SET OF property_definition_representation := []; violation : LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY (i <* applied_classification_assignment| i.assigned_class.NAME = 'deck zone design definition'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION' + '.' + 'DEFINITION')); violation := NOT (SIZEOF(QUERY (t2_inst <* t2_set | (t2_inst.name = 'deck zone design parameters'))) = 1); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_drain_hole_cutout_design FOR ( product_definition_shape, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'drain hole cutout design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'drain hole cutout design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_elliptical_cutout_design FOR ( product_definition_shape, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'elliptical cutout design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'elliptical cutout design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_elongated_oval_cutout_design FOR ( product_definition_shape, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'elongated oval cutout l design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'elongated oval cutout design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_fillet_weld_design_parameters FOR ( product_definition_shape, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'fillet weld') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'fillet weld design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_free_form_interior_cutout_design FOR ( product_definition_shape, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'free form interior cutout design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'free form interior cutout design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_groove_weld_design FOR ( product_definition_shape, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'groove weld') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'groove weld design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_hull_cross_section_design_definition FOR ( product_definition); LOCAL gr_ass_set : SET OF applied_group_assignment := []; violation : LOGICAL := FALSE; t1_set1 : SET OF product_definition_shape := []; t1_set2 : SET OF product_definition_shape := []; t2_set : SET OF product_definition := []; END_LOCAL; t2_set := QUERY ( all_t2_inst <* product_definition | ( 'hull cross section' IN which_class(all_t2_inst)) ); REPEAT i := 1 TO HIINDEX(t2_set) BY 1 WHILE NOT violation; t1_set1 := QUERY ( pd <* bag_to_set(USEDIN(t2_set[i], 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION.DEFINITION')) | ( 'STEP_SHIP_SCHEMA.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(pd)) ); t1_set2 := QUERY ( t1_inst1 <* t1_set1 | ( 'hull cross section design definition' IN which_class(t1_inst1)) ); REPEAT j := 1 TO HIINDEX(t1_set2) BY 1; gr_ass_set := QUERY ( aga <* bag_to_set(USEDIN(t1_set2[j], 'STEP_SHIP_SCHEMA.APPLIED_GROUP_ASSIGNMENT.ITEMS')) | (( aga.role.name = 'versions') AND ('version history' IN which_class(aga.assigned_group))) ); END_REPEAT; violation := SIZEOF(gr_ass_set) > 1; gr_ass_set := []; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_intermittent_fillet_weld_design FOR ( product_definition_shape, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'intermittent fillet weld') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'intermittent fillet weld design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_inward_round_corner_design FOR ( product_definition_shape, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'inward round corner design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'inward round corner design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_library_definition_parameters FOR ( product_definition_shape, shape_aspect, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'library definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'library definition parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_library_design_parameters FOR ( product_definition_shape, shape_aspect, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'library design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'library design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_library_manufacturing_defiinition FOR ( product_definition_shape, shape_aspect, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'library manufacturing definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'library manufacturing defiinition parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_manufacturing_definition_parameters FOR ( product_definition_shape, shape_aspect, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'manufacturing definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'manufacturing definition parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_name FOR (product_definition_shape, shape_aspect, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'library design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | ('name' IN which_class(t2_inst)) )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_outer_contour_representation FOR ( product_definition_shape, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'plate manufacturing definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'outer contour representation') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_outward_round_corner_design FOR ( product_definition_shape, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'outward round corner design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'outward round corner design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_panel_system_design_parameters FOR ( product_definition_shape, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'panel system design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'panel system design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_part_edge_cutout_design FOR ( product_definition_shape, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'part edge cutout design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'part edge cutout design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_plate_design_parameters FOR ( product_definition_shape, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'plate design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'plate design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_profile_cross_section FOR ( product_definition_shape, shape_aspect, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'profile design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | ( 'profile cross section' IN which_class(t2_inst)) )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_profile_design_parameters FOR ( product_definition_shape, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'profile design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'profile design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_rectangular_cutout_design FOR ( product_definition_shape, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'rectangular cutout design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'rectangular cutout design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_round_corner_rectangular_cutout FOR ( product_definition_shape, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'round corner rectangular cutout design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'round corner rectangular cutout design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_round_edge_rectangular_cutout FOR ( product_definition_shape, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'round edge rectangular cutout design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'round edge rectangular cutout design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_shear_bevel_design_parameters FOR ( product_definition_shape, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'shear bevel design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'shear bevel design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_source FOR (product_definition_shape, shape_aspect, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'library definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | ('source' IN which_class(t2_inst)) )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_spot_seam_weld_design FOR ( product_definition_shape, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'spot seam weld') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'spot seam weld design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_structural_part_joint_design FOR ( product_definition_shape, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'structural part joint design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'structural part joint design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_structural_system_design FOR ( product_definition_shape, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'structural system design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'structural system design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_triangular_cutout_design FOR ( product_definition_shape, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'triangular cutout design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'triangular cutout design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_for_welded_joint_design_parameters FOR ( product_definition_shape, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'welded joint design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'welded joint design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_has_references_for_centre_of_gravity FOR ( product_definition_shape, shape_aspect, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'assembly manufacturing definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | ( 'centre of gravity' IN which_class(t2_inst)) )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_has_references_with_class_border FOR ( product_definition_shape, shape_aspect, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'corrugated part design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | ('border' IN which_class(t2_inst)) )) = 2); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_has_references_with_name_weld_design_parameters FOR ( product_definition_shape, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'weld design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'weld design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_of_rectangular_cutback_corner_design FOR ( product_definition_shape, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'rectangular cutback corner design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'rectangular cutback corner design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_with_definition_matches_pattern FOR ( property_definition_representation, group, applied_classification_assignment); LOCAL clfied_inst : SET OF classification_item := []; END_LOCAL; REPEAT i := 1 TO HIINDEX(applied_classification_assignment) BY 1; IF applied_classification_assignment[i].assigned_class.name = 'DEFINITION' THEN clfied_inst := clfied_inst + applied_classification_assignment[i]. items; END_IF; END_REPEAT; WHERE wr1: (SIZEOF(QUERY ( i <* clfied_inst | (NOT (i.id LIKE '*.*')) )) = 0); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE product_definition_shape_with_identification_assignment FOR (APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF product_definition_shape := []; t2_set: SET OF applied_identification_assignment := []; arg_list: LIST OF STRING := ['design definition']; violation: LOGICAL := FALSE; END_LOCAL; REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = arg_LIST[j]); END_REPEAT; REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_IDENTIFICATION_ASSIGNMENT.ITEMS')); t2_set := QUERY ( j <* t2_set | j.role.name = 'globally unambiguous identifier'); violation := NOT (SIZEOF(T2_SET) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP218 RULE product_definition_shape_with_versionable_object FOR (group, applied_classification_assignment); LOCAL clfied_inst : SET OF classification_item := []; END_LOCAL; REPEAT i := 1 TO HIINDEX(applied_classification_assignment) BY 1; IF applied_classification_assignment[i].assigned_class.name = 'versionable object' THEN clfied_inst := clfied_inst + applied_classification_assignment[i]. items; END_IF; END_REPEAT; WHERE wr1: (SIZEOF(QUERY ( i <* clfied_inst | (NOT (i.id LIKE '*.*')) )) = 0); END_RULE; -- ONLY IN AP218 RULE product_definition_shape_with_versionable_object_matches_pattern FOR ( group, applied_classification_assignment); LOCAL clfied_inst : SET OF classification_item := []; END_LOCAL; REPEAT i := 1 TO HIINDEX(applied_classification_assignment) BY 1; IF applied_classification_assignment[i].assigned_class.name = 'versionable object' THEN clfied_inst := clfied_inst + applied_classification_assignment[i]. items; END_IF; END_REPEAT; WHERE wr1: (SIZEOF(QUERY ( i <* clfied_inst | (NOT (i.id LIKE '*.*')) )) = 0); END_RULE; -- ONLY IN AP215/AP218 RULE product_definition_with_date_freeboard_assigned FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF product_definition := []; t2_set: SET OF applied_date_and_time_assignment := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.name = 'freeboard characteristics'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'APPLIED_DATE_AND_TIME_ASSIGNMENT.ITEMS')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.role.name = 'date freeboard assigned')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP218 RULE product_definition_with_definable_object_matches_pattern FOR ( product_definition, group, applied_classification_assignment); LOCAL clfied_inst : SET OF classification_item := []; END_LOCAL; REPEAT i := 1 TO HIINDEX(applied_classification_assignment) BY 1; IF applied_classification_assignment[i].assigned_class.name = 'definable object' THEN clfied_inst := clfied_inst + applied_classification_assignment[i]. items; END_IF; END_REPEAT; WHERE wr1: (SIZEOF(QUERY ( i <* clfied_inst | (NOT (i.id LIKE '*.*')) )) = 0); END_RULE; -- ONLY IN AP215/AP218 RULE product_definition_with_freeboard_assigned_by FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF product_definition := []; t2_set: SET OF applied_organization_assignment := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.name = 'freeboard characteristics'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.role.name = 'freeboard assigned by')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE product_definition_with_identification_assignment FOR (APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF product_definition := []; t2_set: SET OF applied_identification_assignment := []; arg_list: LIST OF STRING := [ 'definition', 'definable object']; violation: LOGICAL := FALSE; END_LOCAL; REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = arg_LIST[j]); END_REPEAT; REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_IDENTIFICATION_ASSIGNMENT.ITEMS')); t2_set := QUERY ( j <* t2_set | j.role.name = 'globally unambiguous identifier'); violation := NOT (SIZEOF(T2_SET) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE product_related_product_category_with_identification_assignment FOR (APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF product_related_product_category := []; t2_set: SET OF applied_identification_assignment := []; arg_list: LIST OF STRING := [ 'shiptype']; violation: LOGICAL := FALSE; END_LOCAL; REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = arg_LIST[j]); END_REPEAT; REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_IDENTIFICATION_ASSIGNMENT.ITEMS')); t2_set := QUERY ( j <* t2_set | j.role.name = 'globally unambiguous identifier'); violation := NOT (SIZEOF(T2_SET) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP203 RULE product_requires_person_organization FOR (product, applied_person_and_organization_assignment); WHERE wr1: (SIZEOF(QUERY ( prod <* product | (NOT (SIZEOF(QUERY ( ccdpoa <* applied_person_and_organization_assignment | (prod IN ccdpoa .items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE product_requires_product_category FOR (product, product_related_product_category); WHERE wr1: (SIZEOF(QUERY ( prod <* product | (NOT (SIZEOF(QUERY ( prpc <* product_related_product_category | ((prod IN prpc.products) AND (prpc.name IN ['assembly','inseparable_assembly','detail', 'customer_furnished_equipment'])) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE product_requires_version FOR (product, product_definition_formation); WHERE wr1: (SIZEOF(QUERY ( prod <* product | (NOT (SIZEOF(QUERY ( pdf <* product_definition_formation | (prod :=: pdf.of_product) )) >= 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE product_version_requires_approval FOR (product_definition_formation, applied_approval_assignment); WHERE wr1: (SIZEOF(QUERY ( pdf <* product_definition_formation | (NOT ( SIZEOF(QUERY ( ccda <* applied_approval_assignment | (pdf IN ccda.items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE product_version_requires_person_organization FOR ( product_definition_formation, applied_person_and_organization_assignment); WHERE wr1: (SIZEOF(QUERY ( pdf <* product_definition_formation | (NOT ( SIZEOF(QUERY ( ccdpoa <* applied_person_and_organization_assignment | ((pdf IN ccdpoa .items) AND (ccdpoa.role.name = 'creator')) )) = 1)) )) = 0); wr2: (SIZEOF(QUERY ( pdf <* product_definition_formation | (NOT ( SIZEOF(QUERY ( ccdpoa <* applied_person_and_organization_assignment | ((pdf IN ccdpoa .items) AND (ccdpoa.role.name IN ['design_supplier', 'part_supplier'])) )) >= 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE product_version_requires_security_classification FOR ( product_definition_formation, applied_security_classification_assignment); WHERE wr1: (SIZEOF(QUERY ( pdf <* product_definition_formation | (NOT ( SIZEOF(QUERY ( ccdsc <* applied_security_classification_assignment | ( pdf IN ccdsc.items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE product_with_identification_assignment FOR (APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF product := []; t2_set: SET OF applied_identification_assignment := []; arg_list: LIST OF STRING := ['ship']; violation: LOGICAL := FALSE; END_LOCAL; REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = arg_LIST[j]); END_REPEAT; REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_IDENTIFICATION_ASSIGNMENT.ITEMS')); t2_set := QUERY ( j <* t2_set | j.role.name = 'globally unambiguous identifier'); violation := NOT (SIZEOF(T2_SET) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP218 RULE profile_cross_section_has_at_most_one_named_references FOR ( shape_aspect, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'profile cross section') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'section properties') )) > 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE profile_design_definition_has_at_most_one_class_references FOR ( product_definition_shape, shape_aspect, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'profile design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); violation := SIZEOF(QUERY ( t2_inst <* t2_set | ( 'profile curve trace line' IN which_class(t2_inst)) )) > 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE profile_design_definition_has_zero_or_two_class_references FOR ( product_definition_shape, shape_aspect, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition_shape := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'profile design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); violation := (NOT (SIZEOF(QUERY ( t2_inst <* t2_set | ('border' IN which_class(t2_inst)) )) = 0)) AND (NOT (SIZEOF( QUERY ( t2_inst <* t2_set | ('border' IN which_class(t2_inst)) )) = 2)); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE propeller_moulded_form_design_parameter_with_class_references FOR ( applied_classification_assignment); LOCAL t3_set : SET OF representation := []; violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'propeller moulded form design parameter') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'DEFINITION')); REPEAT j := 1 TO HIINDEX(t2_set) BY 1; t3_set := t3_set + t2_set[j].used_representation; END_REPEAT; violation := SIZEOF(QUERY ( t2_inst <* t3_set | ( 'propeller location' IN which_class(t2_inst)) )) > 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE property_definition_appendage_moulded_form_design_parameter FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'appendage moulded form design parameter') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION' + '.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'appendage moulded form design parameter') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE property_definition_for_bottom_moulded_form_design_parameter FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'bottom moulded form design parameter') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION' + '.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'bottom moulded form design parameter') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE property_definition_for_bulb_moulded_form_design_parameter FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'bulb moulded form design parameter') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION' + '.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'bulb moulded form design parameter') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE property_definition_for_class_bulk_load_requirement_definition FOR (applied_classification_assignment ); LOCAL c_a_set : SET OF applied_classification_assignment := []; t1_set : SET OF property_definition := []; t2_set : SET OF property_definition_representation := []; violation : LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY (i <* applied_classification_assignment| i.assigned_class.NAME = 'class bulk load requirement definition'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY (t2_inst <* t2_set | (t2_inst.name = 'class bulk load requirement definition parameters'))) = 1); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE property_definition_for_class_compartment_requirement_definition FOR (applied_classification_assignment ); LOCAL c_a_set : SET OF applied_classification_assignment := []; t1_set : SET OF property_definition := []; t2_set : SET OF property_definition_representation := []; violation : LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY (i <* applied_classification_assignment| i.assigned_class.NAME = 'class compartment requirement definition'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY (t2_inst <* t2_set | (t2_inst.name = 'class compartment requirement definition parameters'))) = 1); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE property_definition_for_class_deck_load_requirement_definition FOR (applied_classification_assignment ); LOCAL c_a_set : SET OF applied_classification_assignment := []; t1_set : SET OF property_definition := []; t2_set : SET OF property_definition_representation := []; violation : LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY (i <* applied_classification_assignment| i.assigned_class.NAME = 'class deck load requirement definition'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY (t2_inst <* t2_set | (t2_inst.name = 'class deck load requirement definition parameters'))) = 1); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE property_definition_for_class_notation FOR (applied_classification_assignment ); LOCAL c_a_set : SET OF applied_classification_assignment := []; t1_set : SET OF property_definition := []; t2_set : SET OF property_definition_representation := []; violation : LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY (i <* applied_classification_assignment| i.assigned_class.NAME = 'class notation'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY (t2_inst <* t2_set | (t2_inst.name = 'class notation'))) = 1); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE property_definition_for_class_society FOR (applied_classification_assignment ); LOCAL c_a_set : SET OF applied_classification_assignment := []; t1_set : SET OF property_definition := []; t2_set : SET OF applied_organization_assignment := []; violation : LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY (i <* applied_classification_assignment| i.assigned_class.NAME = 'class notation'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'APPLIED_ORGANIZATION_ASSIGNMENT.ITEMS')); violation := NOT (SIZEOF(QUERY (t2_inst <* t2_set | (t2_inst.role.name = 'class society'))) = 1); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE property_definition_for_class_tank_requirement_definition FOR (applied_classification_assignment ); LOCAL c_a_set : SET OF applied_classification_assignment := []; t1_set : SET OF property_definition := []; t2_set : SET OF property_definition_representation := []; violation : LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY (i <* applied_classification_assignment| i.assigned_class.NAME = 'class tank requirement definition'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY (t2_inst <* t2_set | (t2_inst.name = 'class tank requirement definition parameters'))) = 1); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE property_definition_for_compartment_design_requirement FOR (applied_classification_assignment); LOCAL c_a_set : SET OF applied_classification_assignment := []; t1_set : SET OF property_definition := []; t2_set : SET OF property_definition_representation := []; violation : LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY (i <* applied_classification_assignment| i.assigned_class.NAME = 'compartment design requirement'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY (t2_inst <* t2_set | (t2_inst.name = 'compartment design requirement parameters'))) = 1); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE property_definition_for_compartment_function FOR (applied_classification_assignment ); LOCAL c_a_set : SET OF applied_classification_assignment := []; t1_set : SET OF property_definition := []; t2_set : SET OF property_definition_representation := []; violation : LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY (i <* applied_classification_assignment| i.assigned_class.NAME = 'compartment functional definition'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY (t2_inst <* t2_set | (t2_inst.name = 'compartment function parameters'))) = 1); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE property_definition_for_compensated_gross_tonnage FOR (applied_classification_assignment ); LOCAL c_a_set : SET OF applied_classification_assignment := []; t1_set : SET OF property_definition := []; t2_set : SET OF property_definition_representation := []; violation : LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY (i <* applied_classification_assignment| i.assigned_class.NAME = 'tonnage definition'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY (t2_inst <* t2_set | ('compensated gross tonnage' IN WHICH_CLASS(t2_inst)))) = 1); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP218 RULE property_definition_for_corrugated_structure_function FOR ( property_definition, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'corrugated structure functional definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'corrugated structure function parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE property_definition_for_damage_stability_definition_requires_reference FOR (APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT:= []; c2_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT:= []; t1_set: SET OF property_definition := []; t2_set: SET OF representation := []; t3_set: SET OF property_definition_representation := []; t4_set: SET OF property_definition := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.ASSIGNED_CLASS.NAME = 'damage stability definition'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; c2_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.ASSIGNED_CLASS.NAME = 'stability table'); REPEAT i := 1 TO HIINDEX(c2_a_set); REPEAT j := 1 TO HIINDEX(c2_a_set[i].items); t2_set := t2_set + c2_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t2_set); t3_set := t3_set + bag_to_set(USEDIN(t2_set[i], 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')); END_REPEAT; REPEAT i := 1 TO HIINDEX(t3_set); t4_set := t4_set + t3_set[i].definition; END_REPEAT; violation := t1_set <> t4_set; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215 RULE property_definition_for_date_of_loading FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF property_definition := []; t2_set: SET OF applied_date_and_time_assignment := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.ASSIGNED_CLASS.NAME = 'loading condition operating definition'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'APPLIED_DATE_AND_TIME_ASSIGNMENT.ITEMS')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.role.name = 'date of loading')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP216 RULE property_definition_for_deck_moulded_form_design_parameter FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'deck moulded form design parameter') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION' + '.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'deck moulded form design parameter') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE property_definition_for_deck_zone_function FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF property_definition := []; t2_set: SET OF property_definition_representation := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.name = 'deck zone functional definition'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.name = 'deck zone function parameters')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP218 RULE property_definition_for_edge_cutout_function_parameters FOR ( property_definition, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'edge cutout functional definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'edge cutout function parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE property_definition_for_edge_feature_function_parameters FOR ( property_definition, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'edge feature functional definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'edge feature function parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE property_definition_for_gross_tonnage FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF property_definition := []; t2_set: SET OF property_definition_representation := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.name = 'tonnage definition'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | 'gross tonnage' IN WHICH_CLASS(t2_inst))) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP218 RULE property_definition_for_homogeneous_ship_material_property FOR ( property_definition, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'homogeneous ship material property') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'homogeneous ship material property parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE property_definition_for_hull_moulded_form_design_parameter FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'hull moulded form design parameter') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION' + '.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'hull moulded form design parameter') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE property_definition_for_interior_cutout_function_parameters FOR ( property_definition, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'interior cutout functional definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'interior cutout function parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE property_definition_for_local_coordinate_system FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF property_definition := []; t2_set: SET OF property_definition_representation := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.ASSIGNED_CLASS.NAME = 'local co ordinate system'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.name = 'local coordinate system')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE property_definition_for_local_coordinate_system_with_position FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF property_definition := []; t2_set: SET OF property_definition_representation := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'local co ordinate system with position reference'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.name = 'local coordinate system with position reference')) = 1); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP216 RULE property_definition_for_moulded_form_function_parameters FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'moulded form functional definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION' + '.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'moulded form function parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE property_definition_for_net_tonnage FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF property_definition := []; t2_set: SET OF property_definition_representation := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.name = 'tonnage definition'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | 'net tonnage' IN WHICH_CLASS(t2_inst))) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP218 RULE property_definition_for_panel_system_function_parameters FOR ( property_definition, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'panel system functional definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'panel system function parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE property_definition_for_plate_function_parameters FOR ( property_definition, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'plate functional definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'plate function parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE property_definition_for_plate_strake_function_parameters FOR ( property_definition, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'plate strake functional definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'plate strake function parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE property_definition_for_profile_function_parameters FOR ( property_definition, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'profile functional definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'profile function parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE property_definition_for_rudder_moulded_form_design_parameter FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'rudder moulded form design parameter') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION' + '.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'rudder moulded form design parameter') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE property_definition_for_ship_material_property_parameters FOR ( property_definition, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'ship material property') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'ship material property parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE property_definition_for_stability_definition_requires_reference FOR (APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT:= []; c2_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT:= []; t1_set: SET OF property_definition := []; t2_set: SET OF representation := []; t3_set: SET OF property_definition_representation := []; t4_set: SET OF property_definition := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.ASSIGNED_CLASS.NAME = 'stability definition'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; c2_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.ASSIGNED_CLASS.NAME = 'stability table'); REPEAT i := 1 TO HIINDEX(c2_a_set); REPEAT j := 1 TO HIINDEX(c2_a_set[i].items); t2_set := t2_set + c2_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t2_set); t3_set := t3_set + bag_to_set(USEDIN(t2_set[i], 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')); END_REPEAT; REPEAT i := 1 TO HIINDEX(t3_set); t4_set := t4_set + t3_set[i].definition; END_REPEAT; violation := t1_set <> t4_set; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP218 RULE property_definition_for_structural_system_function_parameters FOR ( property_definition, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'structural system functional definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'structural system function parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE property_definition_for_thruster_moulded_form_design_parameter FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'thruster moulded form design parameter') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION' + '.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'thruster moulded form design parameter') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE property_definition_for_thruster_propeller_parameter FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_relationship := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'thruster moulded form design parameter') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_RELATIONSHIP' + '.RELATING_PROPERTY_DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'thruster propeller parameter') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE property_definition_for_tonnage_definition FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF property_definition := []; t2_set: SET OF property_definition_representation := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.name = 'tonnage definition'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.name = 'tonnage definition parameters')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP218 RULE property_definition_for_weld_filler_material_design FOR ( property_definition, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'weld filler material') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'weld filler material design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE property_definition_for_zone_function FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF property_definition := []; t2_set: SET OF property_definition_representation := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.name = 'zone functional definition'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION' + '.' + 'DEFINITION')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.name = 'zone function parameters')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP218 RULE property_definition_has_references_lightship_weight_item FOR ( property_definition, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'lightship weight item') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'lightship weight item') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215/AP218 RULE property_definition_has_references_with_name_loadline FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF property_definition := []; t2_set: SET OF property_definition_representation := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.name = 'loadline'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION' + '.' + 'DEFINITION')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.name = 'loadline')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP216 RULE property_definition_of_propeller_moulded_form_design_parameter FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'propeller moulded form design parameter') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION' + '.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'propeller moulded form design parameter') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE property_definition_representation_for_date_of_measurement FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF property_definition_representation := []; t2_set: SET OF applied_date_and_time_assignment := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.ASSIGNED_CLASS.NAME = 'tonnage measurement'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'APPLIED_DATE_AND_TIME_ASSIGNMENT.ITEMS')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.role.name = 'date of measurement')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215 RULE property_definition_representation_for_gross_tonnage FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF property_definition_representation := []; t2_set: SET OF applied_date_and_time_assignment := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.ASSIGNED_CLASS.NAME = 'gross tonnage'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'APPLIED_DATE_AND_TIME_ASSIGNMENT.ITEMS')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.role.name = 'date of measurement')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215 RULE property_definition_representation_for_net_tonnage FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF property_definition_representation := []; t2_set: SET OF applied_date_and_time_assignment := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.ASSIGNED_CLASS.NAME = 'net tonnage'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'APPLIED_DATE_AND_TIME_ASSIGNMENT.ITEMS')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.role.name = 'date of measurement')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP218 RULE property_definition_structural_weld_shrinkage_allowance_feature FOR ( property_definition, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'structural weld shrinkage allowance feature design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'structural weld shrinkage allowance feature design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE property_definition_to_structural_added_material_feature_design FOR ( property_definition, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'structural added material feature design definition') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'structural added material feature design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE property_definition_with_definition_matches_pattern FOR (group, applied_classification_assignment); LOCAL clfied_inst : SET OF classification_item := []; END_LOCAL; REPEAT i := 1 TO HIINDEX(applied_classification_assignment) BY 1; IF applied_classification_assignment[i].assigned_class.name = 'DEFINITION' THEN clfied_inst := clfied_inst + applied_classification_assignment[i]. items; END_IF; END_REPEAT; WHERE wr1: (SIZEOF(QUERY ( i <* clfied_inst | (NOT (i.id LIKE '*.*')) )) = 0); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE property_definition_with_identification_assignment FOR (APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF property_definition := []; t2_set: SET OF applied_identification_assignment := []; arg_list: LIST OF STRING := ['cargo bay definition', 'compartment functional definition', 'deck zone functional definition', 'design requirement', 'loading condition definition', 'local co ordinate system', 'spacing table', 'stability definition', 'tonnage definition', 'zone functional definition']; violation: LOGICAL := FALSE; END_LOCAL; REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = arg_LIST[j]); END_REPEAT; REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_IDENTIFICATION_ASSIGNMENT.ITEMS')); t2_set := QUERY ( j <* t2_set | j.role.name = 'globally unambiguous identifier'); violation := NOT (SIZEOF(T2_SET) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215 RULE property_definition_with_lightship_weight_item FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF property_definition := []; t2_set: SET OF property_definition_representation := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.name = 'lightship weight item'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION' + '.' + 'DEFINITION')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.name = 'lightship weight item')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP218 RULE property_definition_with_versionable_object_matches_pattern FOR ( group, applied_classification_assignment); LOCAL clfied_inst : SET OF classification_item := []; END_LOCAL; REPEAT i := 1 TO HIINDEX(applied_classification_assignment) BY 1; IF applied_classification_assignment[i].assigned_class.name = 'versionable object' THEN clfied_inst := clfied_inst + applied_classification_assignment[i]. items; END_IF; END_REPEAT; WHERE wr1: (SIZEOF(QUERY ( i <* clfied_inst | (NOT (i.id LIKE '*.*')) )) = 0); END_RULE; -- ONLY IN AP215/AP218 RULE property_definition_with_weight_and_centre_of_gravity FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF property_definition := []; t2_set: SET OF property_definition_representation := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.name = 'weight and centre of gravity'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.name = 'weight and centre of gravity')) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP218 RULE representation_design_vertical_wave_bending_moment_parameters FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['hogging','sagging']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'design vertical wave bending moment parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE representation_for_absolute_cargo FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['position', 'orientation']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'absolute cargo position parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_adjacent_space_surface_area FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['surface area']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'adjacent space surface area parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP218 RULE representation_for_angle_bar_cross_section_dimensions FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['depth','width','radius','thk']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'angle bar cross section dimensions') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE representation_for_appendage_moulded_form_design_parameter FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['appendage length', 'appendage breadth','appendage depth', 'type of appendage']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'appendage moulded form design parameter') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_assembly_manufacturing_definition FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['assembly method','assembly stage', 'mass','center of gravity']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'assembly manufacturing definition parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE representation_for_bottom_moulded_form_design_parameter FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['bilge radius','rise of floor', 'aft end of flat of bottom', 'front end of flat of bottom','flat of bottom breadth', 'rake of keel']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep,'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'bottom moulded form design parameter') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE representation_for_bulb_moulded_form_design_parameter FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['bulb length','bulb length from pp', 'bulb breadth','bulb breadth pp','bulb depth', 'bulb depth pp','bulb frame section area at pp', 'bulb location']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep,'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'bulb moulded form design parameter') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_bulbflat_cross_section_dimensions FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['depth','bulb width','bulb radius', 'tw']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'bulbflat cross section dimensions') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE representation_for_bulk_cargo FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['natural angle of repose', 'pollution code', 'required carriage temperature', 'type of', 'un type code']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'bulk cargo parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_bulk_cargo_assignment FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['actual angle of repose', 'assignment context', 'cargo height', 'cargo identifier', 'trimmed']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'bulk cargo assignment parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_capacity_properties FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['capacity level origin', 'capacity centre', 'capacity level', 'capacity trim angle', 'capacity heel angle', 'capacity volume', 'capacity context']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'capacity properties'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_cargo_compartment_property FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context', 'design stowage density']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'cargo compartment property'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_cargo_footprint FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['contact material', 'shape', 'transferred mass']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'cargo footprint'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP218 RULE representation_for_channel_cross_section_dimensions FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['depth','width','web thk', 'flange thk','radius','k']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'channel cross section dimensions') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_circular_cutout_design_parameters FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['radius']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'circular cutout design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_circular_hollow_profile_cross_section FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['depth','width','web thk', 'flange thk','radius','k']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'channel cross section dimensions') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE representation_for_class_and_statutory_designation FOR (representation); LOCAL reps: BAG OF REPRESENTATION := []; arg_list: LIST OF STRING := ['class number']; violation: LOGICAL := FALSE; END_LOCAL; reps := QUERY( temp_rep <* representation | SIZEOF ( QUERY( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'class and statutory designation') ) ) > 0 ); REPEAT i:=1 TO HIINDEX(reps) WHILE (NOT violation); REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); violation := (SIZEOF(QUERY(rep_item <* reps[i].items | rep_item.name = arg_list[j])) <> 1); END_REPEAT; END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_class_bulk_load_requirement_definition FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['ambient temperature', 'angle of repose', 'bulk cargo mass', 'cargo density', 'cargo height', 'coating', 'damage waterline', 'max pressure', 'max temperature', 'min pressure', 'min temperature', 'permeability', 'top of hatch']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'class bulk load requirement definition parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_class_compartment_requirement_definition FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['ambient temperature', 'cargo density', 'cargo height', 'coating', 'damage waterline', 'max pressure', 'max temperature', 'min pressure', 'min temperature']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'class compartment requirement definition parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_class_notation FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['service area', 'approval required for oil cargo', 'approval required for loading unloading aground', 'approval required for unloading grabs']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'class notation'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_class_parameters FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['length class', 'length solas', 'scantlings draught', 'block coefficient class', 'design speed ahead', 'design speed astern']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'class parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_class_tank_requirement_definition FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['ambient temperature', 'cargo density', 'cargo height', 'coating', 'damage waterline', 'max pressure', 'max temperature', 'min pressure', 'min temperature', 'overflow height', 'partial filling', 'pressure relief setting']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'class tank requirement definition parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_coating FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['dry film thickness', 'number of coats', 'surface preparation']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'coating parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_coating_level FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['lower extent', 'upper extent']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'coating level'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_abbreviated_name FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context', 'name']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment abbreviated name'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_acceleration FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context', 'acceleration g force']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment acceleration'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_access_authorization FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context', 'authorization classification']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment access authorization'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_air_circulation_rate FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context', 'air circulation rate']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment air circulation rate'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_cargo_assignment FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['assignment context', 'cargo identifier']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment cargo assignment parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_coating FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment coating'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_design_requirement FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['description', 'requirement type']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment design requirement parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_function FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['used for']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment function parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_group FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['tonnage volume']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment group parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_horizontal_cross_sectional_area FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context', 'horizontal cross sectional area']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment horizontal cross sectional area property'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_illumination FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context', 'illumination value']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment illumination'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_insulation FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context', 'insulation category']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment insulation'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_noise_category FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context', 'noise category']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment noise category'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_nuclear_classification FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context', 'nuclear classification']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment nuclear classification'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_occupancy FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context', 'occupancy']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment occupancy'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_safety_class FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context', 'safety category']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment safety class'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_security_classification FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context', 'security classification']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment security classification'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_stiffened_surface_area_property FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context', 'stiffened surface area']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment stiffened surface area property'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_tightness FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context', 'required bulkhead tightness']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment tightness'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_unstiffened_surface_area_property FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context', 'unstiffened surface area']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment unstiffened surface area property'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_vertical_longitudinal_sectional_area FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context', 'vertical longitudinal cross sectional area']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment vertical longitudinal sectional area property'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_vertical_transverse_sectional_area FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context', 'vertical transverse cross sectional area']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment vertical transverse sectional area property'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_volume_permeability_property FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context', 'permeability']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment volume permeability property'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_volume_property FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['centre of volume', 'context', 'volume']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment volume property'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compartment_ziplist_number FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context', 'department ziplist number', 'division ziplist number']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment ziplist number'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_compensated_gross_tonnage FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['compensation factor', 'tonnage value']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compensated gross tonnage'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_corrosion_control_coating FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['applicability', 'dry film thickness', 'number of coats', 'surface preparation', 'type of']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'corrosion control coating parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_corrosion_protection FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['cathodic protection']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'corrosion protection'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP218 RULE representation_for_corrugated_part_design_parameters FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['mirrored','offset','repetition', 'thickness']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'corrugated part design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE representation_for_damage_case FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['damage cause', 'relative damage position']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'damage case parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_damage_position FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['centre of damage', 'position accuracy']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'damage position parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_dangerous_goods_code FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['class', 'subsidiary risks']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'dangerous goods code parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_deck_cargo_assignment FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['assignment context', 'cargo identifier']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'deck cargo assignment parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP216 RULE representation_for_deck_moulded_form_design_parameter FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['camber','sheer at ap','sheer at fp']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep,'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'deck moulded form design parameter') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE representation_for_deck_zone_function FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['used for']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'deck zone function parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP218 RULE representation_for_design_vertical_wave_shear_force_parameters FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['negative value','positive value']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'design vertical wave shear force parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_drain_hole_cutout_design_parameters FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['depth','drain hole radius','gap', 'gap radius','width']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'drain hole cutout design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE representation_for_dry_cargo FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['pollution code', 'un type code']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'dry cargo parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP218 RULE representation_for_edge_cutout_function_parameters FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['function']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'edge cutout function parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_edge_feature_function_parameters FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['function']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'edge feature function parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_electrode_chemical_composition_design FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['carbon','silicon','manganese', 'phosphorus','sulphur','nickel','molydenum','aliminium', 'titanium','zirconium','chromium','copper','vanadium']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'electrode chemical composition design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_elliptical_cutout_design_parameters FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['half axis a','half axis b']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'elliptical cutout design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_elongated_oval_cutout_design_parameters FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['distance','r1','r2']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'elongated oval cutout design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_explicit_profile_cross_section_shape FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['cross section geometry', 'local coordinate system']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'explicit profile cross section shape') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE representation_for_fire_safe_coating FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['dry film thickness', 'low flame spread', 'nitro cellulose based', 'number of coats', 'surface preparation']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'fire safe coating parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP218 RULE representation_for_flanged_plate_cross_section_dimensions FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['depth','width','radius','thk']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'flanged plate cross section dimensions') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_flat_bar_cross_section_dimensions FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['depth','width']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'flat bar cross section dimensions') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE representation_for_freeboard_characteristics FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['assigned code', 'freeboard']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'freeboard characteristics'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_gaseous_cargo FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['cargo type', 'carried in liquid state', 'pollution code', 'un type code']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'gaseous cargo parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_gaseous_cargo_assignment FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['assignment context', 'cargo identifier']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'gaseous cargo assignment parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE representation_for_global_axis_placement FOR (representation); LOCAL reps: BAG OF REPRESENTATION := []; arg_list: LIST OF STRING := ['global axes and origin', 'after perpendicular offset', 'orientation']; violation: LOGICAL := FALSE; END_LOCAL; reps := QUERY( temp_rep <* representation | SIZEOF ( QUERY( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'global axis placement') ) ) > 0 ); REPEAT i:=1 TO HIINDEX(reps) WHILE (NOT violation); REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); violation := (SIZEOF(QUERY(rep_item <* reps[i].items | rep_item.name = arg_list[j])) <> 1); END_REPEAT; END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_gross_tonnage FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['overdeck tonnage', 'tonnage value', 'underdeck tonnage']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'gross tonnage'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP216 RULE representation_for_hull_moulded_form_design_parameter FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := [ 'aft end of parallel midbody at design draught', 'front end of parallel midbody at design draught', 'aft end of flat of side','front end of flat of side', 'block coefficient','prismatic coefficient', 'max wetted frame section area','waterplane coefficient']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep,'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'hull moulded form design parameter') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE representation_for_hydrostatic_table_constrained FOR ( applied_classification_assignment); LOCAL t3_set : SET OF representation_item := []; violation : LOGICAL := FALSE; t1_set : SET OF representation := []; c_a_set : SET OF applied_classification_assignment := []; c2_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF representation_item := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'hydrostatic table') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; c2_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'hydrostatic properties for constant floating position') ); REPEAT i := 1 TO HIINDEX(c2_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c2_a_set[i].items) BY 1; t2_set := t2_set + c2_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(t1_set[i].items) BY 1; t3_set := t3_set + t1_set[i].items[j]; END_REPEAT; violation := SIZEOF(t3_set * t2_set) < 1; t3_set := []; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE representation_for_hydrostatic_table_restricted FOR ( applied_classification_assignment); LOCAL t3_set : SET OF representation_item := []; violation : LOGICAL := FALSE; t1_set : SET OF representation := []; c_a_set : SET OF applied_classification_assignment := []; c2_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF representation_item := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'hydrostatic table') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; c2_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'hydrostatic property') ); REPEAT i := 1 TO HIINDEX(c2_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c2_a_set[i].items) BY 1; t2_set := t2_set + c2_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(t1_set[i].items) BY 1; t3_set := t3_set + t1_set[i].items[j]; END_REPEAT; violation := SIZEOF(t3_set * t2_set) < 1; t3_set := []; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE representation_for_hydrostatic_table_restricted_by_class_id FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF representation := []; c_a_set : SET OF applied_classification_assignment := []; arg_list : LIST OF STRING := ['mean shell thickness']; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'hydrostatic table') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* t1_set[i].items | ( rep_item.name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_interior_cutout_function_parameters FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['function']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'interior cutout function parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_inward_round_corner_design_parameters FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['radius','x offset','y offset']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'inward round corner design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE representation_for_lightship_definition FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['lightship weight', 'lightship centre of gravity']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'lightship definition parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_lightship_weight_item FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['aft weight extent', 'fwd weight extent']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'lightship weight item'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_liquid_cargo FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['cargo type', 'pollution code', 'un type code']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'liquid cargo parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_liquid_cargo_assignment FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['assignment context', 'cargo height', 'cargo identifier']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'liquid cargo assignment parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_loading_condition_design_definition FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['type of']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'loading condition design definition parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_loading_condition_operating_definition FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['type of']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'loading condition operating definition parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_loadline FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['load line length', 'load line depth', 'load line displacement', 'load line block coefficient', 'load line regulation']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'loadline'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP218 RULE representation_for_local_co_ordinate_system FOR (representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['local axes and origin']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'local co ordinatesystem') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215/AP216 RULE representation_for_local_coordinate_system FOR (representation); LOCAL reps: BAG OF REPRESENTATION := []; arg_list: LIST OF STRING := ['local axes and origin']; violation: LOGICAL := FALSE; END_LOCAL; reps := QUERY( temp_rep <* representation | SIZEOF ( QUERY( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'local coordinate system') ) ) > 0 ); REPEAT i:=1 TO HIINDEX(reps) WHILE (NOT violation); REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); violation := (SIZEOF(QUERY(rep_item <* reps[i].items | rep_item.name = arg_list[j])) <> 1); END_REPEAT; END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP216 RULE representation_for_midship_tumble_restricted_by_class_id FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF representation := []; c_a_set : SET OF applied_classification_assignment := []; arg_list : LIST OF STRING := ['tumble out at bottom', 'tumble in at top','tumble out at side', 'tumble in at side']; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'midship tumble') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* t1_set[i].items | ( rep_item.name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215/AP218 RULE representation_for_moment_3d_restricts_representation_item FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['longitudinal moment', 'transverse moment', 'vertical moment', 'origin']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (i <* representation| i.NAME = 'moment 3d'); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_moments_of_inertia FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['long moment of inertia', 'trans moment of inertia']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'moments of inertia'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP216 RULE representation_for_moulded_form_function_parameters FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['function']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep,'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'moulded form function parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE representation_for_net_tonnage FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['tonnage value']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'net tonnage'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP216 RULE representation_for_offset_point_table_model_for_point FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF compound_representation_item := []; c_a_set : SET OF applied_classification_assignment := []; arg_list : LIST OF STRING := ['section point']; t2_set : SET OF representation_item := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'section of offset point table') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; t2_set := t1_set[i].item_element; violation := SIZEOF(QUERY ( items <* t2_set | (items.name = arg_list[j]) )) < 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE representation_for_offset_point_table_model_for_section FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF compound_representation_item := []; c_a_set : SET OF applied_classification_assignment := []; arg_list : LIST OF STRING := ['offset point table section']; t2_set : SET OF representation_item := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'offset point table model') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; t2_set := t1_set[i].item_element; violation := SIZEOF(QUERY ( items <* t2_set | (items.name = arg_list[j]) )) < 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE representation_for_offset_table_shape_representation_restricted FOR ( applied_classification_assignment); LOCAL t3_set : SET OF representation_item := []; violation : LOGICAL := FALSE; t1_set : SET OF representation := []; c_a_set : SET OF applied_classification_assignment := []; c2_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF representation_item := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'offset table shape representation') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; c2_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'offset point table model') ); REPEAT i := 1 TO HIINDEX(c2_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c2_a_set[i].items) BY 1; t2_set := t2_set + c2_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(t1_set[i].items) BY 1; t3_set := t3_set + t1_set[i].items[j]; END_REPEAT; violation := SIZEOF(t3_set * t2_set) < 1; t3_set := []; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_outward_round_corner_design_parameters FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['radius','x offset','y offset']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'outward round corner design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_part_edge_cutout_design_parameters FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['r left','r right','x a','x b','x c', 'x d','y b','y c']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'part edge cutout design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE representation_for_person_group FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['number of people', 'person type', 'volume']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'person group parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_primer_coating FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['dry film thickness', 'number of coats', 'surface preparation']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'primer coating parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_principal_characteristics FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['length between perpendiculars', 'moulded breadth', 'moulded depth']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'principal characteristics'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP218 RULE representation_for_profile_curve_trace_line_design_parameters FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['curve']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'profile curve trace line design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_profile_function_parameters FOR (representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['function']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'profile function parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE representation_for_propeller_location_restricted_by_class_id FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF representation := []; c_a_set : SET OF applied_classification_assignment := []; arg_list : LIST OF STRING := ['shaft line inclination x', 'shaft line inclination y','shaft line location', 'propeller location']; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'propeller location') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* t1_set[i].items | ( rep_item.name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE representation_for_propeller_moulded_form_design_parameter FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['type of propulsion', 'propeller diameter','chord length at 0 7 radius', 'thickness at 0 7 radius','number of propeller blades', 'expanded area ratio','hub diameter ratio', 'nominal design pitch ratio','type of propeller blades', 'rake','skew','design sense of rotation']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep,'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'propeller moulded form design parameter') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_rectangular_cutback_corner_design FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['radius','x depth','y depth']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'rectangular cutback corner design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_rectangular_cutout_design_parameters FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['length of','width']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'rectangular cutout design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_round_bar_cross_section_dimensions FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['radius']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'round bar cross section dimensions') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_round_corner_rectangular_cutout_design FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['corner radius','length of','width']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'round corner rectangular cutout design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_round_edge_rectangular_cutout_design FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['distance','edge radius','length of', 'width']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'round edge rectangular cutout design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE representation_for_rudder_moulded_form_design_parameter FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['rudder height','rudder mean height', 'rudder length','rudder mean length','rudder thickness', 'projected rudder area','type of the rudder', 'rudder location']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep,'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'rudder moulded form design parameter') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_shear_bevel_design_parameters FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['offset','x y angle','x z angle']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'shear bevel design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE representation_for_space_adjacency_relationship FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['adjacency access', 'adjacency type']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'space adjacency relationship parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_space_positional_relationship FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['relationship type']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'space positional relationship parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP218 RULE representation_for_square_tube_cross_section_dimensions FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['depth','width','wall thk']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'square tube cross section dimensions') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215/AP216 RULE representation_for_stability_table_restricted FOR (APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; c2_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT:= []; t1_set: SET OF representation := []; t2_set: SET OF representation_item := []; t3_set: SET OF representation_item := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.Assigned_class.name = 'stability table'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; c2_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.Assigned_class.name = 'stability properties for one floating position'); REPEAT i := 1 TO HIINDEX(c2_a_set); REPEAT j := 1 TO HIINDEX(c2_a_set[i].items); t2_set := t2_set + c2_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE (NOT violation); REPEAT j := 1 TO HIINDEX(t1_set[i].items); t3_set := t3_set + t1_set[i].items[j]; END_REPEAT; violation := (SIZEOF(t3_set* t2_set) < 1); t3_set:= []; END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215/AP216 RULE representation_for_stability_table_restricted_by_class_id FOR (applied_classification_assignment); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT:= []; t1_set: SET OF REPRESENTATION := []; arg_list: LIST OF STRING := ['mean shell thickness']; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'stability table'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i:=1 TO HIINDEX(t1_set) WHILE (NOT violation); REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); violation:= (SIZEOF(QUERY(rep_item<* t1_set[i].items | rep_item.name = arg_list[j])) <> 1); END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP218 RULE representation_for_structural_added_material_feature_design FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['added_material_length']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = ( 'structural added material feature ' + 'design parameters')) )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_structural_part_joint_design FOR (representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['tightness','joint orientation']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'structural part joint design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_structural_part_symmetry_relationship FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['mirroring plane']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'structural part symmetry relationship design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_structural_system_symmetry_relationship FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['mirroring plane']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'structural system symmetry relationship design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_t_bar_cross_section_dimensions FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['depth','width','web thk', 'flange thk','radius','k']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 't bar cross section dimensions') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE representation_for_tank_compartment_property FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['context', 'design stowage density']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'tank compartment property'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP216 RULE representation_for_thruster_moulded_form_design_parameter FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['thruster tunnel diameter', 'thruster tunnel min length', 'thruster tunnel max length', 'geometric thruster location','thruster location']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep,'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'thruster moulded form design parameter') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE representation_for_tonnage_definition FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['tonnage regulation']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'tonnage definition'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_tonnage_measurement FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['tonnage value']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'tonnage measurement'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP218 RULE representation_for_triangular_cutout_design_parameters FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['c1 radius','c2 radius','c3 radius', 'c2 x','c3 x','c3 y']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'triangular cutout design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_for_twist_location_design_parameters FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['location','direction']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'twist location design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE representation_for_unit_cargo FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['cargo type', 'pollution code', 'un type code']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'unit cargo parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_unit_cargo_assignment FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['assignment context', 'cargo identifier']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'unit cargo assignment parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_unit_cargo_bounding_box FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['point max', 'point min']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'unit cargo bounding box'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_unit_cargo_group FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['volume']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'unit cargo group parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_vehicle_load_description FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['load handling', 'load per wheel', 'number of wheels', 'type of vehicle']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'vehicle load description'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE representation_for_zone_function FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['used for']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'zone function parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215/AP216 RULE representation_has_global_uncertainty_assigned_context FOR (SHAPE_REPRESENTATION); LOCAL has_gunac: LOGICAL := TRUE; END_LOCAL; REPEAT i := 1 TO HIINDEX(SHAPE_REPRESENTATION) WHILE has_gunac; has_gunac := ('STEP_SHIP_SCHEMA.GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT' IN TYPEOF(SHAPE_REPRESENTATION[i].CONTEXT_OF_ITEMS)); END_REPEAT; WHERE WR1: has_gunac; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE representation_has_global_unit_assigned_context FOR (representation ); LOCAL has_guac : LOGICAL := TRUE; END_LOCAL; REPEAT i := 1 TO HIINDEX(representation) WHILE has_guac; REPEAT j := 1 TO SIZEOF(representation[i].items) WHILE has_guac; IF ('STEP_SHIP_SCHEMA.VALUE_REPRESENTATION_ITEM' IN TYPEOF(representation[i].items[j])) OR ('STEP_SHIP_SCHEMA.GEOMETRIC_REPRESENTATION_ITEM' IN TYPEOF(representation[i].items[j])) THEN has_guac := 'STEP_SHIP_SCHEMA.GLOBAL_UNIT_ASSIGNED_CONTEXT' IN TYPEOF(representation[i].CONTEXT_OF_ITEMS); END_IF; END_REPEAT; END_REPEAT; WHERE WR1: has_guac; END_RULE; -- ONLY IN AP218 RULE representation_has_references_with_name_moment_3d FOR ( representation, property_definition_representation, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF representation := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'weight and centre of gravity') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'moment 3d') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_item_corrugated_structure_boundary_relationship FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['displacement']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'corrugated structure boundary relationship design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_item_for_panel_system_curve_boundary_design FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['displacement']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'panel system curve boundary design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_item_for_structural_weld_shrinkage_allowance FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['longitudinal allowance', 'transverse allowance','vertical allowance']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = ( 'structural weld shrinkage allowance feature ' + 'design parameters')) )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE representation_item_for_transformation_to_parent FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF property_definition := []; t2_set: SET OF property_definition_representation := []; t3_set: SET OF representation := []; t4_set: SET OF representation_map := []; t5_set: SET OF mapped_item := []; arg_list: LIST OF STRING := ['local coordinate system position in global coordinate system', 'local coordinate system position in parent local coordinate system', 'local coordinate system position in parent local coordinate system with position reference']; violation1: LOGICAL := FALSE; violation2: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'local co ordinate system'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation1; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation1 := NOT (SIZEOF(QUERY(t2_inst <* t2_set | t2_inst.used_representation.name = 'local axis representation')) = 1); t3_set := t3_set + t2_set[i].used_representation; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation1; t4_set := bag_to_set(USEDIN(t3_set[i], 'STEP_SHIP_SCHEMA.REPRESENTATION_MAP.MAPPED_REPRESENTATION')); END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation1; t5_set := bag_to_set(USEDIN(t4_set[i], 'STEP_SHIP_SCHEMA.MAPPED_ITEM.MAPPING_SOURCE')); REPEAT j := 1 TO 3 WHILE NOT violation2; violation2 := NOT (SIZEOF(QUERY(t2_inst <* t5_set | t2_inst.name = ARG_LIST[j])) = 1); END_REPEAT; END_REPEAT; WHERE WR1: NOT violation1; WR2: NOT violation2; END_RULE; -- ONLY IN AP218 RULE representation_item_to_structural_system_adjacency_relationship FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['displacement']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'structural system adjacency relationship design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP216 RULE representation_items_appendage_moulded_form_design_parameter FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['moulded form outer surface', 'moulded form displacement','user def appendage type']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'appendage moulded form design parameter') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP216 RULE representation_items_for_bottom_moulded_form_design_parameter FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['moulded form outer surface', 'moulded form displacement']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'bottom moulded form design parameter') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP216 RULE representation_items_for_bulb_moulded_form_design_parameter FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['moulded form outer surface', 'moulded form displacement']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'bulb moulded form design parameter') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_for_corrugated_part_design_parameters FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['mass']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'corrugated part design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_for_corrugated_structure_design FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['corrugation width', 'user defined tightness']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'corrugated structure design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_for_corrugated_structure_function FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['user def function']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'corrugated structure function parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP216 RULE representation_items_for_deck_moulded_form_design_parameter FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['moulded form outer surface', 'moulded form displacement']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'deck moulded form design parameter') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_for_edge_cutout_function_parameters FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['user def function']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'edge cutout function parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_for_edge_feature_function_parameters FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['user def function']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'edge feature function parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_for_elongated_oval_cutout_design FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['r3','r3 x','r3 y']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'elongated oval cutout design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP216 RULE representation_items_for_hull_moulded_form_design_parameter FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['moulded form outer surface', 'moulded form displacement', 'waterline angle of entrance at stern', 'waterline angle of entrance at bow', 'max frame section area location','hull length pp', 'hull length waterline','hull breadth','hull depth', 'hull design draught','gunwale radius']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'hull moulded form design parameter') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_for_interior_cutout_function_parameters FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['user def function']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'interior cutout function parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_for_inward_round_corner_design FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['z depth']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'inward round corner design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_for_maximum_permissible_swbm_values FOR ( compound_representation_item); LOCAL violation : LOGICAL := FALSE; rep_item : SET OF representation_item := []; arg_list : LIST OF STRING := ['hogging','sagging','position']; creps : BAG OF compound_representation_item := []; END_LOCAL; creps := QUERY ( temp_comp_rep_item <* compound_representation_item | (temp_comp_rep_item.name = 'maximum permissible swbm values') ); REPEAT i := 1 TO HIINDEX(creps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; REPEAT k := 1 TO HIINDEX(creps[i].item_element) BY 1; rep_item := creps[i].item_element; violation := SIZEOF(QUERY ( items <* rep_item | (items.name = arg_list[j]) )) = 1; END_REPEAT; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_items_for_maximum_permissible_swsf_values FOR ( compound_representation_item); LOCAL violation : LOGICAL := FALSE; rep_item : SET OF representation_item := []; arg_list : LIST OF STRING := ['negative value','positive value', 'position']; creps : BAG OF compound_representation_item := []; END_LOCAL; creps := QUERY ( temp_comp_rep_item <* compound_representation_item | (temp_comp_rep_item.name = 'maximum permissible swsf values') ); REPEAT i := 1 TO HIINDEX(creps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; REPEAT k := 1 TO HIINDEX(creps[i].item_element) BY 1; rep_item := creps[i].item_element; violation := SIZEOF(QUERY ( items <* rep_item | (items.name = arg_list[j]) )) = 1; END_REPEAT; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE representation_items_for_moulded_form_design_parameters FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['status']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'moulded form design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP216 RULE representation_items_for_moulded_form_function_parameters FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['user def function']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep,'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'moulded form function parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_for_outward_round_corner_design FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['z depth']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'outward round corner design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_for_panel_system_boundary_relationship FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['displacement']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'panel system boundary relationship design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_for_panel_system_function_parameters FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['user def function']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'panel system function parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_for_profile_boundary_relationship_design FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['displacement']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'profile boundary relationship design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_for_profile_curve_trace_line_design FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['displacement']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'profile curve trace line design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_for_profile_trace_line_relationship_design FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['displacement','auxiliary line']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'profile trace line relationship design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_for_rectangular_cutback_corner_design FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['z depth']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'rectangular cutback corner design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP216 RULE representation_items_for_rudder_moulded_form_design_parameter FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['moulded form outer surface', 'moulded form displacement']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'rudder moulded form design parameter') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_for_seam_curve_relationship_parameter FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['displacement']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'seam curve relationship parameter') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_for_shear_bevel_design_parameters FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['z angle']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'shear bevel design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP216 RULE representation_items_of_thruster_moulded_form_design_parameter FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['moulded form outer surface', 'moulded form displacement']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'thruster moulded form design parameter') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_optional_for_bevel_design_parameters FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['z angle']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'bevel design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_optional_for_beveled_groove_weld_design FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['weld backing type','taper angle']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'beveled groove weld design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_bulk_cargo FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['flash point', 'required carriage temperature', 'permeability', 'stowage factor', 'user def cargo']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'bulk cargo parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP218 RULE representation_items_optional_for_butt_groove_weld_design FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['weld backing type']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'butt groove weld design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_capacity_properties FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['user defined capacity context']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'capacity properties'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_class_deck_load_requirement_definition FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['grab weight', 'stowage height', 'stowage rate', 'vehicle load']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'class deck load requirement definition parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE representation_items_optional_for_class_notation FOR (representation); LOCAL reps: BAG OF REPRESENTATION := []; arg_list: LIST OF STRING := ['ice class notation','service factor', 'approval required for heavy cargo']; found: LOGICAL := FALSE; END_LOCAL; reps := QUERY( temp_rep <* representation | SIZEOF ( QUERY( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'class notation'))) > 0 ); REPEAT i:=1 TO HIINDEX(reps) WHILE (NOT found); REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT found); found := (SIZEOF(QUERY(rep_item <* reps[i].items | rep_item.name=arg_list[j])) > 1); END_REPEAT; END_REPEAT; WHERE wr1: NOT found; END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_compartment_access_authorization FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['user defined value']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment access authorization'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_compartment_design_requirement FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['user defined value']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment design requirement parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_compartment_function FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['user def function']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment function parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_compartment_insulation FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['user defined value']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment insulation'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_compartment_noise_category FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['user defined value']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment noise category'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_compartment_safety_class FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['user defined value']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment safety class'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_compartment_security FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['user defined value']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment security classification'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_compartment_tightness FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['user defined value']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'compartment tightness'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_corrosion_control_coating FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['user defined type']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'corrosion control coating parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP218 RULE representation_items_optional_for_corrugation_dimensions FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['radius 1','radius 2']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'corrugation dimensions') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_damage_case FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['user defined']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'damage case parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_deck_zone_function FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['user def function']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'deck zone function parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_detailed_cargo_material_properties FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['density', 'expansion coefficient', 'specific heat capacity', 'thermal conductivity', 'viscosity']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation | SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.NAME = 'detailed cargo material properties parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_dry_cargo FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['flash point', 'required carriage temperature', 'user def cargo', 'permeability', 'stowage factor']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'dry cargo parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_gaseous_cargo FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['flash point', 'required carriage pressure', 'required carriage temperature', 'user def cargo']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'gaseous cargo parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_general_cargo_material_properties FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['density']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'general cargo material properties parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP218 RULE representation_items_optional_for_groove_weld_design FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['weld backing type']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'groove weld design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_liquid_cargo FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['flash point', 'required carriage pressure', 'required carriage temperature', 'user def cargo']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'liquid cargo parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_loading_condition_operating_definition FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['place of loading']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'loading condition operating definition parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP216/AP218 RULE representation_items_optional_for_owner_designation FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['owner approval']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'owner designation') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_optional_for_panel_system_design FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['stiffener spacing', 'user defined tightness']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'panel system design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_optional_for_plate_design_parameters FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['mass']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'plate design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_optional_for_plate_function_parameters FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['user def function']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'plate function parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_optional_for_plate_strake_function FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['user def function']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'plate strake function parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE representation_items_optional_for_principal_characteristics FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['block coefficient', 'design draught', 'design deadweight', 'min draught at fp', 'max draught at fp', 'min draught at ap', 'max draught at ap']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'principal characteristics'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP218 RULE representation_items_optional_for_profile_design_parameters FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['mass']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'profile design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_optional_for_profile_function_parameters FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['user def function']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'profile function parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_optional_for_seam_design_parameters FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['seam curve']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'seam design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_space_connection_relationship FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['connecting system']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'space connection relationship parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP218 RULE representation_items_optional_for_structural_system_design FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['user def tightness']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'structural system design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_optional_for_structural_system_function FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['user def function']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'structural system function parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_tank_geometric_parameters FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['breadth wash', 'length wash']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'tank geometric parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_tank_piping_design_properties FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['airpipe height', 'filling height', 'relief valve pressure setting', 'sounding pipe height']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'tank piping design properties'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_unit_cargo FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['flash point', 'permeability', 'stowage factor', 'required carriage temperature', 'stack limit', 'user def cargo', 'volume']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'unit cargo parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_vehicle_load_description FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['max tyre pressure', 'print area']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'vehicle load description'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP218 RULE representation_items_optional_for_weld_design_parameters FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['start suspension','end suspension', 'weld cross section area']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'weld design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_optional_for_weld_filler_material_design FOR ( representation, representation_item, property_definition_representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['chemical composition id', 'electrode id','material strength id', 'notch impact work id']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'weld filler material design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP215 RULE representation_items_optional_for_zone_function FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['user def function']; found : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'zone function parameters'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT found; found := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) > 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT found; END_RULE; -- ONLY IN AP216 RULE representation_items_propeller_moulded_form_design_parameter FOR ( representation); LOCAL found : LOGICAL := FALSE; arg_list : LIST OF STRING := ['blade_mean_height', 'moulded form outer surface','moulded form displacement']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'propeller moulded form design parameter') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT found; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT found; found := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item.name = arg_list[j]) )) > 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT found); END_RULE; -- ONLY IN AP218 RULE representation_items_specified_for_design_swsf_values FOR ( compound_representation_item, representation_item); LOCAL violation : LOGICAL := FALSE; rep_item : SET OF representation_item := []; arg_list : LIST OF STRING := ['negative value','positive value', 'position']; creps : BAG OF compound_representation_item := []; END_LOCAL; creps := QUERY ( temp_comp_rep_item <* compound_representation_item | (temp_comp_rep_item.name = 'design swsf values') ); REPEAT i := 1 TO HIINDEX(creps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; REPEAT k := 1 TO HIINDEX(creps[i].item_element) BY 1; rep_item := creps[i].item_element; violation := SIZEOF(QUERY ( items <* rep_item | (items.name = arg_list[j]) )) = 1; END_REPEAT; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215/AP218 RULE representation_local_coordinate_system_with_position_reference FOR (representation); LOCAL reps: BAG OF REPRESENTATION := []; arg_list: LIST OF STRING := ['local axes and origin']; violation: LOGICAL := FALSE; END_LOCAL; reps := QUERY( temp_rep <* representation | SIZEOF ( QUERY( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'local coordinate system with position reference') ) ) > 0 ); REPEAT i:=1 TO HIINDEX(reps) WHILE (NOT violation); REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); violation := (SIZEOF(QUERY(rep_item <* reps[i].items | rep_item.name = arg_list[j])) <> 1); END_REPEAT; END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP218 RULE representation_maximum_permissible_still_water_bending_moment FOR ( representation); LOCAL violation : LOGICAL := FALSE; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (temp_rep.name = 'maximum permissible still water bending moment') ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = 'maximum permissible swbm values') )) <> 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_of_design_still_water_bending_moment_parameters FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['hogging amidship','sagging amidship']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'design still water bending moment parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE representation_of_local_coordinate_system_with_position_reference FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['local axes and origin']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'local coordinate system with position reference') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_of_maximum_permissible_still_water_shear_force FOR ( representation); LOCAL violation : LOGICAL := FALSE; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (temp_rep.name = 'maximum permissible still water shear force') ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = 'maximum permissible swsf values') )) <> 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_by_name_bevel_design_parameters FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['offset','x y angle']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION' + '.USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'bevel design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216/AP218 RULE representation_restricted_by_name_class_notation FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['service area', 'approval required for oil cargo', 'approval required for loading unloading aground', 'approval required for unloading grabs']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'class notation') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216/AP218 RULE representation_restricted_by_name_class_parameters FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['length class','length solas', 'scantlings draught','block coefficient class', 'design speed ahead','design speed astern']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'class parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_by_name_corrugation_dimensions FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['depth','flat width 1','flat width 2', 'slope width']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'corrugation dimensions') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_by_name_flare_area_parameters FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['area','height']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'flare area parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_by_name_freeboard_characteristics FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['assigned code','freeboard']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'freeboard characteristics') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_by_name_lightship_definition FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['lightship weight', 'lightship centre of gravity']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'lightship_definition') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_by_name_lightship_weight_item FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['aft weight extent', 'fwd weight extent']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'lightship weight item') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_by_name_loadline FOR (representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['load line length','load line depth', 'load line displacement','load line block coefficient', 'load line regulation']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'loadline') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_by_name_plate_design_parameters FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['material offset','thickness']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'plate design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_by_name_plate_function_parameters FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['function']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'plate function parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216/AP218 RULE representation_restricted_by_name_principal_characteristics FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['length between perpendiculars', 'moulded breadth','moulded depth']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'principal characteristics') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_by_name_profile_design_parameters FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['mirrored']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'profile design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_by_name_section_properties FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['nominal mass per length','area', 'na u','na v','moi u','moi v','moi uv','tr']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'section properties') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE representation_restricted_by_name_ship_overall_dimensions FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['overall breadth','overall depth', 'overall length','stem overhang','stern overhang']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'ship overall dimensions') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_by_name_table_of_shear_force_values FOR ( representation); LOCAL violation : LOGICAL := FALSE; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (temp_rep.name = 'table of shear force values') ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = 'design swsf values') )) <> 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_by_name_w_shape_cross_section FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['depth','width','web thk', 'flange thk','radius','k']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'w shape cross section') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_assembly_manufacturing_position FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['assembly footprint','orientation']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'assembly manufacturing position parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_beveled_groove_weld_design FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['endcut shape','taper','sideness', 'weld joint spacer','configuration','penetration', 'joint_orientation','tightness']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'beveled groove weld design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_butt_groove_weld_design FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['face shape','sideness', 'weld joint spacer','configuration','penetration', 'joint_orientation','tightness']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'butt groove weld design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_composite_feature_design FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['composed of','description','name']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'composite feature design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_continuous_fillet_weld_design FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['endcut shape type','sideness', 'configuration','penetration','joint_orientation', 'tightness']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'continuous fillet weld design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_corrugated_structure_design FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['thickness','tightness']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'corrugated structure design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_corrugated_structure_function FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['function']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'corrugated structure function parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_fillet_weld_design_parameters FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['endcut shape type','sideness', 'configuration','penetration','joint_orientation', 'tightness']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'fillet weld design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_groove_weld_design FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['sideness','weld joint spacer', 'configuration','penetration','joint_orientation', 'tightness']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'groove weld design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_homogeneous_ship_material_property FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['density','poisson ratio', 'stress of fracture','thermal expansion coefficient', 'yield point','youngs module']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'homogeneous ship material property parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_hull_cross_section_design_definition FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['mirrored symmetry']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'hull cross section design definition parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_intermittent_fillet_weld_design FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['end rules','cutout rules', 'fillet alignment','fillet weld length', 'fillet weld spacing','penetration rules', 'endcut shape type','sideness','configuration', 'penetration','joint_orientation','tightness']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'intermittent fillet weld design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_panel_system_curve_boundary FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['curve']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'panel system curve boundary design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_panel_system_design_parameters FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['material offset','thickness', 'tightness']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'panel system design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_panel_system_function FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['function']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'panel system function parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_panel_system_plane_boundary FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['plane']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'panel system plane boundary design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_plate_renewal_definition_attributes FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['rule thickness','renewal thickness']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'plate renewal definition attributes') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_plate_strake_function FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['function']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'plate strake function parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_ship_material_property FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['density']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'ship material property parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_spot_seam_weld_design FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['weld context','configuration', 'penetration','joint_orientation','tightness']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'spot seam weld design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_structural_part_joint_design FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['tightness','joint orientation']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'structural part joint design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_structural_system_design FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['thightness']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'structural system design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_structural_system_function FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['function']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'structural system function parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_weld_design_parameters FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['shape of weld surface', 'weld geometry','connection angle','rotation angle', 'inclination angle','shrinkage','weld size']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'weld design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_weld_filler_material_design FOR ( representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['density']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'weld filler material design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_weld_manufacturing_definition FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['position','process', 'degree of automations','number of weld passes', 'welding deposition sequences','welding environment', 'tack weld used']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'weld manufacturing definition parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_welded_joint_design_parameters FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['configuration','penetration', 'joint_orientation','tightness']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'welded joint design parameters') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_restricted_for_welding_sequence_representation FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['name','start offset','end offset', 'direction']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'welding sequence representation') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215/AP218 RULE representation_restricted_weight_and_centre_of_gravity FOR (representation ); LOCAL reps : BAG OF representation := []; arg_list : LIST OF STRING := ['mass ', 'centre of gravity']; violation : LOGICAL := FALSE; END_LOCAL; reps := QUERY (temp_rep <* representation| SIZEOF(QUERY (temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION'))| (temp_prop_def_rep.NAME = 'weight and centre of gravity'))) > 0); REPEAT i := 1 TO HIINDEX(reps) WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) WHILE NOT violation; violation := SIZEOF(QUERY (rep_item <* reps[i].items | (rep_item.NAME = arg_list[j]))) <> 1; END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP218 RULE representation_restricts_profile_renewal_definition_attributes FOR ( representation, representation_item, property_definition_representation); LOCAL violation : LOGICAL := FALSE; arg_list : LIST OF STRING := ['renewal modulus','rule inertia', 'rule section modulus']; reps : BAG OF representation := []; END_LOCAL; reps := QUERY ( temp_rep <* representation | (SIZEOF( QUERY ( temp_prop_def_rep <* bag_to_set(USEDIN(temp_rep, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION')) | (temp_prop_def_rep.name = 'profile renewal definition attributes') )) > 0) ); REPEAT i := 1 TO HIINDEX(reps) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* reps[i].items | (rep_item. name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE representation_with_versionable_object_matches_pattern FOR (group, applied_classification_assignment); LOCAL clfied_inst : SET OF classification_item := []; END_LOCAL; REPEAT i := 1 TO HIINDEX(applied_classification_assignment) BY 1; IF applied_classification_assignment[i].assigned_class.name = 'versionable object' THEN clfied_inst := clfied_inst + applied_classification_assignment[i]. items; END_IF; END_REPEAT; WHERE wr1: (SIZEOF(QUERY ( i <* clfied_inst | (NOT (i.id LIKE '*.*')) )) = 0); END_RULE; -- ONLY IN AP203 RULE restrict_action_request_status FOR (action_request_status); WHERE wr1: (SIZEOF(QUERY ( ars <* action_request_status | (NOT (ars.status IN ['proposed','in_work','issued','hold'])) )) = 0); END_RULE; -- ONLY IN AP203 RULE restrict_approval_status FOR (approval_status); WHERE wr1: (SIZEOF(QUERY ( ast <* approval_status | (NOT (ast.name IN [ 'approved','not_yet_approved','disapproved','withdrawn'])) )) = 0); END_RULE; -- ONLY IN AP203 RULE restrict_certification_type FOR (certification_type); WHERE wr1: (SIZEOF(QUERY ( ct <* certification_type | (NOT (ct.description IN ['design_supplier','part_supplier'])) )) = 0); END_RULE; -- ONLY IN AP203 RULE restrict_contract_type FOR (contract_type); WHERE wr1: (SIZEOF(QUERY ( ct <* contract_type | (NOT (ct.description IN [ 'fixed_price','cost_plus'])) )) = 0); END_RULE; -- ONLY IN AP203 RULE restrict_date_time_role FOR (date_time_role); WHERE wr1: (SIZEOF(QUERY ( dtr <* date_time_role | (NOT (dtr.name IN [ 'creation_date','request_date','release_date','start_date', 'contract_date','certification_date','sign_off_date', 'classification_date','declassification_date'])) )) = 0); END_RULE; -- ONLY IN AP203 RULE restrict_document_type FOR (document_type); WHERE wr1: (SIZEOF(QUERY ( dt <* document_type | (NOT (dt.product_data_type IN ['material_specification','process_specification', 'design_specification','surface_finish_specification', 'cad_filename','drawing'])) )) = 0); END_RULE; -- ONLY IN AP218 RULE restrict_name_for_known_source FOR (known_source); WHERE wr1: (SIZEOF(QUERY ( ks <* known_source | (ks.name <> 'ISO 13584 library') )) = 0); END_RULE; -- ONLY IN AP203 RULE restrict_person_organization_role FOR (person_and_organization_role); WHERE wr1: (SIZEOF(QUERY ( por <* person_and_organization_role | (NOT (por. name IN ['request_recipient','initiator','part_supplier', 'design_supplier','configuration_manager','contractor', 'classification_officer','creator','design_owner'])) )) = 0); END_RULE; -- ONLY IN AP203 RULE restrict_product_category_value FOR ( product_related_product_category); WHERE wr1: (SIZEOF(QUERY ( prpc <* product_related_product_category | (NOT ( prpc.name IN ['assembly','detail', 'customer_furnished_equipment','inseparable_assembly','cast', 'coined','drawn','extruded','forged','formed','machined', 'molded','rolled','sheared'])) )) = 0); END_RULE; -- ONLY IN AP203 RULE restrict_security_classification_level FOR ( security_classification_level); WHERE wr1: (SIZEOF(QUERY ( scl <* security_classification_level | (NOT (scl. name IN ['unclassified','classified','proprietary', 'confidential','secret','top_secret'])) )) = 0); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE revision_has_mandatory_attribute_description FOR (group); LOCAL t1_set: SET OF group := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(i <* group | VALUE_IN(WHICH_CLASS(i), 'revision')); violate := (SIZEOF(QUERY(k <* t1_set | NOT EXISTS (k.description))) > 0); WHERE wr1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE revision_with_context_referenced_for_context_of_revision FOR (applied_group_assignment, group ); LOCAL t1_set : SET OF group := []; a_set : SET OF applied_group_assignment := []; violate : LOGICAL := FALSE; END_LOCAL; t1_set := QUERY (a <* group| VALUE_IN(WHICH_CLASS(a), 'revision with context')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY (b <* applied_group_assignment| (b.ASSIGNED_GROUP = t1_set[i]) AND (b.role.NAME = 'context of revision')); violate := SIZEOF(a_set) <> 1; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP218 RULE seam_has_at_most_one_class_references FOR (shape_aspect, shape_aspect_relationship, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect_relationship := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'seam') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.RELATING_SHAPE_ASPECT')); violation := SIZEOF(QUERY ( t2_inst <* t2_set | ( 'seam curve relationship' IN which_class(t2_inst)) )) > 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP203 RULE security_classification_optional_date_time FOR ( security_classification, applied_date_and_time_assignment); WHERE wr1: (SIZEOF(QUERY ( sc <* security_classification | (NOT (SIZEOF( QUERY ( ccdta <* applied_date_and_time_assignment | ((sc IN ccdta.items) AND ('declassification_date' = ccdta.role.name)) )) <= 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE security_classification_requires_approval FOR ( security_classification, applied_approval_assignment); WHERE wr1: (SIZEOF(QUERY ( sc <* security_classification | (NOT (SIZEOF( QUERY ( ccda <* applied_approval_assignment | (sc IN ccda.items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE security_classification_requires_date_time FOR ( security_classification, applied_date_and_time_assignment); WHERE wr1: (SIZEOF(QUERY ( sc <* security_classification | (NOT (SIZEOF( QUERY ( ccdta <* applied_date_and_time_assignment | ((sc IN ccdta.items) AND ('classification_date' = ccdta.role.name)) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE security_classification_requires_person_organization FOR ( security_classification, applied_person_and_organization_assignment); WHERE wr1: (SIZEOF(QUERY ( sc <* security_classification | (NOT (SIZEOF( QUERY ( ccdpoa <* applied_person_and_organization_assignment | (sc IN ccdpoa.items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_angle_bar_cross_section_dimensions FOR ( shape_aspect, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'angle bar cross section') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'angle bar cross section dimensions') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_assembly_manufacturing_position_parameters FOR ( shape_aspect, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'assembly manufacturing position') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'assembly manufacturing position parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_border_corner_cutout_boundary_relationship FOR ( shape_aspect, applied_group_assignment, group, applied_classification_assignment); LOCAL gr_ass_set : BAG OF applied_group_assignment := []; violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'border') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; gr_ass_set := USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_GROUP_ASSIGNMENT.ITEMS'); violation := SIZEOF(QUERY ( aga <* gr_ass_set | ((aga.role.name = 'boundary index 2') AND ('corner cutout boundary relationship' IN which_class(aga.assigned_group))) )) <> 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_bulbflat_cross_section_dimensions FOR ( shape_aspect, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'bulbflat cross section') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'bulbflat cross section dimensions') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_channel_cross_section_dimensions FOR (shape_aspect, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'channel cross section') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'channel cross section dimensions') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_circular_hollow_cross_section_dimensions FOR ( shape_aspect, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'circular hollow cross section') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'circular hollow cross section dimensions') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_composite_feature_design_parameters FOR ( shape_aspect, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'composite feature') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'composite feature design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_composite_feature_has_at_least_two_instances FOR ( shape_aspect, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF shape_aspect := []; classed_s_a_set : SET OF shape_aspect := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'composite feature') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; classed_s_a_set := classed_s_a_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; c_a_set := []; REPEAT i := 1 TO HIINDEX(classed_s_a_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(classed_s_a_set[1], 'STEP_SHIP_SCHEMA.SHAPE_ASPECT_RELATIONSHIP.' + 'RELATING_SHAPE_ASPECT')); violation := NOT (SIZEOF(t2_set) = 2); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_corner_cutout FOR (shape_aspect, applied_group_assignment, group, applied_classification_assignment); LOCAL gr_ass_set : BAG OF applied_group_assignment := []; violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'corner cutout') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; gr_ass_set := USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_GROUP_ASSIGNMENT.ITEMS'); violation := SIZEOF(QUERY ( aga <* gr_ass_set | ((aga.role.name = 'item 1') AND ('structural cutout boundary relationship' IN which_class(aga.assigned_group))) )) <> 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_corner_cutout_boundary_relationship FOR ( shape_aspect, applied_group_assignment, group, applied_classification_assignment); LOCAL gr_ass_set : BAG OF applied_group_assignment := []; violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'corner cutout') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; gr_ass_set := USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_GROUP_ASSIGNMENT.ITEMS'); violation := SIZEOF(QUERY ( aga <* gr_ass_set | ((aga.role.name = 'item 1') AND ('corner cutout boundary relationship' IN which_class(aga.assigned_group))) )) <> 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_corrugation_dimensions FOR (shape_aspect, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'corrugation') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'corrugation dimensions') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_explicit_profile_cross_section_dimensions FOR ( shape_aspect, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'explicit profile cross section') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = ' explicit profile cross section dimensions') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_flanged_plate_cross_section_dimensions FOR ( shape_aspect, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'flanged plate cross section') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'flanged plate cross section dimensions') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_flare_area_parameters FOR (shape_aspect, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'flare area') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'flare area parameters') )) = 2); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_flat_bar_cross_section_dimensions FOR ( shape_aspect, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'flat bar cross section') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'flat bar cross section dimensions') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_panel_system_curve_boundary_design FOR ( shape_aspect, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'panel system curve boundary') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'panel system curve boundary design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_panel_system_plane_boundary_design FOR ( shape_aspect, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'panel system plane boundary') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'panel system plane boundary design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_profile_curve_trace_line_design_parameters FOR ( shape_aspect, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'profile curve trace line') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'profile curve trace line design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_round_bar_cross_section_dimensions FOR ( shape_aspect, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'round bar cross section') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'round bar cross section dimensions') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_square_tube_cross_section_dimensions FOR ( shape_aspect, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'square tube cross section') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'square tube cross section dimensions') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_structural_cutout_boundary_relationship FOR ( shape_aspect, applied_group_assignment, group, applied_classification_assignment); LOCAL gr_ass_set : BAG OF applied_group_assignment := []; violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'structural cutout') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; gr_ass_set := USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_GROUP_ASSIGNMENT.ITEMS'); violation := SIZEOF(QUERY ( aga <* gr_ass_set | ((aga.role.name = 'item 1') AND ('structural cutout boundary relationship' IN which_class(aga.assigned_group))) )) <> 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_t_bar_cross_section_dimensions FOR (shape_aspect, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 't bar cross section') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 't bar cross section dimensions') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_twist_location_design_parameters FOR (shape_aspect, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'twist location') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'twist location design parameters') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_for_w_shape_cross_section_dimensions FOR (shape_aspect, property_definition_representation, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'w shape cross section') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')); violation := NOT (SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.name = 'w shape cross section dimensions') )) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_relationship_attributes_references_are_distinct FOR ( shape_aspect_relationship); LOCAL cyclic_relationship : LOGICAL := FALSE; END_LOCAL; REPEAT i := 1 TO HIINDEX(shape_aspect_relationship) BY 1 WHILE NOT cyclic_relationship; cyclic_relationship := shape_aspect_relationship[i]. relating_shape_aspect :=: shape_aspect_relationship[i]. related_shape_aspect; END_REPEAT; WHERE wr1: (NOT cyclic_relationship); END_RULE; -- ONLY IN AP218 RULE shape_aspect_relationship_with_definable_object FOR (group, applied_classification_assignment); LOCAL clfied_inst : SET OF classification_item := []; END_LOCAL; REPEAT i := 1 TO HIINDEX(applied_classification_assignment) BY 1; IF applied_classification_assignment[i].assigned_class.name = 'definable object' THEN clfied_inst := clfied_inst + applied_classification_assignment[i]. items; END_IF; END_REPEAT; WHERE wr1: (SIZEOF(QUERY ( i <* clfied_inst | (NOT (i.id LIKE '*.*')) )) = 0); END_RULE; -- ONLY IN AP218 RULE shape_aspect_relationship_with_definition_matches_pattern FOR ( group, applied_classification_assignment); LOCAL clfied_inst : SET OF classification_item := []; END_LOCAL; REPEAT i := 1 TO HIINDEX(applied_classification_assignment) BY 1; IF applied_classification_assignment[i].assigned_class.name = 'DEFINITION' THEN clfied_inst := clfied_inst + applied_classification_assignment[i]. items; END_IF; END_REPEAT; WHERE wr1: (SIZEOF(QUERY ( i <* clfied_inst | (NOT (i.id LIKE '*.*')) )) = 0); END_RULE; -- ONLY IN AP218 RULE shape_aspect_relationship_with_identification_assignment FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect_relationship := []; c_a_set : SET OF applied_classification_assignment := []; arg_list : LIST OF STRING := ['composite feature', 'seam curve relationship']; t2_set : SET OF shape_aspect_relationship := []; END_LOCAL; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = arg_list[j]) ); END_REPEAT; REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_IDENTIFICATION_ASSIGNMENT.ITEMS')); violation := NOT (SIZEOF(t2_set) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE shape_aspect_with_definable_object_matches_pattern FOR (group, applied_classification_assignment); LOCAL clfied_inst : SET OF classification_item := []; END_LOCAL; REPEAT i := 1 TO HIINDEX(applied_classification_assignment) BY 1; IF applied_classification_assignment[i].assigned_class.name = 'definable object' THEN clfied_inst := clfied_inst + applied_classification_assignment[i]. items; END_IF; END_REPEAT; WHERE wr1: (SIZEOF(QUERY ( i <* clfied_inst | (NOT (i.id LIKE '*.*')) )) = 0); END_RULE; -- ONLY IN AP218 RULE shape_aspect_with_identification_assignment FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF shape_aspect := []; c_a_set : SET OF applied_classification_assignment := []; arg_list : LIST OF STRING := ['composite feature','seam', 'structural cutout']; t2_set : SET OF shape_aspect := []; END_LOCAL; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = arg_list[j]) ); END_REPEAT; REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_IDENTIFICATION_ASSIGNMENT.ITEMS')); violation := NOT (SIZEOF(t2_set) = 1); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE shape_representation_subtype_exclusiveness FOR (shape_representation ); WHERE WR1: SIZEOF(QUERY (sr <* shape_representation| NOT (SIZEOF(TYPEOF(sr) * ['STEP_SHIP_SCHEMA.NON_MANIFOLD_SURFACE_SHAPE_REPRESENTATION']) <= 2))) = 0; END_RULE; -- ONLY IN AP216 RULE ship_curve_has_name FOR (applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF compound_representation_item := []; c_a_set : SET OF applied_classification_assignment := []; arg_list : LIST OF STRING := ['side condition','curve shape']; t2_set : SET OF representation_item := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'ship curve') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; t2_set := t1_set[i].item_element; violation := SIZEOF(QUERY ( items <* t2_set | (items.name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE ship_curve_segment_has_class FOR (applied_classification_assignment); LOCAL t3_set : SET OF representation_item := []; violation : LOGICAL := FALSE; t1_set : SET OF compound_representation_item := []; c_a_set : SET OF applied_classification_assignment := []; c_a_set2 : SET OF applied_classification_assignment := []; l_rep_item : list_representation_item; t2_set : SET OF compound_representation_item := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'ship curve segment') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; c_a_set2 := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'ship curve') ); REPEAT i := 1 TO HIINDEX(c_a_set2) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set2[i].items) BY 1; t2_set := t2_set + c_a_set2[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(t1_set[i].item_element) BY 1; l_rep_item := t1_set[i].item_element; t3_set := t3_set + l_rep_item[j]; END_REPEAT; violation := SIZEOF(t3_set * t2_set) <> 1; t3_set := []; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE ship_curve_with_spacing_position_has_class FOR ( applied_classification_assignment); LOCAL t3_set : SET OF representation_item := []; violation : LOGICAL := FALSE; t1_set : SET OF compound_representation_item := []; c_a_set : SET OF applied_classification_assignment := []; c_a_set2 : SET OF applied_classification_assignment := []; l_rep_item : list_representation_item; t2_set : SET OF compound_representation_item := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'ship curve with spacing position') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; c_a_set2 := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'spacing position') ); REPEAT i := 1 TO HIINDEX(c_a_set2) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set2[i].items) BY 1; t2_set := t2_set + c_a_set2[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(t1_set[i].item_element) BY 1; l_rep_item := t1_set[i].item_element; t3_set := t3_set + l_rep_item[j]; END_REPEAT; violation := SIZEOF(t3_set * t2_set) <> 1; t3_set := []; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE ship_designation_has_one_specified_names FOR(APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF product_definition := []; t2_set: SET OF applied_identification_assignment := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.name = 'ship designation'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.' + 'APPLIED_IDENTIFICATION_ASSIGNMENT.ITEMS')); violation := NOT (SIZEOF(QUERY(t2_inst <* t2_set | (t2_inst.role.name = 'imo number')OR (t2_inst.role.name = 'pennant hull number') )) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP218 RULE ship_material_property_has_at_most_one_named_references FOR ( property_definition, applied_document_reference, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF property_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF applied_document_reference := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'ship material property') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i],'STEP_SHIP_SCHEMA.' + 'APPLIED_DOCUMENT_REFERENCE.ITEMS')); violation := SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.role.name = 'material reference') )) > 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE ship_moulded_form_revision_has_description FOR ( product_definition_relationship); LOCAL violate : LOGICAL := FALSE; t1_set : SET OF product_definition_relationship := []; END_LOCAL; t1_set := QUERY ( i <* product_definition_relationship | VALUE_IN( which_class(i),'ship moulded form revision') ); violate := SIZEOF(QUERY ( k <* t1_set | (NOT EXISTS(k.description)) )) > 0; WHERE wr1: (NOT violate); END_RULE; -- ONLY IN AP216 RULE ship_overall_dimensions_has_properties FOR ( property_definition_representation, applied_classification_assignment); LOCAL t3_set : LIST OF property_definition := []; violation : LOGICAL := FALSE; t4_set : LIST OF product_definition := []; t1_set : LIST OF product_definition := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF property_definition_representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'ship overall dimensions') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; t2_set := QUERY ( i <* property_definition_representation | (i.name = 'ship overall dimensions') ); REPEAT i := 1 TO HIINDEX(t2_set) BY 1; t3_set := t3_set + t2_set[i].definition; END_REPEAT; REPEAT i := 1 TO HIINDEX(t3_set) BY 1; t4_set := t4_set + t3_set[i].definition; END_REPEAT; violation := t1_set <> t4_set; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE ship_point_compound_representation_has_name FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF compound_representation_item := []; c_a_set : SET OF applied_classification_assignment := []; arg_list : LIST OF STRING := ['point shape']; t2_set : SET OF representation_item := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'ship point') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; t2_set := t1_set[i].item_element; violation := SIZEOF(QUERY ( items <* t2_set | (items.name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP216 RULE ship_surface_compound_representation_has_name FOR ( applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF compound_representation_item := []; c_a_set : SET OF applied_classification_assignment := []; arg_list : LIST OF STRING := ['surface shape']; t2_set : SET OF representation_item := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'ship surface') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; t2_set := t1_set[i].item_element; violation := SIZEOF(QUERY ( items <* t2_set | (items.name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE source_for_library_definition FOR (representation, representation_item, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; c_a_set : SET OF applied_classification_assignment := []; arg_list : LIST OF STRING := ['library definition']; classed_rep_set : SET OF representation := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'source') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; classed_rep_set := classed_rep_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(classed_rep_set) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(arg_list) BY 1 WHILE NOT violation; violation := SIZEOF(QUERY ( rep_item <* classed_rep_set[i].items | (rep_item.name = arg_list[j]) )) <> 1; END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE spacing_position_compound_representation_has_name FOR (applied_classification_assignment); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF Compound_representation_item := []; t2_set: SET Of representation_item := []; arg_list: LIST OF STRING := ['position number', 'position']; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'spacing position'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i:=1 TO HIINDEX(t1_set) WHILE (NOT violation); REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); t2_set := t1_set[i].item_element; violation := (SIZEOF(QUERY(items <* t2_set | items.name = arg_list[j])) <> 1); END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE spacing_position_with_offset_compound_representation_has_class FOR (applied_classification_assignment); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; c_a_set2 : SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF COMPOUND_REPRESENTATION_ITEM := []; t2_set: SET OF COMPOUND_REPRESENTATION_ITEM := []; t3_set: SET Of representation_item := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'spacing position with offset'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; c_a_set2 := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'spacing position'); REPEAT i := 1 TO HIINDEX(c_a_set2); REPEAT j := 1 TO HIINDEX(c_a_set2[i].items); t2_set := t2_set + c_a_set2[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i:=1 TO HIINDEX(t1_set) WHILE (NOT violation); REPEAT j := 1 TO HIINDEX(t1_set[i].item_element); t3_set := t3_set + t1_set[i].item_element; END_REPEAT; violation := (SIZEOF(t3_set * t2_set) <> 1); t3_set:= []; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE spacing_position_with_offset_compound_representation_has_name FOR (applied_classification_assignment); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF Compound_representation_item := []; t2_set: SET Of representation_item := []; arg_list: LIST OF STRING := ['offset']; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = 'spacing position with offset'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i:=1 TO HIINDEX(t1_set) WHILE (NOT violation); REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); t2_set := t1_set[i].item_element; violation := (SIZEOF(QUERY(items <* t2_set | items.name = arg_list[j])) <> 1); END_REPEAT; END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215/AP216 RULE stability_properties_for_floating_position_has_class FOR (APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; c_a_set2 : SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF COMPOUND_REPRESENTATION_ITEM := []; t2_set: SET OF COMPOUND_REPRESENTATION_ITEM := []; t3_set: SET OF REPRESENTATION_ITEM := []; l_rep_item : list_representation_item; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.Assigned_class.name = 'stability properties for one floating position'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; c_a_set2 := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.Assigned_class.name = 'stability property'); REPEAT i := 1 TO HIINDEX(c_a_set2); REPEAT j := 1 TO HIINDEX(c_a_set2[i].items); t2_set := t2_set + c_a_set2[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i:=1 TO HIINDEX(t1_set) WHILE (NOT violation); REPEAT j := 1 TO HIINDEX(t1_set[i].item_element); l_rep_item := t1_set[i].item_element; t3_set := t3_set + l_rep_item[j]; END_REPEAT; violation := (SIZEOF(t3_set * t2_set) < 1); t3_set:= []; END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215/AP216 RULE stability_properties_for_floating_position_has_name FOR (APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF Compound_representation_item := []; t2_set: SET OF representation_item := []; arg_list: LIST OF STRING := ['centre of gravity above keel', 'definition of starting floating position']; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.Assigned_class.name = 'stability properties for one floating position'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i:=1 TO HIINDEX(t1_set) WHILE (NOT violation); REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); t2_set := t1_set[i].item_element; violation := (SIZEOF(QUERY(items <* t2_set | items.name = arg_list[j])) <> 1); END_REPEAT; END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215/AP216 RULE stability_property_has_name FOR (APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF Compound_representation_item := []; t2_set: SET OF representation_item := []; arg_list: LIST OF STRING := ['angle of heel', 'righting arm', 'centre of buoyancy']; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.Assigned_class.name = 'stability property'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i:=1 TO HIINDEX(t1_set) WHILE (NOT violation); REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); t2_set := t1_set[i].item_element; violation := (SIZEOF(QUERY(items <* t2_set | items.name = arg_list[j])) <> 1); END_REPEAT; END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP203 RULE start_request_requires_approval FOR (start_request, applied_approval_assignment); WHERE wr1: (SIZEOF(QUERY ( sr <* start_request | (NOT (SIZEOF( QUERY ( ccda <* applied_approval_assignment | (sr IN ccda.items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE start_request_requires_date_time FOR (start_request, applied_date_and_time_assignment); WHERE wr1: (SIZEOF(QUERY ( sr <* start_request | (NOT (SIZEOF( QUERY ( ccdta <* applied_date_and_time_assignment | (sr IN ccdta.items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE start_request_requires_person_organization FOR (start_request, applied_person_and_organization_assignment); WHERE wr1: (SIZEOF(QUERY ( sr <* start_request | (NOT (SIZEOF( QUERY ( ccdpoa <* applied_person_and_organization_assignment | (sr IN ccdpoa.items) )) >= 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE start_work_requires_approval FOR (start_work, applied_approval_assignment); WHERE wr1: (SIZEOF(QUERY ( sw <* start_work | (NOT (SIZEOF(QUERY ( ccda <* applied_approval_assignment | (sw IN ccda.items) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE start_work_requires_date_time FOR (start_work, applied_date_and_time_assignment); WHERE wr1: (SIZEOF(QUERY ( sw <* start_work | (NOT (SIZEOF(QUERY ( ccdta <* applied_date_and_time_assignment | ((sw IN ccdta.items) AND (ccdta.role.name = 'start_date')) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP218 RULE structural_class_rejection_has_at_least_one_role_references FOR ( group, applied_document_reference, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF group := []; c_a_set : SET OF applied_classification_assignment := []; t2_set : SET OF applied_document_reference := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'structural class rejection') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_DOCUMENT_REFERENCE.ITEMS')); violation := SIZEOF(QUERY ( t2_inst <* t2_set | (t2_inst.role.name = 'explanations') )) < 1; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE structural_part_symmetry_relationship_has_product_definition FOR ( group, applied_classification_assignment); LOCAL cl_ass : SET OF applied_classification_assignment := []; clfied_inst : SET OF product_definition_relationship := []; END_LOCAL; cl_ass := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'structural part symmetry relationship') ); REPEAT i := 1 TO HIINDEX(cl_ass) BY 1; clfied_inst := clfied_inst + cl_ass[i].items; END_REPEAT; WHERE wr1: ((SIZEOF(QUERY ( pdr <* clfied_inst | (NOT (SIZEOF(which_class( pdr.relating_product_definition)) > 0)) )) - SIZEOF( QUERY ( pdr <* clfied_inst | (NOT (SIZEOF(which_class(pdr. related_product_definition)) > 0)) ))) = 0); END_RULE; -- ONLY IN AP218 RULE structural_system_symmetry_relationship_has_product_definition FOR ( group, applied_classification_assignment); LOCAL cl_ass : SET OF applied_classification_assignment := []; clfied_inst : SET OF product_definition_relationship := []; END_LOCAL; cl_ass := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'structural system symmetry relationship') ); REPEAT i := 1 TO HIINDEX(cl_ass) BY 1; clfied_inst := clfied_inst + cl_ass[i].items; END_REPEAT; WHERE wr1: ((SIZEOF(QUERY ( pdr <* clfied_inst | (NOT (SIZEOF(which_class( pdr.relating_product_definition)) > 0)) )) - SIZEOF( QUERY ( pdr <* clfied_inst | (NOT (SIZEOF(which_class(pdr. related_product_definition)) > 0)) ))) = 0); END_RULE; -- ONLY IN AP203 RULE subtype_mandatory_action FOR (action); WHERE wr1: (SIZEOF(QUERY ( act <* action | (NOT ( 'STEP_SHIP_SCHEMA.DIRECTED_ACTION' IN TYPEOF(act))) )) = 0); END_RULE; -- ONLY IN AP203 RULE subtype_mandatory_effectivity FOR (effectivity); WHERE wr1: (SIZEOF(QUERY ( eff <* effectivity | (NOT ((SIZEOF([ 'STEP_SHIP_SCHEMA.SERIAL_NUMBERED_EFFECTIVITY', 'STEP_SHIP_SCHEMA.LOT_EFFECTIVITY', 'STEP_SHIP_SCHEMA.DATED_EFFECTIVITY'] * TYPEOF(eff)) = 1) AND ('STEP_SHIP_SCHEMA.CONFIGURATION_EFFECTIVITY' IN TYPEOF(eff)))) )) = 0); END_RULE; -- ONLY IN AP203 RULE subtype_mandatory_product_definition_formation FOR ( product_definition_formation); WHERE wr1: (SIZEOF(QUERY ( pdf <* product_definition_formation | (NOT (( 'STEP_SHIP_SCHEMA.' + 'PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE') IN TYPEOF(pdf))) )) = 0); END_RULE; -- ONLY IN AP203 RULE subtype_mandatory_product_definition_usage FOR ( product_definition_usage); WHERE wr1: (SIZEOF(QUERY ( pdu <* product_definition_usage | (NOT (( 'STEP_SHIP_SCHEMA.' + 'ASSEMBLY_COMPONENT_USAGE') IN TYPEOF(pdu))) )) = 0); END_RULE; -- ONLY IN AP203 RULE subtype_mandatory_representation FOR (representation); WHERE wr1: (SIZEOF(QUERY ( rep <* representation | (NOT ( 'STEP_SHIP_SCHEMA.SHAPE_REPRESENTATION' IN TYPEOF(rep))) )) = 0); END_RULE; -- ONLY IN AP203 RULE subtype_mandatory_representation_context FOR ( representation_context); WHERE wr1: (SIZEOF(QUERY ( rep_cntxt <* representation_context | (NOT ( 'STEP_SHIP_SCHEMA.GEOMETRIC_REPRESENTATION_CONTEXT' IN TYPEOF(rep_cntxt))) )) = 0); END_RULE; -- ONLY IN AP203 RULE subtype_mandatory_shape_representation FOR (shape_representation); WHERE wr1: (SIZEOF(QUERY ( sr <* shape_representation | (NOT ((SIZEOF([ 'STEP_SHIP_SCHEMA.' + 'ADVANCED_BREP_SHAPE_REPRESENTATION', 'STEP_SHIP_SCHEMA.FACETED_BREP_SHAPE_REPRESENTATION', 'STEP_SHIP_SCHEMA.MANIFOLD_SURFACE_SHAPE_REPRESENTATION', 'STEP_SHIP_SCHEMA.' + 'EDGE_BASED_WIREFRAME_SHAPE_REPRESENTATION', 'STEP_SHIP_SCHEMA.' + 'SHELL_BASED_WIREFRAME_SHAPE_REPRESENTATION', 'STEP_SHIP_SCHEMA.' + 'GEOMETRICALLY_BOUNDED_SURFACE_SHAPE_REPRESENTATION', 'STEP_SHIP_SCHEMA.' + 'GEOMETRICALLY_BOUNDED_WIREFRAME_SHAPE_REPRESENTATION'] * TYPEOF(sr)) = 1) OR (SIZEOF(QUERY ( it <* sr\representation. items | (NOT ('STEP_SHIP_SCHEMA.AXIS2_PLACEMENT_3D' IN TYPEOF(it))) )) = 0) OR (SIZEOF(QUERY ( sdr <* QUERY ( pdr <* USEDIN(sr, 'STEP_SHIP_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.' + 'USED_REPRESENTATION') | ( 'STEP_SHIP_SCHEMA.SHAPE_DEFINITION_REPRESENTATION' IN TYPEOF(pdr)) ) | (NOT (SIZEOF([ 'STEP_SHIP_SCHEMA.SHAPE_ASPECT', 'STEP_SHIP_SCHEMA.SHAPE_ASPECT_RELATIONSHIP'] * TYPEOF( sdr.definition.definition)) = 1)) )) = 0))) )) = 0); END_RULE; -- ONLY IN AP215 RULE tonnage_definition_has_properties FOR (property_definition_representation, applied_classification_assignment); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: LIST OF product_definition := []; t2_set: SET OF property_definition_representation := []; t3_set: LIST OF property_definition := []; t4_set: LIST OF product_definition := []; violation: LOGICAL := FALSE; END_LOCAL; c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.name = 'tonnage definition'); REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; t2_set:= QUERY(i <* PROPERTY_DEFINITION_REPRESENTATION | i.NAME = 'tonnage definition'); REPEAT i := 1 TO HIINDEX(t2_set); t3_set := t3_set + t2_set[i].definition; END_REPEAT; REPEAT i := 1 TO HIINDEX(t3_set); t4_set := t4_set + t3_set[i].definition; END_REPEAT; violation := t1_set <> t4_set; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE unique_approvals_in_approval_history FOR (GROUP, APPLIED_GROUP_ASSIGNMENT); LOCAL t1_set: SET OF GROUP := []; t2_set: SET OF APPLIED_GROUP_ASSIGNMENT := []; t3_set: SET OF approval :=[]; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(i <* GROUP | VALUE_IN(WHICH_CLASS(i), 'approval history')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; t2_set := QUERY(a <* APPLIED_GROUP_ASSIGNMENT | a.ASSIGNED_GROUP = t1_set[i]); t3_set := QUERY(b <* t2_set[1].items | 'STEP_SHIP_SCHEMA.APPROVAL' IN TYPEOF(b)); violate := NOT (VALUE_UNIQUE(t3_set)); END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP203 RULE unique_version_change_order_rule FOR (change); WHERE wr1: (SIZEOF(QUERY ( c <* change | (NOT unique_version_change_order(c. assigned_action)) )) = 0); END_RULE; -- ONLY IN AP216 RULE user_def_appendage_type_description_required FOR (representation); LOCAL violation : LOGICAL := FALSE; END_LOCAL; REPEAT i := 1 TO HIINDEX(representation) BY 1 WHILE NOT violation; violation := (SIZEOF(QUERY ( r <* representation[i].items | (( 'STEP_SHIP_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(r)) AND (r.name = 'type of appendage') AND (r\ descriptive_representation_item.description = 'user defined')) )) > 0) AND (SIZEOF(QUERY ( r <* representation[i].items | (r.name = 'user def appendage type') )) = 0); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE user_def_cargo_description_required_for_cargo_type FOR (representation ); LOCAL violation : LOGICAL := FALSE; END_LOCAL; REPEAT i := 1 TO HIINDEX(representation) WHILE NOT violation; violation := (SIZEOF(QUERY (r <* representation[i].items | (('STEP_SHIP_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(r)) AND (r.NAME = 'cargo type')) AND (r\descriptive_representation_item.description = 'user defined'))) > 0) AND (SIZEOF(QUERY (r <* representation[i].items | (r.NAME = 'user def cargo'))) = 0); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE user_def_cargo_description_required_for_type_of FOR (representation ); LOCAL violation : LOGICAL := FALSE; END_LOCAL; REPEAT i := 1 TO HIINDEX(representation) WHILE NOT violation; violation := (SIZEOF(QUERY (r <* representation[i].items | (('STEP_SHIP_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(r)) AND (r.NAME = 'type of')) AND (r\descriptive_representation_item.description = 'user defined'))) > 0) AND (SIZEOF(QUERY (r <* representation[i].items | (r.NAME = 'user def cargo'))) = 0); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE user_def_function_description_required FOR (representation ); LOCAL violation : LOGICAL := FALSE; END_LOCAL; REPEAT i := 1 TO HIINDEX(representation) WHILE NOT violation; violation := (SIZEOF(QUERY (r <* representation[i].items | (('STEP_SHIP_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(r)) AND (r.NAME = 'used for')) AND (r\descriptive_representation_item.description = 'user defined'))) > 0) AND (SIZEOF(QUERY (r <* representation[i].items | (r.NAME = 'user def function'))) = 0); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE user_defined_capacity_context_description_required_for_capacity_context FOR (representation ); LOCAL violation : LOGICAL := FALSE; END_LOCAL; REPEAT i := 1 TO HIINDEX(representation) WHILE NOT violation; violation := (SIZEOF(QUERY (r <* representation[i].items | (('STEP_SHIP_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(r)) AND (r.NAME = 'capacity context')) AND (r\descriptive_representation_item.description = 'user defined'))) > 0) AND (SIZEOF(QUERY (r <* representation[i].items | (r.NAME = 'user defined capacity context'))) = 0); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE user_defined_description_required_for_damage_cause FOR (representation ); LOCAL violation : LOGICAL := FALSE; END_LOCAL; REPEAT i := 1 TO HIINDEX(representation) WHILE NOT violation; violation := (SIZEOF(QUERY (r <* representation[i].items | (('STEP_SHIP_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(r)) AND (r.NAME = 'damage cause')) AND (r\descriptive_representation_item.description = 'user defined'))) > 0) AND (SIZEOF(QUERY (r <* representation[i].items | (r.NAME = 'user defined'))) = 0); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP218 RULE user_defined_requires_user_defined_class FOR (product_definition, group, applied_classification_assignment); LOCAL violation : LOGICAL := FALSE; cl_ass : SET OF applied_classification_assignment := []; clfied_inst : SET OF classification_item := []; END_LOCAL; cl_ass := QUERY ( i <* applied_classification_assignment | ((i.role. name = 'class membership') AND (i.assigned_class.name = 'user defined')) ); REPEAT i := 1 TO HIINDEX(cl_ass) BY 1; clfied_inst := clfied_inst + cl_ass[i].items; END_REPEAT; REPEAT i := 1 TO HIINDEX(clfied_inst) BY 1 WHILE NOT violation; violation := NOT ('user defined class' IN which_class(clfied_inst[i])); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP218 RULE user_defined_tightness_description_required FOR (representation, representation_item); LOCAL violation : LOGICAL := FALSE; END_LOCAL; REPEAT i := 1 TO HIINDEX(representation) BY 1 WHILE NOT violation; violation := (SIZEOF(QUERY ( r <* representation[i].items | (( 'STEP_SHIP_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(r)) AND (r.name = 'tightness') AND (r\ descriptive_representation_item.description = 'user defined')) )) > 0) AND (SIZEOF(QUERY ( r <* representation[i].items | (r.name = 'user defined tightness') )) = 0); END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215 RULE user_defined_type_description_required_for_type_of FOR (representation ); LOCAL violation : LOGICAL := FALSE; END_LOCAL; REPEAT i := 1 TO HIINDEX(representation) WHILE NOT violation; violation := (SIZEOF(QUERY (r <* representation[i].items | (('STEP_SHIP_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(r)) AND (r.NAME = 'type of')) AND (r\descriptive_representation_item.description = 'user defined'))) > 0) AND (SIZEOF(QUERY (r <* representation[i].items | (r.NAME = 'user defined type'))) = 0); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE user_defined_value_description_required_for_authorization_classification FOR (representation ); LOCAL violation : LOGICAL := FALSE; END_LOCAL; REPEAT i := 1 TO HIINDEX(representation) WHILE NOT violation; violation := (SIZEOF(QUERY (r <* representation[i].items | (('STEP_SHIP_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(r)) AND (r.NAME = 'authorization classification')) AND (r\descriptive_representation_item.description = 'user defined'))) > 0) AND (SIZEOF(QUERY (r <* representation[i].items | (r.NAME = 'user defined value'))) = 0); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE user_defined_value_description_required_for_compartment_insulation FOR (representation ); LOCAL rep_set : SET OF representation := []; violation : LOGICAL := FALSE; END_LOCAL; REPEAT i := 1 TO HIINDEX(representation) WHILE NOT violation; violation := (SIZEOF(QUERY (r <* representation[i].items | (('STEP_SHIP_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(r)) AND (r.NAME = 'compartment insulation')) AND (r\descriptive_representation_item.description = 'user defined'))) > 0) AND (SIZEOF(QUERY (r <* representation[i].items | (r.NAME = 'user defined value'))) = 0); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE user_defined_value_description_required_for_compartment_noise_category FOR (representation ); LOCAL rep_set : SET OF representation := []; violation : LOGICAL := FALSE; END_LOCAL; REPEAT i := 1 TO HIINDEX(representation) WHILE NOT violation; violation := (SIZEOF(QUERY (r <* representation[i].items | (('STEP_SHIP_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(r)) AND (r.NAME = 'compartment noise category')) AND (r\descriptive_representation_item.description = 'user defined'))) > 0) AND (SIZEOF(QUERY (r <* representation[i].items | (r.NAME = 'user defined value'))) = 0); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE user_defined_value_description_required_for_compartment_safety_class FOR (representation ); LOCAL rep_set : SET OF representation := []; violation : LOGICAL := FALSE; END_LOCAL; REPEAT i := 1 TO HIINDEX(representation) WHILE NOT violation; violation := (SIZEOF(QUERY (r <* representation[i].items | (('STEP_SHIP_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(r)) AND (r.NAME = 'compartment safety class')) AND (r\descriptive_representation_item.description = 'user defined'))) > 0) AND (SIZEOF(QUERY (r <* representation[i].items | (r.NAME = 'user defined value'))) = 0); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE user_defined_value_description_required_for_compartment_security FOR (representation ); LOCAL rep_set : SET OF representation := []; violation : LOGICAL := FALSE; END_LOCAL; REPEAT i := 1 TO HIINDEX(representation) WHILE NOT violation; violation := (SIZEOF(QUERY (r <* representation[i].items | (('STEP_SHIP_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(r)) AND (r.NAME = 'compartment security classification')) AND (r\descriptive_representation_item.description = 'user defined'))) > 0) AND (SIZEOF(QUERY (r <* representation[i].items | (r.NAME = 'user defined value'))) = 0); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE user_defined_value_description_required_for_compartment_tightness FOR (representation ); LOCAL rep_set : SET OF representation := []; violation : LOGICAL := FALSE; END_LOCAL; REPEAT i := 1 TO HIINDEX(representation) WHILE NOT violation; violation := (SIZEOF(QUERY (r <* representation[i].items | (('STEP_SHIP_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(r)) AND (r.NAME = 'compartment tightness')) AND (r\descriptive_representation_item.description = 'user defined'))) > 0) AND (SIZEOF(QUERY (r <* representation[i].items | (r.NAME = 'user defined value'))) = 0); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP215 RULE user_defined_value_description_required_for_requirement_type FOR (representation ); LOCAL rep_set : SET OF representation := []; violation : LOGICAL := FALSE; END_LOCAL; REPEAT i := 1 TO HIINDEX(representation) WHILE NOT violation; violation := (SIZEOF(QUERY (r <* representation[i].items | (('STEP_SHIP_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF(r)) AND (r.NAME = 'requirement type')) AND (r\descriptive_representation_item.description = 'user defined'))) > 0) AND (SIZEOF(QUERY (r <* representation[i].items | (r.NAME = 'user defined value'))) = 0); END_REPEAT; WHERE WR1: NOT violation; END_RULE; -- ONLY IN AP216 RULE valid_product_definition_for_class_moulded_form FOR ( applied_classification_assignment, applied_group_assignment); LOCAL violation : LOGICAL := FALSE; t1_set : SET OF product_definition := []; violate1 : LOGICAL; violate2 : LOGICAL; c_a_set : SET OF applied_classification_assignment := []; gr_ass : SET OF applied_group_assignment := []; groups : SET OF group := []; END_LOCAL; c_a_set := QUERY ( i <* applied_classification_assignment | (i. assigned_class.name = 'ship moulded form') ); REPEAT i := 1 TO HIINDEX(c_a_set) BY 1; REPEAT j := 1 TO HIINDEX(c_a_set[i].items) BY 1; t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; gr_ass := QUERY ( i <* applied_group_assignment | (i.role.name = 'equivalence') ); REPEAT i := 1 TO HIINDEX(gr_ass) BY 1; REPEAT j := 1 TO HIINDEX(gr_ass[i].items) BY 1; IF gr_ass[i].items[j] IN t1_set THEN groups := groups + gr_ass[i].assigned_group; END_IF; END_REPEAT; END_REPEAT; gr_ass := QUERY ( i <* applied_group_assignment | ((SIZEOF(i.items) <> 0) AND (i.role.name = 'item structure') AND (i.assigned_group IN groups)) ); REPEAT i := 1 TO HIINDEX(gr_ass) BY 1 WHILE NOT violation; REPEAT j := 1 TO HIINDEX(gr_ass[i].items) BY 1 WHILE NOT violation; violate1 := VALUE_IN(which_class(gr_ass[i].items[j]), 'moulded form'); violate2 := VALUE_IN(which_class(gr_ass[i].items[j]), 'moulded form relationship'); violation := NOT (violate1 OR violate2); END_REPEAT; END_REPEAT; WHERE wr1: (NOT violation); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE version_creation_has_mandatory_attribute_description FOR (action ); LOCAL t1_set : SET OF action := []; violate : LOGICAL := FALSE; END_LOCAL; t1_set := QUERY (i <* action| VALUE_IN(WHICH_CLASS(i), 'version creation')); violate := SIZEOF(QUERY (k <* t1_set | NOT EXISTS(k.description))) > 0; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE version_deletion_has_mandatory_attribute_description FOR (action ); LOCAL t1_set : SET OF action := []; violate : LOGICAL := FALSE; END_LOCAL; t1_set := QUERY (i <* action| VALUE_IN(WHICH_CLASS(i), 'version deletion')); violate := SIZEOF(QUERY (k <* t1_set | NOT EXISTS(k.description))) > 0; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE version_history_has_exactly_one_assigned_group FOR(applied_group_assignment, group); LOCAL t1_set: SET OF group := []; set_1, set_2: SET OF applied_group_assignment := []; set_3: SET OF group_item := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* group | VALUE_IN(WHICH_CLASS(a), 'version history')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; set_1 := QUERY(b <* applied_group_assignment | (b.assigned_group = t1_set[i]) AND (b.role.name = 'current version')); set_2 := QUERY(c <* applied_group_assignment | (c.assigned_group = t1_set[i]) AND (c.role.name = 'members')); violate := ((SIZEOF(set_1) <> 1) OR (SIZEOF(set_2) <> 1)); IF NOT violate THEN set_3 := set_1[1].items * set_2[1].items; violate := (SIZEOF(set_3) <> 1) OR NOT (VALUE_IN(WHICH_CLASS(set_3[1]), 'versionable object')); END_IF; END_REPEAT; WHERE wr1: NOT violate; END_RULE; -- ONLY IN AP215/AP216 RULE version_history_is_referenced_by_at_least_one_versions FOR(applied_group_assignment, group); LOCAL t1_set: SET OF group := []; a_set: SET OF applied_group_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* group | VALUE_IN(WHICH_CLASS(a), 'version history')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_group_assignment | (b.assigned_group = t1_set[i]) AND (b.role.name = 'versions')); violate := SIZEOF(a_set) < 1; END_REPEAT; WHERE wr1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE version_history_referenced_by_exactly_one_current_version FOR (applied_group_assignment, group ); LOCAL t1_set : SET OF group := []; a_set : SET OF applied_group_assignment := []; violate : LOGICAL := FALSE; END_LOCAL; t1_set := QUERY (a <* group| VALUE_IN(WHICH_CLASS(a), 'version history')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY (b <* applied_group_assignment| (b.ASSIGNED_GROUP = t1_set[i]) AND (b.role.NAME = 'current version')); violate := SIZEOF(a_set) <> 1; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE version_history_referenced_by_multiple_roles FOR(applied_group_assignment, group); LOCAL t1_set: SET OF group := []; a_set: SET OF applied_group_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* group | VALUE_IN(WHICH_CLASS(a), 'version history')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_group_assignment | (b.assigned_group = t1_set[i]) AND NOT (b.role.name IN ['versions', 'current version', 'relationships'])); violate := SIZEOF(a_set) < 1; END_REPEAT; WHERE wr1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE version_modification_has_mandatory_attribute_description FOR (action ); LOCAL t1_set : SET OF action := []; violate : LOGICAL := FALSE; END_LOCAL; t1_set := QUERY (i <* action| VALUE_IN(WHICH_CLASS(i), 'version modification')); violate := SIZEOF(QUERY (k <* t1_set | NOT EXISTS(k.description))) > 0; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE version_relationship_associates_with_versionable_object FOR (applied_identification_assignment); LOCAL violate: LOGICAL := FALSE; END_LOCAL; REPEAT i := 1 TO HIINDEX(applied_identification_assignment) BY 1 WHILE NOT violate; IF ( (SIZEOF(USEDIN(applied_identification_assignment[i], ('STEP_SHIP_SCHEMA.IDENTIFICATION_ASSIGNMENT_RELATIONSHIP.' + 'RELATING_IDENTIFICATION_ASSIGNMENT'))) > 0) OR (SIZEOF(USEDIN(applied_identification_assignment[i], ('STEP_SHIP_SCHEMA.IDENTIFICATION_ASSIGNMENT_RELATIONSHIP.' + 'RELATED_IDENTIFICATION_ASSIGNMENT'))) > 0) ) THEN REPEAT j := 1 to HIINDEX(applied_identification_assignment[i].items) BY 1 WHILE NOT violate; violate := NOT VALUE_IN(which_class(applied_identification_assignment[i].items[j]), 'versionable object'); END_REPEAT; END_IF; END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE version_relationship_has_mandatory_attribute_description FOR (identification_assignment_relationship ); LOCAL t1_set : SET OF identification_assignment_relationship := []; violate : LOGICAL := FALSE; END_LOCAL; t1_set := QUERY (i <* identification_assignment_relationship| VALUE_IN(WHICH_CLASS(i), 'version relationship')); violate := SIZEOF(QUERY (k <* t1_set | NOT EXISTS(k.description))) > 0; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE version_relationship_has_unique_versions FOR (identification_assignment_relationship); LOCAL t1_set: SET OF identification_assignment_relationship := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* identification_assignment_relationship | VALUE_IN(WHICH_CLASS(a), 'version relationship')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; violate := ( t1_set[i].relating_identification_assignment.assigned_id = t1_set[i].related_identification_assignment.assigned_id ); END_REPEAT; WHERE WR1: NOT violate; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE versionable_object_has_one_version_id FOR(APPLIED_IDENTIFICATION_ASSIGNMENT); LOCAL version_ids: SET OF APPLIED_IDENTIFICATION_ASSIGNMENT := []; versionable_objects: BAG OF identification_item := []; duplicate: LOGICAL := FALSE; END_LOCAL; version_ids := QUERY(i <* APPLIED_IDENTIFICATION_ASSIGNMENT | i.ROLE.NAME = 'version identifier'); REPEAT i := 1 TO HIINDEX(version_ids); versionable_objects := versionable_objects + version_ids[i].items; END_REPEAT; REPEAT i := 1 TO HIINDEX(versionable_objects) WHILE NOT duplicate; REPEAT j := i + 1 TO HIINDEX(versionable_objects) WHILE NOT duplicate; duplicate := versionable_objects[i] :=: versionable_objects[j]; END_REPEAT; END_REPEAT; WHERE WR1: NOT duplicate; END_RULE; -- ONLY IN AP203 RULE versioned_action_request_requires_solution FOR ( versioned_action_request, action_request_solution); WHERE wr1: (SIZEOF(QUERY ( ar <* versioned_action_request | (NOT (SIZEOF( QUERY ( ars <* action_request_solution | (ar :=: ars.request) )) >= 1)) )) = 0); END_RULE; -- ONLY IN AP203 RULE versioned_action_request_requires_status FOR ( versioned_action_request, action_request_status); WHERE wr1: (SIZEOF(QUERY ( ar <* versioned_action_request | (NOT (SIZEOF( QUERY ( ars <* action_request_status | (ar :=: ars. assigned_request) )) = 1)) )) = 0); END_RULE; -- ONLY IN AP215/AP216/AP218 RULE versioned_action_request_with_identification_assignment FOR (APPLIED_CLASSIFICATION_ASSIGNMENT); LOCAL c_a_set: SET OF APPLIED_CLASSIFICATION_ASSIGNMENT := []; t1_set: SET OF versioned_action_request := []; t2_set: SET OF applied_identification_assignment := []; arg_list: LIST OF STRING := ['change request']; violation: LOGICAL := FALSE; END_LOCAL; REPEAT j:=1 TO HIINDEX(arg_list) WHILE (NOT violation); c_a_set := QUERY(i <* APPLIED_CLASSIFICATION_ASSIGNMENT | i.assigned_class.NAME = arg_LIST[j]); END_REPEAT; REPEAT i := 1 TO HIINDEX(c_a_set); REPEAT j := 1 TO HIINDEX(c_a_set[i].items); t1_set := t1_set + c_a_set[i].items[j]; END_REPEAT; END_REPEAT; REPEAT i := 1 TO HIINDEX(t1_set) BY 1 WHILE NOT violation; t2_set := bag_to_set(USEDIN(t1_set[i], 'STEP_SHIP_SCHEMA.APPLIED_IDENTIFICATION_ASSIGNMENT.ITEMS')); t2_set := QUERY ( j <* t2_set | j.role.name = 'globally unambiguous identifier'); violation := NOT (SIZEOF(T2_SET) = 1); END_REPEAT; WHERE wr1: NOT violation; END_RULE; -- ONLY IN AP215/AP216/AP218 RULE versions_is_referenced_by_at_least_one_version_history FOR(applied_group_assignment, group); LOCAL t1_set: SET OF group := []; a_set: SET OF applied_group_assignment := []; violate: LOGICAL := FALSE; END_LOCAL; t1_set := QUERY(a <* group | VALUE_IN(WHICH_CLASS(a), 'versions')); REPEAT i := 1 TO HIINDEX(t1_set) WHILE NOT violate; a_set := QUERY(b <* applied_group_assignment | (b.assigned_group = t1_set[i]) AND (b.role.name = 'version history')); violate := SIZEOF(a_set) < 1; END_REPEAT; WHERE wr1: NOT violate; END_RULE; FUNCTION acyclic_curve_replica( rep: curve_replica; parent: curve ): BOOLEAN; IF NOT ('STEP_SHIP_SCHEMA.CURVE_REPLICA' IN TYPEOF(parent)) THEN RETURN(TRUE); END_IF; IF parent :=: rep THEN RETURN(FALSE); ELSE RETURN(acyclic_curve_replica(rep,parent\curve_replica.parent_curve)); END_IF; END_FUNCTION; FUNCTION acyclic_mapped_representation( parent_set: SET OF representation; children_set: SET OF representation_item ): BOOLEAN; LOCAL x : SET OF representation_item; y : SET OF representation_item; END_LOCAL; x := QUERY ( z <* children_set | ( 'STEP_SHIP_SCHEMA.MAPPED_ITEM' IN TYPEOF(z)) ); IF SIZEOF(x) > 0 THEN REPEAT i := 1 TO HIINDEX(x) BY 1; IF x[i]\mapped_item.mapping_source.mapped_representation IN parent_set THEN RETURN(FALSE); END_IF; IF NOT acyclic_mapped_representation(parent_set + x[i]\mapped_item .mapping_source.mapped_representation,x[i]\mapped_item. mapping_source.mapped_representation.items) THEN RETURN(FALSE); END_IF; END_REPEAT; END_IF; x := children_set - x; IF SIZEOF(x) > 0 THEN REPEAT i := 1 TO HIINDEX(x) BY 1; y := QUERY ( z <* bag_to_set(USEDIN(x[i],'')) | ( 'STEP_SHIP_SCHEMA.REPRESENTATION_ITEM' IN TYPEOF(z)) ); IF NOT acyclic_mapped_representation(parent_set,y) THEN RETURN(FALSE); END_IF; END_REPEAT; END_IF; RETURN(TRUE); END_FUNCTION; -- ONLY IN AP203/AP216/AP218 FUNCTION acyclic_point_replica( rep: point_replica; parent: point ): BOOLEAN; IF NOT ('STEP_SHIP_SCHEMA.POINT_REPLICA' IN TYPEOF(parent)) THEN RETURN(TRUE); END_IF; IF parent :=: rep THEN RETURN(FALSE); ELSE RETURN(acyclic_point_replica(rep,parent\point_replica.parent_pt)); END_IF; END_FUNCTION; -- ONLY IN AP203/AP216/AP218 FUNCTION acyclic_product_category_relationship( relation: product_category_relationship; children: SET OF product_category ): BOOLEAN; LOCAL x : SET OF product_category_relationship; local_children : SET OF product_category; END_LOCAL; REPEAT i := 1 TO HIINDEX(children) BY 1; IF relation.category :=: children[i] THEN RETURN(FALSE); END_IF; END_REPEAT; x := bag_to_set(USEDIN(relation.category,'STEP_SHIP_SCHEMA.' + 'PRODUCT_CATEGORY_RELATIONSHIP.SUB_CATEGORY')); local_children := children + relation.category; IF SIZEOF(x) > 0 THEN REPEAT i := 1 TO HIINDEX(x) BY 1; IF NOT acyclic_product_category_relationship(x[i],local_children) THEN RETURN(FALSE); END_IF; END_REPEAT; END_IF; RETURN(TRUE); END_FUNCTION; -- ONLY IN AP203 FUNCTION acyclic_product_definition_relationship( relation: product_definition_relationship; relatives: SET [1:?] OF product_definition; specific_relation: STRING): LOGICAL; LOCAL x : SET OF product_definition_relationship; END_LOCAL; IF relation.relating_product_definition IN relatives THEN RETURN(FALSE); END_IF; x := QUERY ( pd <* bag_to_set(USEDIN(relation. relating_product_definition,'STEP_SHIP_SCHEMA.' + 'PRODUCT_DEFINITION_RELATIONSHIP.' + 'RELATED_PRODUCT_DEFINITION')) | (specific_relation IN TYPEOF(pd)) ); REPEAT i := 1 TO HIINDEX(x) BY 1; IF NOT acyclic_product_definition_relationship(x[i],relatives + relation.relating_product_definition,specific_relation) THEN RETURN(FALSE); END_IF; END_REPEAT; RETURN(TRUE); END_FUNCTION; FUNCTION acyclic_surface_replica( rep: surface_replica; parent: surface ): BOOLEAN; IF NOT ('STEP_SHIP_SCHEMA.SURFACE_REPLICA' IN TYPEOF(parent)) THEN RETURN(TRUE); END_IF; IF parent :=: rep THEN RETURN(FALSE); ELSE RETURN(acyclic_surface_replica(rep,parent\surface_replica. parent_surface)); END_IF; END_FUNCTION; -- ONLY IN AP203 FUNCTION assembly_shape_is_defined(assy: next_assembly_usage_occurrence; schma: STRING): BOOLEAN; LOCAL srr_set : SET OF shape_representation_relationship := []; i : INTEGER; j : INTEGER; sdr_set : SET OF shape_definition_representation := []; pr1_set : SET OF property_definition := []; pdrel_set : SET OF product_definition_relationship := []; pr2_set : SET OF property_definition := []; END_LOCAL; pr1_set := bag_to_set(USEDIN(assy.related_product_definition,schma + '.PROPERTY_DEFINITION.DEFINITION')); REPEAT i := 1 TO HIINDEX(pr1_set) BY 1; sdr_set := sdr_set + QUERY ( pdr <* USEDIN(pr1_set[i],schma + '.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((schma + '.SHAPE_DEFINITION_REPRESENTATION') IN TYPEOF(pdr)) ); END_REPEAT; pdrel_set := bag_to_set(USEDIN(assy.related_product_definition,schma + '.PRODUCT_DEFINITION_RELATIONSHIP.' + 'RELATED_PRODUCT_DEFINITION')); REPEAT j := 1 TO HIINDEX(pdrel_set) BY 1; pr2_set := pr2_set + USEDIN(pdrel_set[j],schma + '.PROPERTY_DEFINITION.DEFINITION'); END_REPEAT; REPEAT i := 1 TO HIINDEX(pr2_set) BY 1; sdr_set := sdr_set + QUERY ( pdr <* USEDIN(pr2_set[i],schma + '.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | ((schma + '.SHAPE_DEFINITION_REPRESENTATION') IN TYPEOF(pdr)) ); END_REPEAT; IF SIZEOF(sdr_set) > 0 THEN REPEAT i := 1 TO HIINDEX(sdr_set) BY 1; srr_set := QUERY ( rr <* bag_to_set(USEDIN(sdr_set[i]\ property_definition_representation.used_representation,schma + '.REPRESENTATION_RELATIONSHIP.REP_2')) | ((schma + '.SHAPE_REPRESENTATION_RELATIONSHIP') IN TYPEOF(rr)) ); IF SIZEOF(srr_set) > 0 THEN REPEAT j := 1 TO HIINDEX(srr_set) BY 1; IF SIZEOF(QUERY ( pdr <* bag_to_set(USEDIN(srr_set[j]\ representation_relationship.rep_1,schma + '.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION')) | ((schma + '.SHAPE_DEFINITION_REPRESENTATION') IN TYPEOF( pdr)) ) * QUERY ( pdr <* bag_to_set(USEDIN(assy. relating_product_definition,schma + '.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION')) | (( schma + '.SHAPE_DEFINITION_REPRESENTATION') IN TYPEOF(pdr)) )) >= 1 THEN IF SIZEOF(QUERY ( cdsr <* USEDIN(srr_set[j],schma + '.CONTEXT_DEPENDENT_SHAPE_REPRESENTATION.' + 'REPRESENTATION_RELATION') | (NOT (cdsr\ context_dependent_shape_representation. represented_product_relation\property_definition. definition :=: assy)) )) > 0 THEN RETURN(FALSE); END_IF; END_IF; END_REPEAT; END_IF; END_REPEAT; END_IF; RETURN(TRUE); END_FUNCTION; FUNCTION associated_surface( arg: pcurve_or_surface ): surface; LOCAL surf : surface; END_LOCAL; IF 'STEP_SHIP_SCHEMA.PCURVE' IN TYPEOF(arg) THEN surf := arg.basis_surface; ELSE surf := arg; END_IF; RETURN(surf); END_FUNCTION; FUNCTION bag_to_set( the_bag: BAG OF GENERIC:intype ): SET OF GENERIC:intype; LOCAL the_set : SET OF GENERIC:intype := []; END_LOCAL; IF SIZEOF(the_bag) > 0 THEN REPEAT i := 1 TO HIINDEX(the_bag) BY 1; the_set := the_set + the_bag[i]; END_REPEAT; END_IF; RETURN(the_set); END_FUNCTION; FUNCTION base_axis( dim: INTEGER; axis1, axis2, axis3: direction ): LIST [2:3] OF direction; LOCAL u : LIST [2:3] OF direction; d1 : direction; d2 : direction; factor : REAL; END_LOCAL; IF dim = 3 THEN d1 := NVL(normalise(axis3),dummy_gri || direction([0,0,1])); d2 := first_proj_axis(d1,axis1); u := [d2,second_proj_axis(d1,d2,axis2),d1]; ELSE IF EXISTS(axis1) THEN d1 := normalise(axis1); u := [d1,orthogonal_complement(d1)]; IF EXISTS(axis2) THEN factor := dot_product(axis2,u[2]); IF factor < 0 THEN u[2].direction_ratios[1] := -u[2].direction_ratios[1]; u[2].direction_ratios[2] := -u[2].direction_ratios[2]; END_IF; END_IF; ELSE IF EXISTS(axis2) THEN d1 := normalise(axis2); u := [orthogonal_complement(d1),d1]; u[1].direction_ratios[1] := -u[1].direction_ratios[1]; u[1].direction_ratios[2] := -u[1].direction_ratios[2]; ELSE u := [dummy_gri || direction([1,0]),dummy_gri || direction([0,1])]; END_IF; END_IF; END_IF; RETURN(u); END_FUNCTION; FUNCTION boolean_choose( b: BOOLEAN; choice1, choice2: GENERIC:item ): GENERIC:item; IF b THEN RETURN(choice1); ELSE RETURN(choice2); END_IF; END_FUNCTION; FUNCTION build_2axes( ref_direction: direction ): LIST [2:2] OF direction; LOCAL d : direction := NVL(normalise(ref_direction),dummy_gri || direction([1,0])); END_LOCAL; RETURN([d,orthogonal_complement(d)]); END_FUNCTION; FUNCTION build_axes( axis, ref_direction: direction ): LIST [3:3] OF direction; LOCAL d1 : direction; d2 : direction; END_LOCAL; d1 := NVL(normalise(axis),dummy_gri || direction([0,0,1])); d2 := first_proj_axis(d1,ref_direction); RETURN([d2,normalise(cross_product(d1,d2)).orientation,d1]); END_FUNCTION; -- ONLY IN AP203 FUNCTION cc_design_date_time_correlation (e : applied_date_and_time_assignment ) : BOOLEAN; LOCAL dt_role : STRING; END_LOCAL; dt_role := e\date_and_time_assignment.role.name; CASE dt_role OF 'creation_date' : IF SIZEOF (e.items) <> SIZEOF (QUERY (x <* e.items | 'STEP_SHIP_SCHEMA.' + 'PRODUCT_DEFINITION' IN TYPEOF (x))) THEN RETURN(FALSE); END_IF; 'request_date' : IF SIZEOF (e.items) <> SIZEOF (QUERY (x <* e.items | SIZEOF ( ['STEP_SHIP_SCHEMA.CHANGE_REQUEST', 'STEP_SHIP_SCHEMA.START_REQUEST'] * TYPEOF (x)) = 1)) THEN RETURN(FALSE); END_IF; 'release_date' : IF SIZEOF (e.items) <> SIZEOF (QUERY (x <* e.items | SIZEOF ( ['STEP_SHIP_SCHEMA.CHANGE', 'STEP_SHIP_SCHEMA.START_WORK'] * TYPEOF (x)) = 1)) THEN RETURN(FALSE); END_IF; 'start_date' : IF SIZEOF (e.items) <> SIZEOF (QUERY (x <* e.items | SIZEOF ( ['STEP_SHIP_SCHEMA.CHANGE', 'STEP_SHIP_SCHEMA.START_WORK'] * TYPEOF (x)) = 1)) THEN RETURN(FALSE); END_IF; 'sign_off_date' : IF SIZEOF (e.items) <> SIZEOF (QUERY (x <* e.items | 'STEP_SHIP_SCHEMA.' + 'APPROVAL_PERSON_ORGANIZATION' IN TYPEOF (x))) THEN RETURN(FALSE); END_IF; 'contract_date' : IF SIZEOF (e.items) <> SIZEOF (QUERY (x <* e.items | 'STEP_SHIP_SCHEMA.CONTRACT' IN TYPEOF (x))) THEN RETURN(FALSE); END_IF; 'certification_date' : IF SIZEOF (e.items) <> SIZEOF (QUERY (x <* e.items | 'STEP_SHIP_SCHEMA.CERTIFICATION' IN TYPEOF (x))) THEN RETURN(FALSE); END_IF; 'classification_date' : IF SIZEOF (e.items) <> SIZEOF (QUERY (x <* e.items | 'STEP_SHIP_SCHEMA.' + 'SECURITY_CLASSIFICATION' IN TYPEOF (x))) THEN RETURN(FALSE); END_IF; 'declassification_date' : IF SIZEOF (e.items) <> SIZEOF (QUERY (x <* e.items | 'STEP_SHIP_SCHEMA.' + 'SECURITY_CLASSIFICATION' IN TYPEOF (x))) THEN RETURN(FALSE); END_IF; OTHERWISE : RETURN(TRUE); END_CASE; RETURN (TRUE); END_FUNCTION; -- ONLY IN AP203 FUNCTION cc_design_person_and_organization_correlation (e : applied_person_and_organization_assignment ) : BOOLEAN; LOCAL po_role : STRING; END_LOCAL; po_role := e\person_and_organization_assignment.role.name; CASE po_role OF 'request_recipient' : IF SIZEOF (e.items) <> SIZEOF (QUERY (x <* e.items | SIZEOF(['STEP_SHIP_SCHEMA.' + 'CHANGE_REQUEST', 'STEP_SHIP_SCHEMA.' + 'START_REQUEST'] * TYPEOF (x)) = 1)) THEN RETURN(FALSE); END_IF; 'initiator' : IF SIZEOF (e.items) <> SIZEOF (QUERY (x <* e.items | SIZEOF(['STEP_SHIP_SCHEMA.' + 'CHANGE_REQUEST', 'STEP_SHIP_SCHEMA.' + 'START_REQUEST', 'STEP_SHIP_SCHEMA.' + 'START_WORK', 'STEP_SHIP_SCHEMA.' + 'CHANGE'] * TYPEOF (x)) = 1)) THEN RETURN(FALSE); END_IF; 'creator' : IF SIZEOF (e.items) <> SIZEOF (QUERY (x <* e.items | SIZEOF (['STEP_SHIP_SCHEMA.' + 'PRODUCT_DEFINITION_FORMATION', 'STEP_SHIP_SCHEMA.' + 'PRODUCT_DEFINITION'] * TYPEOF (x)) = 1)) THEN RETURN (FALSE); END_IF; 'part_supplier' : IF SIZEOF (e.items) <> SIZEOF (QUERY (x <* e.items | 'STEP_SHIP_SCHEMA.' + 'PRODUCT_DEFINITION_FORMATION' IN TYPEOF (x))) THEN RETURN(FALSE); END_IF; 'design_supplier' : IF SIZEOF (e.items) <> SIZEOF (QUERY (x <* e.items | 'STEP_SHIP_SCHEMA.' + 'PRODUCT_DEFINITION_FORMATION' IN TYPEOF (x))) THEN RETURN(FALSE); END_IF; 'design_owner' : IF SIZEOF (e.items) <> SIZEOF (QUERY (x <* e.items | 'STEP_SHIP_SCHEMA.PRODUCT' IN TYPEOF (x))) THEN RETURN(FALSE); END_IF; 'configuration_manager' : IF SIZEOF (e.items) <> SIZEOF (QUERY (x <* e.items | 'STEP_SHIP_SCHEMA.' + 'CONFIGURATION_ITEM' IN TYPEOF (x))) THEN RETURN(FALSE); END_IF; 'contractor' : IF SIZEOF (e.items) <> SIZEOF (QUERY (x <* e.items | 'STEP_SHIP_SCHEMA.CONTRACT' IN TYPEOF (x))) THEN RETURN(FALSE); END_IF; 'classification_officer' : IF SIZEOF (e.items) <> SIZEOF (QUERY (x <* e.items | 'STEP_SHIP_SCHEMA.' + 'SECURITY_CLASSIFICATION' IN TYPEOF (x))) THEN RETURN(FALSE); END_IF; OTHERWISE : RETURN(TRUE); END_CASE; RETURN (TRUE); END_FUNCTION; FUNCTION closed_shell_reversed( a_shell: closed_shell ): oriented_closed_shell; LOCAL the_reverse : oriented_closed_shell; END_LOCAL; IF 'STEP_SHIP_SCHEMA.ORIENTED_CLOSED_SHELL' IN TYPEOF(a_shell) THEN the_reverse := ((dummy_tri || connected_face_set(a_shell\ connected_face_set.cfs_faces)) || closed_shell()) || oriented_closed_shell(a_shell\oriented_closed_shell. closed_shell_element,NOT a_shell\oriented_closed_shell. orientation); ELSE the_reverse := ((dummy_tri || connected_face_set(a_shell\ connected_face_set.cfs_faces)) || closed_shell()) || oriented_closed_shell(a_shell,FALSE); END_IF; RETURN(the_reverse); END_FUNCTION; FUNCTION conditional_reverse( p: BOOLEAN; an_item: reversible_topology ): reversible_topology; IF p THEN RETURN(an_item); ELSE RETURN(topology_reversed(an_item)); END_IF; END_FUNCTION; FUNCTION constraints_composite_curve_on_surface( c: composite_curve_on_surface ): BOOLEAN; LOCAL n_segments : INTEGER := SIZEOF(c.segments); END_LOCAL; REPEAT k := 1 TO n_segments BY 1; IF ((NOT ('STEP_SHIP_SCHEMA.PCURVE' IN TYPEOF(c\ composite_curve.segments[k].parent_curve))) AND (NOT ( 'STEP_SHIP_SCHEMA.SURFACE_CURVE' IN TYPEOF(c\ composite_curve.segments[k].parent_curve)))) AND (NOT ( 'STEP_SHIP_SCHEMA.COMPOSITE_CURVE_ON_SURFACE' IN TYPEOF(c \composite_curve.segments[k].parent_curve))) THEN RETURN(FALSE); END_IF; END_REPEAT; RETURN(TRUE); END_FUNCTION; -- ONLY IN AP203 FUNCTION constraints_geometry_shell_based_surface_model( m: shell_based_surface_model): BOOLEAN; LOCAL result : BOOLEAN := TRUE; END_LOCAL; REPEAT j := 1 TO SIZEOF(m.sbsm_boundary) BY 1; IF (NOT ('STEP_SHIP_SCHEMA.OPEN_SHELL' IN TYPEOF(m. sbsm_boundary[j]))) AND (NOT ( 'STEP_SHIP_SCHEMA.CLOSED_SHELL' IN TYPEOF(m.sbsm_boundary[j]))) THEN result := FALSE; RETURN(result); END_IF; END_REPEAT; RETURN(result); END_FUNCTION; -- ONLY IN AP203 FUNCTION constraints_geometry_shell_based_wireframe_model( m: shell_based_wireframe_model): BOOLEAN; LOCAL result : BOOLEAN := TRUE; END_LOCAL; REPEAT j := 1 TO SIZEOF(m.sbwm_boundary) BY 1; IF (NOT ('STEP_SHIP_SCHEMA.WIRE_SHELL' IN TYPEOF(m. sbwm_boundary[j]))) AND (NOT ( 'STEP_SHIP_SCHEMA.VERTEX_SHELL' IN TYPEOF(m.sbwm_boundary[j]))) THEN result := FALSE; RETURN(result); END_IF; END_REPEAT; RETURN(result); END_FUNCTION; FUNCTION constraints_param_b_spline( degree, up_knots, up_cp: INTEGER; knot_mult: LIST OF INTEGER; knots: LIST OF parameter_value ): BOOLEAN; LOCAL k : INTEGER; sum : INTEGER; result : BOOLEAN := TRUE; END_LOCAL; sum := knot_mult[1]; REPEAT i := 2 TO up_knots BY 1; sum := sum + knot_mult[i]; END_REPEAT; IF (((degree < 1) OR (up_knots < 2)) OR (up_cp < degree)) OR (sum <> ( (degree + up_cp) + 2)) THEN result := FALSE; RETURN(result); END_IF; k := knot_mult[1]; IF (k < 1) OR (k > (degree + 1)) THEN result := FALSE; RETURN(result); END_IF; REPEAT i := 2 TO up_knots BY 1; IF (knot_mult[i] < 1) OR (knots[i] <= knots[i - 1]) THEN result := FALSE; RETURN(result); END_IF; k := knot_mult[i]; IF (i < up_knots) AND (k > degree) THEN result := FALSE; RETURN(result); END_IF; IF (i = up_knots) AND (k > (degree + 1)) THEN result := FALSE; RETURN(result); END_IF; END_REPEAT; RETURN(result); END_FUNCTION; -- ONLY IN AP203 FUNCTION constraints_rectangular_composite_surface( s: rectangular_composite_surface): BOOLEAN; REPEAT i := 1 TO s.n_u BY 1; REPEAT j := 1 TO s.n_v BY 1; IF NOT (('STEP_SHIP_SCHEMA.B_SPLINE_SURFACE' IN TYPEOF(s. segments[i][j].parent_surface)) OR ( 'STEP_SHIP_SCHEMA.RECTANGULAR_TRIMMED_SURFACE' IN TYPEOF(s .segments[i][j].parent_surface))) THEN RETURN(FALSE); END_IF; END_REPEAT; END_REPEAT; REPEAT i := 1 TO s.n_u - 1 BY 1; REPEAT j := 1 TO s.n_v BY 1; IF s.segments[i][j].u_transition = discontinuous THEN RETURN(FALSE); END_IF; END_REPEAT; END_REPEAT; REPEAT i := 1 TO s.n_u BY 1; REPEAT j := 1 TO s.n_v - 1 BY 1; IF s.segments[i][j].v_transition = discontinuous THEN RETURN(FALSE); END_IF; END_REPEAT; END_REPEAT; RETURN(TRUE); END_FUNCTION; FUNCTION cross_product( arg1, arg2: direction ): vector; LOCAL v2 : LIST [3:3] OF REAL; v1 : LIST [3:3] OF REAL; mag : REAL; res : direction; result : vector; END_LOCAL; IF ((NOT EXISTS(arg1)) OR (arg1.dim = 2)) OR ((NOT EXISTS(arg2)) OR ( arg2.dim = 2)) THEN RETURN(?); ELSE BEGIN v1 := normalise(arg1).direction_ratios; v2 := normalise(arg2).direction_ratios; res := dummy_gri || direction([(v1[2] * v2[3]) - (v1[3] * v2[2]),( v1[3] * v2[1]) - (v1[1] * v2[3]),(v1[1] * v2[2]) - (v1[2] * v2[ 1])]); mag := 0; REPEAT i := 1 TO 3 BY 1; mag := mag + (res.direction_ratios[i] * res.direction_ratios[i]); END_REPEAT; IF mag > 0 THEN result := dummy_gri || vector(res,SQRT(mag)); ELSE result := dummy_gri || vector(arg1,0); END_IF; RETURN(result); END; END_IF; END_FUNCTION; FUNCTION curve_weights_positive( b: rational_b_spline_curve ): BOOLEAN; LOCAL result : BOOLEAN := TRUE; END_LOCAL; REPEAT i := 0 TO b.upper_index_on_control_points BY 1; IF b.weights[i] <= 0 THEN result := FALSE; RETURN(result); END_IF; END_REPEAT; RETURN(result); END_FUNCTION; FUNCTION derive_dimensional_exponents( x: unit ): dimensional_exponents; LOCAL result : dimensional_exponents := dimensional_exponents(0,0,0,0,0,0, 0); END_LOCAL; IF 'STEP_SHIP_SCHEMA.DERIVED_UNIT' IN TYPEOF(x) THEN REPEAT i := LOINDEX(x.elements) TO HIINDEX(x.elements) BY 1; result.length_exponent := result.length_exponent + (x.elements[i]. exponent * x.elements[i].unit.dimensions.length_exponent); result.mass_exponent := result.mass_exponent + (x.elements[i]. exponent * x.elements[i].unit.dimensions.mass_exponent); result.time_exponent := result.time_exponent + (x.elements[i]. exponent * x.elements[i].unit.dimensions.time_exponent); result.electric_current_exponent := result. electric_current_exponent + (x.elements[i].exponent * x. elements[i].unit.dimensions.electric_current_exponent); result.thermodynamic_temperature_exponent := result. thermodynamic_temperature_exponent + (x.elements[i].exponent * x.elements[i].unit.dimensions. thermodynamic_temperature_exponent); result.amount_of_substance_exponent := result. amount_of_substance_exponent + (x.elements[i].exponent * x. elements[i].unit.dimensions.amount_of_substance_exponent); result.luminous_intensity_exponent := result. luminous_intensity_exponent + (x.elements[i].exponent * x. elements[i].unit.dimensions.luminous_intensity_exponent); END_REPEAT; ELSE result := x.dimensions; END_IF; RETURN(result); END_FUNCTION; FUNCTION dimension_of( item: geometric_representation_item ): dimension_count; LOCAL x : SET OF representation; y : representation_context; dim : dimension_count; END_LOCAL; IF 'STEP_SHIP_SCHEMA.CARTESIAN_POINT' IN TYPEOF(item) THEN dim := SIZEOF(item\cartesian_point.coordinates); RETURN(dim); END_IF; IF 'STEP_SHIP_SCHEMA.DIRECTION' IN TYPEOF(item) THEN dim := SIZEOF(item\direction.direction_ratios); RETURN(dim); END_IF; IF 'STEP_SHIP_SCHEMA.VECTOR' IN TYPEOF(item) THEN dim := SIZEOF(item\vector.orientation\direction.direction_ratios); RETURN(dim); END_IF; x := using_representations(item); y := x[1].context_of_items; dim := y\geometric_representation_context.coordinate_space_dimension; RETURN(dim); END_FUNCTION; FUNCTION dimensions_for_si_unit( n: si_unit_name ): dimensional_exponents; CASE n OF metre : RETURN(dimensional_exponents(1,0,0,0,0,0,0)); gram : RETURN(dimensional_exponents(0,1,0,0,0,0,0)); second : RETURN(dimensional_exponents(0,0,1,0,0,0,0)); ampere : RETURN(dimensional_exponents(0,0,0,1,0,0,0)); kelvin : RETURN(dimensional_exponents(0,0,0,0,1,0,0)); mole : RETURN(dimensional_exponents(0,0,0,0,0,1,0)); candela : RETURN(dimensional_exponents(0,0,0,0,0,0,1)); radian : RETURN(dimensional_exponents(0,0,0,0,0,0,0)); steradian : RETURN(dimensional_exponents(0,0,0,0,0,0,0)); hertz : RETURN(dimensional_exponents(0,0,-1,0,0,0,0)); newton : RETURN(dimensional_exponents(1,1,-2,0,0,0,0)); pascal : RETURN(dimensional_exponents(-1,1,-2,0,0,0,0)); joule : RETURN(dimensional_exponents(2,1,-2,0,0,0,0)); watt : RETURN(dimensional_exponents(2,1,-3,0,0,0,0)); coulomb : RETURN(dimensional_exponents(0,0,1,1,0,0,0)); volt : RETURN(dimensional_exponents(2,1,-3,-1,0,0,0)); farad : RETURN(dimensional_exponents(-2,-1,4,1,0,0,0)); ohm : RETURN(dimensional_exponents(2,1,-3,-2,0,0,0)); siemens : RETURN(dimensional_exponents(-2,-1,3,2,0,0,0)); weber : RETURN(dimensional_exponents(2,1,-2,-1,0,0,0)); tesla : RETURN(dimensional_exponents(0,1,-2,-1,0,0,0)); henry : RETURN(dimensional_exponents(2,1,-2,-2,0,0,0)); degree_celsius : RETURN(dimensional_exponents(0,0,0,0,1,0,0)); lumen : RETURN(dimensional_exponents(0,0,0,0,0,0,1)); lux : RETURN(dimensional_exponents(-2,0,0,0,0,0,1)); becquerel : RETURN(dimensional_exponents(0,0,-1,0,0,0,0)); gray : RETURN(dimensional_exponents(2,0,-2,0,0,0,0)); sievert : RETURN(dimensional_exponents(2,0,-2,0,0,0,0)); END_CASE; END_FUNCTION; FUNCTION dot_product( arg1, arg2: direction ): REAL; LOCAL ndim : INTEGER; scalar : REAL; vec1 : direction; vec2 : direction; END_LOCAL; IF (NOT EXISTS(arg1)) OR (NOT EXISTS(arg2)) THEN scalar := ?; ELSE IF arg1.dim <> arg2.dim THEN scalar := ?; ELSE BEGIN vec1 := normalise(arg1); vec2 := normalise(arg2); ndim := arg1.dim; scalar := 0; REPEAT i := 1 TO ndim BY 1; scalar := scalar + (vec1.direction_ratios[i] * vec2. direction_ratios[i]); END_REPEAT; END; END_IF; END_IF; RETURN(scalar); END_FUNCTION; FUNCTION edge_reversed( an_edge: edge ): oriented_edge; LOCAL the_reverse : oriented_edge; END_LOCAL; IF 'STEP_SHIP_SCHEMA.ORIENTED_EDGE' IN TYPEOF(an_edge) THEN the_reverse := (dummy_tri || edge(an_edge.edge_end,an_edge. edge_start)) || oriented_edge(an_edge\oriented_edge.edge_element, NOT an_edge\oriented_edge.orientation); ELSE the_reverse := (dummy_tri || edge(an_edge.edge_end,an_edge. edge_start)) || oriented_edge(an_edge,FALSE); END_IF; RETURN(the_reverse); END_FUNCTION; FUNCTION face_bound_reversed( a_face_bound: face_bound ): face_bound; LOCAL the_reverse : face_bound; END_LOCAL; IF 'STEP_SHIP_SCHEMA.FACE_OUTER_BOUND' IN TYPEOF(a_face_bound) THEN the_reverse := (dummy_tri || face_bound(a_face_bound\face_bound. bound,NOT a_face_bound\face_bound.orientation)) || face_outer_bound(); ELSE the_reverse := dummy_tri || face_bound(a_face_bound.bound,NOT a_face_bound.orientation); END_IF; RETURN(the_reverse); END_FUNCTION; FUNCTION face_reversed( a_face: face ): oriented_face; LOCAL the_reverse : oriented_face; END_LOCAL; IF 'STEP_SHIP_SCHEMA.ORIENTED_FACE' IN TYPEOF(a_face) THEN the_reverse := (dummy_tri || face(set_of_topology_reversed(a_face. bounds))) || oriented_face(a_face\oriented_face.face_element,NOT a_face\oriented_face.orientation); ELSE the_reverse := (dummy_tri || face(set_of_topology_reversed(a_face. bounds))) || oriented_face(a_face,FALSE); END_IF; RETURN(the_reverse); END_FUNCTION; FUNCTION first_proj_axis( z_axis, arg: direction ): direction; LOCAL x_vec : vector; v : direction; z : direction; x_axis : direction; END_LOCAL; IF NOT EXISTS(z_axis) THEN RETURN(?); ELSE z := normalise(z_axis); IF NOT EXISTS(arg) THEN IF z.direction_ratios <> [1,0,0] THEN v := dummy_gri || direction([1,0,0]); ELSE v := dummy_gri || direction([0,1,0]); END_IF; ELSE IF arg.dim <> 3 THEN RETURN(?); END_IF; IF cross_product(arg,z).magnitude = 0 THEN RETURN(?); ELSE v := normalise(arg); END_IF; END_IF; x_vec := scalar_times_vector(dot_product(v,z),z); x_axis := vector_difference(v,x_vec).orientation; x_axis := normalise(x_axis); END_IF; RETURN(x_axis); END_FUNCTION; -- ONLY IN AP203 FUNCTION gbsf_check_curve(cv: curve): BOOLEAN; IF SIZEOF(['STEP_SHIP_SCHEMA.BOUNDED_CURVE', 'STEP_SHIP_SCHEMA.CONIC', 'STEP_SHIP_SCHEMA.CURVE_REPLICA', 'STEP_SHIP_SCHEMA.LINE', 'STEP_SHIP_SCHEMA.OFFSET_CURVE_3D'] * TYPEOF(cv)) > 1 THEN RETURN(FALSE); ELSE IF SIZEOF(['STEP_SHIP_SCHEMA.CIRCLE', 'STEP_SHIP_SCHEMA.ELLIPSE'] * TYPEOF(cv)) = 1 THEN RETURN(TRUE); ELSE IF (('STEP_SHIP_SCHEMA.B_SPLINE_CURVE' IN TYPEOF(cv)) AND (cv \b_spline_curve.self_intersect = FALSE)) OR (cv\b_spline_curve. self_intersect = UNKNOWN) THEN RETURN(TRUE); ELSE IF (('STEP_SHIP_SCHEMA.COMPOSITE_CURVE' IN TYPEOF(cv)) AND (cv\composite_curve.self_intersect = FALSE)) OR (cv\ composite_curve.self_intersect = UNKNOWN) THEN RETURN(SIZEOF(QUERY ( seg <* cv\composite_curve.segments | ( NOT gbsf_check_curve(seg.parent_curve)) )) = 0); ELSE IF 'STEP_SHIP_SCHEMA.CURVE_REPLICA' IN TYPEOF(cv) THEN RETURN(gbsf_check_curve(cv\curve_replica.parent_curve)); ELSE IF ('STEP_SHIP_SCHEMA.OFFSET_CURVE_3D' IN TYPEOF(cv)) AND ((cv\offset_curve_3d.self_intersect = FALSE) OR (cv\ offset_curve_3d.self_intersect = UNKNOWN)) AND (NOT ( 'STEP_SHIP_SCHEMA.POLYLINE' IN TYPEOF(cv.basis_curve))) THEN RETURN(gbsf_check_curve(cv\offset_curve_3d.basis_curve)); ELSE IF 'STEP_SHIP_SCHEMA.PCURVE' IN TYPEOF(cv) THEN RETURN(gbsf_check_curve(cv\pcurve.reference_to_curve\ representation.items[1]) AND gbsf_check_surface(cv\ pcurve.basis_surface)); ELSE IF 'STEP_SHIP_SCHEMA.POLYLINE' IN TYPEOF(cv) THEN IF SIZEOF(cv\polyline.points) >= 3 THEN RETURN(TRUE); END_IF; ELSE IF 'STEP_SHIP_SCHEMA.SURFACE_CURVE' IN TYPEOF(cv) THEN IF gbsf_check_curve(cv\surface_curve.curve_3d) THEN REPEAT i := 1 TO SIZEOF(cv\surface_curve. associated_geometry) BY 1; IF 'STEP_SHIP_SCHEMA.SURFACE' IN TYPEOF(cv\ surface_curve.associated_geometry[i]) THEN IF NOT gbsf_check_surface(cv\surface_curve. associated_geometry[i]) THEN RETURN(FALSE); END_IF; ELSE IF 'STEP_SHIP_SCHEMA.PCURVE' IN TYPEOF(cv \surface_curve.associated_geometry[i]) THEN IF NOT gbsf_check_curve(cv\surface_curve. associated_geometry[i]) THEN RETURN(FALSE); END_IF; END_IF; END_IF; END_REPEAT; RETURN(TRUE); END_IF; ELSE IF 'STEP_SHIP_SCHEMA.TRIMMED_CURVE' IN TYPEOF( cv) THEN IF SIZEOF(['STEP_SHIP_SCHEMA.LINE', 'STEP_SHIP_SCHEMA.PARABOLA', 'STEP_SHIP_SCHEMA.HYPERBOLA'] * TYPEOF(cv\ trimmed_curve.basis_curve)) = 1 THEN RETURN(TRUE); ELSE RETURN(gbsf_check_curve(cv\trimmed_curve. basis_curve)); END_IF; END_IF; END_IF; END_IF; END_IF; END_IF; END_IF; END_IF; END_IF; END_IF; END_IF; RETURN(FALSE); END_FUNCTION; -- ONLY IN AP203 FUNCTION gbsf_check_point(pnt: point): BOOLEAN; IF 'STEP_SHIP_SCHEMA.CARTESIAN_POINT' IN TYPEOF(pnt) THEN RETURN(TRUE); ELSE IF 'STEP_SHIP_SCHEMA.POINT_ON_CURVE' IN TYPEOF(pnt) THEN RETURN(gbsf_check_curve(pnt\point_on_curve.basis_curve)); ELSE IF 'STEP_SHIP_SCHEMA.POINT_ON_SURFACE' IN TYPEOF(pnt) THEN RETURN(gbsf_check_surface(pnt\point_on_surface.basis_surface)); ELSE IF 'STEP_SHIP_SCHEMA.DEGENERATE_PCURVE' IN TYPEOF(pnt) THEN RETURN(gbsf_check_curve(pnt\degenerate_pcurve. reference_to_curve\representation.items[1]) AND gbsf_check_surface(pnt\degenerate_pcurve.basis_surface)); END_IF; END_IF; END_IF; END_IF; RETURN(FALSE); END_FUNCTION; -- ONLY IN AP203 FUNCTION gbsf_check_surface(sf: surface): BOOLEAN; IF (('STEP_SHIP_SCHEMA.B_SPLINE_SURFACE' IN TYPEOF(sf)) AND (sf\ b_spline_surface.self_intersect = FALSE)) OR (sf\b_spline_surface. self_intersect = UNKNOWN) THEN RETURN(TRUE); ELSE IF SIZEOF(['STEP_SHIP_SCHEMA.SPHERICAL_SURFACE', 'STEP_SHIP_SCHEMA.TOROIDAL_SURFACE'] * TYPEOF(sf)) = 1 THEN RETURN(TRUE); ELSE IF 'STEP_SHIP_SCHEMA.CURVE_BOUNDED_SURFACE' IN TYPEOF(sf) THEN IF SIZEOF(['STEP_SHIP_SCHEMA.CONICAL_SURFACE', 'STEP_SHIP_SCHEMA.CYLINDRICAL_SURFACE', 'STEP_SHIP_SCHEMA.PLANE'] * TYPEOF(sf\ curve_bounded_surface.basis_surface)) = 1 THEN RETURN(SIZEOF(QUERY ( bcurve <* sf\curve_bounded_surface. boundaries | (NOT gbsf_check_curve(bcurve)) )) = 0); ELSE IF gbsf_check_surface(sf\curve_bounded_surface.basis_surface) THEN RETURN(SIZEOF(QUERY ( bcurve <* sf\curve_bounded_surface. boundaries | (NOT gbsf_check_curve(bcurve)) )) = 0); END_IF; END_IF; ELSE IF (('STEP_SHIP_SCHEMA.OFFSET_SURFACE' IN TYPEOF(sf)) AND ( sf\offset_surface.self_intersect = FALSE)) OR (sf\ offset_surface.self_intersect = UNKNOWN) THEN RETURN(gbsf_check_surface(sf\offset_surface.basis_surface)); ELSE IF 'STEP_SHIP_SCHEMA.RECTANGULAR_COMPOSITE_SURFACE' IN TYPEOF(sf) THEN REPEAT i := 1 TO SIZEOF(sf\rectangular_composite_surface. segments) BY 1; REPEAT j := 1 TO SIZEOF(sf\rectangular_composite_surface. segments[i]) BY 1; IF NOT gbsf_check_surface(sf\ rectangular_composite_surface.segments[i][j]. parent_surface) THEN RETURN(FALSE); END_IF; END_REPEAT; END_REPEAT; RETURN(TRUE); ELSE IF 'STEP_SHIP_SCHEMA.RECTANGULAR_TRIMMED_SURFACE' IN TYPEOF(sf) THEN IF SIZEOF(['STEP_SHIP_SCHEMA.CONICAL_SURFACE', 'STEP_SHIP_SCHEMA.CYLINDRICAL_SURFACE', 'STEP_SHIP_SCHEMA.PLANE'] * TYPEOF(sf\ rectangular_trimmed_surface.basis_surface)) = 1 THEN RETURN(TRUE); ELSE RETURN(gbsf_check_surface(sf\rectangular_trimmed_surface .basis_surface)); END_IF; ELSE IF 'STEP_SHIP_SCHEMA.SURFACE_REPLICA' IN TYPEOF(sf) THEN RETURN(gbsf_check_surface(sf\surface_replica. parent_surface)); ELSE IF 'STEP_SHIP_SCHEMA.SWEPT_SURFACE' IN TYPEOF(sf) THEN RETURN(gbsf_check_curve(sf\swept_surface.swept_curve)); END_IF; END_IF; END_IF; END_IF; END_IF; END_IF; END_IF; END_IF; RETURN(FALSE); END_FUNCTION; FUNCTION get_basis_surface( c: curve_on_surface ): SET [0:2] OF surface; LOCAL surfs : SET [0:2] OF surface; n : INTEGER; END_LOCAL; surfs := []; IF 'STEP_SHIP_SCHEMA.PCURVE' IN TYPEOF(c) THEN surfs := [c\pcurve.basis_surface]; ELSE IF 'STEP_SHIP_SCHEMA.SURFACE_CURVE' IN TYPEOF(c) THEN n := SIZEOF(c\surface_curve.associated_geometry); REPEAT i := 1 TO n BY 1; surfs := surfs + associated_surface(c\surface_curve. associated_geometry[i]); END_REPEAT; END_IF; END_IF; IF 'STEP_SHIP_SCHEMA.COMPOSITE_CURVE_ON_SURFACE' IN TYPEOF(c) THEN n := SIZEOF(c\composite_curve.segments); surfs := get_basis_surface(c\composite_curve.segments[1]. parent_curve); IF n > 1 THEN REPEAT i := 2 TO n BY 1; surfs := surfs * get_basis_surface(c\composite_curve.segments[i] .parent_curve); END_REPEAT; END_IF; END_IF; RETURN(surfs); END_FUNCTION; -- ONLY IN AP215/AP216/AP218 FUNCTION get_description_value( obj: description_attribute_select ): text; LOCAL description_bag : BAG OF description_attribute := USEDIN(obj,( 'STEP_SHIP_SCHEMA.' + 'DESCRIPTION_ATTRIBUTE.') + 'DESCRIBED_ITEM'); END_LOCAL; IF SIZEOF(description_bag) = 1 THEN RETURN(description_bag[1].attribute_value); ELSE RETURN(?); END_IF; END_FUNCTION; -- ONLY IN AP215/AP216/AP218 FUNCTION get_id_value( obj: id_attribute_select ): identifier; LOCAL id_bag : BAG OF id_attribute := USEDIN(obj,( 'STEP_SHIP_SCHEMA.' + 'ID_ATTRIBUTE.') + 'IDENTIFIED_ITEM'); END_LOCAL; IF SIZEOF(id_bag) = 1 THEN RETURN(id_bag[1].attribute_value); ELSE RETURN(?); END_IF; END_FUNCTION; -- ONLY IN AP215/AP216/AP218 FUNCTION get_name_value( obj: name_attribute_select ): label; LOCAL name_bag : BAG OF name_attribute := USEDIN(obj,( 'STEP_SHIP_SCHEMA.' + 'NAME_ATTRIBUTE.') + 'NAMED_ITEM'); END_LOCAL; IF SIZEOF(name_bag) = 1 THEN RETURN(name_bag[1].attribute_value); ELSE RETURN(?); END_IF; END_FUNCTION; -- ONLY IN AP215/AP216/AP218 FUNCTION get_role( obj: role_select ): object_role; LOCAL role_bag : BAG OF role_association := USEDIN(obj,( 'STEP_SHIP_SCHEMA.' + 'ROLE_ASSOCIATION.') + 'ITEM_WITH_ROLE'); END_LOCAL; IF SIZEOF(role_bag) = 1 THEN RETURN(role_bag[1].role); ELSE RETURN(?); END_IF; END_FUNCTION; FUNCTION item_in_context( item: representation_item; cntxt: representation_context ): BOOLEAN; LOCAL y : BAG OF representation_item; END_LOCAL; IF SIZEOF(USEDIN(item,'STEP_SHIP_SCHEMA.REPRESENTATION.ITEMS') * cntxt.representations_in_context) > 0 THEN RETURN(TRUE); ELSE y := QUERY ( z <* USEDIN(item,'') | ( 'STEP_SHIP_SCHEMA.REPRESENTATION_ITEM' IN TYPEOF(z)) ); IF SIZEOF(y) > 0 THEN REPEAT i := 1 TO HIINDEX(y) BY 1; IF item_in_context(y[i],cntxt) THEN RETURN(TRUE); END_IF; END_REPEAT; END_IF; END_IF; RETURN(FALSE); END_FUNCTION; FUNCTION leap_year( year: year_number ): BOOLEAN; IF (((year MOD 4) = 0) AND ((year MOD 100) <> 0)) OR ((year MOD 400) = 0) THEN RETURN(TRUE); ELSE RETURN(FALSE); END_IF; END_FUNCTION; FUNCTION list_face_loops( f: face ): LIST [0:?] OF loop; LOCAL loops : LIST [0:?] OF loop := []; END_LOCAL; REPEAT i := 1 TO SIZEOF(f.bounds) BY 1; loops := loops + f.bounds[i].bound; END_REPEAT; RETURN(loops); END_FUNCTION; FUNCTION list_of_topology_reversed( a_list: list_of_reversible_topology_item ): list_of_reversible_topology_item; LOCAL the_reverse : list_of_reversible_topology_item; END_LOCAL; the_reverse := []; REPEAT i := 1 TO SIZEOF(a_list) BY 1; the_reverse := topology_reversed(a_list[i]) + the_reverse; END_REPEAT; RETURN(the_reverse); END_FUNCTION; FUNCTION list_to_array( lis: LIST [0:?] OF GENERIC:t; low, u: INTEGER ): ARRAY OF GENERIC:t; LOCAL n : INTEGER; res : ARRAY [low:u] OF GENERIC:t; END_LOCAL; n := SIZEOF(lis); IF n <> ((u - low) + 1) THEN RETURN(?); ELSE res := [lis[1],n]; REPEAT i := 2 TO n BY 1; res[(low + i) - 1] := lis[i]; END_REPEAT; RETURN(res); END_IF; END_FUNCTION; FUNCTION list_to_set( l: LIST [0:?] OF GENERIC:t ): SET OF GENERIC:t; LOCAL s : SET OF GENERIC:t := []; END_LOCAL; REPEAT i := 1 TO SIZEOF(l) BY 1; s := s + l[i]; END_REPEAT; RETURN(s); END_FUNCTION; FUNCTION make_array_of_array( lis: LIST [1:?] OF LIST [1:?] OF GENERIC:t; low1, u1, low2, u2: INTEGER ): ARRAY OF ARRAY OF GENERIC:t; LOCAL res : ARRAY [low1:u1] OF ARRAY [low2:u2] OF GENERIC:t; END_LOCAL; IF ((u1 - low1) + 1) <> SIZEOF(lis) THEN RETURN(?); END_IF; IF ((u2 - low2) + 1) <> SIZEOF(lis[1]) THEN RETURN(?); END_IF; res := [list_to_array(lis[1],low2,u2),(u1 - low1) + 1]; REPEAT i := 2 TO HIINDEX(lis) BY 1; IF ((u2 - low2) + 1) <> SIZEOF(lis[i]) THEN RETURN(?); END_IF; res[(low1 + i) - 1] := list_to_array(lis[i],low2,u2); END_REPEAT; RETURN(res); END_FUNCTION; FUNCTION mixed_loop_type_set( l: SET [0:?] OF loop ): LOGICAL; LOCAL poly_loop_type : LOGICAL; END_LOCAL; IF SIZEOF(l) <= 1 THEN RETURN(FALSE); END_IF; poly_loop_type := 'STEP_SHIP_SCHEMA.POLY_LOOP' IN TYPEOF(l[1]); REPEAT i := 2 TO SIZEOF(l) BY 1; IF ('STEP_SHIP_SCHEMA.POLY_LOOP' IN TYPEOF(l[i])) <> poly_loop_type THEN RETURN(TRUE); END_IF; END_REPEAT; RETURN(FALSE); END_FUNCTION; -- ONLY IN AP203/AP218 FUNCTION msb_shells( brep: manifold_solid_brep ): SET [1:?] OF closed_shell; IF SIZEOF(QUERY ( msbtype <* TYPEOF(brep) | (msbtype LIKE '*BREP_WITH_VOIDS') )) >= 1 THEN RETURN(brep\brep_with_voids.voids + brep.outer); ELSE RETURN([brep.outer]); END_IF; END_FUNCTION; -- ONLY IN AP203 FUNCTION msf_curve_check(cv: curve): BOOLEAN; IF SIZEOF(['STEP_SHIP_SCHEMA.BOUNDED_CURVE', 'STEP_SHIP_SCHEMA.CONIC', 'STEP_SHIP_SCHEMA.CURVE_REPLICA', 'STEP_SHIP_SCHEMA.LINE', 'STEP_SHIP_SCHEMA.OFFSET_CURVE_3D'] * TYPEOF(cv)) > 1 THEN RETURN(FALSE); ELSE IF (('STEP_SHIP_SCHEMA.B_SPLINE_CURVE' IN TYPEOF(cv)) AND (cv\ b_spline_curve.self_intersect = FALSE)) OR (cv\b_spline_curve. self_intersect = UNKNOWN) THEN RETURN(TRUE); ELSE IF SIZEOF(['STEP_SHIP_SCHEMA.CONIC', 'STEP_SHIP_SCHEMA.LINE'] * TYPEOF(cv)) = 1 THEN RETURN(TRUE); ELSE IF 'STEP_SHIP_SCHEMA.CURVE_REPLICA' IN TYPEOF(cv) THEN RETURN(msf_curve_check(cv\curve_replica.parent_curve)); ELSE IF ('STEP_SHIP_SCHEMA.OFFSET_CURVE_3D' IN TYPEOF(cv)) AND ((cv\offset_curve_3d.self_intersect = FALSE) OR (cv\ offset_curve_3d.self_intersect = UNKNOWN)) AND (NOT ( 'STEP_SHIP_SCHEMA.POLYLINE' IN TYPEOF(cv.basis_curve))) THEN RETURN(msf_curve_check(cv\offset_curve_3d.basis_curve)); ELSE IF 'STEP_SHIP_SCHEMA.PCURVE' IN TYPEOF(cv) THEN RETURN(msf_curve_check(cv\pcurve.reference_to_curve\ representation.items[1]) AND msf_surface_check(cv\ pcurve.basis_surface)); ELSE IF 'STEP_SHIP_SCHEMA.SURFACE_CURVE' IN TYPEOF(cv) THEN IF msf_curve_check(cv\surface_curve.curve_3d) THEN REPEAT i := 1 TO SIZEOF(cv\surface_curve. associated_geometry) BY 1; IF 'STEP_SHIP_SCHEMA.SURFACE' IN TYPEOF(cv\ surface_curve.associated_geometry[i]) THEN IF NOT msf_surface_check(cv\surface_curve. associated_geometry[i]) THEN RETURN(FALSE); END_IF; ELSE IF 'STEP_SHIP_SCHEMA.PCURVE' IN TYPEOF(cv\ surface_curve.associated_geometry[i]) THEN IF NOT msf_curve_check(cv\surface_curve. associated_geometry[i]) THEN RETURN(FALSE); END_IF; END_IF; END_IF; END_REPEAT; RETURN(TRUE); END_IF; ELSE IF 'STEP_SHIP_SCHEMA.POLYLINE' IN TYPEOF(cv) THEN IF SIZEOF(cv\polyline.points) >= 3 THEN RETURN(TRUE); END_IF; END_IF; END_IF; END_IF; END_IF; END_IF; END_IF; END_IF; END_IF; RETURN(FALSE); END_FUNCTION; -- ONLY IN AP203 FUNCTION msf_surface_check(surf: surface): BOOLEAN; IF 'STEP_SHIP_SCHEMA.ELEMENTARY_SURFACE' IN TYPEOF(surf) THEN RETURN(TRUE); ELSE IF 'STEP_SHIP_SCHEMA.SWEPT_SURFACE' IN TYPEOF(surf) THEN RETURN(msf_curve_check(surf\swept_surface.swept_curve)); ELSE IF (('STEP_SHIP_SCHEMA.OFFSET_SURFACE' IN TYPEOF(surf)) AND ( surf\offset_surface.self_intersect = FALSE)) OR (surf\ offset_surface.self_intersect = UNKNOWN) THEN RETURN(msf_surface_check(surf\offset_surface.basis_surface)); ELSE IF 'STEP_SHIP_SCHEMA.SURFACE_REPLICA' IN TYPEOF(surf) THEN RETURN(msf_surface_check(surf\surface_replica.parent_surface)); ELSE IF (('STEP_SHIP_SCHEMA.B_SPLINE_SURFACE' IN TYPEOF(surf)) AND (surf\b_spline_surface.self_intersect = FALSE)) OR ( surf\b_spline_surface.self_intersect = UNKNOWN) THEN RETURN(TRUE); END_IF; END_IF; END_IF; END_IF; END_IF; RETURN(FALSE); END_FUNCTION; -- ONLY IN AP215/AP216/AP218 FUNCTION nmsf_curve_check( cv: curve ): BOOLEAN; IF SIZEOF(['STEP_SHIP_SCHEMA.BOUNDED_CURVE', 'STEP_SHIP_SCHEMA.CONIC', 'STEP_SHIP_SCHEMA.CURVE_REPLICA', 'STEP_SHIP_SCHEMA.LINE', 'STEP_SHIP_SCHEMA.OFFSET_CURVE_3D'] * TYPEOF(cv)) > 1 THEN RETURN(FALSE); ELSE IF (('STEP_SHIP_SCHEMA.B_SPLINE_CURVE' IN TYPEOF(cv)) AND ( cv\b_spline_curve.self_intersect = FALSE)) OR (cv\b_spline_curve. self_intersect = UNKNOWN) THEN RETURN(TRUE); ELSE IF SIZEOF(['STEP_SHIP_SCHEMA.CONIC', 'STEP_SHIP_SCHEMA.LINE'] * TYPEOF(cv)) = 1 THEN RETURN(TRUE); ELSE IF 'STEP_SHIP_SCHEMA.CURVE_REPLICA' IN TYPEOF(cv) THEN RETURN(nmsf_curve_check(cv\curve_replica.parent_curve)); ELSE IF (('STEP_SHIP_SCHEMA.OFFSET_CURVE_3D' IN TYPEOF(cv)) AND ((cv\offset_curve_3d.self_intersect = FALSE) OR (cv\ offset_curve_3d.self_intersect = UNKNOWN))) AND (NOT ( 'STEP_SHIP_SCHEMA.POLYLINE' IN TYPEOF(cv. basis_curve))) THEN RETURN(nmsf_curve_check(cv\offset_curve_3d.basis_curve)); ELSE IF 'STEP_SHIP_SCHEMA.PCURVE' IN TYPEOF(cv) THEN RETURN(nmsf_curve_check(cv\pcurve.reference_to_curve\ representation.items[1]) AND nmsf_surface_check(cv\ pcurve.basis_surface)); ELSE IF 'STEP_SHIP_SCHEMA.SURFACE_CURVE' IN TYPEOF(cv) THEN IF nmsf_curve_check(cv\surface_curve.curve_3d) THEN REPEAT i := 1 TO SIZEOF(cv\surface_curve. associated_geometry) BY 1; IF 'STEP_SHIP_SCHEMA.SURFACE' IN TYPEOF(cv\ surface_curve.associated_geometry[i]) THEN IF NOT nmsf_surface_check(cv\surface_curve. associated_geometry[i]) THEN RETURN(FALSE); END_IF; ELSE IF 'STEP_SHIP_SCHEMA.PCURVE' IN TYPEOF(cv\ surface_curve.associated_geometry[i]) THEN IF NOT nmsf_curve_check(cv\surface_curve. associated_geometry[i]) THEN RETURN(FALSE); END_IF; END_IF; END_IF; END_REPEAT; RETURN(TRUE); END_IF; ELSE IF 'STEP_SHIP_SCHEMA.POLYLINE' IN TYPEOF(cv) THEN IF SIZEOF(cv\polyline.points) >= 3 THEN RETURN(TRUE); END_IF; END_IF; END_IF; END_IF; END_IF; END_IF; END_IF; END_IF; END_IF; RETURN(FALSE); END_FUNCTION; -- ONLY IN AP215/AP216/AP218 FUNCTION nmsf_surface_check( surf: surface ): BOOLEAN; IF 'STEP_SHIP_SCHEMA.ELEMENTARY_SURFACE' IN TYPEOF(surf) THEN RETURN(TRUE); ELSE IF 'STEP_SHIP_SCHEMA.SWEPT_SURFACE' IN TYPEOF(surf) THEN RETURN(nmsf_curve_check(surf\swept_surface.swept_curve)); ELSE IF (('STEP_SHIP_SCHEMA.OFFSET_SURFACE' IN TYPEOF(surf)) AND (surf\offset_surface.self_intersect = FALSE)) OR (surf\ offset_surface.self_intersect = UNKNOWN) THEN RETURN(nmsf_surface_check(surf\offset_surface.basis_surface)); ELSE IF 'STEP_SHIP_SCHEMA.SURFACE_REPLICA' IN TYPEOF(surf) THEN RETURN(nmsf_surface_check(surf\surface_replica.parent_surface)); ELSE IF (('STEP_SHIP_SCHEMA.B_SPLINE_SURFACE' IN TYPEOF( surf)) AND (surf\b_spline_surface.self_intersect = FALSE)) OR (surf\b_spline_surface.self_intersect = UNKNOWN) THEN RETURN(TRUE); END_IF; END_IF; END_IF; END_IF; END_IF; RETURN(FALSE); END_FUNCTION; FUNCTION normalise( arg: vector_or_direction ): vector_or_direction; LOCAL ndim : INTEGER; v : direction; vec : vector; mag : REAL; result : vector_or_direction; END_LOCAL; IF NOT EXISTS(arg) THEN result := ?; ELSE ndim := arg.dim; IF 'STEP_SHIP_SCHEMA.VECTOR' IN TYPEOF(arg) THEN BEGIN v := dummy_gri || direction(arg.orientation.direction_ratios); IF arg.magnitude = 0 THEN RETURN(?); ELSE vec := dummy_gri || vector(v,1); END_IF; END; ELSE v := dummy_gri || direction(arg.direction_ratios); END_IF; mag := 0; REPEAT i := 1 TO ndim BY 1; mag := mag + (v.direction_ratios[i] * v.direction_ratios[i]); END_REPEAT; IF mag > 0 THEN mag := SQRT(mag); REPEAT i := 1 TO ndim BY 1; v.direction_ratios[i] := v.direction_ratios[i] / mag; END_REPEAT; IF 'STEP_SHIP_SCHEMA.VECTOR' IN TYPEOF(arg) THEN vec.orientation := v; result := vec; ELSE result := v; END_IF; ELSE RETURN(?); END_IF; END_IF; RETURN(result); END_FUNCTION; FUNCTION open_shell_reversed( a_shell: open_shell ): oriented_open_shell; LOCAL the_reverse : oriented_open_shell; END_LOCAL; IF 'STEP_SHIP_SCHEMA.ORIENTED_OPEN_SHELL' IN TYPEOF(a_shell) THEN the_reverse := ((dummy_tri || connected_face_set(a_shell\ connected_face_set.cfs_faces)) || open_shell()) || oriented_open_shell(a_shell\oriented_open_shell. open_shell_element,NOT a_shell\oriented_open_shell.orientation); ELSE the_reverse := ((dummy_tri || connected_face_set(a_shell\ connected_face_set.cfs_faces)) || open_shell()) || oriented_open_shell(a_shell,FALSE); END_IF; RETURN(the_reverse); END_FUNCTION; FUNCTION orthogonal_complement( vec: direction ): direction; LOCAL result : direction; END_LOCAL; IF (vec.dim <> 2) OR (NOT EXISTS(vec)) THEN RETURN(?); ELSE result := dummy_gri || direction([-vec.direction_ratios[2],vec. direction_ratios[1]]); RETURN(result); END_IF; END_FUNCTION; FUNCTION path_head_to_tail( a_path: path ): BOOLEAN; LOCAL n : INTEGER; p : BOOLEAN := TRUE; END_LOCAL; n := SIZEOF(a_path.edge_list); REPEAT i := 2 TO n BY 1; p := p AND (a_path.edge_list[i - 1].edge_end :=: a_path.edge_list[i] .edge_start); END_REPEAT; RETURN(p); END_FUNCTION; FUNCTION path_reversed( a_path: path ): oriented_path; LOCAL the_reverse : oriented_path; END_LOCAL; IF 'STEP_SHIP_SCHEMA.ORIENTED_PATH' IN TYPEOF(a_path) THEN the_reverse := (dummy_tri || path(list_of_topology_reversed(a_path. edge_list))) || oriented_path(a_path\oriented_path.path_element, NOT a_path\oriented_path.orientation); ELSE the_reverse := (dummy_tri || path(list_of_topology_reversed(a_path. edge_list))) || oriented_path(a_path,FALSE); END_IF; RETURN(the_reverse); END_FUNCTION; FUNCTION scalar_times_vector( scalar: REAL; vec: vector_or_direction ): vector; LOCAL v : direction; mag : REAL; result : vector; END_LOCAL; IF (NOT EXISTS(scalar)) OR (NOT EXISTS(vec)) THEN RETURN(?); ELSE IF 'STEP_SHIP_SCHEMA.VECTOR' IN TYPEOF(vec) THEN v := dummy_gri || direction(vec.orientation.direction_ratios); mag := scalar * vec.magnitude; ELSE v := dummy_gri || direction(vec.direction_ratios); mag := scalar; END_IF; IF mag < 0 THEN REPEAT i := 1 TO SIZEOF(v.direction_ratios) BY 1; v.direction_ratios[i] := -v.direction_ratios[i]; END_REPEAT; mag := -mag; END_IF; result := dummy_gri || vector(normalise(v),mag); END_IF; RETURN(result); END_FUNCTION; FUNCTION second_proj_axis( z_axis, x_axis, arg: direction ): direction; LOCAL temp : vector; v : direction; y_axis : vector; END_LOCAL; IF NOT EXISTS(arg) THEN v := dummy_gri || direction([0,1,0]); ELSE v := arg; END_IF; temp := scalar_times_vector(dot_product(v,z_axis),z_axis); y_axis := vector_difference(v,temp); temp := scalar_times_vector(dot_product(v,x_axis),x_axis); y_axis := vector_difference(y_axis,temp); y_axis := normalise(y_axis); RETURN(y_axis.orientation); END_FUNCTION; FUNCTION set_of_topology_reversed( a_set: set_of_reversible_topology_item ): set_of_reversible_topology_item; LOCAL the_reverse : set_of_reversible_topology_item; END_LOCAL; the_reverse := []; REPEAT i := 1 TO SIZEOF(a_set) BY 1; the_reverse := the_reverse + topology_reversed(a_set[i]); END_REPEAT; RETURN(the_reverse); END_FUNCTION; FUNCTION shell_reversed( a_shell: shell ): shell; IF 'STEP_SHIP_SCHEMA.OPEN_SHELL' IN TYPEOF(a_shell) THEN RETURN(open_shell_reversed(a_shell)); ELSE IF 'STEP_SHIP_SCHEMA.CLOSED_SHELL' IN TYPEOF(a_shell) THEN RETURN(closed_shell_reversed(a_shell)); ELSE RETURN(?); END_IF; END_IF; END_FUNCTION; FUNCTION surface_weights_positive( b: rational_b_spline_surface ): BOOLEAN; LOCAL result : BOOLEAN := TRUE; END_LOCAL; REPEAT i := 0 TO b.u_upper BY 1; REPEAT j := 0 TO b.v_upper BY 1; IF b.weights[i][j] <= 0 THEN result := FALSE; RETURN(result); END_IF; END_REPEAT; END_REPEAT; RETURN(result); END_FUNCTION; FUNCTION topology_reversed( an_item: reversible_topology ): reversible_topology; IF 'STEP_SHIP_SCHEMA.EDGE' IN TYPEOF(an_item) THEN RETURN(edge_reversed(an_item)); END_IF; IF 'STEP_SHIP_SCHEMA.PATH' IN TYPEOF(an_item) THEN RETURN(path_reversed(an_item)); END_IF; IF 'STEP_SHIP_SCHEMA.FACE_BOUND' IN TYPEOF(an_item) THEN RETURN(face_bound_reversed(an_item)); END_IF; IF 'STEP_SHIP_SCHEMA.FACE' IN TYPEOF(an_item) THEN RETURN(face_reversed(an_item)); END_IF; IF 'STEP_SHIP_SCHEMA.SHELL' IN TYPEOF(an_item) THEN RETURN(shell_reversed(an_item)); END_IF; IF 'SET' IN TYPEOF(an_item) THEN RETURN(set_of_topology_reversed(an_item)); END_IF; IF 'LIST' IN TYPEOF(an_item) THEN RETURN(list_of_topology_reversed(an_item)); END_IF; RETURN(?); END_FUNCTION; -- ONLY IN AP203 FUNCTION unique_version_change_order(c: action): BOOLEAN; LOCAL ords : action_directive := c\directed_action.directive; assign : SET OF change_request := []; versions : SET OF product_definition_formation := []; END_LOCAL; REPEAT i := 1 TO SIZEOF(ords.requests) BY 1; assign := assign + QUERY ( ara <* bag_to_set(USEDIN(ords.requests[i], 'STEP_SHIP_SCHEMA.ACTION_REQUEST_ASSIGNMENT.' + 'ASSIGNED_ACTION_REQUEST')) | ( 'STEP_SHIP_SCHEMA.CHANGE_REQUEST' IN TYPEOF(ara)) ); END_REPEAT; REPEAT k := 1 TO SIZEOF(assign) BY 1; versions := versions + assign[k].items; END_REPEAT; RETURN(SIZEOF(QUERY ( vers <* versions | (NOT (SIZEOF( QUERY ( other_vers <* (versions - vers) | (vers.of_product :=: other_vers.of_product) )) = 0)) )) = 0); END_FUNCTION; FUNCTION using_items( item: founded_item_select; checked_items: SET OF founded_item_select ): SET OF founded_item_select; LOCAL next_items : SET OF founded_item_select; new_check_items : SET OF founded_item_select; result_items : SET OF founded_item_select; END_LOCAL; result_items := []; new_check_items := checked_items + item; next_items := QUERY ( z <* bag_to_set(USEDIN(item,'')) | (( 'STEP_SHIP_SCHEMA.REPRESENTATION_ITEM' IN TYPEOF(z)) OR ( 'STEP_SHIP_SCHEMA.FOUNDED_ITEM' IN TYPEOF(z))) ); IF SIZEOF(next_items) > 0 THEN REPEAT i := 1 TO HIINDEX(next_items) BY 1; IF NOT (next_items[i] IN new_check_items) THEN result_items := (result_items + next_items[i]) + using_items( next_items[i],new_check_items); END_IF; END_REPEAT; END_IF; RETURN(result_items); END_FUNCTION; FUNCTION using_representations( item: founded_item_select ): SET OF representation; LOCAL results : SET OF representation; intermediate_items : SET OF founded_item_select; result_bag : BAG OF representation; END_LOCAL; results := []; result_bag := USEDIN(item, 'STEP_SHIP_SCHEMA.REPRESENTATION.ITEMS'); IF SIZEOF(result_bag) > 0 THEN REPEAT i := 1 TO HIINDEX(result_bag) BY 1; results := results + result_bag[i]; END_REPEAT; END_IF; intermediate_items := using_items(item,[]); IF SIZEOF(intermediate_items) > 0 THEN REPEAT i := 1 TO HIINDEX(intermediate_items) BY 1; result_bag := USEDIN(intermediate_items[i], 'STEP_SHIP_SCHEMA.REPRESENTATION.ITEMS'); IF SIZEOF(result_bag) > 0 THEN REPEAT j := 1 TO HIINDEX(result_bag) BY 1; results := results + result_bag[j]; END_REPEAT; END_IF; END_REPEAT; END_IF; RETURN(results); END_FUNCTION; FUNCTION valid_calendar_date( date: calendar_date ): LOGICAL; CASE date.month_component OF 1 : RETURN((1 <= date.day_component) AND (date.day_component <= 31)); 2 : BEGIN IF leap_year(date.year_component) THEN RETURN((1 <= date.day_component) AND (date.day_component <= 29)); ELSE RETURN((1 <= date.day_component) AND (date.day_component <= 28)); END_IF; END; 3 : RETURN((1 <= date.day_component) AND (date.day_component <= 31)); 4 : RETURN((1 <= date.day_component) AND (date.day_component <= 30)); 5 : RETURN((1 <= date.day_component) AND (date.day_component <= 31)); 6 : RETURN((1 <= date.day_component) AND (date.day_component <= 30)); 7 : RETURN((1 <= date.day_component) AND (date.day_component <= 31)); 8 : RETURN((1 <= date.day_component) AND (date.day_component <= 31)); 9 : RETURN((1 <= date.day_component) AND (date.day_component <= 30)); 10 : RETURN((1 <= date.day_component) AND (date. day_component <= 31)); 11 : RETURN((1 <= date.day_component) AND (date. day_component <= 30)); 12 : RETURN((1 <= date.day_component) AND (date. day_component <= 31)); END_CASE; RETURN(FALSE); END_FUNCTION; -- ONLY IN AP203/AP218 FUNCTION valid_geometrically_bounded_wf_curve( crv: curve ): BOOLEAN; IF SIZEOF(['STEP_SHIP_SCHEMA.POLYLINE', 'STEP_SHIP_SCHEMA.B_SPLINE_CURVE', 'STEP_SHIP_SCHEMA.ELLIPSE','STEP_SHIP_SCHEMA.CIRCLE'] * TYPEOF(crv)) = 1 THEN RETURN(TRUE); ELSE IF 'STEP_SHIP_SCHEMA.TRIMMED_CURVE' IN TYPEOF(crv) THEN IF SIZEOF(['STEP_SHIP_SCHEMA.LINE', 'STEP_SHIP_SCHEMA.PARABOLA', 'STEP_SHIP_SCHEMA.HYPERBOLA'] * TYPEOF(crv\trimmed_curve. basis_curve)) = 1 THEN RETURN(TRUE); ELSE RETURN(valid_geometrically_bounded_wf_curve(crv\trimmed_curve. basis_curve)); END_IF; ELSE IF 'STEP_SHIP_SCHEMA.OFFSET_CURVE_3D' IN TYPEOF(crv) THEN RETURN(valid_geometrically_bounded_wf_curve(crv\offset_curve_3d. basis_curve)); ELSE IF 'STEP_SHIP_SCHEMA.CURVE_REPLICA' IN TYPEOF(crv) THEN RETURN(valid_geometrically_bounded_wf_curve(crv\curve_replica. parent_curve)); ELSE IF 'STEP_SHIP_SCHEMA.COMPOSITE_CURVE' IN TYPEOF(crv) THEN RETURN(SIZEOF(QUERY ( ccs <* crv\composite_curve.segments | (NOT valid_geometrically_bounded_wf_curve(ccs. parent_curve)) )) = 0); END_IF; END_IF; END_IF; END_IF; END_IF; RETURN(FALSE); END_FUNCTION; -- ONLY IN AP203/AP218 FUNCTION valid_geometrically_bounded_wf_point( pnt: point ): BOOLEAN; IF 'STEP_SHIP_SCHEMA.CARTESIAN_POINT' IN TYPEOF(pnt) THEN RETURN(TRUE); ELSE IF 'STEP_SHIP_SCHEMA.POINT_ON_CURVE' IN TYPEOF(pnt) THEN RETURN(valid_geometrically_bounded_wf_curve(pnt\point_on_curve. basis_curve)); ELSE IF 'STEP_SHIP_SCHEMA.POINT_REPLICA' IN TYPEOF(pnt) THEN RETURN(valid_geometrically_bounded_wf_point(pnt\point_replica. parent_pt)); END_IF; END_IF; END_IF; RETURN(FALSE); END_FUNCTION; FUNCTION valid_measure_value( m: measure_value ): BOOLEAN; IF 'REAL' IN TYPEOF(m) THEN RETURN(m > 0); ELSE IF 'INTEGER' IN TYPEOF(m) THEN RETURN(m > 0); ELSE RETURN(TRUE); END_IF; END_IF; END_FUNCTION; FUNCTION valid_time( time: local_time ): BOOLEAN; IF EXISTS(time.second_component) THEN RETURN(EXISTS(time.minute_component)); ELSE RETURN(TRUE); END_IF; END_FUNCTION; FUNCTION valid_units( m: measure_with_unit ): BOOLEAN; IF 'STEP_SHIP_SCHEMA.LENGTH_MEASURE' IN TYPEOF(m. value_component) THEN IF derive_dimensional_exponents(m.unit_component) <> dimensional_exponents(1,0,0,0,0,0,0) THEN RETURN(FALSE); END_IF; END_IF; IF 'STEP_SHIP_SCHEMA.MASS_MEASURE' IN TYPEOF(m.value_component) THEN IF derive_dimensional_exponents(m.unit_component) <> dimensional_exponents(0,1,0,0,0,0,0) THEN RETURN(FALSE); END_IF; END_IF; IF 'STEP_SHIP_SCHEMA.TIME_MEASURE' IN TYPEOF(m.value_component) THEN IF derive_dimensional_exponents(m.unit_component) <> dimensional_exponents(0,0,1,0,0,0,0) THEN RETURN(FALSE); END_IF; END_IF; IF 'STEP_SHIP_SCHEMA.ELECTRIC_CURRENT_MEASURE' IN TYPEOF(m. value_component) THEN IF derive_dimensional_exponents(m.unit_component) <> dimensional_exponents(0,0,0,1,0,0,0) THEN RETURN(FALSE); END_IF; END_IF; IF 'STEP_SHIP_SCHEMA.THERMODYNAMIC_TEMPERATURE_MEASURE' IN TYPEOF(m.value_component) THEN IF derive_dimensional_exponents(m.unit_component) <> dimensional_exponents(0,0,0,0,1,0,0) THEN RETURN(FALSE); END_IF; END_IF; IF 'STEP_SHIP_SCHEMA.AMOUNT_OF_SUBSTANCE_MEASURE' IN TYPEOF(m. value_component) THEN IF derive_dimensional_exponents(m.unit_component) <> dimensional_exponents(0,0,0,0,0,1,0) THEN RETURN(FALSE); END_IF; END_IF; IF 'STEP_SHIP_SCHEMA.LUMINOUS_INTENSITY_MEASURE' IN TYPEOF(m. value_component) THEN IF derive_dimensional_exponents(m.unit_component) <> dimensional_exponents(0,0,0,0,0,0,1) THEN RETURN(FALSE); END_IF; END_IF; IF 'STEP_SHIP_SCHEMA.PLANE_ANGLE_MEASURE' IN TYPEOF(m. value_component) THEN IF derive_dimensional_exponents(m.unit_component) <> dimensional_exponents(0,0,0,0,0,0,0) THEN RETURN(FALSE); END_IF; END_IF; IF 'STEP_SHIP_SCHEMA.SOLID_ANGLE_MEASURE' IN TYPEOF(m. value_component) THEN IF derive_dimensional_exponents(m.unit_component) <> dimensional_exponents(0,0,0,0,0,0,0) THEN RETURN(FALSE); END_IF; END_IF; IF 'STEP_SHIP_SCHEMA.AREA_MEASURE' IN TYPEOF(m.value_component) THEN IF derive_dimensional_exponents(m.unit_component) <> dimensional_exponents(2,0,0,0,0,0,0) THEN RETURN(FALSE); END_IF; END_IF; IF 'STEP_SHIP_SCHEMA.VOLUME_MEASURE' IN TYPEOF(m. value_component) THEN IF derive_dimensional_exponents(m.unit_component) <> dimensional_exponents(3,0,0,0,0,0,0) THEN RETURN(FALSE); END_IF; END_IF; IF 'STEP_SHIP_SCHEMA.RATIO_MEASURE' IN TYPEOF(m. value_component) THEN IF derive_dimensional_exponents(m.unit_component) <> dimensional_exponents(0,0,0,0,0,0,0) THEN RETURN(FALSE); END_IF; END_IF; IF 'STEP_SHIP_SCHEMA.POSITIVE_LENGTH_MEASURE' IN TYPEOF(m. value_component) THEN IF derive_dimensional_exponents(m.unit_component) <> dimensional_exponents(1,0,0,0,0,0,0) THEN RETURN(FALSE); END_IF; END_IF; IF 'STEP_SHIP_SCHEMA.POSITIVE_PLANE_ANGLE_MEASURE' IN TYPEOF(m .value_component) THEN IF derive_dimensional_exponents(m.unit_component) <> dimensional_exponents(0,0,0,0,0,0,0) THEN RETURN(FALSE); END_IF; END_IF; RETURN(TRUE); END_FUNCTION; -- ONLY IN AP203/AP216/AP218 FUNCTION valid_wireframe_edge_curve( crv: curve ): BOOLEAN; IF SIZEOF(['STEP_SHIP_SCHEMA.LINE', 'STEP_SHIP_SCHEMA.CONIC', 'STEP_SHIP_SCHEMA.B_SPLINE_CURVE', 'STEP_SHIP_SCHEMA.POLYLINE'] * TYPEOF(crv)) = 1 THEN RETURN(TRUE); ELSE IF 'STEP_SHIP_SCHEMA.CURVE_REPLICA' IN TYPEOF(crv) THEN RETURN(valid_wireframe_edge_curve(crv\curve_replica.parent_curve)); ELSE IF 'STEP_SHIP_SCHEMA.OFFSET_CURVE_3D' IN TYPEOF(crv) THEN RETURN(valid_wireframe_edge_curve(crv\offset_curve_3d. basis_curve)); END_IF; END_IF; END_IF; RETURN(FALSE); END_FUNCTION; -- ONLY IN AP203/AP216/AP218 FUNCTION valid_wireframe_vertex_point( pnt: point ): BOOLEAN; IF 'STEP_SHIP_SCHEMA.CARTESIAN_POINT' IN TYPEOF(pnt) THEN RETURN(TRUE); ELSE IF 'STEP_SHIP_SCHEMA.POINT_REPLICA' IN TYPEOF(pnt) THEN RETURN(valid_wireframe_vertex_point(pnt\point_replica.parent_pt)); END_IF; END_IF; RETURN(FALSE); END_FUNCTION; FUNCTION vector_difference( arg1, arg2: vector_or_direction ): vector; LOCAL ndim : INTEGER; mag2 : REAL; mag1 : REAL; mag : REAL; res : direction; vec1 : direction; vec2 : direction; result : vector; END_LOCAL; IF ((NOT EXISTS(arg1)) OR (NOT EXISTS(arg2))) OR (arg1.dim <> arg2.dim) THEN RETURN(?); ELSE BEGIN IF 'STEP_SHIP_SCHEMA.VECTOR' IN TYPEOF(arg1) THEN mag1 := arg1.magnitude; vec1 := arg1.orientation; ELSE mag1 := 1; vec1 := arg1; END_IF; IF 'STEP_SHIP_SCHEMA.VECTOR' IN TYPEOF(arg2) THEN mag2 := arg2.magnitude; vec2 := arg2.orientation; ELSE mag2 := 1; vec2 := arg2; END_IF; vec1 := normalise(vec1); vec2 := normalise(vec2); ndim := SIZEOF(vec1.direction_ratios); mag := 0; res := dummy_gri || direction(vec1.direction_ratios); REPEAT i := 1 TO ndim BY 1; res.direction_ratios[i] := (mag1 * vec1.direction_ratios[i]) + ( mag2 * vec2.direction_ratios[i]); mag := mag + (res.direction_ratios[i] * res.direction_ratios[i]); END_REPEAT; IF mag > 0 THEN result := dummy_gri || vector(res,SQRT(mag)); ELSE result := dummy_gri || vector(vec1,0); END_IF; END; END_IF; RETURN(result); END_FUNCTION; -- ONLY IN AP215/AP216/AP218 FUNCTION which_class( t: GENERIC ): LIST OF STRING; LOCAL class_list : LIST OF STRING := []; elements : BAG OF applied_classification_assignment; END_LOCAL; elements := USEDIN(t, 'STEP_SHIP_SCHEMA.APPLIED_CLASSIFICATION_ASSIGNMENT.ITEMS'); REPEAT i := 1 TO HIINDEX(elements) BY 1; IF elements[i]\classification_assignment.role.name = 'class membership' THEN class_list := class_list + elements[i]\classification_assignment. assigned_class\group.name; END_IF; END_REPEAT; RETURN(class_list); END_FUNCTION; END_SCHEMA;