Hostname: page-component-77f85d65b8-6bnxx Total loading time: 0 Render date: 2026-03-29T22:25:14.146Z Has data issue: false hasContentIssue false

Checkification: A Practical Approach for Testing Static Analysis Truths

Published online by Cambridge University Press:  22 July 2025

DANIELA FERREIRO
Affiliation:
Universidad Politécnica de Madrid (UPM), Madrid, Spain IMDEA Software Institute, Madrid, Spain (e-mails: d.ferreiro@alumnos.upm.es, ignacio.casso@imdea.org, josefrancisco.morales@upm.es)
IGNACIO CASSO
Affiliation:
Universidad Politécnica de Madrid (UPM), Madrid, Spain IMDEA Software Institute, Madrid, Spain (e-mails: d.ferreiro@alumnos.upm.es, ignacio.casso@imdea.org, josefrancisco.morales@upm.es)
JOSE F. MORALES
Affiliation:
Universidad Politécnica de Madrid (UPM), Madrid, Spain IMDEA Software Institute, Madrid, Spain (e-mails: d.ferreiro@alumnos.upm.es, ignacio.casso@imdea.org, josefrancisco.morales@upm.es)
PEDRO LÓPEZ-GARCÍA
Affiliation:
Spanish Council for Scientific Research (CSIC), Madrid, Spain IMDEA Software Institute, Madrid, Spain (e-mail: pedro.lopez@csic.es)
MANUEL V. HERMENEGILDO
Affiliation:
Universidad Politécnica de Madrid (UPM), Madrid, Spain IMDEA Software Institute, Madrid, Spain (e-mail: manuel.hermenegildo@upm.es)
Rights & Permissions [Opens in a new window]

Abstract

Static analysis is an essential component of many modern software development tools. Unfortunately, the ever-increasing complexity of static analyzers makes their coding error-prone. Even analysis tools based on rigorous mathematical techniques, such as abstract interpretation, are not immune to bugs. Ensuring the correctness and reliability of software analyzers is critical if they are to be inserted in production compilers and development environments. While compiler validation has seen notable success, formal validation of static analysis tools remains relatively unexplored. In this paper we present checkification, a simple, automatic method for testing static analyzers. Broadly, it consists in checking, over a suite of benchmarks, that the properties inferred statically are satisfied dynamically. The main advantage of our approach lies in its simplicity, which stems directly from framing it within the Ciao assertion-based validation framework, and its blended static/dynamic assertion checking approach. We demonstrate that in this setting, the analysis can be tested with little effort by combining the following components already present in the framework: 1) the static analyzer, which outputs its results as the original program source with assertions interspersed; 2) the assertion run-time checking mechanism, which instruments a program to ensure that no assertion is violated at run time; 3) the random test case generator, which generates random test cases satisfying the properties present in assertion preconditions; and 4) the unit-test framework, which executes those test cases. We have applied our approach to the CiaoPP static analyzer, resulting in the identification of many bugs with reasonable overhead. Most of these bugs have been either fixed or confirmed, helping us detect a range of errors not only related to analysis soundness but also within other aspects of the framework.

Information

Type
Original Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2025. Published by Cambridge University Press
Figure 0

Table 1. Abstract domains

Figure 1

Fig. 1. The Ciao assertion framework (CiaoPP’s verification/testing architecture).

Figure 2

Fig. 2. An incorrect simple mode analysis.

Figure 3

Fig. 3. The instrumented program.

Figure 4

Algorithm 1 The “Checkification” Analysis Testing Algorithm

Figure 5

Table 2. Benchmarks

Figure 6

Table 3. Timings and errors detected (1)

Figure 7

Table 4. Timings and errors detected (2)

Figure 8

Table 5. Timings and errors detected (3)

Figure 9

Table 6. Timings and errors detected (4)

Figure 10

Table 7. Details of defects found. The root causes of bugs (Class) again include: (I) abstract domain implementation; (II) fixpoint algorithms; (III) semantic inconsistencies; (IV) run-time check instrumentation; (V) third-party libraries