[gme-users] Using OCL

Joe Porter joe.porter at gmail.com
Tue Aug 8 14:56:51 CDT 2006


That was it.

Thanks,
-Joe

On 8/8/06, Sandeep Neema <sandeep.neema at vanderbilt.edu> wrote:
>
>  Joe,
>
> One thing that I notice here is your use of the '==' comparison operator.
> Someone else can give you a better explanation, but in OCL you use '=' for
> value comparison (OCL does not have an assignment operator).
>
>
>
> Sandeep
>
>
>
>
>
> --
>
> Sandeep Neema
>
> Senior Research Scientist,
>
> Institute of Software Integrated Systems, Vanderbilt University
>
> Phone: 615-343-9996
>
> Email: sandeep.k.neema at vanderbilt.edu
>   ------------------------------
>
> *From:* gme-users-bounces at list.isis.vanderbilt.edu [mailto:
> gme-users-bounces at list.isis.vanderbilt.edu] *On Behalf Of *Joe Porter
> *Sent:* Tuesday, August 08, 2006 12:46 PM
> *To:* gme-users
> *Subject:* [gme-users] Using OCL
>
>
>
> My understanding of OCL is apparently very thin.  I have two examples, but
> I suspect I'm making the same kind of mistake for both, so here goes:
>
> In my cute little test case I have the attached class diagram.
>
> The Level object has an attached constraint to make sure there is only one
> Boss-type object in the model:
>
> self.parts( Boss )->size == 1
>
> This is checked for "On new child".
>
> The Boss object has a constraint as follows, so its "Number" attribute can
> only be 1:
>
> self.Number == 1
>
> This is checked for "On change attribute"
>
> For either contraint the warnings show all of the time for the two events,
> whether or not the constraint is true.    I realize it's most likely an
> OCL syntax issue.  Can anyone tell me what I'm missing?
>
> Thanks,
> -Joe
>
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20060808/d5dbff90/attachment.htm


More information about the gme-users mailing list