On the interaction between sharing and linearity
Gianluca Amato, Francesca Scozzari · Theory and Practice of Logic Programming · 2009
Abstract In the analysis of logic programs, abstract domains for detecting sharing and linearity information are widely used. Devising abstract unification algorithms for such domains has proved to be rather hard. At the moment, the available algorithms are correct but not optimal; i.e., they cannot fully exploit the information conveyed by the abstract domains. In this paper, we define a new (infinite) domainShLinωwhich can be thought of as a general framework from which other domains can be easily derived by abstraction.ShLinωmakes the interaction between sharing and linearity explicit. We provide a constructive characterization of the optimal abstract unification operator onShLinω, and we lift it to two well-known abstractions ofShLinω, namely, to the classicalSharing×Linabstract domain and to the more preciseShLin2abstract domain by Andy King. In the case of single-binding substitutions, we obtain optimal abstract unification algorithms for such domains.