Classes

Overview

This section describes the semantics of the BMM_CLASS meta-class, its sub-types, constituent parts and relationships. Classes in BMM are generators of types, and are what is authored (i.e. 'programmed') in order to create a model or program text.

The formally typed parts of a class are collectively known as features, and consist of functions, procedures, constants and properties, which appear in feature groups. Within a class, all features are contained in the features attribute (inherited from BMM_MODULE), with features of each specific type being referenced in a dedicated map (BMM_CLASS.properties etc). The following UML illustrates classes and relationships to constituent feature meta-types. Features are described in detail in the following section.

LANG bmm.core class
Figure 1. base.bmm.core Package - Classes

Class definitions are the definitional basis of a BMM model, i.e. they are the means of defining the types that are statically used in the model, and the dynamic types generated at runtime. Types are thus derived entities.

The top meta-class BMM_CLASS defines two properties inherent in classes defined in a model, and derived in resulting types: is_abstract and is_primitive. The Boolean attribute is_abstract indicates a class that cannot be directly instantiated. The attribute is_primitive indicates that a class is considered to be part of a primitive type set (typically corresponding to primitive types in another type system). Primitive status has no effect on BMM model semantics, and is provided as a convenience for visualisation and type-system mapping.

BMM distinguishes between simple and generic class definitions via two descendants of BMM_CLASS, i.e. BMM_SIMPLE_CLASS and BMM_GENERIC_CLASS, with the first providing a concrete form of BMM_CLASS that applies to non-generic classes, and the latter defining the additional semantics of generic classes. The meta-type BMM_ENUMERATION is a specialisation of BMM_SIMPLE_CLASS used to represent enumeration classes in BMM models. The meta-types are further described below.

Simple Classes

The simplest type of class definition in a model is an instance of the meta-type BMM_SIMPLE_CLASS, and has a 1:1 relationship with its type. Such classes might be specified in the following abstract syntax:

class DvQuantity
{
    feature
        // feature definitions
}

class Observation
{
    feature
        // feature definitions
}

Generic Classes

The generic class meta-type BMM_GENERIC_CLASS adds generic parameters to BMM_CLASS, enabling formal generic parameters to be represented. Each such parameter is expressed using an instance of BMM_PARAMETER_TYPE which names the parameter and optionally allows a type constraint to be associated with it, in the usual object-oriented fashion. In BMM, formal parameters have single-letter names, such as 'T', 'U' etc, following typical usage in programming languages. A generic class may also be primitive. Generic classes can be defined in a syntax similar to the following.

//
// a primitive generic class with an open type parameter
//
primitive class List <T>

feature
    // feature definitions


//
// a generic class with a constrained type parameter
//
class DvInterval <T:DvOrdered>

feature
    // feature definitions

//
// a primitive generic class two type parameters
//
primitive class HashMap <K:Ordered, V>

feature
    // feature definitions

The following example shows a generic class Interval<T:Ordered>, which is a class Interval with one formal parameter T constrained to be of type Ordered or any descendant.

awb generic class
Figure 2. BMM class - generic class

Range-Constrained Classes

The value range of any defined type is by default open, meaning that its instances may take any value allowed by the type definition. For primitive types such as String and Integer, this means that any String or Integer value is a valid instance of their respective types. For complex types, instances are composed of hierarchies of values which are similarly unconstrained with respect to their types.

A useful derived form of any concrete type definition (i.e. instance of BMM_EFFECTIVE_TYPE in a model) is one that constrains the legal values of its instances to a particular set of values. The Pascal language provided a well-known precedent, 'sub-range types' that could restrict primitive type value ranges. BMM supports two kinds of range constraint: enumeration and 'value sets'. The additional meta-classes are shown below.

LANG bmm.core.range constrained
Figure 3. bmm.core.range_constrained Package - Constrained-range Meta-Types, including Enumeration

Enumerated Types

In modern programming languages, the enumerated type is the most common kind of range constraint mechanism. In Java for example, an enumeration is a finite set of labels each associated with a singleton value object - either automatically assigned integers, or else programmatically associated instances of any other kind. Enumerated types are supported in BMM via the BMM_ENUMERATION meta-type and descendants.

An enumerated type could in theory be based on any BMM defined type, i.e. any simple or generic type, since instances of either could be constrained. BMM makes the simplification that an enumerated type can only be based on a BMM simple type, which means that in the defined model, an enumeration of a closed generic type Gen<T_subst> is achieved by first defining a simple type based on the closed generic type via inheritance, e.g. a type Gen_T_subst that inherits from Gen<T_subst> can be used as the ancestor of a BMM enumeration type.

For this reason, the BMM_ENUMERATION meta-type is defined as a descendant of BMM_SIMPLE_CLASS, and may have only one ancestor. The value enumeration is represented via a set of enumeration labels (item_names) and constant values (item_values), the latter of which must be of the type represented in the concrete model by the instance of the ancestor class.

Since String and Integer valued enumerations are by far the most common in real models, two descendant classes BMM_ENUMERATION_STRING and BMM_ENUMERATION_INTEGER are provided, which fix the values and types to String and Integer respectively.

The following diagram shows the BMM instance structure corresponding to an attribute declaration lifecycle: TaskLifecycle in a class Order.

bmm structure enumeration
Figure 4. Integer-based Enumeration Type

The following shows the same class in an abstract syntax.

// an Integer-based enumeration
enumeration class TASK_LIFECYCLE

feature -- Enumeration Literals

    planned   = 0;
    available = 1;
    cancelled = 2;
    aborted   = 3;
    abandoned = 4;
    underway  = 5;
    suspended = 6;
    resumed   = 7;
    completed = 8;

The following screenshot shows how this enumeration class appears within a BMM model.

awb enumeration
Figure 5. Enumeration Example

The following shows another enumeration class, this time based on the String type.

// a String-based enumeration
enumeration class ContractStatus

feature -- Enumeration Literals
    initial   = "Initial";
    cancelled = "Cancelled";
    active    = "Active";
    completed = "Completed";

The types String and Integer are assumed to be defined via primitive classes of the same names.

Value-set Types

Another form of range constraint that occurs in many models is the use of 'coded terms' that represent codes from e.g. ISO or IANA value sets such as ISO 639 (languages) and IANA media types. These are particularly prevalent in type systems used in the biosciences where object models routinely include attributes of a Coded Term type that refer to terminologies such as SNOMED CT, WHO ICD10 etc. In such models, it is typical to want to define an attribute being not just of a Coded Term type, but also limited to a particular terminology (such as a coded attribute representing 'language'), or even a specific 'value set' from such a terminology.

The same kind of constraint may be applied to any kind of model type, for example a type representing Medication may be constrained to be instantiated only as instances defined by a medications database. This kind of constraint is known here as a value set, following the common usage in the biomedical sciences, and is supported in a different way than enumerations. The latter is a common programming concept which always involves a dedicated type representing the enumeration. Since the required value-sets are represented explicitly in the model but in an external database or other resource, the constraint is limited to a reference to the relevant resource, and is applied directly to the use of a type within a feature definition, rather than requiring the definition of a new type.

Accordingly, BMM provides the attribute value_constraint: BMM_VALUE_SET_SPEC defined on BMM_MODEL_TYPE. The BMM_VALUE_SET_SPEC meta-type contains two String attributes resource_id and value_set_id which may be used to define a resource (equivalently a namespace) and an identifier of a value set within that resource. BMM does not impose any particular format or resolution algorithm on these identifiers - it is assumed that they can be correctly defined and used within the context of the concrete model usage.

Consequently, an attribute within a standard concrete model such as language: CodedTerm could now be expressed notionally as language: CodedTerm <<iso::639-*>> or language: CodedTerm <<iso::languages>>. The construction within the <<>> is parsed into two pieces around the :: separator, which are then used to populate the BMM_VALUE_SET_SPEC for a type.

The following diagram shows the meta-model structure corresponding to an attribute declaration language: CodedText whose instances are constrained to be from a value-set iso_639-2 within the resource namespace iso.

bmm structure value set
Figure 6. Value-set Constrained Type

The following shows a possible abstract syntax value-set type definition.

// a Value-set type
class Document

feature
    property language: CodedText <<"iso::iso_639-2">> [1];

Class Qualifiers

The following sub-sections describe qualifiers that may be used on any class definition to achieve a specific status within the model system. BMM qualifiers are designed to map to typical features in programming languages.

Abstract Classes

