Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » OCL related query
OCL related query [message #523267] Thu, 25 March 2010 13:31 Go to previous message
arise76  is currently offline arise76
Messages: 15
Registered: March 2010
Junior Member
Hi,
I am trying to run following query on OCL Interpreter Console basically it tries to calculate Depth of Inheritance tree. From the theoritical part it looks fine, I need to define this query for my work, but it is hard to redefine it on UML metamodel , and on M2 layer. I do not find iterate(), isRoot() in the current specifications. I will be very gratefull if some body share his thougts to run it on eclipse OCL interpreter console or any other method to find DIT on OCL interpreter.

The source of this query is the following paper:
source: http://ctp.di.fct.unl.pt/QUASAR/Resources/Papers/2002/QUAOOS E2002FinalAline.pdf

Class::DIT():Integer 
post: result = (if self.IsRoot() then 
                   0 
    else 
       1 + self.Parents()->iterate(elem:Class; acc:Integer=0 | 
if elem.DIT() > acc then 
elem.DIT() 
else 
acc 
endif) 
    endif) 


Thanks in advance,
arise
 
Read Message
Read Message
Read Message
Read Message
Previous Topic:actor, usecase relationship query
Next Topic:EMF & OCL beginner question
Goto Forum:
  


Current Time: Tue May 21 09:29:30 EDT 2013

Powered by FUDForum. Page generated in 0.01530 seconds