Model Validation Rules

This document lists the validation rules checked on your model during code generation. For each rule it gives its severity, what it verifies, and the messages you may see when it is not satisfied. Errors must be fixed before generating code; warnings and information notices are advisory.

Total rules: 114

Severity Count
ERROR 86
WARNING 26
INFO 2

Rules by generator

Rule set Rules FMU Kotlin UML to C UML to C++
Common Rules 15 ✓ - ✓ ✓
C Rules 1 ✓ - ✓ ✓
Middleware Rules 0 ✓ - - -
UML Common Rules 4 - - ✓ ✓
UML Statemachine Rules 3 - - ✓ ✓
IBD Rules 6 - - ✓ ✓
UML C Rules 6 - - ✓ -
UML Cpp Rules 3 - - - ✓
Class Model Rules 27 - - ✓ ✓
OpaqueBehavior Cpp Rules 2 - - - ✓
OpaqueBehavior C Rules 2 - - ✓ -
UML Activity Rules 30 - - ✓ ✓
ALF Code Generation Rules 1 - - ✓ ✓
Resource Template Rules 1 - - - -
UML Kotlin Rules 5 - ✓ - -
Class Model Kotlin Rules 7 - ✓ - -
Internal Rules 1 ✓ ✓ ✓ ✓
Total 114 17 13 96 93

ESP_ALF_001 is emitted during ALF compilation (generation time), not during the validation pass; it applies to the C and C++ generators.

INTERNAL_ERROR is the fallback raised when a rule throws an unexpected error; it can appear for any generator.

This page discusses:

Common Rules

Total rules: 15

Severity Count
ERROR 14
WARNING 0
INFO 1

Name Required

ESP_COMM_001 Name Required

Attributes Values
Severity ERROR
Used by FMU, UML to C, UML to C++
Description All object must have a name.
Message {0} must have a name.

Execution Requires a Referenced Port

ESP_COMM_002 Execution Requires a Referenced Port

Attributes Values
Severity ERROR
Used by FMU, UML to C, UML to C++
Description Port must be set for a DataReceivedExecution, DataSendCompletedExecution or OperationInvokedExecution.
Message {0} must have a port.

Execution Requires a Referenced Data

ESP_COMM_003 Execution Requires a Referenced Data

Attributes Values
Severity ERROR
Used by FMU, UML to C, UML to C++
Description Data must be set for a DataReceivedExecution or a DataSendCompletedExecution.
Message {0} must have a data.

ComponentInstance Requires a Referenced Type

ESP_COMM_004 ComponentInstance Requires a Referenced Type

Attributes Values
Severity ERROR
Used by FMU, UML to C, UML to C++
Description ComponentTnstance must reference an existing Component or Assembly.
Message {0} must have a Type.

Execution Periodic Shall Be Consistent

ESP_COMM_005 Execution Periodic Shall Be Consistent

Attributes Values
Severity ERROR
Used by FMU, UML to C, UML to C++
Description A valid period must be set for a PeriodicExecution.
Message Period attribute is not set for {0}.

Execution Requires a Referenced Operation

ESP_COMM_006 Execution Requires a Referenced Operation

Attributes Values
Severity ERROR
Used by FMU, UML to C, UML to C++
Description Operation must be set for a OperationInvokedExecution.
Message {0} must have an operation.

Port requires a referenced Interface

ESP_COMM_007 Port requires a referenced Interface

Attributes Values
Severity ERROR
Used by FMU, UML to C, UML to C++
Description Port must reference an existing Interface.
Message {0} must have an Interface.

ConnectorEnd requires a referenced Port

ESP_COMM_009 ConnectorEnd requires a referenced Port

Attributes Values
Severity ERROR
Used by FMU, UML to C, UML to C++
Description ConnectorEnd must reference an existing Port.
Message {0} must referenced a Port.

Reference Shall Be Consistent

ESP_COMM_010 Reference Shall Be Consistent

Attributes Values
Severity ERROR
Used by FMU, UML to C, UML to C++
Description All references must be resolved.
Message {0} contains an unresolved reference {1}.

Connected Port Consistency

ESP_COMM_011 Connected Port Consistency

Attributes Values
Severity ERROR
Used by FMU, UML to C, UML to C++
Description Connected Ports must reference compatible Interfaces. Compatible Interfaces must have compatible Data and compatible Operations. Compatible Data have the same name and reference the same Type. Compatible Operations have the same Arguments and the same return Type.
Message {0} and {1} doesn’t contain same number of Data.
Message No Interface found in {0}.
Message {0} and {1} are not compatible, {2} doesn’t exist in {1}.
Message {0} and {1} doesn’t contain same number of Operations.

Requires a Type

ESP_COMM_012 Requires a Type

Attributes Values
Severity ERROR
Used by FMU, UML to C, UML to C++
Description Some objects require a Type.
Message {0} requires a Type.

Duplicate Connectors

ESP_COMM_013 Duplicate Connectors

Attributes Values
Severity ERROR
Used by FMU, UML to C, UML to C++
Description 2 ports cannot have more than one connector in common.
Message Connectors {0} and {1} reference same ports.

Multiple ExecutionTypes

ESP_COMM_014 Multiple ExecutionTypes

