FUNCTION acyclic_experience_type_relationship
(relation : experience_type_relationship, relatives : SET [0:?] OF experience_type, specific_relation : STRING) : BOOLEAN;
LOCAL x : SET OF experience_type_relationship; END_LOCAL;
IF relation.relating_experience_type IN relatives THEN RETURN (FALSE); END_IF; x := QUERY(exptyp <* bag_to_set(USEDIN(relation.relating_experience_type, 'EXPERIENCE_SCHEMA.' + 'EXPERIENCE_TYPE_RELATIONSHIP.' + 'RELATED_EXPERIENCE_TYPE')) | specific_relation IN TYPEOF(exptyp)); REPEAT i := 1 TO HIINDEX(x); IF NOT acyclic_experience_type_relationship(x[i], relatives + relation.relating_experience_type, specific_relation) THEN RETURN (FALSE); END_IF; END_REPEAT; RETURN (TRUE); END_FUNCTION; -- acyclic_experience_type_relationship
|