CT-CVL document(Draft)

CT-CVL document(Draft)
| Contents | 2
Contents
How to install CT-CVL............................................................................................3
How to use CT-CVL................................................................................................ 5
SubSystem feature editor (VSpec).......................................................................... 9
Subsystem resolution editor...................................................................................12
System definition editor (Structure model)..........................................................15
System feature editor (VSpec)...............................................................................17
System test editor....................................................................................................19
Subsystem file transformation...............................................................................21
| How to install CT-CVL | 3
How to install CT-CVL
1. Install 'Eclipse Modeling'.
Please choose Kepler or later. Link: Eclipse Modeling Project
2. Get archived update site of CT-CVL
Currently, we have no online update site. Please get archived update site contents from ModelBased.net . After
getting, unzip the file to your local enviroment.
3. Run the eclipse modeling
4. Go to "Help -> Install New Software..."
5. Add local repository
Push "Add.." Button. Set "Name" as you like and set "Location" as you put the unziped update site location.
6. Click "OK" and check all suggested components to install.
7. Click "OK" or "Next" or "Accept" or something and finish wizard
| How to install CT-CVL | 4
8. Install "CVC4"
Please download install from here
9. Set path of CVC4
From the menubar, Choose "Window->Preference->SMTSolver". Set path at SOLVER PATH as your installed
cvc4 path.
| How to use CT-CVL | 5
How to use CT-CVL
1. Create empty project
2. Analyze subsystem feature (vspec)
a) Create an new cvl file for vspec
Right click at the project and select "New -> Other..". Select "CVLMetamodel Diagram" and input file name.
Click OK.
abc.cvl and abc.cvl_diagram files are created. The abc.cvl is data model file and the abc.cvl_diagram is only
for GMF diagram editor.
b) Launch subsystem feature editor and edit
Right click at the abc.cvl_diagram file and choose editor as "CVL Metamodel Diagram editing". See also:
Subsystem feature editor
3. Edit subsystem resolution
Right click at the abc.cvl file and choose editor as "CVL Resolution Model". See also: Subsystem resolution editor
4. Transform subsystem files
The abc.cvl have compatibility for CVL2 Tool. However, the format of file is not suitable for being referred by
other cvl file. Therefore, we transform abc.cvl to abc_mod.cvl. Right click the abc.cvl and select "CVL M2M ->
CVL Native to CVL Typed".
| How to use CT-CVL | 6
The abc_mod.cvl file is generated. See also: Subsystem file transformation
5. Define system structure
a) Create an new cvl file for system
Right click at the project and select "New -> Other..". Select "CVLSystemDef Diagram" and input file name.
Click OK.
system.cvl and system.cvl_def_diagram files are created. The system.cvl is data model file and the
system.cvl_def_diagram is only for GMF diagram editor.
b) Launch subsystem feature editor and edit
Right click at the system.cvl_def_diagram file and choose editor as "CVL SystemDef Diagram editing". See
also: System definition editor(Structure model)
6. Analyze system feature (vspec)
a) Create an system feature(vspec) diagram file
Right click at the system.cvl file and select "Initialize cvl_system_vspec_diagram diagram file".
| How to use CT-CVL | 7
A system.cvl_vspec_diagram file is created.
b) Launch system feature editor and edit
Right click at the system.cvl_vspec_diagram file and choose editor as "CVL SystemVSpec Diagram editing".
See also: System feature editor(VSpec)
7. Formalize test cases
a) Create an test model file
Right click at the project and select "New -> Other..". Select "CVL System Testing Model" and click "Next".
Input cvlsystemtesting file name.
| How to use CT-CVL | 8
Select system.cvl file.
b) Launch system testing editor and edit
Right click at the created system.cvlsystemtesting file and choose editor as "CVL System Testing Model
Editor". See also: System testing editor
8. Run configuration generation
In the system testing editor, right click at "Test Set" and choose "Solve TestSet". Wait for a moment. Results are
shown at Result tab.
| SubSystem feature editor (VSpec) | 9
SubSystem feature editor (VSpec)
Overview
This editor edits VSpec model as feature for subsystems. This editor is developed with GMF. The main view has
canvas and palette. Properties view is also used for editing properties of each node.
When we save a vspec file with this editor, editor shows dialog as "Reform resolution models for consistency?". The
Resolution models correspond to this VSpec model and have same structure as a mirror. Therefore, if the VSpec
model is changed , it affect to the resolution models. Please select "Yes" in almost case. If you are editing Resolution
model at background, select "No".
How to edit
Add node(Choice,VClassifier,Variable). In this tool, only one tree is allowed. Root choice is generated
automatically and we can generate nodes as children or descendant of the root. The steps are following.
1. Click "VSpecChild" at the palette. Then, mouse cursor is changed.
2. Drag from the parent node and release at blank area. Then, pull down menu is shown.
3. Select node type.
4. Click added node and edit at properties view. Name is mandatory and should be unique.
Add group multiplicity.
1. Click "VSpecGroupMultiplicity" at the palette. Then, mouse cursor is changed.
| SubSystem feature editor (VSpec) | 10
2. Click Choice or VClassifier. A triangle is added under the Choice or the VClassifier.
3. Click added triangle.
4. Edit upper and lower limit at properties view. "-1" means "Don't Care".
Add constraint.
1.
2.
3.
4.
5.
6.
Click "OpaqueConstraint" at the palette. Then, mouse cursor is changed.
Click blank area. A parallelogram is added.
Click "OpaqueConstraintLink" at the palette. Then, mouse cursor is changed.
Drag from the added parallelogram to the existing node(Choice or VClassifier or Variable).
Click added parallelogram and click "Constraint" property at the properties view.
Click button at the right of the value area of "Constraint". Then, constraint dialog is shown.
7. Edit OCL in the dialog. This OCL script should be described for corresponding resolution model with actual meta
model of CVL. You can get the document of the meta model from OMG Variability site . This dialog editor have
"Ctrl+Space" support.
8. Click "Verify Syntax" in the dialog. If the syntax is valid, a message as valid is shown.
9. Click OK.
Layout
This tool have two automatic layout function: Custom and whole. Whole layout is default of GMF and all nodes
including constraints are moved. Custom layout only moves nodes of tree without constraint.
Custom layout.
1. Right Click at blank area.
| SubSystem feature editor (VSpec) | 11
2.
Select "Custom Layout".
Whole layout.
1. Right Click at blank area.
2. Select "Arrange All".
| Subsystem resolution editor | 12
Subsystem resolution editor
Overview
This editor edits Resolution model for subsystems. The Resolution model means selection of VSpec variation model.
The resolution model shows actual product list. This editor consists of two tabs: Selection and Table. Selection tab is
used for edit the resolution models. Table tab is used for viewing.
How to edit
Following editing functions are performed on the selection tab.
Add a Resolution.
1. Right click at "Configurable Unit".
| Subsystem resolution editor | 13
2.
Select "Create Resolution".
3. A new Resolution model is added under the Configurable Unit. The resolution model have same structure of the
VSpec.
4. Click at the top choice of added Resolution model.
5. Edit name of the top Choice at the property view. The name of top choice is used for ID of the resolution model.
Edit Choice decision. There are two method to edit decision. Other properties are not used.
1. Click the check box of target choice in the tree.
or
1. Click at target choice.
2. Change decision in the properties view.
Edit Variable.
1. Click the target variable node.
2. Edit at properties view.
Add VInstance.
1.
2.
3.
4.
You can find virtual VClassifier in the tree. Right click it.
Select "Create Instance".
Click at the added VInstance.
Edit name of the VInstance at the property view. The name is used for ID of the resolution model.
Copy and Paste. The top choice as one resolution model and VInstance can be copy/cut and paste. However, there
are some constraints. The top choice can be paste only to the ConfigurableUnit. The VInstance can be paste only to
the same VClassifier.
Validation
There are two validation method: EMF default validation and this editor's custom validation.
EMF default Validation. This validation checks that whether or not the cvl file accommodates the meta model of
cvl. This validation may show much violation because our cvl model do not have many mandatory instances. How to
perform is following.
| Subsystem resolution editor | 14
1. Select "CvlResolution Editor -> Validate" from the menu.
2. Check dialog details.
Custom Validation. This validation checks that whether or not the resolution model have violation toward the VSpec
model. This validation checks group multiplicity constraint, instance multiplicity constraint, and OCL constraint.How
to perform is following.
1. Right click at ConfigurableUnit and select "check all product" or right click or any nodes in the resolution models
and select "check product".
2. If there are no violation, the message dialog is shown and finished.
3. If there are some violation, the message dialog lists all violations with cause comment
4. You can double click the violation. Then the editor move the focus to the node which causes the violation.
| System definition editor (Structure model) | 15
System definition editor (Structure model)
Overview
This editor define structure of the system. VSpec is used in this editor and this editor is almost similar to the
SubsystemVSpecEditor . The tree can have only three levels of nodes: a root Choice, VClassifier children of the root,
and CVSpec grandchildren under the VClassifier children. The VClassifier level shows how many subsystems under
the VClassifier can be contained by the system. The CVSpec refers to the type of subsystem.
How to edit
This editor is almost same as SubsystemVSpecEditor . We do not use OpaqueConstraint for this system definition. We
can add CVSpec for reference of outer cvl.
Add CVSpec.
1.
2.
3.
4.
5.
Right click at the blank area.
Select "Load Resource" from the right click menu.
Load target cvl file by the dialog. The view has no change after loading cvl.
Click "VSpecChild" at the palette. Then, mouse cursor is changed.
Drag from the parent node and release at blank area. Then, pull down menu is shown.
| System definition editor (Structure model) | 16
6. Select "CVSpec" from the pull down menu.
7. Click added CVSpec and edit Type at properties view. There is loaded cvl in the pull down menu of Type.
| System feature editor (VSpec) | 17
System feature editor (VSpec)
Overview
This editor edits VSpec model as feature for a system. This editor is almost same as SubsystemVSpecEditor .
This editor provide editing function of relation model between System VSpec and Subsystem VSpec. Each
VClassifier in this editor should have context and choices can be set with relation models.
How to edit
Add context of VClassifier.
1. Click VClassifier node.
2. Select "Context" at properties view and click right side button. Context dialog is shown. The dialog shows all of
VClassifier in the subsystems
3.
Select target VClassifier.
Add relation of Choice.
1. Click Choice node.
| System feature editor (VSpec) | 18
2. Select "Relation" at properties view and click right side button. Relation dialog is shown.
3. The top list box of the dialog shows all choices in the subsystems. You can select these choices with "Ctrl" key
and click "Add Relation". Then, at the left bottom list, selected choices are added as "And". If you add another
choices, they becomes "Or".
4. Select each choice that are added to left bottom list. Then, the VClassifier are shown at right bottom list for each
Choice. The VClassifier should be specified with quantifier. Click "Quantifier" column and select "ForAll" or
"Exist".
| System test editor | 19
System test editor
Overview
This editor edits Test model for a system. This editor has three tabs: TestSpec, Environment, and Result. The
Environment tab is not used currently. The TestSpec is used for inputting test model. The result tab means result
viewer.
How to edit Test model
Following editing functions are performed on the TestSpec tab.
Add a Test Model.
1. Right click at "Test Set".
2.
Select "Create TestCase".
| System test editor | 20
3. A new test model is added under the Test Set. The test model have same structure of the VSpec of system feature
model.
4. Click at the added test case.
5. Edit name of the test case at the property view. The name of test case is used for ID of the test model.
Edit Choice decision.
1. Click at target choice.
2. Change decision in the properties view.
Add VInstance Test Spec.
1.
2.
3.
4.
You can find VClassifier in the tree. Right click it.
Select "Create Instance".
Click at the added VInstance.
Edit name of the VInstance at the property view. The name is used for ID of the resolution model.
Copy and Paste. The top test case as one test model and VInstance can be copy/cut and paste. However, there
are some constraints. The test case can be paste only to the test set. The VInstance can be paste only to the same
VClassifier.
Solve and get configuration
How to run.
1.
2.
3.
4.
Right click at "Test Set".
Select "Solve TestSet".
Wait. Wait. Please wait.
Go to Result tab.
Result viewer. Result tab has two list: Result configuration (Left) and Corresponding test cases (Right). If you select
result at left, the corresponding test cases are shown at right.
| Subsystem file transformation | 21
Subsystem file transformation
Motivation
The object diagram for subsystem feature(VSpec) and resolution is following. This format has compatibility with
CVL2 Tool .
We want to describe a system composed of multiple subsystems using CVL. CVSpec in the CVL is used for the
purpose. However, CVSpec has type property which means reference to the VInterface. Therefore, we developed
transforming tool from CVL2 Tool native to typed format. The typed format is shown as follows.
An object diagram of system and subsystem composition is as follows.
| Subsystem file transformation | 22