Abstract
The generation and proving of verification conditions, which correspond to loops, may cause difficulties during deductive verification because the construction of required invariants is a challenge, especially for nested loops. The methods of invariant synthesis are often heuristic ones. Another way is the symbolic method of loop invariant elimination. Its idea is to represent a loop body in a form of special replacement operation under certain constraints. This operation expresses loop effect with possible break statement in a symbolic form and allows introducing an inference rule, which uses no invariants in axiomatic semantics. This work represents the further development of this method. The inner loops are interesting because of the higher nesting level, the more complicated loop invariant. A good example for this case to verify is a class of linear array sorting programs, which iteratively increase the sorted part. In this paper, we consider the insertion sort program. A special algorithm was developed and implemented to prove verification conditions automatically in ACL2. It generates automatically auxiliary lemmas, which allow to prove obtained verification conditions in ACL2 in automatic mode.
This research is partially supported by RFBR grant 17-01-00789.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Anureev, I.S., Maryasov, I.V., Nepomniaschy, V.A.: C-programs verification based on mixed axiomatic semantics. Autom. Control Comput. Sci. 45(7), 485–500 (2011)
Cohen, E., et al.: VCC: a practical system for verifying concurrent C. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) TPHOLs 2009. LNCS, vol. 5674, pp. 23–42. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-03359-9_2
Dongarra, J.J., van der Steen, A.J.: High-performance computing systems: status and outlook. Acta Numerica 21, 379–474 (2012)
Filliâtre, J.-C., Marché, C.: Multi-prover verification of C programs. In: Davies, J., Schulte, W., Barnett, M. (eds.) ICFEM 2004. LNCS, vol. 3308, pp. 15–29. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-30482-1_10
Galeotti, J.P., Furia, C.A., May, E., Fraser, G., Zeller, A.: Inferring loop invariants by mutation, dynamic analysis, and static checking. IEEE Trans. Softw. Eng. 41(10), 1019–1037 (2015)
Johansson, M.: Lemma discovery for induction. In: Kaliszyk, C., Brady, E., Kohlhase, A., Sacerdoti Coen, C. (eds.) CICM 2019. LNCS (LNAI), vol. 11617, pp. 125–139. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-23250-4_9
Kondratyev, D.: Implementing the symbolic method of verification in the C-light project. In: Petrenko, A.K., Voronkov, A. (eds.) PSI 2017. LNCS, vol. 10742, pp. 227–240. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-74313-4_17
Kondratyev, D.A., Maryasov, I.V., Nepomniaschy, V.A.: The automation of C program verification by symbolic method of loop invariants elimination. Autom. Control Comput. Sci. 53(7) (2019, to appear)
Kondratyev, D.A., Promsky, A.V.: Towards automated error localization in C programs with loops. Syst. Inform. 14, 31–44 (2019)
Kovács, L.: Symbolic computation and automated reasoning for program analysis. In: Ábrahám, E., Huisman, M. (eds.) IFM 2016. LNCS, vol. 9681, pp. 20–27. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-33693-0_2
Li, J., Sun, J., Li, L., Le, Q. L., Lin, S.-W.: Automatic loop invariant generation and refinement through selective sampling. In: Proceedings on ASE 2017, pp. 782–792. Conference Publishing Consulting, Passau (2017)
Maryasov, I.V., Nepomniaschy, V.A.: Loop invariants elimination for definite iterations over unchangeable data structures in C programs. Model. Anal. Inform. Syst. 22(6), 773–782 (2015)
Maryasov, I.V., Nepomniaschy, V.A., Kondratyev, D.A.: Invariant elimination of definite iterations over arrays in C programs verification. Model. Anal. Inf. Syst. 24(6), 743–754 (2017)
Maryasov, I.V., Nepomniaschy, V.A., Promsky, A.V., Kondratyev, D.A.: Automatic C program verification based on mixed axiomatic semantics. Autom. Control Comput. Sci. 48(7), 407–414 (2014)
Moore, J.S.: Milestones from the Pure Lisp theorem prover to ACL2. Formal Aspects of Computing, pp. 1–34 (2019)
Nepomniaschy, V.A.: Symbolic method of verification of definite iterations over altered data structures. Program. Comput. Softw. 31(1), 1–9 (2005)
Srivastava, S., Gulwani, S., Foster, J.S.: Template-based program verification and program synthesis. Int. J. Softw. Tools Technol. Transf. 15(5–6), 497–518 (2012)
Suzuki, N., Jefferson, D.: Verification decidability of Presburger array programs. J. ACM 27(1), 191–205 (1980)
Tuerk, T.: Local reasoning about while-loops. In: Theory Workshop Proceedings on VSTTE 2010, pp. 29–39. Heriot-Watt University, Edinburgh (2010)
Verification of Insertion Sorting Program. https://bitbucket.org/Kondratyev/sorting. Accessed 26 Apr 2019
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Kondratyev, D., Maryasov, I., Nepomniaschy, V. (2019). Towards Automatic Deductive Verification of C Programs over Linear Arrays. In: Bjørner, N., Virbitskaite, I., Voronkov, A. (eds) Perspectives of System Informatics. PSI 2019. Lecture Notes in Computer Science(), vol 11964. Springer, Cham. https://doi.org/10.1007/978-3-030-37487-7_20
Download citation
DOI: https://doi.org/10.1007/978-3-030-37487-7_20
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-37486-0
Online ISBN: 978-3-030-37487-7
eBook Packages: Computer ScienceComputer Science (R0)