Attributes Values
Severity INFO
Used by FMU, UML to C, UML to C++
Description Multiple ExecutionTypes are defined at different level on Behavior, ComponentInstance, Component and/or Assembly
Message Multiple ExecutionTypes found for {0}. Selected ExecutionType for {0} is {1} configured on {2}

Connector Single Source Per Input Port

ESP_COMM_015 Connector Single Source Per Input Port

Attributes Values
Severity ERROR
Used by FMU, UML to C, UML to C++
Description A connector can connect one output port to multiple input ports. Connecting multiple output ports to a single input port is not supported.
Message Input port {0} is fed by multiple output ports; only one output port per input is supported.

Connector Source/Destination Resolvable

ESP_COMM_016 Connector Source/Destination Resolvable

Attributes Values
Severity ERROR
Used by FMU, UML to C, UML to C++
Description A connector must have a resolvable source and destination end for code generation. Port direction is derived from SysML provided/required settings and, for proxy ports, from flowProperty direction on the interface block.
Message {0} has no sending end: {1} and {2} are both IN (required) ports. Connect a provided (OUT) port to a required (IN) port. In SysML, add or fix a flowProperty direction on the interface block typed by the proxy port, or set one port as provided and the other as required (check port conjugation).
Message {0} has no receiving end: {1} and {2} are both OUT (provided) ports. Connect a provided (OUT) port to a required (IN) port. In SysML, add or fix a flowProperty direction on the interface block typed by the proxy port, or adjust provided/required settings on the ports.
Message {0} has no identifiable receiving (IN) end. Connected ends: {1}; {2}. One end must be IN on the receiving component, or OUT on the assembly boundary when delegating. Code generator identifies proxy-port direction via a flowProperty in the interface block and interface block conjugation on the ports.
Message {0} has no identifiable sending (OUT) end. Connected ends: {1}; {2}. One end must be OUT on the sending component, or IN on the assembly boundary when delegating. Code generator identifies proxy-port direction via a flowProperty in the interface block and interface block conjugation on the ports.

C Rules

Total rules: 1

Severity Count
ERROR 1
WARNING 0
INFO 0

C Naming Compliancy

RULE_C_71 C Naming Compliancy

Attributes Values
Severity ERROR
Used by FMU, UML to C, UML to C++
Description Name must be C compliant, it cannot be empty and shall respect the regular expression [_a-zA-Z][_a-zA-Z0-9]* and cannot be one these following keywords: auto, break, case, char, const, continue, default, do, double, else, enum, extern, float, for, goto, if, int, long, register, return, short, signed, sizeof, static, struct, switch, typedef, union, unsigned, void, volatile, while
Message Name of {0} is not C compliant.
Message Name of {0} cannot be used as it is a C reserved keyword.

UML Common Rules

Total rules: 4

Severity Count
ERROR 4
WARNING 0
INFO 0

Malformed HTML body

RULE_UML_811 Malformed HTML body

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Check if the parser could read the html inside OpaqueBehavior and OpaqueExpression.
Message Cannot read HTML body of {0}

Missing Signal

RULE_UML_812 Missing Signal

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description No Signal has been set to SignalEvent
Message No Signal has been set to {0} in {1}

Enum Literal Value

RULE_UML_814 Enum Literal Value

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description No Literal Value has been set to Enum
Message No Literal Value has been set to Enum {0}

Behavior period inconsistent with its task period

RULE_UML_815 Behavior period inconsistent with its task period

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description A task activates its behaviors together, so a behavior slower than its task is generated as a frequency divider in the task descriptor: it is executed once every N activations, and its period is therefore N times the period of the task. This requires the period of the behavior to be a whole multiple of the period of its task. A behavior faster than its task cannot be honored at all, since a task is never activated more often than its own period. When the periods are inconsistent the period of the behavior cannot be generated, and the behavior would silently run at the period of its task.
Message Behavior {0} has a period of {2}s but is mapped onto periodic task {1} whose period is {3}s: {4}. The period of the behavior cannot be generated.

UML Statemachine Rules

Total rules: 3

Severity Count
ERROR 2
WARNING 1
INFO 0

Recursion in submachine

RULE_UML_822 Recursion in submachine

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Recursion in submachine is not supported in this code generator.
Message This {1} contains a direct submachine recursive call through this {0}.
Message This {1} contains an indirect submachine recursive call through this {2} in {3}.

Do activity executed in the state cycle (standard deviation)

RULE_UML_823 Do activity executed in the state cycle (standard deviation)

Attributes Values
Severity WARNING
Used by UML to C, UML to C++
Description In UML, the doActivity of a state runs concurrently in its own thread and is aborted when the state is exited (OMG UML 2.5.1, StateMachines - State doActivity behavior). This code generator deviates from the standard: a do activity is executed synchronously within the same execution cycle as its state, and is not interrupted on state exit.
Message Do activity of state {0} will be executed synchronously in the same execution cycle as the state. This is a deviation from the UML doActivity semantics (OMG UML 2.5.1, StateMachines), where the do activity runs in its own thread and is aborted when the state is exited.

Transition not owned by its source state region

