Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » GMT (Generative Modeling Technologies) » [EVL] Possible Bug with collection comparison
[EVL] Possible Bug with collection comparison [message #615803] Tue, 29 April 2008 14:40
Andrew Lawson is currently offline Andrew LawsonFriend
Messages: 12
Registered: July 2009
Junior Member
I may have discovered a bug which occurs when comparing collections. I
first ran the following validation file...

context SimpleClass!Entity {


constraint CheckingParentExists {

check : self.Child = true implies self.parent-> size = 1

message : 'There is no parent for ' + self.classname

}


constraint CheckChildOperations {

guard: self.Child = true


check : false


message : self.parent.operations->collect(s| s.name) + 'does not have the
correct operations' + self.operations->collect(b|b.name)


}

...which as you would expect returned: " first collection" does not have the
correct operations "second collection"


However when I add in a third constraint which should compare the two
collections (as can be seen below) there is no validation output not even to
the constraint where the check is set to false. Is this a bug or am I doing
something incorrectly? [This used to work correctly]

context SimpleClass!Entity {


constraint CheckingParentExists {

check : self.Child = true implies self.parent-> size = 1

message : 'There is no parent for ' + self.classname

}


constraint CheckChildOperations {

guard: self.Child = true


check : false


message : self.parent.operations->collect(s| s.name) + 'does not have the
correct operations' + self.operations->collect(b|b.name)


}


constraint CheckChildOperations {

guard: self.Child = true


check : self->collect(b|b.operations).includesAll( self.parent->collect(s|
s.operations ))


message : self.classname + 'does not have the correct operations'


}



}
Previous Topic:[EVL] Printing collections
Next Topic:[EVL] Possible Bug with collection comparison
Goto Forum:
  


Current Time: Fri Mar 29 04:46:36 GMT 2024

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

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

Back to the top