Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Problem declaring constraints on Eclipse Oxygen(Eclipse Oxygen, EVL)
Problem declaring constraints on Eclipse Oxygen [message #1816380] Mon, 28 October 2019 18:19 Go to next message
Gregorio Ospina is currently offline Gregorio OspinaFriend
Messages: 3
Registered: October 2019
Junior Member
Hello,

I am developing a project in EVL, using Eclipse Oxygen and I've been having issues when declaring constraints for model validations. The problem comes when I declare the fix portion for when the validation fails. Here one has to declare the message and then, the do instruction, however im not sure if it has something to do with the version of Eclipse and the corresponding version of Epsilon, but the execution is not entering the do declaration. The execution succesfully enters the fix, (we know this because the message was shown correctly on the validations tab ) but it doesn't enter the do.
Any help concerning this issue would be of great help, I have attached a picture of the snippet of code.
Re: Problem declaring constraints on Eclipse Oxygen [message #1816382 is a reply to message #1816380] Mon, 28 October 2019 19:25 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Gregorio,

Your constraint looks fine to me. Could you please provide a minimal example [1] I can use to reproduce this locally?

Cheers,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/articles/minimal-examples/
Re: Problem declaring constraints on Eclipse Oxygen [message #1816587 is a reply to message #1816382] Thu, 31 October 2019 22:24 Go to previous messageGo to next message
Gregorio Ospina is currently offline Gregorio OspinaFriend
Messages: 3
Registered: October 2019
Junior Member
Hey Dmitiris!,
Thank you for your quick response, I was able to understand where i was failing and it was on the underlying knowledge that the do statement executes on command, and not automatically as the constraint fails. I was simply not triggering the do. However, this issue brought up another question which, if you could answer, it would be great. Is there a command or a statement that, unlike do, would execute automatically? Greatly appreciate all your help!

[Updated on: Thu, 31 October 2019 22:25]

Report message to a moderator

Re: Problem declaring constraints on Eclipse Oxygen [message #1816589 is a reply to message #1816587] Thu, 31 October 2019 23:55 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Grigorio,

You could implement auto-fixing behaviour in the check part of your constraint. e.g.

constraint AutoFix {
  check {
    if (self.problemDetected()) self.fixProblem();
    return true;
  }
}


Cheers,
Dimitris
Re: Problem declaring constraints on Eclipse Oxygen [message #1816632 is a reply to message #1816589] Fri, 01 November 2019 21:50 Go to previous message
Gregorio Ospina is currently offline Gregorio OspinaFriend
Messages: 3
Registered: October 2019
Junior Member
Thank you ver much Dimitris, I will look into that and find a solution.

Cheers!
Previous Topic:EOL/ ETL debugging Tools?
Next Topic:Illegal assignment to variable package
Goto Forum:
  


Current Time: Fri Apr 26 14:27:27 GMT 2024

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

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

Back to the top