Hostname: page-component-76d6cb85b7-8p85h Total loading time: 0 Render date: 2026-07-17T02:39:12.040Z Has data issue: false hasContentIssue false

Experimental Evaluation of Optimal Abstract Operators for Sharing and Linearity Analysis

Published online by Cambridge University Press:  13 July 2026

GIANLUCA AMATO
Affiliation:
Laboratory of Computational Logic and Artificial Intelligence, “G. d’Annunzio” University of Chieti-Pescara, Italy, (e-mails: gianluca.amato@unich.it, francesca.scozzari@unich.it)
FRANCESCA SCOZZARI
Affiliation:
Laboratory of Computational Logic and Artificial Intelligence, “G. d’Annunzio” University of Chieti-Pescara, Italy, (e-mails: gianluca.amato@unich.it, francesca.scozzari@unich.it)
Rights & Permissions [Opens in a new window]

Abstract

In the field of static analysis of logic programs, the optimality of abstract operators is a valuable theoretical property, as it provides insight into the structure of abstract domains and the maximum precision that can be achieved. However, implementing optimal operators is often complex and may significantly impact performance, giving rise to a trade-off between precision and efficiency. We experimentally investigate this trade-off in the context of sharing and linearity analysis of logic programs. Our experiments build on previous work that proposed several optimal operators for unification and matching. We have implemented these abstract operators and the corresponding abstract domains within the PLAI analyzer, part of the CiaoPP preprocessor, and we report the impact of increasing operator precision on the accuracy and performance of the overall analysis.

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), 2026. Published by Cambridge University Press
Figure 0

Fig. 1. Flow of the analysis in PLAI.

Figure 1

Fig. 2. The definition of the match operator in ShLin, for [S1,L1,U1]$[S_1,L_1,U_1]$ and [S2,L2,U2]∈SHLIN$[S_2,L_2,U_2] \in \mathrm{S{\scriptstyle H}L{\scriptstyle IN}}$.

Figure 2

Table 1. Benchmark programs and corresponding size metrics. The column max vars is the maximum number of variables in a clause

Figure 3

Fig. 3. Critical programs, causing either a timeout or an out-of-memory condition (both Red X symbol).

Figure 4

Fig. 4. Analysis time for non-critical programs.

Figure 5

Table 2. Analysis time for all programs with the different abstract domains and configurations. OOM denotes an out-of-memory condition, while TO denotes a timeout

Figure 6

Fig. 5. Precision with respect to the sharing property.

Figure 7

Fig. 6. Precision with respect to the linearity property.

Figure 8

Table 3. Precision results for all analyzed programs and configurations. + indicates the use of optimal mgu, while (+) indicates identical results for standard and optimal mgu (which are therefore collapsed in a single column); M denotes the use of matching instead of mgu; ++ denotes the use of both optimal mgu and optimal matching. OOM denotes an out-of-memory condition, while TO denotes a timeoutTable 3 long description.