5.4.8. Model Element Constant

[Tip]Description

A model element constant refers to a model element, which exists in the model space (at compile time).

[Important]Syntax
ModelElementConstant ::= ValueQualifiedNameAST

A model element constant is formulated as a qualified model element name.

A model element constant can reference either an entity or a relation in the actual model space: the qualified model element name can be either the local or the fully qualified name of the referenced model element.

[Note]Semantics

A model element constant is a reference to a model element resided in the model space, which needs to exist at compile-time.

Note that this is the semantic difference with the ref(s) predefined function, which is only resolved at run-time.

[Caution]Constraints

If the qualified model element name is a local name (i.e. it does not contain a '.'), then no upper case literals and no keywords are allowed to avoid name clashes with variables and keywords, respectively.

Remark.  If a model element is referred to by its local name, and (i) this local name starts with an uppercase letter or (ii) it is a VTCL keyword, then this name should be written between apostrophes (single quotes) to avoid name clashes. Typically, model element constants are retrieved by pattern matching or using the built-in 'ref' function.

Defined In:  ASM constant