Any class definition in a BMM model may be marked as 'abstract', to indicate that it cannot be directly instantiated. This qualifier generally maps to the concept of abstract classes in most OOPLs. It may be specified in an abstract syntax as follows.

abstract class ENTRY

feature
    // feature definitions

Primitive Type Classes

Class definitions within a BMM model may be marked as 'primitive', enabling them to be visualised and queried as a separate group without otherwise changing the semantics of the entity in the BMM meta-type system. This is normally done to distinguish 'built-in' types used by a model from the classes for which the model was created. An abstract syntax definition may look as follows:

primitive class Integer

feature
    // feature definitions


primitive class String

feature
    // feature definitions

The following shows part of a BMM model in which a number of classes are classified as primitive (shown in light and dark grey).

awb primitive types
Figure 7. Primitive classes

Primitive classes are normal BMM classes, other than being marked primitive for convenience, and do not have different semantics.

Class Invariants

A class defined within a model may include invariants, i.e. assertions relating to its state that hold true before and after all public routine calls. Assertions are instances of the class BMM_ASSERTION, which is a tagged Boolean-valued Expression.

The following shows classes with invariants.

//
// a class with simple invariants
//
class COMPOSITION

feature
    // feature definitions

invariant
    Is_archetype_root: is_archetype_root
    Content_valid: content /= Void implies not content.is_empty


//
// a class with more complex invariants
//
class VERSIONED_COMPOSITION

feature
    // feature definitions

invariant
    Archetype_node_id_valid: all_versions.for_all (
        agent (v: VERSION) {
            v.archetype_node_id.is_equal (all_versions.first.archetype_node_id);
        }
    )

    Persistent_validity: all_versions.for_all (
        agent (v: VERSION) {
            v.is_persistent = all_versions.first.data.is_persistent;
        }
    )

Inheritance

Inheritance in BMM is a relation between a class and one or more types, rather than classes, as in many class-based formalisms. This is primarily to allow classes to be based on specific generic types, rather than just the 'open' type represented by the underlying classes. Multiple inheritance is permitted, with same-named features from different types being treated as clashes needing resolution. See [inheritance_semantics] for a detailed description.

Model Theoretic Questions

The class meta-model as defined here entails certain choices that have consequences, including:

  • All Enumeration types are based on literal values (i.e. not only names), which may be of any concrete type, including constructed types.

Class Definitions

BMM_CLASS Class

  • Definition

  • Effective

  • BMM

  • UML

Class

BMM_CLASS (abstract)

Description

Meta-type corresponding a class definition in an object model. Inheritance is specified by the ancestors attribute, which contains a list of types rather than classes. Inheritance is thus understood in BMM as a stated relationship between classes. The equivalent relationship between types is conformance.

unlike UML, the name is just the root name, even if the class is generic. Use type_name() to obtain the qualified type name.

Inherit

BMM_MODULE

Attributes

Signature

Meaning

0..1

ancestors: List <String >

List of immediate inheritance parents.

1..1

package: BMM_PACKAGE

Package this class belongs to.

0..1

properties: Hash <String ,BMM_PROPERTY>

List of attributes defined in this class.

1..1

source_schema_id: `String `

Reference to original source schema defining this class. Useful for UI tools to determine which original schema file to open for a given class for manual editing.

0..1

immediate_descendants: List <BMM_CLASS>

List of computed references to base classes of immediate inheritance descendants, derived when members of ancestors are attached at creation time.

1..1

is_override: `Boolean `

True if this definition overrides a class of the same name in an included schema.

0..1

constants: Hash <String ,BMM_CONSTANT>

List of constants defined in this class.

0..1

functions: Hash <String ,BMM_FUNCTION>

List of functions defined in this class.

0..1

procedures: Hash <String ,BMM_PROCEDURE>

List of procedures defined in this class.

0..1

is_primitive: Boolean `
`{default = false}

True if this class represents a type considered to be primitive in the type system, i.e. any typically built-in or standard library type such as String, Date, Hash<K,V> etc.

0..1

is_abstract: Boolean `
`{default = false}

True if this class is marked as abstract, i.e. direct instances cannot be created from its direct type.

0..1

invariants: List <BMM_ASSERTION>

0..1

creators: List <String >

Subset of procedures that may be used to initialise a new instance of an object, and whose execution will guarantee that class invariants are satisfied.

0..1

converters: List <String >

Subset of creators that create a new instance from a single argument of another type.

0..1

feature_groups: List <BMM_FEATURE_GROUP>

List of feature groups in this class.

Functions

Signature

Meaning

1..1
(abstract)

type (): BMM_MODEL_TYPE

Generate a type object that represents the type for which this class is the definer.

0..1

all_ancestors (): List <String >

List of all inheritance parent class names, recursively.

0..1

all_descendants (): List <String >

Compute all descendants by following immediate_descendants.

0..1

suppliers (): List <String >

List of names of immediate supplier classes, including concrete generic parameters, concrete descendants of abstract statically defined types, and inherited suppliers. (Where generics are unconstrained, no class name is added, since logically it would be Any and this can always be assumed anyway). This list includes primitive types.

0..1

suppliers_non_primitive (): List <String >

Same as suppliers minus primitive types, as defined in input schema.

0..1

supplier_closure (): List <String >

List of names of all classes in full supplier closure, including concrete generic parameters; (where generics are unconstrained, no class name is added, since logically it would be Any and this can always be assumed anyway). This list includes primitive types.

1..1

package_path (): `String `

Fully qualified package name, of form: package.package.

1..1

class_path (): `String `

Fully qualified class name, of form: package.package.CLASS with package path in lower-case and class in original case.

1..1

is_primitive (): `Boolean `

True if this class is designated a primitive type within the overall type system of the schema. Set from schema.

1..1

is_abstract (): `Boolean `

True if this class is abstract in its model. Value provided from an underlying data property set at creation or construction time.

0..1

features (): List <BMM_CLASS_FEATURE>

List of all feature definitions introduced in this class.

0..1

flat_features (): List <BMM_CLASS_FEATURE>

Consolidated list of all feature definitions from this class and all inheritance ancestors.

0..1

flat_properties (): List <BMM_PROPERTY>

List of all properties due to current and ancestor classes, keyed by property name.

Invariants

Inv_constructors: for_all p in creators : procedures.has(p)

Inv_converters: for_all p in converters : creators.has(p) and p.arity() = 1

BMM_CLASS (abstract)

Meta-type corresponding a class definition in an object model. Inheritance is specified by the ancestors attribute, which contains a list of types rather than classes. Inheritance is thus understood in BMM as a stated relationship between classes. The equivalent relationship between types is conformance.

unlike UML, the name is just the root name, even if the class is generic. Use type_name() to obtain the qualified type name.

Inherits: BMM_DECLARATION, BMM_MODULE

Attributes

name: `String ` [1..1]

Name of this model element.
Inherited from BMM_DECLARATION

documentation: Hash <String ,Any > [0..1]

Optional documentation of this element, as a keyed list.

It is strongly recommended to use the following key /type combinations for the relevant purposes:

  • "purpose": String

  • "keywords": List<String>

  • "use": String

  • "misuse": String

  • "references": String

Other keys and value types may be freely added.
Inherited from BMM_DECLARATION

scope: BMM_MODEL [1..1]

Model within which module is defined.
Inherited from BMM_MODULE

extensions: Hash <String ,Any > [0..1]

Optional meta-data of this element, as a keyed list. May be used to extend the meta-model.
Inherited from BMM_DECLARATION

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

List of immediate inheritance parents.

package: BMM_PACKAGE [1..1]

Package this class belongs to.

properties: Hash <String ,BMM_PROPERTY> [0..1]

List of attributes defined in this class.

source_schema_id: `String ` [1..1]

Reference to original source schema defining this class. Useful for UI tools to determine which original schema file to open for a given class for manual editing.

immediate_descendants: List <BMM_CLASS> [0..1]

List of computed references to base classes of immediate inheritance descendants, derived when members of ancestors are attached at creation time.

is_override: `Boolean ` [1..1]

True if this definition overrides a class of the same name in an included schema.

constants: Hash <String ,BMM_CONSTANT> [0..1]

List of constants defined in this class.

functions: Hash <String ,BMM_FUNCTION> [0..1]

List of functions defined in this class.

procedures: Hash <String ,BMM_PROCEDURE> [0..1]

List of procedures defined in this class.

is_primitive: Boolean ` [0..1]
`{default = false}

True if this class represents a type considered to be primitive in the type system, i.e. any typically built-in or standard library type such as String, Date, Hash<K,V> etc.

