Skip to content

Refactor solver goal types and remove a use of PSQ. #4430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 7, 2017

Conversation

grayjay
Copy link
Collaborator

@grayjay grayjay commented Apr 1, 2017

Two commits:

Refactor solver goal types.

This commit should have no effect on behavior. It splits the OpenGoal type into
OpenGoal and PotentialGoal. Both types are only used when building the search
tree. While PotentialGoal can represent any dependency or constraint, OpenGoal
only represents dependencies that introduce goals (solver variables). Limiting
OpenGoal to only represent goals simplifies the code.

This commit also removes OpenGoal and FlaggedDep's comp type variables. The
two types had only been used with comp equal to () or Component. Now
FlaggedDep always uses Component, and OpenGoal does not need a Component.

Replace a use of PSQ with [].

This change will make it easier to replace PSQ with WeightedPSQ in solver
GoalChoice nodes.

/cc @kosmikus

@mention-bot
Copy link

@grayjay, thanks for your PR! By analyzing the history of the files in this pull request, we identified @kosmikus, @edsko and @ezyang to be potential reviewers.

grayjay added 2 commits March 31, 2017 21:21
This commit should have no effect on behavior.  It splits the OpenGoal type into
OpenGoal and PotentialGoal.  Both types are only used when building the search
tree.  While PotentialGoal can represent any dependency or constraint, OpenGoal
only represents dependencies that introduce goals (solver variables).  Limiting
OpenGoal to only represent goals simplifies the code.

This commit also removes OpenGoal and FlaggedDep's 'comp' type variables.  The
two types had only been used with 'comp' equal to () or Component.  Now
FlaggedDep always uses Component, and OpenGoal does not need a Component.
This change will make it easier to replace PSQ with WeightedPSQ in solver
GoalChoice nodes.
@grayjay grayjay force-pushed the solver-refactoring branch from 73377b1 to bf551a7 Compare April 1, 2017 04:23
@grayjay grayjay merged commit cc3be39 into haskell:master Apr 7, 2017
@grayjay grayjay deleted the solver-refactoring branch April 7, 2017 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants