Using SAT for solving package dependencies. Michael Schröder Novell, Inc.

Similar documents
Packaging made easy. How the opensuse build service makes building packages easy for developers who don't care about packaging

Zypper. Ján Kupec YaST Team

openqa features capabilities bugs Ondrej Holecek /aaannz/

From GIT to a custom OS image in a few click OS image made easy

The opensuse project. Motivation, Goals, and Opportunities. Sonja Krause-Harder Michael Löffler. March 6, 2006

openqa making QA interesting since 2013 Ondrej Holecek /aaannz/

Novell Infiniband and XEN

OpenSync. Daniel Gollub SUSE Linux Products GmbH

Boot Interrupt Quirks and (RealTime) Interrupt Handling on x86. Olaf Dabrunz, Stefan Assmann

Saving Real Storage with xip2fs and DCSS. Ihno Krumreich Project Manager for SLES on System z

ESE535: Electronic Design Automation CNF. Today CNF. 3-SAT Universal. Problem (A+B+/C)*(/B+D)*(C+/A+/E)

SAT Solver. CS 680 Formal Methods Jeremy Johnson

Advanced patching of SUSE Linux Enterprise Server 10 with ZENworks Linux Management 7.2

Best practices with SUSE Linux Enterprise Server Starter System and extentions Ihno Krumreich

Managing Linux Servers Comparing SUSE Manager and ZENworks Configuration Management

Novell SLES 10/Xen. Roadmap Presentation. Clyde R. Griffin Manager, Xen Virtualization Novell, Inc. cgriffin at novell.com.

Cloud in a box. Fully automated installation of SUSE Openstack Cloud 5 on Dell VRTX. Lars Everbrand. Software Developer

SUSE Manager Roadmap OS Lifecycle Management from the Datacenter to the Cloud

Docker Networking In OpenStack What you need to know now. Fawad Khaliq

Constraint Satisfaction Problems

BOV89296 SUSE Best Practices Sharing Expertise, Experience and Knowledge. Christoph Wickert Technical Writer SUSE /

Chaff: Engineering an Efficient SAT Solver

openqa Avoiding Disasters of Biblical Proportions Marita Werner QA Project Manager

Collecting data from IoT devices using Sigfox network

Open Enterprise & Open Community

Using Dell Repository Manager to Update Your Local Repository

See What's Coming in Oracle Taleo Business Edition Cloud Service

4.1 Review - the DPLL procedure

openqa Avoiding Disasters of Biblical Proportions Marita Werner QA Project Manager

QuteSat. A Robust Circuit-Based SAT Solver for Complex Circuit Structure. Chung-Yang (Ric) Huang National Taiwan University

How To Make Databases on SUSE Linux Enterprise Server Highly Available Mike Friesenegger

SaltStack and SUSE Systems and Configuration Management that Scales and is Easy to Extend

Essentials. Johannes Meixner. about Disaster Recovery (abbreviated DR) with Relax-and-Recover (abbreviated ReaR)

Exploring History with Hawk

1 A product that should be in a device s inventory is not showing up in the inventory

Provisioning with SUSE Enterprise Storage. Nyers Gábor Trainer &

Searching. Assume goal- or utilitybased. Next task to achieve is to determine the best path to the goal

Using Crowbar to Deploy Your OpenStack Cloud. Adam Spiers Vincent Untz John H Terpstra

Linux and z Systems in the Datacenter Berthold Gunreben

Symbolic Methods. The finite-state case. Martin Fränzle. Carl von Ossietzky Universität FK II, Dpt. Informatik Abt.

Zdeněk Kubala Senior QA

Software Defined. All The Way with OpenStack. T. R. Bosworth Senior Product Manager SUSE OpenStack Cloud

Zchaff: A fast SAT solver. Zchaff: A fast SAT solver

Asset Management Migration Guide

HP-UX Software and Patching Management Using HP Server Automation

Red Hat JBoss Enterprise Application Platform 7.2

SUSE OpenStack Cloud. Enabling your SoftwareDefined Data Center. SUSE Expert Days. Nyers Gábor Trainer &

Satisfiability Solvers

3 Mobility Pack Installation Instructions

Sage Residential Management. Moving Data Files Version 13.1

Practical SAT Solving

Red Hat JBoss Enterprise Application Platform 7.0

SAT/SMT Solvers and Applications

12. Use of Test Generation Algorithms and Emulation

The CephFS Gateways Samba and NFS-Ganesha. David Disseldorp Supriti Singh

NetIQ Aegis: Automated Workflow Magic Lab

iprint Manager Health Monitor for Linux Administration Guide

Protect your server with SELinux on SUSE Linux Enterprise Server 11 SP Sander van Vugt

SUSE Manager and Salt

IC-485S /IC-485SI. If anything is damaged or missing, contact your dealer.

Parallelizing SAT Solver With specific application on solving Sudoku Puzzles

GWP511 package contains: g PC Card 1 Quick Start Guide 1 Installation & Manual CD-ROM 1 Warranty/Registration Card

Océ PRISMAaccess. Stay in Control. User manual Web Submission

Seminar decision procedures: Certification of SAT and unsat proofs

System Performance: Sizing and Tuning

Polynomial Exact-3-SAT Solving Algorithm

Applying Update 13 for Sage SalesLogix Version Version Developed by Sage SalesLogix User Assistance

Introduction to Software Defined Infrastructure SUSE Linux Enterprise 15

IBM InfoSphere Data Replication s Change Data Capture (CDC) for DB2 LUW databases (Version ) Performance Evaluation and Analysis

SUSE Linux Enterprise Kernel Back to the Future

Secure Authentication

Pushing The Limits Of Linux On ARM

Project management - integrated into Outlook

96Boards Enablement for opensuse

Novell Data Synchronizer Mobility Pack Overview. Novell. Readme. January 28, 2013

Novell. NetWare 6. USER ACCESS LICENSING FOR NETWARE

Boolean Satisfiability Solving Part II: DLL-based Solvers. Announcements

Update Management ZENworks Mobile Management 3.2.x September 2015

Integration Guide. SafeNet Authentication Service. Strong Authentication for Citrix Web Interface 4.6

Gaps and Overlaps in Identity Management Solutions OASIS Pre-conference Workshop, EIC 2009

Example of a Demonstration that a Problem is NP-Complete by reduction from CNF-SAT

Océ User manual. Océ PRISMAprepare Printer settings

Minion: Fast, Scalable Constraint Solving. Ian Gent, Chris Jefferson, Ian Miguel

Linux High Availability on IBM z Systems

Welcome to SUSE Expert Days 2017 Service Delivery with DevOps

Example: Map coloring

SAT Solvers. Ranjit Jhala, UC San Diego. April 9, 2013

SAT Solver and its Application to Combinatorial Problems

Expert Days SUSE Enterprise Storage

COMP 410 Lecture 1. Kyle Dewey

SUSE Manager in Large Scale 17220

Chapter 6 Constraint Satisfaction Problems

Circuit versus CNF Reasoning for Equivalence Checking

Watching Clauses in Quantified Boolean Formulae

Samba and Ceph. Release the Kraken! David Disseldorp

You can also launch the instances on different machines by supplying IPv4 addresses and port numbers in the format :3410

Digital Logic Gates. Features. General Description. Input/Output Connections. When to Use a Logic Gate. Input 1. Input 2. Inputs 3-8 * 1.

Océ VarioPrint Addendum

TCG. TCG Certification Program. TNC Certification Program Suite. Document Version 1.1 Revision 1 26 September 2011

Océ User manual. Printer drivers. Printer driver installation

Transcription:

Using SAT for solving package dependencies Michael Schröder Novell, Inc.

What was wrong with the old solver Much too slow with bug repositories solving could take several minutes Complex code, many special cases, still some bugs solver could get stuck Bad backtracking recommended packages treated as required Bad diagnostics and suggestions if unsolvable libfoo is required by package barbaz 2

The SAT Problem SAT: Boolean satisfiability problem find a True/False assignment to all variables of a boolean expression (AND/OR/NOT) so that it is True. NP complete Normalization: (a b c) & (d e f)... = TRUE The (...) terms are called Rules consisting of literals a, b, c can also be negated: -a Example: (a b c) & (-c) & (-a c) = TRUE Solution: a = FALSE, b = TRUE, c = FALSE 3