is_abstract: Boolean ` [0..1]
`{default = false}

True if this class is marked as abstract, i.e. direct instances cannot be created from its direct type.

invariants: List <BMM_ASSERTION> [0..1]

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

Subset of procedures that may be used to initialise a new instance of an object, and whose execution will guarantee that class invariants are satisfied.

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

Subset of creators that create a new instance from a single argument of another type.

feature_groups: List <BMM_FEATURE_GROUP> [0..1]

List of feature groups in this class.

Functions

is_root_scope (): Boolean `

Post_result: `Result = (scope = self)
[1..1]

True if this declaration entity is the root of the declaration hierarchy.
Inherited from BMM_DECLARATION

(abstract) type (): BMM_MODEL_TYPE [1..1]

Generate a type object that represents the type for which this class is the definer.

all_ancestors (): List <String > [0..1]

List of all inheritance parent class names, recursively.

all_descendants (): List <String > [0..1]

Compute all descendants by following immediate_descendants.

suppliers (): List <String > [0..1]

List of names of immediate supplier classes, including concrete generic parameters, concrete descendants of abstract statically defined types, and inherited suppliers. (Where generics are unconstrained, no class name is added, since logically it would be Any and this can always be assumed anyway). This list includes primitive types.

suppliers_non_primitive (): List <String > [0..1]

Same as suppliers minus primitive types, as defined in input schema.

supplier_closure (): List <String > [0..1]

List of names of all classes in full supplier closure, including concrete generic parameters; (where generics are unconstrained, no class name is added, since logically it would be Any and this can always be assumed anyway). This list includes primitive types.

package_path (): `String ` [1..1]

Fully qualified package name, of form: package.package.

class_path (): `String ` [1..1]

Fully qualified class name, of form: package.package.CLASS with package path in lower-case and class in original case.

is_primitive (): `Boolean ` [1..1]

True if this class is designated a primitive type within the overall type system of the schema. Set from schema.

is_abstract (): `Boolean ` [1..1]

True if this class is abstract in its model. Value provided from an underlying data property set at creation or construction time.

features (): List <BMM_CLASS_FEATURE> [0..1]

List of all feature definitions introduced in this class.

flat_features (): List <BMM_CLASS_FEATURE> [0..1]

Consolidated list of all feature definitions from this class and all inheritance ancestors.

flat_properties (): List <BMM_PROPERTY> [0..1]

List of all properties due to current and ancestor classes, keyed by property name.

Invariants

Inv_constructors: for_all p in creators : procedures.has(p)

Inv_converters: for_all p in converters : creators.has(p) and p.arity() = 1

{
    "name": "BMM_CLASS",
    "documentation": "Meta-type corresponding a class definition in an object model. Inheritance is specified by the `_ancestors_` attribute, which contains a list of _types_ rather than classes. Inheritance is thus understood in BMM as a stated relationship between classes. The equivalent relationship between types is conformance.\n\nNOTE: unlike UML, the `_name_` is just the root name, even if the class is generic. Use `_type_name()_` to obtain the qualified type name.",
    "is_abstract": true,
    "ancestors": [
        "BMM_MODULE"
    ],
    "properties": {
        "ancestors": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "ancestors",
            "documentation": "List of immediate inheritance parents.",
            "type_def": {
                "container_type": "List",
                "type": "String"
            },
            "cardinality": {
                "lower": 0,
                "upper_unbounded": true
            }
        },
        "package": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "package",
            "documentation": "Package this class belongs to.",
            "is_mandatory": true,
            "type": "BMM_PACKAGE"
        },
        "properties": {
            "_type": "P_BMM_GENERIC_PROPERTY",
            "name": "properties",
            "documentation": "List of attributes defined in this class.",
            "type_def": {
                "root_type": "Hash",
                "generic_parameters": [
                    "String",
                    "BMM_PROPERTY"
                ]
            }
        },
        "source_schema_id": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "source_schema_id",
            "documentation": "Reference to original source schema defining this class. Useful for UI tools to determine which original schema file to open for a given class for manual editing.",
            "is_mandatory": true,
            "type": "String"
        },
        "immediate_descendants": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "immediate_descendants",
            "documentation": "List of computed references to base classes of immediate inheritance descendants, derived when members of `_ancestors_` are attached at creation time.",
            "type_def": {
                "container_type": "List",
                "type": "BMM_CLASS"
            },
            "cardinality": {
                "lower": 0,
                "upper_unbounded": true
            }
        },
        "is_override": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "is_override",
            "documentation": "True if this definition overrides a class of the same name in an included schema.",
            "is_mandatory": true,
            "type": "Boolean"
        },
        "constants": {
            "_type": "P_BMM_GENERIC_PROPERTY",
            "name": "constants",
            "documentation": "List of constants defined in this class.",
            "type_def": {
                "root_type": "Hash",
                "generic_parameters": [
                    "String",
                    "BMM_CONSTANT"
                ]
            }
        },
        "functions": {
            "_type": "P_BMM_GENERIC_PROPERTY",
            "name": "functions",
            "documentation": "List of functions defined in this class.",
            "type_def": {
                "root_type": "Hash",
                "generic_parameters": [
                    "String",
                    "BMM_FUNCTION"
                ]
            }
        },
        "procedures": {
            "_type": "P_BMM_GENERIC_PROPERTY",
            "name": "procedures",
            "documentation": "List of procedures defined in this class.",
            "type_def": {
                "root_type": "Hash",
                "generic_parameters": [
                    "String",
                    "BMM_PROCEDURE"
                ]
            }
        },
        "is_primitive": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "is_primitive",
            "documentation": "True if this class represents a type considered to be primitive in the type system, i.e. any typically built-in or standard library type such as `String`, `Date`, `Hash<K,V>` etc.",
            "type": "Boolean",
            "default": false
        },
        "is_abstract": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "is_abstract",
            "documentation": "True if this class is marked as abstract, i.e. direct instances cannot be created from its direct type.",
            "type": "Boolean",
            "default": false
        },
        "invariants": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "invariants",
            "type_def": {
                "container_type": "List",
                "type": "BMM_ASSERTION"
            },
            "cardinality": {
                "lower": 0,
                "upper_unbounded": true
            }
        },
        "creators": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "creators",
            "documentation": "Subset of `_procedures_` that may be used to initialise a new instance of an object, and whose execution will guarantee that class invariants are satisfied.",
            "type_def": {
                "container_type": "List",
                "type": "String"
            },
            "cardinality": {
                "lower": 0,
                "upper_unbounded": true
            }
        },
        "converters": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "converters",
            "documentation": "Subset of `_creators_` that create a new instance from a single argument of another type.",
            "type_def": {
                "container_type": "List",
                "type": "String"
            },
            "cardinality": {
                "lower": 0,
                "upper_unbounded": true
            }
        },
        "feature_groups": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "feature_groups",
            "documentation": "List of feature groups in this class.",
            "type_def": {
                "container_type": "List",
                "type": "BMM_FEATURE_GROUP"
            },
            "cardinality": {
                "lower": 0,
                "upper_unbounded": true
            }
        }
    },
    "functions": {
        "type": {
            "name": "type",
            "documentation": "Generate a type object that represents the type for which this class is the definer.",
            "is_abstract": true,
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "BMM_MODEL_TYPE"
            }
        },
        "all_ancestors": {
            "name": "all_ancestors",
            "documentation": "List of all inheritance parent class names, recursively.",
            "result": {
                "_type": "P_BMM_CONTAINER_TYPE",
                "container_type": "List",
                "type": "String"
            },
            "is_nullable": true
        },
        "all_descendants": {
            "name": "all_descendants",
            "documentation": "Compute all descendants by following `_immediate_descendants_`.",
            "result": {
                "_type": "P_BMM_CONTAINER_TYPE",
                "container_type": "List",
                "type": "String"
            },
            "is_nullable": true
        },
        "suppliers": {
            "name": "suppliers",
            "documentation": "List of names of immediate supplier classes, including concrete generic parameters, concrete descendants of abstract statically defined types, and inherited suppliers. (Where generics are unconstrained, no class name is added, since logically it would be `Any` and this can always be assumed anyway). This list includes primitive types.\n",
            "result": {
                "_type": "P_BMM_CONTAINER_TYPE",
                "container_type": "List",
                "type": "String"
            },
            "is_nullable": true
        },
        "suppliers_non_primitive": {
            "name": "suppliers_non_primitive",
            "documentation": "Same as `suppliers` minus primitive types, as defined in input schema.",
            "result": {
                "_type": "P_BMM_CONTAINER_TYPE",
                "container_type": "List",
                "type": "String"
            },
            "is_nullable": true
        },
        "supplier_closure": {
            "name": "supplier_closure",
            "documentation": "List of names of all classes in full supplier closure, including concrete generic parameters; (where generics are unconstrained, no class name is added, since logically it would be `Any` and this can always be assumed anyway).  This list includes primitive types.",
            "result": {
                "_type": "P_BMM_CONTAINER_TYPE",
                "container_type": "List",
                "type": "String"
            },
            "is_nullable": true
        },
        "package_path": {
            "name": "package_path",
            "documentation": "Fully qualified package name, of form: `package.package`.",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "String"
            }
        },
        "class_path": {
            "name": "class_path",
            "documentation": "Fully qualified class name, of form: `package.package.CLASS` with package path in lower-case and class in original case.\n",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "String"
            }
        },
        "is_primitive": {
            "name": "is_primitive",
            "documentation": "True if this class is designated a primitive type within the overall type system of the schema. Set from schema.",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Boolean"
            }
        },
        "is_abstract": {
            "name": "is_abstract",
            "documentation": "True if this class is abstract in its model. Value provided from an underlying data property set at creation or construction time.",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "Boolean"
            }
        },
        "features": {
            "name": "features",
            "documentation": "List of all feature definitions introduced in this class.",
            "result": {
                "_type": "P_BMM_CONTAINER_TYPE",
                "container_type": "List",
                "type": "BMM_CLASS_FEATURE"
            },
            "is_nullable": true
        },
        "flat_features": {
            "name": "flat_features",
            "documentation": "Consolidated list of all feature definitions from this class and all inheritance ancestors.",
            "result": {
                "_type": "P_BMM_CONTAINER_TYPE",
                "container_type": "List",
                "type": "BMM_CLASS_FEATURE"
            },
            "is_nullable": true
        },
        "flat_properties": {
            "name": "flat_properties",
            "documentation": "List of all properties due to current and ancestor classes, keyed by property name.",
            "result": {
                "_type": "P_BMM_CONTAINER_TYPE",
                "container_type": "List",
                "type": "BMM_PROPERTY"
            },
            "is_nullable": true
        }
    },
    "invariants": {
        "Inv_constructors": "for_all p in creators : procedures.has(p)",
        "Inv_converters": "for_all p in converters : creators.has(p) and p.arity() = 1"
    }
}
bmm class

