Proving Properties of Sorting Programs: A Case Study in Horn Clause Verification
Emanuele De Angelis (DEC, University "G. d'Annunzio" of, Chieti-Pescara, Italy), Fabio Fioravanti (DEC, University "G. d'Annunzio" of, Chieti-Pescara, Italy), Alberto Pettorossi (DICII, University of Roma Tor, Vergata, Italy), Maurizio Proietti (CNR-IASI, Rome, Italy)

TL;DR
This paper explores Horn clause verification for sorting programs, demonstrating how transformation techniques and difference predicates can effectively verify correctness and arithmetic properties of various sorting algorithms using CHC solvers.
Contribution
It introduces a transformation approach to simplify verification of sorting programs by eliminating inductive data structures and employs difference predicates to facilitate property proofs.
Findings
Transformation technique effectively reduces CHCs to integer and boolean constraints.
Difference predicates assist in proving sorting correctness and arithmetic properties.
Verification success demonstrated on multiple sorting algorithms with CHC solvers.
Abstract
The proof of a program property can be reduced to the proof of satisfiability of a set of constrained Horn clauses (CHCs) which can be automatically generated from the program and the property. In this paper we have conducted a case study in Horn clause verification by considering several sorting programs with the aim of exploring the effectiveness of a transformation technique which allows us to eliminate inductive data structures such as lists or trees. If this technique is successful, we derive a set of CHCs with constraints over the integers and booleans only, and the satisfiability check can often be performed in an effective way by using state-of-the-art CHC solvers, such as Eldarica or Z3. In this case study we have also illustrated the usefulness of a companion technique based on the introduction of the so-called difference predicates, whose definitions correspond to lemmata…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Proving Properties of Sorting Programs:
A Case Study in Horn Clause Verification
Emanuele De Angelis DEC, University “G. d’Annunzio” of Chieti-Pescara
Viale Pindaro 42, 65127 Pescara, Italy
[email protected] DEC, University “G. d’Annunzio” of Chieti-Pescara
Viale Pindaro 42, 65127 Pescara, Italy
DICII, University of Roma Tor Vergata
Via del Politecnico 1, 00133 Roma, Italy
CNR-IASI
Via dei Taurini 19, 00185 Roma, Italy
Fabio Fioravanti DEC, University “G. d’Annunzio” of Chieti-Pescara
Viale Pindaro 42, 65127 Pescara, Italy
DICII, University of Roma Tor Vergata
Via del Politecnico 1, 00133 Roma, Italy
CNR-IASI
Via dei Taurini 19, 00185 Roma, Italy
Alberto Pettorossi
DICII, University of Roma Tor Vergata
Via del Politecnico 1, 00133 Roma, Italy
CNR-IASI
Via dei Taurini 19, 00185 Roma, Italy
Maurizio Proietti
CNR-IASI
Via dei Taurini 19, 00185 Roma, Italy
Abstract
1 Introduction
2 Verification of Linearly Recursive Sorting Algorithms
3 Verification of Non-Linearly Recursive Sorting Algorithms
4 Concluding Remarks
5 Acknowledgments
6 Appendix
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1]
- 2[2] N. Bjørner, A. Gurfinkel, K. L. Mc Millan & A. Rybalchenko (2015): Horn Clause Solvers for Program Verification . In L. D. Beklemishev, A. Blass, N. Dershowitz, B. Finkbeiner & W. Schulte, editors: Fields of Logic and Computation II - Essays Dedicated to Yuri Gurevich on the Occasion of His 75th Birthday , Lecture Notes in Computer Science 9300, Springer, pp. 24–51, 10.1007/978-3-319-23534-9_2 . · doi ↗
- 3[3] A. Bundy (2001): The Automation of Proof by Mathematical Induction . In A. Robinson & A. Voronkov, editors: Handbook of Automated Reasoning , I, North Holland, pp. 845–911, 10.1016/B 978-044450813-3/50015-1 . · doi ↗
- 4[4] E. De Angelis, F. Fioravanti, A. Pettorossi & M. Proietti (2014): Program Verification via Iterated Specialization . Science of Computer Programming 95, Part 2, pp. 149–175, 10.1016/j.scico.2014.05.017 . Selected and extended papers from Partial Evaluation and Program Manipulation 2013. · doi ↗
- 5[5] E. De Angelis, F. Fioravanti, A. Pettorossi & M. Proietti (2014): Veri MAP: A Tool for Verifying Programs through Transformations . In: Proceedings of the 20th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, TACAS ’14 , Lecture Notes in Computer Science 8413, Springer, pp. 568–574, 10.1007/978-3-642-54862-847 . Available at: http://www.map.uniroma 2.it/Veri MAP . · doi ↗
- 6[6] E. De Angelis, F. Fioravanti, A. Pettorossi & M. Proietti (2015): Proving correctness of imperative programs by linearizing constrained Horn clauses . Theory and Practice of Logic Programming 15(4–5), pp. 635–650, 10.1017/S 1471068415000289 . · doi ↗
- 7[7] E. De Angelis, F. Fioravanti, A. Pettorossi & M. Proietti (2017): Semantics-based generation of verification conditions via program specialization . Science of Computer Programming 147, pp. 78–108, 10.1016/j.scico.2016.11.002 . Available at http://www.sciencedirect.com/science/article/pii/S 016764231630199 X . Selected and Extended papers from the International Symposium on Principles and Practice of Declarative Programming 2015. · doi ↗
- 8[8] E. De Angelis, F. Fioravanti, A. Pettorossi & M. Proietti (2018): Predicate Pairing for program verification . TPLP 18(2), pp. 126–166, 10.1017/S 1471068417000497 . · doi ↗
