1.1.2. Namespace Definition

[Tip]Description

Like in modern programming languages, namespaces are used also in VTCL. Namespaces make it easier to identify model elements uniquely in a hierarchical way.

[Important]Syntax
NamespaceDefAST ::= $empty
                  | namespace QualifiedTypeNameAST ;

Namespaces are identified by qualified model element names.

[Note]Semantics

The namespace structure corresponds to the containment hierarchy of the VPM model space. Model elements can be referenced either by their fully qualified names or by their local names (identifiers) if the namespace in which they are contained is reachable (either because it is the currently defined namespace or because it is imported).

[Caution]Constraints

All element names must be unique within the scope of their direct containers.

Remarks.  The recommended structure of namespaces is to divide the root namespace into technological spaces (like ASM, UML, BPM, MOF etc.). In these technological namespaces define the following containers Figure 2.1, “Recommended structure of namespaces”):

Figure 2.1. Recommended structure of namespaces

Recommended structure of namespaces


  • metamodel for containing the metamodel of the given technology,

  • models for all the models that are instances of the above mentioned metamodel,

  • references for all the additional information that is related to transformations transforming to other technological spaces organized into subcontainers:

    • metamodels for the metamodels of reference structures that defines the relationship between the elements of the metamodels of the current and the target technology,

    • models for all the models that are instances of the reference metamodel,

This structure clearly separates the various types of metamodels, models, transformations and other related model elements.