[gme-users] OCL question

Shravana Musunuri musunuri at cavs.msstate.edu
Thu Jun 15 14:44:10 CDT 2006

Actually the two models are not directly related. How to do in such a


>>> mjemerson at isis.vanderbilt.edu 06/15/06 1:17 PM >>>
It's easiest if the two models are related in some way. Example:



Constraint Context: Atom1


Constraint Expression: self.connectedFCOs("dst", Atom2)->forAll(atom2 :
Atom2 | self.attr1 < atom2.attr2)


In English: "The value of the att1 field of every Atom1 instance must be
greater than the att2 fields of every Atom2 instance to which it is
by a Connection1 connection."


Hope that helps,



-----Original Message-----
From: gme-users-bounces at list.isis.vanderbilt.edu
[mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of
Sent: Thursday, June 15, 2006 1:05 PM
To: gme-users
Subject: [gme-users] OCL question



     Can anyone let me know how we could set a constraint on an

attribute of a model (A) to be less than the value of an attribute in

other model (B)? Till now I'be been using only the "self" command to set

constraints on the attributes of particular model. I've used OCL fns and

set the constraint on the parent model itself ( which setved my

purpose), but I am curious to know how to access another model's

attributes in OCL.






gme-users mailing list

gme-users at list.isis.vanderbilt.edu


More information about the gme-users mailing list