RULE_UML_824 Transition not owned by its source state region

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description A transition must be owned by the same region as its source vertex. The C code generator discovers a state’s outgoing transitions only within the region that owns the source state, so a transition owned by any other region is silently omitted from the generated code.
Message {0} is owned by a different region than its source {1}, so the C code generator will not generate it (a state’s outgoing transitions are searched only within the region that owns the source state). Move the transition to the same region as {1}.

IBD Rules

Total rules: 6

Severity Count
ERROR 3
WARNING 2
INFO 1

Block mixing Behavior and Part Properties

ESP_IBD_001 Block mixing Behavior and Part Properties

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description A block shall be composed of either behaviors or Part Properties referring to other blocks but not both for a same block.
Message Block {0} contains Behaviors {1} and Part Properties {2}. This type of modeling is forbidden. Tip: Include Behaviors of Part Properties in your block.

Empty InterfaceBlock

ESP_IBD_003 Empty InterfaceBlock

Attributes Values
Severity WARNING
Used by UML to C, UML to C++
Description InterfaceBlocks are used to specify data transmitted over a ProxyPort. InterfaceBlock is expecting to contain at least a Flow Property or an Operation.
Message {0} is expecting to contain at least a Flow Property or an Operation.

Block contains neither Behaviors nor Part Properties

ESP_IBD_004 Block contains neither Behaviors nor Part Properties

Attributes Values
Severity WARNING
Used by UML to C, UML to C++
Description A block shall be composed of either behaviors or Part Properties referring to other blocks. Block containing none of elements above will not be considered.
Message {0} contains no Behavior and no Part Property. This block will not be considered during generation. Tip: Include Behaviors of Part Properties in your block.

Value Property in InterfaceBlock Unused

ESP_IBD_007 Value Property in InterfaceBlock Unused

Attributes Values
Severity INFO
Used by UML to C, UML to C++
Description A Value Property contained in an InterfaceBlock is not supported for code generation. An existing Value Property will not be considered during generation. Use a Flow Property instead of a Value Property to transmit data over a proxy port.
Message {0} contained in {1} will not be considered for code generation.

Bidirectional ProxyPort not supported

ESP_IBD_013 Bidirectional ProxyPort not supported

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description A ProxyPort whose InterfaceBlock defines flow data in both directions (in and out) is not supported by the code generator. Split the in and out flows over separate ProxyPorts.
Message {0} is bidirectional: its InterfaceBlock defines flow data both in and out, which is not supported by the code generator.

Connector Without A Port

Connector Without A Port

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description A connector connected between a Port and a Property referencing a Class is not supported. A connector connected between 2 properties referencing classes is not supported.
Message {0} in {1} cannot connect {2} and {3} without a port
Message {0} in {1} cannot have one end connecting {2} without a port and the other end connecting to {3}

UML C Rules

Total rules: 6

Severity Count
ERROR 4
WARNING 2
INFO 0

Invalid alignment attribute value for C++Aligned stereotype

RULE_UML_CLS_C_85 Invalid alignment attribute value for C++Aligned stereotype

Attributes Values
Severity ERROR
Used by UML to C
Description The alignment attribute of the C++Aligned stereotype must be an integer that is a power of two.
Message {0} has an invalid alignment value for the C++Aligned stereotype. Allowed values are an integer power of two.

Unbounded multiplicity (List) is not supported

RULE_UML_CLS_C_86 Unbounded multiplicity (List) is not supported

Attributes Values
Severity ERROR
Used by UML to C
Description The concept of List is not supported by the C code generator. A property must not have an unbounded multiplicity (upper bound “*“): only a fixed upper bound can be generated, as a C array of that size.
Message {0} has an unbounded multiplicity (upper bound “*“), which is not supported by the C code generator. Set a fixed upper bound to generate a C array.

Inheritance visibility ignored in C

RULE_UML_CLS_C_87 Inheritance visibility ignored in C

Attributes Values
Severity WARNING
Used by UML to C
Description C has no access-controlled inheritance. A base class is generated as a plain embedded structure member, so a non-public (private or protected) inheritance visibility set through the C++ ANSI profile is generated like a public base and the visibility is dropped. This C++-specific attribute is honored only when generating C++ code.
Message Inheritance of {0} from {1} is declared {2}, but C has no access-controlled inheritance: the base is embedded as a plain structure member and the {2} visibility is ignored in the generated C code. It is honored only when generating C++.

Virtual inheritance ignored in C

RULE_UML_CLS_C_88 Virtual inheritance ignored in C

Attributes Values
Severity WARNING
Used by UML to C
Description C cannot emulate virtual (shared) base classes: each base is embedded as its own sub-object, so a virtual base in a diamond hierarchy would be duplicated instead of shared. The virtual_inheritance set through the C++ ANSI profile is dropped in C. This C++-specific attribute is honored only when generating C++ code.
Message {0} inherits from {1} with virtual inheritance, but C cannot emulate virtual (shared) base classes: the base is embedded as an ordinary sub-object, so virtual inheritance is ignored in the generated C code (a shared base in a diamond hierarchy will be duplicated). It is honored only when generating C++.

Property name different of Type

RULE_UML_C_81 Property name different of Type

Attributes Values
Severity ERROR
Used by UML to C
Description Name of a Property defined in a Class must be different of its Type.
Message {0} cannot have the same name as {1}

No operations with same name in a class

RULE_UML_C_82 No operations with same name in a class

