onierstrasz / IMAD

experiments using Gt and Mondrian to build executable domain models
MIT License
3 stars 1 forks source link

Test Hypernodes for cycles, tree structure etc #29

Open onierstrasz opened 3 years ago

onierstrasz commented 3 years ago

Things to test for:

well-foundedness -- test for containment cycles in hypernodes DAG structure -- no directed cycles tree structure -- no cycles of any kind closedness -- no links leading out of the containment hierarchy

Note that to find any cycles it is enough to look for repeated entries in the reachability graph, but to find directed cycles you must perform a DFS and keep track of the paths.

Note that there are existing classes that find cycles in dependency graphs: see DAPackageCycleDetector