The starting point of our work was an implementation of the CutSat [88] calculus as a theory solver for hierarchic superposition [65]. In that course, we observed divergence for some of our problems. The analysis of those divergences led to the development of the CutSat++ calculus presented in this chapter, which is, as far as we know, the first sound, complete, and terminating calculus for linear integer problems based on the model assumption and conflict learning approach motivated by CDCL style SAT solving.
CutSat++ efficiently handles problems over guarded variables, i.e., variables with a constant upper and lower bound. On problems with un- guarded variables (e.g. unbounded problems) the CDCL style calculus alone is not guaranteed to terminate. Hence, we combine it with a lazy quantifier elimination procedure (called unguarded conflict resolution) that transforms a problem containing unguarded variables into one where feasibility depends only on guarded ones. The quantifier elimination procedure is called lazy because we only apply it to so-called conflicting cores, which are canonized forms of the unguarded conflicts encountered by the CDCL style algorithm. This allows us to avoid certain cases of worst-case exponential behavior that we would otherwise observe by using a quantifier elimination proce- dure alone.
Chapter 4
Fast Cube Tests (for Linear
Arithmetic Constraint
Solving)
Finding a mixed/integer solution for a polyhedron that is defined by a system of linear inequalities Ax≤ b is a well-known NP-complete problem [120]. Sy- stems of linear inequalities have many real-world applications so that this problem has been investigated in different research areas, e.g., in optimiza- tion via (mixed) integer linear programming (MILP) [90, 93, 110, 129] and in constraint solving via satisfiability modulo theories (SMT) [26, 32, 53, 77].
For commercial MILP implementations, it is standard to integrate pre- processing techniques, heuristics, and specialized tests [72, 73, 83, 90, 128, 129, 137]. Although these techniques are not complete, they are much more efficient on their designated target systems of linear inequalities than a com- plete algorithm alone. There actually exist specialized techniques for many classes of real-world problems representable as systems of linear inequali- ties. Therefore, commercial MILP solvers are efficient on many real-world inputs—even though the problem is NP-complete, in general.
The SMT community is still in the process of developing their own va- riety of specialized tests. It is even a big challenge to adopt the tests from the MILP community so that they still fit the requirements of SMT solving. One of those requirements is that SMT theory solvers have to solve a large number of incrementally connected, small systems of linear inequalities effi- ciently. Therefore, exploiting the incremental connection is key for making SMT theory solvers efficient [62]. In contrast, MILP solvers typically target one large system. The same holds for their specialized tests, which are not well suited to exploit incremental connections.
In this chapter, we present two tests tailored toward SMT solvers: the largest cube test and the unit cube test. The idea is to find hypercubes that are contained inside the input polyhedron and guarantee the existence of a mixed/integer solution. Due to computational complexity, we will restrict ourselves to only those hypercubes that are parallel to the coordinate axes. The largest cube test finds a hypercube with maximum edge length con- tained in the input polyhedron, determines its rational valued center, and rounds it to a potential mixed/integer solution. The unit cube test deter- mines if a polyhedron contains a hypercube with edge length one, which is the minimal edge length that guarantees a mixed/integer solution.
Most linear arithmetic theory solvers for SMT are based on a branch- and-bound algorithm on top of a simplex algorithm (see Chapter 2.7). They search for a solution at the surface of a polyhedron. However, our tests se- arch in the interior of the polyhedron. This gives them an advantage on polyhedra with a large number of integer solutions, e.g., absolutely unboun- ded inequality systems (see Chapter 2.8).
SMT theory solvers are designed to efficiently modify inequality bounds (see Chapter 2.7 and [58]). This design choice is the main reason why SMT theory solvers exploit the incremental connection between the different ine- quality systems so well. Our unit cube test also requires only a modification to the inequality bounds. After applying the test, we can easily recover the original system by reverting to the original bounds. In doing so, the unit cube test conserves the incremental connection to the different original systems. We make a similar observation about the largest cube test.
Our contributions are as follows: we define the linear cube transfor- mation (Corollary 4.2.2) that allows us to efficiently compute whether a system of inequalities Ax ≤ b contains a hypercube of edge length e in Section 4.2. The most remarkable fact about this transformation is that it solely changes the bounds b of the inequalities. Based on this transfor- mation, we develop in Section 4.3 two tests: the largest cube test and the unit cube test. For absolutely unbounded inequality systems, both tests always succeed (Lemma 4.4.1). Inside the SMT-LIB benchmarks [10], there are almost one thousand absolutely unbounded problem instances, and we show the advantage of our cube tests on these instances by comparing our implementation of the cube test with several state-of-the-art SMT solvers in Section 4.5. Our implementation is not only several orders of magni- tudes faster, but it also solves all instances, which most SMT solvers do not (Figure 4.8).
4.1
Related Work and Preliminaries
This chapter is based on two publications with Christoph Weidenbach as co- author [35, 36] and the techniques in this chapter focus on the interaction of geometric objects. In the case of a system of inequalities, this means the polyhedron defined by Ax≤ b. This is the reason why we use in this chapter polyhedron as an alternative name for systems of inequalities Ax≤ b. The other geometric objects we are considering are cubes and flat cubes. Their definitions can be found in Chapter 2.9.
This chapter focuses on all three theories of linear arithmetic. Our tests themselves are formulated as problems in the theory of linear rational arithmetic. However, the goal of our tests is to find mixed/integer solutions for problems in the theory of linear mixed/integer arithmetic. We first pre- sent all of our techniques for linear integer arithmetic. In Section 4.3.3, we then extend them to linear mixed arithmetic. To avoid confusion between the various theories, we always specify the type of solution/satisfiability.
The constraints in this chapter are non-strict inequalities and they are either formatted according to the vector representation, i.e., aT
i x ≤ bi (see also Chapter 2.2.1), or the standard representation, ai1x1+ . . . + ainxn≤ bi (see also Chapter 2.2.1). Other constraints have to be reduced to non-strict inequalities with the techniques presented in Chapter 2.3.
This chapter builds on the basics of linear algebra (Chapter 2.1) and li- near arithmetic (Chapter 2.2), on the concept of implied constraints (Chap- ter 2.5), and on the definitions of (un)bounded and (un)guarded problems and variables (Chapter 2.8). Knowledge of standard arithmetic decision pro- cedures for SMT solvers (Chapter 2.7) is not required to understand the tests that we propose here, but it is necessary to fully understand the practical usefulness of the tests with regard to SMT solving.
There also exist several publications by other authors that are highly relevant to the contributions presented in this chapter. The first one is by Hillier [83], who was aware of the unit cube test, but applied it only to cones (a special class of polyhedra) as a subroutine of the heuristic he presents in the same paper. His work never mentioned applications beyond cones, nor did he prove any structural properties connected to hypercubes. Hillier’s heuristic tailored for MILP optimization lost popularity as soon as interior point methods became efficient in practice [94]. Nonetheless, our cube tests remain relevant for SMT theory solvers because there are no competitive incremental interior point methods known.
The second related work is by Bobot et al. [26]. They discuss in their paper [26] relations between hypercubes and polyhedra including absolute unboundedness and positive linear combinations between inequalities. Our largest cube test can also detect these relations because it is, with some minor changes, the dual of the linear optimization problem of Bobot et al.
In contrast to the linear optimization problem of Bobot et al., our tests are closer to the original polyhedron and, therefore, easier to construct. Our cube tests also produce sample points and find solutions for polyhedra that are bounded.
Another method that provides a sufficient condition for the existence of an integer solution is the dark shadow of the Omega Test [123]. The dark shadow is based on Fourier-Motzkin elimination and its worst-case runtime is double exponential. Although not practically advantageous, formulating the unit cube test through Fourier-Motzkin elimination allows us to put the sufficient conditions of the two methods in relation. Fourier-Motzkin elimination eliminates the variable xj from a problem by combining each pair of inequalities ajxj + pj ≤ 0 and −bjxj + qj ≤ 0 (with aj, bj > 0) into a new inequality ajqj+ bjpj ≤ 0. The dark shadow creates a stronger version (ajqj+ bjpj ≤ aj+ bj−ajbj) of the combined inequality to guarantee the existence of an integer solution for xj. Formulating the unit cube test through Fourier-Motzkin elimination makes the combined inequality even stronger (ajqj+ bjpj ≤ −ajbj). This means that the sufficient condition of the dark shadow subsumes the condition of the unit cube test. Still, our unit cube test is definable as a linear program and it is, therefore, computable in polynomial time. So the better condition of the dark shadow comes at the cost of being much harder (doubly exponential) to compute.