Citation
Stulova, Nataliia and Morales Caballero, José Francisco and Hermenegildo, Manuel V.
(2016).
Reducing the overhead of assertion run-time checks via static analysis.
In: "18th International Symposium on Principles and Practice of Declarative Programming (PPDP'16)", 05-07 Sep 2016, Edimburgo, Reino Unido. ISBN 978-1-4503-4148-6. pp. 90-103.
https://doi.org/10.1145/2967973.2968597.
Abstract
In order to aid in the process of detecting incorrect pro-
gram behaviors, a number of approaches have been proposed
which include a combination of language-level constructs
(such as procedure-level assertions/contracts, program-point
assertions, gradual types, etc.) and associated tools (such as
code analyzers and run-time verification frameworks). How-
ever, it is often the case that these constructs and tools are
not used to their full extent in practice due to a number
of limitations such as excessive run-time overhead and/or
limited expressiveness. Verification frameworks that com-
bine static and dynamic techniques offer the potential to
bridge this gap. In this paper we explore the effectiveness of
abstract interpretation in detecting parts of program speci-
fications that can be statically simplified to true or false, as
well as the impact of such analysis in reducing the cost of
the run-time checks required for the remaining parts of these
specifications. Starting with a semantics for programs with
assertion checking, and for assertion simplification based on
static analysis information, we propose and study a number
of practical assertion checking modes, each of which rep-
resents a trade-off between code annotation depth, execu-
tion time slowdown, and program safety. We also propose
techniques for taking advantage of the run-time checking se-
mantics to improve the precision of the analysis. Finally, we
study experimentally the performance of these techniques.
Our experiments illustrate the benefits and costs of each of
the assertion checking modes proposed as well as the benefit
of analysis for these scenario.