Application module: Production rule ISO/TS 10303-1739:2019(E)
© ISO

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

4 Information requirements
   4.1 Required AM ARMs
   4.2 ARM type definitions
   4.3 ARM entity definitions
   4.4 ARM function definitions
   4.5 ARM rule definitions
5 Module interpreted model
   5.1 Mapping specification
   5.2 MIM EXPRESS short listing
     5.2.1 MIM type definitions
     5.2.2 MIM entity definitions

A MIM short names
B Information object registration
C ARM EXPRESS-G   EXPRESS-G
D MIM EXPRESS-G   EXPRESS-G
E Computer interpretable listings
F Change history
Bibliography
Index

4 Information requirements

This clause specifies the information requirements for the Production rule application module. The information requirements are specified as the Application Reference Model (ARM) of this application module.

NOTE 1  A graphical representation of the information requirements is given in Annex C.

NOTE 2  The mapping specification is specified in 5.1. It shows how the information requirements are met by using common resources and constructs defined or imported in the MIM schema of this application module.

This clause defines the information requirements to which implementations shall conform using the EXPRESS language as defined in ISO 10303-11. The following begins the Production_rule_arm schema and identifies the necessary external references.

EXPRESS specification:

*)
SCHEMA Production_rule_arm;
(*

4.1 Required AM ARMs

The following EXPRESS interface statements specify the elements imported from the ARMs of other application modules.

EXPRESS specification:

*)
USE FROM Activity_arm;    --  ISO/TS 10303-1047

USE FROM Date_time_assignment_arm;    --  ISO/TS 10303-1014

USE FROM Identification_assignment_arm;    --  ISO/TS 10303-1021

USE FROM Product_identification_arm;    --  ISO/TS 10303-1017

USE FROM Software_arm;    --  ISO/TS 10303-1746

USE FROM Specification_document_arm;    --  ISO/TS 10303-1747

REFERENCE FROM Specification_document_arm    --  ISO/TS 10303-1747
  (get_document_definition);

REFERENCE FROM Support_resource_arm    --  ISO/TS 10303-1800
  (bag_to_set);
(*

NOTE 1   The schemas referenced above are specified in the following part of ISO 10303:

Activity_arm ISO/TS 10303-1047
Date_time_assignment_arm ISO/TS 10303-1014
Identification_assignment_arm ISO/TS 10303-1021
Product_identification_arm ISO/TS 10303-1017
Software_arm ISO/TS 10303-1746
Specification_document_arm ISO/TS 10303-1747
Specification_document_arm ISO/TS 10303-1747
Support_resource_arm ISO/TS 10303-1800

NOTE 2   See Annex C, Figures C.1, C.2, C.3and C.4 for a graphical representation of this schema.

4.2 ARM type definitions

This subclause specifies the ARM types for this application module. The ARM types and definitions are specified below.

4.2.1 built_in_functions   EXPRESS-G

The built_in_functions is an extensible enumeration of functions. It provides a means to associate a list of available functions to a function symbol.

EXPRESS specification:

*)
TYPE built_in_functions = EXTENSIBLE ENUMERATION OF
   (attr_val);
END_TYPE;
(*

Enumerated item definitions:

attr_val: the available functions.

4.2.2 clause_select   EXPRESS-G

The clause_select type allows for the designation of the data types Simple_clause and Complex_clause.

EXPRESS specification:

*)
TYPE clause_select = SELECT
   (Simple_clause,
    Complex_clause);
END_TYPE;
(*

4.2.3 constants   EXPRESS-G

The constants type is an extensible list of alternate data types that allows for the designation of the data types any_number_value, any_string_value, and Logical_representation_item.

NOTE   The list of entity data types may be extended in application modules that use the constructs of this module.

EXPRESS specification:

*)
TYPE constants = EXTENSIBLE SELECT
   (any_number_value,
    any_string_value,
    Logical_representation_item);
END_TYPE;
(*

4.2.4 expression_syntax   EXPRESS-G

The expression_syntax is the data type that provides the available syntax to be used to develop expressions.

EXPRESS specification:

*)
TYPE expression_syntax = EXTENSIBLE ENUMERATION OF
   (express);
END_TYPE;
(*

Enumerated item definitions:

express: a source of the syntax. This data type indicates that EXPRESS syntax is used to develop expressions.

4.2.5 function_symbol   EXPRESS-G

The function_symbol type allows for the designation of the data types any_string_value and built_in_functions.

EXPRESS specification:

*)
TYPE function_symbol = SELECT
   (any_string_value,
    built_in_functions);
