summaryrefslogtreecommitdiff
path: root/src/generic/problemresolver/problemresolver.h
AgeCommit message (Collapse)AuthorFilesLines
2009-06-03Fix a compile error in process_promotion (s.step_tier vs s.get_tier()).Daniel Burrows1-1/+1
2009-06-03Make process_promotion non-const.Daniel Burrows1-1/+1
Necessary since it changes the state of the search graph.
2009-06-03Better logging of score changes when a new step is created.Daniel Burrows1-3/+13
2009-06-03Un-reverse step comparison by goodness.Daniel Burrows1-5/+8
Previously I was using a priority queue, where the highest element was easiest to access. Now I'm using a std::set, so the lowest element is where we pull from ... but I forgot to adjust the comparison operation accordingly, so we would always examine the worst step, not the best one.
2009-06-03Avoid referencing uninitialized memory.Daniel Burrows1-0/+11
2009-06-03Compute the step's new score after updating it.Daniel Burrows1-3/+5
This should allow the full solution bonus to be properly applied.
2009-06-03Also log when we generate a new step.Daniel Burrows1-0/+4
2009-06-03Log more information about the contents of steps as we process them and ↵Daniel Burrows1-2/+6
generate solutions.
2009-06-03Use choice_indexed_maps instead of choice_sets to represent the output ↵Daniel Burrows1-6/+6
domains of promotion sets, avoiding the problem with conflicting choices. choice_sets are only designed for situations where there will be at most one action on a given package; e.g., promotions and action sets. When we're looking for an incipient promotion, we might care about several different versions of a single package (e.g., different solvers of a dependency), so a choice_indexed_map is more appropriate. The map is given a value-type of "bool" mainly because the value type isn't needed; the code supports disabling some elements of the domain because it was easy to implement, but that shouldn't ever happen in practice.
2009-06-03Initialize the root's action score to 0.Daniel Burrows1-0/+1
Since the action score is updated incrementally, a wrong score at the root means a wrong score elsewhere.
2009-06-03Remove a stray space in a log message.Daniel Burrows1-1/+1
2009-06-03Add more logging around scores.Daniel Burrows1-1/+4
2009-06-03Actually, just make the "process the step now" block the "else" clause of ↵Daniel Burrows1-7/+0
the cascading tests.
2009-06-03Actually enable processing steps that aren't irrelevant in some way.Daniel Burrows1-0/+2
When I reworked the cascading series of tests that threw out irrelevant solutions, to take into account the fact that many cases are handled up-front, I forgot to keep the "else" condition where we actually do work.
2009-06-03Log the root step number and its tier.Daniel Burrows1-0/+2
2009-06-03Make set_step_tier do nothing if the step tier is being set to its current ↵Daniel Burrows1-0/+6
value, and log when the step tier changes.
2009-06-03Add more logging to the new problem resolver.Daniel Burrows1-0/+10
2009-06-03Actually set up the unresolved dependency map, solver lists, etc in the root ↵Daniel Burrows1-0/+6
step. Now instead of doing nothing, the resolver segfaults. Progress! :-D
2009-06-02Fix the rest of the compile errors in the problem resolver.Daniel Burrows1-22/+22
There are still some link errors.
2009-06-02Fix enough compile errors that the problem resolver subdirectory compiles.Daniel Burrows1-70/+114
The rest of the code still needs to be overhauled to take the changes into account, and it looks like there are bugs in code that's only instantiated from the client (e.g., reject_version()).
2009-06-01More compile fixes.Daniel Burrows1-34/+45
2009-06-01Use set_id() to make sure that choices added to solutions get IDs as expected.Daniel Burrows1-1/+4
2009-06-01More compile fixes.Daniel Burrows1-12/+22
2009-06-01Fix a bunch of compile errors.Daniel Burrows1-112/+159
2009-06-01Yank out the old abortive attempt at minimizing solutions.Daniel Burrows1-642/+0
2009-06-01Finish rewriting the main resolver loop to take the new structure into account.Daniel Burrows1-62/+28
From here out it should mainly just be compile fixes. That, and hooking visited_packages up, but that's a relatively minor feature and can wait until I've got everything else working.
2009-06-01Fix another type error.Daniel Burrows1-1/+1
2009-06-01Fix a variable name typo.Daniel Burrows1-1/+1
2009-06-01Fix up various type names.Daniel Burrows1-8/+8
2009-06-01Initial draft of the new main loop code.Daniel Burrows1-404/+176
Still incomplete, but fleshes out the major areas of the code that are needed.
2009-05-30Rewrite the rejection/frontend approval functions for the new way of storing ↵Daniel Burrows1-39/+52
and tracking rejections and approvals.
2009-05-30Now that deferral information is updated immediately, we don't need a ↵Daniel Burrows1-29/+3
variable to track whether it's dirty.
2009-05-30Use a choice-set, not a step, in the constructor's sanity check.Daniel Burrows1-8/+6
2009-05-30Rename step_installation to choice_set_installation and lift it to the top ↵Daniel Burrows1-25/+25
of the class definition. No need for this to be quite so specific.
2009-05-30Remove the old code to check whether a step was deferred.Daniel Burrows1-137/+0
2009-05-30Redesign how the closed set is stored.Daniel Burrows1-61/+59
Instead of storing solutions, now we store a minimal set of information about a step: its choices and its scores. The scores aren't strictly necessary, but they're used to accelerate the process of checking the closed set for a step. I'm not currently planning to do any sort of forward searching for closed steps: I don't believe that they're all that common, the current code doesn't try to do this, eliminating them would add more computation to each step, and it would require more book-keeping to ensure that having successors in the closed set didn't result in a parent step being pushed to the conflict tier.
2009-05-29Various compilation fixes for the problem resolver.Daniel Burrows1-18/+18
2009-05-28Finish up everything we need to update step tiers correctly (I hope).Daniel Burrows1-4/+52
2009-05-28Consistently use set_step_tier instead of set_tier (oops).Daniel Burrows1-2/+2
Turns out it was implemented, just under the wrong name.
2009-05-28First pass at rewiring the promotion/tier/index stuff to handle deferrals ↵Daniel Burrows1-10/+70
better. Deferral expressions now trigger immediate deferral of all related steps when they become "true", in addition to canceling deferrals when they become "false". Still to do: need to implement increase_step_tier and set_tier, so already-generated steps can be adjusted.
2009-05-27Explicitly make the is-deferred expression a listener with a sub-expression ↵Daniel Burrows1-33/+30
that's the actual condition. This gives us the separation I want between the active expression and the passive expression, although not in the most pretty way. There are still some bits of this that need to be filled in, mainly in how the tier validity expressions are computed and updated. Also, choices in the action set of a step need to impact its tier; I need to somehow incorporate that into the recomputation routines.
2009-05-26Log the validity condition when applying a promotion to a solver.Daniel Burrows1-1/+2
2009-05-26When applying a promotion to a solver, copy over the validity condition.Daniel Burrows1-4/+13
2009-05-26Build validity conditions when creating promotions.Daniel Burrows1-4/+34
2009-05-26When creating a new choice, add all the choices it contains to the global ↵Daniel Burrows1-0/+73
reverse index.
2009-05-25Implement a first draft of the rest of the code to handle deferral and ↵Daniel Burrows1-2/+135
retraction. This isn't quite right. The biggest thing is that deferral and tier validity are conflated too much; they are closely related, but I think that they need to be stored seprately (but this needs more thought).
2009-05-25Another iteration of how the reverse indices are stored and managed.Daniel Burrows1-30/+153
This one incorporates the needs of the new system for retracting deferrals into the search graph structure, and updates the problem resolver to accomodate the new search graph data structures. Still not complete: the code to actually recompute a solver's tier needs to be written. In addition, various incorrect pieces of code that I came across while working on these changes have been fixed.
2009-05-25Use the new indexed set/map types to overhaul how promotions are processed ↵Daniel Burrows1-176/+314
in the resolver. The new code (as with the last few changesets, it's untested and not compilable) should be more correct than what we were doing before. It might also be a bit more efficient.
2009-05-23Fix some logging statements that didn't have a logger listed.Daniel Burrows1-2/+2
2009-05-23Use set_tier() when applying a promotion to existing steps.Daniel Burrows1-1/+1