Expressions

Overview

Expressions in BMM are used to specify class invariants, routine pre- and post-conditions, and may be used more generally in other contexts requiring expressions. They are defined by a set of classes prefixed by 'EL', indicating 'expression language'. The BMM expression meta-model is based on the following taxonomy of expression entities:

bmm expression taxonomy
Figure 1. Expression Taxonomy

The meta-types defined in this part of the BMM model may be understood as the types of entities in an abstract syntax tree (AST) generated from expression parsing. Conversely, one or more expression syntaxes may be parsed into a tree based on the model described here. Note however, that whatever the variation in surface syntax, all such syntaxes parsed this way ultimately have the semantics defined by the BMM EL meta-model described here. This is true even for expressions written in a syntax whose published semantics are in fact different, e.g. a well-known programming language.

The key abstract meta-types shown in the taxonomy are Simple (EL_SIMPLE), Complex (EL_COMPLEX) and under Simple, Terminal (EL_TERMINAL) and Predicate (EL_PREDICATE). The first split between Simple and Complex distinguishes 'simple' expressions that are either Terminals or classical operator trees of Terminals, from 'complex' constructs, such as those used to represent multi-way decision structures. The split between Terminal and Predicate distinguishes 'real' expression entities (the former), and meta-level predicates having a Terminal expression as a target. The Predicate meta-type is the parent of 'existence' and also path-based meta-expressions targetting instance entities (such as defined by Xpath etc).

The UML model of the BMM expression package, consisting of mostly direct equivalents of the taxonomy classes above, is shown below.

LANG bmm.expression
Figure 2. bmm.expression Package

Most EL classes are descendants of the class EL_EXPRESSION, which is characterised by the feature eval_type(). This is the BMM meta-type of the result type of the expression entity when used in an expression; for literals, this is the inferred type; for object references (including function calls), this is the same as the declared type, and for agents it is the meta-type BMM_SIGNATURE.

Terminal Entities

The underlying semantic concept of expressions in BMM, as for any language, is of a construct that refers to instantiated model entities and which generates values when evaluated at execution time. The notion of a reference is fundamentally different from a definition, which is the concern of the rest of the meta-model, in that it operates at the instance level rather than at the type level. The primitive elements of a BMM expression may take the form of any of the following:

  • literal values: inline-generated values created without reference to a model instance, but which must be instances of types defined by the model (EL_LITERAL);

  • model-based references: (EL_SCOPED_REF)

    • references to instances: symbolic references to instance values stored (as properties or variables) within the current or another object scope (EL_INSTANTIABLE_REF<T>);

    • calls to functions: appropriately constructed calls to functions of the types that define instances (EL_FUNCTION_CALL);

    • generation of agents: a special kind of reference to any routine of a model type that generates a delayed routine call object (EL_AGENT).

Generally speaking, the latter two categories - function calls and delayed routine calls - will involve literal values and instance references where call arguments are stated. Consequently, the value generated by an expression is founded upon literal values and instance references. To be valid, any model-based reference must have a scoping object, which is one of:

  • the 'current' object, within which the expression is situated and being evaluated;

  • another object, which may be designated via:

    • a specified scoping object, usually achieved through 'dot-notation' in most languages;

    • an anonymous object representing a type;

  • a type, for which no instance is created, on which argumentless function calls and constants may be accessed.

The notion of scoping object is supported via the attribute scope defined in EL_SCOPED_REF.

In addition, one other category of primitive expression element is supported:

  • predicates: Boolean-generating expression elements formed by built-in predicates applied to any of the other value-generating expression elements.

The model described in this section supports these primitive elements via descendants of the EL_TERMINAL meta-type. For ease of comprehension, the following UML diagram provides an annotated view of these meta-types.

LANG bmm.expression type hierarchy
Figure 3. bmm.expression Package - Type hierarchy

Literals

A literal value may appear in an expression as a separate entity within an operator expression, as well as a functional call or agent parameter. The literal values that may be used are either instances of the openEHR Foundation Types in ODIN format, or a complex object instance in structured serial format, specified by BMM_SERIAL_FORMALISM if not a primitive type.

Tuples

Although rarely useful in class definitions, a Tuple of any degree may be formed from any combination of other EL expressions and used on its own as an expression terminal element. The main use for this construct is to express a literal tuple, i.e. one whose constituents consist only of proper literal values.

For more general uses of BMM Expressions, tuple instances are the basis of representing ad hoc query results which have a formal type such as List<[Ta, Tb, Tc]>, where [Ta, Tb, Tc] represents a tuple of three types.

Feature References

In BMM, a feature reference is any symbolic reference to a class feature or variable that resolves to an object at evaluation time. This includes all referenceable entities within classes except procedures, which have no return value. Concretely, a feature reference takes the form of one of:

  • a property name, e.g. name;

  • a constant name, e.g. pi;

  • a variable or parameter name, e.g. a_name, call_name;

  • a function call.

Function calls are described in detail in the following section.

Self Reference

A special meta-type, EL_SELF_REF is provided for references to the current scoping object for any expressions in which it appears. An instance of this meta-class corresponds to references such as 'this' or 'self' found in object-oriented programming languages.

Type Reference

A special meta-type, EL_TYPE_REF is provided to refer to a type as an object. This is exclusively used as a convenient way (common in many programming languages) of accessing class features that do not depend on instance properties (i.e. 'constant', 'enum', and 'static' members in C-based languages) without having to explicitly create an instance. As an expression, a type reference will normally only appear as a qualifier of a feature reference, using syntax such as T.feature, or with arguments, T.function (args…​).

A class feature is defined as one that is:

  • a constant;

  • an enumeration literal;

  • a function that does not reference any class property or make any call that does, in its body, pre_conditions or post_conditions.

The last category typically includes 'external' functions that are wrappers for calls to the operating system or other external resource that maintains its own state independently.

Since a type reference can be made without instantiation, it may be made to an abstract class as well as a concrete one. This facilitates the use of so-called 'utility' classes containing groups of useful functions e.g. for handling specific kinds of strings.

Examples of type references as qualifiers of class features include the following:

  • site.current_time to access the class function current_time defined on the class (or interface) Env;

  • colours.red, to access an enumeration literal;

  • version_utils.version_higher ("1.5.40", "11.5.4").

A type reference may also be used on its own, such as in the following type test, which is the EL equivalent of programming language operators like type_of().

  • admission_dates.type = {Interval<Iso8601_date_time>}.

Agents

An agent is the BMM term for a delayed routine call, and has the meta-type EL_AGENT, which in turn has as its formal evaluation type (eval_type) is the meta-type BMM_SIGNATURE. It usually appears as a standalone expression, or else a parameter within another agent or function call. Agents are described in detail in the following section.

Predicates

Predicates in BMM are Boolean-returning terminal expressions taking one feature reference operand, and are represented by the meta-type EL_PREDICATE. Predicates conceptually apply to data instance structures and may be understood as queries on data. Any number of specific predicates might be added as extensions via inheritance. In particular, Xpath-style predicates could be supported by addition of meta-types descending from EL_PREDICATE.

The following predicates are pre-defined.

Attached (x)

The attached predicate is used to test for an instance reference (including a function call result) being Void. It may be used in expressions such as the following class invariant.

class SmartRef

feature

    property url: Url;
    property value: Base64String;

    invariant
        Validity: attached(url) or attached(value)

Defined (x)

The defined predicate is used to test whether an instance that is mapped to an external data access method exists in the data context (regardless of its value there).

TBD: this might be replaced by another approach.

Constrained Expressions

In some cases there is a need to define a constrained form of an existing expression meta-type, such that the constraint can be conveniently asserted in other contexts. The meta-class EL_CONSTRAINED is provided for this purpose. It has an attribute base_expression referring to the underlying expression meta-type to be constrained. Any descendant of EL_CONSTRAINED may then be defined in order to add specific type or other constraints. One commonly used meta-type, EL_BOOLEAN_EXPRESSION, is defined, which constrains the base expression to being one whose evaluation type (eval_type) is Boolean.

Operator Expressions

BMM contains meta-types representing operators, but assumes that all operators are surface aliases for functions defined on some class. For this reason, an occurrence of an operator within an expression, represented an instance of a descendant of EL_OPERATOR, contains the attribute definition to refer to the corresponding function definition. This has to be inferred from the types of its operands. Consequently, 'operator expressions' as commonly understood are simply function calls (often nested) in BMM. The following example illustrates the general meta-model of expressions, using a typical use of expression, the class invariant.

class Account

feature
    balance: Decimal
    overdraft_limit: Decimal

invariant
    balance + overdraft_limit > 0

The expression balance + overdraft_limit > 0 makes use of two operators + and `>, which are really functions defined on the type Decimal, as follows.

class Decimal

feature
    greater_than (other: Decimal): Boolean
        alias '>'

    addition: (other: Decimal): Decimal
        alias '+'

A parser processing this expression would produce the result shown below, assuming that the BMM model containing these classes had already been instantiated.

bmm expression property ref
Figure 4. Instantiated Operator Expression

Below, we consider a number of examples illustrating expressions containing the various kinds of terminal reference, based on the following assumed declarations.

    feature -- Definitions

        Fast_resting_heart_rate: Real = 100;
        Atrial_fibrillation_heart_rate: Real = 120;
        Erratic: Terminology_code = {
            "terminology_id": "snomed_ct",
            "code_string": "286761003"
        }
        Blood_pressure_units: String = "mm[Hg]";

    feature -- Accessors

        heart_rate: Real;
        heart_rhythm: Terminology_code;
        bp_samples: List<Quantity>;
        patient: Patient;

The first example is a comparison of a property value to a value, where the >= operator maps to the function Real.greater_than_or_equal()

    heart_rate >= 80

The following shows the comparison of a property value with a constant, where the >= operator maps to the function Real.greater_than_or_equal()

    heart_rate >= Fast_resting_heart_rate

The following is a logical condition, where the = operator maps to a function such as Terminology_code.equal(); and maps to Boolean.and(); and >= maps to Real.greater_than_or_equal().

    heart_rhythm = Erratic and heart_rate >= Atrial_fibrillation_heart_rate

The following is the same logical condition, but with the use of object scope specified with 'dot notation', here 'patient.'.

    patient.heart_rhythm = Erratic and patient.heart_rate >= Atrial_fibrillation_heart_rate

The following shows a function call whose argument is an expression.

    date_of_birth.earlier ({Env}.current_date - P10Y)

The following shows the use of an inline agent as an argument to the function List.for_all().

    bp_samples.for_all (
        agent (a_quantity: Quantity) {
            a_quantity.units.is_equal (Blood_pressure_units);
        }
    );

Decision Tables

The BMM expression package contains the meta-class EL_DECISION_TABLE that defines an abstract decision table construct, consisting of an ordered set of items, each of type EL_DECISION_BRANCH, and having a result of any expression type (including another decision table). Two concrete subtypes of each of these abstract meta-types are used to represent two common kinds of decision table:

  • an if/then/elseif/else condition chain (meta-classes EL_CONDITION_CHAIN and EL_CONDITIONAL_EXPRESSION); and

  • a case statement style table (meta-classes EL_CASE_TABLE and EL_CASE), whose conditions are value intervals against which the table’s input value expression is evaluated to determine the result.

The else branch will be used to provide the result expression in the case that all other branches fail, guaranteeing a result.

EL_DECISION_TABLE and its descendants are also kind of expression, enabling them to be used as value-returning entities in certain other expression contexts, including inside other decision tables.

The following UML illustrates.

LANG bmm.expression decision table
Figure 5. bmm.expression Decision Table

The logic of a EL_CONDITION_CHAIN is the same as an if/then/elseif/else chain in procedural programming, except that instead of assignment statements on each branch, pure result expressions are used. This enables a more sophisticated syntactic rendering, resembling a table, such as the following:

    molecular_subtype: Terminology_term
        Result := choice in
            =========================================================
            er_positive and
            her2_negative and
            not ki67.in_range ([high]):    [luminal_A],
            ---------------------------------------------------------
            er_positive and
            her2_negative and
            ki67.in_range ([high]):        [luminal_B_HER2_negative],
            ---------------------------------------------------------
            er_positive and
            her2_positive:                 [luminal_B_HER2_positive],
            ---------------------------------------------------------
            er_negative and
            pr_negative and
            her2_positive and
            ki67.in_range ([high]):        [HER2],
            ---------------------------------------------------------
            er_negative and
            pr_negative and
            her2_negative and
            ki67.in_range ([high]):        [triple_negative],
            ---------------------------------------------------------
            *:                             [none]
            =========================================================
        ;

The above is a function that computes the molecular subtype of breast cancer using a decision table whose branches are based on a number of input variables that appear in expressions down the left-hand side and which returns a Terminology_code instance (the notation [identifier] is represents a literal Terminology_code instance).

An example of EL_CASE_TABLE is shown below. Here, two case tables are used, with each generating a numeric result based on the values of the platelets and gfr variables respectively.

    cyclophosphamide_dose: Quantity
        Result := cyclophosphamide_dose_per_m2 * BSA.bsa_m2
            * case platelets.range in
                ===================
                [normal]:      1,
                [low]:         0.75
                ===================
            * case gfr.range in
                ===================
                [normal]:      1,
                [low]:         0.75,
                [very_low]:    0.5
                ===================
            ;

Usage in BMM Models

Expressions as used in BMM models to express class invariants and routine pre- and post-conditions are always in the form of an BMM_ASSERTION, i.e. a tagged Boolean-returning EL_EXPRESSION.

Simple Assertions

Simple assertions may be formed from common operators and operands, including the usual logical arithmetic and comparison operators, as well as any operators relating to specific data types. Normally the top-level operator in the Expression graph is a logical or relational operator. Since all operators are mapped to functions defined on types, there are no 'floating' or 'built-in' operators as such.

Existential and Universal Quantifier Invariants

A common kind of expression used in class invariants operates over collections and uses the existential and universal quantifier operators, i.e. ∃ and ∀, from predicate logic. A typical expression to use within a class invariant is shown below in an abstract syntax.

class PersonName
property items: String[1..*];

invariant
    ∀ nameItem: items | not nameItem.isEmpty()

A different syntax might express it as follows.

    invariant
        for nameItem in items all
            not nameItem.isEmpty()
        end

A similar invariant, this time using ∃, is shown below.

    invariant
        for nameItem in items
            ∃ not nameItem.isEmpty()

Regardless of the surface syntax, expressions such as the above map to functions such as for_all and there_exists defined on relevant linear container types. These functions have the following signatures in which the 'test' expression appears as a Function agent type.

class Container<T>

feature

    for_all (test: Function<[T], Boolean>): Boolean;
            -- True if for every v in container, test (v) is True

    there_exists (test: Function<[T], Boolean>): Boolean;
            -- True if there is any v in container for which test (v) is True

Class Definitions

EL_EXPRESSION Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_EXPRESSION (abstract)

Description

Abstract parent of all typed expression meta-types.

Functions

Signature

Meaning

1..1
(abstract)

eval_type (): BMM_TYPE

Meta-type of expression entity used in type-checking and evaluation.

Effected in descendants.

1..1

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).

EL_EXPRESSION (abstract)

Abstract parent of all typed expression meta-types.

Functions

(abstract) eval_type (): BMM_TYPE [1..1]

Meta-type of expression entity used in type-checking and evaluation.

Effected in descendants.

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).

{
    "name": "EL_EXPRESSION",
    "documentation": "Abstract parent of all typed expression meta-types.",
    "is_abstract": true,
    "functions": {
        "eval_type": {
            "name": "eval_type",
            "documentation": "Meta-type of expression entity used in type-checking and evaluation. \n\nEffected in descendants.",
            "is_abstract": true,
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "BMM_TYPE"
            }
        },
        "is_boolean": {
            "name": "is_boolean",
            "documentation": "True if `_eval_type_` is notionally Boolean (i.e. a `BMM_SIMPLE_TYPE` with `_type_name()_` = `Boolean`).",
            "post_conditions": {
                "Post_result": "Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())"
            },
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Boolean"
            }
        }
    }
}
el expression

EL_CONSTRAINED Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_CONSTRAINED (abstract)

Description

Abstract parent for second-order or constrained forms of first-order expression meta-types.

Inherit

EL_EXPRESSION

Attributes

Signature

Meaning

1..1

base_expression: EL_EXPRESSION

The base expression of this constrained form.

EL_CONSTRAINED (abstract)

Abstract parent for second-order or constrained forms of first-order expression meta-types.

Inherits: EL_EXPRESSION

Attributes

base_expression: EL_EXPRESSION [1..1]

The base expression of this constrained form.

Functions

(abstract) eval_type (): BMM_TYPE [1..1]

Meta-type of expression entity used in type-checking and evaluation.

Effected in descendants.
Inherited from EL_EXPRESSION

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

{
    "name": "EL_CONSTRAINED",
    "documentation": "Abstract parent for second-order or constrained forms of first-order expression meta-types.",
    "is_abstract": true,
    "ancestors": [
        "EL_EXPRESSION"
    ],
    "properties": {
        "base_expression": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "base_expression",
            "documentation": "The base expression of this constrained form.",
            "is_mandatory": true,
            "type": "EL_EXPRESSION"
        }
    }
}
el constrained

EL_BOOLEAN_EXPRESSION Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_BOOLEAN_EXPRESSION

Description

Boolean-returning expression.

Inherit

EL_CONSTRAINED

Invariants

Inv_boolean_expression: base_expression.is_boolean()

EL_BOOLEAN_EXPRESSION

Boolean-returning expression.

Inherits: EL_EXPRESSION, EL_CONSTRAINED

Attributes

base_expression: EL_EXPRESSION [1..1]

The base expression of this constrained form.
Inherited from EL_CONSTRAINED

Functions

(abstract) eval_type (): BMM_TYPE [1..1]

Meta-type of expression entity used in type-checking and evaluation.

Effected in descendants.
Inherited from EL_EXPRESSION

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

Invariants

Inv_boolean_expression: base_expression.is_boolean()

{
    "name": "EL_BOOLEAN_EXPRESSION",
    "documentation": "Boolean-returning expression.",
    "ancestors": [
        "EL_CONSTRAINED"
    ],
    "invariants": {
        "Inv_boolean_expression": "base_expression.is_boolean()"
    }
}
el boolean expression

EL_OPERATOR Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_OPERATOR (abstract)

Description

Abstract parent of operator types.

Inherit

EL_SIMPLE

Attributes

Signature

Meaning

0..1

precedence_overridden: `Boolean `

True if the natural precedence of operators is overridden in the expression represented by this node of the expression tree. If True, parentheses should be introduced around the totality of the syntax expression corresponding to this operator node and its operands.

0..1

symbol: `String `

The symbol actually used in the expression, or intended to be used for serialisation. Must be a member of OPERATOR_DEF.symbols.

1..1

definition: BMM_FUNCTION

Function equivalent to this operator, inferred by matching operator against functions defined in interface of principal operand.

Functions

Signature

Meaning

1..1

operator_definition (): BMM_OPERATOR

Operator definition derived from definition.operator_definition().

1..1

equivalent_call (): EL_FUNCTION_CALL

Function call equivalent to this operator.

Invariants

Symbol_validity: symbol /= Void implies operator_def.symbols.has (symbol)

EL_OPERATOR (abstract)

Abstract parent of operator types.

Inherits: EL_EXPRESSION, EL_SIMPLE

Attributes

precedence_overridden: `Boolean ` [0..1]

True if the natural precedence of operators is overridden in the expression represented by this node of the expression tree. If True, parentheses should be introduced around the totality of the syntax expression corresponding to this operator node and its operands.

symbol: `String ` [0..1]

The symbol actually used in the expression, or intended to be used for serialisation. Must be a member of OPERATOR_DEF.symbols.

definition: BMM_FUNCTION [1..1]

Function equivalent to this operator, inferred by matching operator against functions defined in interface of principal operand.

Functions

(abstract) eval_type (): BMM_TYPE [1..1]

Meta-type of expression entity used in type-checking and evaluation.

Effected in descendants.
Inherited from EL_EXPRESSION

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

operator_definition (): BMM_OPERATOR [1..1]

Operator definition derived from definition.operator_definition().

equivalent_call (): EL_FUNCTION_CALL [1..1]

Function call equivalent to this operator.

Invariants

Symbol_validity: symbol /= Void implies operator_def.symbols.has (symbol)

{
    "name": "EL_OPERATOR",
    "documentation": "Abstract parent of operator types.",
    "is_abstract": true,
    "ancestors": [
        "EL_SIMPLE"
    ],
    "properties": {
        "precedence_overridden": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "precedence_overridden",
            "documentation": "True if the natural precedence of operators is overridden in the expression represented by this node of the expression tree. If True, parentheses should be introduced around the totality of the syntax expression corresponding to this operator node and its operands.",
            "type": "Boolean"
        },
        "symbol": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "symbol",
            "documentation": "The symbol actually used in the expression, or intended to be used for serialisation. Must be a member of `OPERATOR_DEF._symbols_`.",
            "type": "String"
        },
        "definition": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "definition",
            "documentation": "Function equivalent to this operator, inferred by matching operator against functions defined in interface of principal operand.",
            "is_mandatory": true,
            "type": "BMM_FUNCTION"
        }
    },
    "functions": {
        "operator_definition": {
            "name": "operator_definition",
            "documentation": "Operator definition derived from `_definition.operator_definition()_`.",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "BMM_OPERATOR"
            }
        },
        "equivalent_call": {
            "name": "equivalent_call",
            "documentation": "Function call equivalent to this operator.",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "EL_FUNCTION_CALL"
            }
        }
    },
    "invariants": {
        "Symbol_validity": "symbol /= Void implies operator_def.symbols.has (symbol)"
    }
}
el operator

EL_UNARY_OPERATOR Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_UNARY_OPERATOR

Description

Unary operator expression node.

Inherit

EL_OPERATOR

Attributes

Signature

Meaning

1..1

operand: EL_SIMPLE

Operand node.

EL_UNARY_OPERATOR

Unary operator expression node.

Inherits: EL_EXPRESSION, EL_SIMPLE, EL_OPERATOR

Attributes

precedence_overridden: `Boolean ` [0..1]

True if the natural precedence of operators is overridden in the expression represented by this node of the expression tree. If True, parentheses should be introduced around the totality of the syntax expression corresponding to this operator node and its operands.
Inherited from EL_OPERATOR

symbol: `String ` [0..1]

The symbol actually used in the expression, or intended to be used for serialisation. Must be a member of OPERATOR_DEF.symbols.
Inherited from EL_OPERATOR

definition: BMM_FUNCTION [1..1]

Function equivalent to this operator, inferred by matching operator against functions defined in interface of principal operand.
Inherited from EL_OPERATOR

operand: EL_SIMPLE [1..1]

Operand node.

Functions

(abstract) eval_type (): BMM_TYPE [1..1]

Meta-type of expression entity used in type-checking and evaluation.

Effected in descendants.
Inherited from EL_EXPRESSION

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

operator_definition (): BMM_OPERATOR [1..1]

Operator definition derived from definition.operator_definition().
Inherited from EL_OPERATOR

equivalent_call (): EL_FUNCTION_CALL [1..1]

Function call equivalent to this operator.
Inherited from EL_OPERATOR

Invariants

Symbol_validity: symbol /= Void implies operator_def.symbols.has (symbol)
Inherited from EL_OPERATOR

{
    "name": "EL_UNARY_OPERATOR",
    "documentation": "Unary operator expression node.",
    "ancestors": [
        "EL_OPERATOR"
    ],
    "properties": {
        "operand": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "operand",
            "documentation": "Operand node.",
            "is_mandatory": true,
            "type": "EL_SIMPLE"
        }
    }
}
el unary operator

EL_BINARY_OPERATOR Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_BINARY_OPERATOR

Description

Binary operator expression node.

Inherit

EL_OPERATOR

Attributes

Signature

Meaning

1..1

left_operand: EL_SIMPLE

Left operand node.

1..1

right_operand: EL_TERMINAL

Right operand node.

EL_BINARY_OPERATOR

Binary operator expression node.

Inherits: EL_EXPRESSION, EL_SIMPLE, EL_OPERATOR

Attributes

precedence_overridden: `Boolean ` [0..1]

True if the natural precedence of operators is overridden in the expression represented by this node of the expression tree. If True, parentheses should be introduced around the totality of the syntax expression corresponding to this operator node and its operands.
Inherited from EL_OPERATOR

symbol: `String ` [0..1]

The symbol actually used in the expression, or intended to be used for serialisation. Must be a member of OPERATOR_DEF.symbols.
Inherited from EL_OPERATOR

definition: BMM_FUNCTION [1..1]

Function equivalent to this operator, inferred by matching operator against functions defined in interface of principal operand.
Inherited from EL_OPERATOR

left_operand: EL_SIMPLE [1..1]

Left operand node.

right_operand: EL_TERMINAL [1..1]

Right operand node.

Functions

(abstract) eval_type (): BMM_TYPE [1..1]

Meta-type of expression entity used in type-checking and evaluation.

Effected in descendants.
Inherited from EL_EXPRESSION

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

operator_definition (): BMM_OPERATOR [1..1]

Operator definition derived from definition.operator_definition().
Inherited from EL_OPERATOR

equivalent_call (): EL_FUNCTION_CALL [1..1]

Function call equivalent to this operator.
Inherited from EL_OPERATOR

Invariants

Symbol_validity: symbol /= Void implies operator_def.symbols.has (symbol)
Inherited from EL_OPERATOR

{
    "name": "EL_BINARY_OPERATOR",
    "documentation": "Binary operator expression node.",
    "ancestors": [
        "EL_OPERATOR"
    ],
    "properties": {
        "left_operand": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "left_operand",
            "documentation": "Left operand node.",
            "is_mandatory": true,
            "type": "EL_SIMPLE"
        },
        "right_operand": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "right_operand",
            "documentation": "Right operand node.",
            "is_mandatory": true,
            "type": "EL_TERMINAL"
        }
    }
}
el binary operator

EL_SIMPLE Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_SIMPLE (abstract)

Description

Simple expression type that may be used in other simple expressions.

Inherit

EL_EXPRESSION

EL_SIMPLE (abstract)

Simple expression type that may be used in other simple expressions.

Inherits: EL_EXPRESSION

Functions

(abstract) eval_type (): BMM_TYPE [1..1]

Meta-type of expression entity used in type-checking and evaluation.

Effected in descendants.
Inherited from EL_EXPRESSION

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

{
    "name": "EL_SIMPLE",
    "documentation": "Simple expression type that may be used in other simple expressions.",
    "is_abstract": true,
    "ancestors": [
        "EL_EXPRESSION"
    ]
}
el simple

EL_TERMINAL Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_TERMINAL (abstract)

Description

Expression terminal entity, representing one of:

  • a reference to a literal value of any type;

  • a reference to an instance of any instantiable type, i.e. variable, property or constant;

  • an agent, i.e. a delayed function call;

  • a function call.

Inherit

EL_SIMPLE

EL_TERMINAL (abstract)

Expression terminal entity, representing one of:

  • a reference to a literal value of any type;

  • a reference to an instance of any instantiable type, i.e. variable, property or constant;

  • an agent, i.e. a delayed function call;

  • a function call.

Inherits: EL_EXPRESSION, EL_SIMPLE

Functions

(abstract) eval_type (): BMM_TYPE [1..1]

Meta-type of expression entity used in type-checking and evaluation.

Effected in descendants.
Inherited from EL_EXPRESSION

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

{
    "name": "EL_TERMINAL",
    "documentation": "Expression terminal entity, representing one of:\n\n* a reference to a literal value of any type;\n* a reference to an instance of any instantiable type, i.e. variable, property or constant;\n* an agent, i.e. a delayed function call;\n* a function call.",
    "is_abstract": true,
    "ancestors": [
        "EL_SIMPLE"
    ]
}
el terminal

EL_PREDICATE Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_PREDICATE (abstract)

Description

Parent type of predicate of any object reference.

Inherit

EL_TERMINAL

Attributes

Signature

Meaning

1..1

operand: EL_INSTANCE_REF

The target instance of this predicate.

Functions

Signature

Meaning

1..1
(effected)

eval_type (): BMM_SIMPLE_TYPE

Return {BMM_MODEL}.boolean_type_definition().

EL_PREDICATE (abstract)

Parent type of predicate of any object reference.

Inherits: EL_EXPRESSION, EL_SIMPLE, EL_TERMINAL

Attributes

operand: EL_INSTANCE_REF [1..1]

The target instance of this predicate.

Functions

eval_type (): BMM_SIMPLE_TYPE [1..1]

Return {BMM_MODEL}.boolean_type_definition().

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

{
    "name": "EL_PREDICATE",
    "documentation": "Parent type of predicate of any object reference.",
    "is_abstract": true,
    "ancestors": [
        "EL_TERMINAL"
    ],
    "properties": {
        "operand": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "operand",
            "documentation": "The target instance of this predicate.",
            "is_mandatory": true,
            "type": "EL_INSTANCE_REF"
        }
    },
    "functions": {
        "eval_type": {
            "name": "eval_type",
            "documentation": "Return `{BMM_MODEL}._boolean_type_definition_()`.",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "BMM_SIMPLE_TYPE"
            }
        }
    }
}
el predicate

EL_DEFINED Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_DEFINED

Description

A predicate taking one external variable reference argument, that returns true if the reference is resolvable, i.e. the external value is obtainable.

probably to be removed.

Inherit

EL_PREDICATE

EL_DEFINED

A predicate taking one external variable reference argument, that returns true if the reference is resolvable, i.e. the external value is obtainable.

probably to be removed.

Inherits: EL_EXPRESSION, EL_SIMPLE, EL_TERMINAL, EL_PREDICATE

Attributes

operand: EL_INSTANCE_REF [1..1]

The target instance of this predicate.
Inherited from EL_PREDICATE

Functions

eval_type (): BMM_SIMPLE_TYPE [1..1]

Return {BMM_MODEL}.boolean_type_definition().
Inherited from EL_PREDICATE

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

{
    "name": "EL_DEFINED",
    "documentation": "A predicate taking one external variable reference argument, that returns true if the reference is resolvable, i.e. the external value is obtainable.\n\nNOTE: probably to be removed.",
    "ancestors": [
        "EL_PREDICATE"
    ]
}
el defined

EL_ATTACHED Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_ATTACHED

Description

A predicate on any object reference (including function call) that returns True if the reference is attached, i.e. non-Void.

Inherit

EL_PREDICATE

EL_ATTACHED

A predicate on any object reference (including function call) that returns True if the reference is attached, i.e. non-Void.

Inherits: EL_EXPRESSION, EL_SIMPLE, EL_TERMINAL, EL_PREDICATE

Attributes

operand: EL_INSTANCE_REF [1..1]

The target instance of this predicate.
Inherited from EL_PREDICATE

Functions

eval_type (): BMM_SIMPLE_TYPE [1..1]

Return {BMM_MODEL}.boolean_type_definition().
Inherited from EL_PREDICATE

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

{
    "name": "EL_ATTACHED",
    "documentation": "A predicate on any object reference (including function call) that returns True if the reference is attached, i.e. non-Void.",
    "ancestors": [
        "EL_PREDICATE"
    ]
}
el attached

EL_INSTANCE_REF Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_INSTANCE_REF (abstract)

Description

A reference to an instance of any kind.

Inherit

EL_TERMINAL

EL_INSTANCE_REF (abstract)

A reference to an instance of any kind.

Inherits: EL_EXPRESSION, EL_SIMPLE, EL_TERMINAL

Functions

(abstract) eval_type (): BMM_TYPE [1..1]

Meta-type of expression entity used in type-checking and evaluation.

Effected in descendants.
Inherited from EL_EXPRESSION

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

{
    "name": "EL_INSTANCE_REF",
    "documentation": "A reference to an instance of any kind.",
    "is_abstract": true,
    "ancestors": [
        "EL_TERMINAL"
    ]
}
el instance ref

EL_SELF_REF Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_SELF_REF

Description

Special meta-type used to represent a reference that may appear in any routine, pre- or post-condition, or invariant, and resolves to the current object within which feature references are scoped; corresponds to 'self', 'this' or 'Current' in various programming languages.

Inherit

EL_INSTANCE_REF

Attributes

Signature

Meaning

1..1

type: BMM_TYPE

Type of the current scoping instance, inferred from expression context.

Functions

Signature

Meaning

1..1
(effected)

eval_type (): BMM_TYPE

Return type.

EL_SELF_REF

Special meta-type used to represent a reference that may appear in any routine, pre- or post-condition, or invariant, and resolves to the current object within which feature references are scoped; corresponds to 'self', 'this' or 'Current' in various programming languages.

Inherits: EL_EXPRESSION, EL_SIMPLE, EL_TERMINAL, EL_INSTANCE_REF

Attributes

type: BMM_TYPE [1..1]

Type of the current scoping instance, inferred from expression context.

Functions

eval_type (): BMM_TYPE [1..1]

Return type.

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

{
    "name": "EL_SELF_REF",
    "documentation": "Special meta-type used to represent a reference that may appear in any routine, pre- or post-condition, or invariant, and resolves to the current object within which feature references are scoped; corresponds to 'self', 'this' or 'Current' in various programming languages.",
    "ancestors": [
        "EL_INSTANCE_REF"
    ],
    "properties": {
        "type": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "type",
            "documentation": "Type of the current scoping instance, inferred from expression context.",
            "is_mandatory": true,
            "type": "BMM_TYPE"
        }
    },
    "functions": {
        "eval_type": {
            "name": "eval_type",
            "documentation": "Return `_type_`.",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "BMM_TYPE"
            }
        }
    }
}
el self ref

EL_TYPE_REF Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_TYPE_REF

Description

Meta-type for reference to a non-abstract type as an object. Assumed to be accessible at run-time. Typically represented syntactically as TypeName or {TypeName}.

May be used as a value, or as the qualifier for a function or constant access.

Inherit

EL_INSTANCE_REF

Attributes

Signature

Meaning

1..1

type: BMM_TYPE

Type, directly from the name of the reference, e.g. {SOME_TYPE}.

Functions

Signature

Meaning

1..1
(effected)

eval_type (): BMM_TYPE

Return type.

Invariants

Inv_no_context: context = Void

EL_TYPE_REF

Meta-type for reference to a non-abstract type as an object. Assumed to be accessible at run-time. Typically represented syntactically as TypeName or {TypeName}.

May be used as a value, or as the qualifier for a function or constant access.

Inherits: EL_EXPRESSION, EL_SIMPLE, EL_TERMINAL, EL_INSTANCE_REF

Attributes

type: BMM_TYPE [1..1]

Type, directly from the name of the reference, e.g. {SOME_TYPE}.

Functions

eval_type (): BMM_TYPE [1..1]

Return type.

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

Invariants

Inv_no_context: context = Void

{
    "name": "EL_TYPE_REF",
    "documentation": "Meta-type for reference to a non-abstract type as an object. Assumed to be accessible at run-time. Typically represented syntactically as `TypeName` or `{TypeName}`.\n\nMay be used as a value, or as the qualifier for a function or constant access.",
    "ancestors": [
        "EL_INSTANCE_REF"
    ],
    "properties": {
        "type": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "type",
            "documentation": "Type, directly from the name of the reference, e.g. `{SOME_TYPE}`.",
            "is_mandatory": true,
            "type": "BMM_TYPE"
        }
    },
    "functions": {
        "eval_type": {
            "name": "eval_type",
            "documentation": "Return `_type_`.",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "BMM_TYPE"
            }
        }
    },
    "invariants": {
        "Inv_no_context": "context = Void"
    }
}
el type ref

EL_LITERAL Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_LITERAL

Description

Literal value of any type known in the model, including primitive types. Defined via a BMM_LITERAL_VALUE.

Inherit

EL_INSTANCE_REF

Attributes

Signature

Meaning

1..1

value: BMM_LITERAL_VALUE

The reference item from which the value of this node can be computed.

Functions

Signature

Meaning

1..1
(effected)

eval_type (): BMM_TYPE

Return value.type.

Invariants

Post_manifest_effective_type: Result = definition.type

EL_LITERAL

Literal value of any type known in the model, including primitive types. Defined via a BMM_LITERAL_VALUE.

Inherits: EL_EXPRESSION, EL_SIMPLE, EL_TERMINAL, EL_INSTANCE_REF

Attributes

value: BMM_LITERAL_VALUE [1..1]

The reference item from which the value of this node can be computed.

Functions

eval_type (): BMM_TYPE [1..1]

Return value.type.

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

Invariants

Post_manifest_effective_type: Result = definition.type

{
    "name": "EL_LITERAL",
    "documentation": "Literal value of any type known in the model, including primitive types. Defined via a `BMM_LITERAL_VALUE`.",
    "ancestors": [
        "EL_INSTANCE_REF"
    ],
    "properties": {
        "value": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "value",
            "documentation": "The reference item from which the value of this node can be computed.",
            "is_mandatory": true,
            "type": "BMM_LITERAL_VALUE"
        }
    },
    "functions": {
        "eval_type": {
            "name": "eval_type",
            "documentation": "Return `_value.type_`.",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "BMM_TYPE"
            }
        }
    },
    "invariants": {
        "Post_manifest_effective_type": "Result = definition.type"
    }
}
el literal

EL_SCOPED_REF Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_SCOPED_REF (abstract)

Description

A reference that is scoped by a containing entity and requires a context qualifier if it is not the currently scoping entity.

Inherit

EL_INSTANCE_REF

Attributes

Signature

Meaning

0..1

scope: EL_INSTANCE_REF

Reference to an owning object for this terminal element, if it is not the current scope.

EL_SCOPED_REF (abstract)

A reference that is scoped by a containing entity and requires a context qualifier if it is not the currently scoping entity.

Inherits: EL_EXPRESSION, EL_SIMPLE, EL_TERMINAL, EL_INSTANCE_REF

Attributes

scope: EL_INSTANCE_REF [0..1]

Reference to an owning object for this terminal element, if it is not the current scope.

Functions

(abstract) eval_type (): BMM_TYPE [1..1]

Meta-type of expression entity used in type-checking and evaluation.

Effected in descendants.
Inherited from EL_EXPRESSION

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

{
    "name": "EL_SCOPED_REF",
    "documentation": "A reference that is scoped by a containing entity and requires a context qualifier if it is not the currently scoping entity.",
    "is_abstract": true,
    "ancestors": [
        "EL_INSTANCE_REF"
    ],
    "properties": {
        "scope": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "scope",
            "documentation": "Reference to an owning object for this terminal element, if it is not the current scope.",
            "type": "EL_INSTANCE_REF"
        }
    }
}
el scoped ref

EL_INSTANTIABLE_REF Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_INSTANTIABLE_REF<T>

Description

Terminal item corresponding to a reference to a directly instantiable entity, i.e. a variable, constant, or property.

Inherit

EL_SCOPED_REF

Attributes

Signature

Meaning

0..1

definition: T

Definition of the constant, property or variable, inferred by inspection of the current scoping instance.

Functions

Signature

Meaning

1..1
(effected)

eval_type (): BMM_TYPE

Type definition (i.e. BMM meta-type definition object) of the constant, property or variable, inferred by inspection of the current scoping instance. Return definition.type.

EL_INSTANTIABLE_REF<T>

Terminal item corresponding to a reference to a directly instantiable entity, i.e. a variable, constant, or property.

Inherits: EL_EXPRESSION, EL_SIMPLE, EL_TERMINAL, EL_INSTANCE_REF, EL_SCOPED_REF

Attributes

scope: EL_INSTANCE_REF [0..1]

Reference to an owning object for this terminal element, if it is not the current scope.
Inherited from EL_SCOPED_REF

definition: T [0..1]

Definition of the constant, property or variable, inferred by inspection of the current scoping instance.

Functions

eval_type (): BMM_TYPE [1..1]

Type definition (i.e. BMM meta-type definition object) of the constant, property or variable, inferred by inspection of the current scoping instance. Return definition.type.

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

{
    "name": "EL_INSTANTIABLE_REF",
    "documentation": "Terminal item corresponding to a reference to a directly instantiable entity, i.e. a variable, constant, or property.",
    "ancestors": [
        "EL_SCOPED_REF"
    ],
    "generic_parameter_defs": {
        "T": {
            "name": "T",
            "conforms_to_type": "BMM_INSTANTIABLE"
        }
    },
    "properties": {
        "definition": {
            "_type": "P_BMM_SINGLE_PROPERTY_OPEN",
            "name": "definition",
            "documentation": "Definition of the constant, property or variable, inferred by inspection of the current scoping instance.",
            "type": "T"
        }
    },
    "functions": {
        "eval_type": {
            "name": "eval_type",
            "documentation": "Type definition (i.e. BMM meta-type definition object) of the constant, property or variable, inferred by inspection of the current scoping instance. Return `_definition.type_`.",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "BMM_TYPE"
            }
        }
    }
}
el instantiable ref

EL_AGENT_CALL Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_AGENT_CALL (abstract)

Description

A call made to a 'closed' agent, i.e. one with no remaining open arguments.

Attributes

Signature

Meaning

1..1

agent: EL_AGENT

The agent being called.

Invariants

Inv_valid_call: agent.is_callable()

EL_AGENT_CALL (abstract)

A call made to a 'closed' agent, i.e. one with no remaining open arguments.

Attributes

agent: EL_AGENT [1..1]

The agent being called.

Invariants

Inv_valid_call: agent.is_callable()

{
    "name": "EL_AGENT_CALL",
    "documentation": "A call made to a 'closed' agent, i.e. one with no remaining open arguments.",
    "is_abstract": true,
    "properties": {
        "agent": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "agent",
            "documentation": "The agent being called.",
            "is_mandatory": true,
            "type": "EL_AGENT"
        }
    },
    "invariants": {
        "Inv_valid_call": "agent.is_callable()"
    }
}
el agent call

EL_FUNCTION_CALL Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_FUNCTION_CALL

Description

A call made on a closed function agent, returning a result. Equivalent to an 'application' of a function in Lambda calculus.

Inherit

EL_SCOPED_REF, EL_AGENT_CALL

Attributes

Signature

Meaning

1..1
(redefined)

agent: EL_FUNCTION_AGENT

The function agent being called.

Functions

Signature

Meaning

1..1
(effected)

eval_type (): BMM_TYPE

Return agent.definition.type.

Invariants

Inv_valid_agent: agent.is_callable()

EL_FUNCTION_CALL

A call made on a closed function agent, returning a result. Equivalent to an 'application' of a function in Lambda calculus.

Inherits: EL_EXPRESSION, EL_SIMPLE, EL_TERMINAL, EL_INSTANCE_REF, EL_SCOPED_REF, EL_AGENT_CALL

Attributes

scope: EL_INSTANCE_REF [0..1]

Reference to an owning object for this terminal element, if it is not the current scope.
Inherited from EL_SCOPED_REF

agent: EL_FUNCTION_AGENT [1..1]

The function agent being called.

Functions

eval_type (): BMM_TYPE [1..1]

Return agent.definition.type.

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

Invariants

Inv_valid_call: agent.is_callable()
Inherited from EL_AGENT_CALL

Inv_valid_agent: agent.is_callable()

{
    "name": "EL_FUNCTION_CALL",
    "documentation": "A call made on a closed function agent, returning a result. Equivalent to an 'application' of a function in Lambda calculus.",
    "ancestors": [
        "EL_SCOPED_REF",
        "EL_AGENT_CALL"
    ],
    "properties": {
        "agent": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "agent",
            "documentation": "The function agent being called.",
            "is_mandatory": true,
            "type": "EL_FUNCTION_AGENT"
        }
    },
    "functions": {
        "eval_type": {
            "name": "eval_type",
            "documentation": "Return `_agent.definition.type_`.",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "BMM_TYPE"
            }
        }
    },
    "invariants": {
        "Inv_valid_agent": "agent.is_callable()"
    }
}
el function call

EL_AGENT Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_AGENT (abstract)

Description

A delayed routine call, whose arguments may be open, partially closed or closed. Instances may include closed delayed calls like calculate_age (dob="1987-09-13", today="2019-06-03") but also partially open calls such as format_structure (struct=?, style=3), where struct is an open argument.

Evaluation type (i.e. type of runtime evaluated form) is BMM_SIGNATURE.

Inherit

EL_SCOPED_REF

Attributes

Signature

Meaning

1..1

name: `String `

Name of the routine being called.

0..1

closed_args: EL_TUPLE

Closed arguments of a routine call as a tuple of objects.

0..1

open_args: List <String >

Optional list of names of open arguments of the call. If not provided, and the name refers to a routine with more arguments than supplied in closed_args, the missing arguments are inferred from the definition.

0..1

definition: BMM_ROUTINE

Reference to definition of a routine for which this is an agent, if one exists.

Functions

Signature

Meaning

1..1
(effected)

eval_type (): BMM_SIGNATURE

Post_result: Result = definition.signature

Eval type is the signature corresponding to the (remaining) open arguments and return type, if any.

1..1

is_callable (): Boolean `

