[gme-users] OCL question
Matthew J. Emerson
mjemerson at isis.vanderbilt.edu
Thu Jun 15 14:59:15 CDT 2006
If you post a picture of the metamodel fragment that defines the two models
I can tell you.
--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:44 PM
To: gme-users
Subject: RE: [gme-users] OCL question
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
_______________________________________________
gme-users mailing list
gme-users at list.isis.vanderbilt.edu
http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4509 bytes
Desc: not available
Url : http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20060615/e6a70c0c/smime.bin
More information about the gme-users
mailing list