-
Notifications
You must be signed in to change notification settings - Fork 1
Validators
The exemplar provides the following generic validators to validate the CompArch model after a self-adaptation. These validators are independent of the adaptable software such as mRUBiS (mRUBiS-specific validators can be found here).
Additionally, developers may provide their individual validators by implementing the interface de.mdelab.simulator.Validator
.
Retrieves all Components
of all Tenant
architectures ordered by their states (see attribute Component.state
and grouped by their tenants. The validation particularly checks for components in state UNKNOWN
, which indicates that something is wrong with the life cycle of the component. In this case, an issue is raised by the validator.
Validates for each Tenant
architecture if and how many Exceptions
are thrown by ProvidedInterfaces
. It becomes an issue if the number of exceptions thrown by one provided interface exceeds the given threshold.
Validates for a minimal configuration of each Tenant
architecture. A minimal configuration is one where each ComponentType
is only instantiated at most once per Tenant
, that is, there are no two STARTED
Components
of the same ComponentType
in one Tenant
. Otherwise, the same functionality is provided by more than one component, which requires more resources than actually needed. Thus, an issue is raised if one component type is instantiated more than once per tenant.
Validates for each Tenant
architecture whether each (configuration) Parameter
of a STARTED
Component
has a value assigned (see attribute Parameter.value
). An issue is raised if such a parameter has no value assigned.
Validates each Tenant
architecture whether its STARTED
Components
provide together all given interfaces such that the tenant actually provides the necessary functionality to be operable. An issue is raised for each of the given interfaces that are not provided by a started component in each tenant.
Validates for each Tenant
architecture whether each RequiredInterface
is connected to a ProvidedInterface
STARTED
Component
within the same Tenant
. An issue is raised for each required interface that is not connected or that is connected to a component of another tenant.
Validates a self-adaptation that adjust the life cycle state of a Component
(see attribute Component.state
), for instance, to start or stop a component. The validation checks whether such a self-adaptation conforms to the life cycle of a component. If not, an issue is identified by this validator.
If a self-adaptation does not follow the life cycle, the state of the component effected by the self-adaptation is set to UNKNOWN
.
Validates a self-adaptation whether it replaces a Component
with a Component
of another ComponentType
. Both components provide the same functionality in terms of ProvidedInterfaces
but they are realized differently and are therefore of a different type (see reference Component#type
).
This validator does not identify any issues but provides information about how a self-adaptation has been performed when changing the structure of the architecture.
mRUBiS Exemplar by Thomas Vogel (2018)