Model Validation

Usage of Check-based Validation

The AMALTHEA validation can be triggered by right clicking a model element in the left Model Explorer View and choose in the context menu Validate – Check-based Validation.

All AMALTHEA sub elements of the chosen element are then included for the validation. In the next window the catalog appears allowing the selection of specific validation checks based on your selected model. Button “Select All” will select all listed validation checks for execution. Each entry of the catalog is called Category which may contain several validation checks (i.e. constraints). The simplest way is to define a 1:1 relationship between category and constraint.

If an error is found, it is shown in the Problems view of Eclipse. A simple double click on the error will lead you to the affected elements in the AMALTHEA model. Sphinx validation distinguishes between three error types: errors, warnings and info.

Available Validations

The plugin org.eclipse.app4mc.amalthea.model.all.sphinx.validation contains several validators and constraints (i.e. checks) for various model types of AMALTHEA.

A. Basic Check Validator

Basic checks which cannot be assigned to a specific AMALTHEA model are summarized. Responsible implementation for this validation is the class org.eclipse.app4mc.amalthea.model.all.sphinx.validation.checks.BasicCheckValidator.

CustomPropertyDuplicateKeyConstraint

A custom validation to check all set custom attributes of one element. If it contains duplicate key entries, it is treated as an error of this element.

WeibullParametersConstraint

Checks the parameters in the Distribution of type WeibullEstimators. The parameters must not be equal to each other, if this is the case, it will be handled as an error .

B. ConstraintsModel Check Validator

Responsible implementation for this validation is the class org.eclipse.app4mc.amalthea.model.all.sphinx.validation.checks.ConstraintsModelCheckValidator.

EventChainsConstraint

Checks for the AMALTHEA constraints model if the EventChains are consistent regarding completeness (fully build chain) and correctness. Therefore each EventChain’s stimulus/response pair is checked if events are existent and linked properly to a complete chain. An event chain of type SubEventChain is checked for its “border” events fit to the stimulus and response event of the parent event chain. Cascades of sub events are processed recursively. A missing or wrong information in the event chain will be handled as an error .

C. EventModel Check Validator

Responsible implementation for this validation is the class org.eclipse.app4mc.amalthea.model.all.sphinx.validation.checks.EventModelCheckValidator.

LabelEventMappingConstraint

Checks for the AMALTHEA event model in AMALTHEA if the mapping information for all LabelEvent are complete and correct. If there is a missing mapping information (i.e. no Entity, Process or Runnable) it will be handled as an error .

ProcessEventMappingConstraint

Checks for the AMALTHEA event model in AMALTHEA if the mapping information for all ProcessEvent are complete and correct. If there is a missing mapping information (i.e. no Entity or Core) it will be handled as an error .

RunnableEventMappingConstraint

Checks for the AMALTHEA event model in AMALTHEA if the mapping information for all RunnableEvent are complete and correct. If there is a missing mapping information (i.e. no Entity, Core or Process) it will be handled as an error .

SemaphoreEventMappingConstraint

Checks for the AMALTHEA event model in AMALTHEA if the mapping information for all SemaphoreEvent are complete and correct. If there is a missing mapping information (i.e. no Entity, Core, Process or Runnable) it will be handled as an error .

StimulusEventMappingConstraint

Checks for the AMALTHEA event model in AMALTHEA if the mapping information for all StimulusEvent are complete and correct. If there is a missing mapping information (i.e. no Entity) it will be handled as an error .

D. HardwareModel Check Validator

Responsible implementation for this validation is the class org.eclipse.app4mc.amalthea.model.all.sphinx.validation.checks.HardwareModelCheckValidator.

HwModelAbstractTypeDuplicateNameConstriant

Checks for the entire AMALTHEA hardware model instance if elements of Type org.eclipse.app4mc.amalthea.model.hw.AbstractionTypeDescription (e.g. ECUType, CoreType or System) contain AMALTHEA elements of org.eclipse.app4mc.amalthea.model.hw.AbstractType (e.g. StrValue, BoolValue) with the identical name. A found duplicate will be handled as an error .

E. MappingModel Check Validator

Responsible implementation for this validation is the class org.eclipse.app4mc.amalthea.model.all.sphinx.validation.checks.MappingModelCheckValidator.

Process2Scheduler2CoreMappingConstraint

Checks for the entire AMALTHEA model instance if the mapping information are complete and correct between Software(SW) <-> Operating System(OS) <-> Software(SW) model. I.e. mapping relationship {Process(SW) to Scheduler(OS) to Core(HW)}. A missing mapping information (i.e. no Entity) or unmapped Processes will be handled as an error .