END_TYPE;
(*

4.2.6 pr_activity_item   EXPRESS-G

The pr_activity_item type is an extension of the activity_item type. It adds the data types Rule_set and Rule_version to the list of alternate data types.

EXPRESS specification:

*)
TYPE pr_activity_item = SELECT BASED_ON activity_item WITH
   (Rule_set,
    Rule_version);
END_TYPE;
(*

4.2.7 pr_documented_element_select   EXPRESS-G

The pr_documented_element_select type is an extension of the documented_element_select type. It adds the data type Rule_set to the list of alternate data types.

NOTE  The list of entity data types may be extended in application modules that use the constructs of this module.

EXPRESS specification:

*)
TYPE pr_documented_element_select = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON documented_element_select WITH
   (Rule_set);
END_TYPE;
(*

4.2.8 pr_identification_item   EXPRESS-G

The pr_identification_item type is an extension of the identification_item type. It adds the data type Rule_set to the list of alternate data types.

EXPRESS specification:

*)
TYPE pr_identification_item = SELECT BASED_ON identification_item WITH
   (Rule_set);
END_TYPE;
(*

4.2.9 pr_organization_or_person_in_organization_item   EXPRESS-G

The pr_organization_or_person_in_organization_item type is an extension of the organization_or_person_in_organization_item type. It adds the data type Rule_action to the list of alternate data types.

EXPRESS specification:

*)
TYPE pr_organization_or_person_in_organization_item = SELECT BASED_ON organization_or_person_in_organization_item WITH
   (Rule_action);
END_TYPE;
(*

4.2.10 predicate_symbol   EXPRESS-G

A predicate_symbol is a text string signifying the characters used to connect or show relationships between parts of an expression.

EXAMPLE    The plus sign "+" is often used to represent concatenation in expressions.

EXPRESS specification:

*)
TYPE predicate_symbol = STRING;
END_TYPE;
(*

4.2.11 scope_select   EXPRESS-G

The scope_select type allows for the designation of the data types Rule_definition, Rule_set, and Rule_set_group.

EXPRESS specification:

*)
TYPE scope_select = SELECT
   (Rule_definition,
    Rule_set,
    Rule_set_group);
END_TYPE;
(*

4.2.12 term_select   EXPRESS-G

The term_select type allows for the designation of the data types Symbol, constants, Func, Scalar_variable, Row_value, and Row_variable.

EXPRESS specification:

*)
TYPE term_select = SELECT
   (Symbol,
    constants,
    Func,
    Scalar_variable,
    Row_value,
    Row_variable);
END_TYPE;
(*

4.3 ARM entity definitions

This subclause specifies the ARM entities for this module. Each ARM application entity is an atomic element that embodies a unique application concept and contains attributes specifying the data elements of the entity. The ARM entities and definitions are specified below.

4.3.1 Abstract_variable   EXPRESS-GMapping table

An Abstract_variable is the specification of a variable with an identifier and scope. An Abstract_variable is one of a Scalar_variable or a Row_variable.

EXPRESS specification:

*)
ENTITY Abstract_variable
  ABSTRACT SUPERTYPE OF (ONEOF (Scalar_variable,
                                Row_variable));
  name : STRING;
  scope : scope_select;
UNIQUE
  UR1: name, scope;
END_ENTITY;
(*

Attribute definitions:

name: the words by which the Abstract_variable is known.

scope: specifies the scope_select for the Abstract_variable.

Formal propositions:

UR1: The combination of name and scope shall be unique within a population of an Abstract_variables.

4.3.2 Atomic_formula   EXPRESS-GMapping table

An Atomic_formula is one of a Rule_condition or a Ground_fact. It is an abstraction that binds a symbol to a list of items. Properties of the item membership are specialized in Rule_condition or Ground_fact.

EXPRESS specification:

*)
ENTITY Atomic_formula
  ABSTRACT SUPERTYPE OF (ONEOF (Rule_condition,
                                Ground_fact));
  predicate_symbol : predicate_symbol;
  terms : LIST[0:?] OF term_select;
END_ENTITY;
(*

Attribute definitions:

predicate_symbol: specifies the predicate_symbol for the Atomic_formula.

terms: specifies a list of the term_select for the Atomic_formula.

4.3.3 Attribute_assertion   EXPRESS-GMapping table

An Attribute_assertion is a type of Fact_type. In this case, the factual data relates to an attribute, not an entity.

EXPRESS specification:

*)
ENTITY Attribute_assertion
  SUBTYPE OF (Fact_type);
  entity_type : STRING;
  attribute : STRING;
