summaryrefslogtreecommitdiff
path: root/src/generic/problemresolver
AgeCommit message (Collapse)AuthorFilesLines
2010-01-30Add a first draft of a class to represent *operations* on tiers.Daniel Burrows3-2/+141
It's a bit awkward that it uses tiers to represent its components; on the other hand, its components are *almost* exactly tiers. Something to ponder.
2010-01-29Allow any level, even one that would be out-of-bounds, to be set via ↵Daniel Burrows1-2/+17
set_user_level(). Any intervening levels that are added as a result of this operation are initialized to tier_limits::minimum_tier.
2010-01-28Add tier.cc to version control.Daniel Burrows1-0/+60
2010-01-28Add a convenience method on tiers to retrieve the number of user levels.Daniel Burrows1-0/+3
2010-01-27Stop using flyweights to store tiers, since they tend to cause crashes on ↵Daniel Burrows1-33/+31
shutdown. :-(
2010-01-26Write a public method on tiers to retrieve individual user levels.Daniel Burrows1-0/+3
2010-01-26Since the tier::set_*() methods are non-mutating, they can and should be const.Daniel Burrows1-2/+2
2010-01-26Rename set_user_tier to set_user_level, in keeping with the earlier ↵Daniel Burrows1-1/+1
terminology change.
2010-01-26Add the new .cc files to the build.Daniel Burrows1-1/+3
2010-01-23Declare the operator<< override on tiers.Daniel Burrows1-0/+2
2010-01-23Put the hash_value() overload in the global namespace.Daniel Burrows1-5/+2
2010-01-23Implement comparison operators on tiers.Daniel Burrows1-0/+15
2010-01-23Write an assignment operator for tiers.Daniel Burrows1-0/+7
2010-01-23Give tiers public constructors instead of static create() routines.Daniel Burrows1-10/+8
2010-01-23Write a default constructor for tiers.Daniel Burrows1-0/+7
2010-01-23Rewire the rest of the dependency solver to account for the new tier type.Daniel Burrows8-198/+56
Mostly this just removes typedefs from the universe-specific tier types and adds #includes for tier.h. The tier limits object was rewritten somewhat more, to account for the new terminology ("levels") and to make the integers explciitly represent structural levels, not tiers.
2010-01-21Implemment operator== and operator!= on tier-impls, and make the definitions ↵Daniel Burrows1-12/+16
in tier use the flyweight versions of these operators for speed.
2010-01-21Declare the create() methods to be static.Daniel Burrows1-4/+5
2010-01-21Fix get_hash_value() on tiers to use the hashed value of the referenced impl ↵Daniel Burrows1-1/+1
object.
2010-01-21Instead of computing a tier's hash whenever it's needed, cache it and just ↵Daniel Burrows1-12/+28
use the cached value.
2010-01-21The set_* routines should return tiers, not flyweight<tier>s.Daniel Burrows1-2/+2
2010-01-21Add a missing "return" statement.Daniel Burrows1-1/+1
2010-01-21Fix the return type of get_impl() (was "impl", should be "tier_impl").Daniel Burrows1-1/+1
2010-01-21Change how the "return a modified tier" routines are implemented.Daniel Burrows1-13/+14
The structural level can be changed with the normal impl constructor, so the special constructor now only deals with user levels (fixing an off-by-one error in the process).
2010-01-21Don't template the tier-from-structural-level constructor.Daniel Burrows1-1/+0
2010-01-21Reduce terminological confusion by describing the components of a tier as ↵Daniel Burrows1-80/+102
"levels". Not sure this is the best term, but it's a lot better than describing the components of a tier as "tiers".
2010-01-20Add an initial definition of a more flexible, generic tier object.Daniel Burrows2-1/+285
The idea here is to support tiers that are dynamically defined by settings, so the user can (for instance) override the default ordering.
2009-11-17Have the resolver ignore unresolved dependencies that were unresolved before ↵Daniel Burrows4-16/+80
the current run of aptitude started. (Closes: #556042) This is done by filtering them out of the initial set of dependencies that the root node is initialized with. NOTE: I still need to convince myself that we can't somehow end up reactivating a dependency that should have been skipped. However, we might really need to legitimately activate it...something to think over, anyway. (I particularly suspect that the weird behavior of Conflicts might be a problem)
2009-09-09Don't crash when dumping information about a solver without a validity ↵Daniel Burrows1-1/+5
condition.
2009-07-28Always use make_shared to construct shared pointers.Daniel Burrows1-1/+2
2009-07-15Don't waste time building information about a solver set if nothing would be ↵Daniel Burrows1-10/+33
done with it. If the tier of the solver set is not high enough for us to extract any useful information, there's no point in calculating the reasons for that tier.
2009-07-11Fix compile problems introduced by the backout.Daniel Burrows1-12/+63
2009-07-10Merge with backout.Daniel Burrows3-37/+294
2009-07-10Eliminating the use of hash tables to save memory: backed out changeset ↵Daniel Burrows4-169/+196
7c43f786ebba
2009-07-10Merge backout.Daniel Burrows3-142/+105
2009-07-10Eliminating the use of hash tables to save memory: backed out changeset ↵Daniel Burrows3-142/+105
c8aec0d44f84
2009-07-10Merge backout.Daniel Burrows1-11/+82
2009-07-10Eliminating the use of hash tables to save memory: backed out changeset ↵Daniel Burrows1-60/+45
8ff97afb1605
2009-07-10Eliminating the use of hash tables to save memory: backed out changeset ↵Daniel Burrows2-62/+47
13ac768ed385
2009-07-07Switch the unresolved dep set representation to a boost::unordered_map.Daniel Burrows2-47/+62
2009-07-07When increasing the tier of a solver that's newly deferred, only increase ↵Daniel Burrows1-7/+9
exact matches (including matches to the dependency). Necessary because deferrals due to violating an approval constraint only apply when a version is chosen to solve the same dependency. This is just one other way that approval constraints are wonky. I'm thinking that it might be good on multiple levels to throw them out: they're a bit counterintuitive, they tend to produce unstable results (the set of legal successors can vary depending on which dependency is chosen as the next one to resolve, for instance), and because they mean that deferrals happen on a per-dependency basis, they need a lot of careful code and a lot of extra memory allocation to get right. I'm not sure what would replace them, though.
2009-07-07Fix recompute_step_tier() to correctly compute the tier.Daniel Burrows1-4/+73
It wasn't taking into account the actions themselves, or promotions that only included them. This fixes the big glaring problem with the new code, namely that it was spinning off indefinitely (because depending on the order in which some normally idempotent things were applied, they would trip this bug and miss the fact that a line of reasoning was supposed to be chopped off). There's still one odd problem, where I get different results each time I run it, probably because of some other order dependency.
2009-07-07Fix the sanity-check stuff to account for recent changes to the resolver code.Daniel Burrows1-45/+60
2009-07-07Sort hashed sets of choices when displaying them, so log files are more ↵Daniel Burrows3-105/+142
comparable across runs. Not every set of choices is sorted yet; there might be a few more of these to write.
2009-07-07Log the semantic content of deferral/validity expressions rather than object ↵Daniel Burrows2-18/+166
pointers. This should make log files a lot more reproducible.
2009-07-07Make the constructor of var_e protected so that it can be subclassed.Daniel Burrows1-0/+1
2009-07-07Add an extra sanity-check that all solvers have the right associated ↵Daniel Burrows1-0/+3
dependencies.
2009-07-06Hopefully fix how the number of deferred steps is counted.Daniel Burrows1-0/+4
2009-07-06Put every step, even deferred ones, into "pending".Daniel Burrows1-2/+1
Necessary for the sake of correctness: otherwise, set_step_tier doesn't know whether a step is "closed" and hence whether it should be put back on the pending list. An alternative would be to have an explicit flag on a step that gets set when it's "closed"; then we could throw deferred steps out of the pending tier entirely, which would be nice and would save a little time.
2009-07-06When recomputing a step tier from scratch, really recompute it from scratch.Daniel Burrows1-1/+7
Two bugs here: it wasn't being set back to the minimum tier, and it was being set directly rather than via set_step_tier().