Results 1 - 10
of
31
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 52 (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 re-analysis 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...
Efficient Goal Directed Bottom-up 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 Magic-set transformation, the evaluation strategy is specialized for the application to Magic-set programs which are charact ..."
Abstract
-
Cited by 18 (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 Magic-set transformation, the evaluation strategy is specialized for the application to Magic-set programs which are characterized by clause bodies with a high degree of overlapping. The approach is similar to other techniques which avoid re-computation 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 meta-interpreter for goal directed bottom-up evaluation. No Magic-set 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 speed-ups in applications of semantic based program analysis based on bottom-up...
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 16 (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 well-suited for automatic modular inference. We describe a theoretical framework for automation of the approach, which is implemented. For non-ideal 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
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 16 (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 set-based atoms. An ordering on set-based 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 set-based terms corresponds to finding their most general ACI1 unifier with respect to this ordering. The unification of a set of equations between set-based terms is defined exactly as in the concrete case, by solving the equations one by one and repeatedly applying their solutions to the remaini...
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...
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 13 (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
Semantics-Based Program Analysis for Logic-Based Languages Using XSB
, 1998
"... This article describes a simple and ecient way of using a logic programming language with built-in tabulation for general purpose semantics-based 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 10 (6 self)
- Add to MetaCart
This article describes a simple and ecient way of using a logic programming language with built-in tabulation for general purpose semantics-based 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 fix-point 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...
Typed static analysis: Application to groundness analysis of Prolog and lambda-Prolog
- Journal of Functional and Logic Programming
, 1999
"... We enrich the domain Pos used for the static analysis of Prolog programs by combining it with types. We adopt the prescriptive view on typing, and we assume that programs are well-typed in an already existing type system. Typed static analysis of Typed Prolog programs gives access to more refined pr ..."
Abstract
-
Cited by 6 (1 self)
- Add to MetaCart
We enrich the domain Pos used for the static analysis of Prolog programs by combining it with types. We adopt the prescriptive view on typing, and we assume that programs are well-typed in an already existing type system. Typed static analysis of Typed Prolog programs gives access to more refined properties than untyped analysis because types give information on the inductive structure of terms that untyped static analysis does not discover. The increased refinement is not in variables assigned to true (e.g., variable recognized as bound to ground terms), but rather in variables not assigned to true; theycan be assigned a more informative value than false. For instance, the proposed analysis can show that a variable is bound to a nil-terminated list whose elements are not necessarily ground. We contend that this kind of property is sometimes more useful than groundness. Because 1 of constructors of compound types, e.g., list, the typed abstract domain can be infinite, but we show that if the so-called head-condition is satisfied by the analyzed program, then only a finite part of the domain is used. 1