Attributes Values
Severity ERROR
Used by UML to C
Description In C language, 2 operations can’t have same name.
Message {0} has same name than another one in {1}

UML Cpp Rules

Total rules: 3

Severity Count
ERROR 2
WARNING 1
INFO 0

Invalid alignment attribute value for C++Aligned stereotype

RULE_UML_CLS_CPP_824 Invalid alignment attribute value for C++Aligned stereotype

Attributes Values
Severity ERROR
Used by UML to C++
Description The alignment attribute of the C++Aligned stereotype must be an integer that is a power of two or the name of an existing type (e.g., a class or standard type such as int).
Message {0} has an invalid alignment value for the C++Aligned stereotype. Allowed values are an integer power of two or, in C++, the name of an existing type.

Incompatible use of C++Packed and C++Aligned stereotypes for C++

RULE_UML_CLS_CPP_825 Incompatible use of C++Packed and C++Aligned stereotypes for C++

Attributes Values
Severity WARNING
Used by UML to C++
Description In C++, the use of the C++Packed stereotype together with the C++Aligned stereotype on the same element is not permitted. These mechanisms express conflicting alignment constraints and may lead to undefined or implementation-defined behavior. When an alignment constraint is required, C++Aligned shall be preferred and C++Packed shall not be used.
Message {0} uses both C++Packed and C++Aligned stereotypes, which is not allowed in C++. Remove C++Packed and keep C++Aligned to specify alignment. C++Packed is ignored by the generator.

Property name different of Type

RULE_UML_CPP_81 Property name different of Type

Attributes Values
Severity ERROR
Used by UML to C++
Description Name of a Property defined in a Class must be different of its Type.
Message {0} cannot have the same name as {1}

Class Model Rules

Total rules: 27

Severity Count
ERROR 21
WARNING 6
INFO 0

Relation end names different than the connected class

RULE_UML_CLS_CPP_81 Relation end names different than the connected class

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description In the context of an aggregation or a composition or an association between 2 classes, its relation ends must have names different than the target class. Rationale: a variable cannot be generated with the same name as its type.
Message {0} can’t have same name than its type {1}

Friend operations not supported

RULE_UML_CLS_CPP_82 Friend operations not supported

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Friend operations are not supported by the C++ code generator.
Message {0} C++ friend stereotype is not supported

Objects shall have a name

RULE_UML_CLS_CPP_83 Objects shall have a name

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Objects needed for code generation need a name, except for uml classes with C++ global stereotype.
Message {0} has no name.

Nested classes are not supported

RULE_UML_CLS_CPP_84 Nested classes are not supported

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Nested class in another class is not a supported concept.
Message Nested class {0} is not supported.

Uml operations with several methods are not supported

RULE_UML_CLS_CPP_85 Uml operations with several methods are not supported

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Code generation doesn’t support operations with several methods
Message {0} is not supported, it contains {1} as declared methods

Uml operations with stereotype «getter» or «setter» shall have attribute set

RULE_UML_CLS_CPP_86 Uml operations with stereotype «getter» or «setter» shall have attribute set

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Uml operations with stereotype «getter» or «setter» shall have attribute set
Message {0} has no valid attribute set in “Setter/Getter for attribute” property

«constructor» stereotype appliance

RULE_UML_CLS_CPP_87 «constructor» stereotype appliance

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Uml operations with stereotype «constructor» shall have same name than its parent class
Message {0} is a constructor, but is missing stereotype «constructor»
Message Constructor {0} has no valid name against its parent class

«destructor» stereotype appliance

RULE_UML_CLS_CPP_88 «destructor» stereotype appliance

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Uml operations with stereotype «destructor» shall have same name than its parent class plus ‘~’ as prefix
Message {0} is a destructor, but is missing stereotype «destructor»
Message Destructor {0} has no valid name against its parent class

Uml operations with stereotype «C++Constructor» must not have the Virtual attribute set to true.

RULE_UML_CLS_CPP_89 Uml operations with stereotype «C++Constructor» must not have the Virtual attribute set to true.

Attributes Values
Severity WARNING
Used by UML to C, UML to C++
Description Uml operations with stereotype «C++Constructor» must not have the Virtual attribute set to true. The virtual keyword is not allowed for C++ constructors.
Message Constructor {0} cannot have the Virtual attribute set to true. The virtual keyword is not allowed for C++ constructors.

Packed attribute set to true is not supported.

RULE_UML_CLS_CPP_90 Packed attribute set to true is not supported.

Attributes Values
Severity WARNING
Used by UML to C, UML to C++
Description Packed attribute set to true is not supported for elements other than: - Classes - Enumerations - Value types with attributes - Attributes that are neither pointers nor references - Attributes that are not bitfields
Message {0} cannot have the Packed attribute set to true. Packed attribute set to true is not supported for elements other than: - Classes - Enumerations - Value types with attributes - Attributes that are neither pointers nor references - Attributes that are not bitfields

Abstract operation won’t be final

RULE_UML_CLS_CPP_91 Abstract operation won’t be final

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Operation set as Abstract can’t have leaf attribute set to true
Message {0} is abstract and leaf, which is not possible

Redefined operation shall have same signature than operation

RULE_UML_CLS_CPP_92 Redefined operation shall have same signature than operation

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description If an operation has ’redefined operation’ or ’sync element’ set, this redefined operation shall have same signature than operation
Message {1} in {0} has not same direction than in overriden {2}.
Message {1} in {0} has not type compatible with type in overriden {2}.
Message {0} has not same number of arguments than overriden {1}.
Message {0} has not same name than overriden {1}.

Final operation shall be virtual

RULE_UML_CLS_CPP_93 Final operation shall be virtual

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description An leaf operation can’t have C++ virtual set to false
Message {0} is C++ virtual set to false and leaf, which is not possible

Specifications other than Literal Integer are not supported for enumeration literal

RULE_UML_CLS_CPP_94 Specifications other than Literal Integer are not supported for enumeration literal

Attributes Values
Severity WARNING
Used by UML to C, UML to C++
Description Specifications other than Literal Integer are not supported for enumeration literal
Message {0} is a specification not supported for enumeration literal

Enumeration cannot have duplicated enumeration literal values

RULE_UML_CLS_CPP_95 Enumeration cannot have duplicated enumeration literal values

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Enumeration cannot have duplicated enumeration literal values
Message {0} has duplicated enumeration literal values {1} coming from {2} ({3}) and {4} ({5})

A final class can’t be inherited

RULE_UML_CLS_CPP_96 A final class can’t be inherited

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description An uml class with leaf or final specialization attributes set can’t be used as generalization target
Message {0} inherits from final {1}

A final operation won’t be overriden

RULE_UML_CLS_CPP_97 A final operation won’t be overriden

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Operation with leaf attribute set can’t be used as redefined operation
Message {0} can’’t override {1} in {2}

Attribute value of Enumeration Literal from C++ANSI Profile must be a signed integer

RULE_UML_CLS_CPP_98 Attribute value of Enumeration Literal from C++ANSI Profile must be a signed integer

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Attribute value of Enumeration Literal from C++ANSI Profile must be a signed integer
Message Attribute value of {0} must be a signed integer

An operation won’t be directly tagged C++ NoVirtual and set as virtual in C++ properties

RULE_UML_CLS_CPP_817 An operation won’t be directly tagged C++ NoVirtual and set as virtual in C++ properties

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description An operation won’t be directly tagged C++ NoVirtual and set as virtual in C++ properties
Message {0} has both C++NoVirtual set and C++Operation/virtual set to true

An operation having same signature of a inherited operation without being linked with redefine operation

RULE_UML_CLS_CPP_818 An operation having same signature of a inherited operation without being linked with redefine operation

Attributes Values
Severity WARNING
Used by UML to C, UML to C++
Description An operation having same signature of a inherited operation without being linked with redefine operation
Message {0} in {1} doesn’’t redefine {2}, which is present in ancestor {3}

A class or interface can’t be abstract and leaf or final specialization

RULE_UML_CLS_CPP_819 A class or interface can’t be abstract and leaf or final specialization

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description generated c++ class from ’leaf’ or ’final specialization’ uml class or uml interface are final. Therefore they can’t be inherited.
Message {0} is abstract and has also leaf or ’final specialization’ set.

Pure virtual operation shall be implemented in model

RULE_UML_CLS_CPP_820 Pure virtual operation shall be implemented in model

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Pure virtual operation is represented by an abstract operation in uml class or any operation in uml interface
Message {0} is not implemented in model via ’redefined operation’ or ’Sync element’ attributes

Overridden operation shall belong to inherited classes or implemented interfaces

RULE_UML_CLS_CPP_821 Overridden operation shall belong to inherited classes or implemented interfaces

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Overridden operation shall belong to inherited classes or implemented interfaces
Message {0} can’’t override itself
Message {0} can’t override {1} because its class doesn’t inherit from {2}

Static Operation can’t be neither virtual nor pure virtual

RULE_UML_CLS_CPP_822 Static Operation can’t be neither virtual nor pure virtual

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Uml operation can’t be set to static and abstract, or c++virtual
Message {0} is static and virtual or pure virtual

C++Aligned stereotype applied to unsupported element

RULE_UML_CLS_CPP_823 C++Aligned stereotype applied to unsupported element

Attributes Values
Severity WARNING
Used by UML to C, UML to C++
Description The C++Aligned stereotype may only be applied to the following UML elements: Global variables, Classes, Enumerations, Structure / Value types, Attributes that are not references, and that are not bitfields. Applying the C++Aligned stereotype on any other kind of element is not supported.
Message C++Aligned stereotype cannot be applied to {0}. Supported elements are: Global variables, Classes, Enumerations, Structure / Value types, Attributes that are not references, and that are not bitfields. C++Aligned stereotype is ignored by the generator.

Abstract class, or interface can’t be final or final specialization set to true

RULE_UML_CLS_CPP_826 Abstract class, or interface can’t be final or final specialization set to true

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Abstract class, or interface can’t have final or final specialization attributes set to true
Message {0} can’t befinal’ or ’final specialization’ and abstract
Message {0} can’t befinal’ or ’final specialization’

Exception not supported

RULE_UML_CLS_CPP_829 Exception not supported

Attributes Values
Severity WARNING
Used by UML to C, UML to C++
Description Exceptions are not supported by the code generator. An operation must not declare a raised exception.
Message Operation {0} declares a raised exception, which is not supported.

