The Potential and Challenges of CAD with Equational Constraints for SC-Square

Similar documents
SMT Nonlinear Real Arithmetic and Computer Algebra: a Dialog

Controller Synthesis for Hybrid Systems using SMT Solving

Choosing a variable ordering for truth-table invariant cylindrical algebraic decomposition by incremental triangular decomposition

CAD: Algorithmic Real Algebraic Geometry

Formulating Problems in Real Algebra/Geometry

What does without loss of generality mean (and how do we detect it)

Solving computational problems in real algebra/geometry

A Piano Movers Problem Reformulated

Understanding Branch Cuts of Expressions

Tutorial 1: Modern SMT Solvers and Verification

Problem formulation for truth-table invariant cylindrical algebraic decomposition by incremental triangular decomposition

Comp487/587 - Boolean Formulas

Truth Table Invariant Cylindrical Algebraic Decomposition by Regular Chains

Opus: University of Bath Online Publication Store

WHAT IS AN SMT SOLVER? Jaeheon Yi - April 17, 2008

Formal methods in analysis

1 Algebraic Methods. 1.1 Gröbner Bases Applied to SAT

Computer Algebra and Formal Proof

An Efficient Decision Procedure for Functional Decomposable Theories Based on Dual Constraints

Worst-Case Upper Bound for (1, 2)-QSAT

Topics in Model-Based Reasoning

Proving Unsatisfiability in Non-linear Arithmetic by Duality

A New 3-CNF Transformation by Parallel-Serial Graphs 1

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig

Comparing Different Projection Operators in Cylindrical Algebraic Decomposition for SMT Solving

Non-linear Interpolant Generation and Its Application to Program Verification

1.5 Non-linear Real Arithmetic

Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011

Propositional Logic: Models and Proofs

SAT/SMT/AR Introduction and Applications

Formal Verification Methods 1: Propositional Logic

Lecture 11: Measuring the Complexity of Proofs

Reasoning with Quantified Boolean Formulas

Quantified Boolean Formulas Part 1

Decision Procedures 1: Survey of decision procedures

Quantifier Elimination

Foundations of Artificial Intelligence

Lecture 1: Logical Foundations

Pythagorean Triples and SAT Solving

Chapter 7 Propositional Satisfiability Techniques

First-Order Theorem Proving and Vampire. Laura Kovács (Chalmers University of Technology) Andrei Voronkov (The University of Manchester)

CSE 555 HW 5 SAMPLE SOLUTION. Question 1.

Warm-Up Problem. Is the following true or false? 1/35

Lecture 9: The Splitting Method for SAT

SMT BASICS WS 2017/2018 ( ) LOGIC SATISFIABILITY MODULO THEORIES. Institute for Formal Models and Verification Johannes Kepler Universität Linz

Propositional Calculus

First-Order Theorem Proving and Vampire

CS156: The Calculus of Computation

Arithmetic Decision Procedures: a simple introduction

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

USING FOURIER-MOTZKIN VARIABLE ELIMINATION FOR MCSAT EXPLANATIONS IN SMT-RAT

Intelligent Agents. Pınar Yolum Utrecht University

Generating Hard but Solvable SAT Formulas

Polynomial System Example Bank Version 4.0-1/4/13

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask

Lifted MAP Inference for Markov Logic

Shamir s Theorem. Johannes Mittmann. Technische Universität München (TUM)

Satisfiability Modulo Theories (SMT)

Foundations of Artificial Intelligence

Satisfiability Modulo Theories

Introduction Algorithms Applications MINISAT. Niklas Sörensson Chalmers University of Technology and Göteborg University

Cylindrical Algebraic Decomposition in Coq

About the impossibility to prove P NP or P = NP and the pseudo-randomness in NP

arxiv: v1 [cs.sc] 23 Apr 2018

Logic and Inferences

Part I: Propositional Calculus

Propositional Reasoning

Part 1: Propositional Logic

A brief introduction to Logic. (slides from

6. Logical Inference

Chapter 7 Propositional Satisfiability Techniques

Database Theory VU , SS Complexity of Query Evaluation. Reinhard Pichler

Clause/Term Resolution and Learning in the Evaluation of Quantified Boolean Formulas

arxiv: v1 [cs.sc] 24 Mar 2014

Computing the real solutions of polynomial systems with the RegularChains library in Maple

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5)

LOGIC PROPOSITIONAL REASONING

Logic. Knowledge Representation & Reasoning Mechanisms. Logic. Propositional Logic Predicate Logic (predicate Calculus) Automated Reasoning