END_ENTITY;
(*

Attribute definitions:

entity_type: specifies the text that describes the Attribute_assertion.

attribute: specifies the text that describes the Attribute_assertion.

4.3.4 Back_chaining_rule   EXPRESS-GMapping table

A Back_chaining_rule is a type of Rule_definition.

EXPRESS specification:

*)
ENTITY Back_chaining_rule
  SUBTYPE OF (Rule_definition);
  head : Rule_condition;
  body : LIST[0:?] OF Rule_condition;
WHERE
  WR1: SELF.head.positive = TRUE;
  WR2: local_vars_of(SELF.head) <= local_vars_of(SELF.body);
END_ENTITY;
(*

Attribute definitions:

head: specifies the Rule_condition for the Back_chaining_rule.

body: specifies a list of the Rule_condition for the Back_chaining_rule.

Formal propositions:

WR1: The positive of head shall be set to TRUE.

WR2: The set of variable of head shall be a subset of set of variable of body.

4.3.5 Complex_clause   EXPRESS-GMapping table

A Complex_clause is one of a Complex_conjunctive_clause or a Complex_disjunctive_clause. A Complex_clause consists of two or more simple clauses that are combined using the same operator for all elements. The operator is defined in the subtype.

EXPRESS specification:

*)
ENTITY Complex_clause
  ABSTRACT SUPERTYPE OF (ONEOF (Complex_conjunctive_clause,
                                Complex_disjunctive_clause));
  clauses : LIST[2:?] OF clause_select;
END_ENTITY;
(*

Attribute definitions:

clauses: specifies a list of the clause_select for the Complex_clause. There shall exist two or more clause_select for the Complex_clause.

4.3.6 Complex_conjunctive_clause   EXPRESS-GMapping table

A Complex_conjunctive_clause is a type of Complex_clause where the operator used to compose the clause is an AND operator.

EXPRESS specification:

*)
ENTITY Complex_conjunctive_clause
  SUBTYPE OF (Complex_clause);
END_ENTITY;
(*

4.3.7 Complex_disjunctive_clause   EXPRESS-GMapping table

A Complex_disjunctive_clause is a type of Complex_clause where the operator used to compose the clause is an OR operator.

EXPRESS specification:

*)
ENTITY Complex_disjunctive_clause
  SUBTYPE OF (Complex_clause);
END_ENTITY;
(*

4.3.8 Entity_assertion   EXPRESS-GMapping table

An Entity_assertion is a type of Fact_type. In this case, the factual data relates to an entity, not an attribute.

EXPRESS specification:

*)
ENTITY Entity_assertion
  SUBTYPE OF (Fact_type);
END_ENTITY;
(*

4.3.9 Enum_reference_prefix   EXPRESS-GMapping table

An Enum_reference_prefix is the text that can be prepended to an enumeration to provide additional information about the enumeration.

EXPRESS specification:

*)
ENTITY Enum_reference_prefix;
  prefix : STRING;
END_ENTITY;
(*

Attribute definitions:

prefix: specifies the text that describes the Enum_reference_prefix.

4.3.10 Extent   EXPRESS-GMapping table

An Extent is a means to provide information about the Fact_type by providing the query_expression and optional syntax information used to extract the Fact_type.

EXPRESS specification:

*)
ENTITY Extent;
  variable_id : OPTIONAL STRING;
  source : STRING;
  query_expression : STRING;
  syntax : OPTIONAL expression_syntax;
END_ENTITY;
(*

Attribute definitions:

variable_id: specifies the text that describes the variable identifier of the Extent. The value of this attribute need not be specified.

source: specifies the text that describes the origin of the Extent.

query_expression: specifies the text that describes the expression used to extract the Extent.

syntax: specifies a role of the expression_syntax for the Extent. The value of this attribute need not be specified.

4.3.11 Fact_type   EXPRESS-GMapping table

A Fact_type is one of an Entity_assertion or an Attribute_assertion. A Fact_type represents the form of an Atomic_formula, including indication of its predicate symbol and its arity.

EXPRESS specification:

*)
ENTITY Fact_type
  ABSTRACT SUPERTYPE OF (ONEOF (Entity_assertion,
                                Attribute_assertion));
  source : Extent;
  predicate_symbol : STRING;
END_ENTITY;
(*

Attribute definitions:

source: specifies a role of the Extent for the Fact_type.

predicate_symbol: specifies the text that describes the Fact_type.

4.3.12 Forward_chaining_rule   EXPRESS-GMapping table

A Forward_chaining_rule is a type of Rule_definition.

EXPRESS specification:

*)
ENTITY Forward_chaining_rule
  SUBTYPE OF (Rule_definition);
  premise : clause_select;
  conclusion : Literal_conjunction;
