Skip to main content

Towards Automatic Deductive Verification of C Programs over Linear Arrays

  • Conference paper
  • First Online:
Perspectives of System Informatics (PSI 2019)

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.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. 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)

    Article  Google Scholar 

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

    Chapter  Google Scholar 

  3. Dongarra, J.J., van der Steen, A.J.: High-performance computing systems: status and outlook. Acta Numerica 21, 379–474 (2012)

    Article  MathSciNet  Google Scholar 

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

    Chapter  Google Scholar 

  5. 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)

    Article  Google Scholar 

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

    Chapter  Google Scholar 

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

    Chapter  Google Scholar 

  8. 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)

    Google Scholar 

  9. Kondratyev, D.A., Promsky, A.V.: Towards automated error localization in C programs with loops. Syst. Inform. 14, 31–44 (2019)

    Google Scholar 

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

    Chapter  Google Scholar 

  11. 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)

    Google Scholar 

  12. 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)

    Article  MathSciNet  Google Scholar 

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

    Article  MathSciNet  Google Scholar 

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

    Article  Google Scholar 

  15. Moore, J.S.: Milestones from the Pure Lisp theorem prover to ACL2. Formal Aspects of Computing, pp. 1–34 (2019)

    Article  MathSciNet  Google Scholar 

  16. Nepomniaschy, V.A.: Symbolic method of verification of definite iterations over altered data structures. Program. Comput. Softw. 31(1), 1–9 (2005)

    Article  MathSciNet  Google Scholar 

  17. 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)

    Google Scholar 

  18. Suzuki, N., Jefferson, D.: Verification decidability of Presburger array programs. J. ACM 27(1), 191–205 (1980)

    Article  MathSciNet  Google Scholar 

  19. Tuerk, T.: Local reasoning about while-loops. In: Theory Workshop Proceedings on VSTTE 2010, pp. 29–39. Heriot-Watt University, Edinburgh (2010)

    Google Scholar 

  20. Verification of Insertion Sorting Program. https://bitbucket.org/Kondratyev/sorting. Accessed 26 Apr 2019

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Dmitry Kondratyev .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics