aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorSchuyler Eldridge2019-02-12 21:04:09 -0500
committerSchuyler Eldridge2019-07-03 19:59:51 -0400
commitaffc0e0fa3ded5672b617a5ca722067ceac069a9 (patch)
treecfa1e7bfb1d7d1f730caa8dbb713a29f041fcfc0 /src/test
parentc219be2375fadcdd88851842e7b9029271230398 (diff)
Add DependencyManager and PhaseManager
Adds the DependencyManager class which can be used to determine a legal sequence of TransformLikes given their Dependency API constraints. A DependencyManager determines an ordering that results in some target TransformLikes being run (without invalidations) given an initial state (some other set of TransformLikes). Algorithmically, this works as follows: 1. A DAG of TransformLikes w/ invalidation edges is constructed (the "invalidate graph") 2. A DAG of TransformLikes w/ prerequisite and dependent edges is constructed (the "dependents graph") 3. A toplogical sort of the dependents graph, seeded with the reverse topological sort of the invalidate graph, gives an ordering of TransformLikes. 4. This ordering is examined, node by node, cleaning up any mismatches between TransformLikes by solving DependencyManager sub-problems. As new graph nodes (which are classes) are found, these are lazily constructed. Data structures are maintained that map from classes to objects and back. All discovered classes will point to the same object. Determinism is maintained internally using LinkedHashMap and LinkedHashSet. Other changes: - Some methods that generate Graphviz for a DependencyManager are added. - One concrete implementation of a DependencyManager is added for Phases called "PhaseManager". Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Diffstat (limited to 'src/test')
0 files changed, 0 insertions, 0 deletions