[great-users] Will this work or crash?

Gabriele Trombetti gabtromb at isis.vanderbilt.edu
Thu Jun 10 18:55:46 CDT 2004


Please have a look at the rule in attachment.

With that rule I want to eliminate all the "Requirement" elements except 
one.

This is the Guard implementation:
---------
if (Requirement1.uniqueId() == Requirement2.uniqueId()) return false;
else return true;
--------
First of all, I'm not totally sure that such guard is needed. I don't 
know if it's possible that Requirement1 and Requirement2 will match the 
same Requirement.

Secondarily:
I suppose that the rule will generate all possible combinations of 
Requirement1 and Requirement2. But if all the matches are generated at 
the beginning, then since for each execution of the rule I will destroy 
some element, at a certain point I suspect that in another execution of 
the rule an element will be matched but that's one of those that I have 
already destroyed! Then it might crash or behave erratically.
Is GReAT safe regarding this?

BTW My transformation appears to work regarding this, but I haven't 
really put this rule into test and it's difficult to try this right now.


Otherwise which GReAT algorithm do you suggest for 'uniquizing' one 
element? (an AttributeMapping snippet could be good as well)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Image2.png
Type: image/png
Size: 6648 bytes
Desc: not available
Url : http://list.isis.vanderbilt.edu/pipermail/great-users/attachments/20040610/8da8ed99/Image2.png


More information about the great-users mailing list