Skip to main content

ADCL: Acceleration Driven Clause Learning for Constrained Horn Clauses

  • Conference paper
  • First Online:
Static Analysis (SAS 2023)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 14284))

Included in the following conference series:

Abstract

Constrained Horn Clauses (CHCs) are often used in automated program verification. Thus, techniques for (dis-)proving satisfiability of CHCs are a very active field of research. On the other hand, acceleration techniques for computing formulas that characterize the N-fold closure of loops have successfully been used for static program analysis. We show how to use acceleration to avoid repeated derivations with recursive CHCs in resolution proofs, which reduces the length of the proofs drastically. This idea gives rise to a novel calculus for (dis)proving satisfiability of CHCs, called Acceleration Driven Clause Learning (ADCL). We implemented this new calculus in our tool LoAT and evaluate it empirically in comparison to other state-of-the-art tools.

Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) - 235950644 (Project GI 274/6-2).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    chc-LIA-Lin_052.smt2 from the benchmarks of the CHC Competition ’22 [14].

  2. 2.

    We assume that all arguments of predicates are variables. This is not a restriction, as one can add equations to \(\psi \) to identify \(\varSigma _\mathcal {A}\)-terms with fresh variables. To ease the presentation, we also use \(\varSigma _\mathcal {A}\)-terms as arguments of predicates in examples (e.g., in Example 1 we wrote \(\top \implies \textsf{Inv}(0, 5000)\) instead of \(Y_1 = 0 \wedge Y_2 = 5000 \implies \textsf{Inv}(Y_1, Y_2)\)).

  3. 3.

    All full proofs can be found in the extended version [26].