Post_result_validity: `Result = open_arguments = Void

True if there are no open arguments.

EL_AGENT (abstract)

A delayed routine call, whose arguments may be open, partially closed or closed. Instances may include closed delayed calls like calculate_age (dob="1987-09-13", today="2019-06-03") but also partially open calls such as format_structure (struct=?, style=3), where struct is an open argument.

Evaluation type (i.e. type of runtime evaluated form) is BMM_SIGNATURE.

Inherits: EL_EXPRESSION, EL_SIMPLE, EL_TERMINAL, EL_INSTANCE_REF, EL_SCOPED_REF

Attributes

scope: EL_INSTANCE_REF [0..1]

Reference to an owning object for this terminal element, if it is not the current scope.
Inherited from EL_SCOPED_REF

name: `String ` [1..1]

Name of the routine being called.

closed_args: EL_TUPLE [0..1]

Closed arguments of a routine call as a tuple of objects.

open_args: List <String > [0..1]

Optional list of names of open arguments of the call. If not provided, and the name refers to a routine with more arguments than supplied in closed_args, the missing arguments are inferred from the definition.

definition: BMM_ROUTINE [0..1]

Reference to definition of a routine for which this is an agent, if one exists.

Functions

eval_type (): BMM_SIGNATURE

Post_result: Result = definition.signature [1..1]

Eval type is the signature corresponding to the (remaining) open arguments and return type, if any.

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

is_callable (): Boolean `

Post_result_validity: `Result = open_arguments = Void
[1..1]

True if there are no open arguments.

{
    "name": "EL_AGENT",
    "documentation": "A delayed routine call, whose arguments may be open, partially closed or closed. Instances may include closed delayed calls like `calculate_age (dob=\"1987-09-13\", today=\"2019-06-03\")` but also partially open calls such as `format_structure (struct=?, style=3)`, where `struct` is an open argument.\n\nEvaluation type (i.e. type of runtime evaluated form) is `BMM_SIGNATURE`.",
    "is_abstract": true,
    "ancestors": [
        "EL_SCOPED_REF"
    ],
    "properties": {
        "name": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "name",
            "documentation": "Name of the routine being called.",
            "is_mandatory": true,
            "type": "String"
        },
        "closed_args": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "closed_args",
            "documentation": "Closed arguments of a routine call as a tuple of objects.",
            "type": "EL_TUPLE"
        },
        "open_args": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "open_args",
            "documentation": "Optional list of names of open arguments of the call. If not provided, and the `_name_` refers to a routine with more arguments than supplied in `_closed_args_`, the missing arguments are inferred from the `_definition_`.",
            "type_def": {
                "container_type": "List",
                "type": "String"
            },
            "cardinality": {
                "lower": 0,
                "upper_unbounded": true
            }
        },
        "definition": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "definition",
            "documentation": "Reference to definition of a routine for which this is an agent, if one exists. ",
            "type": "BMM_ROUTINE"
        }
    },
    "functions": {
        "eval_type": {
            "name": "eval_type",
            "documentation": "Eval type is the signature corresponding to the (remaining) open arguments and return type, if any.",
            "post_conditions": {
                "Post_result": "Result = definition.signature"
            },
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "BMM_SIGNATURE"
            }
        },
        "is_callable": {
            "name": "is_callable",
            "documentation": "True if there are no open arguments.",
            "post_conditions": {
                "Post_result_validity": "Result = open_arguments = Void"
            },
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Boolean"
            }
        }
    }
}
el agent