Advantages of SAT Well researched problem many example solvers available (chaff, minisat...) Very fast package solving complexity is very low compared to other areas where SAT solvers are used No complex algorithms solving just needs a couple of hundreds lines of code Understandable suggestions solver calculates proof why a problem is unsolvable 4

From dependencies to rules Requires: package dependencies A requires B provided by B1, B2, B3 Rule: (-A B1 B2 B3) either A is not installed or one of B1, B2, B3 is installed Conflicts: package dependencies A conflicts with B provided by B1, B2, B3 3 Rules: (-A -B1), (-A -B2), (-A -B3) either A is not installed or B1 is not installed Obsoletes: package dependencies treated as conflicts 5

Making rules (cont.) Unary rules: (-A) (A) TRUE/FALSE values: TRUE: FALSE: Package A cannot be installed nothing provides a requirement, wrong arch,... erase request (job rule) Package A must be installed install request (job rule) package will installed package will not be installed/will be uninstalled 6

Solver algorithms Unit propagation A Rule is called unit, if all literals but one are FALSE If a Rule is unit, the remaining literal can be set to TRUE Example: (a b c) & (-c) & (-a c) = TRUE c is FALSE (unary rule) (-a c) is unit -a is TRUE, a is FALSE (a b c) is unit b is TRUE Algorithm: free choice: find some undecided variable, assign TRUE or FALSE propagate all unit rules repeat until all variables are decided 7

Unit propagation & dependencies Requires rule (-A B1 B2 B3) A, B1, B2 is FALSE B3 must be TRUE If A is installed and all but one of the providers of a requires dependency cannot be installed, the remaining one must be installed adds packages to the install set B1, B2, B3 is FALSE A must be FALSE If none of the provides of a required dependency can be installed, the requiring package cannot be installed adds packages to the conflicts/erase set Conflicts rule (-A -B1) A is TRUE B1 must be FALSE and vice versa 8

Contradictions Unit propagation can lead to a contradiction This means that a literal must be both TRUE and FALSE Example (-a b) & (-a c) & (-b -c) if solver sets a to TRUE b, c is TRUE, c is FALSE! learn new rule from rules involved in contradiction learned rule is (-a) undo last free assignment and continue solving if nothing to undo, problem was unsolvable First implemented in 1996 in the GRASP solver. 9

Dealing with free choices Here is where you influence the quality of the solution: try to keep packages installed minimize number of packages to install Algorithm if a package was installed before and is not in the conflicts set, install it if a rule is not TRUE, but all of the negative literals are FALSE, choose best of the undecided positive literals and install the corresponding package (-A B1 B2) A TRUE choose B1 or B2 do not install any other package (i.e. set all undecided variables to FALSE) 10

System policies A policy rule defines what to do with installed packages must not be deinstalled or downgraded must not change architecture must not change vendor Rule format: (A A2 A3 A4) A2/A3/A4 are the allowed update candidates (same name and newer version or package with matching Obsoletes: dependency) 11

Reporting conflicts If a problem turns out to be unsolvable, the solver algorithm will return a set of rules that led to the conflict As a system with no rpms installed is conflict free, the returned set of rules must contain at least one job rule or policy rule A possible solution is to remove one of those rules, i.e. remove a job (do not try to install package 'foo') or a policy rule (allow deinstallation of package 'bar') Advantage: users understand those rules! 12

Conclusion Using SAT solver algorithms solve many of the problems the old solver had speed: magnitudes faster reliable results extendibility: implementation of complex dependencies is easy sensible error reports We're also working on a new repository format that can be processed much faster new dictionary based SOLV format 13

General Disclaimer This document is not to be construed as a promise by any participating company to develop, deliver, or market a product. Novell, Inc., makes no representations or warranties with respect to the contents of this document, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. Further, Novell, Inc., reserves the right to revise this document and to make changes to its content, at any time, without obligation to notify any person or entity of such revisions or changes. All Novell marks referenced in this presentation are trademarks or registered trademarks of Novell, Inc. in the United States and other countries. All third-party trademarks are the property of their respective owners. This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 2.5 License. To view a copy of this license, visit http://creativecommons.org/licenses/bync-sa/2.5/. For other licenses contact author.