|
Mod-MAST
Extension
of the MAST methodology to modular systems
|
Table of Contents
Introduction
Mod-MAST is an extension of the MAST
modelling methodology that allows building the
real-time model of complex systems, i.e. systems that are built
with a
modular structure, by composing the partial models of the hardware
and software modules that form them.
The Mod-MAST
methodology can be applied in the following cases:
- Systems built with
a modular architecture applied
at any level: at the logical level (application code), operating system
level, middleware level, etc. In this kind of systems, the
application designer may not know the internal details of the used
modules, but he must be able to build the real-time model of the
application as a composition of the partial models of the system modules.
These models must have been formulated by the designers
of the modules in a reusable manner, i.e., independently of the
concrete application
in which the modules are going to be used.
- Complex systems or
systems that are part of a very complex system, i.e. systems
in which the number of transactions and internal resources of the
real-time model is very large, so the modularity provided by Mod-MAST
can be used to manage the complexity of the model.
Mod-MAST Extensions
Mod-MAST extends MAST in four
different aspects:
- Providing capacity
to formulate parameterized models that can be reused in different
applications and systems.
- Providing
a set of container modelling elements that can be used to describe the
model of a reusable module (software module, processing node, communication
network and communication service) independently of the systems in
which it may be used.
- Providing the Job modelling primitive to describe
the temporal behaviour of complex multi-threaded services offered by
software modules.
- Providing the System
modelling element to describe the real-time model of a complex
system as a composition of the parameterized real-time models
of the modules that form the system.
Model Descriptor / Model Instance
The Mod-MAST methodology is
based on the dual concept of Model
Descriptor and Model Instance:
- An
RT Model Descriptor is a parameterized template, which contains
the complete information about the temporal behaviour of a reusable
element that is required to evaluate the timing behaviour of any
application in which the module may be used. There are two types of
parameters in a descriptor:
- References to the real-time models of other software or hardware elements that interact with the modelled element.
- Characteristics that change for each instance of the element according to the way in which it is used in an application.
- An
RT Model Instance is a final and complete analysable model that
describes the timing behaviour of an instance of the element in the
context of a concrete application. The model instance is generated
taking as a reference the corresponding model descriptor and solving
all its parameters with concrete values and references to other model
instances.
Metamodel and W3G-Schemas
Mod-MAST models are
formulated according to a UML metamodel that defines the available
modelling primitives and their relations. The metamodel structure is
shown below. Besides, a set of W3G-Schema templates have
been defined in order to support models formulated using XML
technology. These templates constitute an alternative and equivalent
Mod_MAST metamodel.
![Mod-MAST metamodel](estructuraMetamodelo.JPG)
|
Mod-MAST UML metamodel:
Mod-MAST W3G-Schemas:
- "rtmBasicTypes.xsd":
W3G-Schema with the XML definition of the basic data types.
- "rtmContainers.xsd":W3G-Schema
with the XML definition of the reusable models.
- "rtmParameterizedTypes.xsd": W3G-Schema
with the XML definition of the MAST types extended to support
parameterization.
- "rtmResources.xsd": W3G-Schema
with the XML definition of the platform resource models.
- "rtmSystem.xsd": W3G-Schema with the XML definiton of a modular real-time system.
- "rtmUsages.xsd": W3G-Schema with the XML definition of the usages and operations that can be included in a model descriptor.
- "rtmWorkload.xsd":
W3G-Schema with the XML definition of the types used to describe workloads of an application.
|
Mod-MAST Main Elements
- Model of a
software module
The
real-time model descriptor of a software module is one of the
container elements defined in Mod-MAST. The model descriptor of a
software module must describe in a reusable manner all the
information about the timing behaviour of the module required to build
the real-time model of any application in which it can be used, which
includes:
- Models of the services
offered by the module. They
define the resource usage which results from the invocations of the services by
describing the set of steps related by control flow that are
executed in response to them.
- Models of the
synchronization and concurrency resources defined in the module. The
services offered by a software module may be invoked concurrently by
different clients, so they may require schedulable resources (threads)
or synchronization mechanisms (mutex, shared resources, etc.) to manage
the concurrent executions of the internal code.
- In the case of active
modules, i.e. those than can trigger responses to events in an
application,
models of these responses formulated as Transactions.
These transactions are executed through internal threads included in
the module’s code, and they are independent of the invocations
received in the services offered by the module. The model of an
end-to-end flow transaction is defined also as a set of steps
related by control flow.
The
analysis and design tools provided by MAST are applied to each
real-time situation that a system may have. So, the model of an entire system
is formed by the model of the system itself (applications and platform)
and the model of all its real-time situations.
In Mod-MAST, these elements are defined as follows:
- Model
of an application: Only applications with a modular
structured are considered in Mod-MAST, so an application
is described as the set of model
instances of the software modules that form the
application, each one with all its parameters solved according to the
concrete application context in which it is used.
- Model
of the platform: Following the same
approach, the model
of a platform is formed by the set of model instances of the
elements that form the platform, which may correspond to the
three kinds of descriptors defined in Mod-MAST with that purpose:
Processing_Node, Communication_Network
and Communication_Service.
- Model of
a real-time situation:
The real-time situation of a modular system is formed by the set of
concurrent transactions that are triggered by the software modules that
form the system applications. So, a real-time situation in Mod-MAST is
modelled as a set of Transaction model instances, each of them
referencing the software module that triggers it and with all its
parameters solved according to the real-time situation.
Analysis and design of Mod-MAST models
Applying the MAST analysis
and design tools on a real-time system modelled with Mod-MAST requires
a previous transformation of the model, which generates its equivalent
MAST model. This transformation is carried out by a tool called
MM2M_Compiler (ModMAST to MAST Compiler)
MM2M_Compiler is delivered as an Eclipse plug-in that works on an
Eclipse project with a predefined structure. A project template is provided
together with the plug-in in the following .zip file (a pdf with installation instructions is also provided):
Mod-MAST models of the ScadaExample
The following files form the Mod-MAST model of the ScadaExample system:
- "scadaExamplePlatform.rtp.xml":
Mod-MAST model of the execution platform, formed by the declaration of
the model instances that correspond to the nodes and networks that form
the platform.
- "MaRTENode": Mod-MAST descriptor of a 750MHz Pc executing MaRTE OS.
- "Ethernet": Mod-MAST descriptor of a 100MHz Ethernet network.
- "IOCard.rtm.xml":
Mod-MAST descriptor of the IOCard software module.
- "ScadaEngine.rtm.xml": Mod-MAST descriptor of the ScadaEngine software module.
- "Logger": Mod-MAST descriptor of the Logger software module.
- "ScadaExample.rts.xml":
Mod-MAST model of the ScadaExample system.
They are also included in the Eclipse project provided with the MM2M_Compiler tool:
- The module descriptors are in the "modules" folder
- The descriptors of the elements in the platform are in the "platforms/marteEnvironment" folder
- The descriptors of the ScadaExample are in the "applications/scadaExample" folder