OpaqueBehavior Cpp Rules

Total rules: 2

Severity Count
ERROR 0
WARNING 2
INFO 0

Incorrect Language

RULE_UML_OB_CPP_81 Incorrect Language

Attributes Values
Severity WARNING
Used by UML to C++
Description For an OpaqueBehavior or an OpaqueExpression, language can be empty or set to C, C++, ALF or English when using code generator.
Message Language attribute is empty, it should be set to C.
Message Language should be unset or set to C or C++ or ALF or English but it is {1}.

Expected Init, Main, End Functions

RULE_UML_OB_CPP_82 Expected Init, Main, End Functions

Attributes Values
Severity WARNING
Used by UML to C++
Description Init, Main and End functions are expected to be implemented in Opaque Behavior
Message End function with name {1} is missing in body. a template shall be generated
Message Init function with name {1} is missing in body. a template shall be generated
Message Main function with name {1} is missing in body. a template shall be generated

OpaqueBehavior C Rules

Total rules: 2

Severity Count
ERROR 0
WARNING 2
INFO 0

Incorrect Language

RULE_UML_OB_C_81 Incorrect Language

Attributes Values
Severity WARNING
Used by UML to C
Description For an OpaqueBehavior or an OpaqueExpression, language can be empty or set to C, ALF, English when using code generator.
Message Language attribute is empty, it should be set to C.
Message Language should be unset or set to C or ALF or English but it is {1}.

Expected Init, Main, End Functions

RULE_UML_OB_C_82 Expected Init, Main, End Functions

Attributes Values
Severity WARNING
Used by UML to C
Description Init, Main and End functions are expected to be implemented in Opaque Behavior
Message End function with name {1} is missing in body. a template shall be generated
Message Init function with name {1} is missing in body. a template shall be generated
Message Main function with name {1} is missing in body. a template shall be generated

UML Activity Rules

Total rules: 30

Severity Count
ERROR 30
WARNING 0
INFO 0

Edge crossing structured activities border

RULE_UML_ACT_C_81 Edge crossing structured activities border

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description In the context of a structured activity node, it is forbidden to have an edge crossing its border. Rationale: An edge crossing a structured activity node border can be seen as a switch between activities when realized. Such operation is similar to a context switch which is not supported. Fix: Do not use such pattern in you activity.
Message Edge {0} is crossing the border of {1}.

Unsupported Variable Actions

RULE_UML_ACT_C_82 Unsupported Variable Actions

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Actions in relation with the local variables are not supported. Actions are known as: - Clear Variable Action, - Read Variable Action, - Add Variable Value Action, - Remove Variable Value Action. Fix: Do not use these actions in your activity.
Message Variable Action {0} is not supported.

Unsupported Structural Nodes

RULE_UML_ACT_C_83 Unsupported Structural Nodes

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Structural nodes are not supported. These nodes are identified as following: - Sequence Node - Conditional Node - Loop Node Fix: Do not use these nodes in your activity.
Message Structural Nodes {0} is not supported.

Unsupported ExceptionHandler and RaiseExceptionAction

RULE_UML_ACT_C_84 Unsupported ExceptionHandler and RaiseExceptionAction

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description ExceptionHandler and RaiseExceptionAction are not supported. Fix: Do not use it in your activity.
Message {0} is not supported.

Unsupported Expansion Region

RULE_UML_ACT_C_86 Unsupported Expansion Region

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Expansion Region is not supported. Fix: Do not use it in your activity.
Message Expansion Region {0} is not supported.

Unsupported Interruptible Activity Region

RULE_UML_ACT_C_87 Unsupported Interruptible Activity Region

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Interruptible Activity Region is not supported. Fix: Do not use it in your activity.
Message Interruptible Region {0} is not supported.

Unsupported Accept Events without Input Edge

RULE_UML_ACT_C_88 Unsupported Accept Events without Input Edge

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Accept Event without input edge is not supported. Accept Events without input edge are always active, typical pattern is a permanent execution of a timer. Fix: Do not use such pattern in your activity.
Message {0} without input edge is not supported.

Configuration of Object Flow Ends

RULE_UML_ACT_C_89 Configuration of Object Flow Ends

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Object Flow ends should reference a pin or a node with a parameter. Object Flow ends must have the same type or at least one end should reference a type. Fix: Define only one end with a type or set the same type for both ends.
Message {1} and {2} must have the same types.
Message At least one Object Flow end should reference a type
Message No parameter found in {0}.
Message {0} Object Flow ends should reference a pin or a node with a parameter or a Final Flow.
Message {0} must be of type OutputPin in {0}.
Message Edge source should not be null in {0}.
Message {1} must be of type InputPin in {0}.
Message Edge target should not be null in {0}.

Activity Parameter Node Connection

RULE_UML_ACT_C_810 Activity Parameter Node Connection

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description An ActivityParameter Node can only be connected to one single Object Flow. Fix: Only connect one Object Flow to the Activity Parameter Node.
Message Invalid flow for {0}.

No Output Control/Object Flow for an Activity Final Node

RULE_UML_ACT_C_811 No Output Control/Object Flow for an Activity Final Node

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description An Activity Final Node shall not have an output control/object flow. Fix: Delete the control/object flow.
Message Invalid output flow for {0}.