Scalable and Accurate Verification of Data Flow Systems. Cesare Tinelli The University of Iowa

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 3: Practical SAT Solving

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

Integer vs. constraint programming. IP vs. CP: Language

Complexity Theory. Jörg Kreiker. Summer term Chair for Theoretical Computer Science Prof. Esparza TU München

Classical Propositional Logic

Using Machine Learning to Decide When to Precondition Cylindrical Algebraic Decomposition With Groebner Bases

Solving Non-Linear Arithmetic

Overview, cont. Overview, cont. Logistics. Optional Reference #1. Optional Reference #2. Workload and Grading

Introduction to Logic in Computer Science: Autumn 2006

Lifted Inference: Exact Search Based Algorithms

Set Theory Basics of Set Theory. mjarrar Watch this lecture and download the slides

Cylindrical Algebraic Decomposition in Coq

Bounded Model Checking with SAT/SMT. Edmund M. Clarke School of Computer Science Carnegie Mellon University 1/39

From Constructibility and Absoluteness to Computability and Domain Independence

Motivation. CS389L: Automated Logical Reasoning. Lecture 10: Overview of First-Order Theories. Signature and Axioms of First-Order Theory

Computing Rational Points in Convex Semi-algebraic Sets and Sums-of-Squares Decompositions

Satisfiability Checking

Propositional Logic. Methods & Tools for Software Engineering (MTSE) Fall Prof. Arie Gurfinkel

Lecture 2 Propositional Logic & SAT

Introduction to Artificial Intelligence Propositional Logic & SAT Solving. UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010

Topic 1: Propositional logic

Transcription:

The Potential and Challenges of with Equational Constraints for SC-Square Matthew England (Coventry University) Joint work with: James H. Davenport (University of Bath) 7th International Conference on Mathematical Aspects of Computer and Information Sciences (MACIS 2017) Vienna, Austria 15 17 November 2017 Supported by EU H2020-FETOPEN-CSA project SC 2 (712689).

Outline 1 2

Outline 1 2

The SC 2 Project (1/15) The authors are part of the EU H2020 SC 2 Project. This aims to build bridges between the two communities of: Satisfiability Checking: Community interested in algorithms to solve the SAT problem from logic, originally with variables Boolean but increasingly with variables from other arithmetics. Implement their work in SAT / SMT solvers. Symbolic Computation: Community interested in exact algorithms of symbolic mathematics. Implement their work in Computer Algebra Systems. Interested in algorithms and data structures for wide variety of automated mathematics (e.g. calculus, formula simplification, special functions, real non-linear polynomials,... )

SAT Problem (2/15) Boolean SAT Problem: Given a logical formula φ(x 1,..., X m ) built from Boolean variables X i connected by standard logic operators of conjunction ( ) disjunction ( ) and negation ( ); decide if there is an assignment of values to variables which satisfies it. The original NP-Hard problem. But SAT-solvers can routinely solve huge problem instance using search-based algorithms. Satisfiability Module Theory (SMT)-solvers attack the same problem but allow the variables to be other than Boolean. They iteratively solve Boolean skeleton; query a theory solver on whether this solution is valid in the current arithmetic; learn new clause. Note: solution is single satisfying solution or proof of unsatisfiability.

SAT Problem (2/15) Boolean SAT Problem: Given a logical formula φ(x 1,..., X m ) built from Boolean variables X i connected by standard logic operators of conjunction ( ) disjunction ( ) and negation ( ); decide if there is an assignment of values to variables which satisfies it. The original NP-Hard problem. But SAT-solvers can routinely solve huge problem instance using search-based algorithms. Satisfiability Module Theory (SMT)-solvers attack the same problem but allow the variables to be other than Boolean. They iteratively solve Boolean skeleton; query a theory solver on whether this solution is valid in the current arithmetic; learn new clause. Note: solution is single satisfying solution or proof of unsatisfiability.

SAT Problem (2/15) Boolean SAT Problem: Given a logical formula φ(x 1,..., X m ) built from Boolean variables X i connected by standard logic operators of conjunction ( ) disjunction ( ) and negation ( ); decide if there is an assignment of values to variables which satisfies it. The original NP-Hard problem. But SAT-solvers can routinely solve huge problem instance using search-based algorithms. Satisfiability Module Theory (SMT)-solvers attack the same problem but allow the variables to be other than Boolean. They iteratively solve Boolean skeleton; query a theory solver on whether this solution is valid in the current arithmetic; learn new clause. Note: solution is single satisfying solution or proof of unsatisfiability.