EL_FUNCTION_AGENT Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_FUNCTION_AGENT

Description

An agent whose signature is of a function, i.e. has a result type.

Inherit

EL_AGENT

Attributes

Signature

Meaning

0..1
(redefined)

definition: BMM_FUNCTION

Reference to definition of a routine for which this is a direct call instance, if one exists.

EL_FUNCTION_AGENT

An agent whose signature is of a function, i.e. has a result type.

Inherits: EL_EXPRESSION, EL_SIMPLE, EL_TERMINAL, EL_INSTANCE_REF, EL_SCOPED_REF, EL_AGENT

Attributes

scope: EL_INSTANCE_REF [0..1]

Reference to an owning object for this terminal element, if it is not the current scope.
Inherited from EL_SCOPED_REF

name: `String ` [1..1]

Name of the routine being called.
Inherited from EL_AGENT

closed_args: EL_TUPLE [0..1]

Closed arguments of a routine call as a tuple of objects.
Inherited from EL_AGENT

open_args: List <String > [0..1]

Optional list of names of open arguments of the call. If not provided, and the name refers to a routine with more arguments than supplied in closed_args, the missing arguments are inferred from the definition.
Inherited from EL_AGENT

definition: BMM_FUNCTION [0..1]

Reference to definition of a routine for which this is a direct call instance, if one exists.

Functions

eval_type (): BMM_SIGNATURE

Post_result: Result = definition.signature [1..1]

Eval type is the signature corresponding to the (remaining) open arguments and return type, if any.
Inherited from EL_AGENT

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

is_callable (): Boolean `

Post_result_validity: `Result = open_arguments = Void
[1..1]

True if there are no open arguments.
Inherited from EL_AGENT

{
    "name": "EL_FUNCTION_AGENT",
    "documentation": "An agent whose signature is of a function, i.e. has a result type.",
    "ancestors": [
        "EL_AGENT"
    ],
    "properties": {
        "definition": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "definition",
            "documentation": "Reference to definition of a routine for which this is a direct call instance, if one exists. ",
            "type": "BMM_FUNCTION"
        }
    }
}
el function agent

EL_PROCEDURE_AGENT Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_PROCEDURE_AGENT

Description

An agent whose signature is of a procedure, i.e. has no result type.

Inherit

EL_AGENT

Attributes

Signature

Meaning

0..1
(redefined)

definition: BMM_PROCEDURE

Reference to definition of routine for which this is a call instance.

EL_PROCEDURE_AGENT

An agent whose signature is of a procedure, i.e. has no result type.

Inherits: EL_EXPRESSION, EL_SIMPLE, EL_TERMINAL, EL_INSTANCE_REF, EL_SCOPED_REF, EL_AGENT

