Abstract
We address the problem of checking the satisfiability of a set of constrained Horn clauses (CHCs) possibly including more than one query. We propose a transformation technique that takes as input a set of CHCs, including a set of queries, and returns as output a new set of CHCs, such that the transformed CHCs are satisfiable if and only if so are the original ones, and the transformed CHCs incorporate in each new query suitable information coming from the other ones so that the CHC satisfiability algorithm is able to exploit the relationships among all queries. We show that our proposed technique is effective on a non trivial benchmark of sets of CHCs that encode many verification problems for programs manipulating algebraic data types such as lists and trees.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
Experiments have been performed on an Intel Xeon CPU E5-2640 2.00 GHz with 64GB RAM under CentOS with a time limit of 300 s per problem.
References
Albert, E., Genaim, S., Gutiérrez, R., Martin-Martin, E.: A transformational approach to resource analysis with typed-norms inference. Theory Pract. Log. Program. 20(3), 310–357 (2020). https://doi.org/10.1017/S1471068419000401
Barrett, C.W., Sebastiani, R., Seshia, S.A., Tinelli, C.: Satisfiability modulo theories. In: Handbook of Satisfiability, Frontiers in Artificial Intelligence and Applications, vol. 185, pp. 825–885. IOS Press (2009). https://doi.org/10.3233/978-1-58603-929-5-825
Bjørner, N., Gurfinkel, A., McMillan, K., Rybalchenko, A.: Horn clause solvers for program verification. In: Beklemishev, L.D., Blass, A., Dershowitz, N., Finkbeiner, B., Schulte, W. (eds.) Fields of Logic and Computation II. LNCS, vol. 9300, pp. 24–51. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-23534-9_2
Blicha, M., Fedyukovich, G., Hyvärinen, A.E.J., Sharygina, N.: Transition power abstractions for deep counterexample detection. In: TACAS 2022. LNCS, vol. 13243, pp. 524–542. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-99524-9_29
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
Bruynooghe, M., Codish, M., Gallagher, J.P., Genaim, S., Vanhoof, W.: Termination analysis of logic programs through combination of type-based norms. ACM Trans. Program. Lang. Syst. 29(2), 10-es (2007). https://doi.org/10.1145/1216374.1216378
De Angelis, E., Fioravanti, F., Gallagher, J.P., Hermenegildo, M.V., Pettorossi, A., Proietti, M.: Analysis and transformation of constrained Horn clauses for program verification. Theory Pract. Log. Program. 22(6), 974–1042 (2022). https://doi.org/10.1017/S1471068421000211
De Angelis, E., Fioravanti, F., Pettorossi, A., Proietti, M.: VeriMAP: A tool for verifying programs through transformations. In: Ábrahám, E., Havelund, K. (eds.) TACAS 2014. LNCS, vol. 8413, pp. 568–574. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-642-54862-8_47
De Angelis, E., Govind, V.K.H.: CHC-COMP 2022: Competition report. In: Proceedings 9th Workshop on Horn Clauses for Verification and Synthesis and 10th International Workshop on Verification and Program Transformation. EPTCS, vol. 373, pp. 44–62. Open Publishing Association (2022). https://doi.org/10.4204/EPTCS.373.5
De Angelis, E., Proietti, M., Fioravanti, F., Pettorossi, A.: Multiple query satisfiability of constrained Horn clauses. In: ar**v, Computing Research Repository (2022). https://doi.org/10.48550/ARXIV.2211.15207
De Angelis, E., Proietti, M., Fioravanti, F., Pettorossi, A.: Verifying catamorphism-based contracts using constrained Horn clauses. Theory Pract. Log. Program. 22(4), 555–572 (2022). https://doi.org/10.1017/S1471068422000175
Fioravanti, F., Pettorossi, A., Proietti, M., Senni, V.: Generalization strategies for the verification of infinite state systems. Theory Pract. Log. Program. 13(2), 175–199 (2013). https://doi.org/10.1017/S1471068411000627
Govind, V.K.H., Shoham, S., Gurfinkel, A.: Solving constrained Horn clauses modulo algebraic data types and recursive functions. In: Proceedings of the ACM on Programming Languages, POPL 2022, vol. 6, pp. 1–29 (2022). https://doi.org/10.1145/3498722
Grebenshchikov, S., Lopes, N.P., Popeea, C., Rybalchenko, A.: Synthesizing software verifiers from proof rules. In: 33rd ACM SIGPLAN Conf. Programming Language Design and Implementation, PLDI 2012, pp. 405–416 (2012). https://doi.org/10.1145/2345156.2254112
Hermenegildo, M.V., Puebla, G., Bueno, F., López-García, P.: Integrated program debugging, verification, and optimization using abstract interpretation (and the Ciao system preprocessor). Sci. Comput. Program. 58(1–2), 115–140 (2005). https://doi.org/10.1016/j.scico.2005.02.006
Hinze, R., Wu, N., Gibbons, J.: Unifying structured recursion schemes. In: International Conference on Functional Programming, ICFP 2013, pp. 209–220. ACM (2013). https://doi.org/10.1145/2500365.2500578
Hojjat, H., Rümmer, P.: The ELDARICA Horn solver. In: Formal Methods in Computer Aided Design, FMCAD 2018, pp. 1–7. IEEE (2018). https://doi.org/10.23919/FMCAD.2018.8603013
Jaffar, J., Maher, M.: Constraint logic programming: a survey. J. Log. Program. 19(20), 503–581 (1994). https://doi.org/10.1016/0743-1066(94)90033-7
Komuravelli, A., Gurfinkel, A., Chaki, S.: SMT-based model checking for recursive programs. Formal Methods Syst. Des. 48(3), 175–205 (2016). https://doi.org/10.1007/s10703-016-0249-4
Kostyukov, Y., Mordvinov, D., Fedyukovich, G.: Beyond the elementary representations of program invariants over algebraic data types. In: Conference on Programming Language Design and Implementation, PLDI 2021, pp. 451–465. ACM (2021). https://doi.org/10.1145/3453483.3454055
Leuschel, M.: A framework for the integration of partial evaluation and abstract interpretation of logic programs. ACM Trans. Program. Lang. Syst. 26(3), 413–463 (2004). https://doi.org/10.1145/982158.982159
Meijer, E., Fokkinga, M., Paterson, R.: Functional programming with bananas, lenses, envelopes and barbed wire. In: Hughes, J. (ed.) FPCA 1991. LNCS, vol. 523, pp. 124–144. Springer, Heidelberg (1991). https://doi.org/10.1007/3540543961_7
Pham, T.-H., Gacek, A., Whalen, M.W.: Reasoning about algebraic data types with abstractions. J. Autom. Reason. 57(4), 281–318 (2016). https://doi.org/10.1007/s10817-016-9368-2
Suter, P., Dotta, M., Kuncak, V.: Decision procedures for algebraic data types with abstractions. In: Symposium on Principles of Programming Languages, POPL 2010, pp. 199–210. ACM (2010). https://doi.org/10.1145/1706299.1706325
Suter, P., Köksal, A.S., Kuncak, V.: Satisfiability modulo recursive programs. In: Yahav, E. (ed.) SAS 2011. LNCS, vol. 6887, pp. 298–315. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-23702-7_23
Unno, H., Torii, S., Sakamoto, H.: Automating induction for solving Horn clauses. In: Majumdar, R., Kunčak, V. (eds.) CAV 2017. LNCS, vol. 10427, pp. 571–591. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-63390-9_30
Yang, W., Fedyukovich, G., Gupta, A.: Lemma synthesis for automating induction over algebraic data types. In: Schiex, T., de Givry, S. (eds.) CP 2019. LNCS, vol. 11802, pp. 600–617. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-30048-7_35
Acknowledgement
The authors warmly thank the anonymous reviewers for their helpful comments and suggestions. The authors are members of the INdAM Research Group GNCS.
Author information
Authors and Affiliations
Corresponding authors
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
De Angelis, E., Fioravanti, F., Pettorossi, A., Proietti, M. (2023). Multiple Query Satisfiability of Constrained Horn Clauses. In: Hanus, M., Inclezan, D. (eds) Practical Aspects of Declarative Languages. PADL 2023. Lecture Notes in Computer Science, vol 13880. Springer, Cham. https://doi.org/10.1007/978-3-031-24841-2_9
Download citation
DOI: https://doi.org/10.1007/978-3-031-24841-2_9
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-24840-5
Online ISBN: 978-3-031-24841-2
eBook Packages: Computer ScienceComputer Science (R0)