QE Problem (3/15) A Tarski Formula is a Boolean combination of predicates f j σ j, 0 with σ j {=,, >,, <, }, f j Q[x 1,..., x n ]. The Quantifier Elimination (QE) Problem is: given Q k+1 x k+1... Q n x n Φ(x 1,..., x n ) (1) where Q i {, } and Φ is a Tarski Formula; produce an equivalent formula, Ψ(x 1,..., x k ) which is quantifier free. A long standing problem in Symbolic Computation. Soluble over real numbers (but doubly exponential in number of quantifiers). Note: solution is equivalent formula in unquantified variables. The QE problem with all variables existentially quantified is the SAT problem in the arithmetic of non-linear real polynomials.

QE Problem (3/15) A Tarski Formula is a Boolean combination of predicates f j σ j, 0 with σ j {=,, >,, <, }, f j Q[x 1,..., x n ]. The Quantifier Elimination (QE) Problem is: given Q k+1 x k+1... Q n x n Φ(x 1,..., x n ) (1) where Q i {, } and Φ is a Tarski Formula; produce an equivalent formula, Ψ(x 1,..., x k ) which is quantifier free. A long standing problem in Symbolic Computation. Soluble over real numbers (but doubly exponential in number of quantifiers). Note: solution is equivalent formula in unquantified variables. The QE problem with all variables existentially quantified is the SAT problem in the arithmetic of non-linear real polynomials.

SC-Square Advert (4/15) So these two communities are now working on the same problem, but until recently were not talking to each other! The SC-Square Project seeks to rectify that: Initiated annual workshop (3rd workshop in Oxford July 2018). Initiated various technical collaborations (including one which won the 2017 SMT-NLA Competition). Collecting joint benchmarks for SMT-LIB and working on standards for communicating problems in domain. Editing a Special Issue of the Journal of Symbolic Computation on SC 2 (submission deadline is Feb 2018). Details here: http://www.sc-square.org/csa/welcome.html

Barriers to collaboration? (5/15) There are a number of reasons we cannot simply plug a Computer Algebra System into a SAT solver. E.g.: Algorithms need to support incrementality and backtracking in input constraints; Algorithms to need to provide minimum explanations of unsatisfiability. E. Abraham et al. SC 2 : Satisfiability Checking Meets Symbolic Computation. Intelligent Computer Mathematics, pp.28 43. Springer, 2016. Another issue is the style of problem instance. SMT instances usually have many variables and polynomials, but are often low degree and often contain many equations. How best to exploit these?

Barriers to collaboration? (5/15) There are a number of reasons we cannot simply plug a Computer Algebra System into a SAT solver. E.g.: Algorithms need to support incrementality and backtracking in input constraints; Algorithms to need to provide minimum explanations of unsatisfiability. E. Abraham et al. SC 2 : Satisfiability Checking Meets Symbolic Computation. Intelligent Computer Mathematics, pp.28 43. Springer, 2016. Another issue is the style of problem instance. SMT instances usually have many variables and polynomials, but are often low degree and often contain many equations. How best to exploit these?

Outline 1 2

Cylindrical Algebraic Decomposition (6/15) Decomposition meaning a partition of R n into connected subsets called cells; (semi)-algebraic meaning that each cell can be defined by a sequence of polynomial equations and inequations. Cylindrical meaning the cells are arranged in a useful manner - their projections (relative to a given variable ordering) are either equal or disjoint. Collins original algorithm produced sign-invariant for set of polynomials (each has constant sign on each cell). Hence truth invariant for any logical formula defined by them. Truth-invariant of R k can be used to easily infer the solution to (1). is doubly exponential in number of variables. But only complete method for QE / SAT in non-linear real arithmetic.

Cylindrical Algebraic Decomposition (6/15) Decomposition meaning a partition of R n into connected subsets called cells; (semi)-algebraic meaning that each cell can be defined by a sequence of polynomial equations and inequations. Cylindrical meaning the cells are arranged in a useful manner - their projections (relative to a given variable ordering) are either equal or disjoint. Collins original algorithm produced sign-invariant for set of polynomials (each has constant sign on each cell). Hence truth invariant for any logical formula defined by them. Truth-invariant of R k can be used to easily infer the solution to (1). is doubly exponential in number of variables. But only complete method for QE / SAT in non-linear real arithmetic.