WHERE
  WR1: local_vars_of(SELF.conclusion) <= local_vars_of(SELF.premise);
END_ENTITY;
(*

Attribute definitions:

premise: specifies the clause_select for the Forward_chaining_rule.

conclusion: specifies a role of the Literal_conjunction for the Forward_chaining_rule.

Formal propositions:

WR1: The set of variable of conclusion shall be a subset of set of variable of premise.

4.3.13 Func   EXPRESS-GMapping table

A Func is an association of a symbol to a list of terms. It is used to represent the notion of function in the production rule system.

EXPRESS specification:

*)
ENTITY Func;
  func_sym : function_symbol;
  terms : LIST[0:?] OF term_select;
END_ENTITY;
(*

Attribute definitions:

func_sym: specifies the function_symbol for the Func.

terms: specifies a list of the term_select for the Func.

4.3.14 Global_assignment   EXPRESS-GMapping table

A Global_assignment is a statement in the production rules that assigns a value to a variable.

NOTE    The variable being assigned to may be used in rules (provided that the variable is in the scope of the rule). In such rules, the value bound to the variable is the value provided by the Global_assignment.

EXPRESS specification:

*)
ENTITY Global_assignment;
  variable : Abstract_variable;
  val : term_select;
WHERE
  WR1: NOT(contains_variable(SELF.val));
END_ENTITY;
(*

Attribute definitions:

variable: specifies a role of the Abstract_variable for the Global_assignment.

val: specifies the term_select for the Global_assignment.

Formal propositions:

WR1: The val shall not contain a variable.

4.3.15 Ground_fact   EXPRESS-GMapping table

A Ground_fact is a type of Atomic_formula. A Ground_fact is an Atomic_formula that does not contain variables. A Ground_fact can be used to represent a true statement about the domain. The statement that it represents does not contain logical connectives.

EXAMPLE    Logical connectives may include: and, or, not, implication, bi-conditional.

EXPRESS specification:

*)
ENTITY Ground_fact
  SUBTYPE OF (Atomic_formula);
WHERE
  WR1: SIZEOF(QUERY(r <* SELF\Atomic_formula.terms | contains_variable(r))) = 0;
END_ENTITY;
(*

Formal propositions:

WR1: The terms inherited from Atomic_formula shall not contain variables.

4.3.16 Literal_conjunction   EXPRESS-GMapping table

A Literal_conjunction is a type of Simple_clause. The operator applied is the AND operator.

EXPRESS specification:

*)
ENTITY Literal_conjunction
  SUBTYPE OF (Simple_clause);
END_ENTITY;
(*

4.3.17 Literal_disjunction   EXPRESS-GMapping table

A Literal_disjunction is a type of Simple_clause. The operator applied is the OR operator.

EXPRESS specification:

*)
ENTITY Literal_disjunction
  SUBTYPE OF (Simple_clause);
END_ENTITY;
(*

4.3.18 Row_value   EXPRESS-GMapping table

A Row_value is a data type containing a sequenced arrangement of data values.

EXPRESS specification:

*)
ENTITY Row_value;
  values : LIST[0:?] OF term_select;
WHERE
  WR1: SIZEOF(QUERY(v <* SELF.values | contains_variable(v))) = 0;
  WR2: SIZEOF(QUERY(v <* SELF.values | 'PRODUCTION_RULE_ARM.ROW_VALUE' IN TYPEOF(v))) = 0;
END_ENTITY;
(*

Attribute definitions:

values: specifies a list of the term_select for the Row_value.

Formal propositions:

WR1: No member of values shall contain variable.

WR2: No member if values shall be of type Row_value.

4.3.19 Row_variable   EXPRESS-GMapping table

A Row_variable is a type of Abstract_variable with a size that may be more than one.

EXPRESS specification:

*)
ENTITY Row_variable
  SUBTYPE OF (Abstract_variable);
END_ENTITY;
(*

4.3.20 Rule_action   EXPRESS-GMapping table

A Rule_action is one of a Rule_adoption, a Rule_change_request, a Rule_creation, a Rule_expiration, a Rule_modification, a Rule_rejection, a Rule_request, a Rule_submission, or a Rule_supersedence. A Rule_action is an assertion that some action has occurred toward management of rules.

EXPRESS specification:

*)
ENTITY Rule_action
  ABSTRACT SUPERTYPE OF (ONEOF (Rule_submission,
                                Rule_adoption,
                                Rule_rejection,
                                Rule_supersedence,
                                Rule_creation,
                                Rule_expiration,
                                Rule_change_request,
                                Rule_request,
                                Rule_modification));
  subject_rule : Rule_version;
