FUNCTION acyclic_presentation_representation_relationship
(relation : presentation_representation_relationship, children : SET [0:?] OF presentation_representation) : BOOLEAN;
LOCAL x : SET OF presentation_representation_relationship; local_children : SET OF presentation_representation; END_LOCAL;
REPEAT i:=1 TO HIINDEX(children); IF relation\representation_relationship.rep_1 :=: children[i] THEN RETURN(FALSE); END_IF; END_REPEAT;
x := bag_to_set (USEDIN ( relation\representation_relationship.rep_1, 'REPRESENTATION_SCHEMA.'+ 'REPRESENTATION_RELATIONSHIP.REP_2')); local_children := children + relation\representation_relationship.rep_1;
IF SIZEOF (x) > 0 THEN REPEAT i:=1 TO HIINDEX (x); IF NOT acyclic_presentation_representation_relationship (x[i] , local_children) THEN RETURN (FALSE); END_IF; END_REPEAT; END_IF;
RETURN (TRUE); END_FUNCTION; -- acyclic_presentation_representation_relationship
|