BMM_SIMPLE_CLASS Class

  • Definition

  • Effective

  • BMM

  • UML

Class

BMM_SIMPLE_CLASS

Description

Definition of a simple class, i.e. a class that has no generic parameters and is 1:1 with the type it generates.

Inherit

BMM_CLASS

Functions

Signature

Meaning

1..1
(effected)

type (): BMM_SIMPLE_TYPE

Generate a type object that represents the type of this class. Can only be an instance of BMM_SIMPLE_TYPE or a descendant.

BMM_SIMPLE_CLASS

Definition of a simple class, i.e. a class that has no generic parameters and is 1:1 with the type it generates.

Inherits: BMM_DECLARATION, BMM_MODULE, BMM_CLASS

Attributes

name: `String ` [1..1]

Name of this model element.
Inherited from BMM_DECLARATION

documentation: Hash <String ,Any > [0..1]

Optional documentation of this element, as a keyed list.

It is strongly recommended to use the following key /type combinations for the relevant purposes:

  • "purpose": String

  • "keywords": List<String>

  • "use": String

  • "misuse": String

  • "references": String

Other keys and value types may be freely added.
Inherited from BMM_DECLARATION

scope: BMM_MODEL [1..1]

Model within which module is defined.
Inherited from BMM_MODULE

extensions: Hash <String ,Any > [0..1]

Optional meta-data of this element, as a keyed list. May be used to extend the meta-model.
Inherited from BMM_DECLARATION

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

List of immediate inheritance parents.
Inherited from BMM_CLASS

package: BMM_PACKAGE [1..1]

Package this class belongs to.
Inherited from BMM_CLASS

properties: Hash <String ,BMM_PROPERTY> [0..1]

List of attributes defined in this class.
Inherited from BMM_CLASS

source_schema_id: `String ` [1..1]

Reference to original source schema defining this class. Useful for UI tools to determine which original schema file to open for a given class for manual editing.
Inherited from BMM_CLASS

immediate_descendants: List <BMM_CLASS> [0..1]

List of computed references to base classes of immediate inheritance descendants, derived when members of ancestors are attached at creation time.
Inherited from BMM_CLASS

is_override: `Boolean ` [1..1]

True if this definition overrides a class of the same name in an included schema.
Inherited from BMM_CLASS

constants: Hash <String ,BMM_CONSTANT> [0..1]

List of constants defined in this class.
Inherited from BMM_CLASS

functions: Hash <String ,BMM_FUNCTION> [0..1]

List of functions defined in this class.
Inherited from BMM_CLASS

procedures: Hash <String ,BMM_PROCEDURE> [0..1]

List of procedures defined in this class.
Inherited from BMM_CLASS

is_primitive: Boolean ` [0..1]
`{default = false}

True if this class represents a type considered to be primitive in the type system, i.e. any typically built-in or standard library type such as String, Date, Hash<K,V> etc.
Inherited from BMM_CLASS

is_abstract: Boolean ` [0..1]
`{default = false}

True if this class is marked as abstract, i.e. direct instances cannot be created from its direct type.
Inherited from BMM_CLASS

invariants: List <BMM_ASSERTION> [0..1]

+ Inherited from BMM_CLASS

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

Subset of procedures that may be used to initialise a new instance of an object, and whose execution will guarantee that class invariants are satisfied.
Inherited from BMM_CLASS

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

Subset of creators that create a new instance from a single argument of another type.
Inherited from BMM_CLASS

feature_groups: List <BMM_FEATURE_GROUP> [0..1]

List of feature groups in this class.
Inherited from BMM_CLASS

Functions

is_root_scope (): Boolean `

Post_result: `Result = (scope = self)
[1..1]

True if this declaration entity is the root of the declaration hierarchy.
Inherited from BMM_DECLARATION

type (): BMM_SIMPLE_TYPE [1..1]

Generate a type object that represents the type of this class. Can only be an instance of BMM_SIMPLE_TYPE or a descendant.

all_ancestors (): List <String > [0..1]

List of all inheritance parent class names, recursively.
Inherited from BMM_CLASS

all_descendants (): List <String > [0..1]

Compute all descendants by following immediate_descendants.
Inherited from BMM_CLASS

suppliers (): List <String > [0..1]

List of names of immediate supplier classes, including concrete generic parameters, concrete descendants of abstract statically defined types, and inherited suppliers. (Where generics are unconstrained, no class name is added, since logically it would be Any and this can always be assumed anyway). This list includes primitive types.
Inherited from BMM_CLASS

suppliers_non_primitive (): List <String > [0..1]

Same as suppliers minus primitive types, as defined in input schema.
Inherited from BMM_CLASS

supplier_closure (): List <String > [0..1]

List of names of all classes in full supplier closure, including concrete generic parameters; (where generics are unconstrained, no class name is added, since logically it would be Any and this can always be assumed anyway). This list includes primitive types.
Inherited from BMM_CLASS

package_path (): `String ` [1..1]

Fully qualified package name, of form: package.package.
Inherited from BMM_CLASS

class_path (): `String ` [1..1]

Fully qualified class name, of form: package.package.CLASS with package path in lower-case and class in original case.
Inherited from BMM_CLASS

is_primitive (): `Boolean ` [1..1]

True if this class is designated a primitive type within the overall type system of the schema. Set from schema.
Inherited from BMM_CLASS

is_abstract (): `Boolean ` [1..1]

True if this class is abstract in its model. Value provided from an underlying data property set at creation or construction time.
Inherited from BMM_CLASS

features (): List <BMM_CLASS_FEATURE> [0..1]

List of all feature definitions introduced in this class.
Inherited from BMM_CLASS

flat_features (): List <BMM_CLASS_FEATURE> [0..1]

Consolidated list of all feature definitions from this class and all inheritance ancestors.
Inherited from BMM_CLASS

flat_properties (): List <BMM_PROPERTY> [0..1]

List of all properties due to current and ancestor classes, keyed by property name.
Inherited from BMM_CLASS

Invariants

Inv_constructors: for_all p in creators : procedures.has(p)
Inherited from BMM_CLASS

Inv_converters: for_all p in converters : creators.has(p) and p.arity() = 1
Inherited from BMM_CLASS