Cylindrical Algebraic Decomposition (6/15) Decomposition meaning a partition of R n into connected subsets called cells; (semi)-algebraic meaning that each cell can be defined by a sequence of polynomial equations and inequations. Cylindrical meaning the cells are arranged in a useful manner - their projections (relative to a given variable ordering) are either equal or disjoint. Collins original algorithm produced sign-invariant for set of polynomials (each has constant sign on each cell). Hence truth invariant for any logical formula defined by them. Truth-invariant of R k can be used to easily infer the solution to (1). is doubly exponential in number of variables. But only complete method for QE / SAT in non-linear real arithmetic.

Example (7/15) Generated by the logical formula describing possible branch cuts of z 2 1 z 2 + 1 = z 4 1 Different shades show cells in sign-invariant for polynomial. Green/Red is where formula is True/False.

Example (7/15) Generated by the logical formula describing possible branch cuts of z 2 1 z 2 + 1 = z 4 1 Different shades show cells in sign-invariant for polynomial. Green/Red is where formula is True/False. Can do better (less cells) by exploiting equations.

Outline 1 2

Projection Operators (8/15) Collins works on input polynomials S by: Repeatedly project S l Q[x 1,..., x l ] to S l 1 := P C (S l ) Q[x 1,..., x l 1 ] where P C is Collins projection operator. Isolate real roots of S 1 to produce a of R 1 sign-invariant for S 1. Repeatedly lift the decomposition of R l 1 to one of R l, sign-invariant for S l. Do this by substituting a sample point of the cell; performing univariate root isolation and decompose. P C constructed so that sample point is representative of the whole cell. Other (better) projection operators developed since Collins.

Equational Constraints (9/15) An Equational Constraint (EC) is an equation implied by a logical formula. Informally: this reduces dimension of solution space by one, can it reduce complexity? Φ(x 1,..., x n ) F 1 (x 1,..., x n ) = 0 Φ (x 1,..., x n ) (2) S. McCallum On Projection in -Based Quantifier Elimination with Equational Constraints. In Proc. ISSAC 99, pages 145 149. ACM, 1999. Yes. Can use smaller operator for first projection if there is EC. If S r has n polynomials of degree d, then we need only n in projection for truth invariance with EC, instead of 1 2n(n + 1) for full sign-invariance.

Equational Constraints (9/15) An Equational Constraint (EC) is an equation implied by a logical formula. Informally: this reduces dimension of solution space by one, can it reduce complexity? Φ(x 1,..., x n ) F 1 (x 1,..., x n ) = 0 Φ (x 1,..., x n ) (2) S. McCallum On Projection in -Based Quantifier Elimination with Equational Constraints. In Proc. ISSAC 99, pages 145 149. ACM, 1999. Yes. Can use smaller operator for first projection if there is EC. If S r has n polynomials of degree d, then we need only n in projection for truth invariance with EC, instead of 1 2n(n + 1) for full sign-invariance.

What if more than one EC? (10/15) S. McCallum On propagation of equational constraints in -based quantifier elimination. In Proc. ISSAC 01, pages 223 231. ACM, 2001. For projections other that the first the necessary operator is slightly larger (but still far smaller than for sign invariance). Can only use use one EC per projection. So need: Propagation If p = 0, q = 0 are two ECs with main variable x r then res xr (p, q) is an EC with main variable x r 1. Propagation usually produces far more ECs than we can use. Gives rise to choice of EC designations that can have great effect.

Contributions by present authors (11/15) M. England, R. Bradford, and J.H. Davenport. Improving the use of equational constraints in cylindrical algebraic decomposition. In Proc. ISSAC 15, pages 165 172. ACM, 2015. Ability to make savings in the lifting phase also from ECs. Show that using ECs controls growth in number of polynomials. M. England and J.H. Davenport. The complexity of cylindrical algebraic decomposition with respect to polynomial degree. In Proc. CASC 16, LNCS 9890, pages 172 192. Springer, 2016. Shows that if we combine with Gröbner Basis technology we can also control the degree growth. Can conclude that each EC (at different projection) reduces double exponent of complexity bound by one.

Contributions by present authors (11/15) M. England, R. Bradford, and J.H. Davenport. Improving the use of equational constraints in cylindrical algebraic decomposition. In Proc. ISSAC 15, pages 165 172. ACM, 2015. Ability to make savings in the lifting phase also from ECs. Show that using ECs controls growth in number of polynomials. M. England and J.H. Davenport. The complexity of cylindrical algebraic decomposition with respect to polynomial degree. In Proc. CASC 16, LNCS 9890, pages 172 192. Springer, 2016. Shows that if we combine with Gröbner Basis technology we can also control the degree growth. Can conclude that each EC (at different projection) reduces double exponent of complexity bound by one.