DERIVE
  subject_action_assignment : SET[0:?] OF Organization_or_person_in_organization_assignment := bag_to_set(QUERY(temp <* USEDIN ( SELF , 'PERSON_ORGANIZATION_ASSIGNMENT_ARM.' + 'ORGANIZATION_OR_PERSON_IN_ORGANIZATION_ASSIGNMENT.ITEMS' ) | ( temp.role = 'subject action assignment')));
UNIQUE
  UR1: subject_rule, subject_action_assignment;
WHERE
  WR1: EXISTS (subject_action_assignment) AND (SIZEOF(subject_action_assignment) = 1 );
END_ENTITY;
(*

Attribute definitions:

subject_rule: specifies the Rule_version as the version of a Rule_product for which some management Rule_action has occurred.

subject_action_assignment: specifies a role of the Organization_or_person_in_organization_assignment for the Rule_action.

Formal propositions:

UR1: The combination of subject_action_assignment and subject_rule shall be unique within a population of Rule_actions.

WR1: The subject_action_assignment shall exist and it's size shall be one.

4.3.21 Rule_adoption   EXPRESS-GMapping table

A Rule_adoption is a type of Rule_action that states a version of a Rule_product has been adopted.

EXPRESS specification:

*)
ENTITY Rule_adoption
  SUBTYPE OF (Rule_action);
END_ENTITY;
(*

4.3.22 Rule_change_request   EXPRESS-GMapping table

A Rule_change_request is a type of Rule_action that states a request has been made for modification to a version of a Rule_product. The change reason shall be provided as a part of the Rule_change_request.

EXPRESS specification:

*)
ENTITY Rule_change_request
  SUBTYPE OF (Rule_action);
  change_reason : STRING;
END_ENTITY;
(*

Attribute definitions:

change_reason: specifies the human-interpretable reason for requesting a Rule_change_request.

4.3.23 Rule_condition   EXPRESS-GMapping table

A Rule_condition is a type of Atomic_formula.

EXPRESS specification:

*)
ENTITY Rule_condition
  SUBTYPE OF (Atomic_formula);
  positive : BOOLEAN;
END_ENTITY;
(*

Attribute definitions:

positive: specifies a logical value.

4.3.24 Rule_creation   EXPRESS-GMapping table

A Rule_creation is a type of Rule_action that states that a version of a Rule_product has been created.

EXPRESS specification:

*)
ENTITY Rule_creation
  SUBTYPE OF (Rule_action);
END_ENTITY;
(*

4.3.25 Rule_definition   EXPRESS-GMapping table

A Rule_definition is a type of Rule_software_definition. A Rule_definition is for one version of a rule only. A Rule_definition is one of a Forward_chaining_rule or a Back_chaining_rule.

EXPRESS specification:

*)
ENTITY Rule_definition
  ABSTRACT SUPERTYPE OF (ONEOF (Forward_chaining_rule,
                                Back_chaining_rule))
  SUBTYPE OF (Rule_software_definition);
END_ENTITY;
(*

4.3.26 Rule_expiration   EXPRESS-GMapping table

A Rule_expiration is a type of Rule_action that states that a version of a Rule_product has expired.

EXPRESS specification:

*)
ENTITY Rule_expiration
  SUBTYPE OF (Rule_action);
  expiration_rationale : STRING;
END_ENTITY;
(*

Attribute definitions:

expiration_rationale: specifies the human-interpretable reason for the Rule_expiration.

4.3.27 Rule_justification   EXPRESS-GMapping table

A Rule_justification is a type of Rule_action.

EXPRESS specification:

*)
ENTITY Rule_justification
  SUBTYPE OF (Rule_action);
  justified_action : Rule_action;
  justification_rationale : STRING;
WHERE
  WR1: SELF <> justified_action;
END_ENTITY;
(*

Attribute definitions:

justified_action: specifies the Rule_action that results from the Rule_justification.

justification_rationale: specifies the text that describes the Rule_justification.

Formal propositions:

WR1: The justified_action shall not be this Rule_justification.

4.3.28 Rule_modification   EXPRESS-GMapping table

A Rule_modification is a type of Rule_action that states a version of a Rule_product is a result of a request to change an existing version of an Rule_product.

EXPRESS specification:

*)
ENTITY Rule_modification
  SUBTYPE OF (Rule_action);
  modification_rationale : Rule_change_request;
END_ENTITY;
(*

Attribute definitions:

modification_rationale: specifies a role of the Rule_change_request for the Rule_modification.

4.3.29 Rule_priority   EXPRESS-GMapping table

A Rule_priority is a statement that an Product that is in the rule category has a priority value. This value is used to order rules. The priority is applied to the rule through the Rule_definition. It is not the Rule_definition that has the priority.

EXPRESS specification:

*)
ENTITY Rule_priority;
  priority : INTEGER;
  prioritized_rule : Rule_definition;
WHERE
  WR1: priority >= 0;
END_ENTITY;
(*

Attribute definitions:

priority: specifies the integer for the priority number of the Rule_priority. The lowest numeric value shall have the highest priority.

prioritized_rule: specifies a role of the Rule_definition for the Rule_priority.

Formal propositions:

WR1: A number less than zero shall not be allowed.

4.3.30 Rule_product   EXPRESS-GMapping table

A Rule_product is a type of Software.

EXPRESS specification:

*)
ENTITY Rule_product
  SUBTYPE OF (Software);
END_ENTITY;
(*

4.3.31 Rule_rejection   EXPRESS-GMapping table

A Rule_rejection is a type of Rule_action that states a version of a Rule_product has been rejected. The rejection rationale shall be part of the Rule_rejection.

EXPRESS specification:

*)
ENTITY Rule_rejection
  SUBTYPE OF (Rule_action);
  rejection_reason : STRING;
END_ENTITY;
(*

Attribute definitions:

rejection_reason: specifies the human-interpretable explanation for the Rule_rejection.

4.3.32 Rule_request   EXPRESS-GMapping table

A Rule_request is a type of Rule_action that states a version of a Rule_product has been requested. The rationale for the version shall be part of the Rule_request.

EXPRESS specification:

*)
ENTITY Rule_request
  SUBTYPE OF (Rule_action);
END_ENTITY;
(*

4.3.33 Rule_set   EXPRESS-GMapping table

A Rule_set is a type of Rule_software_definition. A Rule_set is an association among Rule_priority.

NOTE    The purpose for a Rule_set is renamed from the initial_context attribute inherited from Product_view_definition.

EXPRESS specification:

*)
ENTITY Rule_set
  SUBTYPE OF (Rule_software_definition);
  conflict_resolution_strategy : OPTIONAL STRING;
  rule_member : SET[1:?] OF Rule_priority;
DERIVE
  engine : SET[1:1] OF Document_definition := get_document_definition(SELF, 'engine', 'SPECIFICATION_DOCUMENT_ARM.LANGUAGE_REFERENCE_MANUAL');
INVERSE
  purpose : Identification_assignment FOR items;
WHERE
  WR1: purpose.role = 'purpose';
END_ENTITY;
(*

Attribute definitions:

conflict_resolution_strategy: specifies the text that describes a conflict resolution strategy for the Rule_set. The value of this attribute need not be specified.

rule_member: specifies a role of the Rule_priority for the Rule_set. There shall be one or more Rule_priority for the Rule_set.

engine: specifies a role of the Language_reference_manual for the Rule_set.

purpose: an inverse relationship that specifies that the existence of the Rule_set is dependent on the existence of the Identification_assignment that specifies the Rule_set as its items.

Formal propositions:

WR1: The role of the purpose shall be 'purpose'.

4.3.34 Rule_set_group   EXPRESS-GMapping table

A Rule_set_group is a type of Rule_software_definition. A Rule_set_group shall have at least two Rule_sets.

EXPRESS specification:

*)
ENTITY Rule_set_group
  SUBTYPE OF (Rule_software_definition);
  elements : SET[2:?] OF Rule_set;
END_ENTITY;
(*

Attribute definitions:

elements: specifies the Rule_set for the Rule_set_group. There may be more than two Rule_set for the Rule_set_group.

4.3.35 Rule_software_definition   EXPRESS-GMapping table

A Rule_software_definition is a type of Software_definition that encodes instructions for a rule. A Rule_software_definition may be one of a Rule_definition, a Rule_set_group or a Rule_set.

EXPRESS specification:

*)
ENTITY Rule_software_definition
  SUPERTYPE OF (ONEOF (Rule_definition,
                       Rule_set_group,
                       Rule_set))
  SUBTYPE OF (Software_definition);
  SELF\Product_view_definition.defined_version : Rule_version;
END_ENTITY;
(*

Attribute definitions:

defined_version: an attribute inherited from the Product_view_definition shall be redeclared as the Rule_version for the Rule_software_definition.

4.3.36 Rule_submission   EXPRESS-GMapping table

A Rule_submission is a type of Rule_action stating that a version of a Rule_product has been submitted.

EXPRESS specification:

*)
ENTITY Rule_submission
  SUBTYPE OF (Rule_action);
  submission_rationale : STRING;
END_ENTITY;
(*

Attribute definitions:

submission_rationale: specifies the text that describes the rationale for the Rule_submission.

4.3.37 Rule_supersedence   EXPRESS-GMapping table

A Rule_supersedence is a type of Rule_action stating that one Rule_version has been superseded by another Rule_version. Both shall be versions of the same Rule_product.

EXPRESS specification:

*)
ENTITY Rule_supersedence
  SUBTYPE OF (Rule_action);
  superseded_rule : Rule_version;
END_ENTITY;
(*

Attribute definitions:

superseded_rule: specifies the Rule_version that has been superseded for the Rule_supersedence.

4.3.38 Rule_version   EXPRESS-GMapping table

A Rule_version is a type of Software_version. A Rule_version is the management of the assignment of Rule_definition to Rule_product. A Rule_product may evolve with usage for any number of reasons.

EXPRESS specification:

*)
ENTITY Rule_version
  SUBTYPE OF (Software_version);
  SELF\Product_version.of_product : Rule_product;
INVERSE
  management_action : SET[1:?] OF Rule_action FOR subject_rule;
  product_definition : SET[1:?] OF Rule_software_definition FOR defined_version;
END_ENTITY;
(*

Attribute definitions:

of_product: an attribute inherited from the Product_version shall be redeclared as the Rule_product for the Rule_version.

management_action: an inverse relationship that specifies that the existence of the Rule_version is dependent on the existence of the Rule_action that specifies the Rule_version as its subject_rule. There shall be one or more Rule_actions for a Rule_version.

product_definition: an inverse relationship that specifies that the existence of the Rule_version is dependent on the existence of the Rule_software_definition that specifies the Rule_version as its defined_version. There shall be one or more Rule_software_definitions for a Rule_version.

4.3.39 Scalar_variable   EXPRESS-GMapping table

A Scalar_variable is a type of Abstract_variable with a size of one.

EXPRESS specification:

*)
ENTITY Scalar_variable
  SUBTYPE OF (Abstract_variable);
END_ENTITY;
(*

4.3.40 Simple_clause   EXPRESS-GMapping table

A Simple_clause is one of a Literal_conjunction or a Literal_disjunction. A Simple_clause is the result of applying the same operator to all the formulas. It is a syntactic construct used in the construction of rules, and may correspond to a structure used in the inference mechanism.

EXAMPLE    A clause in clausal logic may be represented by a Simple_clause.

EXPRESS specification:

*)
ENTITY Simple_clause
  ABSTRACT SUPERTYPE OF (ONEOF (Literal_conjunction,
                                Literal_disjunction));
  formulas : LIST[1:?] OF Rule_condition;
END_ENTITY;
(*

Attribute definitions:

formulas: specifies the role of the Rule_condition for the Simple_clause. There shall exist one or more Rule_conditions for the Simple_clause.

4.3.41 Symbol   EXPRESS-GMapping table

A Symbol is a type of Representation_item used by the rules system to name the things on which assertions are made.

EXAMPLE    EXPRESS entity instances could be represented by symbols. An entity instance encoded using the clear text encoding (ISO 10303-21) #34=POINT(1.0,2.0,1.0); might be represented in the production system as a Symbol with name '#34'.

EXPRESS specification:

*)
ENTITY Symbol
  SUBTYPE OF (Representation_item);
UNIQUE
  UR1: SELF\Representation_item.name;
END_ENTITY;
(*

Formal propositions:

UR1: The name shall be unique within a population of Symbols.

4.4 ARM function definitions

This subclause specifies the ARM functions for this module. The ARM functions and definitions are specified below.

4.4.1 contains_variable

The contains_variable function checks if the specified term_select contains an Abstract_variable.

EXPRESS specification:

*)
FUNCTION contains_variable (x : term_select) : BOOLEAN;
IF ('PRODUCTION_RULE_ARM.ABSTRACT_VARIABLE' IN TYPEOF(x)) THEN RETURN (TRUE);
      ELSE IF (('PRODUCTION_RULE_ARM.FUNC' IN TYPEOF(X)) AND
              (SIZEOF(QUERY(y <* x.terms | contains_variable(y))) > 0)) 
              THEN RETURN (TRUE);
              ELSE RETURN (FALSE);
           END_IF;
  END_IF;
