Negative Ternary Set-Sharing

The Set-Sharing domain has been widely used to infer at compile-time interesting properties of logic programs such as occurs-check reduction, automatic parallelization, and finite-tree analysis. However, performing abstract unification in this domain requires a closure operation that increases the number of sharing groups exponentially. Much attention has been given to mitigating this key inefficiency in this otherwise very useful domain. In this paper we present a novel approach to Set-Sharing: we define a new representation that leverages the complement (or negative) sharing relationships of the original sharing set, without loss of accuracy. Intuitively, given an abstract state $sh_{\mathcal{V}}$ over the finite set of variables of interest $\mathcal{V}$, its negative representation is $\wp(\mathcal{V}) \setminus sh_{\mathcal{V}}$. Using this encoding during analysis dramatically reduces the number of elements that need to be represented in the abstract states and during abstract unification as the cardinality of the original set grows toward $2^{|\mathcal{V}|}$. To further compress the number of elements, we express the set-sharing relationships through a set of ternary strings that compacts the representation by eliminating redundancies among the sharing sets. Our experiments show that our approach can compress the number of relationships, reducing significantly the memory usage and running time of all abstract operations, including abstract unification.

[1]  Harald Søndergaard,et al.  An Application of Abstract Interpretation of Logic Programs: Occur Check Reduction , 1986, ESOP.

[2]  Dean Jacobs,et al.  Static Analysis of Logic Programs for Independent And-Parallelism , 1992, J. Log. Program..

[3]  Kim Marriott,et al.  Boolean Functions for Dependency Analysis: Algebraic Properties and Efficient Representation , 1994, SAS.

[4]  Stephanie Forrest,et al.  A Relational Algebra for Negative Databases , 2007 .

[5]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[6]  Manuel V. Hermenegildo,et al.  Precise Set Sharing Analysis for Java-Style Programs , 2008, VMCAI.

[7]  D. Jacobs,et al.  Advanced techniques for approximating variable aliasing in logic programs , 1991 .

[8]  Jorge A. Navas,et al.  Efficient representations for set-sharing analysis , 2008 .

[9]  Roberto Bagnara,et al.  Finite-tree analysis for constraint logic-based languages , 2001, APPIA-GULP-PRODE.

[10]  Maurice Bruynooghe,et al.  Abstract Unification for a Composite Domain Deriving Sharing and Freeness Properties of Program Variables , 1994, ICLP Workshop: Verification and Analysis of Logic Languages.

[11]  Roberto Bagnara,et al.  Widening Sharing , 1999, APPIA-GULP-PRODE.

[12]  Christian Fecht,et al.  An Efficient and Precise Sharing Domain for Logic Programs , 1996, PLILP.

[13]  Manuel V. Hermenegildo,et al.  Effectiveness of Global Analysis in Strict Independence-Based Automatic Parallelization , 1994, ILPS.

[14]  Paul Helman,et al.  On-line Negative Databases , 2005, Int. J. Unconv. Comput..

[15]  Gilberto Filé,et al.  On the Design of a Correct Freeness Analysis for Logic Programs , 1995, J. Log. Program..

[16]  Roberto Bagnara,et al.  A correct, precise and efficient integration of set-sharing, freeness and linearity for the analysis of finite and rational tree languages , 2004, Theory and Practice of Logic Programming.

[17]  Maria Garcia de la Banda,et al.  Set-Sharing Is Not Always Redundant for Pair-Sharing , 2004, FLOPS.

[18]  Jorge A. Navas,et al.  Efficient Top-Down Set-Sharing Analysis Using Cliques , 2006, PADL.

[19]  Pieter H. Hartel,et al.  Programming Languages: Implementations, Logics, and Programs , 1996, Lecture Notes in Computer Science.

[20]  Michael Codish,et al.  An Algebraic Approach to Sharing Analysis of Logic Programs , 1997, SAS.

[21]  Andy King,et al.  Depth-k Sharing and Freeness , 1994, ICLP.

[22]  Peter J. Stuckey,et al.  Sharing and groundness dependencies in logic programs , 1999, TOPL.

[23]  Manuel V. Hermenegildo,et al.  Combined Determination of Sharing and Freeness of Program Variables through Abstract Interpretation , 1991, ICLP.

[24]  Xuan Li,et al.  Collapsing Closures , 2006, ICLP.

[25]  Shin-ichi Minato,et al.  Zero-Suppressed BDDs for Set Manipulation in Combinatorial Problems , 1993, 30th ACM/IEEE Design Automation Conference.

[26]  Xuan Li,et al.  Lazy Set-Sharing Analysis , 2006, FLOPS.

[27]  Randal E. Bryant,et al.  Symbolic Boolean manipulation with ordered binary-decision diagrams , 1992, CSUR.

[28]  M. R. Spiegel E and M , 1981 .

[29]  Maurice Bruynooghe,et al.  Improving abstract interpretations by combining domains , 1995, TOPL.

[30]  Leon Sterling On the Practicality of Abstract Equation Systems , 1995 .

[31]  Manuel V. Hermenegildo,et al.  Compile-Time Derivation of Variable Dependency Using Abstract Interpretation , 1992, J. Log. Program..

[32]  Kousha Etessami,et al.  Analysis of Recursive Game Graphs Using Data Flow Equations , 2004, VMCAI.

[33]  Krzysztof R. Apt,et al.  Logic Programming , 1990, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.