Results 1  10
of
36
Compositional Analysis of Modular Logic Programs
 In Proc. Twentieth Annual ACM Symp. on Principles of Programming Languages
, 1993
"... This paper describes a semantic basis for a compositional approach to the analysis of logic programs. A logic program is viewed as consisting of a set of modules, each module defining a subset of the program's predicates. Analyses are constructed by considering abstract interpretations of a compo ..."
Abstract

Cited by 55 (10 self)
 Add to MetaCart
This paper describes a semantic basis for a compositional approach to the analysis of logic programs. A logic program is viewed as consisting of a set of modules, each module defining a subset of the program's predicates. Analyses are constructed by considering abstract interpretations of a compositional semantics. The abstract meaning of a module corresponds to its analysis and composition of abstract meanings corresponds to composition of analyses. Such an approach is essential for large program development so that altering one module does not require reanalysis of the entire program. A compositional analysis for ground dependencies is included to illustrate the approach. To the best of our knowledge this is the first account of a compositional framework for the analysis of (logic) programs. 1 Introduction It is widely acknowledged that as the size of a program increases, it becomes impractical to maintain it as a single monolithic structure. Instead, the program has to be...
A backward analysis for constraint logic programs. Theory and Practice of Logic Programming
"... One recurring problem in program development is that of understanding how to reuse code developed by a third party. In the context of (constraint) logic programming, part of this problem reduces to figuring out how to query a program. If the logic program does not come with any documentation, then ..."
Abstract

Cited by 26 (7 self)
 Add to MetaCart
One recurring problem in program development is that of understanding how to reuse code developed by a third party. In the context of (constraint) logic programming, part of this problem reduces to figuring out how to query a program. If the logic program does not come with any documentation, then the programmer is forced to either experiment with queries in an ad hoc fashion or trace the controlflow of the program (backward) to infer the modes in which a predicate must be called so as to avoid an instantiation error. This paper presents an abstract interpretation scheme that automates the latter technique. The analysis presented in this paper can infer moding properties which if satisfied by the initial query, come with the guarantee that the program and query can never generate any moding or instantiation errors. Other applications of the analysis are discussed. The paper explains how abstract domains with certain computational properties (they condense) can be used to trace controlflow backward (righttoleft) to infer useful properties of initial queries. A correctness argument is presented and an implementation is reported. 1
Efficient Goal Directed Bottomup Evaluation of Logic Programs
 Journal of Logic Programming
, 1998
"... This paper introduces a new strategy for the efficient goal directed bottomup evaluation of logic programs. Instead of combining a standard bottomup evaluation strategy with a Magicset transformation, the evaluation strategy is specialized for the application to Magicset programs which are charact ..."
Abstract

Cited by 20 (7 self)
 Add to MetaCart
This paper introduces a new strategy for the efficient goal directed bottomup evaluation of logic programs. Instead of combining a standard bottomup evaluation strategy with a Magicset transformation, the evaluation strategy is specialized for the application to Magicset programs which are characterized by clause bodies with a high degree of overlapping. The approach is similar to other techniques which avoid recomputation by maintaining and reusing partial solutions to clause bodies. However, the overhead is considerably reduced as these are maintained implicitly by the underlying Prolog implementation. The technique is presented as a simple metainterpreter for goal directed bottomup evaluation. No Magicset transformation is involved as the dependencies between calls and answers are expressed directly within the interpreter. The proposed technique has been implemented and shown to provide substantial speedups in applications of semantic based program analysis based on bottomup...
An Algebraic Approach to Sharing Analysis of Logic Programs
 Journal of Logic Programming
, 1997
"... 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 unification is based on an associative, commutative, and idempotent equality theo ..."
Abstract

Cited by 20 (7 self)
 Add to MetaCart
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 unification is based on an associative, commutative, and idempotent equality theory. All of the basic operations required for sharing analyses, as well as their formal justification, are based on simple algebraic properties of set substitutions and setbased atoms. An ordering on setbased syntactic objects, similar to "less general" on concrete syntactic objects, is shown to reflect the notion of "less sharing" information. The (abstract) unification of a pair of setbased terms corresponds to finding their most general ACI1 unifier with respect to this ordering. The unification of a set of equations between setbased terms is defined exactly as in the concrete case, by solving the equations one by one and repeatedly applying their solutions to the remaini...
On Proving Left Termination of Constraint Logic Programs
 ACM Transaction on Computational Logic
, 2001
"... The Constraint Logic Programming (CLP) Scheme merges logic programming with constraint solving over predefined domains. In this paper, we study proof methods for universal left termination of constraint logic programs. We provide a sound and complete characterization of left termination for ideal CL ..."
Abstract

Cited by 17 (7 self)
 Add to MetaCart
The Constraint Logic Programming (CLP) Scheme merges logic programming with constraint solving over predefined domains. In this paper, we study proof methods for universal left termination of constraint logic programs. We provide a sound and complete characterization of left termination for ideal CLP languages which generalizes acceptability of logic programs. The characterization is then refined to the notion of partial acceptability, which is wellsuited for automatic modular inference. We describe a theoretical framework for automation of the approach, which is implemented. For nonideal CLP languages and without any assumption on their incomplete constraint solvers, even the most basic sound termination criterion from logic programming does not lift. We focus on a specific system, namely CLP(R), by proposing some additional conditions that make (partial) acceptability sound
A Framework for Analysis of Typed Logic Programs
 IN PROCEEDINGS OF THE FIFTH INTERNATIONAL SYMPOSIUM ON FUNCTIONAL AND LOGIC PROGRAMMING, VOLUME 2024 OF LECTURE NOTES IN COMPUTER SCIENCE
