Skip to main content

Abstract Interpretation of Recursive Logic Definitions for Efficient Runtime Assertion Checking

  • Conference paper
  • First Online:
Tests and Proofs (TAP 2023)

Abstract

Runtime Assertion Checking (RAC) is a lightweight formal method for verifying at runtime code properties written in a formal specification language. One of the main challenge of RAC is to check the properties efficiently, while emitting sound verdicts. In particular, arithmetic properties are only efficiently verified using machine integers, yet soundness can only be achieved by using an exact but slower exact arithmetic library. This paper presents how E-ACSL, a RAC tool for C programs, applies abstract interpretation for efficiently and soundly supporting arithmetic properties. Abstract interpretation provides sound static information regarding the size of terms involved in runtime assertions in order to choose at compile time whether machine integers or exact arithmetic will be used at runtime on a case by case basis. Our specification language includes recursive user-defined logic functions and predicates, for which we rely on fast fixpoint operators based on widening of abstract values.

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

Notes

  1. 1.

    http://gmplib.org.

  2. 2.

    Source files and scripts of at https://thibautbenjamin.github.io/software/benchmarks-tap23.zip, the version of Frama-C/E-ACSL at https://thibautbenjamin.github.io/software/frama-c-tap23.zip.

  3. 3.

    https://github.com/sharkdp/hyperfine.

  4. 4.

    https://github.com/ocaml/Zarith/.

References

  1. Baudin, P., et al.: The dogged pursuit of bug-free C programs: the frama-C software analysis platform. Commun. ACM (2021)

    Google Scholar 

  2. Baudin, P., Filliâtre, J.C., Marché, C., Monate, B., Moy, Y., Prevosto, V.: ACSL: ANSI/ISO C Specification Language. Tech. rep., CEA List and Inria. https://frama-c.com/download/acsl.pdf

  3. Benjamin, T., Signoles, J.: Formalizing an efficient runtime assertion checker for an arithmetic language with functions and predicates. In: Symposium on Applied Computing (2023)

    Google Scholar 

  4. Bertot, Y., Castéran, P.: Interactive theorem proving and program development: Coq’Art: the calculus of inductive constructions. Springer Science & Business Media (2013)

    Google Scholar 

  5. Blazy, S., Bühler, D., Yakobowski, B.: Structuring abstract interpreters through state and value abstractions. In: International Conference on Verification, Model Checking, and Abstract Interpretation (VMCAI 2017) (2017)

    Google Scholar 

  6. Cheon, Y.: A runtime assertion checker for the Java Modeling Language. Ph.D. thesis, Iowa State University (2003)

    Google Scholar 

  7. Clarke, L.A., Rosenblum, D.S.: A historical perspective on runtime assertion checking in software development. SIGSOFT Softw. Eng. Notes (2006)

    Google Scholar 

  8. Cousot, P.: Principles of Abstract Interpretation. MIT Press (2022)

    Google Scholar 

  9. Delahaye, M., Kosmatov, N., Signoles, J.: Common specification language for static and dynamic analysis of C programs. In: Symposium on Applied Computing (SAC) (2013)

    Google Scholar 

  10. Falcone, Y., Havelund, K., Reger, G.: A tutorial on runtime verification. In: Engineering Dependable Software Systems (2013)

    Google Scholar 

  11. Filliâtre, J.C., Pascutto, C.: Ortac: runtime assertion checking for OCaml (tool paper). In: International Conference on Runtime Verification (RV) (2021)

    Google Scholar 

  12. Filliâtre, J.C., Pascutto, C.: Optimizing prestate copies in runtime verification of function postconditions. In: International Conference on Runtime Verification (RV) (2022)

    Google Scholar 

  13. Kosmatov, N., Maurica, F., Signoles, J.: Efficient runtime assertion checking for properties over mathematical numbers. In: International Conference on Runtime Verification (RV) (2020)

    Google Scholar 

  14. Leavens, G.T., Baker, A.L., Ruby, C.: JML: A Notation for Detailed Design (1999)

    Google Scholar 

  15. Lehner, H.: A Formal Definition of JML in Coq and its Application to Runtime Assertion Checking. Ph.D. thesis, ETH Zurich (2011)

    Google Scholar 

  16. Ly, D., Kosmatov, N., Loulergue, F., Signoles, J.: Verified runtime assertion checking for memory properties. In: International Conference on Tests and Proofs (TAP) (2020)

    Google Scholar 

  17. Ly, D., Kosmatov, N., Loulergue, F., Signoles, J.: Soundness of a dataflow analysis for memory monitoring. In: Workshop on Languages and Tools for Ensuring Cyber-Resilience in Critical Software-Intensive Systems (HILT) (2018)

    Google Scholar 

  18. Signoles, J.: The E-ACSL perspective on runtime assertion checking. In: International Workshop on Verification and mOnitoring at Runtime EXecution (VORTEX) (2021)

    Google Scholar 

  19. Signoles, J.: E-ACSL Version 1.18. Implementation in Frama-C Plug-in E-ACSL 26.1 (2022). http://frama-c.com/download/e-acsl/e-acsl-implementation.pdf

  20. Signoles, J., Kosmatov, N., Vorobyov, K.: E-ACSL, a runtime verification tool for safety and security of C programs tool paper. In: International Workshop on Competitions, Usability, Benchmarks, Evaluation, and Standardisation for Runtime Verification Tools (RV-CuBES) (2017)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Julien Signoles .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Benajmin, T., Signoles, J. (2023). Abstract Interpretation of Recursive Logic Definitions for Efficient Runtime Assertion Checking. In: Prevosto, V., Seceleanu, C. (eds) Tests and Proofs. TAP 2023. Lecture Notes in Computer Science, vol 14066. Springer, Cham. https://doi.org/10.1007/978-3-031-38828-6_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-38828-6_10

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-38827-9

  • Online ISBN: 978-3-031-38828-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics