Hostname: page-component-8448b6f56d-mp689 Total loading time: 0 Render date: 2024-04-18T08:23:20.234Z Has data issue: false hasContentIssue false

Tree dimension in verification of constrained Horn clauses

Published online by Cambridge University Press:  11 May 2018

BISHOKSAN KAFLE
Affiliation:
School of Computing and Information Systems, The University of Melbourne, Melbourne, Victoria, Australia (e-mail: bishoksank@unimelb.edu.au)
JOHN P. GALLAGHER
Affiliation:
Department of People and Technology, Roskilde University, Roskilde, Denmark, and IMDEA Software Institute, Pozuelo de Alarcón, Madrid, Spain, IMDEA Software Institute (e-mail: jpg@ruc.dk)
PIERRE GANTY
Affiliation:
IMDEA Software Institute, Pozuelo de Alarcón, Madrid, Spain (e-mail: pierre.ganty@imdea.org)

Abstract

In this paper, we show how the notion of tree dimension can be used in the verification of constrained Horn clauses (CHCs). The dimension of a tree is a numerical measure of its branching complexity and the concept here applies to Horn clause derivation trees. Derivation trees of dimension zero correspond to derivations using linear CHCs, while trees of higher dimension arise from derivations using non-linear CHCs. We show how to instrument CHCs predicates with an extra argument for the dimension, allowing a CHC verifier to reason about bounds on the dimension of derivations. Given a set of CHCs P, we define a transformation of P yielding a dimension-bounded set of CHCs Pk. The set of derivations for Pk consists of the derivations for P that have dimension at most k. We also show how to construct a set of clauses denoted P>k whose derivations have dimension exceeding k. We then present algorithms using these constructions to decompose a CHC verification problem. One variation of this decomposition considers derivations of successively increasing dimension. The paper includes descriptions of implementations and experimental results.