What if ECs in Sub-formulae? (12/15) Suppose instead of (2) our problem has the form Φ(x 1,..., x n ) (f 1 = 0 Φ 1 ) (f 2 = 0 Φ 2 ). (3) Can write as (2) by letting F 1 = f i. R.J. Bradford, J.H. Davenport, M. England, S. McCallum, and D.J. Wilson. Cylindrical Algebraic Decompositions for Boolean Combinations. In Proc. ISSAC 13, pages 125 132. ACM, 2013. Can do better by analysing the inter-dependencies in (3) to build truth-table invariant (TTI) for sub-formulae. Truth table invariant cylindrical algebraic decomposition. J. Symbolic Computation, 76:1 35. Elsevier, 2016. Expanded to case where not every disjunct has an equation, so (2) impossible (no EC for Φ).

What if ECs in Sub-formulae? (12/15) Suppose instead of (2) our problem has the form Φ(x 1,..., x n ) (f 1 = 0 Φ 1 ) (f 2 = 0 Φ 2 ). (3) Can write as (2) by letting F 1 = f i. R.J. Bradford, J.H. Davenport, M. England, S. McCallum, and D.J. Wilson. Cylindrical Algebraic Decompositions for Boolean Combinations. In Proc. ISSAC 13, pages 125 132. ACM, 2013. Can do better by analysing the inter-dependencies in (3) to build truth-table invariant (TTI) for sub-formulae. Truth table invariant cylindrical algebraic decomposition. J. Symbolic Computation, 76:1 35. Elsevier, 2016. Expanded to case where not every disjunct has an equation, so (2) impossible (no EC for Φ).

Outline 1 2

Need for Primitivity (13/15) All the theory above requires that the EC defining polynomial be primitive. No technology currently exists (beyond basic sign-invariant ) for the non-primitive case. Restriction is not just on the input but also constraints found through propagation. J.H. Davenport and M. England. Need Polynomial Systems be Doubly-exponential? In: Proc. ICMS 2016, LNCS 9725, pages 157-164. Springer, 2016. The Davenport-Heinz examples used to demonstrate the doubly exponential complexity of were shown to lack primitivity - non-primitive case is genuinely the difficult case!

Need for Primitivity (13/15) All the theory above requires that the EC defining polynomial be primitive. No technology currently exists (beyond basic sign-invariant ) for the non-primitive case. Restriction is not just on the input but also constraints found through propagation. J.H. Davenport and M. England. Need Polynomial Systems be Doubly-exponential? In: Proc. ICMS 2016, LNCS 9725, pages 157-164. Springer, 2016. The Davenport-Heinz examples used to demonstrate the doubly exponential complexity of were shown to lack primitivity - non-primitive case is genuinely the difficult case!

Need for Well Orientedness (14/15) All existing theory rests on the mathematics of order-invariance developed by McCallum which requires projection polynomials not to vanish identically (usually the case but not always). The lack of this condition is only discovered at the end of (when we lift with respect to the offending polynomials). Would then need to start again with broader projection operator. Recent progress on new family of projection operators without this requirement. But not adapted for ECs yet.

Need for Incrementality (15/15) Key requirement for the effective use of by SMT-solvers is that the be incremental: that polynomials can be added and removed to the input with the data structures of the edited rather than recalculated. Now under development by SC 2 project. Could offer partial solution to the difficulties of well-orientedness (reverting to worse operator to avoid well-orientedness means adding more polynomials). But incremental with ECs could exhibit strange behaviour in SMT context. E.g. Removing a constraint that was equational could grow the output since it necessitates the use of a larger projection operator.

Need for Incrementality (15/15) Key requirement for the effective use of by SMT-solvers is that the be incremental: that polynomials can be added and removed to the input with the data structures of the edited rather than recalculated. Now under development by SC 2 project. Could offer partial solution to the difficulties of well-orientedness (reverting to worse operator to avoid well-orientedness means adding more polynomials). But incremental with ECs could exhibit strange behaviour in SMT context. E.g. Removing a constraint that was equational could grow the output since it necessitates the use of a larger projection operator.

The End Thanks for Listening Contact Details Matthew.England@coventry.ac.uk Slides will be available to download from my website: http://computing.coventry.ac.uk/~mengland/index.html