, 2001
"... The paper presents a novel approach to the analysis of typed logic programs. We assume regular type descriptions of logic program variables provided by regular tree grammars. Types are used to identify components of terms which can be equated during the programs execution. This information is ..."
Abstract

Cited by 15 (5 self)
 Add to MetaCart
The paper presents a novel approach to the analysis of typed logic programs. We assume regular type descriptions of logic program variables provided by regular tree grammars. Types are used to identify components of terms which can be equated during the programs execution. This information is
Mode Analysis Domains for Typed Logic Programs
, 2000
"... . Precise mode information is important for compiler optimisations and in program development tools. Within the framework of abstract compilation, the precision of a mode analysis depends, in part, on the expressiveness of the abstract domain and its associated abstraction function. This paper consi ..."
Abstract

Cited by 15 (3 self)
 Add to MetaCart
. Precise mode information is important for compiler optimisations and in program development tools. Within the framework of abstract compilation, the precision of a mode analysis depends, in part, on the expressiveness of the abstract domain and its associated abstraction function. This paper considers abstract domains for polymorphically typed logic programs and shows how specialised domains may be constructed for each type in the program. These domains capture the degree of instantiation to a high level of precision. By providing a generic definition of abstract unication, the abstraction of a program using these domains is formalised. The domain construction procedure is fully implemented using the Godel language and tested on a number of example programs to demonstrate the viability of the approach. Note: Some proofs have been omitted for space reasons. They can be found in the full version of this paper [17]. 1 Introduction 1.1 Background Typed logic programming languages su...
SemanticsBased Program Analysis for LogicBased Languages Using XSB
, 1998
"... This article describes a simple and ecient way of using a logic programming language with builtin tabulation for general purpose semanticsbased program analysis. The simplicity of the method is based on a clear separation of abstraction and control: conceptually, a concrete program is executed ove ..."
Abstract

Cited by 12 (7 self)
 Add to MetaCart
This article describes a simple and ecient way of using a logic programming language with builtin tabulation for general purpose semanticsbased program analysis. The simplicity of the method is based on a clear separation of abstraction and control: conceptually, a concrete program is executed over an abstract domain and the tabulation mechanism avoids recomputation, ensures termination and collects the results of the analysis. The efficiency derives from the fact that an abstract interpreter induces an abstract compiler which maps input programs to corresponding abstract programs which are (compiled and) run in XSB [43]. The design of new analyses is an easy and fast process, because XSB is a general purpose logic programming system which supports efficient fixpoint computations through tabling implemented at the abstract machine level and comes off the shelf: in fact, due to its optimized control and superior tabling performance, our approach using XSB competitively compares with most of the existing special purpose abstract interpretation tools for logic programs. We demonstrate that our approach to using XSB for abstract interpretation supports the usual techniques and optimizations of other frameworks in a straightforward and flexible way.
An Experiment in Domain Refinement: Type Domains and Type Representations for Logic Programs
, 1998
"... We apply the methodology of domain renement to systematically derive domains for type analysis. Domains are built by iterative application of the Heyting completion operator to a given set of basic types. We give a condition on the type system which assures that two steps of iteration are sucien ..."
Abstract

Cited by 7 (3 self)
 Add to MetaCart
We apply the methodology of domain renement to systematically derive domains for type analysis. Domains are built by iterative application of the Heyting completion operator to a given set of basic types. We give a condition on the type system which assures that two steps of iteration are sucient to reach the xpoint. Moreover, we provide a general representation for type domains through transnite formulas. Finally, we show a subset of nite formulas which can be used as a computationally feasible implementation of the domains and we dene the corresponding abstract operators. Keywords: Abstract interpretation, abstract domain, static analysis, type analysis, logic programming. 1 Introduction Type analysis for untyped logic programs is useful both to the programmer (for debugging and verication) and to the compiler (for code optimization). This is the motivation of many dierent proposals for type analysis. It is hard to compare the various techniques in terms of precisio...
Generalising Def and Pos to Type Analysis
 Journal of Logic and Computation
, 2002
"... This paper is concerned with the type analysis of logic programs where, by type, we mean a property closed under instantiation. We de ne a chain of abstractions from Herbrand constraints to logical formulas via the set of their solutions. Every step of the chain is an instance of abstract interpret ..."
Abstract

Cited by 6 (0 self)
 Add to MetaCart
This paper is concerned with the type analysis of logic programs where, by type, we mean a property closed under instantiation. We de ne a chain of abstractions from Herbrand constraints to logical formulas via the set of their solutions. Every step of the chain is an instance of abstract interpretation. The use of logical formulas for type analysis is a generalisation of the traditional Boolean domains Def and Pos for groundness analysis. In this context, implication is the logical counterpart of the use of linear re nement. While logical formulas can sometime be used for an actual implementation of our domains, in the general case they are in nite objects. Therefore, we apply a nal abstraction from possibly in nite logical formulas to ( nite) logic programs. Thus, logic programs are themselves used for the type analysis of logic programs.