Table of Contents
Fetching ...

Optimal matching for sharing and linearity analysis

Gianluca Amato, Francesca Scozzari

TL;DR

The paper tackles the problem of deriving optimal abstract matching operators for sharing and linearity in static analysis of logic programs. It extends the ${ShLin^{\omega}}$ framework to goal-dependent analysis and proves an optimal matching operator for ${ShLin^{\omega}}$, from which optimal operators for ${ShLin^2}$ and ${Sharing\times Lin}$ are derived. The results ensure maximal precision in backward unification via matching and provide practical optimization techniques for real analyzers. Overall, the work enhances precision and efficiency of goal-driven analyses in logic programming and informs the design of combined sharing/linearity domains.

Abstract

Static analysis of logic programs by abstract interpretation requires designing abstract operators which mimic the concrete ones, such as unification, renaming and projection. In the case of goal-driven analysis, where goal-dependent semantics are used, we also need a backward-unification operator, typically implemented through matching. In this paper we study the problem of deriving optimal abstract matching operators for sharing and linearity properties. We provide an optimal operator for matching in the domain ${\mathtt{ShLin}^ω}$, which can be easily instantiated to derive optimal operators for the domains ${\mathtt{ShLin}^{2}}$ by Andy King and the reduced product $\mathtt{Sharing} \times \mathtt{Lin}$.

Optimal matching for sharing and linearity analysis

TL;DR

The paper tackles the problem of deriving optimal abstract matching operators for sharing and linearity in static analysis of logic programs. It extends the framework to goal-dependent analysis and proves an optimal matching operator for , from which optimal operators for and are derived. The results ensure maximal precision in backward unification via matching and provide practical optimization techniques for real analyzers. Overall, the work enhances precision and efficiency of goal-driven analyses in logic programming and informs the design of combined sharing/linearity domains.

Abstract

Static analysis of logic programs by abstract interpretation requires designing abstract operators which mimic the concrete ones, such as unification, renaming and projection. In the case of goal-driven analysis, where goal-dependent semantics are used, we also need a backward-unification operator, typically implemented through matching. In this paper we study the problem of deriving optimal abstract matching operators for sharing and linearity properties. We provide an optimal operator for matching in the domain , which can be easily instantiated to derive optimal operators for the domains by Andy King and the reduced product .

Paper Structure

This paper contains 22 sections, 7 theorems, 61 equations, 1 figure.

Key Result

Theorem 3.7

$\mathsf{match}_\mathrm{\omega}$ is correct w.r.t. $\mathsf{match}$.

Figures (1)

  • Figure 1: The role of forward and backward unification in goal-dependent analysis.

Theorems & Definitions (31)

  • Definition 2.1: Matching
  • Example 2.2
  • Definition 3.1: ${\mathtt{ShLin}^{\omega}}$
  • Example 3.2
  • Example 3.3
  • Definition 3.4: Matching over ${\mathtt{ShLin}^{\omega}}$
  • Example 3.5
  • Example 3.6
  • Theorem 3.7: Correctness of $\mathsf{match}_\mathrm{\omega}$
  • proof
  • ...and 21 more