Hostname: page-component-77f85d65b8-2tv5m Total loading time: 0 Render date: 2026-04-18T06:41:55.105Z Has data issue: false hasContentIssue false

Three improvements to the top-down solver

Published online by Cambridge University Press:  03 February 2022

Helmut Seidl*
Affiliation:
TU München, Garching, Germany
Ralf Vogler
Affiliation:
TU München, Garching, Germany
*
*Corresponding author. Email: seidl@in.tum.de
Rights & Permissions [Opens in a new window]

Abstract

The local solver TD is a generic fixpoint engine which explores a given system of equations on demand. It has been successfully applied to the interprocedural analysis of procedural languages. The solver TD gains efficiency by detecting dependencies between unknowns on the fly. This algorithm has been recently extended to deal with widening and narrowing as well. In particular, it has been equipped with an automatic detection of widening and narrowing points. That version, however, is only guaranteed to terminate under two conditions: only finitely many unknowns are encountered, and all right-hand sides are monotonic. While the first condition is unavoidable, the second limits the applicability of the solver. Another limitation is that the solver maintains the current abstract values of all encountered unknowns instead of a minimal set sufficient for performing the iteration. By consuming unnecessarily much space, interprocedural analyses may not succeed on seemingly small programs. In the present paper, we therefore extend the top-down solver TD in three ways. First, we indicate how the restriction to monotonic right-hand sides can be lifted without compromising termination. We then show how the solver can be tuned to store abstract values only when their preservation is inevitable. Finally, we also show how the solver can be extended to side-effecting equation systems. Right-hand sides of these may not only provide values for the corresponding left-hand side unknowns but at the same time produce contributions to other unknowns. This practical extension has successfully been used for a seamless combination of context-sensitive analyses (e.g., of local states) with flow-insensitive analyses (e.g., of globals).

Information

Type
Paper
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 (http://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), 2022. Published by Cambridge University Press
Figure 0

Figure 1. An example program with procedures.

Figure 1

Figure 2. The collecting semantics.

Figure 2

Figure 3. Performance of TDspaceτ+side vs. $\mathbf{TD}_{\mathbf{side}}$.

Figure 3

Table 1. Performance of $\mathbf{TD}_{\mathbf{side}}$ and TDspaceτ+side

Figure 4

Figure 4. Absolute run times of $\textbf{TD}_{\unicode{x29C4}}$ vs. $\mathbf{TD}_{\mathbf{side}}$.

Figure 5

Figure 5. Relative run times of $\mathbf{TD}_{\mathbf{side}}$ over $\textbf{TD}_{\unicode{x29C4}}$.