Class Features
Overview
Within the definition of each class in a BMM model are found the declarations of its features, consisting of routines, properties and constants. The overall meta-model of features, as well as the elements that occur within them, namely parameters and local variables is shown below, and described in this section.
The taxonomy of meta-types that classify the concrete meta-types representing features is somewhat complicated in an object-oriented approach by the presence of procedures, which are declared features (sometimes called commands or modifiers) that change internal object state, rather than returning a value as is the case with all other kinds of features. The consequence is that the cleanest approach to definition of meta-attributes is the use of two taxonomies, one corresponding to feature declarations (including procedures) and one to do with typed value-returning entities, which excludes procedures.
Feature Groups
Features are arranged within a class in feature groups, each represented by an instance of the meta-type BMM_FEATURE_GROUP. By default there is at least one feature group called "feature". Feature groups may be given any name, and are usually used to group features on the basis of things like:
-
meta-type, e.g. a group called
"rules"limited to publicly visible functions only; -
logical feature type, e.g. commands, queries, factory methods etc.
The primary purpose of feature groups is to represent specific meta-data that naturally applies to more than one feature in general, and is thus convenient to represent on a logical container rather than repeat individually. Feature group meta-data is recorded in the properties attribute. A feature group may also set default visibility for all features in the group.
Feature Visibility
Selective visibility of features to external clients is expressed in the attributes BMM_FEATURE_GROUP.visibility with potential overrides achieved using BMM_CLASS_FEATURE.visibility, i.e. at an individual feature level. Visibility is defined using sub-types of the abstract meta-class BMM_VISIBILITY.
TBD: define visibility meta-model; probably need to support C/Java approach and type-based.
Feature Declarations
Features are understood in BMM as entities referenceable within a module or lower context. The 'module' in BMM is the class. Class features consist of the formal sub-parts of a class, namely:
-
routines: procedures and functions;
-
properties: mutable static definitions, described in detail in previous sections;
-
constants: immutable static definitions.
Variables are also understood as a kind of class feature, whose scoping entity is further restricted to a containing routine.
The taxonomy of feature declarations is shown below.
This taxonomy is concerned with model elements that can be lexically declared within some scope. Those elements defined within a class scope have a type signature, i.e. a formal 'shape' in terms of types. This applies even to procedures, which are formal entities despite having no return type.
Typed Entities
For entities with a type, i.e. which can potentially produce a value, the following taxonomy of typing applies.
This taxonomy is concerned with typedness, valuedness, and mutability, which is the notion that a typed value-producing entity may be Void (null) at execution time. Features, which are declarations in context can be mutable, but value objects (e.g. literal values, delayed routine calls) cannot.
Class Model
The class model that results from the above considerations is shown below.
base.bmm.core.feature package - FeaturesA Note on Multiple Inheritance
In the above model, multiple inheritance is used in order to express the design intention of the model. In many modern languages, multiple inheritance of classes containing attributes is not possible. Accordingly, to aid implementation in these languages, the diagram distinguishes the two inheritance hierarchies as follows:
-
the 'true' inheritance hierarchy under the class
BMM_TYPED(shown in green), corresponding to the type taxonomy illustrated in Typed taxonomy above; -
a second hierarchy used to obtain structural elements, under
BMM_DECLARAION(shown in blue), corresponding to the feature taxonomy illustrated in Feature taxonomy above.
The BMM_TYPED hierarchy is the one requiring type substitutability, and is thus implemented using class inheritance (e.g. extends in Java), while the other should be implemented by inheritance of interfaces. This can be achieved as follows:
-
define the interfaces
IBmmRoutine,IBmmClassFeature,IBmmClassEntity,IBmmDeclarationetc, with attributes from the UML model (such asBMM_ROUTINE.parameters) declared as methods and declare the inheritance as interface inheritance (e.g.implementsin Java); -
define a parallel class hierarchy
BmmRoutine, etc whose design follows the UML model above (i.e. defines real attributes) and which are declared as the types of private data elements in the main classes (e.g.BmmFunction, in order to obtain the attributes logically defined byBMM_ROUTINEin the UML); -
implement the methods inherited from the interface hierarchy via a declaration via the appropriate dispatch code referencing the relevant private data member.
The above approach should result in the same semantics as defined by the model shown above.
Differential and Flat Form
In modelling or programming terms, the features defined on a particular class within a model constitute the features it introduces with respect to its inheritance parent(s). We can think of this list of features as the differential set. A 'top-level' class with no declared inheritance ancestor is considered to inherit by default from the Any class, and its feature set is relationally differential to the top class.
In contrast, the effective set of features for an instance at runtime is the result of evaluating these lists of features down the inheritance hierarchy to obtain the flat set of features. The features properties and flat_properties defined on BMM_CLASS provide access to these two lists for any class.
Signatures
All class-scoped features have formal signatures (described in [Signature Meta-type]), realised as BMM_CLASS_ENTITY.signature. This includes procedures, even though they have no return type.
The two types of routines, i.e. functions and procedures, include zero or more formal parameters in their signatures, with functions also having a return type. The standard taxonomy of feature signature types is illustrated below, with each form being controlled by invariants stated in the relevant containing meta-classes (e.g. BMM_FUNCTION, representing a function definition has an invariant requiring signature.result /= Void).
Synthesis due to Generic Parameter Substitution
Due to the possibility of generating concrete types via substitution of concrete generic parameters for formal parameters of generic classes, new concrete types of features may routinely result anywhere in a fully computed in-memory BMM model. BMM allows such features to be synthesised with their resulting concrete types rather than their 'source-defined' open parameter types, and provides the Boolean flag is_synthesised_generic on the class BMM_CLASS_ENTITY to mark any such synthesised feature. An example of the use of this is described below in [_generic_inheritance].
Constants
Constant features in a class are represented by the BMM meta-type BMM_CONSTANT, which is:
-
a descendant of
BMM_CLASS_ENTITYwhosesignaturehas no arguments; and -
a descendant of
BMM_INSTANTIABLEthat is not run-time nullable.
At runtime a constant has a value, which may be of any type, including complex types, and which is set using its generator expression (i.e. an instance of the meta-type EL_INSTANCE_REF). In the common degenerate case, generator consists simply of a literal value, but may also be a function call or other expression valid in the context of the scoping class. This latter capability is the means by which computed constants are supported.
The following abstract syntax illustrates how constants may be defined in a BMM model.
class BASIC_DEFINITIONS
feature
//
// simple constants
//
constant CR: Character = '\015';
constant LF: Character = '\012';
//
// constant of complex type
// TODO: correct JSON (maybe YAML?) or other syntax
//
constant SafeSpeed: Interval<Quantity> = |0.0 km/h .. 60.0 km/h|;
//
// constant generated by a one-time expression evaluation
//
constant ProxyVar<Quantity> = {ProxyVar<Quantity>}(arg1, arg2);
Properties
Class properties are defined via the meta-class BMM_PROPERTY, and its subtypes which distinguish unitary properties (single-valued attributes in a class) from container properties (multiply-valued attributes).
The BMM_PROPERTY meta-type defines semantics common to all properties, including is_composition, which indicates whether the property reference instantiates a part-of relationship or an association.
Unitary versus Container Properties
Single-valued properties in a BMM model are instances of the type BMM_UNITARY_PROPERTY, and have as their type the meta-type UNITARY_TYPE. Container properties are instances of the meta-type BMM_CONTAINER_PROPERTY, which adds the attribute cardinality, enabling the possible number of container elements to be constrained (this corresponds to the multiplicities used at the end of UML associations). The meta-type BMM_INDEXED_CONTAINER_PROPERTY adds the attribute index_type, enabling representation of indexed concrete container types such as Hash<K,V> etc.
A typical example of properties of class is shown below, in which the flattened property view of a class OBSERVATION includes the inherited properties other_participations and links properties exemplifying the container property meta-type:
The following illustrates how various kinds of properties may appear in a BMM model. The first two properties are associations, used to represent references to shared objects (including singletons), while the remainder are normal compositional sub-parts, i.e. owned sub-instances that will cease to exist when the parent object is destroyed. All of the properties are single-valued, other than other_participations, which is defined as a container property with cardinality [*] (i.e. 0..*) and 'set' semantics.
abstract class ENTRY extend CARE_ENTRY
feature -- Locale
association property language: CODE_PHRASE <<"iso::iso_639-2">> [0..1];
association property encoding: CODE_PHRASE <<"iana::character-sets">> [0..1];
feature -- Access
composition property protocol: ITEM_STRUCTURE[1];
composition property guideline_id: OBJECT_REF[0..1];
composition property subject: PARTY_PROXY[0..1];
composition property other_participations: PARTICIPATION[*]{set};
Semantic level
TBD: this BMM feature requires review
Properties also include two other Boolean meta-data items, is_im_runtime and is_im_infrastructure, which can be used to classify property values in a model according to 'semantic level', which roughly corresponds to the continuum from domain-specific to infrastructure. These may be individually set, or both may be False. The three meaningful value settings are as follows:
-
both False: the value of the property is considered to be design-time constrainable;
-
is IM runtime: True if the property value is only knowable at runtime, as is typically the case for identifiers, dates etc;
-
is infrastructure: True if the property is not a user- or business-oriented property, but something required by software design, e.g instance identifier, meta-data etc.
The above screenshot also includes properties have different settings of the is_im_runtime and is_im_infrastructure meta-data flags: property names in black are neither; those in grey are IM runtime (guideline_id, workflow_id), and those in light grey are infrastructure properties (language, encoding, uid, etc).
Functions and Procedures
Functions and procedures are kinds of routine, which are computational features of a class. The classes BMM_FUNCTION, BMM_PROCEDURE and BMM_ROUTINE respectively provide the meta-model for definitions of the two types of routine.
The formal parameter definitions of both kinds of routines are represented by an ordered list of instances of the meta-class BMM_PARAMETER, which is defined as a kind of variable. A formal parameter may optionally have the read/write direction defined, which indicates whether the variable contains an input value, should only be written to, or both, i.e. read then written to. The is_nullable meta-attribute inherited from BMM_TYPED_FEATURE indicates whether each parameter is mandatory or not.
An additional feature of the meta-model for functions is the notion of operator, which supports the representation of a function call in a formal expression as an operator symbol with one or two operands, in the typical form found in programming languages and first order logics. The BMM approach considers an operator as an optional addition to any function of arity 1 or 2 that may reasonably be represented in an abstract syntax using operator syntax. Operators thus support the use of expressions like weight > 90 to mean weight.gt (90), where weight is of type Real, and the function gt(other: Real) is defined.
Any routine may have pre- and/or post-conditions defined for it, represented in BMM by BMM_ASSERTIONs populating the pre_conditions and post_conditions attributes of BMM_ROUINE. An Assertion is a tagged Boolean Expression.
The following abstract syntax illustrates the various elements of function definitions.
abstract class DV_AMOUNT
inherit
DV_QUANTIFIED
feature -- Arithmetic Operations
function equal (other: DV_AMOUNT[1]): Boolean[1]
alias {infix '='};
function less_than (other: DV_AMOUNT[1]): Boolean[1]
alias {infix '<'};
feature -- Arithmetic Operations
function add (other: DV_AMOUNT[1]): DV_AMOUNT[1]
alias {infix '+'};
function subtract (other: DV_AMOUNT[1]): DV_AMOUNT[1]
alias {infix '-'};
function multiply (val: Real[1]): DV_AMOUNT[1]
alias {infix '*'};
function divide (val: Real[1]): DV_AMOUNT[1]
alias {infix '/', infix '÷'};
Pre- and Post-conditions
All BMM routine definitions may include pre- and/or post-conditions, with the semantics of Djikstra’s weakest pre-condition logic ([1]), Object-Z ([2]) and the Eiffel language ([3]).
The essential semantics are as follows:
-
pre-conditions specify truth conditions on public object state and/or parameters that must hold for the routine to execute correctly;
-
if a pre-condition is not met at the moment of routine call, the client (caller) is at fault;
-
-
post-conditions specify truth conditions on public object state and/or result (in the case of functions) that will hold at the end of routine execution;
-
if a post-condition is not met at the moment of routine completion, the routine is at fault, i.e. contains bugs.
-
The use of pre- and post-conditions is also known as design by contract (DbC), a term introduced by Meyer, and is widely used in general IT, particularly in specification languages such as OMG Interface Definition Language (IDL).
The following shows how a routine contract may be specified in an abstract syntax.
class I_EHR_SERVICE
feature -- Creation
create_ehr_with_id (
an_ehr_id: UUID[1];
an_ehr_status: EHR_STATUS[0..1]
): UUID[1]
pre_condition
No_duplicate: not has_ehr (an_ehr_id)
post_condition
Has_ehr: has_ehr (Result)
Creators and Converters
In common with may OOPLs, BMM classes may specify creators, i.e. instance-creating procedures, known as 'constructors' in some OOPLs. These are just a subset of all procedures known in BMM_CLASS.procedures that when executed will satisfy the class invariants. A further subset of the creators are single-argument converters which can initialise a new instance from an instance of another type. Converter routines are typically used to support type conversion in expressions, e.g. String to Date etc. These two subsets are formally defined as the creators and converters reference lists of procedures on BMM_CLASS, as shown in the following UML view.
Creators and converters might be distinguished among other procedures in an abstract syntax as follows.
class Date
inherit
Temporal
convert
create_from_string
feature -- Creators
procedure create_from_string (a_date_str: String[1])
procedure create (a_day, a_month, a_year: Integer[1])
feature -- Modification
procedure set_day (a_day: Integer[1])
Routine Body
BMM supports the definition of statements, i.e. implementation within a ROUTINE as well as 'external' routines, which are represented by an instance of the meta-class BMM_ROUTINE_EXTERNAL. These classes are shown in the following UML view.
The meta-model of statements is described in detail in [_statements].
Variables
At the finest level of detail of a model definition are what are typically thought of as variables within a routine scope. These may be either local variables (variables declared locally within a routine) and parameter variables (declared in the arguments part of a routine declaration). Local variables and parameters have the meta-types BMM_LOCAL and BMM_PARAMETER respectively. The special pre-defined variable Result is automatically available within any function, and is represented by the meta-model type BMM_RESULT.
Model Theoretic Questions
The features meta-model as defined here entails certain choices that have consequences. The primary choice that affects this part of the meta-model is not to treat Void as a type, with the result a procedure is not a typed entity, meaning its signature has no result part. This makes procedures an anomaly within an otherwise typed system of entities, and complicates the inheritance structure of the BMM meta-model. The alternative would have been to treat procedures as Void-returning entities, and thus of type Void (a pseudo-type), as per languages such as C++ and Java, or an equivalent, such as the Unit pseudo-type of Kotlin. The major disadvantage of the latter is that it makes procedure definitions (BMM_PROCEDURE instances within a BMM model) look like typed entities, and as a result, procedure calls look like value-returning entities that could be used within expressions (i.e. no different than function calls).
Ultimately this difficulty arises from the decision to include procedures at all within the formal framework, when from a purely functional perspective they would not exist. Avoiding procedures means going down a pure functional route, which, although providing a cleaner model of pure computation, inevitably entails various artificial and non-intuitive means of making a computational entity do something. BMM has taken the route of objects as black boxes having queries (functions, properties) and commands (procedures), with well-behaved models relying on the principle of command-query separation (CQS), i.e. side-effect free functions. CQS is not enforced by BMM, but its use would make a formal model expressed in BMM more tractable to proof-based tools.
Class Definitions
BMM_TYPED Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_TYPED (abstract) |
|
|---|---|---|
Description |
Any entity that has a declared or inferred static type, and that can therefore be generate a value. |
|
Attributes |
Signature |
Meaning |
1..1 |
type: |
Declared or inferred static type of the entity. |
Functions |
Signature |
Meaning |
1..1 |
is_boolean (): |
True if |
| BMM_TYPED (abstract) | |
|---|---|
Any entity that has a declared or inferred static type, and that can therefore be generate a value. |
|
Attributes |
|
type: |
Declared or inferred static type of the entity. |
Functions |
|
is_boolean (): |
True if |
{
"name": "BMM_TYPED",
"documentation": "Any entity that has a declared or inferred static type, and that can therefore be generate a value.",
"is_abstract": true,
"properties": {
"type": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "type",
"documentation": "Declared or inferred static type of the entity.",
"is_mandatory": true,
"type": "BMM_TYPE"
}
},
"functions": {
"is_boolean": {
"name": "is_boolean",
"documentation": "True if `_type_` is notionally Boolean (i.e. a `BMM_SIMPLE_TYPE` with `_type_name()_` = `'Boolean'`).",
"post_conditions": {
"Post_result": "Result = type().equal( {BMM_MODEL}.boolean_type_definition())"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
BMM_FEATURE_GROUP Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_FEATURE_GROUP |
|
|---|---|---|
Description |
A logical group of features, with a name and set of properties that applies to the group. |
|
Attributes |
Signature |
Meaning |
1..1 |
name: |
Name of this feature group; defaults to 'feature'. |
1..1 |
Set of properties of this group, represented as name/value pairs. These are understood to apply logically to all of the features contained within the group. |
|
0..1 |
features: |
Set of features in this group. |
0..1 |
visibility: |
Optional visibility to apply to all features in this group. |
| BMM_FEATURE_GROUP | |
|---|---|
A logical group of features, with a name and set of properties that applies to the group. |
|
Attributes |
|
name: |
Name of this feature group; defaults to 'feature'. |
Set of properties of this group, represented as name/value pairs. These are understood to apply logically to all of the features contained within the group. |
|
features: |
Set of features in this group. |
visibility: |
Optional visibility to apply to all features in this group. |
{
"name": "BMM_FEATURE_GROUP",
"documentation": "A logical group of features, with a name and set of properties that applies to the group. ",
"properties": {
"name": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "name",
"documentation": "Name of this feature group; defaults to 'feature'.",
"is_mandatory": true,
"type": "String",
"default": "\"feature\""
},
"properties": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "properties",
"documentation": "Set of properties of this group, represented as name/value pairs. These are understood to apply logically to all of the features contained within the group.",
"is_mandatory": true,
"type_def": {
"root_type": "Hash",
"generic_parameters": [
"String",
"String"
]
}
},
"features": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "features",
"documentation": "Set of features in this group.",
"type_def": {
"container_type": "List",
"type": "BMM_CLASS_FEATURE"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"visibility": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "visibility",
"documentation": "Optional visibility to apply to all features in this group.",
"type": "BMM_VISIBILITY"
}
}
}
BMM_VISIBILITY Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_VISIBILITY (abstract) |
|
|---|---|---|
Description |
Abstract parent of visibility representation. TODO: define schemes; probably need to support C++/Java scheme as well as better type-based schemes. |
|
| BMM_VISIBILITY (abstract) | |
|---|---|
Abstract parent of visibility representation. TODO: define schemes; probably need to support C++/Java scheme as well as better type-based schemes. |
{
"name": "BMM_VISIBILITY",
"documentation": "Abstract parent of visibility representation.\n\nTODO: define schemes; probably need to support C++/Java scheme as well as better type-based schemes.",
"is_abstract": true
}
BMM_CLASS_ENTITY Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_CLASS_ENTITY (abstract) |
|
|---|---|---|
Description |
Any entity declared within a class. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
is_synthesised_generic: |
True if this feature was synthesised due to generic substitution in an inherited type, or further constraining of a formal generic parameter. |
Functions |
Signature |
Meaning |
1..1 |
signature (): |
Formal signature of this element, in the form:
Specific implementations in descendants. |
| BMM_CLASS_ENTITY (abstract) | |
|---|---|
Any entity declared within a class. |
|
Inherits: BMM_DECLARATION |
|
Attributes |
|
name: `String ` [1..1] |
Name of this model element. |
Optional documentation of this element, as a keyed list. It is strongly recommended to use the following key /type combinations for the relevant purposes:
Other keys and value types may be freely added. |
|
scope: |
Model element within which an element is declared. |
Optional meta-data of this element, as a keyed list. May be used to extend the meta-model. |
|
is_synthesised_generic: |
True if this feature was synthesised due to generic substitution in an inherited type, or further constraining of a formal generic parameter. |
Functions |
|
is_root_scope (): |
True if this declaration entity is the root of the declaration hierarchy. |
(abstract) signature (): |
Formal signature of this element, in the form:
Specific implementations in descendants. |
{
"name": "BMM_CLASS_ENTITY",
"documentation": "Any entity declared within a class.",
"is_abstract": true,
"ancestors": [
"BMM_DECLARATION"
],
"properties": {
"is_synthesised_generic": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "is_synthesised_generic",
"documentation": "True if this feature was synthesised due to generic substitution in an inherited type, or further constraining of a formal generic parameter.",
"type": "Boolean",
"default": false
}
},
"functions": {
"signature": {
"name": "signature",
"documentation": "Formal signature of this element, in the form:\n\n`name [arg1_name: T_arg1, ...][:T_value]`\n\nSpecific implementations in descendants.",
"is_abstract": true,
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "BMM_SIGNATURE"
}
}
}
}
BMM_CLASS_FEATURE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_CLASS_FEATURE (abstract) |
|
|---|---|---|
Description |
A class entity having a signature and a class as its scope. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
scope: |
Class within which a referenceable element is known. |
0..1 |
visibility: |
Visibility of this item to client entities. |
0..1 |
feature_extensions: |
Extensions to feature-level meta-types. |
1..1 |
group: |
Group containing this feature. |
| BMM_CLASS_FEATURE (abstract) | |
|---|---|
A class entity having a signature and a class as its scope. |
|
Inherits: BMM_DECLARATION, BMM_CLASS_ENTITY |
|
Attributes |
|
name: `String ` [1..1] |
Name of this model element. |
Optional documentation of this element, as a keyed list. It is strongly recommended to use the following key /type combinations for the relevant purposes:
Other keys and value types may be freely added. |
|
scope: |
Class within which a referenceable element is known. |
Optional meta-data of this element, as a keyed list. May be used to extend the meta-model. |
|
is_synthesised_generic: |
True if this feature was synthesised due to generic substitution in an inherited type, or further constraining of a formal generic parameter. |
visibility: |
Visibility of this item to client entities. |
feature_extensions: |
Extensions to feature-level meta-types. |
group: |
Group containing this feature. |
Functions |
|
is_root_scope (): |
True if this declaration entity is the root of the declaration hierarchy. |
(abstract) signature (): |
Formal signature of this element, in the form:
Specific implementations in descendants. |
{
"name": "BMM_CLASS_FEATURE",
"documentation": "A class entity having a signature and a class as its scope.",
"is_abstract": true,
"ancestors": [
"BMM_CLASS_ENTITY"
],
"properties": {
"scope": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "scope",
"documentation": "Class within which a referenceable element is known.",
"is_mandatory": true,
"type": "BMM_CLASS"
},
"visibility": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "visibility",
"documentation": "Visibility of this item to client entities.",
"type": "BMM_VISIBILITY"
},
"feature_extensions": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "feature_extensions",
"documentation": "Extensions to feature-level meta-types.",
"type_def": {
"container_type": "List",
"type": "BMM_FEATURE_EXTENSION"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"group": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "group",
"documentation": "Group containing this feature.",
"is_mandatory": true,
"type": "BMM_FEATURE_GROUP"
}
}
}
BMM_TYPED_FEATURE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_TYPED_FEATURE (abstract) |
|
|---|---|---|
Description |
A typed entity that is a feature within a context, and which may therefore be Void, i.e. 'nullable'. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
is_nullable: |
True if this element can be null (Void) at execution time. May be interpreted as optionality in subtypes.. |
| BMM_TYPED_FEATURE (abstract) | |
|---|---|
A typed entity that is a feature within a context, and which may therefore be Void, i.e. 'nullable'. |
|
Inherits: BMM_TYPED |
|
Attributes |
|
type: |
Declared or inferred static type of the entity. |
is_nullable: |
True if this element can be null (Void) at execution time. May be interpreted as optionality in subtypes.. |
Functions |
|
is_boolean (): |
True if |
{
"name": "BMM_TYPED_FEATURE",
"documentation": "A typed entity that is a feature within a context, and which may therefore be Void, i.e. 'nullable'.",
"is_abstract": true,
"ancestors": [
"BMM_TYPED"
],
"properties": {
"is_nullable": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "is_nullable",
"documentation": "True if this element can be null (Void) at execution time. May be interpreted as optionality in subtypes..",
"type": "Boolean",
"default": false
}
}
}
BMM_INSTANTIABLE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_INSTANTIABLE (abstract) |
|
|---|---|---|
Description |
Meta-type representing instantiable features, i.e. features that are created as value objects. |
|
Inherit |
||
| BMM_INSTANTIABLE (abstract) | |
|---|---|
Meta-type representing instantiable features, i.e. features that are created as value objects. |
|
Inherits: BMM_TYPED, BMM_TYPED_FEATURE |
|
Attributes |
|
type: |
Declared or inferred static type of the entity. |
is_nullable: |
True if this element can be null (Void) at execution time. May be interpreted as optionality in subtypes.. |
Functions |
|
is_boolean (): |
True if |
{
"name": "BMM_INSTANTIABLE",
"documentation": "Meta-type representing instantiable features, i.e. features that are created as value objects.",
"is_abstract": true,
"ancestors": [
"BMM_TYPED_FEATURE"
]
}
BMM_CONSTANT Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_CONSTANT |
|
|---|---|---|
Description |
An immutable, static value-returning element scoped to a class. The |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
generator: |
Generator expression for the constant value. In the degenerate case, this is just a literal value, but may also be any other expression valid in the context. |
Invariants |
Inv_not_nullable: |
|
| BMM_CONSTANT | |
|---|---|
An immutable, static value-returning element scoped to a class. The |
|
Inherits: BMM_TYPED, BMM_TYPED_FEATURE, BMM_DECLARATION, BMM_CLASS_ENTITY, BMM_INSTANTIABLE, BMM_CLASS_FEATURE |
|
Attributes |
|
type: |
Declared or inferred static type of the entity. |
is_nullable: |
True if this element can be null (Void) at execution time. May be interpreted as optionality in subtypes.. |
name: `String ` [1..1] |
Name of this model element. |
Optional documentation of this element, as a keyed list. It is strongly recommended to use the following key /type combinations for the relevant purposes:
Other keys and value types may be freely added. |
|
scope: |
Class within which a referenceable element is known. |
Optional meta-data of this element, as a keyed list. May be used to extend the meta-model. |
|
is_synthesised_generic: |
True if this feature was synthesised due to generic substitution in an inherited type, or further constraining of a formal generic parameter. |
visibility: |
Visibility of this item to client entities. |
feature_extensions: |
Extensions to feature-level meta-types. |
group: |
Group containing this feature. |
generator: |
Generator expression for the constant value. In the degenerate case, this is just a literal value, but may also be any other expression valid in the context. |
Functions |
|
is_boolean (): |
True if |
is_root_scope (): |
True if this declaration entity is the root of the declaration hierarchy. |
(abstract) signature (): |
Formal signature of this element, in the form:
Specific implementations in descendants. |
Invariants |
|
Inv_not_nullable: |
|
{
"name": "BMM_CONSTANT",
"documentation": "An immutable, static value-returning element scoped to a class. The `_value_` is the result of the evaluation of the `_generator_`, which may be as simple as a literal value, or may be any expression, including a function call.",
"ancestors": [
"BMM_INSTANTIABLE",
"BMM_CLASS_FEATURE"
],
"properties": {
"generator": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "generator",
"documentation": "Generator expression for the constant value. In the degenerate case, this is just a literal value, but may also be any other expression valid in the context.",
"is_mandatory": true,
"type": "EL_INSTANCE_REF"
}
},
"invariants": {
"Inv_not_nullable": "is_nullable = False"
}
}
BMM_PROPERTY Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_PROPERTY (abstract) |
|
|---|---|---|
Description |
Meta-type of a property definition within a class definition of an object model. The |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
is_im_runtime: |
True if this property is marked with info model |
0..1 |
is_im_infrastructure: |
True if this property was marked with info model |
0..1 |
is_composition: |
True if this property instance is a compositional sub-part of the owning class instance. Equivalent to 'composition' in UML associations (but missing from UML properties without associations) and also 'cascade-delete' semantics in ER schemas. |
Functions |
Signature |
Meaning |
1..1 |
existence (): `Multiplicity_interval ` |
Interval form of |
1..1 |
display_name (): `String ` |
Name of this property to display in UI. |
Invariants |
Inv_signature_no_args: |
|
| BMM_PROPERTY (abstract) | |
|---|---|
Meta-type of a property definition within a class definition of an object model. The |
|
Inherits: BMM_TYPED, BMM_TYPED_FEATURE, BMM_DECLARATION, BMM_CLASS_ENTITY, BMM_INSTANTIABLE, BMM_CLASS_FEATURE |
|
Attributes |
|
type: |
Declared or inferred static type of the entity. |
is_nullable: |
True if this element can be null (Void) at execution time. May be interpreted as optionality in subtypes.. |
name: `String ` [1..1] |
Name of this model element. |
Optional documentation of this element, as a keyed list. It is strongly recommended to use the following key /type combinations for the relevant purposes:
Other keys and value types may be freely added. |
|
scope: |
Class within which a referenceable element is known. |
Optional meta-data of this element, as a keyed list. May be used to extend the meta-model. |
|
is_synthesised_generic: |
True if this feature was synthesised due to generic substitution in an inherited type, or further constraining of a formal generic parameter. |
visibility: |
Visibility of this item to client entities. |
feature_extensions: |
Extensions to feature-level meta-types. |
group: |
Group containing this feature. |
is_im_runtime: |
True if this property is marked with info model |
is_im_infrastructure: |
True if this property was marked with info model |
is_composition: |
True if this property instance is a compositional sub-part of the owning class instance. Equivalent to 'composition' in UML associations (but missing from UML properties without associations) and also 'cascade-delete' semantics in ER schemas. |
Functions |
|
is_boolean (): |
True if |
is_root_scope (): |
True if this declaration entity is the root of the declaration hierarchy. |
(abstract) signature (): |
Formal signature of this element, in the form:
Specific implementations in descendants. |
existence (): `Multiplicity_interval ` [1..1] |
Interval form of |
display_name (): `String ` [1..1] |
Name of this property to display in UI. |
Invariants |
|
Inv_signature_no_args: |
|
{
"name": "BMM_PROPERTY",
"documentation": "Meta-type of a property definition within a class definition of an object model. The `_is_composition_` attribute indicates whether the property has sub-part or an association semantics with respect to the owning class.",
"is_abstract": true,
"ancestors": [
"BMM_INSTANTIABLE",
"BMM_CLASS_FEATURE"
],
"properties": {
"is_im_runtime": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "is_im_runtime",
"documentation": "True if this property is marked with info model `_im_runtime_` property.",
"type": "Boolean",
"default": false
},
"is_im_infrastructure": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "is_im_infrastructure",
"documentation": "True if this property was marked with info model `_im_infrastructure_` flag.",
"type": "Boolean",
"default": false
},
"is_composition": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "is_composition",
"documentation": "True if this property instance is a compositional sub-part of the owning class instance. Equivalent to 'composition' in UML associations (but missing from UML properties without associations) and also 'cascade-delete' semantics in ER schemas.",
"type": "Boolean",
"default": false
}
},
"functions": {
"existence": {
"name": "existence",
"documentation": "Interval form of `0..1`, `1..1` etc, derived from `_is_nullable_`.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Multiplicity_interval"
}
},
"display_name": {
"name": "display_name",
"documentation": "Name of this property to display in UI.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "String"
}
}
},
"invariants": {
"Inv_signature_no_args": "signature.arguments = Void"
}
}
BMM_UNITARY_PROPERTY Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_UNITARY_PROPERTY |
|
|---|---|---|
Description |
Meta-type of for properties of unitary type. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
type: |
Declared or inferred static type of the entity. |
| BMM_UNITARY_PROPERTY | |
|---|---|
Meta-type of for properties of unitary type. |
|
Inherits: BMM_TYPED, BMM_TYPED_FEATURE, BMM_DECLARATION, BMM_CLASS_ENTITY, BMM_INSTANTIABLE, BMM_CLASS_FEATURE, BMM_PROPERTY |
|
Attributes |
|
type: |
Declared or inferred static type of the entity. |
is_nullable: |
True if this element can be null (Void) at execution time. May be interpreted as optionality in subtypes.. |
name: `String ` [1..1] |
Name of this model element. |
Optional documentation of this element, as a keyed list. It is strongly recommended to use the following key /type combinations for the relevant purposes:
Other keys and value types may be freely added. |
|
scope: |
Class within which a referenceable element is known. |
Optional meta-data of this element, as a keyed list. May be used to extend the meta-model. |
|
is_synthesised_generic: |
True if this feature was synthesised due to generic substitution in an inherited type, or further constraining of a formal generic parameter. |
visibility: |
Visibility of this item to client entities. |
feature_extensions: |
Extensions to feature-level meta-types. |
group: |
Group containing this feature. |
is_im_runtime: |
True if this property is marked with info model |
is_im_infrastructure: |
True if this property was marked with info model |
is_composition: |
True if this property instance is a compositional sub-part of the owning class instance. Equivalent to 'composition' in UML associations (but missing from UML properties without associations) and also 'cascade-delete' semantics in ER schemas. |
Functions |
|
is_boolean (): |
True if |
is_root_scope (): |
True if this declaration entity is the root of the declaration hierarchy. |
(abstract) signature (): |
Formal signature of this element, in the form:
Specific implementations in descendants. |
existence (): `Multiplicity_interval ` [1..1] |
Interval form of |
display_name (): `String ` [1..1] |
Name of this property to display in UI. |
Invariants |
|
Inv_signature_no_args: |
|
{
"name": "BMM_UNITARY_PROPERTY",
"documentation": "Meta-type of for properties of unitary type.",
"ancestors": [
"BMM_PROPERTY"
],
"properties": {
"type": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "type",
"documentation": "Declared or inferred static type of the entity.",
"is_mandatory": true,
"type": "BMM_UNITARY_TYPE"
}
}
}
BMM_CONTAINER_PROPERTY Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_CONTAINER_PROPERTY |
|
|---|---|---|
Description |
Meta-type of for properties of linear container type, such as List<T> etc. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
cardinality: `Multiplicity_interval ` |
Cardinality of this container. |
1..1 |
type: |
Declared or inferred static type of the entity. |
Functions |
Signature |
Meaning |
1..1 |
display_name (): `String ` |
Name of this property in form |
| BMM_CONTAINER_PROPERTY | |
|---|---|
Meta-type of for properties of linear container type, such as List<T> etc. |
|
Inherits: BMM_TYPED, BMM_TYPED_FEATURE, BMM_DECLARATION, BMM_CLASS_ENTITY, BMM_INSTANTIABLE, BMM_CLASS_FEATURE, BMM_PROPERTY |
|
Attributes |
|
type: |
Declared or inferred static type of the entity. |
is_nullable: |
True if this element can be null (Void) at execution time. May be interpreted as optionality in subtypes.. |
name: `String ` [1..1] |
Name of this model element. |
Optional documentation of this element, as a keyed list. It is strongly recommended to use the following key /type combinations for the relevant purposes:
Other keys and value types may be freely added. |
|
scope: |
Class within which a referenceable element is known. |
Optional meta-data of this element, as a keyed list. May be used to extend the meta-model. |
|
is_synthesised_generic: |
True if this feature was synthesised due to generic substitution in an inherited type, or further constraining of a formal generic parameter. |
visibility: |
Visibility of this item to client entities. |
feature_extensions: |
Extensions to feature-level meta-types. |
group: |
Group containing this feature. |
is_im_runtime: |
True if this property is marked with info model |
is_im_infrastructure: |
True if this property was marked with info model |
is_composition: |
True if this property instance is a compositional sub-part of the owning class instance. Equivalent to 'composition' in UML associations (but missing from UML properties without associations) and also 'cascade-delete' semantics in ER schemas. |
cardinality: `Multiplicity_interval ` [0..1] |
Cardinality of this container. |
Functions |
|
is_boolean (): |
True if |
is_root_scope (): |
True if this declaration entity is the root of the declaration hierarchy. |
(abstract) signature (): |
Formal signature of this element, in the form:
Specific implementations in descendants. |
existence (): `Multiplicity_interval ` [1..1] |
Interval form of |
display_name (): `String ` [1..1] |
Name of this property in form |
Invariants |
|
Inv_signature_no_args: |
|
{
"name": "BMM_CONTAINER_PROPERTY",
"documentation": "Meta-type of for properties of linear container type, such as List<T> etc.",
"ancestors": [
"BMM_PROPERTY"
],
"properties": {
"cardinality": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "cardinality",
"documentation": "Cardinality of this container.",
"type": "Multiplicity_interval"
},
"type": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "type",
"documentation": "Declared or inferred static type of the entity.",
"is_mandatory": true,
"type": "BMM_CONTAINER_TYPE"
}
},
"functions": {
"display_name": {
"name": "display_name",
"documentation": "Name of this property in form `name: ContainerTypeName<>`.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "String"
}
}
}
}
BMM_INDEXED_CONTAINER_PROPERTY Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_INDEXED_CONTAINER_PROPERTY |
|
|---|---|---|
Description |
Meta-type of for properties of linear container type, such as |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
Declared or inferred static type of the entity. |
|
Functions |
Signature |
Meaning |
1..1 |
display_name (): `String ` |
Name of this property in form |
| BMM_INDEXED_CONTAINER_PROPERTY | |
|---|---|
Meta-type of for properties of linear container type, such as |
|
Inherits: BMM_TYPED, BMM_TYPED_FEATURE, BMM_DECLARATION, BMM_CLASS_ENTITY, BMM_INSTANTIABLE, BMM_CLASS_FEATURE, BMM_PROPERTY, BMM_CONTAINER_PROPERTY |
|
Attributes |
|
type: |
Declared or inferred static type of the entity. |
is_nullable: |
True if this element can be null (Void) at execution time. May be interpreted as optionality in subtypes.. |
name: `String ` [1..1] |
Name of this model element. |
Optional documentation of this element, as a keyed list. It is strongly recommended to use the following key /type combinations for the relevant purposes:
Other keys and value types may be freely added. |
|
scope: |
Class within which a referenceable element is known. |
Optional meta-data of this element, as a keyed list. May be used to extend the meta-model. |
|
is_synthesised_generic: |
True if this feature was synthesised due to generic substitution in an inherited type, or further constraining of a formal generic parameter. |
visibility: |
Visibility of this item to client entities. |
feature_extensions: |
Extensions to feature-level meta-types. |
group: |
Group containing this feature. |
is_im_runtime: |
True if this property is marked with info model |
is_im_infrastructure: |
True if this property was marked with info model |
is_composition: |
True if this property instance is a compositional sub-part of the owning class instance. Equivalent to 'composition' in UML associations (but missing from UML properties without associations) and also 'cascade-delete' semantics in ER schemas. |
cardinality: `Multiplicity_interval ` [0..1] |
Cardinality of this container. |
Functions |
|
is_boolean (): |
True if |
is_root_scope (): |
True if this declaration entity is the root of the declaration hierarchy. |
(abstract) signature (): |
Formal signature of this element, in the form:
Specific implementations in descendants. |
existence (): `Multiplicity_interval ` [1..1] |
Interval form of |
display_name (): `String ` [1..1] |
Name of this property in form |
Invariants |
|
Inv_signature_no_args: |
|
{
"name": "BMM_INDEXED_CONTAINER_PROPERTY",
"documentation": "Meta-type of for properties of linear container type, such as `Hash<Index_type, T>` etc.",
"ancestors": [
"BMM_CONTAINER_PROPERTY"
],
"properties": {
"type": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "type",
"documentation": "Declared or inferred static type of the entity.",
"is_mandatory": true,
"type": "BMM_INDEXED_CONTAINER_TYPE"
}
},
"functions": {
"display_name": {
"name": "display_name",
"documentation": "Name of this property in form `name: ContainerTypeName<IndexTypeName, ...>`.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "String"
}
}
}
}
BMM_ROUTINE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_ROUTINE (abstract) |
|
|---|---|---|
Description |
A feature defining a routine, scoped to a class. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
parameters: |
Formal parameters of the routine. |
0..1 |
Local variables of the routine. |
|
0..1 |
pre_conditions: |
|
0..1 |
post_conditions: |
|
0..1 |
body: |
Body of a routine, i.e. executable program. |
Functions |
Signature |
Meaning |
1..1 |
arity (): `Integer ` |
Return number of arguments of this routine. |
1..1 |
signature (): `/classes/ ` |
Formal signature of this element, in the form
|
| BMM_ROUTINE (abstract) | |
|---|---|
A feature defining a routine, scoped to a class. |
|
Inherits: BMM_DECLARATION, BMM_CLASS_ENTITY, BMM_CLASS_FEATURE |
|
Attributes |
|
name: `String ` [1..1] |
Name of this model element. |
Optional documentation of this element, as a keyed list. It is strongly recommended to use the following key /type combinations for the relevant purposes:
Other keys and value types may be freely added. |
|
scope: |
Class within which a referenceable element is known. |
Optional meta-data of this element, as a keyed list. May be used to extend the meta-model. |
|
is_synthesised_generic: |
True if this feature was synthesised due to generic substitution in an inherited type, or further constraining of a formal generic parameter. |
visibility: |
Visibility of this item to client entities. |
feature_extensions: |
Extensions to feature-level meta-types. |
group: |
Group containing this feature. |
parameters: |
Formal parameters of the routine. |
Local variables of the routine. |
|
pre_conditions: |
|
post_conditions: |
|
body: |
Body of a routine, i.e. executable program. |
Functions |
|
is_root_scope (): |
True if this declaration entity is the root of the declaration hierarchy. |
signature (): `/classes/ ` [1..1] |
Formal signature of this element, in the form
|
arity (): `Integer ` [1..1] |
Return number of arguments of this routine. |
{
"name": "BMM_ROUTINE",
"documentation": "A feature defining a routine, scoped to a class.",
"is_abstract": true,
"ancestors": [
"BMM_CLASS_FEATURE"
],
"properties": {
"parameters": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "parameters",
"documentation": "Formal parameters of the routine.",
"type_def": {
"container_type": "List",
"type": "BMM_PARAMETER"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"locals": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "locals",
"documentation": "Local variables of the routine.",
"type_def": {
"container_type": "List",
"type": "BMM_LOCAL"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"pre_conditions": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "pre_conditions",
"type_def": {
"container_type": "List",
"type": "BMM_ASSERTION"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"post_conditions": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "post_conditions",
"type_def": {
"container_type": "List",
"type": "BMM_ASSERTION"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"body": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "body",
"documentation": "Body of a routine, i.e. executable program.",
"type": "BMM_ROUTINE_BODY"
}
},
"functions": {
"arity": {
"name": "arity",
"documentation": "Return number of arguments of this routine.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Integer"
}
},
"signature": {
"name": "signature",
"documentation": "Formal signature of this element, in the form\n\n`'[arg1_name: T_arg1, ...]:T_value'`.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": ""
}
}
}
}
BMM_FUNCTION Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_FUNCTION |
|
|---|---|---|
Description |
A formal element with signature of the form: |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
operator_definition: |
Optional details enabling a function to be represented as an operator in a syntactic representation. |
1..1 |
result: |
Automatically created Result variable, usable in body and post-condition. |
Invariants |
Operator_validity: |
|
Inv_signature_has_result: |
||
Inv_result_type: |
||
| BMM_FUNCTION | |
|---|---|
A formal element with signature of the form: |
|
Inherits: BMM_TYPED, BMM_DECLARATION, BMM_CLASS_ENTITY, BMM_CLASS_FEATURE, BMM_TYPED_FEATURE, BMM_ROUTINE |
|
Attributes |
|
type: |
Declared or inferred static type of the entity. |
is_nullable: |
True if this element can be null (Void) at execution time. May be interpreted as optionality in subtypes.. |
name: `String ` [1..1] |
Name of this model element. |
Optional documentation of this element, as a keyed list. It is strongly recommended to use the following key /type combinations for the relevant purposes:
Other keys and value types may be freely added. |
|
scope: |
Class within which a referenceable element is known. |
Optional meta-data of this element, as a keyed list. May be used to extend the meta-model. |
|
is_synthesised_generic: |
True if this feature was synthesised due to generic substitution in an inherited type, or further constraining of a formal generic parameter. |
visibility: |
Visibility of this item to client entities. |
feature_extensions: |
Extensions to feature-level meta-types. |
group: |
Group containing this feature. |
parameters: |
Formal parameters of the routine. |
Local variables of the routine. |
|
pre_conditions: |
+ Inherited from BMM_ROUTINE |
post_conditions: |
+ Inherited from BMM_ROUTINE |
body: |
Body of a routine, i.e. executable program. |
operator_definition: |
Optional details enabling a function to be represented as an operator in a syntactic representation. |
result: |
Automatically created Result variable, usable in body and post-condition. |
Functions |
|
is_boolean (): |
True if |
is_root_scope (): |
True if this declaration entity is the root of the declaration hierarchy. |
signature (): `/classes/ ` [1..1] |
Formal signature of this element, in the form
|
arity (): `Integer ` [1..1] |
Return number of arguments of this routine. |
Invariants |
|
Operator_validity: |
|
Inv_signature_has_result: |
|
Inv_result_type: |
|
{
"name": "BMM_FUNCTION",
"documentation": "A formal element with signature of the form: `name ({arg:TArg}*):TResult`. A function is a computed (rather than data) element, generally assumed to be non-state-changing.",
"ancestors": [
"BMM_TYPED_FEATURE",
"BMM_ROUTINE"
],
"properties": {
"operator_definition": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "operator_definition",
"documentation": "Optional details enabling a function to be represented as an operator in a syntactic representation.",
"type": "BMM_OPERATOR"
},
"result": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "result",
"documentation": "Automatically created Result variable, usable in body and post-condition.",
"is_mandatory": true,
"type": "BMM_RESULT"
}
},
"invariants": {
"Operator_validity": "operator_def /= Void implies arity in |1..2|",
"Inv_signature_has_result": "signature.result /= Void",
"Inv_result_type": "type = Result.type"
}
}
BMM_OPERATOR Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_OPERATOR |
|
|---|---|---|
Description |
Definition of a symbolic operator associated with a function. |
|
Attributes |
Signature |
Meaning |
1..1 |
position: |
Position of operator in syntactic representation. |
1..1 |
Set of |
|
1..1 |
name: `String ` |
Formal name of the operator, e.g. 'minus' etc. |
| BMM_OPERATOR | |
|---|---|
Definition of a symbolic operator associated with a function. |
|
Attributes |
|
position: |
Position of operator in syntactic representation. |
Set of |
|
name: `String ` [1..1] |
Formal name of the operator, e.g. 'minus' etc. |
{
"name": "BMM_OPERATOR",
"documentation": "Definition of a symbolic operator associated with a function.",
"properties": {
"position": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "position",
"documentation": "Position of operator in syntactic representation.",
"is_mandatory": true,
"type": "BMM_OPERATOR_POSITION"
},
"symbols": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "symbols",
"documentation": "Set of `String` symbols that may be used to represent this operator in a textual representation of a BMM model.",
"is_mandatory": true,
"type_def": {
"container_type": "List",
"type": "String"
},
"cardinality": {
"lower": 1,
"upper_unbounded": true
}
},
"name": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "name",
"documentation": "Formal name of the operator, e.g. 'minus' etc.",
"is_mandatory": true,
"type": "String"
}
}
}
BMM_OPERATOR_POSITION Enumeration
-
Definition
-
Effective
-
BMM
-
UML
Enumeration |
BMM_OPERATOR_POSITION |
|
|---|---|---|
Description |
Enumeration of possible position of operator in a syntactic representation for operators associated with 1- and 2- degree functions. |
|
Constants |
Signature |
Meaning |
prefix |
Prefix operator position: operator comes before operand. |
|
infix |
Infix operator position: operator comes between left and right operands. |
|
| BMM_OPERATOR_POSITION | |
|---|---|
Enumeration of possible position of operator in a syntactic representation for operators associated with 1- and 2- degree functions. |
|
Inherits: String |
|
Constants |
|
prefix |
Prefix operator position: operator comes before operand. |
infix |
Infix operator position: operator comes between left and right operands. |
{
"_type": "P_BMM_ENUMERATION_STRING",
"name": "BMM_OPERATOR_POSITION",
"documentation": "Enumeration of possible position of operator in a syntactic representation for operators associated with 1- and 2- degree functions.",
"ancestors": [
"String"
],
"item_names": [
"prefix",
"infix"
],
"item_documentations": [
"Prefix operator position: operator comes before operand.",
"Infix operator position: operator comes between left and right operands."
]
}
BMM_PROCEDURE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_PROCEDURE |
|
|---|---|---|
Description |
A formal element with signature of the form: |
|
Inherit |
||
Invariants |
Inv_signature_no_result: |
|
| BMM_PROCEDURE | |
|---|---|
A formal element with signature of the form: |
|
Inherits: BMM_DECLARATION, BMM_CLASS_ENTITY, BMM_CLASS_FEATURE, BMM_ROUTINE |
|
Attributes |
|
name: `String ` [1..1] |
Name of this model element. |
Optional documentation of this element, as a keyed list. It is strongly recommended to use the following key /type combinations for the relevant purposes:
Other keys and value types may be freely added. |
|
scope: |
Class within which a referenceable element is known. |
Optional meta-data of this element, as a keyed list. May be used to extend the meta-model. |
|
is_synthesised_generic: |
True if this feature was synthesised due to generic substitution in an inherited type, or further constraining of a formal generic parameter. |
visibility: |
Visibility of this item to client entities. |
feature_extensions: |
Extensions to feature-level meta-types. |
group: |
Group containing this feature. |
parameters: |
Formal parameters of the routine. |
Local variables of the routine. |
|
pre_conditions: |
+ Inherited from BMM_ROUTINE |
post_conditions: |
+ Inherited from BMM_ROUTINE |
body: |
Body of a routine, i.e. executable program. |
Functions |
|
is_root_scope (): |
True if this declaration entity is the root of the declaration hierarchy. |
signature (): `/classes/ ` [1..1] |
Formal signature of this element, in the form
|
arity (): `Integer ` [1..1] |
Return number of arguments of this routine. |
Invariants |
|
Inv_signature_no_result: |
|
{
"name": "BMM_PROCEDURE",
"documentation": "A formal element with signature of the form: `name ({arg:TArg}*)`. A procedure is a computed (rather than data) element, generally assumed to be state-changing.",
"ancestors": [
"BMM_ROUTINE"
],
"invariants": {
"Inv_signature_no_result": "signature.result = Void"
}
}
BMM_VARIABLE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_VARIABLE (abstract) |
|
|---|---|---|
Description |
A mutable entity whose scope is a routine. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
scope: |
Routine within which variable is defined. |
Functions |
Signature |
Meaning |
1..1 |
signature (): `/classes/ ` |
Formal signature of this element, in the form |
| BMM_VARIABLE (abstract) | |
|---|---|
A mutable entity whose scope is a routine. |
|
Inherits: BMM_TYPED, BMM_TYPED_FEATURE, BMM_DECLARATION, BMM_INSTANTIABLE, BMM_CLASS_ENTITY |
|
Attributes |
|
type: |
Declared or inferred static type of the entity. |
is_nullable: |
True if this element can be null (Void) at execution time. May be interpreted as optionality in subtypes.. |
name: `String ` [1..1] |
Name of this model element. |
Optional documentation of this element, as a keyed list. It is strongly recommended to use the following key /type combinations for the relevant purposes:
Other keys and value types may be freely added. |
|
scope: |
Routine within which variable is defined. |
Optional meta-data of this element, as a keyed list. May be used to extend the meta-model. |
|
is_synthesised_generic: |
True if this feature was synthesised due to generic substitution in an inherited type, or further constraining of a formal generic parameter. |
Functions |
|
is_boolean (): |
True if |
is_root_scope (): |
True if this declaration entity is the root of the declaration hierarchy. |
signature (): `/classes/ ` [1..1] |
Formal signature of this element, in the form |
{
"name": "BMM_VARIABLE",
"documentation": "A mutable entity whose scope is a routine.",
"is_abstract": true,
"ancestors": [
"BMM_INSTANTIABLE",
"BMM_CLASS_ENTITY"
],
"properties": {
"scope": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "scope",
"documentation": "Routine within which variable is defined.",
"is_mandatory": true,
"type": "BMM_ROUTINE"
}
},
"functions": {
"signature": {
"name": "signature",
"documentation": "Formal signature of this element, in the form `'name [arg1_name: T_arg1, ...][:T_value]'`.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": ""
}
}
}
}
BMM_LOCAL Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_LOCAL |
|
|---|---|---|
Description |
A routine local variable. |
|
Inherit |
||
| BMM_LOCAL | |
|---|---|
A routine local variable. |
|
Inherits: BMM_TYPED, BMM_TYPED_FEATURE, BMM_DECLARATION, BMM_INSTANTIABLE, BMM_CLASS_ENTITY, BMM_VARIABLE |
|
Attributes |
|
type: |
Declared or inferred static type of the entity. |
is_nullable: |
True if this element can be null (Void) at execution time. May be interpreted as optionality in subtypes.. |
name: `String ` [1..1] |
Name of this model element. |
Optional documentation of this element, as a keyed list. It is strongly recommended to use the following key /type combinations for the relevant purposes:
Other keys and value types may be freely added. |
|
scope: |
Routine within which variable is defined. |
Optional meta-data of this element, as a keyed list. May be used to extend the meta-model. |
|
is_synthesised_generic: |
True if this feature was synthesised due to generic substitution in an inherited type, or further constraining of a formal generic parameter. |
Functions |
|
is_boolean (): |
True if |
is_root_scope (): |
True if this declaration entity is the root of the declaration hierarchy. |
signature (): `/classes/ ` [1..1] |
Formal signature of this element, in the form |
{
"name": "BMM_LOCAL",
"documentation": "A routine local variable.",
"ancestors": [
"BMM_VARIABLE"
]
}
BMM_PARAMETER Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_PARAMETER |
|
|---|---|---|
Description |
A routine parameter variable. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
direction: |
Optional read/write direction of the parameter. If none-supplied, the parameter is treated as |
| BMM_PARAMETER | |
|---|---|
A routine parameter variable. |
|
Inherits: BMM_TYPED, BMM_TYPED_FEATURE, BMM_DECLARATION, BMM_INSTANTIABLE, BMM_CLASS_ENTITY, BMM_VARIABLE |
|
Attributes |
|
type: |
Declared or inferred static type of the entity. |
is_nullable: |
True if this element can be null (Void) at execution time. May be interpreted as optionality in subtypes.. |
name: `String ` [1..1] |
Name of this model element. |
Optional documentation of this element, as a keyed list. It is strongly recommended to use the following key /type combinations for the relevant purposes:
Other keys and value types may be freely added. |
|
scope: |
Routine within which variable is defined. |
Optional meta-data of this element, as a keyed list. May be used to extend the meta-model. |
|
is_synthesised_generic: |
True if this feature was synthesised due to generic substitution in an inherited type, or further constraining of a formal generic parameter. |
direction: |
Optional read/write direction of the parameter. If none-supplied, the parameter is treated as |
Functions |
|
is_boolean (): |
True if |
is_root_scope (): |
True if this declaration entity is the root of the declaration hierarchy. |
signature (): `/classes/ ` [1..1] |
Formal signature of this element, in the form |
{
"name": "BMM_PARAMETER",
"documentation": "A routine parameter variable.",
"ancestors": [
"BMM_VARIABLE"
],
"properties": {
"direction": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "direction",
"documentation": "Optional read/write direction of the parameter. If none-supplied, the parameter is treated as `in`, i.e. readable.",
"type": "BMM_PARAMETER_DIRECTION"
}
}
}
BMM_RESULT Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_RESULT |
|
|---|---|---|
Description |
Automatically declared variable representing result instance of a Function call. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
name: |
Name of this model element. |
| BMM_RESULT | |
|---|---|
Automatically declared variable representing result instance of a Function call. |
|
Inherits: BMM_TYPED, BMM_TYPED_FEATURE, BMM_DECLARATION, BMM_INSTANTIABLE, BMM_CLASS_ENTITY, BMM_VARIABLE |
|
Attributes |
|
type: |
Declared or inferred static type of the entity. |
is_nullable: |
True if this element can be null (Void) at execution time. May be interpreted as optionality in subtypes.. |
name: |
Name of this model element. |
Optional documentation of this element, as a keyed list. It is strongly recommended to use the following key /type combinations for the relevant purposes:
Other keys and value types may be freely added. |
|
scope: |
Routine within which variable is defined. |
Optional meta-data of this element, as a keyed list. May be used to extend the meta-model. |
|
is_synthesised_generic: |
True if this feature was synthesised due to generic substitution in an inherited type, or further constraining of a formal generic parameter. |
Functions |
|
is_boolean (): |
True if |
is_root_scope (): |
True if this declaration entity is the root of the declaration hierarchy. |
signature (): `/classes/ ` [1..1] |
Formal signature of this element, in the form |
{
"name": "BMM_RESULT",
"documentation": "Automatically declared variable representing result instance of a Function call.",
"ancestors": [
"BMM_VARIABLE"
],
"properties": {
"name": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "name",
"documentation": "Name of this model element.",
"is_mandatory": true,
"type": "String",
"default": "\"Result\""
}
}
}
BMM_PARAMETER_DIRECTION Enumeration
-
Definition
-
Effective
-
BMM
-
UML
Enumeration |
BMM_PARAMETER_DIRECTION |
|
|---|---|---|
Description |
Enumeration of parameter read/write direction values. |
|
Constants |
Signature |
Meaning |
in |
Parameter is an input parameter, and treated as readonly by the receiving routine. |
|
out |
Parameter is an output parameter, and treated as a reference to an entity writeable by the receiving routine. |
|
in_out |
Parameter is an input and output parameter, and treated as a reference to an entity readable and writeable by the receiving routine. |
|
| BMM_PARAMETER_DIRECTION | |
|---|---|
Enumeration of parameter read/write direction values. |
|
Inherits: String |
|
Constants |
|
in |
Parameter is an input parameter, and treated as readonly by the receiving routine. |
out |
Parameter is an output parameter, and treated as a reference to an entity writeable by the receiving routine. |
in_out |
Parameter is an input and output parameter, and treated as a reference to an entity readable and writeable by the receiving routine. |
{
"_type": "P_BMM_ENUMERATION_STRING",
"name": "BMM_PARAMETER_DIRECTION",
"documentation": "Enumeration of parameter read/write direction values.",
"ancestors": [
"String"
],
"item_names": [
"in",
"out",
"in_out"
],
"item_documentations": [
"Parameter is an input parameter, and treated as readonly by the receiving routine.",
"Parameter is an output parameter, and treated as a reference to an entity writeable by the receiving routine.",
"Parameter is an input and output parameter, and treated as a reference to an entity readable and writeable by the receiving routine."
]
}
BMM_ROUTINE_BODY Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_ROUTINE_BODY (abstract) |
|
|---|---|---|
Description |
Abstract ancestor of routine body meta-types. |
|
| BMM_ROUTINE_BODY (abstract) | |
|---|---|
Abstract ancestor of routine body meta-types. |
{
"name": "BMM_ROUTINE_BODY",
"documentation": "Abstract ancestor of routine body meta-types.",
"is_abstract": true
}
BMM_ROUTINE_EXTERNAL Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_ROUTINE_EXTERNAL |
|
|---|---|---|
Description |
External routine placeholder, containing sufficient meta-data to enable a routine in an external library to be called. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
External call general meta-data, including target routine name, type mapping etc. |
|
0..1 |
Optional argument-mapping meta-data. |
|
| BMM_ROUTINE_EXTERNAL | |
|---|---|
External routine placeholder, containing sufficient meta-data to enable a routine in an external library to be called. |
|
Inherits: BMM_ROUTINE_BODY |
|
Attributes |
|
External call general meta-data, including target routine name, type mapping etc. |
|
Optional argument-mapping meta-data. |
|
{
"name": "BMM_ROUTINE_EXTERNAL",
"documentation": "External routine placeholder, containing sufficient meta-data to enable a routine in an external library to be called.",
"ancestors": [
"BMM_ROUTINE_BODY"
],
"properties": {
"meta_data": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "meta_data",
"documentation": "External call general meta-data, including target routine name, type mapping etc.",
"is_mandatory": true,
"type_def": {
"root_type": "Hash",
"generic_parameters": [
"String",
"String"
]
}
},
"argument_mapping": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "argument_mapping",
"documentation": "Optional argument-mapping meta-data.",
"type_def": {
"root_type": "Hash",
"generic_parameters": [
"String",
"String"
]
}
}
}
}
-
[1] E. W. Dijkstra, A discipline of programming. Prentice-Hall Englewood Cliffs, N.J, 1976.
-
[2] G. Smith, The Object Z Specification Language. Kluwer Academic Publishers, 2000. [Online]. Available: http://www.itee.uq.edu.au/~smith/objectz.html
-
[3] B. Meyer, Object-oriented Software Construction, Second. Prentice Hall, 1997.