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:
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. 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 UML model of the BMM expression package, consisting of mostly direct equivalents of the taxonomy classes above, is shown below.
bmm.expression PackageEL 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.
Most EL_EXPRESSIONs are either value generating constructs (EL_VALUE_GENERATOR) or operator expressions. The special sub-type E_TUPLE represents tuple objects which are created on the fly by inline expressions of the form [expr, expr, …].
Terminal Entities
Terminal entities are atomic with respect to operator expressions, and are either simple entities of familiar kinds (function calls, variable references etc) or else complex logic structures that when evaluated generate a value.
Simple Terminal Entities
The simple terminal meta-types in EL are as follows:
-
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); -
value generators (
EL_VALUE_GENERATOR) based on formal model elements that may be called to (potentially) obtain an instance at runtime; -
predicates: Boolean-generating expression elements formed by predicates applied to any of the other value-generating expression elements.
Literals
A literal value may appear 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 or a complex object instance in a structured serial format (such as JSON, a JSON derivative, ODIN format etc), specified by BMM_LITERAL_VALUE.syntax.
Value Generators
Value generators are categorised as follows:
-
feature references: (
EL_FEATURE_REF)-
references to instantiable features: symbolic references to properties and constants (
EL_PROPERTY_REF,EL_CONSTANT_REF); -
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);
-
-
variable reference: references to variables within the scope of the current routine, including local variables, parameters, the current object (
Self), or the current function result (Result) (EL_VARIABLE); -
a type reference: (
EL_TYPE_REF) a reference representing a type object assumed to be available at runtime, on which argumentless function calls and constants may be accessed.
The arguments of function calls and delayed routine calls may be complex expressions, but will eventually resolved to literal values and instance references. Consequently, the value generated by any expression is ultimately founded upon literal values and instance references.
To be valid, any model-based feature reference must have a scoping object (represented via the attribute scope in EL_SCOPED), which is one of:
-
the current object - implied;
-
another object, which may be designated via:
-
a specified scoping object, achieved through 'dot-notation' in most languages;
-
a type reference.
-
Feature References
In BMM, a feature reference is any symbolic reference to a class feature 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.
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_conditionsorpost_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_timeto access the class functioncurrent_timedefined 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.
Variables
Symbolic variables (meta-type EL_VARIABLE) are one of the following:
-
variables declared locally in a routine (
EL_VARIABLE.definition=BMM_LOCAL); -
named arguments of a routine (
EL_VARIABLE.definition=BMM_PARAMETER); -
a special variable called 'Result' representing the result object of a function (
EL_VARIABLE.definition=BMM_RESULT); -
a special variable (often called 'this' or 'self' in object-oriented programming languages) to refer to the object acting as the context for enclosed statements (
EL_VARIABLE.definition=BMM_SELF).
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 UML shows the predicate meta-types.
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.
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 structure found in procedural and most object-oriented programming languages:
-
an if/then/elseif/else condition chain (meta-classes
EL_CONDITION_CHAINandEL_CONDITIONAL_EXPRESSION); and -
a case statement style table (meta-classes
EL_CASE_TABLEandEL_CASE), whose conditions are value intervals against which the table’sinputvalue 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.
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 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
===================
;
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 UML shows the relevant meta-types.
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.
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);
}
);
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.
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 |
eval_type (): |
Meta-type of expression entity used in type-checking and evaluation. Effected in descendants. |
1..1 |
is_boolean (): |
True if |
| EL_EXPRESSION (abstract) | |
|---|---|
Abstract parent of all typed expression meta-types. |
|
Functions |
|
(abstract) eval_type (): |
Meta-type of expression entity used in type-checking and evaluation. Effected in descendants. |
is_boolean (): |
True if |
{
"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_TERMINAL Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
EL_TERMINAL (abstract) |
|
|---|---|---|
Description |
Expression terminal entity, representing one of:
|
|
Inherit |
||
| EL_TERMINAL (abstract) | |
|---|---|
Expression terminal entity, representing one of:
|
|
Inherits: EL_EXPRESSION, EL_SIMPLE |
|
Functions |
|
(abstract) eval_type (): |
Meta-type of expression entity used in type-checking and evaluation. Effected in descendants. |
is_boolean (): |
True if |
{
"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_SIMPLE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
EL_SIMPLE (abstract) |
|
|---|---|---|
Description |
Simple expression type that may be used in other simple expressions. |
|
Inherit |
||
| EL_SIMPLE (abstract) | |
|---|---|
Simple expression type that may be used in other simple expressions. |
|
Inherits: EL_EXPRESSION |
|
Functions |
|
(abstract) eval_type (): |
Meta-type of expression entity used in type-checking and evaluation. Effected in descendants. |
is_boolean (): |
True if |
{
"name": "EL_SIMPLE",
"documentation": "Simple expression type that may be used in other simple expressions.",
"is_abstract": true,
"ancestors": [
"EL_EXPRESSION"
]
}
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 May be used as a value, or as the qualifier for a function or constant access. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
type: |
Type, directly from the name of the reference, e.g. |
Functions |
Signature |
Meaning |
1..1 |
eval_type (): |
Return |
Invariants |
Inv_no_context: |
|
| 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 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: |
Type, directly from the name of the reference, e.g. |
Functions |
|
eval_type (): |
Return |
is_boolean (): |
True if |
Invariants |
|
Inv_no_context: |
|
{
"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_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 |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
value: |
The reference item from which the value of this node can be computed. |
Functions |
Signature |
Meaning |
1..1 |
eval_type (): |
Return |
Invariants |
Post_manifest_effective_type: |
|
| EL_LITERAL | |
|---|---|
Literal value of any type known in the model, including primitive types. Defined via a |
|
Inherits: EL_EXPRESSION, EL_SIMPLE, EL_TERMINAL, EL_INSTANCE_REF |
|
Attributes |
|
value: |
The reference item from which the value of this node can be computed. |
Functions |
|
eval_type (): |
Return |
is_boolean (): |
True if |
Invariants |
|
Post_manifest_effective_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_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: |
The agent being called. |
Invariants |
Inv_valid_call: |
|
| EL_AGENT_CALL (abstract) | |
|---|---|
A call made to a 'closed' agent, i.e. one with no remaining open arguments. |
|
Attributes |
|
agent: |
The agent being called. |
Invariants |
|
Inv_valid_call: |
|
{
"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_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 |
||
Attributes |
Signature |
Meaning |
1..1 |
agent: |
The function agent being called. |
Functions |
Signature |
Meaning |
1..1 |
eval_type (): |
Return |
Invariants |
Inv_valid_agent: |
|
| 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: |
Reference to an owning object for this terminal element, if it is not the current scope. |
agent: |
The function agent being called. |
Functions |
|
eval_type (): |
Return |
is_boolean (): |
True if |
Invariants |
|
Inv_valid_call: |
|
Inv_valid_agent: |
|
{
"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_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 Evaluation type (i.e. type of runtime evaluated form) is |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
name: `String ` |
Name of the routine being called. |
0..1 |
closed_args: |
Closed arguments of a routine call as a tuple of objects. |
0..1 |
Optional list of names of open arguments of the call. If not provided, and the |
|
0..1 |
definition: |
Reference to definition of a routine for which this is an agent, if one exists. |
Functions |
Signature |
Meaning |
1..1 |
eval_type (): |
Eval type is the signature corresponding to the (remaining) open arguments and return type, if any. |
1..1 |
is_callable (): |
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 Evaluation type (i.e. type of runtime evaluated form) is |
|
Inherits: EL_EXPRESSION, EL_SIMPLE, EL_TERMINAL, EL_INSTANCE_REF, EL_SCOPED_REF |
|
Attributes |
|
scope: |
Reference to an owning object for this terminal element, if it is not the current scope. |
name: `String ` [1..1] |
Name of the routine being called. |
closed_args: |
Closed arguments of a routine call as a tuple of objects. |
Optional list of names of open arguments of the call. If not provided, and the |
|
definition: |
Reference to definition of a routine for which this is an agent, if one exists. |
Functions |
|
eval_type (): |
Eval type is the signature corresponding to the (remaining) open arguments and return type, if any. |
is_boolean (): |
True if |
is_callable (): |
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_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 |
||
Attributes |
Signature |
Meaning |
0..1 |
definition: |
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: |
Reference to an owning object for this terminal element, if it is not the current scope. |
name: `String ` [1..1] |
Name of the routine being called. |
closed_args: |
Closed arguments of a routine call as a tuple of objects. |
Optional list of names of open arguments of the call. If not provided, and the |
|
definition: |
Reference to definition of a routine for which this is a direct call instance, if one exists. |
Functions |
|
eval_type (): |
Eval type is the signature corresponding to the (remaining) open arguments and return type, if any. |
is_boolean (): |
True if |
is_callable (): |
True if there are no open arguments. |
{
"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_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 |
||
Attributes |
Signature |
Meaning |
0..1 |
definition: |
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: |
Reference to an owning object for this terminal element, if it is not the current scope. |
name: `String ` [1..1] |
Name of the routine being called. |
closed_args: |
Closed arguments of a routine call as a tuple of objects. |
Optional list of names of open arguments of the call. If not provided, and the |
|
definition: |
Reference to definition of routine for which this is a call instance. |
Functions |
|
eval_type (): |
Eval type is the signature corresponding to the (remaining) open arguments and return type, if any. |
is_boolean (): |
True if |
is_callable (): |
True if there are no open arguments. |
{
"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_PREDICATE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
EL_PREDICATE (abstract) |
|
|---|---|---|
Description |
Parent type of predicate of any object reference. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
operand: |
The target instance of this predicate. |
Functions |
Signature |
Meaning |
1..1 |
eval_type (): |
Return |
| EL_PREDICATE (abstract) | |
|---|---|
Parent type of predicate of any object reference. |
|
Inherits: EL_EXPRESSION, EL_SIMPLE, EL_TERMINAL |
|
Attributes |
|
operand: |
The target instance of this predicate. |
Functions |
|
eval_type (): |
Return |
is_boolean (): |
True if |
{
"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_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.
|
|||
Inherit |
||||
| 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.
|
|||
Inherits: EL_EXPRESSION, EL_SIMPLE, EL_TERMINAL, EL_PREDICATE |
|||
Attributes |
|||
operand: |
The target instance of this predicate. |
||
Functions |
|||
eval_type (): |
Return |
||
is_boolean (): |
True if |
||
{
"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_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_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: |
The target instance of this predicate. |
Functions |
|
eval_type (): |
Return |
is_boolean (): |
True if |
{
"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_DECISION_TABLE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
EL_DECISION_TABLE (abstract) |
|
|---|---|---|
Description |
Complex expression structure representing a logical decision table. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
else: |
Result expression of the chain if no member of |
1..1 |
items: |
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: |
Result expression of the chain if no member of |
items: |
Members of the chain, equivalent to branches in an if/then/else chain and cases in a case statement. |
Functions |
|
(abstract) eval_type (): |
Meta-type of expression entity used in type-checking and evaluation. Effected in descendants. |
is_boolean (): |
True if |
{
"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_BRANCH Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
EL_DECISION_BRANCH (abstract) |
|
|---|---|---|
Attributes |
Signature |
Meaning |
1..1 |
result: |
Result expression of conditional, if its |
| EL_DECISION_BRANCH (abstract) | |
|---|---|
Attributes |
|
result: |
Result expression of conditional, if its |
{
"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_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 Evaluated by iterating through If no member of |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
items: |
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 Evaluated by iterating through If no member of |
|
Inherits: EL_EXPRESSION, EL_DECISION_TABLE |
|
Attributes |
|
else: |
Result expression of the chain if no member of |
items: |
Members of the chain, equivalent to branches in an if/then/else chain and cases in a case statement. |
Functions |
|
(abstract) eval_type (): |
Meta-type of expression entity used in type-checking and evaluation. Effected in descendants. |
is_boolean (): |
True if |
{
"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_CONDITIONAL_EXPRESSION Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
EL_CONDITIONAL_EXPRESSION |
|
|---|---|---|
Description |
Conditional structure used in condition chain expressions. Evaluated by evaluating its |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
condition: |
Gate expression that acts as the condition under which the target |
Invariants |
Inv_condition_boolean: |
|
| EL_CONDITIONAL_EXPRESSION | |
|---|---|
Conditional structure used in condition chain expressions. Evaluated by evaluating its |
|
Inherits: EL_DECISION_BRANCH |
|
Attributes |
|
result: |
Result expression of conditional, if its |
condition: |
Gate expression that acts as the condition under which the target |
Invariants |
|
Inv_condition_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_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 Evaluated by iterating through If no member of |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
Members of the chain, equivalent to branches in an if/then/else chain and cases in a case statement. |
|
1..1 |
input: |
Input value that is compared against each |
| EL_CASE_TABLE | |
|---|---|
Compound expression consisting of a list of value-range / expression pairs, and an Evaluated by iterating through If no member of |
|
Inherits: EL_EXPRESSION, EL_DECISION_TABLE |
|
Attributes |
|
else: |
Result expression of the chain if no member of |
Members of the chain, equivalent to branches in an if/then/else chain and cases in a case statement. |
|
input: |
Input value that is compared against each |
Functions |
|
(abstract) eval_type (): |
Meta-type of expression entity used in type-checking and evaluation. Effected in descendants. |
is_boolean (): |
True if |
{
"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 Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
EL_CASE |
|
|---|---|---|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
value_constraint: `C_OBJECT ` |
|
| EL_CASE | |
|---|---|
Inherits: EL_DECISION_BRANCH |
|
Attributes |
|
result: |
Result expression of conditional, if its |
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_OPERATOR Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
EL_OPERATOR (abstract) |
|
|---|---|---|
Description |
Abstract parent of operator types. |
|
Inherit |
||
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 |
1..1 |
definition: |
Function equivalent to this operator, inferred by matching operator against functions defined in interface of principal operand. |
Functions |
Signature |
Meaning |
1..1 |
operator_definition (): |
Operator definition derived from |
1..1 |
equivalent_call (): |
Function call equivalent to this operator. |
Invariants |
Symbol_validity: |
|
| 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 |
definition: |
Function equivalent to this operator, inferred by matching operator against functions defined in interface of principal operand. |
Functions |
|
(abstract) eval_type (): |
Meta-type of expression entity used in type-checking and evaluation. Effected in descendants. |
is_boolean (): |
True if |
operator_definition (): |
Operator definition derived from |
equivalent_call (): |
Function call equivalent to this operator. |
Invariants |
|
Symbol_validity: |
|
{
"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_UNARY_OPERATOR Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
EL_UNARY_OPERATOR |
|
|---|---|---|
Description |
Unary operator expression node. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
operand: |
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. |
symbol: `String ` [0..1] |
The symbol actually used in the expression, or intended to be used for serialisation. Must be a member of |
definition: |
Function equivalent to this operator, inferred by matching operator against functions defined in interface of principal operand. |
operand: |
Operand node. |
Functions |
|
(abstract) eval_type (): |
Meta-type of expression entity used in type-checking and evaluation. Effected in descendants. |
is_boolean (): |
True if |
operator_definition (): |
Operator definition derived from |
equivalent_call (): |
Function call equivalent to this operator. |
Invariants |
|
Symbol_validity: |
|
{
"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_BINARY_OPERATOR Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
EL_BINARY_OPERATOR |
|
|---|---|---|
Description |
Binary operator expression node. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
left_operand: |
Left operand node. |
1..1 |
right_operand: |
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. |
symbol: `String ` [0..1] |
The symbol actually used in the expression, or intended to be used for serialisation. Must be a member of |
definition: |
Function equivalent to this operator, inferred by matching operator against functions defined in interface of principal operand. |
left_operand: |
Left operand node. |
right_operand: |
Right operand node. |
Functions |
|
(abstract) eval_type (): |
Meta-type of expression entity used in type-checking and evaluation. Effected in descendants. |
is_boolean (): |
True if |
operator_definition (): |
Operator definition derived from |
equivalent_call (): |
Function call equivalent to this operator. |
Invariants |
|
Symbol_validity: |
|
{
"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_TUPLE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
EL_TUPLE |
|
|---|---|---|
Description |
Defines an array of optionally named items each of any type. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
items: |
Items in the tuple, potentially with names. Typical use is to represent an argument list to routine call. |
1..1 |
type: |
Static type inferred from literal value. |
Functions |
Signature |
Meaning |
1..1 |
eval_type (): |
Return |
| 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: |
Items in the tuple, potentially with names. Typical use is to represent an argument list to routine call. |
type: |
Static type inferred from literal value. |
Functions |
|
eval_type (): |
Return |
is_boolean (): |
True if |
{
"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_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: |
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: |
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_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 |
||
Attributes |
Signature |
Meaning |
1..1 |
base_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: |
The base expression of this constrained form. |
Functions |
|
(abstract) eval_type (): |
Meta-type of expression entity used in type-checking and evaluation. Effected in descendants. |
is_boolean (): |
True if |
{
"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_BOOLEAN_EXPRESSION Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
EL_BOOLEAN_EXPRESSION |
|
|---|---|---|
Description |
Boolean-returning expression. |
|
Inherit |
||
Invariants |
Inv_boolean_expression: |
|
| EL_BOOLEAN_EXPRESSION | |
|---|---|
Boolean-returning expression. |
|
Inherits: EL_EXPRESSION, EL_CONSTRAINED |
|
Attributes |
|
base_expression: |
The base expression of this constrained form. |
Functions |
|
(abstract) eval_type (): |
Meta-type of expression entity used in type-checking and evaluation. Effected in descendants. |
is_boolean (): |
True if |
Invariants |
|
Inv_boolean_expression: |
|
{
"name": "EL_BOOLEAN_EXPRESSION",
"documentation": "Boolean-returning expression.",
"ancestors": [
"EL_CONSTRAINED"
],
"invariants": {
"Inv_boolean_expression": "base_expression.is_boolean()"
}
}