{
    "name": "BMM_SIMPLE_CLASS",
    "documentation": "Definition of a simple class, i.e. a class that has no generic parameters and is 1:1 with the type it generates.",
    "ancestors": [
        "BMM_CLASS"
    ],
    "functions": {
        "type": {
            "name": "type",
            "documentation": "Generate a type object that represents the type of this class. Can only be an instance of `BMM_SIMPLE_TYPE` or a descendant.",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "BMM_SIMPLE_TYPE"
            }
        }
    }
}
bmm simple class

BMM_GENERIC_CLASS Class

  • Definition

  • Effective

  • BMM

  • UML

Class

BMM_GENERIC_CLASS

Description

Definition of a generic class in an object model.

Inherit

BMM_CLASS

Attributes

Signature

Meaning

1..1

generic_parameters: Hash <String ,BMM_PARAMETER_TYPE>

List of formal generic parameters, keyed by name. These are defined either directly on this class or by the inclusion of an ancestor class which is generic.

Functions

Signature

Meaning

0..1
(redefined)

suppliers (): List <String >

Add suppliers from generic parameters.

1..1
(effected)

type (): BMM_GENERIC_TYPE

Generate a fully open BMM_GENERIC_TYPE instance that corresponds to this class definition

1..1

generic_parameter_conformance_type (
a_name: String [1]
): `String `

For a generic class, type to which generic parameter a_name conforms e.g. if this class is Interval <T:Comparable> then the Result will be the single type Comparable. For an unconstrained type T, the Result will be Any.

BMM_GENERIC_CLASS

Definition of a generic class in an object model.

Inherits: BMM_DECLARATION, BMM_MODULE, BMM_CLASS

Attributes

name: `String ` [1..1]

Name of this model element.
Inherited from BMM_DECLARATION

documentation: Hash <String ,Any > [0..1]

Optional documentation of this element, as a keyed list.

It is strongly recommended to use the following key /type combinations for the relevant purposes:

  • "purpose": String

  • "keywords": List<String>

  • "use": String

  • "misuse": String

  • "references": String

Other keys and value types may be freely added.
Inherited from BMM_DECLARATION

scope: BMM_MODEL [1..1]

Model within which module is defined.
Inherited from BMM_MODULE

extensions: Hash <String ,Any > [0..1]

Optional meta-data of this element, as a keyed list. May be used to extend the meta-model.
Inherited from BMM_DECLARATION

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

List of immediate inheritance parents.
Inherited from BMM_CLASS

package: BMM_PACKAGE [1..1]

Package this class belongs to.
Inherited from BMM_CLASS

properties: Hash <String ,BMM_PROPERTY> [0..1]

List of attributes defined in this class.
Inherited from BMM_CLASS

source_schema_id: `String ` [1..1]

Reference to original source schema defining this class. Useful for UI tools to determine which original schema file to open for a given class for manual editing.
Inherited from BMM_CLASS

immediate_descendants: List <BMM_CLASS> [0..1]

List of computed references to base classes of immediate inheritance descendants, derived when members of ancestors are attached at creation time.
Inherited from BMM_CLASS

is_override: `Boolean ` [1..1]

True if this definition overrides a class of the same name in an included schema.
Inherited from BMM_CLASS

constants: Hash <String ,BMM_CONSTANT> [0..1]

List of constants defined in this class.
Inherited from BMM_CLASS

functions: Hash <String ,BMM_FUNCTION> [0..1]

List of functions defined in this class.
Inherited from BMM_CLASS

procedures: Hash <String ,BMM_PROCEDURE> [0..1]

List of procedures defined in this class.
Inherited from BMM_CLASS

is_primitive: Boolean ` [0..1]
`{default = false}

True if this class represents a type considered to be primitive in the type system, i.e. any typically built-in or standard library type such as String, Date, Hash<K,V> etc.
Inherited from BMM_CLASS

is_abstract: Boolean ` [0..1]
`{default = false}

True if this class is marked as abstract, i.e. direct instances cannot be created from its direct type.
Inherited from BMM_CLASS

invariants: List <BMM_ASSERTION> [0..1]

+ Inherited from BMM_CLASS

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

Subset of procedures that may be used to initialise a new instance of an object, and whose execution will guarantee that class invariants are satisfied.
Inherited from BMM_CLASS

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

Subset of creators that create a new instance from a single argument of another type.
Inherited from BMM_CLASS

feature_groups: List <BMM_FEATURE_GROUP> [0..1]

List of feature groups in this class.
Inherited from BMM_CLASS

generic_parameters: Hash <String ,BMM_PARAMETER_TYPE> [1..1]

List of formal generic parameters, keyed by name. These are defined either directly on this class or by the inclusion of an ancestor class which is generic.

Functions

is_root_scope (): Boolean `

Post_result: `Result = (scope = self)
[1..1]

True if this declaration entity is the root of the declaration hierarchy.
Inherited from BMM_DECLARATION

type (): BMM_GENERIC_TYPE [1..1]

Generate a fully open BMM_GENERIC_TYPE instance that corresponds to this class definition

all_ancestors (): List <String > [0..1]

List of all inheritance parent class names, recursively.
Inherited from BMM_CLASS

all_descendants (): List <String > [0..1]

Compute all descendants by following immediate_descendants.
Inherited from BMM_CLASS

suppliers (): List <String > [0..1]

Add suppliers from generic parameters.

suppliers_non_primitive (): List <String > [0..1]

Same as suppliers minus primitive types, as defined in input schema.
Inherited from BMM_CLASS

supplier_closure (): List <String > [0..1]

List of names of all classes in full supplier closure, including concrete generic parameters; (where generics are unconstrained, no class name is added, since logically it would be Any and this can always be assumed anyway). This list includes primitive types.
Inherited from BMM_CLASS

package_path (): `String ` [1..1]

Fully qualified package name, of form: package.package.
Inherited from BMM_CLASS

class_path (): `String ` [1..1]

Fully qualified class name, of form: package.package.CLASS with package path in lower-case and class in original case.
Inherited from BMM_CLASS

is_primitive (): `Boolean ` [1..1]

True if this class is designated a primitive type within the overall type system of the schema. Set from schema.
Inherited from BMM_CLASS

is_abstract (): `Boolean ` [1..1]

True if this class is abstract in its model. Value provided from an underlying data property set at creation or construction time.
Inherited from BMM_CLASS

features (): List <BMM_CLASS_FEATURE> [0..1]

List of all feature definitions introduced in this class.
Inherited from BMM_CLASS

flat_features (): List <BMM_CLASS_FEATURE> [0..1]

Consolidated list of all feature definitions from this class and all inheritance ancestors.
Inherited from BMM_CLASS

flat_properties (): List <BMM_PROPERTY> [0..1]

List of all properties due to current and ancestor classes, keyed by property name.
Inherited from BMM_CLASS

generic_parameter_conformance_type (
a_name: String [1]
): `String ` [1..1]

For a generic class, type to which generic parameter a_name conforms e.g. if this class is Interval <T:Comparable> then the Result will be the single type Comparable. For an unconstrained type T, the Result will be Any.

Invariants

Inv_constructors: for_all p in creators : procedures.has(p)
Inherited from BMM_CLASS

Inv_converters: for_all p in converters : creators.has(p) and p.arity() = 1
Inherited from BMM_CLASS

{
    "name": "BMM_GENERIC_CLASS",
    "documentation": "Definition of a generic class in an object model.",
    "ancestors": [
        "BMM_CLASS"
    ],
    "properties": {
        "generic_parameters": {
            "_type": "P_BMM_GENERIC_PROPERTY",
            "name": "generic_parameters",
            "documentation": "List of formal generic parameters, keyed by name. These are defined either directly on this class or by the inclusion of an ancestor class which is generic.",
            "is_mandatory": true,
            "type_def": {
                "root_type": "Hash",
                "generic_parameters": [
                    "String",
                    "BMM_PARAMETER_TYPE"
                ]
            }
        }
    },
    "functions": {
        "suppliers": {
            "name": "suppliers",
            "documentation": "Add suppliers from generic parameters.",
            "result": {
                "_type": "P_BMM_CONTAINER_TYPE",
                "container_type": "List",
                "type": "String"
            },
            "is_nullable": true
        },
        "type": {
            "name": "type",
            "documentation": "Generate a fully open `BMM_GENERIC_TYPE` instance that corresponds to this class definition",
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "BMM_GENERIC_TYPE"
            }
        },
        "generic_parameter_conformance_type": {
            "name": "generic_parameter_conformance_type",
            "documentation": "For a generic class, type to which generic parameter `a_name` conforms e.g. if this class is `Interval <T:Comparable>` then the Result will be the single type `Comparable`. For an unconstrained type `T`, the Result will be `Any`.",
            "parameters": {
                "a_name": {
                    "_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
                    "name": "a_name",
                    "type": "String"
                }
            },
            "result": {
                "_type": "P_BMM_SIMPLE_TYPE",
                "type": "String"
            }
        }
    }
}
bmm generic class

