[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
case?
Thanks
>>> 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
linked
by a Connection1 connection."
Hope that helps,
Matt
-----Original Message-----
From: gme-users-bounces at list.isis.vanderbilt.edu
[mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of
Shravana
Musunuri
Sent: Thursday, June 15, 2006 1:05 PM
To: gme-users
Subject: [gme-users] OCL question
Hi,
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.
Thanks
Shravana
_______________________________________________
gme-users mailing list
gme-users at list.isis.vanderbilt.edu
http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
More information about the gme-users
mailing list