Optimizing Prestate Copies in Runtime Verification of Function Postconditions

Jean Christophe Filliâtre, Clément Pascutto

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

In behavioural specifications of imperative languages, postconditions may refer to the prestate of the function, usually with an old operator. Therefore, code performing runtime verification has to record prestate values required to evaluate the postconditions, typically by copying part of the memory state, which causes severe verification overhead, both in memory and CPU time. In this paper, we consider the problem of efficiently capturing prestates in the context of Ortac, a runtime assertion checking tool for OCaml. Our contribution is a postcondition transformation that reduces the subset of the prestate to copy. We formalize this transformation, and we provide proof that it is sound and improves the performance of the instrumented programs. We illustrate the benefits of this approach with a maze generator. Our benchmarks show that unoptimized instrumentation is not practicable, while our transformation restores performances similar to the program without any runtime check.

Original languageEnglish
Title of host publicationRuntime Verification - 22nd International Conference, RV 2022, Proceedings
EditorsThao Dang, Volker Stolz
PublisherSpringer Science and Business Media Deutschland GmbH
Pages85-104
Number of pages20
ISBN (Print)9783031171956
DOIs
Publication statusPublished - 1 Jan 2022
Externally publishedYes
Event22nd International Conference on Runtime Verification, RV 2022 - Tbilsi, Georgia
Duration: 28 Sept 202230 Sept 2022

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume13498 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference22nd International Conference on Runtime Verification, RV 2022
Country/TerritoryGeorgia
CityTbilsi
Period28/09/2230/09/22

Keywords

  • Memory management
  • OCaml
  • Optimized code generation
  • Runtime assertion checking

Fingerprint

Dive into the research topics of 'Optimizing Prestate Copies in Runtime Verification of Function Postconditions'. Together they form a unique fingerprint.

Cite this