OSATE-DIM: Tests

We use an example AADL model to test the transformation rules for each kind of View-update.

 

The example is a simplified version of the sampled-communications example project from RAMSES.

Its AADL instance specification (left part of figure) consists of a system containing a Memory Subcomponent ‘the_mem’, a Processor Subcomponent `the_cpu’, and a Process Subcomponent ‘the_proc’ having two Thread Subcomponents, ‘the_sender’ and ‘the_receiver’ that communicate with each other through a Port Connection.

The Declarative model of sampled-communications is shown on the right part of the figure. Traces from the Component Instances to their Classifiers on the Declarative side are represented as red edges, whereas traces from Component Instances to their Subcomponent definitions on the Declarative side are shown as blue edges.

Component Addition

Example modification (method testExperimentComponentCreation) :

The addition of a new thread subcomponent called “the_viewer”.

ComponentInstance proc = topSystemInst.getAllComponentInstances(ComponentCategory.PROCESS).get(0);
ComponentInstance viewer = proc.createComponentInstance();
viewer.setName("the_viewer");
viewer.setCategory(ComponentCategory.THREAD);

Component Updation

Update component name:

Example modification (method testExperimentComponentUpdationName) :

Change in name of “the_viewer” to “the_provider”.

ComponentInstance proc = topSystemInst.getAllComponentInstances(ComponentCategory.PROCESS).get(0); ComponentInstance viewer = proc.createComponentInstance(); viewer.setName("the_viewer"); viewer.setCategory(ComponentCategory.THREAD);
Refine component category:

**updates that are not refine-able (i.e., when the original category of the component is not ABSTRACT) cannot be de-instantiated and are reverted

Example modification (method testExperimentComponentRefinementCategory) :

Update component category:

**updates that are not refine-able (i.e., when the original category of the component is not ABSTRACT) cannot be de-instantiated and are reverted

Example modification (method testExperimentComponentRefinementCategory)

Refine component classifier:

**updates that are not refine-able (i.e., when the new classifier does not extend the original classifier) cannot be de-instantiated and are reverted

Example modification (method testExperimentComponentUpdationClassifier) :

Component Deletion

Example modification (method testExperimentComponentDeletion) :

Feature Addition

Feature Updation

 

Feature Deletion

Connection Addition

Connection Updation

Connection Deletion

Mode Addition

Mode Updation

Mode Deletion

Mode Transition Addition

Mode Transition Updation

Mode Transition Deletion

Property Addition

Property Updation

Property Deletion