-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite backtracking and state management
The "forward" part of resolution now works like this: * A "root state" is populated. This state does not produce a "pin" but only populate the root requirements, so subsequence rounds can use it as the basis. * Each subsequent round pushes a state, pin a candidate for it, and check whether the pin results in a conflict. * If no conflcits occur, the round ends, and a new round is started. When a conflict happens, the backtracking process discards the current round's state, and try to modify the previous state so the conflict can be avoided. If this modification is unsuccessful, the still previous state is tried, until a workable state is found (or we run out of things to try). This makes each round and its associating state's lifeline easier to reason with. Each successful forward round would create a state with a pin in the stack. A round ending with backtracking will not result in a new state in the stack, but have a previously-pinned state unpinned (and modified), with everything newer than it removed.
- Loading branch information
Showing
1 changed file
with
77 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters