Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Dependency Resolution with a SAT Solver             Nils Adermann              March 4th 2011
SAT?Boolean Satisfiability Problem:  Can (A|B)&(C|D|(E&(A|D))&E be true?D(isjunctive)NF:  (A&B)|(C&D&A)|(B&D)|CC(onjunctiv...
NP?“ hard”   problems“ nondeterministic polynomial time”  no known algorithm which:     - can solve all instances of the p...
Package ManagementPoolRepositoriesPackage  Name & Version  requires, conflicts, provides
Dependency ResolutionUser wants to:- install some packages- update some packages- remove some packages- keep some packages
Dependency ResolutionEDOS Project Workpackage 2 Team. Report on formal management of software dependencies. EDOSProject De...
Dependency ResolutionIdeal:
Dependency ResolutionAcceptable:
Dependency ResolutionNo solution:  APT  PortagePoor solution:  smart  Urpmi
Dependency Resolution with SAT SUSEs libzypper (Michael Schroeder) Goals:   Fast   Complete & Reliable   Understandable me...
Rule GenerationJob Rules:  Install A: (A)  Remove A: (-A)
Rule GenerationDependency Rules:  A requires B: (-A|B1|B2)  A conflicts with B: (-A|-B1), (-A|-B2)  C and D provide A: A r...
Solving RulesUnit Propagation: (A|B|C), (-C), (-A|C)   (-C)         C: false   (-A|C)       A: false (-A: true)   (A|B|C) ...
Rule Solving AlgorithmUnit Propagation  Contradiction?    Add Rule -X or unsolvable    Backtrack to previous assignmentAss...
Free ChoicesKeep installed packages installedDo not install unecessary packagesPick newest version
Thank you!             and Michael Schröder at Novell for his slideshttp://files.opensuse.org/opensuse/en/b/b9/Fosdem2008-...
Upcoming SlideShare
Loading in …5
×

Dependency Resolution with SAT [Symfony Live 2011 Paris]

  • Be the first to comment

Dependency Resolution with SAT [Symfony Live 2011 Paris]

  1. 1. Dependency Resolution with a SAT Solver Nils Adermann March 4th 2011
  2. 2. SAT?Boolean Satisfiability Problem: Can (A|B)&(C|D|(E&(A|D))&E be true?D(isjunctive)NF: (A&B)|(C&D&A)|(B&D)|CC(onjunctive)NF: (A|B)&(C|D|A)&(B|D)&C
  3. 3. NP?“ hard” problems“ nondeterministic polynomial time” no known algorithm which: - can solve all instances of the problem - does not need to try all combinationsSAT is NP-complete (Cooks theorem)
  4. 4. Package ManagementPoolRepositoriesPackage Name & Version requires, conflicts, provides
  5. 5. Dependency ResolutionUser wants to:- install some packages- update some packages- remove some packages- keep some packages
  6. 6. Dependency ResolutionEDOS Project Workpackage 2 Team. Report on formal management of software dependencies. EDOSProject Deliverable Work Package 2, Deliverable 2, March 2006. http://www.edos-project.org/xwiki/bin/Main/Deliverables.
  7. 7. Dependency ResolutionIdeal:
  8. 8. Dependency ResolutionAcceptable:
  9. 9. Dependency ResolutionNo solution: APT PortagePoor solution: smart Urpmi
  10. 10. Dependency Resolution with SAT SUSEs libzypper (Michael Schroeder) Goals: Fast Complete & Reliable Understandable messages & explanations Based on ideas from minisat
  11. 11. Rule GenerationJob Rules: Install A: (A) Remove A: (-A)
  12. 12. Rule GenerationDependency Rules: A requires B: (-A|B1|B2) A conflicts with B: (-A|-B1), (-A|-B2) C and D provide A: A requires C or DPolicy Rules: B1 can be updated to B2: (B1|B2)
  13. 13. Solving RulesUnit Propagation: (A|B|C), (-C), (-A|C) (-C) C: false (-A|C) A: false (-A: true) (A|B|C) B: true
  14. 14. Rule Solving AlgorithmUnit Propagation Contradiction? Add Rule -X or unsolvable Backtrack to previous assignmentAssign undecided variable X (free choice)Repeat until solved
  15. 15. Free ChoicesKeep installed packages installedDo not install unecessary packagesPick newest version
  16. 16. Thank you! and Michael Schröder at Novell for his slideshttp://files.opensuse.org/opensuse/en/b/b9/Fosdem2008-solver.pdf http://www.mancoosi.org/edos/manager/ http://en.opensuse.org/openSUSE:Libzypp_satsolver

×