Skip to main content
Top
Published in: Automatic Control and Computer Sciences 7/2020

01-12-2020

The Complex Approach of the C-lightVer System to the Automated Error Localization in C-Programs

Authors: D. A. Kondratyev, A. V. Promsky

Published in: Automatic Control and Computer Sciences | Issue 7/2020

Login to get access

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract—

The C-lightVer system for the deductive verification of C-programs is developed at the A.P. Ershov Institute of Informatics Systems of the Siberian Branch of the Russian Academy of Sciences. The C-light input language is translated into the intermediate C-kernel language based on the two-level architecture of the system. The C-kernel program and Hoare logic for the C-kernel are the input of the metagenerator. The definite iteration approach is used to solve the well-known problem of defining loop invariants. The body of a definite iteration loop is executed once for each element of the finite dimensional data structure, and the inference rule for them uses the replacement operation rep, which represents the action of the loop in a symbolic form. Also, the method of semantic labeling of verification conditions is implemented and extended in our metagenerator. This makes it possible to generate explanations for unproven conditions and simplifies error localization. Finally, if the ACL2 system fails to prove a verification condition, it is possible to focus on proving that it is false. Previously, we developed a method for checking the falsity of verification conditions for the ACL2 system. The need for more detailed explanations of the verification conditions containing the replacement operation rep has led to changes in the algorithms for generating the replacement operation, extracting semantic labels, and generating explanations for unproven verification conditions. The article presents modifications of these algorithms. These modifications make it possible to mark the source code of the rep function with semantic labels, extract semantic labels from the rep definition, and generate a description of the break statement execution condition.
Literature
1.
go back to reference De Angelis, E., Fioravanti, F., Pettorossi, A., and Proietti, M., Lemma generation for Horn clause satisfiability: A preliminary study, Electron. Proc. Theor. Comput. Sci., 2019, vol. 299, pp. 4–18.CrossRef De Angelis, E., Fioravanti, F., Pettorossi, A., and Proietti, M., Lemma generation for Horn clause satisfiability: A preliminary study, Electron. Proc. Theor. Comput. Sci., 2019, vol. 299, pp. 4–18.CrossRef
2.
go back to reference Apt, K.R. and Olderog, E.-R., Fifty years of Hoare’s logic, Formal Aspects Comput., 2019, vol. 31, no. 6, pp. 751–807.MathSciNetCrossRef Apt, K.R. and Olderog, E.-R., Fifty years of Hoare’s logic, Formal Aspects Comput., 2019, vol. 31, no. 6, pp. 751–807.MathSciNetCrossRef
3.
go back to reference Blanchard, A., Loulergue, F., and Kosmatov, N., Towards full proof automation in Frama-C using auto-active verification, Lect. Notes Comput. Sci., 2019, vol. 11460, pp. 88–105.CrossRef Blanchard, A., Loulergue, F., and Kosmatov, N., Towards full proof automation in Frama-C using auto-active verification, Lect. Notes Comput. Sci., 2019, vol. 11460, pp. 88–105.CrossRef
4.
go back to reference De Carvalho, D., et al., Teaching programming and design-by-contract, ICL 2018, 2019, pp. 68–76. De Carvalho, D., et al., Teaching programming and design-by-contract, ICL 2018, 2019, pp. 68–76.
5.
go back to reference Denney, E. and Fischer, B., Explaining verification conditions, AMAST 2008; Lect. Notes Comput. Sci., 2008, vol. 5140, pp. 145–159.CrossRef Denney, E. and Fischer, B., Explaining verification conditions, AMAST 2008; Lect. Notes Comput. Sci., 2008, vol. 5140, pp. 145–159.CrossRef
6.
go back to reference Efremov, D., Mandrykin, M., and Khoroshilov, A., Deductive verification of unmodified Linux kernel library functions, ISoLA 2018; Lect. Notes Comput. Sci., 2018, vol. 11245, pp. 216–234.CrossRef Efremov, D., Mandrykin, M., and Khoroshilov, A., Deductive verification of unmodified Linux kernel library functions, ISoLA 2018; Lect. Notes Comput. Sci., 2018, vol. 11245, pp. 216–234.CrossRef
7.
8.
go back to reference Galeotti, J.P., Furia, C.A., May, E., Fraser, G., and Zeller, A., Inferring loop invariants by mutation, dynamic analysis, and static checking, IEEE Trans. Software Eng., 2015, vol. 41, no. 10, pp. 1019–1037.CrossRef Galeotti, J.P., Furia, C.A., May, E., Fraser, G., and Zeller, A., Inferring loop invariants by mutation, dynamic analysis, and static checking, IEEE Trans. Software Eng., 2015, vol. 41, no. 10, pp. 1019–1037.CrossRef
9.
go back to reference Hähnle, R. and Huisman, M., Deductive software verification: From pen-and-paper proofs to industrial tools, Lect. Notes Comput. Sci., 2019, vol. 10000, pp. 345–373.CrossRef Hähnle, R. and Huisman, M., Deductive software verification: From pen-and-paper proofs to industrial tools, Lect. Notes Comput. Sci., 2019, vol. 10000, pp. 345–373.CrossRef
10.
go back to reference Heras, J., Komendantskaya, E., Johansson, M., and Maclean, E., Proof-pattern recognition and lemma discovery in ACL2, LPAR 2013; Lect. Notes Comput. Sci., 2013, vol. 8312, pp. 389–406.CrossRef Heras, J., Komendantskaya, E., Johansson, M., and Maclean, E., Proof-pattern recognition and lemma discovery in ACL2, LPAR 2013; Lect. Notes Comput. Sci., 2013, vol. 8312, pp. 389–406.CrossRef
11.
go back to reference Johansson, M., Lemma discovery for induction, Lect. Notes Comput. Sci., 2019, vol. 11617, pp. 125–139.CrossRef Johansson, M., Lemma discovery for induction, Lect. Notes Comput. Sci., 2019, vol. 11617, pp. 125–139.CrossRef
13.
go back to reference Kondratyev, D.A., Automated error localization in C programs. https://www.bitbucket.org/Kondratyev/verify-c-light. Kondratyev, D.A., Automated error localization in C programs. https://​www.​bitbucket.​org/​Kondratyev/​verify-c-light.​
14.
go back to reference Kondratyev, D.A., Implementing the symbolic method of verification in the C-light project, Lect. Notes Comput. Sci., 2018, vol. 10742, pp. 227–240.CrossRef Kondratyev, D.A., Implementing the symbolic method of verification in the C-light project, Lect. Notes Comput. Sci., 2018, vol. 10742, pp. 227–240.CrossRef
15.
go back to reference Kondratyev, D.A., Maryasov, I.V., and Nepomniaschy, V.A., The automation of C program verification by the symbolic method of loop invariant elimination, Model. Anal. Inf. Sist., 2018, vol. 25, no. 5, pp. 491–505.MathSciNetCrossRef Kondratyev, D.A., Maryasov, I.V., and Nepomniaschy, V.A., The automation of C program verification by the symbolic method of loop invariant elimination, Model. Anal. Inf. Sist., 2018, vol. 25, no. 5, pp. 491–505.MathSciNetCrossRef
16.
go back to reference Kondratyev, D.A. and Promsky, A.V., Developing a self-applicable verification system. Theory and practice, Autom. Control Comput. Sci., 2015, vol. 49, no. 7, pp. 445–452.CrossRef Kondratyev, D.A. and Promsky, A.V., Developing a self-applicable verification system. Theory and practice, Autom. Control Comput. Sci., 2015, vol. 49, no. 7, pp. 445–452.CrossRef
17.
go back to reference Kondratyev, D.A. and Promsky, A.V., Towards automated error localization in C programs with loops, Syst. Inf., 2019, no. 14, pp. 31–44. Kondratyev, D.A. and Promsky, A.V., Towards automated error localization in C programs with loops, Syst. Inf., 2019, no. 14, pp. 31–44.
18.
go back to reference Kondratyev, D. and Promsky, A., Proof strategy for automated Sisal program verification, TOOLS 2019; Lect. Notes Comput. Sci., 2019, vol. 11771, pp. 113–120.CrossRef Kondratyev, D. and Promsky, A., Proof strategy for automated Sisal program verification, TOOLS 2019; Lect. Notes Comput. Sci., 2019, vol. 11771, pp. 113–120.CrossRef
19.
go back to reference Könighofer, R., Toegl, R., and Bloem, R., Automatic error localization for software using deductive verification, Lect. Notes Comput. Sci., 2014, vol. 8855, pp. 92–98.CrossRef Könighofer, R., Toegl, R., and Bloem, R., Automatic error localization for software using deductive verification, Lect. Notes Comput. Sci., 2014, vol. 8855, pp. 92–98.CrossRef
20.
go back to reference Kovács, L., Symbolic computation and automated reasoning for program analysis, Lect. Notes Comput. Sci., 2016, vol. 9681, pp. 20–27.MathSciNetCrossRef Kovács, L., Symbolic computation and automated reasoning for program analysis, Lect. Notes Comput. Sci., 2016, vol. 9681, pp. 20–27.MathSciNetCrossRef
21.
go back to reference Leino, K.R.M., Millstein, T., and Saxe, J.B., Generating error traces from verification-condition counterexamples, Sci. Comput. Program., 2005, vol. 55, nos. 1–3, pp. 209–226.MathSciNetCrossRef Leino, K.R.M., Millstein, T., and Saxe, J.B., Generating error traces from verification-condition counterexamples, Sci. Comput. Program., 2005, vol. 55, nos. 1–3, pp. 209–226.MathSciNetCrossRef
22.
go back to reference Li, J., Sun, J., Li, L., Loc Le, Q., and Lin, S.-W., Automatic loop invariant generation and refinement through selective sampling, ASE 2017, 2017, pp. 782–792. Li, J., Sun, J., Li, L., Loc Le, Q., and Lin, S.-W., Automatic loop invariant generation and refinement through selective sampling, ASE 2017, 2017, pp. 782–792.
23.
go back to reference Lin, Y., Bundy, A., Grov, G., and Maclean, E., Automating Event-B invariant proofs by rippling and proof patching, Formal Aspects Comput., 2019, vol. 31, no. 1, pp. 95–129.MathSciNetCrossRef Lin, Y., Bundy, A., Grov, G., and Maclean, E., Automating Event-B invariant proofs by rippling and proof patching, Formal Aspects Comput., 2019, vol. 31, no. 1, pp. 95–129.MathSciNetCrossRef
24.
go back to reference Maryasov, I.V., Nepomniaschy, V.A., Promsky, A.V., and Kondratyev, D.A., Automatic C program verification based on mixed axiomatic semantics, Autom. Control Comput. Sci., 2014, vol. 48, no. 7, pp. 407–414.CrossRef Maryasov, I.V., Nepomniaschy, V.A., Promsky, A.V., and Kondratyev, D.A., Automatic C program verification based on mixed axiomatic semantics, Autom. Control Comput. Sci., 2014, vol. 48, no. 7, pp. 407–414.CrossRef
25.
go back to reference Moore, J.S., Milestones from the pure lisp theorem prover to ACL2, Formal Aspects Comput., 2019, vol. 31, no. 6, pp. 699–732.MathSciNetCrossRef Moore, J.S., Milestones from the pure lisp theorem prover to ACL2, Formal Aspects Comput., 2019, vol. 31, no. 6, pp. 699–732.MathSciNetCrossRef
26.
go back to reference Moriconi, M. and Schwarts, R.L., Automatic construction of verification condition generators from Hoare logics, Lect. Notes Comput. Sci., 1981, vol. 115, pp. 363–377.MathSciNetCrossRef Moriconi, M. and Schwarts, R.L., Automatic construction of verification condition generators from Hoare logics, Lect. Notes Comput. Sci., 1981, vol. 115, pp. 363–377.MathSciNetCrossRef
27.
go back to reference Nepomniaschy, V.A., Symbolic method of verification of definite iterations over altered data structures, Program. Comput. Software, 2005, vol. 31, no. 1, pp. 1–9.MathSciNetCrossRef Nepomniaschy, V.A., Symbolic method of verification of definite iterations over altered data structures, Program. Comput. Software, 2005, vol. 31, no. 1, pp. 1–9.MathSciNetCrossRef
28.
go back to reference Reger, G. and Voronkov, A., Induction in saturation-based proof search, Lect. Notes Comput. Sci., 2019, vol. 11716, pp. 477–494.MathSciNetCrossRef Reger, G. and Voronkov, A., Induction in saturation-based proof search, Lect. Notes Comput. Sci., 2019, vol. 11716, pp. 477–494.MathSciNetCrossRef
29.
go back to reference Srivastava, S., Gulwani, S., and Foster, J.S., Template-based program verification and program synthesis, Int. J. Software Tools Technol. Transfer, 2013, vol. 15, nos. 5–6, pp. 497–518.CrossRef Srivastava, S., Gulwani, S., and Foster, J.S., Template-based program verification and program synthesis, Int. J. Software Tools Technol. Transfer, 2013, vol. 15, nos. 5–6, pp. 497–518.CrossRef
30.
go back to reference Tuerk, T., Local reasoning about while-loops, VSTTE 2010, Workshop Proceedings, 2010, pp. 29–39. Tuerk, T., Local reasoning about while-loops, VSTTE 2010, Workshop Proceedings, 2010, pp. 29–39.
31.
go back to reference Volkov, G., Mandrykin, M., and Efremov, D., Lemma functions for Frama-C: C programs as proofs, 2018 Ivannikov ISP RAS Open Conference, 2018, pp. 31–38. Volkov, G., Mandrykin, M., and Efremov, D., Lemma functions for Frama-C: C programs as proofs, 2018 Ivannikov ISP RAS Open Conference, 2018, pp. 31–38.
32.
go back to reference Yang, W., Fedyukovich, G., and Gupta, A., Lemma synthesis for automating induction over algebraic data types, Lect. Notes Comput. Sci., 2019, vol. 11 802, pp. 600–617.CrossRef Yang, W., Fedyukovich, G., and Gupta, A., Lemma synthesis for automating induction over algebraic data types, Lect. Notes Comput. Sci., 2019, vol. 11 802, pp. 600–617.CrossRef
Metadata
Title
The Complex Approach of the C-lightVer System to the Automated Error Localization in C-Programs
Authors
D. A. Kondratyev
A. V. Promsky
Publication date
01-12-2020
Publisher
Pleiades Publishing
Published in
Automatic Control and Computer Sciences / Issue 7/2020
Print ISSN: 0146-4116
Electronic ISSN: 1558-108X
DOI
https://doi.org/10.3103/S0146411620070093

Other articles of this Issue 7/2020

Automatic Control and Computer Sciences 7/2020 Go to the issue