This paper describes an algebraic approach to the sharing analysis of logic programs based on an abstract domain of set logic programs. Set logic programs are logic programs in which the terms are sets of variables and uni cation is based on an associative, commutative, and idempotent equality theory. All of the basic operations required for sharing analyses, as well as their formal justi cation, are based on simple algebraic properties of set substitutions and set-based atoms. An ordering on set-based syntactic objects, similar to \less general" on concrete syntactic objects, is shown to re ect the notion of \less sharing" information. The (abstract) uni cation of a pair of set-based terms corresponds to nding their most general ACI1 uni er with respect to this ordering. The uni cation of a set of equations between set-based terms is de ned exactly as in the concrete case, by solving the equations one by one and repeatedly applying their solutions to the remaining equations. We demonstrate that all of the operations in a sharing analysis have natural de nitions which are both correct and optimal.
Codish et al. REF describe an algebraic approach to the sharing analysis of logic programs that is based on set logic programs.
An Algebraic Approach to Sharing Analysis of Logic Programs
Journal of Logic Programming
Mathematics Computer Science