Create Object Action Configuration - Output Pin

RULE_UML_ACT_C_812 Create Object Action Configuration - Output Pin

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description A Create Object Action can only have 1 output Pin.
Message Invalid number of output pins for {0}.

Create Object Action Configuration - Classifier

RULE_UML_ACT_C_813 Create Object Action Configuration - Classifier

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description A Create Object Action must reference a classifier.
Message Missing classifier for {0}.

Create Object Action Configuration - Referenced Type

RULE_UML_ACT_C_814 Create Object Action Configuration - Referenced Type

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Output pin of Create Object Action shall reference the same classifier or shall not reference any.
Message Type mismatch for {0}.

Decision Node Configuration - Output Edge

RULE_UML_ACT_C_815 Decision Node Configuration - Output Edge

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Decision Node must have at least one output edge.
Message Invalid number of output edge for {0}.

Decision Node Configuration - Else Guard

RULE_UML_ACT_C_816 Decision Node Configuration - Else Guard

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Decision Node must have at most one else guard. Note: Empty guard is considered as an else guard.
Message Too many else guards ({1}) for {0}.

Decision Node Configuration - Opaque Behavior

RULE_UML_ACT_C_817 Decision Node Configuration - Opaque Behavior

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Guard of edge must be an opaqueBehavior.
Message Bad guard type in output edge {1} for {0}.

Fork Node Configuration - Input Edge

RULE_UML_ACT_C_818 Fork Node Configuration - Input Edge

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Fork Node must have strictly one input edge.
Message Invalid number of input edge for {0}.

Fork Node Configuration - Output Edges

RULE_UML_ACT_C_819 Fork Node Configuration - Output Edges

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Fork Node must have at least one output edge.
Message Invalid number of output edge for {0}.

Fork Node Configuration - Referenced Type

RULE_UML_ACT_C_820 Fork Node Configuration - Referenced Type

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Fork Node has either at least one edge having a type or all edges having a type must have the same type.
Message Invalid type for edge {1} of {0}.
Message No type can be found for {0}.

Send Signal Action Configuration

RULE_UML_ACT_C_821 Send Signal Action Configuration

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Send Signal Action must reference a Signal.
Message Missing Signal for {0}.

Accept Event Action Configuration - Event Reference

RULE_UML_ACT_C_822 Accept Event Action Configuration - Event Reference

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description AcceptEventAction must reference an Event.
Message Missing Event for {0}.

Unsupported Event for Accept Event Action

RULE_UML_ACT_C_823 Unsupported Event for Accept Event Action

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Any Receive Event, Call Event, Change Event declared in an Accept Event Action are not supported. Only SignalEvent and TimeEvent are supported.
Message Unsupported Event {1} for {0}.

Add Structural Feature Value Action Configuration - Reference to Structural Feature

RULE_UML_ACT_C_824 Add Structural Feature Value Action Configuration - Reference to Structural Feature

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Add Structural Feature Value Action shall reference a structural feature
Message Feature not set for {0}

Add Structural Feature Value Action Configuration - Value Input Pin

RULE_UML_ACT_C_825 Add Structural Feature Value Action Configuration - Value Input Pin

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Add Structural Feature Value Action shall have one input pin named value. This pin must be connected to another Pin or an Activity Parameter Node.
Message Bad connection for value pin of {0}
Message Missing value pin for {0}
Message Too many value pins for {0}

Add Structural Feature Value Action Configuration - Object Input Pin

RULE_UML_ACT_C_826 Add Structural Feature Value Action Configuration - Object Input Pin

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Add Structural Feature Value Action can have an input Pin named Object. If the Object Pin exists, it must be connected to another Pin or an Activity Parameter Node.
Message Bad connection for object pin of {0}
Message Too many object pins for {0}

Name Required

RULE_UML_ACT_C_842 Name Required

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description ParameterNode, Port, Property, Signal must have a name.
Message {0} must have a name.

syncElement on Output Pin required

RULE_UML_ACT_C_843 syncElement on Output Pin required

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Output Pins of Accept Event Actions shall refer a Signal property via syncElement Property
Message {0} syncElement property shall refer a Signal Property
Message {0} syncElement property shall be set

operation on Call Operation Action required

RULE_UML_ACT_C_844 operation on Call Operation Action required

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Call Operation Actions shall refer an operation via referencedElement Property
Message {0} operation property shall refer an operation

Activity Parameter Node Configuration - Referenced Parameter

RULE_UML_ACT_C_845 Activity Parameter Node Configuration - Referenced Parameter

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description An Activity Parameter Node must reference a parameter. Fix: Reference an activity parameter from the Activity Parameter Node.
Message Missing referenced parameter for {0}.

Control Flow Connection

RULE_UML_ACT_C_846 Control Flow Connection

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description A control flow must have both a source and a target node. Fix: Connect both ends of the control flow.
Message Control flow {0} must be connected on both ends.

ALF Code Generation Rules

Total rules: 1

Severity Count
ERROR 1
WARNING 0
INFO 0

ALF Code Validation

ESP_ALF_001 ALF Code Validation