BMM_ENUMERATION Class

  • Definition

  • Effective

  • BMM

  • UML

Class

BMM_ENUMERATION

Description

Definition of an enumeration class, understood as a class whose value range is constrained extensionally, i.e. by an explicit enumeration of named singleton instances.

Only one inheritance ancestor is allowed in order to provide the base type to which the range constraint is applied.

The common notion of a set of literals with no explicit defined values is represented as the degenerate subtype BMM_ENUMERATION_INTEGER, whose values are 0, 1, …​

Inherit

BMM_SIMPLE_CLASS

Attributes

Signature

Meaning

0..1

item_names: List <String >

The list of names of the enumeration. If no values are supplied, the integer values 0, 1, 2, …​ are assumed.

0..1

item_values: List <BMM_PRIMITIVE_VALUE>

Optional list of specific values. Must be 1:1 with item_names list.

Functions

Signature

Meaning

1..1

name_map (): Hash <String ,String >

Map of item_names to item_values (stringified).

BMM_ENUMERATION

Definition of an enumeration class, understood as a class whose value range is constrained extensionally, i.e. by an explicit enumeration of named singleton instances.

Only one inheritance ancestor is allowed in order to provide the base type to which the range constraint is applied.

The common notion of a set of literals with no explicit defined values is represented as the degenerate subtype BMM_ENUMERATION_INTEGER, whose values are 0, 1, …​

Inherits: BMM_DECLARATION, BMM_MODULE, BMM_CLASS, BMM_SIMPLE_CLASS

Attributes

name: `String ` [1..1]

Name of this model element.
Inherited from BMM_DECLARATION

documentation: Hash <String ,Any > [0..1]

Optional documentation of this element, as a keyed list.

It is strongly recommended to use the following key /type combinations for the relevant purposes:

  • "purpose": String

  • "keywords": List<String>

  • "use": String

  • "misuse": String

  • "references": String

Other keys and value types may be freely added.
Inherited from BMM_DECLARATION

scope: BMM_MODEL [1..1]

Model within which module is defined.
Inherited from BMM_MODULE

extensions: Hash <String ,Any > [0..1]

Optional meta-data of this element, as a keyed list. May be used to extend the meta-model.
Inherited from BMM_DECLARATION

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

List of immediate inheritance parents.
Inherited from BMM_CLASS

package: BMM_PACKAGE [1..1]

Package this class belongs to.
Inherited from BMM_CLASS

properties: Hash <String ,BMM_PROPERTY> [0..1]

List of attributes defined in this class.
Inherited from BMM_CLASS

source_schema_id: `String ` [1..1]

Reference to original source schema defining this class. Useful for UI tools to determine which original schema file to open for a given class for manual editing.
Inherited from BMM_CLASS

immediate_descendants: List <BMM_CLASS> [0..1]

List of computed references to base classes of immediate inheritance descendants, derived when members of ancestors are attached at creation time.
Inherited from BMM_CLASS

is_override: `Boolean ` [1..1]

True if this definition overrides a class of the same name in an included schema.
Inherited from BMM_CLASS

constants: Hash <String ,BMM_CONSTANT> [0..1]

List of constants defined in this class.
Inherited from BMM_CLASS

functions: Hash <String ,BMM_FUNCTION> [0..1]

List of functions defined in this class.
Inherited from BMM_CLASS

procedures: Hash <String ,BMM_PROCEDURE> [0..1]

List of procedures defined in this class.
Inherited from BMM_CLASS

is_primitive: Boolean ` [0..1]
`{default = false}

True if this class represents a type considered to be primitive in the type system, i.e. any typically built-in or standard library type such as String, Date, Hash<K,V> etc.
Inherited from BMM_CLASS

is_abstract: Boolean ` [0..1]
`{default = false}

True if this class is marked as abstract, i.e. direct instances cannot be created from its direct type.
Inherited from BMM_CLASS

invariants: List <BMM_ASSERTION> [0..1]

+ Inherited from BMM_CLASS

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

Subset of procedures that may be used to initialise a new instance of an object, and whose execution will guarantee that class invariants are satisfied.
Inherited from BMM_CLASS

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

Subset of creators that create a new instance from a single argument of another type.
Inherited from BMM_CLASS

feature_groups: List <BMM_FEATURE_GROUP> [0..1]

List of feature groups in this class.
Inherited from BMM_CLASS

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

The list of names of the enumeration. If no values are supplied, the integer values 0, 1, 2, …​ are assumed.

item_values: List <BMM_PRIMITIVE_VALUE> [0..1]

Optional list of specific values. Must be 1:1 with item_names list.

Functions

is_root_scope (): Boolean `

Post_result: `Result = (scope = self)
[1..1]

True if this declaration entity is the root of the declaration hierarchy.
Inherited from BMM_DECLARATION

type (): BMM_SIMPLE_TYPE [1..1]

Generate a type object that represents the type of this class. Can only be an instance of BMM_SIMPLE_TYPE or a descendant.
Inherited from BMM_SIMPLE_CLASS

all_ancestors (): List <String > [0..1]

List of all inheritance parent class names, recursively.
Inherited from BMM_CLASS

all_descendants (): List <String > [0..1]

Compute all descendants by following immediate_descendants.
Inherited from BMM_CLASS

suppliers (): List <String > [0..1]

List of names of immediate supplier classes, including concrete generic parameters, concrete descendants of abstract statically defined types, and inherited suppliers. (Where generics are unconstrained, no class name is added, since logically it would be Any and this can always be assumed anyway). This list includes primitive types.
Inherited from BMM_CLASS

suppliers_non_primitive (): List <String > [0..1]

Same as suppliers minus primitive types, as defined in input schema.
Inherited from BMM_CLASS

supplier_closure (): List <String > [0..1]

List of names of all classes in full supplier closure, including concrete generic parameters; (where generics are unconstrained, no class name is added, since logically it would be Any and this can always be assumed anyway). This list includes primitive types.
Inherited from BMM_CLASS

package_path (): `String ` [1..1]

Fully qualified package name, of form: package.package.
Inherited from BMM_CLASS

class_path (): `String ` [1..1]

Fully qualified class name, of form: package.package.CLASS with package path in lower-case and class in original case.
Inherited from BMM_CLASS

is_primitive (): `Boolean ` [1..1]

True if this class is designated a primitive type within the overall type system of the schema. Set from schema.
Inherited from BMM_CLASS

is_abstract (): `Boolean ` [1..1]

True if this class is abstract in its model. Value provided from an underlying data property set at creation or construction time.
Inherited from BMM_CLASS

features (): List <BMM_CLASS_FEATURE> [0..1]

List of all feature definitions introduced in this class.
Inherited from BMM_CLASS

flat_features (): List <BMM_CLASS_FEATURE> [0..1]

Consolidated list of all feature definitions from this class and all inheritance ancestors.
Inherited from BMM_CLASS

flat_properties (): List <BMM_PROPERTY> [0..1]

List of all properties due to current and ancestor classes, keyed by property name.
Inherited from BMM_CLASS

name_map (): Hash <String ,String > [1..1]

Map of item_names to item_values (stringified).

Invariants

Inv_constructors: for_all p in creators : procedures.has(p)
Inherited from BMM_CLASS

Inv_converters: for_all p in converters : creators.has(p) and p.arity() = 1
Inherited from BMM_CLASS