Type
Original Article
Copyright
Copyright © Cambridge University Press 2018 

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Abelson, H. and Sussman, G. J. 1996. Structure and Interpretation of Computer Programs, 2nd ed. MIT Press.Google Scholar
Afrati, F. N., Gergatsoulis, M. and Toni, F. 2003. Linearisability on datalog programs. Theoretical Computer Science 308, 13, 199226.CrossRefGoogle Scholar
Bagnara, R., Hill, P. M. and Zaffanella, E. 2008. The Parma Polyhedra Library: Toward a complete set of numerical abstractions for the analysis and verification of hardware and software systems. Science of Computer Programming 72, 1–2, 321.Google Scholar
Beyer, D. 2015. Software verification and verifiable witnesses – Report on SV-COMP 2015. In Tools and Algorithms for the Construction and Analysis of Systems, Baier, C. and Tinelli, C., Eds. Lecture Notes in Computer Science, vol. 9035. Springer, 401416.Google Scholar
Bjørner, N., Gurfinkel, A., McMillan, K. L. and Rybalchenko, A. 2015. Horn clause solvers for program verification. In Fields of Logic and Computation II – Essays Dedicated to Yuri Gurevich on the Occasion of His 75th Birthday, Beklemishev, L. D., Blass, A., Dershowitz, N., Finkbeiner, B. and Schulte, W., Eds. Lecture Notes in Computer Science, vol. 9300. Springer, 2451.CrossRefGoogle Scholar
Bjørner, N., McMillan, K. L. and Rybalchenko, A. 2013. On solving universally quantified Horn clauses. In Proc. of International Static Analysis Symposium (SAS), Logozzo, F. and Fähndrich, M., Eds. Lecture Notes in Computer Science, vol. 7935. Springer, 105–125.Google Scholar
De Angelis, E., Fioravanti, F., Pettorossi, A. and Proietti, M. 2014. Verimap: A tool for verifying programs through transformations. In Proc. of Tools and Algorithms for the Construction and Analysis of Systems, Ábrahám, E. and Havelund, K., Eds. Lecture Notes in Computer Science, vol. 8413. Springer, 568–574.Google Scholar
De Angelis, E., Fioravanti, F., Pettorossi, A. and Proietti, M. 2015. Proving correctness of imperative programs by linearizing constrained Horn clauses. Theory and Practice of Logic Programming 15, 4–5, 635650.CrossRefGoogle Scholar
Dutertre, B. 2014. Yices 2.2. In Computer-Aided Verification, Biere, A. and Bloem, R., Eds. Lecture Notes in Computer Science, vol. 8559. Springer, 737744.CrossRefGoogle Scholar
Esparza, J., Kiefer, S. and Luttenberger, M. 2007. On fixed point equations over commutative semirings. In Proc. of Symposium on Theoretical Aspects of Computer Science. Lecture Notes in Computer Science, vol. 4393. Springer, 296–307.Google Scholar
Esparza, J., Kiefer, S. and Luttenberger, M. 2010. Newtonian program analysis. Journal of the ACM 57, 6, 33.CrossRefGoogle Scholar
Esparza, J., Luttenberger, M. and Schlund, M. 2014. A brief history of strahler numbers. In Proc. of International Conference on Language and Automata Theory and Applications (LATA), Dediu, A. H., Martín-Vide, C., Sierra-Rodríguez, J. L. and Truthe, B., Eds. Lecture Notes in Computer Science, vol. 8370. Springer, 1–13.Google Scholar
Gallagher, J. P. 1993. Specialisation of logic programs: A tutorial. In Proc. of ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM'93). ACM Press, Copenhagen, 88–98.Google Scholar
Gallagher, J. P. and Lafave, L. 1996. Regular approximation of computation paths in logic and functional languages. In Partial Evaluation, Danvy, O., Glück, R. and Thiemann, P., Eds. Lecture Notes in Computer Science, vol. 1110. Springer-Verlag, 115136.Google Scholar
Ganty, P., Iosif, R., and Konečný, F. 2016. Under-approximation of procedure summaries for integer programs. International Journal on Software Tools for Technology Transfer 19, 5 (April), 565584.Google Scholar
Gonnord, L. and Halbwachs, N. 2006. Combining widening and acceleration in linear relation analysis. In Proc. of International Static Analysis Symposium (SAS), Yi, K., Ed. Lecture Notes in Computer Science, vol. 4134. Springer, 144–160.Google Scholar
Grebenshchikov, S., Gupta, A., Lopes, N. P., Popeea, C. and Rybalchenko, A. 2012. HSF(C): A software verifier based on Horn clauses - (competition contribution). In Proc. of Tools and Algorithms for the Construction and Analysis of Systems (TACAS), Flanagan, C. and B. König, Eds. Lecture Notes in Computer Science, vol. 7214. Springer, 549–551.Google Scholar
Grebenshchikov, S., Lopes, N. P., Popeea, C. and Rybalchenko, A. 2012. Synthesizing software verifiers from proof rules. In Proc. of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), Vitek, J., Lin, H. and Tip, F., Eds. ACM, 405–416.Google Scholar
Gurfinkel, A., Kahsai, T. and Navas, J. A. 2015. SeaHorn: A framework for verifying C programs (competition contribution). In Tools and Algorithms for the Construction and Analysis of Systems, Baier, C. and Tinelli, C., Eds. Lecture Notes in Computer Science, vol. 9035. Springer, 447450.Google Scholar
Heizmann, M., Hoenicke, J. and Podelski, A. 2009. Refinement of trace abstraction. In Proc. of International Static Analysis Symposium (SAS), Palsberg, J. and Su, Z., Eds. Lecture Notes in Computer Science, vol. 5673. Springer, 69–85.Google Scholar
Heizmann, M., Hoenicke, J. and Podelski, A. 2013. Software model checking for people who love automata. In Proc. of Computer-Aided Verification, Sharygina, N. and Veith, H., Eds. Lecture Notes in Computer Science, vol 8044. Springer, 36–52.Google Scholar
Hermenegildo, M. V., Bueno, F., Carro, M., López-García, P., Mera, E., Morales, J. F. and Puebla, G. 2012. An overview of Ciao and its design philosophy. Theory and Practice of Logic Programming 12, 1–2, 219252.Google Scholar
Hoder, K. and Bjørner, N. 2012. Generalized property directed reachability. In Proc. International Conference on Theory and Applications of Satisfiability Testing (SAT), Cimatti, A. and Sebastiani, R., Eds. Lecture Notes in Computer Science, vol. 7317. Springer, 157–171.Google Scholar
Hojjat, H., Konecný, F., Garnier, F., Iosif, R., Kuncak, V. and Rümmer, P. 2012. A verification toolkit for numerical transition systems – Tool paper. In Proc. of International Symposium on Formal Methods (FM), Giannakopoulou, D. and Méry, D., Eds. Lecture Notes in Computer Science, vol. 7436. Springer, 247–251.Google Scholar
Jaffar, J., Maher, M., Marriott, K. and Stuckey, P. 1998. The semantics of constraint logic programs. Journal of Logic Programming 37, 1–3, 146.CrossRefGoogle Scholar
Jones, N., Gomard, C. and Sestoft, P. 1993. Partial Evaluation and Automatic Software Generation. Prentice Hall.Google Scholar
Kafle, B. and Gallagher, J. P. 2017. Horn clause verification with convex polyhedral abstraction and tree automata-based refinement. Computer Languages, Systems & Structures 47, 218.Google Scholar
Kafle, B., Gallagher, J. P. and Ganty, P. 2016. Solving non-linear horn clauses using a linear horn clause solver. In Proc. of Workshop on Horn Clauses for Verification and Synthesis (HCVS), Gallagher, J. P. and Rümmer, P., Eds. Electronic Proceedings in Theoretical Computer Science, vol. 219. 33–48.Google Scholar
Kafle, B., Gallagher, J. P. and Morales, J. F. 2016. RAHFT: A tool for verifying Horn clauses using abstract interpretation and finite tree automata. In Proc. of Computer-Aided Verification (CAV), Chaudhuri, S. and Farzan, A., Eds. Lecture Notes in Computer Science, vol. 9779. Springer, 261–268.Google Scholar
McMillan, K. L. and Rybalchenko, A. 2013. Solving constrained Horn clauses using interpolation. Technical Report MSR-TR-2013-6, Microsoft Research. https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/MSR-TR-2013-6.pdfGoogle Scholar
Mordvinov, D. and Fedyukovich, G. 2017. Synchronizing constrained horn clauses. In Proc. of 21st International Conference on Logic for Programming, Artificial Intelligence and Reasoning (LPAR-21), T., Eiter and D., Sands, Eds. EPiC Series in Computing, vol. 46. EasyChair, 338–355.Google Scholar
Nielson, H. R. and Nielson, F. 1992. Semantics with Applications – A Formal Introduction. Wiley Professional Computing. Wiley.Google Scholar
Peralta, J., Gallagher, J. P. and Sağlam, H. 1998. Analysis of imperative programs through analysis of constraint logic programs. In Proc. of International Static Analysis Symposium (SAS), G., Levi, Ed. Lecture Notes in Computer Science, vol. 1503. Springer-Verlag, 246–261.Google Scholar
Reps, T. W., Turetsky, E. and Prabhu, P. 2016. Newtonian program analysis via tensor product. In Proc. of Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), R., Bodík and Majumdar, R., Eds. ACM, 663–677.Google Scholar
Rümmer, P., Hojjat, H. and Kuncak, V. 2013. Disjunctive interpolants for Horn-clause verification. In Proc. of Computer-Aided Verification, Sharygina, N. and Veith, H., Eds. Lecture Notes in Computer Science, vol 8044. Springer, 347–363.Google Scholar
Sharygina, N. and Veith, H., Eds. 2013. Computer-Aided Verification. Lecture Notes in Computer Science, vol. 8044. Springer.Google Scholar