[Show abstract][Hide abstract] ABSTRACT: This paper focuses on one of the key steps in the design of semantic based analyses for logic programs — the definition of an abstract unification algorithm for a given notion of data description. We survey some of the major notions of data descriptions proposed in the context of mode and sharing analyses. We demonstrate how a careful and systematic analysis of the underlying concrete unification algorithm contributes to the design of the abstract algorithm. Several relevant properties of concrete substitutions which influence the design of abstract domains and algorithms are described. We make use of a novel representation called abstract equation systems to uniformly represent a a wide range of data descriptions for such analyses proposed in the literature.
[Show abstract][Hide abstract] ABSTRACT: Accurate sharing and freeness properties of program variables have been inferred in the past by means of combined dataflow analyses of logic programs. Groundness, linearity, and structural information must be taken into account in order to obtain sufficient precision. Abstract equation systems are one of the formalisms previously proposed to represent all these properties of the runtime values of program variables. The present work is concerned with the specification of correct and practical operations on the domain of abstract equation systems, which constitute a prerequisite for the domain to be suited for an implementation in the framework of abstract interpretation. The main technical contribution of the paper is the presentation of a novel and powerful algorithm for resolving an abstract equation system, the formal proof of its correctness, and a study of the invariance of certain linearity and freeness properties under the application of relevant most general unifiers. Keywords: Logic programming, abstract interpretation, mode analysis. 1
[Show abstract][Hide abstract] ABSTRACT: In this paper we consider static analyses based on abstract interpretation of logic programs over combined domains. It is known that analyses over combined domains potentially provide more information than obtainable by performing the independent abstract interpretations. However, the construction of a combined analysis often requires redefining the basic operations for the combined domain. We demonstrate for logic programs that in practice it is possible to obtain precision in a combined analysis without redefining the basic operations. We also propose a way of performing the combination which can be more precise than the straightforward application of the classical “reduced product” approach, while keeping the original components of the basic operations. The advantage of the approach is that proofs of correctness for the new domains are not required and implementations can be reused. We illustrate our results by showing that a combined sharing analysis—constructed from “old” proposals—compares well with other “new” proposals suggested in recent literature both from the point of view of efficiency and accuracy.
[Show abstract][Hide abstract] ABSTRACT: For the class of applicative programming languages, efficient methods for reclaiming the memory occupied by released data structures constitute an important aspect of current implementations. The present article addresses the problem of memory reuse for logic programs through program analysis rather than by run-time garbage collection. The aim is to derive run-time properties that can be used at compile time to specialize the target code for a program according to a given set of queries and to automatically introduce destructive assignments in a safe and transparent way so that fewer garbage cells are created.The dataflow analysis is constructed as an application of abstract interpretation for logic programs. An abstract domain for describing structure-sharing and liveness properties is developed as are primitive operations that guarantee a sound and terminating global analysis. We explain our motivation for the design of the abstract domain, make explicit the underlying implementation assumptions, and discuss the precision of the results obtained by a prototype analyzer.
[Show abstract][Hide abstract] ABSTRACT: The authors extend prior work in liveness analysis for logic programs. They develop an analysis for logic programs that allows compiler optimizations to reuse safely space allocated to data structures. The analysis is based on abstract interpretation and its main contribution consists of extending an abstract domain and operations for type and sharing analysis such that when applied to an abstract interpretation framework, the domain induces a powerful liveness analysis. Preliminary results obtained by an experimental prototype confirmed that useful and detailed information about the lifetime of term substructures can be derived.< >
CompEuro '92 . 'Computer Systems and Software Engineering',Proceedings.; 06/1992
[Show abstract][Hide abstract] ABSTRACT: One of the central problems in program analysis for compile-time garbage collection is detecting the sharing of term substructure that can occur during program execution. We present an abstract domain for representing possibly shared structures and an abstract unification operation based on this domain. When supplied to an abstract interpretation framework, this domain induces a powerful analysis of shared structures. We show that the analysis is sound by relating the abstract domain and operation to variants of the concrete domain and operation (substitutions with term unification) that are augmented with information about the term structures shared in actual implementations. We show these instrumented versions of the concrete domain and operation characterize the takes place in standard implementations. 22 refs., 3 figs.
[Show abstract][Hide abstract] ABSTRACT: . Recently, a technique was presented for using pre-interpretations for abstract interpretation of the correct answer set CP of a logic program P . So far it was an open problem whether pre-interpretations could also be used for deriving non-downward closed properties of the computed answer set OP such as definite freeness. This paper shows that it is possible to do so. 1 Introduction Cousot and Cousot [13, 14] have developed a widely applicable framework for abstract interpretation and obtained the following basic result: if an abstract operator ¯ A over an abstract domain Dom A of data descriptions fl-approximates a corresponding concrete operator ¯ C over a concrete domain Dom C of data elements, and both operators are monotonic functions, then the fixpoints of both operators are such that lfp(¯ A ) fl-approximates lfp(¯ C ). For logic programs, the concrete operator ¯ C can be a bottom-up semantic function or a top-down one. In both cases, the execution essentially...