Attributes

scope: EL_INSTANCE_REF [0..1]

Reference to an owning object for this terminal element, if it is not the current scope.
Inherited from EL_SCOPED_REF

name: `String ` [1..1]

Name of the routine being called.
Inherited from EL_AGENT

closed_args: EL_TUPLE [0..1]

Closed arguments of a routine call as a tuple of objects.
Inherited from EL_AGENT

open_args: List <String > [0..1]

Optional list of names of open arguments of the call. If not provided, and the name refers to a routine with more arguments than supplied in closed_args, the missing arguments are inferred from the definition.
Inherited from EL_AGENT

definition: BMM_PROCEDURE [0..1]

Reference to definition of routine for which this is a call instance.

Functions

eval_type (): BMM_SIGNATURE

Post_result: Result = definition.signature [1..1]

Eval type is the signature corresponding to the (remaining) open arguments and return type, if any.
Inherited from EL_AGENT

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

is_callable (): Boolean `

Post_result_validity: `Result = open_arguments = Void
[1..1]

True if there are no open arguments.
Inherited from EL_AGENT

{
    "name": "EL_PROCEDURE_AGENT",
    "documentation": "An agent whose signature is of a procedure, i.e. has no result type.",
    "ancestors": [
        "EL_AGENT"
    ],
    "properties": {
        "definition": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "definition",
            "documentation": "Reference to definition of routine for which this is a call instance.",
            "type": "BMM_PROCEDURE"
        }
    }
}
el procedure agent

EL_TUPLE Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_TUPLE

Description

Defines an array of optionally named items each of any type.

Inherit

EL_INSTANCE_REF

Attributes

Signature

Meaning

0..1

items: List <EL_TUPLE_ITEM>

Items in the tuple, potentially with names. Typical use is to represent an argument list to routine call.

1..1

type: BMM_TUPLE_TYPE

Static type inferred from literal value.

Functions

Signature

Meaning

1..1
(effected)

eval_type (): BMM_TYPE

Return type.

EL_TUPLE

Defines an array of optionally named items each of any type.

Inherits: EL_EXPRESSION, EL_SIMPLE, EL_TERMINAL, EL_INSTANCE_REF

Attributes

items: List <EL_TUPLE_ITEM> [0..1]

Items in the tuple, potentially with names. Typical use is to represent an argument list to routine call.

type: BMM_TUPLE_TYPE [1..1]

Static type inferred from literal value.

Functions

eval_type (): BMM_TYPE [1..1]

Return type.

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

{
    "name": "EL_TUPLE",
    "documentation": "Defines an array of optionally named items each of any type.",
    "ancestors": [
        "EL_INSTANCE_REF"
    ],
    "properties": {
        "items": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "items",
            "documentation": "Items in the tuple, potentially with names. Typical use is to represent an argument list to routine call.",
            "type_def": {
                "container_type": "List",
                "type": "EL_TUPLE_ITEM"
            },
            "cardinality": {
                "lower": 0,
                "upper_unbounded": true
            }
        },
        "type": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "type",
            "documentation": "Static type inferred from literal value.",
            "is_mandatory": true,
            "type": "BMM_TUPLE_TYPE"
        }
    },
    "functions": {
        "eval_type": {
            "name": "eval_type",
            "documentation": "Return `_type_`.",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "BMM_TYPE"
            }
        }
    }
}
el tuple

EL_TUPLE_ITEM Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_TUPLE_ITEM

Description

A single tuple item, with an optional name.

Attributes

Signature

Meaning

0..1

item: EL_EXPRESSION

Reference to value entity. If Void, this indicates that the item in this position is Void, e.g. within a routine call parameter list.

0..1

name: `String `

Optional name of tuple item.

EL_TUPLE_ITEM

A single tuple item, with an optional name.

Attributes

item: EL_EXPRESSION [0..1]

Reference to value entity. If Void, this indicates that the item in this position is Void, e.g. within a routine call parameter list.

name: `String ` [0..1]

Optional name of tuple item.

{
    "name": "EL_TUPLE_ITEM",
    "documentation": "A single tuple item, with an optional name.",
    "properties": {
        "item": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "item",
            "documentation": "Reference to value entity. If Void, this indicates that the item in this position is Void, e.g. within a routine call parameter list.",
            "type": "EL_EXPRESSION"
        },
        "name": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "name",
            "documentation": "Optional name of tuple item.",
            "type": "String"
        }
    }
}
el tuple item

EL_DECISION_TABLE Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_DECISION_TABLE (abstract)

Description

Complex expression structure representing a logical decision table.

Inherit

EL_EXPRESSION

Attributes

Signature

Meaning

1..1

else: EL_EXPRESSION

Result expression of the chain if no member of items succeeds in evaluation.

1..1

items: List <EL_DECISION_BRANCH>

Members of the chain, equivalent to branches in an if/then/else chain and cases in a case statement.

EL_DECISION_TABLE (abstract)

Complex expression structure representing a logical decision table.

Inherits: EL_EXPRESSION

Attributes

else: EL_EXPRESSION [1..1]

Result expression of the chain if no member of items succeeds in evaluation.

items: List <EL_DECISION_BRANCH> [1..1]

Members of the chain, equivalent to branches in an if/then/else chain and cases in a case statement.

Functions

(abstract) eval_type (): BMM_TYPE [1..1]

Meta-type of expression entity used in type-checking and evaluation.

Effected in descendants.
Inherited from EL_EXPRESSION

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

{
    "name": "EL_DECISION_TABLE",
    "documentation": "Complex expression structure representing a logical decision table.",
    "is_abstract": true,
    "ancestors": [
        "EL_EXPRESSION"
    ],
    "properties": {
        "else": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "else",
            "documentation": "Result expression of the chain if no member of `_items_` succeeds in evaluation.",
            "is_mandatory": true,
            "type": "EL_EXPRESSION"
        },
        "items": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "items",
            "documentation": "Members of the chain, equivalent to branches in an if/then/else chain and cases in a case statement.",
            "is_mandatory": true,
            "type_def": {
                "container_type": "List",
                "type": "EL_DECISION_BRANCH"
            },
            "cardinality": {
                "lower": 1,
                "upper_unbounded": true
            }
        }
    }
}
el decision table

EL_DECISION_BRANCH Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_DECISION_BRANCH (abstract)

Attributes

Signature

Meaning

1..1

result: EL_EXPRESSION

Result expression of conditional, if its condition evaluates to True.

EL_DECISION_BRANCH (abstract)

Attributes

result: EL_EXPRESSION [1..1]

Result expression of conditional, if its condition evaluates to True.

{
    "name": "EL_DECISION_BRANCH",
    "is_abstract": true,
    "properties": {
        "result": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "result",
            "documentation": "Result expression of conditional, if its `_condition_` evaluates to True.",
            "is_mandatory": true,
            "type": "EL_EXPRESSION"
        }
    }
}
el decision branch

