Correctness, Precision and Efficiency in the Sharing Analysis of Real Logic Languages

Abstract

For programming languages based on logic,
a knowledge of variable sharing is important;
for instance, for their automatic parallelization and
for many optimizations of the unification procedure,
such as occurs-check reduction.
Because of its usefulness,
a considerable amount of research has been done
on the design and development of techniques for
the static analysis of variable sharing.
Despite this fact, some of the most important issues
related to the specification and implementation
of a practical sharing analysis tool,
such as the correctness, the precision and the efficiency of the analysis,
have lacked satisfactory solutions.
The thesis reports on our work in rectifying this situation
and, thereby, enhancing the state-of-the-art on sharing analysis.
Our contributions include:
a correctness proof for the set-sharing domain of Jacobs and Langen
that does not depend on the presence of the occurs-check
in the concrete unification procedure;
the definition of the simpler abstraction of set-sharing
that is guaranteed to achieve the same precision
on both variable independence and groundness;
the specification, on this new domain,
of an abstract unification operator having polynomial complexity,
as opposed to the exponential complexity
of the abstract unification operator defined on set-sharing;
the generalization of all the above results to
a combined abstract domain including set-sharing,
freeness and linearity information;
an extensive experimental evaluation,
including both the validation of the above results
as well as the implementation and comparison
of many other recent proposals
for more precise sharing analysis domains;
and the specification of a new representation for set-sharing which,
by allowing for the definition of a family of widening operators,
solves all the scalability problems of the analysis,
while having a negligible impact on its precision.