References

  1. Artifact for “ADCL: Acceleration Driven Clause Learning for Constrained Horn Clauses” (2023). https://doi.org/10.5281/zenodo.8146788

  2. Evaluation of “ADCL: Acceleration Driven Clause Learning for Constrained Horn Clauses” (2023). https://loat-developers.github.io/adcl-evaluation. Source code of LoAT Source code of LoAT available at https://github.com/loat-developers/LoAT/tree/v0.4.0

  3. Alt, L., Blicha, M., Hyvärinen, A.E.J., Sharygina, N.: SolCMC: Solidity compiler’s model checker. In: Shoham, S., Vizel, Y. (eds.) CAV 2022. LNCS, vol. 13371, pp. 325–338. Springer, Cham (2022). https://doi.org/10.1007/978-3-031-13185-1_16

    Chapter  Google Scholar 

  4. Bagnara, R., Pescetti, A., Zaccagnini, A., Zaffanella, E.: PURRS: towards computer algebra support for fully automatic worst-case complexity analysis. CoRR abs/cs/0512056 (2005). https://doi.org/10.48550/arXiv.cs/0512056

  5. Bardin, S., Finkel, A., Leroux, J., Schnoebelen, P.: Flat acceleration in symbolic model checking. In: Peled, D.A., Tsay, Y.-K. (eds.) ATVA 2005. LNCS, vol. 3707, pp. 474–488. Springer, Heidelberg (2005). https://doi.org/10.1007/11562948_35

    Chapter  Google Scholar 

  6. Biere, A.: Bounded model checking. In: Handbook of Satisfiability - Second Edition. Frontiers in Artificial Intelligence and Applications, vol. 336, pp. 739–764. IOS Press (2021). https://doi.org/10.3233/FAIA201002

  7. Blicha, M., Fedyukovich, G., Hyvärinen, A.E.J., Sharygina, N.: Transition power abstractions for deep counterexample detection. In: Fisman, D., Rosu, G. (eds.) TACAS 2022. LNCS, vol. 13243, pp. 524–542. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-99524-9_29

    Chapter  Google Scholar 

  8. Bozga, M., Gîrlea, C., Iosif, R.: Iterating octagons. In: Kowalewski, S., Philippou, A. (eds.) TACAS 2009. LNCS, vol. 5505, pp. 337–351. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-00768-2_29

    Chapter  Google Scholar 

  9. Bozga, M., Iosif, R., Konečný, F.: Fast acceleration of ultimately periodic relations. In: Touili, T., Cook, B., Jackson, P. (eds.) CAV 2010. LNCS, vol. 6174, pp. 227–242. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-14295-6_23

    Chapter  Google Scholar 

  10. Bozga, M., Iosif, R., Konečný, F.: Relational analysis of integer programs. Technical report TR-2012-10, VERIMAG (2012). https://www-verimag.imag.fr/TR/TR-2012-10.pdf

  11. Bradley, A.R.: SAT-based model checking without unrolling. In: Jhala, R., Schmidt, D. (eds.) VMCAI 2011. LNCS, vol. 6538, pp. 70–87. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-18275-4_7

    Chapter  Google Scholar 

  12. Calzavara, S., Grishchenko, I., Maffei, M.: HornDroid: practical and sound static analysis of Android applications by SMT solving. In: EuroS &P 2016, pp. 47–62. IEEE (2016). https://doi.org/10.1109/EuroSP.2016.16

  13. Caniart, N., Fleury, E., Leroux, J., Zeitoun, M.: Accelerating interpolation-based model-checking. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 428–442. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-78800-3_32

    Chapter  Google Scholar 

  14. CHC Competition. https://chc-comp.github.io

  15. Chen, Y., Kovács, L., Robillard, S.: Theory-specific reasoning about loops with arrays using Vampire. In: Kovács, L., Voronkov, A. (eds.) Vampire@IJCAR 2016, pp. 16–32. EPiC 44 (2016). https://doi.org/10.29007/qk21

  16. Comon, H., Jurski, Y.: Multiple counters automata, safety analysis and Presburger arithmetic. In: Hu, A.J., Vardi, M.Y. (eds.) CAV 1998. LNCS, vol. 1427, pp. 268–279. Springer, Heidelberg (1998). https://doi.org/10.1007/BFb0028751

    Chapter  Google Scholar 

  17. Dietsch, D., Heizmann, M., Hoenicke, J., Nutz, A., Podelski, A.: Ultimate TreeAutomizer (CHC-COMP tool description). In: De Angelis, E., Fedyukovich, G., Tzevelekos, N., Ulbrich, M. (eds.) HCVS/PERR@ETAPS 2019, pp. 42–47. EPTCS 296 (2019). https://doi.org/10.4204/EPTCS.296.7

  18. Dutertre, B.: Yices 2.2. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 737–744. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-08867-9_49

    Chapter  Google Scholar 

  19. Ernst, G.: Loop verification with invariants and contracts. In: Finkbeiner, B., Wies, T. (eds.) VMCAI 2022. LNCS, vol. 13182, pp. 69–92. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-94583-1_4

    Chapter  Google Scholar 

  20. Fedyukovich, G., Prabhu, S., Madhukar, K., Gupta, A.: Solving constrained Horn clauses using syntax and data. In: Bjørner, N.S., Gurfinkel, A. (eds.) FMCAD 2018, pp. 1–9 (2018). https://doi.org/10.23919/FMCAD.2018.8603011

  21. Finkel, A., Leroux, J.: How to compose Presburger-accelerations: applications to broadcast protocols. In: Agrawal, M., Seth, A. (eds.) FSTTCS 2002. LNCS, vol. 2556, pp. 145–156. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-36206-1_14

    Chapter  Google Scholar 

  22. Frohn, F., Giesl, J.: Proving non-termination via loop acceleration. In: Barrett, C.W., Yang, J. (eds.) FMCAD 2019, pp. 221–230 (2019). https://doi.org/10.23919/FMCAD.2019.8894271

  23. Frohn, F.: A calculus for modular loop acceleration. In: Biere, A., Parker, D. (eds.) TACAS 2020. LNCS, vol. 12078, pp. 58–76. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-45190-5_4

    Chapter  Google Scholar 

  24. Frohn, F., Giesl, J.: Proving non-termination and lower runtime bounds with LoAT (system description). In: Blanchette, J., Kovács, L., Pattinson, D. (eds.) IJCAR 2022. LNCS, vol. 13385, pp. 712–722. Springer, Cham (2022). https://doi.org/10.1007/978-3-031-10769-6_41

    Chapter  Google Scholar 

  25. Frohn, F., Giesl, J.: Proving non-termination by acceleration driven clause learning (short paper). In: Pientka, B., Tinelli, C. (eds.) CADE 2023. LNCS, vol 14132, pp. 220–233. Springer, Cham (2023). Full version appeared in CoRR abs/2304.10166. https://doi.org/10.48550/arXiv.2304.10166

  26. Frohn, F., Giesl, J.: ADCL: acceleration driven clause learning for constrained Horn clauses. CoRR abs/2303.01827 (2023). https://doi.org/10.48550/arXiv.2303.01827

  27. Ganty, P., Iosif, R., Konečný, F.: Underapproximation of procedure summaries for integer programs. Int. J. Softw. Tools Technol. Transfer 19(5), 565–584 (2016). https://doi.org/10.1007/s10009-016-0420-7

    Article  Google Scholar 

  28. Gomes, C.P., Selman, B., Kautz, H.A.: Boosting combinatorial search through randomization. In: Mostow, J., Rich, C. (eds.) AAAI 1998, pp. 431–437 (1998). https://www.cs.cornell.edu/gomes/pdf/1998_gomes_aaai_iaai_boosting.pdf

  29. Grebenshchikov, S., Lopes, N.P., Popeea, C., Rybalchenko, A.: Synthesizing software verifiers from proof rules. In: Vitek, J., Lin, H., Tip, F. (eds.) PLDI 2012, pp. 405–416 (2012). https://doi.org/10.1145/2254064.2254112

  30. Gurfinkel, A., Kahsai, T., Komuravelli, A., Navas, J.A.: The SeaHorn verification framework. In: Kroening, D., Păsăreanu, C.S. (eds.) CAV 2015. LNCS, vol. 9206, pp. 343–361. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-21690-4_20

    Chapter  Google Scholar 

  31. Haase, C., Halfon, S.: Integer vector addition systems with states. In: Ouaknine, J., Potapov, I., Worrell, J. (eds.) RP 2014. LNCS, vol. 8762, pp. 112–124. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-11439-2_9

    Chapter  Google Scholar 

  32. Henzinger, T.A., Hottelier, T., Kovács, L., Rybalchenko, A.: Aligators for arrays (tool paper). In: Fermüller, C.G., Voronkov, A. (eds.) LPAR 2010. LNCS, vol. 6397, pp. 348–356. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-16242-8_25

    Chapter  Google Scholar 

  33. Hoder, K., Bjørner, N.: Generalized property directed reachability. In: Cimatti, A., Sebastiani, R. (eds.) SAT 2012. LNCS, vol. 7317, pp. 157–171. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-31612-8_13

    Chapter  Google Scholar 

  34. Hojjat, H., Iosif, R., Konečný, F., Kuncak, V., Rümmer, P.: Accelerating interpolants. In: Chakraborty, S., Mukund, M. (eds.) ATVA 2012. LNCS, pp. 187–202. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-33386-6_16

    Chapter  Google Scholar 

  35. Hojjat, H., Rümmer, P.: The Eldarica Horn solver. In: Bjørner, N.S., Gurfinkel, A. (eds.) FMCAD 2018, pp. 1–7 (2018). https://doi.org/10.23919/FMCAD.2018.8603013

  36. Kahsai, T., Rümmer, P., Sanchez, H., Schäf, M.: JayHorn: a framework for verifying Java programs. In: Chaudhuri, S., Farzan, A. (eds.) CAV 2016. LNCS, vol. 9779, pp. 352–358. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-41528-4_19

    Chapter  Google Scholar 

  37. Komuravelli, A., Gurfinkel, A., Chaki, S.: SMT-based model checking for recursive programs. Formal Methods Syst. Design 48(3), 175–205 (2016). https://doi.org/10.1007/s10703-016-0249-4

    Article  Google Scholar 

  38. Kostyukov, Y., Mordvinov, D., Fedyukovich, G.: Beyond the elementary representations of program invariants over algebraic data types. In: Freund, S.N., Yahav, E. (eds.) PLDI 2021, pp. 451–465 (2021). https://doi.org/10.1145/3453483.3454055

  39. Kovács, L., Voronkov, A.: Finding loop invariants for programs over arrays using a theorem prover. In: Chechik, M., Wirsing, M. (eds.) FASE 2009. LNCS, vol. 5503, pp. 470–485. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-00593-0_33

    Chapter  Google Scholar 

  40. Kroening, D., Lewis, M., Weissenbacher, G.: Under-approximating loops in C programs for fast counterexample detection. Formal Methods Syst. Design 47(1), 75–92 (2015). https://doi.org/10.1007/s10703-015-0228-1

    Article  Google Scholar 

  41. libFAUDES Library. https://fgdes.tf.fau.de/faudes/index.html

  42. Luby, M., Sinclair, A., Zuckerman, D.: Optimal speedup of Las Vegas algorithms. Inf. Process. Lett. 47(4), 173–180 (1993). https://doi.org/10.1016/0020-0190(93)90029-9

    Article  MathSciNet  Google Scholar 

  43. Matsushita, Y., Tsukada, T., Kobayashi, N.: RustHorn: CHC-based verification for Rust programs. ACM Trans. Program. Lang. Syst. 43(4), 15:1–15:54 (2021). https://doi.org/10.1145/3462205

  44. de Moura, L., Bjørner, N.: Z3: an efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-78800-3_24

    Chapter  Google Scholar 

  45. OEIS Foundation Inc.: Thue-Morse sequence. The On-Line Encyclopedia of Integer Sequences. https://oeis.org/A010060

  46. OEIS Foundation Inc.: First differences of Thue-Morse sequence. The On-Line Encyclopedia of Integer Sequences (1999). https://oeis.org/A029883

  47. Schrammel, P., Jeannet, B.: Logico-numerical abstract acceleration and application to the verification of data-flow programs. In: Yahav, E. (ed.) SAS 2011. LNCS, vol. 6887, pp. 233–248. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-23702-7_19

    Chapter  Google Scholar 

  48. Silverman, J., Kincaid, Z.: Loop summarization with rational vector addition systems. In: Dillig, I., Tasiran, S. (eds.) CAV 2019. LNCS, vol. 11562, pp. 97–115. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-25543-5_7

    Chapter  Google Scholar 

  49. Stump, A., Sutcliffe, G., Tinelli, C.: StarExec: a cross-community infrastructure for logic solving. In: Demri, S., Kapur, D., Weidenbach, C. (eds.) IJCAR 2014. LNCS (LNAI), vol. 8562, pp. 367–373. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-08587-6_28

    Chapter  Google Scholar 

  50. Wesley, S., Christakis, M., Navas, J.A., Trefler, R., Wüstholz, V., Gurfinkel, A.: Verifying Solidity smart contracts via communication abstraction in SmartACE. In: Finkbeiner, B., Wies, T. (eds.) VMCAI 2022. LNCS, vol. 13182, pp. 425–449. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-94583-1_21

    Chapter  Google Scholar 

  51. Zhu, H., Magill, S., Jagannathan, S.: A data-driven CHC solver. In: Foster, J.S., Grossman, D. (eds.) PLDI 2018, pp. 707–721 (2018). https://doi.org/10.1145/3192366.3192416

Download references

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Florian Frohn or Jürgen Giesl .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Frohn, F., Giesl, J. (2023). ADCL: Acceleration Driven Clause Learning for Constrained Horn Clauses. In: Hermenegildo, M.V., Morales, J.F. (eds) Static Analysis. SAS 2023. Lecture Notes in Computer Science, vol 14284. Springer, Cham. https://doi.org/10.1007/978-3-031-44245-2_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-44245-2_13

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-44244-5

  • Online ISBN: 978-3-031-44245-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics