Hostname: page-component-74656f9884-c52kr Total loading time: 0 Render date: 2026-11-08T19:58:22.829Z Has data issue: false hasContentIssue false

Practical run-time checking via unobtrusive property caching

Published online by Cambridge University Press:  03 September 2015

NATALIIA STULOVA
Affiliation:
IMDEA Software Institute, (e-mail: nataliia.stulova@imdea.org, josef.morales@imdea.org, manuel.hermenegildo@imdea.org)
JOSÉ F. MORALES
Affiliation:
IMDEA Software Institute, (e-mail: nataliia.stulova@imdea.org, josef.morales@imdea.org, manuel.hermenegildo@imdea.org)
MANUEL V. HERMENEGILDO
Affiliation:
IMDEA Software Institute, (e-mail: nataliia.stulova@imdea.org, josef.morales@imdea.org, manuel.hermenegildo@imdea.org) School of Computer Science, Technical University of Madrid (UPM) (e-mail: manuel.hermenegildo@upm.es)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

The use of annotations, referred to as assertions or contracts, to describe program properties for which run-time tests are to be generated, has become frequent in dynamic programing languages. However, the frameworks proposed to support such run-time testing generally incur high time and/or space overheads over standard program execution. We present an approach for reducing this overhead that is based on the use of memoization to cache intermediate results of check evaluation, avoiding repeated checking of previously verified properties. Compared to approaches that reduce checking frequency, our proposal has the advantage of being exhaustive (i.e., all tests are checked at all points) while still being much more efficient than standard run-time checking. Compared to the limited previous work on memoization, it performs the task without requiring modifications to data structure representation or checking code. While the approach is general and system-independent, we present it for concreteness in the context of the Ciao run-time checking framework, which allows us to provide an operational semantics with checks and caching. We also report on a prototype implementation and provide some experimental results that support that using a relatively small cache leads to significant decreases in run-time checking overhead.

Information

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2015 
Supplementary material: PDF

Stulova supplementary material

Online Appendix

Download Stulova supplementary material(PDF)
PDF 2.8 MB