Attributes Values
Severity ERROR
Used by UML to C, UML to C++
Description Validates that ALF expressions can be compiled to C/C++.
Message ALF accessibility warning in {0}: {1}
Message ALF syntax error in {0}: {1}
Message ALF type error in {0}: {1}
Message Unresolved reference in {0}: ’{1}’ not found

Resource Template Rules

Total rules: 1

Severity Count
ERROR 1
WARNING 0
INFO 0

Resource Template Validation

ESP_RES_001 Resource Template Validation

Attributes Values
Severity ERROR
Used by
Description Validates that <<Resource>> template bodies (Makefile/CMake) only reference members and blocks provided by their controllers.
Message Could not validate resource template ’{0}’: {1}
Message Error while generating a resource template: {0}
Message Syntax error while generating a resource template: {0}
Message Syntax error in resource template ’{0}’ (line {1}): {2}
Message Unresolved reference in resource template ’{0}’ (line {1}): {2}

UML Kotlin Rules

Total rules: 5

Severity Count
ERROR 1
WARNING 4
INFO 0

Generalization to a single Class

RULE_UML_CLS_KOTLIN_82 Generalization to a single Class

Attributes Values
Severity ERROR
Used by Kotlin
Description A Class can inherit from one and only one Kotlin class via the generalization relation.
Message {0} can generalize only one class

Nested class not supported

RULE_UML_CLS_KOTLIN_84 Nested class not supported

Attributes Values
Severity WARNING
Used by Kotlin
Description Nested Classes are not supported by Kotlin code generator.
Message {0} cannot have nested classes

Attributes or operations cannot be private and abstract

RULE_UML_CLS_KOTLIN_87 Attributes or operations cannot be private and abstract

Attributes Values
Severity WARNING
Used by Kotlin
Description Visibility modifier private and modality modifier abstract are not compatible for an attribute or an operation.
Message {0} cannot be both private and abstract

Attributes or operations cannot be private and open (not final)

RULE_UML_CLS_KOTLIN_88 Attributes or operations cannot be private and open (not final)

Attributes Values
Severity WARNING
Used by Kotlin
Description Visibility modifier private and modality modifier open are not compatible for an attribute or an operation.
Message {0} cannot be both private and open (not final)

Attributes or operations cannot be open (not final) if declared inside a final class

RULE_UML_CLS_KOTLIN_89 Attributes or operations cannot be open (not final) if declared inside a final class

Attributes Values
Severity WARNING
Used by Kotlin
Description Attributes or operations cannot be open (not final) if declared inside a final class.
Message {0} cannot be open (not final) because declared inside the final class {1} ({2})

Class Model Kotlin Rules

Total rules: 7

Severity Count
ERROR 1
WARNING 6
INFO 0

Items with no names not supported.

RULE_UML_CLS_KOTLIN_85 Items with no names not supported.

Attributes Values
Severity ERROR
Used by Kotlin
Description Objects needed for code generation need a name.
Message {0} has no name.

Operations with the same signature as a setter or getter of an attribute not supported.

RULE_UML_CLS_KOTLIN_86 Operations with the same signature as a setter or getter of an attribute not supported.

Attributes Values
Severity WARNING
Used by Kotlin
Description Operations cannot have the same signature as an attribute’s setter or getter.
Message {0} has same name as {1} of attribute {2} ({3}).

Top-level classes, interfaces and enumerations cannot have visibility protected.

RULE_UML_CLS_KOTLIN_810 Top-level classes, interfaces and enumerations cannot have visibility protected.

Attributes Values
Severity WARNING
Used by Kotlin
Description Top-level classes, interfaces and enumerations cannot have visibility protected.
Message {0} cannot have visibility protected.

Non-static mutable attributes of interface cannot be private.

RULE_UML_CLS_KOTLIN_811 Non-static mutable attributes of interface cannot be private.

Attributes Values
Severity WARNING
Used by Kotlin
Description Non-static mutable attributes of interface cannot be private.
Message {0} of interface {1} cannot be non-static mutable and private.

Non-static attributes of interface cannot be protected or internal.

RULE_UML_CLS_KOTLIN_812 Non-static attributes of interface cannot be protected or internal.

Attributes Values
Severity WARNING
Used by Kotlin
Description Non-static attributes of interface cannot be protected or internal.
Message {0} of interface {1} cannot be non-static and {2}.

Operations cannot be non-static and internal or protected in interface.

RULE_UML_CLS_KOTLIN_813 Operations cannot be non-static and internal or protected in interface.

Attributes Values
Severity WARNING
Used by Kotlin
Description Operations cannot be non-static and internal or protected in interface.
Message {0} of interface {1} cannot be non-static and internal (i.e. with visibility package) or protected.

Arguments of constructor cannot be protected.

RULE_UML_CLS_KOTLIN_814 Arguments of constructor cannot be protected.

Attributes Values
Severity WARNING
Used by Kotlin
Description Arguments of constructor cannot be protected.
Message {0} of constructor {1} cannot be protected.

Internal Rules

Total rules: 1

Severity Count
ERROR 1
WARNING 0
INFO 0

Internal Error

INTERNAL_ERROR Internal Error

Attributes Values
Severity ERROR
Used by FMU, Kotlin, UML to C, UML to C++
Description An internal error occured during validation.
Message An internal error occured during validation executing rule {1} on {0}: {2}.