Such composite structures (metaclass StructuredClas-
sifier) can be described as a topology of parts (meta-
class Property whose AggregationKind is composite)
that are linked through connectors (metaclass Con-
nector) to form the internals of their owning element
(e.g., a Class or a Component) in terms of a network.
A classifier may also define interaction points (meta-
class Port) to model communication interfaces be-
tween itself (or its internal parts) and its environment.
Ports are dedicated parts that encapsulate the behav-
ior of their owning classifier (metaclass Encapsulat-
edClassifier) and specify its provided and required in-
terfaces (OMG, 2017).
The PSCS specification defines runtime semantics
for executable UML models that include Structured-
Classifiers, as well as EncapsulatedClassifiers. Like
fUML, PSCS provides a metamodel that describes an
execution environment to realize those runtime se-
mantics defined in the specification. In terms of struc-
tural semantics, PSCS specifies the lifecycle manage-
ment of composite structures at runtime (i.e., creation
and destruction of instances of composite structures).
In terms of behavioral semantics, PSCS defines how
instances of composite structures communicate with
each other. More precisely, the behavioral seman-
tics of PSCS specify how communication, either syn-
chronously using operation calls or asynchronously
using signals is forwarded through a network of in-
terconnected runtime objects (OMG, 2019). While
the latter concerns dynamic aspects of a model which
have to be evaluated at runtime, the structural seman-
tics of PSCS mainly focus on the analysis and evalu-
ation of static information of a model. That is, for ex-
ample, evaluating how composite structures and their
internal topologies have to be instantiated, depending
on the definition of their structural properties in the
model (e.g., their parts and ports, their connectors,
involved multiplicities, etc.). The fact that such in-
formation is static for a model and does not change
during execution gives us the ability to outsource its
analysis and evaluation to a step of preprocessing be-
fore the actual execution happens and thus decrease
the amount of data processing required at runtime.
Of course, since PSCS (as well as fUML) is
designed-platform independent and makes no as-
sumptions about the environment it is implemented
in, all of PSCS’s functionality is encapsulated in its
metamodel classes which form a pure virtual machine
for executing models (OMG, 2019). The aim of the
PSCS implementation presented by this paper is to
make use of auto-generated, model-specific source
code to form the basis of the model execution as an in-
put for PSCS’s actual execution environment. By that,
the required functionality for executing PSCS models
concerning analysis and processing of static, struc-
tural information about the model (which is known
at generation time and does not change as long as
the underlying model does not change) can be out-
sourced from the execution environment itself to the
process of code generation. The described approach
should reduce computation overhead during execu-
tion because the evaluation of structural model infor-
mation (which is a significant part of PSCS’s runtime
functionality) is done only once during generation in-
stead of multiple times at runtime during the actual
model execution.
Section 2 shows the realization workflow of the
PSCS implementation that is introduced by this pa-
per and selected design challenges and how they were
solved. Section 3 presents how the implementation’s
conformance to the original specification and its cor-
rect functionality were validated as well as a perfor-
mance evaluation. The results of the validation pro-
cess and possible future work are ultimately discussed
in section 4.
2 METHODOLOGY
This section describes the design workflow and
the components that were implemented to realize a
model-driven implementation of the PSCS specifica-
tion. One of the major challenges was the porting of
PSCS’s concept of links, that connect runtime objects
to form a topology, to the level of source code genera-
tion as well as the resulting requirements for memory
management. Details on how those challenges were
solved will also be explained in this section.
2.1 Workflow
The realization of the PSCS specification presented
by this paper is based on the MDE4CPP project (Sys-
tems and Software Engineering Group, 2016), which
develops an open-source framework for MDSD us-
ing C++. Being one of the most important third party
components of the MDE4CPP framework, the Eclipse
Modeling Framework
1
(EMF) is used as the founda-
tional toolset for creating and analyzing models as
well as developing the source code generation facil-
ities required for the implementation of PSCS pre-
sented by this paper.
MDE4CPP provides model-driven implementa-
tions for the meta models of UML as well as
fUML (which are required for implementing PSCS).
Eclipse’s Ecore model is used as the meta meta
1
see https://www.eclipse.org/modeling/emf/
A Model-driven Implementation of PSCS Specification for C++
101