EL_CONDITION_CHAIN Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_CONDITION_CHAIN

Description

Compound expression consisting of a chain of condition-gated expressions, and an ungated else member that as a whole, represents an if/then/elseif/else chains.

Evaluated by iterating through items and for each one, evaluating its condition, which if True, causes the evaluation result of the chain to be that item’s result evaluation result.

If no member of items has a True-returning condition, the evaluation result is the result of evaluating the else expression.

Inherit

EL_DECISION_TABLE

Attributes

Signature

Meaning

1..1
(redefined)

items: List <EL_CONDITIONAL_EXPRESSION>

Members of the chain, equivalent to branches in an if/then/else chain and cases in a case statement.

EL_CONDITION_CHAIN

Compound expression consisting of a chain of condition-gated expressions, and an ungated else member that as a whole, represents an if/then/elseif/else chains.

Evaluated by iterating through items and for each one, evaluating its condition, which if True, causes the evaluation result of the chain to be that item’s result evaluation result.

If no member of items has a True-returning condition, the evaluation result is the result of evaluating the else expression.

Inherits: EL_EXPRESSION, EL_DECISION_TABLE

Attributes

else: EL_EXPRESSION [1..1]

Result expression of the chain if no member of items succeeds in evaluation.
Inherited from EL_DECISION_TABLE

items: List <EL_CONDITIONAL_EXPRESSION> [1..1]

Members of the chain, equivalent to branches in an if/then/else chain and cases in a case statement.

Functions

(abstract) eval_type (): BMM_TYPE [1..1]

Meta-type of expression entity used in type-checking and evaluation.

Effected in descendants.
Inherited from EL_EXPRESSION

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

{
    "name": "EL_CONDITION_CHAIN",
    "documentation": "Compound expression consisting of a chain of condition-gated expressions, and an ungated `_else_` member that as a whole, represents an if/then/elseif/else chains.\n\nEvaluated by iterating through `_items_` and for each one, evaluating its `_condition_`, which if True, causes the evaluation result of the chain to be that item's `_result_` evaluation result.\n\nIf no member of `_items_` has a True-returning `_condition_`, the evaluation result is the result of evaluating the `_else_` expression.",
    "ancestors": [
        "EL_DECISION_TABLE"
    ],
    "properties": {
        "items": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "items",
            "documentation": "Members of the chain, equivalent to branches in an if/then/else chain and cases in a case statement.",
            "is_mandatory": true,
            "type_def": {
                "container_type": "List",
                "type": "EL_CONDITIONAL_EXPRESSION"
            },
            "cardinality": {
                "lower": 1,
                "upper_unbounded": true
            }
        }
    }
}
el condition chain

EL_CONDITIONAL_EXPRESSION Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_CONDITIONAL_EXPRESSION

Description

Conditional structure used in condition chain expressions. Evaluated by evaluating its condition, which is a Boolean-returning expression, and if this returns True, the result is the evaluation result of expression.

Inherit

EL_DECISION_BRANCH

Attributes

Signature

Meaning

1..1

condition: EL_SIMPLE

Gate expression that acts as the condition under which the target expression is returned.

Invariants

Inv_condition_boolean: condition.is_boolean()

EL_CONDITIONAL_EXPRESSION

Conditional structure used in condition chain expressions. Evaluated by evaluating its condition, which is a Boolean-returning expression, and if this returns True, the result is the evaluation result of expression.

Inherits: EL_DECISION_BRANCH

Attributes

result: EL_EXPRESSION [1..1]

Result expression of conditional, if its condition evaluates to True.
Inherited from EL_DECISION_BRANCH

condition: EL_SIMPLE [1..1]

Gate expression that acts as the condition under which the target expression is returned.

Invariants

Inv_condition_boolean: condition.is_boolean()

{
    "name": "EL_CONDITIONAL_EXPRESSION",
    "documentation": "Conditional structure used in condition chain expressions. Evaluated by evaluating its `_condition_`, which is a Boolean-returning expression, and if this returns True, the result is the evaluation result of `_expression_`.",
    "ancestors": [
        "EL_DECISION_BRANCH"
    ],
    "properties": {
        "condition": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "condition",
            "documentation": "Gate expression that acts as the condition under which the target `_expression_` is returned.",
            "is_mandatory": true,
            "type": "EL_SIMPLE"
        }
    },
    "invariants": {
        "Inv_condition_boolean": "condition.is_boolean()"
    }
}
el conditional expression

EL_CASE_TABLE Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_CASE_TABLE

Description

Compound expression consisting of a list of value-range / expression pairs, and an else member that as a whole, represents a case statement flavour of decision table.

Evaluated by iterating through items and for each one, comparing input to the item value_range. If the input is in the range, the evaluation result of the table is that item’s result evaluation result.

If no member of items has a True-returning condition, the evaluation result is the result of evaluating the else expression.

Inherit

EL_DECISION_TABLE

Attributes

Signature

Meaning

1..1
(redefined)

items: List <EL_CASE>

Members of the chain, equivalent to branches in an if/then/else chain and cases in a case statement.

1..1

input: EL_SIMPLE

Input value that is compared against each items[i].value_range to determine the overall result.

EL_CASE_TABLE

Compound expression consisting of a list of value-range / expression pairs, and an else member that as a whole, represents a case statement flavour of decision table.

Evaluated by iterating through items and for each one, comparing input to the item value_range. If the input is in the range, the evaluation result of the table is that item’s result evaluation result.

If no member of items has a True-returning condition, the evaluation result is the result of evaluating the else expression.

Inherits: EL_EXPRESSION, EL_DECISION_TABLE

Attributes

else: EL_EXPRESSION [1..1]

Result expression of the chain if no member of items succeeds in evaluation.
Inherited from EL_DECISION_TABLE

items: List <EL_CASE> [1..1]

Members of the chain, equivalent to branches in an if/then/else chain and cases in a case statement.

input: EL_SIMPLE [1..1]

Input value that is compared against each items[i].value_range to determine the overall result.

Functions

(abstract) eval_type (): BMM_TYPE [1..1]

Meta-type of expression entity used in type-checking and evaluation.

Effected in descendants.
Inherited from EL_EXPRESSION

is_boolean (): Boolean `

Post_result: `Result = eval_type().equal( {BMM_MODEL}.boolean_type_definition())
[1..1]

True if eval_type is notionally Boolean (i.e. a BMM_SIMPLE_TYPE with type_name() = Boolean).
Inherited from EL_EXPRESSION

{
    "name": "EL_CASE_TABLE",
    "documentation": "Compound expression consisting of a list of value-range / expression pairs, and an  `_else_` member that as a whole, represents a case statement flavour of decision table.\n\nEvaluated by iterating through `_items_` and for each one, comparing `_input_` to the item `_value_range_`. If the `_input_` is in the range, the evaluation result of the table is that item's `_result_` evaluation result. \n\nIf no member of `_items_` has a True-returning `_condition_`, the evaluation result is the result of evaluating the `_else_` expression.",
    "ancestors": [
        "EL_DECISION_TABLE"
    ],
    "properties": {
        "items": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "items",
            "documentation": "Members of the chain, equivalent to branches in an if/then/else chain and cases in a case statement.",
            "is_mandatory": true,
            "type_def": {
                "container_type": "List",
                "type": "EL_CASE"
            },
            "cardinality": {
                "lower": 1,
                "upper_unbounded": true
            }
        },
        "input": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "input",
            "documentation": "Input value that is compared against each `_items_[i]._value_range_` to determine the overall result.",
            "is_mandatory": true,
            "type": "EL_SIMPLE"
        }
    }
}
el case table

EL_CASE Class

  • Definition

  • Effective

  • BMM

  • UML

Class

EL_CASE

Inherit

EL_DECISION_BRANCH

Attributes

Signature

Meaning

1..1

value_constraint: `C_OBJECT `

EL_CASE

Inherits: EL_DECISION_BRANCH

Attributes

result: EL_EXPRESSION [1..1]

Result expression of conditional, if its condition evaluates to True.
Inherited from EL_DECISION_BRANCH

value_constraint: `C_OBJECT ` [1..1]

{
    "name": "EL_CASE",
    "ancestors": [
        "EL_DECISION_BRANCH"
    ],
    "properties": {
        "value_constraint": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "value_constraint",
            "is_mandatory": true,
            "type": "C_OBJECT"
        }
    }
}
el case