Using EOL and EVL [message #1057738] |
Wed, 08 May 2013 14:01 |
Joshua Nwokeji Messages: 94 Registered: January 2013 |
Member |
|
|
Dear Antonio,
Thanks for yesterday, my knowledge and understanding of EVL is increasing, However I am still struggling with getting my Completeness check 1 working.
Completeness Check 1:
All Goals (Subgoals) must be refined until they become leaf Goal (Expectation, Requirement, DomainHypothesis, and DomainInvariant).
Below are the EOL and EVL codes as you suggested to me yesterday:
[1] completekaos.eol
operation Goal isLeaf() {
return self.isKindOf(Expectation)
or self.isKindOf(Requirement)
or self.isKindOf(DomainHypothesis)
or self.isKindOf(DomainInvariant);
}
operation Goal isRefinedIntoLeaf() {
if (self.isLeaf()) return true;
else return Refinement.all.exists(r | r.froma = self and
r.toa.isRefinedIntoLeaf());
}
[2] completekaos.evl
import "completekaos.eol;"
context Goal {
constraint RefinedIntoLeaf {
guard : not self.isLeaf()
check : self.isRefinedIntoLeaf()
message : "Goal " + self.name + " must be refined into a leaf goal"
}
}
The codes seems correct, but the following mistakes arise: Please see Figure 1.
(a) Although the Root Goal (<Goal>) has been refined into subgoals and then into leaf goals an error sign still appears in it, See Figure 1.
(b) There is no error sign on the SubGoal (<SubGoal3>), even though it has not been refined into leaf goal.
As shown in Figure 1, Goals do not go directly to leaf goals, in most cases they go through the AND/OR nodes (small circular hollow or solid figures, in Figure 1) to subgoals, and then to leaf goals ( Requirement, Expectation, DomainHypothesis, and DomainInvariant). I think I need to find a way to define a constraint that can specify that Goal and Subgoals go through the AND/OR nodes. this is very challenging to me. In the Meta-Model I used to generate the Graphic Editor (See attached as EuGENiaModel), all nodes including Goal, SubGoal, Requirement, Expectation, DomainInvariant, and DomainHypothesis inherit from one super-class called Node.
Please I really need your help on this. I can upload the workspace in our shared dropbox folder, for you to have a closer look on the project.
Regards
Joshua
|
|
|
|
Powered by
FUDForum. Page generated in 0.04690 seconds