Skip to main content
Log in

The Automation of C Program Verification by the Symbolic Method of Loop Invariant Elimination

  • Published:
Automatic Control and Computer Sciences Aims and scope Submit manuscript

Abstract

In the deductive verification of programs written in the imperative programming languages, the generation and proving of the verification conditions corresponding to loops are of particular complexity, as each of them must be provided with an invariant, whose construction is often a challenge. As a rule, the methods for the synthesis of loop invariants have a heuristic character, which complicates their application. An alternative is the symbolic loop invariant elimination method proposed by V.A. Nepomniaschy in 2005. Its idea is to represent a loop body in the form of a special replacement operation under certain constraints. Such an operation in the symbolic form expresses the loop effect, which allows introducing an inference rule for the loops without invariants into axiomatic semantics. This work is the further development of this method. It extends the proposed method of mixed axiomatic semantics for the verification of C-light programs. This extension incorporates the method for the verification of iterations over changeable arrays with the possible exit from the loop body in C-light programs. The method contains the inference rule for iterations without loop invariants. This rule has been implemented in the verification condition generator, which is a part of the automated system for the verification of C-light programs. To perform automated verification in the used ACL2 system, two algorithms, one of which generates the replacement operation in the ACL2 language, and the second generates the auxiliary lemmas resulting in the successful automated proof of the obtained verification conditions in the ACL2 system have been developed and implemented. The application of the above mentioned methods and algorithms is illustrated with an example.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

REFERENCES

  1. Anureev, I.S., Maryasov, I.V., and Nepomniaschy, V.A., C-programs verification based on mixed axiomatic semantics, Autom. Control Comput. Sci., 2011, vol. 45, no. 7, pp. 485–500.

    Article  Google Scholar 

  2. Cohen, E., Dahlweid, M., Hillebrand, M., Leinenbach, D., Moskal, M., Santen, T., Schulte, W., and Tobies, S., VCC: A practical system for verifying concurrent C, 22nd Int. Conf. TPHOLs; Lect. Notes Comput. Sci., 2009, vol. 5674, pp. 23–42.

  3. Dongarra, J.J. and van der Steen, A.J., High-performance computing systems: Status and outlook, Acta Numer., 2012, vol. 21, pp. 379–474.

    Article  MathSciNet  Google Scholar 

  4. Filliâtre, J.-C. and Marché, C., Multi-prover verification of C programs, 6th ICFEM,Lect. Notes Comput. Sci., 2004, vol. 3308, pp. 15–29.

    Article  Google Scholar 

  5. Jacobs, B., Kiniry, J.L., and Warnier, M., Java program verification challenges, FMCO 2002; Lect. Notes Comput. Sci., 2003, vol. 2852, pp. 202–219.

    Article  Google Scholar 

  6. Kaufmann, M. and Moore, J.S., An industrial strength theorem prover for a logic based on common Lisp, IEEE Trans. Software Eng., 1997, vol. 23, no. 4, pp. 203–213.

    Article  Google Scholar 

  7. Kondratyev, D., Implementing the symbolic method of verification in the C-Light project, PSI 2017; Lect. Notes Comput. Sci., 2018, vol. 10742, pp. 227–240.

    Article  Google Scholar 

  8. Kondratyev, D.A., Towards loop invariant elimination for definite iterations over changeable data structures in C programs verification. Appendices. https://bitbucket.org/c-light/loop-invariant-elimination.

  9. Kondratyev, D.A., Maryasov, I.V., and Nepomniaschy, V.A., Towards loop invariant elimination for definite iterations over changeable data structures in C programs verification, PSSV 2018, Workshop Proceedings, Yaroslavl, 2018, pp. 51–57.

  10. Li, J., Sun, J., Li, L., Loc, Le Q., and Lin, S.-W., Automatic loop invariant generation and refinement through selective sampling, 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE), 2017, pp. 782–792.

  11. Maryasov, I.V. and Nepomniaschy, V.A., Loop invariants elimination for definite iterations over unchangeable data structures in C programs, Model. Anal. Inf. Syst., 2015, vol. 22, no. 6, pp. 773–782.

    Article  MathSciNet  Google Scholar 

  12. Maryasov, I.V., Nepomniaschy, V.A., and Kondratyev, D.A., Invariant elimination of definite iterations over arrays in C programs verification, Model. Anal. Inf. Syst., 2017, vol. 24, no. 6, pp. 743–754.

    Article  MathSciNet  Google Scholar 

  13. 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.

    Article  Google Scholar 

  14. 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.

    Article  MathSciNet  Google Scholar 

  15. Tuerk, T., Local reasoning about while-loops, VSTTE 2010, Workshop Proceedings, 2010, pp. 29–39.

Download references

Funding

The work of D.A. Kondratyev was supported in part by the Russian Foundation for Basic Research (grant no. 17-01-00789).

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to D. A. Kondratyev, I. V. Maryasov or V. A. Nepomniaschy.

Ethics declarations

The authors declare that they have no conflicts of interest.

Additional information

Translated by E. Glushachenkova

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Kondratyev, D.A., Maryasov, I.V. & Nepomniaschy, V.A. The Automation of C Program Verification by the Symbolic Method of Loop Invariant Elimination. Aut. Control Comp. Sci. 53, 653–662 (2019). https://doi.org/10.3103/S0146411619070101

Download citation

  • Received:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.3103/S0146411619070101

Keywords:

Navigation