{
    "name": "BMM_ENUMERATION",
    "documentation": "Definition of an enumeration class, understood as a class whose value range is constrained extensionally, i.e. by an explicit enumeration of named singleton instances.\n\nOnly one inheritance ancestor is allowed in order to provide the base type to which the range constraint is applied.\n\nThe common notion of a set of literals with no explicit defined values is represented as the degenerate subtype `BMM_ENUMERATION_INTEGER`, whose values are 0, 1, ...",
    "ancestors": [
        "BMM_SIMPLE_CLASS"
    ],
    "properties": {
        "item_names": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "item_names",
            "documentation": "The list of names of the enumeration. If no values are supplied, the integer values 0, 1, 2, ... are assumed.",
            "type_def": {
                "container_type": "List",
                "type": "String"
            },
            "cardinality": {
                "lower": 0,
                "upper_unbounded": true
            }
        },
        "item_values": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "item_values",
            "documentation": "Optional list of specific values. Must be 1:1 with `_item_names_` list.",
            "type_def": {
                "container_type": "List",
                "type": "BMM_PRIMITIVE_VALUE"
            },
            "cardinality": {
                "lower": 0,
                "upper_unbounded": true
            }
        }
    },
    "functions": {
        "name_map": {
            "name": "name_map",
            "documentation": "Map of `_item_names_` to `_item_values_` (stringified).",
            "result": {
                "_type": "P_BMM_GENERIC_TYPE",
                "root_type": "Hash",
                "generic_parameters": [
                    "String",
                    "String"
                ]
            }
        }
    }
}
bmm enumeration

BMM_ENUMERATION_STRING Class

  • Definition

  • Effective

  • BMM

  • UML

Class

BMM_ENUMERATION_STRING

Description

String-based enumeration meta-type.

Inherit

BMM_ENUMERATION

Attributes

Signature

Meaning

0..1
(redefined)

item_values: List <BMM_STRING_VALUE>

Optional list of specific values. Must be 1:1 with item_names list.

BMM_ENUMERATION_STRING

String-based enumeration meta-type.

Inherits: BMM_DECLARATION, BMM_MODULE, BMM_CLASS, BMM_SIMPLE_CLASS, BMM_ENUMERATION

Attributes

name: `String ` [1..1]

Name of this model element.
Inherited from BMM_DECLARATION

documentation: Hash <String ,Any > [0..1]

Optional documentation of this element, as a keyed list.

It is strongly recommended to use the following key /type combinations for the relevant purposes:

  • "purpose": String

  • "keywords": List<String>

  • "use": String

  • "misuse": String

  • "references": String

Other keys and value types may be freely added.
Inherited from BMM_DECLARATION

scope: BMM_MODEL [1..1]

Model within which module is defined.
Inherited from BMM_MODULE

extensions: Hash <String ,Any > [0..1]

Optional meta-data of this element, as a keyed list. May be used to extend the meta-model.
Inherited from BMM_DECLARATION

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

List of immediate inheritance parents.
Inherited from BMM_CLASS

package: BMM_PACKAGE [1..1]

Package this class belongs to.
Inherited from BMM_CLASS

properties: Hash <String ,BMM_PROPERTY> [0..1]

List of attributes defined in this class.
Inherited from BMM_CLASS

source_schema_id: `String ` [1..1]

Reference to original source schema defining this class. Useful for UI tools to determine which original schema file to open for a given class for manual editing.
Inherited from BMM_CLASS

immediate_descendants: List <BMM_CLASS> [0..1]

List of computed references to base classes of immediate inheritance descendants, derived when members of ancestors are attached at creation time.
Inherited from BMM_CLASS

is_override: `Boolean ` [1..1]

True if this definition overrides a class of the same name in an included schema.
Inherited from BMM_CLASS

constants: Hash <String ,BMM_CONSTANT> [0..1]

List of constants defined in this class.
Inherited from BMM_CLASS

functions: Hash <String ,BMM_FUNCTION> [0..1]

List of functions defined in this class.
Inherited from BMM_CLASS

procedures: Hash <String ,BMM_PROCEDURE> [0..1]

List of procedures defined in this class.
Inherited from BMM_CLASS

is_primitive: Boolean ` [0..1]
`{default = false}

True if this class represents a type considered to be primitive in the type system, i.e. any typically built-in or standard library type such as String, Date, Hash<K,V> etc.
Inherited from BMM_CLASS

is_abstract: Boolean ` [0..1]
`{default = false}

True if this class is marked as abstract, i.e. direct instances cannot be created from its direct type.
Inherited from BMM_CLASS

invariants: List <BMM_ASSERTION> [0..1]

+ Inherited from BMM_CLASS

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

Subset of procedures that may be used to initialise a new instance of an object, and whose execution will guarantee that class invariants are satisfied.
Inherited from BMM_CLASS

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

Subset of creators that create a new instance from a single argument of another type.
Inherited from BMM_CLASS

feature_groups: List <BMM_FEATURE_GROUP> [0..1]

List of feature groups in this class.
Inherited from BMM_CLASS

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

The list of names of the enumeration. If no values are supplied, the integer values 0, 1, 2, …​ are assumed.
Inherited from BMM_ENUMERATION

item_values: List <BMM_STRING_VALUE> [0..1]

Optional list of specific values. Must be 1:1 with item_names list.

Functions

is_root_scope (): Boolean `

Post_result: `Result = (scope = self)
[1..1]

True if this declaration entity is the root of the declaration hierarchy.
Inherited from BMM_DECLARATION

type (): BMM_SIMPLE_TYPE [1..1]

Generate a type object that represents the type of this class. Can only be an instance of BMM_SIMPLE_TYPE or a descendant.
Inherited from BMM_SIMPLE_CLASS

all_ancestors (): List <String > [0..1]

List of all inheritance parent class names, recursively.
Inherited from BMM_CLASS

all_descendants (): List <String > [0..1]

Compute all descendants by following immediate_descendants.
Inherited from BMM_CLASS

suppliers (): List <String > [0..1]

List of names of immediate supplier classes, including concrete generic parameters, concrete descendants of abstract statically defined types, and inherited suppliers. (Where generics are unconstrained, no class name is added, since logically it would be Any and this can always be assumed anyway). This list includes primitive types.
Inherited from BMM_CLASS

suppliers_non_primitive (): List <String > [0..1]

Same as suppliers minus primitive types, as defined in input schema.
Inherited from BMM_CLASS

supplier_closure (): List <String > [0..1]

List of names of all classes in full supplier closure, including concrete generic parameters; (where generics are unconstrained, no class name is added, since logically it would be Any and this can always be assumed anyway). This list includes primitive types.
Inherited from BMM_CLASS

package_path (): `String ` [1..1]

Fully qualified package name, of form: package.package.
Inherited from BMM_CLASS

class_path (): `String ` [1..1]

Fully qualified class name, of form: package.package.CLASS with package path in lower-case and class in original case.
Inherited from BMM_CLASS

is_primitive (): `Boolean ` [1..1]

True if this class is designated a primitive type within the overall type system of the schema. Set from schema.
Inherited from BMM_CLASS

is_abstract (): `Boolean ` [1..1]

True if this class is abstract in its model. Value provided from an underlying data property set at creation or construction time.
Inherited from BMM_CLASS

features (): List <BMM_CLASS_FEATURE> [0..1]

List of all feature definitions introduced in this class.
Inherited from BMM_CLASS

flat_features (): List <BMM_CLASS_FEATURE> [0..1]

Consolidated list of all feature definitions from this class and all inheritance ancestors.
Inherited from BMM_CLASS

flat_properties (): List <BMM_PROPERTY> [0..1]

List of all properties due to current and ancestor classes, keyed by property name.
Inherited from BMM_CLASS

name_map (): Hash <String ,String > [1..1]

Map of item_names to item_values (stringified).
Inherited from BMM_ENUMERATION

Invariants

Inv_constructors: for_all p in creators : procedures.has(p)
Inherited from BMM_CLASS

Inv_converters: for_all p in converters : creators.has(p) and p.arity() = 1
Inherited from BMM_CLASS

{
    "name": "BMM_ENUMERATION_STRING",
    "documentation": "String-based enumeration meta-type.",
    "ancestors": [
        "BMM_ENUMERATION"
    ],
    "properties": {
        "item_values": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "item_values",
            "documentation": "Optional list of specific values. Must be 1:1 with `_item_names_` list.",
            "type_def": {
                "container_type": "List",
                "type": "BMM_STRING_VALUE"
            },
            "cardinality": {
                "lower": 0,
                "upper_unbounded": true
            }
        }
    }
}
bmm enumeration string

BMM_ENUMERATION_INTEGER Class

  • Definition

  • Effective

  • BMM

  • UML

Class

BMM_ENUMERATION_INTEGER

Description

Integer-based enumeration meta-type.

Inherit

BMM_ENUMERATION

Attributes

Signature

Meaning

0..1
(redefined)

item_values: List <BMM_INTEGER_VALUE>

Optional list of specific values. Must be 1:1 with item_names list.

BMM_ENUMERATION_INTEGER

Integer-based enumeration meta-type.

