UTC Time, Formally Verified
Proceedings of the 13th ACM SIGPLAN International Conference on Certified Programs and Proofs (CPP ’24), January 15--16, 2024, London, UK, 2024
Abstract
FV Time is a small-scale verification project developed in the Coq proof assistant using the Mathematical Components libraries. It is a library for managing conversions between time formats (UTC and timestamps), as well as commonly used functions for time arithmetic. As a library for time conversions, its novelty is the implementation of leap seconds, which are part of the UTC standard but usually not implemented in existing libraries. Since the verified functions of FV Time are reasonably simple yet non-trivial, it nicely illustrates our methodology for verifying software with Coq. In this paper we present a description of the project, emphasizing the main problems faced while developing the library, as well as some general-purpose solutions that were produced as by-products and may be used in other verification projects. These include a refinement package between proof-oriented MathComp numbers and computation-oriented primitive numbers from the Coq standard library, as well as a set of tactics to automatically prove certain decidable statements over finite ranges through brute-force computation.
Keywords
Coq, MathComp, formal verification, automation, time, UTC
Citation
de Almeida Borges, A., González Bedmar, M., Conejero Rodríguez, J., Hermo Reyes, E., Casals Buñuel, J., & Joosten, J. J. (2024). UTC time, formally verified. Proceedings of the 13th ACM SIGPLAN International Conference on Certified Programs and Proofs (CPP ’24), January 15–16, 2024, London, UK (p. ). ACM. URL: https://arxiv.org/pdf/2209.14227, doi:10.1145/3636501.3636958
@InProceedings{AlmeidaBorges2024_UTCCoq,
author = "{de Almeida Borges}, Ana and {González Bedmar}, Mireia and {Conejero Rodríguez}, Juan and {Hermo Reyes}, Eduardo and {Casals Buñuel}, Joaquim and Joosten, Joost J.",
title = "{UTC} Time, Formally Verified",
booktitle = "Proceedings of the 13th ACM SIGPLAN International Conference on Certified Programs and Proofs (CPP ’24), January 15--16, 2024, London, UK",
pages = "",
series = "",
year = "2024",
volume = "",
publisher = "ACM",
address = "New York, NY, USA",
URL = "https://arxiv.org/pdf/2209.14227",
doi = "10.1145/3636501.3636958",
keywords = "Coq, MathComp, formal verification, automation, time, UTC",
abstract = "FV Time is a small-scale verification project developed in the Coq proof assistant using the Mathematical Components libraries. It is a library for managing conversions between time formats (UTC and timestamps), as well as commonly used functions for time arithmetic. As a library for time conversions, its novelty is the implementation of leap seconds, which are part of the UTC standard but usually not implemented in existing libraries. Since the verified functions of FV Time are reasonably simple yet non-trivial, it nicely illustrates our methodology for verifying software with Coq. In this paper we present a description of the project, emphasizing the main problems faced while developing the library, as well as some general-purpose solutions that were produced as by-products and may be used in other verification projects. These include a refinement package between proof-oriented MathComp numbers and computation-oriented primitive numbers from the Coq standard library, as well as a set of tactics to automatically prove certain decidable statements over finite ranges through brute-force computation."
}