Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » describing function call between two classes
describing function call between two classes [message #781727] Sat, 21 January 2012 23:31
pllab Missing name is currently offline pllab Missing name
Messages: 6
Registered: September 2011
Junior Member
hi

there is a simple question that confusing me

I would like to describe an operation which is similar to as follows:

context Person::isAdult():Boolean

context Motor
inv: man.age > 18
inv: man.isAdult() = true

while Person and Motor are two different classes

And there is an association end man whose tyep is Person

However, when I try the expression "man.isAdult() = true", it results in error

while the expression "man.age>18" is OK.

Did I write a wrong OCL expression if I want to describe an expression that refers to a function call between two classes?

If so, how can I fix it?

thanks a lot.
Previous Topic:Modify OCL Xtext Console plugin
Next Topic:Basic EMF OCL Query tutorial
Goto Forum:
  


Current Time: Sat Aug 30 18:25:48 EDT 2014

Powered by FUDForum. Page generated in 0.02176 seconds