Back to compsys-tools (demo machine)
Back to Compsys Homepage

# Simplification of Boolean Affine Formulas

### Paul Feautrier

Boolean Affine Formulas, in which affine inequalities are combined by boolean connectives, are ubiquitous in computer science: static analysis, code and hardware generation, symbolic model checking and many other techniques use them as a compact representation of large or infinite sets. Common algorithms tend to generate large and highly redundant formulas, hence the necessity of a simplifier for keeping the overall complexity under control. Simplification is a difficult problem, at least as hard as SMT solving, with a worst case complexity exponential in the number of affine inequalities. This paper proposes a new method, based on path cutting in Ordered Binary Decision Diagrams, which is able to take advantage of any regularity in the subject formula to speed up simplification. The method has been implemented and was tested on benchmarks from several application domains.

## 1  Method

Boolean affine formulas are simplified by first constructing an Ordered Binary Decision Diagram, then finding and cutting its unfeasible paths. See [4] for details. In the worst case, the method is exponential in the number of affine atoms, but in many cases is able to exploit regularities in the subjet formula to improve its running time.

## 2  Benchmarks, C Syntax

Small benchmarks were used to debug the implementation. Example dillig.dat is from [3]. Example scholl2.dat is from [6].

Quasts benchmarks come from a hardware synthesis application [1] and from a code generation application [2].

 name size before after time Small g1g2.dat 3 2 1 0.012 g2l3.dat 5 3 2 0.015 split-centered.dat 4 3 2 0.030 dillig.dat 40 5 2 0.10 scholl2.dat 7 4 3 0.018 Quasts matmul-3.quast2.dat 10 4 4 0.039 poly-1.quast1.dat 142 9 3 0.14 poly-1.quast2.dat 62 8 2 0.062 poly-1.quast3.dat 131 8 4 0.16 poly-1.quast4.dat 33 6 3 0.051 poly-3.quast1.dat 18 4 1 0.023 poly-5.quast1.dat 8 4 2 0.012 poly-6.quast1.dat 11 4 2 0.033 choles-Q2.dat 2918 10 1 0.22 choles-Q4.dat 5291 11 3 0.46 choles-Q5.dat 5033 10 6 0.41 choles-Q6.dat 1196 9 1 0.12 thomr-C23.dat 4105 11 6 0.54 thomr-SX3.dat 2298 13 6 0.53 thomr-WC3.dat 3275 16 3 0.56 thomr-Z12.dat 2298 13 1 0.45 thomr-Z15.dat 1814 15 1 0.28

## 3  Benchmarks, Mathematica Syntax

These random benchmarks were created by David Monniaux for testing a new quantifier elimination method [5]. They have been selected from the Mjollnir repository. For simplification purposes, the quantifier prefix is ignored.

 name size before after time formula-026.m 19 10 8 0.60 formula-142.m 19 10 9 0.65 formula-151.m 25 13 11 1.9 formula-192.m 25 13 10 1.3 formula-107.m 27 14 13 7.1 formula-069.m 27 14 12 11 formula-147.m 29 15 11 37 formula-011.m 29 15 14 11 formula-124.m 31 16 14 28 formula-115.m 31 16 14 81 formula-227.m 33 17 11 8.6 formula-263.m 33 17 13 40 formula-094.m 33 17 12 67 formula-228.m 33 17 0 0.12

## References

[1]
Christophe Alias, Bogdan Pasca, and Alexandru Plesco. Automatic generation of fpga-specific pipelined accelerators. In Andreas Koch, Ram Krishnamurthy, John McAllister, Roger Woods, and Tarek A. El-Ghazawi, editors, Reconfigurable Computing: Architectures, Tools and Applications - 7th International Symposium, ARC 2011, Belfast, UK, volume 6578 of Lecture Notes in Computer Science, pages 53–66, 2011.
[2]
Pierre Boulet and Paul Feautrier. Scanning polyhedra without DO loops. In PACT’98, October 1998.
[3]
Isil Dillig, Thomas Dillig, and Alex Aiken. Small formulas for large programs: On-line constraint simplification in scalable static analysis. In Radhia Cousot and Mathieu Martel, editors, SAS 2010, LNCS 6337, pages 236–252. Springer, 2010.
[4]
Paul Feautrier. Simplification of Boolean Affine Formulas. Technical Report RR-7689, INRIA, July 2011.
[5]
David Monniaux. Quantifier elimination by lazy model enumeration. In Tayssir Touili, Byron Cook, and Paul Jackson, editors, Computer Aided Verification, 22nd International Conference, CAV 2010, Edinburgh, UK, July 15-19, volume 6174 of Lecture Notes in Computer Science, pages 585–599, 2010.
[6]
Christoph Scholl, Stefan Disch, Florian Pigorsh, and Stefan Kupferschmid. Computing optimized representations for non-convex polyhedra by detection and removal of redundant linear constraints. In Kowalewski S. and Philippou A., editors, TACAS 2009, LNCS 5505, pages 383–397. Springer, 2009.

This document was translated from LATEX by HEVEA.