summaryrefslogtreecommitdiff
path: root/src/generic/problemresolver
AgeCommit message (Collapse)AuthorFilesLines
2012-05-11Fix build with g++ 4.7Adrian Lang1-1/+1
2012-03-23[curses] Hack to prevent debug messages dumping to the screenDaniel Hartwig1-1/+3
Closes: #651748
2011-04-06Eliminate an unused local variable.Daniel Burrows1-10/+3
2011-04-02Nuke the scons build scripts.Daniel Burrows1-48/+0
These never worked out as well as I intended, and all indications were that they would be a maintenance burden...or just bitrot. Fully parallel builds are nice, but my builds are pretty quick on my 8-core box even with the artificial chokepoints that automake induces.
2010-05-28Transition from log4cxx to the new logging framework.Daniel Burrows3-25/+34
Hopefully this will eliminate some of the random crashes on exit that people were seeing.
2010-04-25Explicitly distribute the build files in SCons*.Daniel Burrows1-0/+1
This seems to be the least worst option I can see. Since my Dist() builder is outside scons and scons doesn't seem to offer any hooks or listeners, I can't (safely) cause build files to always be added to the distribution list. And anyway, I'm not sure I want to. Better to make the distribution fully explicit.
2010-04-25Start adding support for a 'dist' rule that builds a distributed archive.Daniel Burrows1-0/+7
Before this can work, I need to add all the SConscript files to the archive explicitly, which is yucky.
2010-04-25Add a "programs" dummy target that builds just the programs in src/.Daniel Burrows1-0/+2
I originally was going to have an "aptitude" target that builds aptitude, but scons doesn't like having an alias that matches the basename of a real target.
2010-04-23Fix the path to refcounted_base that's used to compile the resolver test.Daniel Burrows1-1/+1
As opposed to automake, paths in scons *should* be relative for variant builds (automake paths should *not* be relative for the same reason; a bit confusing, eh?)
2010-04-22Fix the dependencies of the problem resolver tester to include the one file ↵Daniel Burrows1-1/+3
it needs from a sibling directory.
2010-04-22Don't try to build headers into the problem resolver test code.Daniel Burrows1-1/+3
2010-04-21Add SConscript files for the rest of the source.Daniel Burrows1-0/+27
gtk still isn't built since I need to set up its build environment etc.
2010-04-21Rename the log4cxx namespace to logging.Daniel Burrows4-41/+41
There are various problems with log4cxx, especially that it seems to be unreliable and leads to random crashes. It might be a good idea to eventually move to a different framework or roll our own. Decreasing the number of explicit dependencies on log4cxx is a good way to do that.
2010-04-20Allow add_child and remove_child to emit value-changed signals even when the ↵Daniel Burrows1-22/+14
child being added or removed is false. This is necessary, since (eg) adding a "false" value to an "and" can change the value of the "and".
2010-04-19Uniformly treat NULL pointers to incremental expressions as incremental ↵Daniel Burrows2-11/+22
expressions that are always "true". I considered trying to optimize by stripping NULLs out of "and" and "or" expressions, but that seems a bit tricky. It might be more straightforward if I introduce "true" and "false" expressions explicitly, though (part of the trouble is that it's probably bad if creation routines return NULL, and they can't currently return false).
2010-04-19Fix a line that couldn't possibly have compiled.Daniel Burrows1-2/+2
I'm guessing that nothing was instantiating that method.
2010-04-19Hopefully fix a crashing bug in the resolver. (Closes: #578344)Daniel Burrows1-2/+10
When I built a new validity expression as a result of combining promotions, I forgot that expressions can be NULL and that NULL is implicitly treated as a universally true expression. It might be more robust to fully incorporate that into the API of the expressions module at some point.
2010-04-11Remove all traces of the nonfunctional "stupid elimination" algorithm.Daniel Burrows1-16/+1
This was part of the initial design of the resolver, but it turned out to be unnecessary in practice, and the problem it tried to solve is actually quite difficult, so I never finished the implementation.
2010-04-09Fix a potential performance problem: the cost of solver sets was being ↵Daniel Burrows1-6/+26
underestimated because the "maximum" cost isn't actually maximal. The algorithm that was at fault started with the highest possible cost and incrementally lower-bounded it with the costs in the solver set, to compute the lower-bound of the whole solver set. That was the idea, anyway. It probably worked right when tiers had exactly two elements and there was a sensibly-defined highest tier. But now that means we start with (MAX, 0, 0, ...) and then lower-bound with, say, (10, 1, 5, 4) to get (10, 0, 0, ...) and, well, you see how that goes. The fix is a bit of a hack but will do what I need here (producing a conflict if there are no solvers and the lower-bound of all the solvers' costs otherwise).
2010-04-09Refactor the problem resolver to move all the checks of whether costs make a ↵Daniel Burrows1-16/+41
solution deferred or discarded into helper functions. The discard helper function existed already but wasn't being used consistently. In addition to making the code cleaner and more readable, this will make it easier to enforce a "ceiling" on solution costs, discarding solutions that go over the ceiling in one or more components.
2010-04-09Terminology change: replace "tier operation" with "cost" everywhere.Daniel Burrows10-790/+784
The only remaining references to tiers are in backwards-compatibility code; the "safety" cost component is composed of several "tiers" whose values can be configured.
2010-04-09Restructure the source tree to move tier_ related code into files whose name ↵Daniel Burrows11-334/+273
is based on "cost" instead.
2010-04-08Yank out the "tier" type and just use operations instead.Daniel Burrows11-546/+77
Although the concept of a "tier" is useful (to distinguish changes in the tier from the things being changed), the actual data type isn't needed. We can just store an operation that computes the tier of a step given a minimal tier. Throwing out tier objects yields several benefits. It makes the code somewhat simpler by reducing the number of complex object types floating around. It will make it easier to clean up the nomenclature by talking about costs instead of tiers. And it will make it easier to impose a "cost ceiling", just by virtue of making the cost-tracking subsystem simpler.
2010-04-08Fix the compilation of the dummy resolver test code.Daniel Burrows1-1/+5
2010-04-08Add support for attaching a cost to unresolved recommends.Daniel Burrows1-3/+8
Not even compiled because I don't seem to have a full development environment installed on this machine yet (oops).
2010-03-12Introduce a new method on the resolver that tests whether a tier should ↵Daniel Burrows1-21/+56
cause a step to be discarded. This is another part of the groundwork for more configurable solution search criteria: the client of the resolver will be able to say that steps in which particular tier components exceed a given level should be discarded; consolidating all the ad-hoc tests into a single routine is the first step to implementing that feature.
2010-03-11Attempt to optimize the resolver by not creating unnecessary intermediate ↵Daniel Burrows4-50/+44
tier operations. This didn't actually make it faster, but I think it does make things a bit clearer.
2010-03-08Add a routine on tier operations that could be used to test whether a tier ↵Daniel Burrows3-0/+96
is above another tier without actually computing an intermediate value. The tier operation code was the only thing that looked at all like a new cost center in a profiling run (which makes sense since that's really all that changed in the build that's slower). This might help a little; the "take an upper bound and compare" trick is played a lot at the moment.
2010-03-07Merge changes on my laptop with changes on my desktop.Daniel Burrows9-783/+890
It looks at a quick glance like I was wrong about the efficiency issues; it may have just been due to comparing a non-optimized build to an optimized build.
2010-03-05Overhaul the resolver to distinguish between tiers and changes to tiers; ↵Daniel Burrows6-782/+779
this is the first step towards being able to minimize the number of changes meeting a criterion. The biggest change for this is that the new cost objects (tier operations) are not totally ordered, so various places that used to take a maximum now take a least-upper-bound instead; similarly for minimum and greatest-lower-bound. Still to do: find a sound way to allow the resolver to add together costs instead of upper-bounding them: "this change will force us to remove 10 packages". The new code seems to be a little too slow -- probably it lost some optimizations by accident. It does seem to be correct, though.
2010-03-04Correctly throw an out_of_range exception when the user tries to set aDaniel Burrows1-0/+4
user level with a negative index in a tier operation.
2010-03-04Fix the code to stringify tier operations.Daniel Burrows1-0/+1
I wasn't incrementing the column index correctly, which resulted in junk "nop" values being inserted into the serialization.
2010-03-04Let client code query the components of a tier operation.Daniel Burrows2-0/+47
2010-03-04Expose the structural tier operation comparison more directly.Daniel Burrows1-0/+35
2010-03-04Implement a structural comparison operation on tier operations.Daniel Burrows2-0/+13
2010-03-03Print '?' in the rendering of a dependency only if it is NOT a candidate for ↵Daniel Burrows1-1/+1
the initial broken set.
2010-02-15Document why we choose between two different algorithms to look for new ↵Daniel Burrows1-0/+14
promotions in a step when we come back to it.
2010-02-07Properly handle arithmetic overflow when adding tier lebels together.Daniel Burrows1-1/+3
2010-02-07Throw an exception if the user tries to construct a tier operation that ↵Daniel Burrows1-0/+4
modifies a negative index in the user tiers array.
2010-02-07Fix the tier operation dump code so it doesn't intersperse "nop"s in the ↵Daniel Burrows1-0/+1
middle of the operation.
2010-02-07Initial implementation of a tiering system that is both sound and flexible.Daniel Burrows5-321/+630
The rule in this system is that you can increase tier levels either by adding positive numbers to them or by lower-bounding them. Any given slot in the tier has to be managed using only one of these operations, but different slots can be managed using different operations. This allows support for the new "add to tier" operation, while maintaining the ability to do the old "increase to level" operation (both for backwards-compatibility and for supporting pin priorities). Currently the unit tests fail; this needs to be fixed.
2010-01-31Implement the usual comparison and hashing functions on tier operations.Daniel Burrows2-41/+51
2010-01-31Normalize tier operations so that equivalent ones always store the same tier ↵Daniel Burrows2-0/+24
objects.
2010-01-31The greatest lower bound should discard trailing user levels.Daniel Burrows2-8/+1
2010-01-31Implement operator== and operator!= on tier operations.Daniel Burrows2-0/+48
2010-01-31Add a closing paren to the text printed when a tier operation is dumped.Daniel Burrows1-0/+2
2010-01-31Ditch increase-tier operations due to poor interaction with add-to-tier.Daniel Burrows2-52/+98
The comment at the top of tier_operation cheerily asserted that these two operations formed a specific partial order. They don't. Each of them *individually* does, but there is no natural ordering between them: for instance, "increase to 100" takes 5 to 100 and 105 to 105; "add 5" takes 5 to 10 and 105 to 110. Worse, they aren't closed under composition, since order matters and it isn't stored in an operation (and can't be without making operations contain a whole chain of compositions). The effect I was trying to get with increase-tier can be achieved, albeit not in a backwards-compatible way, by adding levelwise upper bounds to tier objects at a higher level (i.e., in the resolver). The point here is to be able to have a tier that, for instance, is 0 if there are no removed packages and 1 if there are *any* removed packages (i.e., it doesn't distinguish between different numbers of removals in the same way that the current removal tier doesn't).
2010-01-30Write the code to dump a tier operation to an ostream.Daniel Burrows2-0/+37
2010-01-30Make apply and operator+ on tier_operation const.Daniel Burrows2-4/+4
2010-01-30Flesh out the rest of the tier operation object.Daniel Burrows4-13/+175
This needs a unit test and an operator<<.