Inherits: BMM_DECLARATION, BMM_MODULE, BMM_CLASS, BMM_SIMPLE_CLASS, BMM_ENUMERATION

Attributes

name: `String ` [1..1]

Name of this model element.
Inherited from BMM_DECLARATION

documentation: Hash <String ,Any > [0..1]

Optional documentation of this element, as a keyed list.

It is strongly recommended to use the following key /type combinations for the relevant purposes:

  • "purpose": String

  • "keywords": List<String>

  • "use": String

  • "misuse": String

  • "references": String

Other keys and value types may be freely added.
Inherited from BMM_DECLARATION

scope: BMM_MODEL [1..1]

Model within which module is defined.
Inherited from BMM_MODULE

extensions: Hash <String ,Any > [0..1]

Optional meta-data of this element, as a keyed list. May be used to extend the meta-model.
Inherited from BMM_DECLARATION

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

List of immediate inheritance parents.
Inherited from BMM_CLASS

package: BMM_PACKAGE [1..1]

Package this class belongs to.
Inherited from BMM_CLASS

properties: Hash <String ,BMM_PROPERTY> [0..1]

List of attributes defined in this class.
Inherited from BMM_CLASS

source_schema_id: `String ` [1..1]

Reference to original source schema defining this class. Useful for UI tools to determine which original schema file to open for a given class for manual editing.
Inherited from BMM_CLASS

immediate_descendants: List <BMM_CLASS> [0..1]

List of computed references to base classes of immediate inheritance descendants, derived when members of ancestors are attached at creation time.
Inherited from BMM_CLASS

is_override: `Boolean ` [1..1]

True if this definition overrides a class of the same name in an included schema.
Inherited from BMM_CLASS

constants: Hash <String ,BMM_CONSTANT> [0..1]

List of constants defined in this class.
Inherited from BMM_CLASS

functions: Hash <String ,BMM_FUNCTION> [0..1]

List of functions defined in this class.
Inherited from BMM_CLASS

procedures: Hash <String ,BMM_PROCEDURE> [0..1]

List of procedures defined in this class.
Inherited from BMM_CLASS

is_primitive: Boolean ` [0..1]
`{default = false}

True if this class represents a type considered to be primitive in the type system, i.e. any typically built-in or standard library type such as String, Date, Hash<K,V> etc.
Inherited from BMM_CLASS

is_abstract: Boolean ` [0..1]
`{default = false}

True if this class is marked as abstract, i.e. direct instances cannot be created from its direct type.
Inherited from BMM_CLASS

invariants: List <BMM_ASSERTION> [0..1]

+ Inherited from BMM_CLASS

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

Subset of procedures that may be used to initialise a new instance of an object, and whose execution will guarantee that class invariants are satisfied.
Inherited from BMM_CLASS

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

Subset of creators that create a new instance from a single argument of another type.
Inherited from BMM_CLASS

feature_groups: List <BMM_FEATURE_GROUP> [0..1]

List of feature groups in this class.
Inherited from BMM_CLASS

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

The list of names of the enumeration. If no values are supplied, the integer values 0, 1, 2, …​ are assumed.
Inherited from BMM_ENUMERATION

item_values: List <BMM_INTEGER_VALUE> [0..1]

Optional list of specific values. Must be 1:1 with item_names list.

Functions

is_root_scope (): Boolean `

Post_result: `Result = (scope = self)
[1..1]

True if this declaration entity is the root of the declaration hierarchy.
Inherited from BMM_DECLARATION

type (): BMM_SIMPLE_TYPE [1..1]

Generate a type object that represents the type of this class. Can only be an instance of BMM_SIMPLE_TYPE or a descendant.
Inherited from BMM_SIMPLE_CLASS

all_ancestors (): List <String > [0..1]

List of all inheritance parent class names, recursively.
Inherited from BMM_CLASS

all_descendants (): List <String > [0..1]

Compute all descendants by following immediate_descendants.
Inherited from BMM_CLASS

suppliers (): List <String > [0..1]

List of names of immediate supplier classes, including concrete generic parameters, concrete descendants of abstract statically defined types, and inherited suppliers. (Where generics are unconstrained, no class name is added, since logically it would be Any and this can always be assumed anyway). This list includes primitive types.
Inherited from BMM_CLASS

suppliers_non_primitive (): List <String > [0..1]

Same as suppliers minus primitive types, as defined in input schema.
Inherited from BMM_CLASS

supplier_closure (): List <String > [0..1]

List of names of all classes in full supplier closure, including concrete generic parameters; (where generics are unconstrained, no class name is added, since logically it would be Any and this can always be assumed anyway). This list includes primitive types.
Inherited from BMM_CLASS

package_path (): `String ` [1..1]

Fully qualified package name, of form: package.package.
Inherited from BMM_CLASS

class_path (): `String ` [1..1]

Fully qualified class name, of form: package.package.CLASS with package path in lower-case and class in original case.
Inherited from BMM_CLASS

is_primitive (): `Boolean ` [1..1]

True if this class is designated a primitive type within the overall type system of the schema. Set from schema.
Inherited from BMM_CLASS

is_abstract (): `Boolean ` [1..1]

True if this class is abstract in its model. Value provided from an underlying data property set at creation or construction time.
Inherited from BMM_CLASS

features (): List <BMM_CLASS_FEATURE> [0..1]

List of all feature definitions introduced in this class.
Inherited from BMM_CLASS

flat_features (): List <BMM_CLASS_FEATURE> [0..1]

Consolidated list of all feature definitions from this class and all inheritance ancestors.
Inherited from BMM_CLASS

flat_properties (): List <BMM_PROPERTY> [0..1]

List of all properties due to current and ancestor classes, keyed by property name.
Inherited from BMM_CLASS

name_map (): Hash <String ,String > [1..1]

Map of item_names to item_values (stringified).
Inherited from BMM_ENUMERATION

Invariants

Inv_constructors: for_all p in creators : procedures.has(p)
Inherited from BMM_CLASS

Inv_converters: for_all p in converters : creators.has(p) and p.arity() = 1
Inherited from BMM_CLASS

{
    "name": "BMM_ENUMERATION_INTEGER",
    "documentation": "Integer-based enumeration meta-type.",
    "ancestors": [
        "BMM_ENUMERATION"
    ],
    "properties": {
        "item_values": {
            "_type": "P_BMM_CONTAINER_PROPERTY",
            "name": "item_values",
            "documentation": "Optional list of specific values. Must be 1:1 with `_item_names_` list.",
            "type_def": {
                "container_type": "List",
                "type": "BMM_INTEGER_VALUE"
            },
            "cardinality": {
                "lower": 0,
                "upper_unbounded": true
            }
        }
    }
}
bmm enumeration integer

BMM_VALUE_SET_SPEC Class

  • Definition

  • Effective

  • BMM

  • UML

Class

BMM_VALUE_SET_SPEC

Description

Definition of a range-constrained class whose value range is defined by reference to a 'value set' within an external resource, e.g. a reference data service.

Attributes

Signature

Meaning

1..1

resource_id: `String `

Identifier of a resource (typically available as a service) that contains legal values of a specific type. This is typically a URI but need not be.

1..1

value_set_id: `String `

Identifier of a value set within the resource identified by resource_id, which specifies the set of legal values of a type. This might be a URI, but need not be.

BMM_VALUE_SET_SPEC

Definition of a range-constrained class whose value range is defined by reference to a 'value set' within an external resource, e.g. a reference data service.

Attributes

resource_id: `String ` [1..1]

Identifier of a resource (typically available as a service) that contains legal values of a specific type. This is typically a URI but need not be.

value_set_id: `String ` [1..1]

Identifier of a value set within the resource identified by resource_id, which specifies the set of legal values of a type. This might be a URI, but need not be.

{
    "name": "BMM_VALUE_SET_SPEC",
    "documentation": "Definition of a range-constrained class whose value range is defined by reference to a 'value set' within an external resource, e.g. a reference data service.",
    "properties": {
        "resource_id": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "resource_id",
            "documentation": "Identifier of a resource (typically available as a service) that contains legal values of a specific type. This is typically a URI but need not be.",
            "is_mandatory": true,
            "type": "String"
        },
        "value_set_id": {
            "_type": "P_BMM_SINGLE_PROPERTY",
            "name": "value_set_id",
            "documentation": "Identifier of a value set within the resource identified by `_resource_id_`, which specifies the set of legal values of a type. This might be a URI, but need not be.",
            "is_mandatory": true,
            "type": "String"
        }
    }
}
bmm value set spec