diff options
| author | Schuyler Eldridge | 2019-02-12 21:04:09 -0500 |
|---|---|---|
| committer | Schuyler Eldridge | 2019-07-03 19:59:51 -0400 |
| commit | affc0e0fa3ded5672b617a5ca722067ceac069a9 (patch) | |
| tree | cfa1e7bfb1d7d1f730caa8dbb713a29f041fcfc0 /src/test | |
| parent | c219be2375fadcdd88851842e7b9029271230398 (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
