Re: transitive closure concept



Date view Thread view Subject view Author view Attachment view

From: Stefan Haustein (haustein@kimo.cs.uni-dortmund.de)
Date: Thu 22 Jan 2004 - 17:08:06 GMT


Thomas Baar wrote:

> Sometimes, you don't need Dan Chiorean's TC-operator. This is the case when
> the closure-relation does not have cycles. Then you can use a technique of
> recursive definition as it is done in the UML metamodel to define the 
> set allparents of all direct and indirect superclasses.

If you allow the definition of recursive functions inside OCL -- which seems 
required for your approach -- I do not see why the relation must not have 
cycles: You could easily define an utility operation with an "exclude" parameter 
for "visited" instances (or simply count down steps from allInstances() to 0)?

Best regards,
Stefan

-- 
Dipl.-Inform. Stefan Haustein
Univ. Dortmund, FB 4, LS 8   tel: +49 231 755 2499
Baroper Str. 301             fax: +49 231 755 5105
D-44221 Dortmund (Germany)   www-ai.cs.uni-dortmund.de

Date view Thread view Subject view Author view Attachment view