Commit 6ae57388 authored by Timo Teräs's avatar Timo Teräs
Browse files

solver: rewrite backtracking and scoring system

* properly do absolute scoring now, the previous scoring where
  preference could get reduced could have caused incorrect early
  pruning of search tree

* backtracking is now separated from package state, and first
  branching point is the decision if a name is left unassigned
  or if something _has_ to be assigned. this allows multiple future
  search tree optimizations like handling of common dependencies
  early.

* merge common dependency names early to provide deeper forward
  checking.
parent a9d52683
......@@ -257,6 +257,11 @@ static inline int list_hashed(const struct list_head *n)
return n->next != n && n->next != NULL;
}
static inline int list_empty(const struct list_head *n)
{
return n->next == n;
}
#define list_entry(ptr, type, member) container_of(ptr,type,member)
#define list_for_each(pos, head) \
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment