LOCAL
result : BOOLEAN;
END_LOCAL;
IF ('AP233_SYSTEMS_ENGINEERING_ARM_LF.SIMPLE_GENERIC_EXPRESSION' IN TYPEOF(arg1)) THEN
RETURN (TRUE);
END_IF;
IF arg1 IN arg2 THEN
RETURN (FALSE);
END_IF;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.UNARY_GENERIC_EXPRESSION' IN TYPEOF(arg1) THEN
RETURN (Acyclic(arg1\Unary_generic_expression.operand, arg2 + [arg1]));
END_IF;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.BINARY_GENERIC_EXPRESSION' IN TYPEOF(arg1) THEN
RETURN (Acyclic(arg1\Binary_generic_expression.operands[1], arg2 + [arg1]) AND Acyclic(arg1\Binary_generic_expression.operands[2], arg2 + [arg1]));
END_IF;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.MULTIPLE_ARITY_GENERIC_EXPRESSION' IN TYPEOF(arg1) THEN
result := TRUE;
REPEAT i := 1 TO SIZEOF(arg1\Multiple_arity_generic_expression.operands);
result := result AND Acyclic(arg1\Multiple_arity_generic_expression.operands[i], arg2 + [arg1]);
END_REPEAT;
RETURN (result);
END_IF;
LOCAL
x : SET OF Representation_relationship;
END_LOCAL;
IF relation.rep_1 IN relatives THEN
RETURN (FALSE);
END_IF;
x := QUERY(r <* bag_to_set(USEDIN(relation.rep_1, 'AP233_SYSTEMS_ENGINEERING_ARM_LF.' + 'REPRESENTATION_RELATIONSHIP.' + 'REP_2')) | specific_relation IN TYPEOF(r));
REPEAT i := 1 TO HIINDEX(x);
IF NOT acyclic_representation_relationship(x[i], relatives + relation.rep_1, specific_relation) THEN
RETURN (FALSE);
END_IF;
END_REPEAT;
RETURN (TRUE);
LOCAL
the_set : SET OF GENERIC:intype := [];
i : INTEGER;
END_LOCAL;
IF SIZEOF(the_bag) > 0 THEN
REPEAT i := 1 TO HIINDEX(the_bag);
the_set := the_set + the_bag[i];
END_REPEAT;
END_IF;
RETURN (the_set);
LOCAL
result : SET OF STRING;
classifications : BAG OF Classification_assignment;
END_LOCAL;
result := TYPEOF(the_instance);
classifications := USEDIN(the_instance, 'AP233_SYSTEMS_ENGINEERING_ARM_LF.CLASSIFICATION_ASSIGNMENT.ITEMS');
REPEAT i := LOINDEX(classifications) TO HIINDEX(classifications);
result := result + classifications[i].assigned_class.id;
END_REPEAT;
RETURN (result);
RETURN (Acyclic(arg, []));
LOCAL
i : INTEGER;
END_LOCAL;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.INT_LITERAL' IN TYPEOF(arg) THEN
RETURN (TRUE);
END_IF;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.REAL_LITERAL' IN TYPEOF(arg) THEN
RETURN (FALSE);
END_IF;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.INT_NUMERIC_VARIABLE' IN TYPEOF(arg) THEN
RETURN (TRUE);
END_IF;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.REAL_NUMERIC_VARIABLE' IN TYPEOF(arg) THEN
RETURN (FALSE);
END_IF;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.ABS_FUNCTION' IN TYPEOF(arg) THEN
RETURN (Is_int_expr(arg\Unary_numeric_expression.operand));
END_IF;
IF 'NUMERIC_FUNCTION.MINUS_FUNCTION' IN TYPEOF(arg) THEN
RETURN (Is_int_expr(arg\Unary_numeric_expression.operand));
END_IF;
IF ('AP233_SYSTEMS_ENGINEERING_ARM_LF.SIN_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.COS_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.TAN_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.ASIN_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.ACOS_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.Atan_function' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.EXP_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.LOG_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.LOG2_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.LOG10_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.SQUARE_ROOT_FUNCTION' IN TYPEOF(arg)) THEN
RETURN (FALSE);
END_IF;
IF ('AP233_SYSTEMS_ENGINEERING_ARM_LF.PLUS_EXPRESSION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.MULT_EXPRESSION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.MAXIMUM_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.MINIMUM_FUNCTION' IN TYPEOF(arg)) THEN
REPEAT i := 1 TO SIZEOF(arg\Multiple_arity_numeric_expression.operands);
IF NOT Is_int_expr(arg\Multiple_arity_numeric_expression.operands[i]) THEN
RETURN (FALSE);
END_IF;
END_REPEAT;
RETURN (TRUE);
END_IF;
IF ('AP233_SYSTEMS_ENGINEERING_ARM_LF.MINUS_EXPRESSION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.POWER_EXPRESSION' IN TYPEOF(arg)) THEN
RETURN (Is_int_expr(arg\Binary_numeric_expression.operands[1]) AND Is_int_expr(arg\Binary_numeric_expression.operands[2]));
END_IF;
IF ('AP233_SYSTEMS_ENGINEERING_ARM_LF.DIV_EXPRESSION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.MOD_EXPRESSION' IN TYPEOF(arg)) THEN
RETURN (TRUE);
END_IF;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.SLASH_EXPRESSION' IN TYPEOF(arg) THEN
RETURN (FALSE);
END_IF;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.LENGTH_FUNCTION' IN TYPEOF(arg) THEN
RETURN (TRUE);
END_IF;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.VALUE_FUNCTION' IN TYPEOF(arg) THEN
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.INT_VALUE_FUNCTION' IN TYPEOF(arg) THEN
RETURN (TRUE);
ELSE
RETURN (FALSE);
END_IF;
END_IF;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.INTEGER_DEFINED_FUNCTION' IN TYPEOF(arg) THEN
RETURN (TRUE);
END_IF;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.REAL_DEFINED_FUNCTION' IN TYPEOF(arg) THEN
RETURN (FALSE);
END_IF;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.BOOLEAN_DEFINED_FUNCTION' IN TYPEOF(arg) THEN
RETURN (FALSE);
END_IF;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.STRING_DEFINED_FUNCTION' IN TYPEOF(arg) THEN
RETURN (FALSE);
END_IF;
RETURN (FALSE);
LOCAL
i : INTEGER;
END_LOCAL;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.SIMPLE_NUMERIC_EXPRESSION' IN TYPEOF(arg) THEN
RETURN (TRUE);
END_IF;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.SQL_MAPPABLE_DEFINED_FUNCTION' IN TYPEOF(arg) THEN
RETURN (TRUE);
END_IF;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.MINUS_FUNCTION' IN TYPEOF(arg) THEN
RETURN (Is_sql_mappable(arg\Unary_numeric_expression.operand));
END_IF;
IF ('AP233_SYSTEMS_ENGINEERING_ARM_LF.ABS_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.SIN_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.COS_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.TAN_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.ASIN_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.ACOS_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.ATAN_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.EXP_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.LOG_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.LOG2_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.LOG10_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.SQUARE_ROOT_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.VALUE_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.LENGTH_FUNCTION' IN TYPEOF(arg)) THEN
RETURN (FALSE);
END_IF;
IF ('AP233_SYSTEMS_ENGINEERING_ARM_LF.PLUS_EXPRESSION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.MULT_EXPRESSION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.MAXIMUM_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.MAXIMUM_FUNCTION' IN TYPEOF(arg)) THEN
REPEAT i := 1 TO SIZEOF(arg\Multiple_arity_numeric_expression.operands);
IF NOT Is_sql_mappable(arg\Multiple_arity_numeric_expression.operands[i]) THEN
RETURN (FALSE);
END_IF;
END_REPEAT;
RETURN (TRUE);
END_IF;
IF ('AP233_SYSTEMS_ENGINEERING_ARM_LF.MINUS_EXPRESSION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.SLASH_EXPRESSION' IN TYPEOF(arg)) THEN
RETURN (Is_sql_mappable(arg\Binary_numeric_expression.operands[1]) AND Is_sql_mappable(arg\Binary_numeric_expression.operands[2]));
END_IF;
IF ('AP233_SYSTEMS_ENGINEERING_ARM_LF.DIV_EXPRESSION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.MOD_EXPRESSION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.POWER_EXPRESSION' IN TYPEOF(arg)) THEN
RETURN (FALSE);
END_IF;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.SIMPLE_BOOLEAN_EXPRESSION' IN TYPEOF(arg) THEN
RETURN (TRUE);
END_IF;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.NOT_EXPRESSION' IN TYPEOF(arg) THEN
RETURN (Is_sql_mappable(arg\Unary_generic_expression.operand));
END_IF;
IF ('AP233_SYSTEMS_ENGINEERING_ARM_LF.ODD_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.XOR_EXPRESSION' IN TYPEOF(arg)) THEN
RETURN (FALSE);
END_IF;
IF ('AP233_SYSTEMS_ENGINEERING_ARM_LF.AND_EXPRESSION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.OR_EXPRESSION' IN TYPEOF(arg)) THEN
REPEAT i := 1 TO SIZEOF(arg\Multiple_arity_boolean_expression.operands);
IF NOT Is_sql_mappable(arg\Multiple_arity_boolean_expression.operands[i]) THEN
RETURN (FALSE);
END_IF;
END_REPEAT;
RETURN (TRUE);
END_IF;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.EQUALS_EXPRESSION' IN TYPEOF(arg) THEN
RETURN (Is_sql_mappable(arg\Binary_generic_expression.operands[1]) AND Is_sql_mappable(arg\Binary_generic_expression.operands[2]));
END_IF;
IF ('AP233_SYSTEMS_ENGINEERING_ARM_LF.COMPARISON_EQUAL' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.COMPARISON_GREATER' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.COMPARISON_GREATER_EQUAL' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.COMPARISON_LESS' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.COMPARISON_LESS_EQUAL' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.COMPARISON_NOT_EQUAL' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.LIKE_EXPRESSION' IN TYPEOF(arg)) THEN
RETURN (Is_sql_mappable(arg\Comparison_expression.operands[1]) AND Is_sql_mappable(arg\Comparison_expression.operands[2]));
END_IF;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.INTERVAL_EXPRESSION' IN TYPEOF(arg) THEN
RETURN (Is_sql_mappable(arg\Interval_expression.interval_low) AND Is_sql_mappable(arg\Interval_expression.interval_high) AND Is_sql_mappable(arg\Interval_expression.interval_item));
END_IF;
IF ('AP233_SYSTEMS_ENGINEERING_ARM_LF.NUMERIC_DEFINED_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.BOOLEAN_DEFINED_FUNCTION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.STRING_DEFINED_FUNCTION' IN TYPEOF(arg)) THEN
RETURN (FALSE);
END_IF;
IF 'AP233_SYSTEMS_ENGINEERING_ARM_LF.SIMPLE_STRING_EXPRESSION' IN TYPEOF(arg) THEN
RETURN (TRUE);
END_IF;
IF ('AP233_SYSTEMS_ENGINEERING_ARM_LF.INDEX_EXPRESSION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.SUBSTRING_EXPRESSION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.CONCAT_EXPRESSION' IN TYPEOF(arg)) OR ('AP233_SYSTEMS_ENGINEERING_ARM_LF.FORMAT_FUNCTION' IN TYPEOF(arg)) THEN
RETURN (FALSE);
END_IF;
RETURN (FALSE);
IF ('AP233_SYSTEMS_ENGINEERING_ARM_LF.VIEW_DEFINITION_USAGE' IN TYPEOF(input\Item_shape.described_element)) THEN
RETURN (input\Item_shape.described_element\View_definition_relationship.related_view);
END_IF;
IF ('AP233_SYSTEMS_ENGINEERING_ARM_LF.PRODUCT_OCCURRENCE_DEFINITION_RELATIONSHIP' IN TYPEOF(input\Item_shape.described_element)) THEN
RETURN (input\Item_shape.described_element\Product_occurrence_definition_relationship.related_view);
END_IF;
RETURN (?);