Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Using EOL and EVL(Problem with Validating my Editor)
Using EOL and EVL [message #1057738] Wed, 08 May 2013 14:01 Go to next message
Joshua Nwokeji is currently offline Joshua NwokejiFriend
Messages: 89
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
Re: Using EOL and EVL [message #1057750 is a reply to message #1057738] Wed, 08 May 2013 14:34 Go to previous message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 310
Registered: January 2010
Senior Member
There seems to be a syntax error in your 'import' statement in the .evl file. You have it like this:
import "completekaos.eol;"

And it should be like this:
import "completekaos.eol";

Please refer to section 3.1 and Listing 3.1 of the Epsilon Book for an example of how to use imports.

Alternatively, you could put your EOL operations at the end of the .evl file. This example might help:

http://eclipse.org/epsilon/examples/index.php?example=org.eclipse.epsilon.examples.validateoo
Previous Topic:Epsilon Validation Language
Next Topic:[Eugenia] Generating common super edit parts
Goto Forum:
  


Current Time: Mon Dec 22 09:53:02 GMT 2014

Powered by FUDForum. Page generated in 0.01718 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software