END_FUNCTION;
(*

Argument definitions:

x: the specified term_select.

4.4.2 local_vars_aux

The local_vars_aux function retrieves the set of local variables for specified entity instance.

EXPRESS specification:

*)
FUNCTION local_vars_aux (thing : GENERIC; accum : SET[0:?] OF Scalar_variable) : SET[0:?] OF Scalar_variable;
LOCAL i,j,k : INTEGER; END_LOCAL;
  IF (('PRODUCTION_RULE_ARM.ABSTRACT_VARIABLE' IN TYPEOF(thing)) AND 
      ('PRODUCTION_RULE_ARM.RULE_DEFINITION' IN (TYPEOF(thing.scope))))
   THEN accum := accum + thing;
   ELSE IF ('PRODUCTION_RULE_ARM.RULE_CONDITION' IN TYPEOF(thing))
        THEN REPEAT i := 1 TO HIINDEX(thing\Atomic_formula.terms);
                accum := local_vars_aux(thing\Atomic_formula.terms[i],accum);
             END_REPEAT;
        ELSE IF ('PRODUCTION_RULE_ARM.SIMPLE_CLAUSE' IN TYPEOF(thing))
             THEN REPEAT j := 1 TO HIINDEX(thing.formulas);
                        accum := local_vars_aux(thing.formulas[j],accum);
                  END_REPEAT;
             ELSE IF ('PRODUCTION_RULE_ARM.COMPLEX_CLAUSE' IN TYPEOF(thing))
                  THEN REPEAT k := 1 TO HIINDEX(thing.clauses);
                        accum := local_vars_aux(thing.clauses[k],accum);
                       END_REPEAT;
                  END_IF;
             END_IF;
        END_IF;
  END_IF;
  RETURN(accum);
END_FUNCTION;
(*

Argument definitions:

thing: specified entity instance.

accum: the specified set of Scalar_variables.

4.4.3 local_vars_of

The local_vars_of function retrieves the set of local variables for specified entity instance.

EXPRESS specification:

*)
FUNCTION local_vars_of (thing : GENERIC) : SET[0:?] OF Scalar_variable;
LOCAL
    accum : SET [0:?] OF Scalar_variable := [];
  END_LOCAL;
  RETURN (local_vars_aux(thing, accum));
END_FUNCTION;
(*

Argument definitions:

thing: specified entity instance.

4.5 ARM rule definitions

This subclause specifies the ARM rules for this module. The ARM rules and definitions are specified below.

4.5.1 max_one_entity_prefix

The max_one_entity_prefix rule constrains the population of Enum_reference_prefix entity instances, so that there shall be no more than one instance of that type in whole population.

EXPRESS specification:

*)
RULE max_one_entity_prefix FOR
(Enum_reference_prefix);
WHERE
  WR1: SIZEOF(QUERY(x <* Enum_reference_prefix | TRUE)) <= 1;
END_RULE;
(*

Argument definitions:

Enum_reference_prefix : the set of all instances of Enum_reference_prefix.

Formal propositions:

WR1: There shall be no more than one instance of type Enum_reference_prefix in population of entity instances.

4.5.2 rule_software_definition_constraint

The rule rule_software_definition_constraint constrains the use of Rule_version as defined_version to Rule_software_definition only.

EXPRESS specification:

*)
RULE rule_software_definition_constraint FOR
(Product_view_definition);
WHERE
  WR1: SIZEOF (QUERY ( pvd <* Product_view_definition | ( NOT('PRODUCTION_RULE_ARM.' + 'RULE_SOFTWARE_DEFINITION' IN TYPEOF(pvd))) AND ('PRODUCTION_RULE_ARM.' + 'RULE_VERSION' IN TYPEOF (pvd . defined_version)))) = 0;
END_RULE;
(*

Argument definitions:

Product_view_definition : the set of all instances of Product_view_definition.

Formal propositions:

WR1: There shall not be any instance of Product_view_definition that refers Rule_version as defined_version and is not an instance of Rule_software_definition.

4.5.3 rule_version_constraint

The rule rule_version_constraint constrains the use of Rule_product as of_product to Rule_version only.

EXPRESS specification:

*)
RULE rule_version_constraint FOR
(Product_version);
WHERE
  WR1: SIZEOF (QUERY(pv <* Product_version | (NOT('PRODUCTION_RULE_ARM.' + 'RULE_VERSION' IN TYPEOF(pv))) AND ( 'PRODUCTION_RULE_ARM.' + 'RULE_PRODUCT' IN TYPEOF(pv.of_product)))) = 0;
END_RULE;
(*

Argument definitions:

Product_version : the set of all instances of Product_version.

Formal propositions:

WR1: There shall not be any instance of Product_version that refers Rule_product as of_product and is not an instance of Rule_version.



*)
END_SCHEMA;  -- Production_rule_arm
(*


© ISO 2019 — All rights reserved