Results 1  10
of
23
Fast and Precise Regular Approximation of Logic Programs
, 1993
"... A practical procedure for computing a regular approximation of a logic program is given. Regular approximations are useful in a variety of tasks in debugging, program specialisation and compiletime optimisation. The algorithm shown here incorporates optimisations taken from deductive database fixpo ..."
Abstract

Cited by 105 (19 self)
 Add to MetaCart
(Show Context)
A practical procedure for computing a regular approximation of a logic program is given. Regular approximations are useful in a variety of tasks in debugging, program specialisation and compiletime optimisation. The algorithm shown here incorporates optimisations taken from deductive database fixpoint algorithms and efficient bottomup abstract interpretation techniques. Frameworks for defining regular approximations have been put forward in the past, but the emphasis has usually been on theoretical aspects. Our results contribute mainly to the development of effective analysis tools that can be applied to large programs. Precision of the approximation can be greatly improved by applying queryanswer transformations to a program and a goal, thus capturing some argument dependency information. A novel technique is to use transformations based on computation rules other than lefttoright to improve precision further. We give performance results for our procedure on a range of programs. 1
Formal Language, Grammar and SetConstraintBased Program Analysis by Abstract Interpretation
, 1995
"... Grammarbased program analysis à la Jones and Muchnick and setconstraintbased program analysis à la Aiken and Heintze are static analysis techniques that have traditionally been seen as quite different from abstractinterpretationbased analyses, in particular because of their apparent noniterati ..."
Abstract

Cited by 81 (10 self)
 Add to MetaCart
Grammarbased program analysis à la Jones and Muchnick and setconstraintbased program analysis à la Aiken and Heintze are static analysis techniques that have traditionally been seen as quite different from abstractinterpretationbased analyses, in particular because of their apparent noniterative nature. For example, on page 18 of N. Heintze thesis, it is alleged that ``The finitary nature of abstract interpretation implies that there is a fundamental limitation on the accuracy of this approach to program analysis. There are decidable kinds of analysis that cannot be computed using abstract interpretation (even with widening and narrowing). The setbased analysis considered in this thesis is one example''. On the contrary, we show that grammar and setconstraintbased program analyses are similar abstract interpretations with iterative fixpoint computation using either a widening or a finitary grammar/setconstraints transformer or even a finite domain for each particular program. The understanding of grammarbased and setconstraintbased program analysis as a particular instance of abstract interpretation of a semantics has several advantages. First, the approximation process is formalized and not only explained using examples. Second, a domain of abstract properties is exhibited which is of general scope. Third, these analyses can be easily combined with other abstractinterpretationbased analyses, in particular for the analysis of numerical values. Fourth, they can be generalized to very powerful attributedependent and contextdependent analyses. Finally, a few misunderstandings may be removed.
Controlling generalisation and polyvariance in partial deduction of normal logic programs
, 1996
"... In this paper, we further elaborate global control for partial deduction: For which atoms, among possibly innitely many, should partial deductions be produced, meanwhile guaranteeing correctness as well as termination, and providing ample opportunities for negrained polyvariance? Our solution is b ..."
Abstract

Cited by 60 (40 self)
 Add to MetaCart
(Show Context)
In this paper, we further elaborate global control for partial deduction: For which atoms, among possibly innitely many, should partial deductions be produced, meanwhile guaranteeing correctness as well as termination, and providing ample opportunities for negrained polyvariance? Our solution is based on two ingredients. First, we use the wellknown concept of a characteristic tree to guide abstraction (or generalisation) and polyvariance, and aim for producing one specialised procedure per characteristic tree generated. Previous work along this line failed to provide abstraction correctly dealing with characteristic trees. We show how this can be rectied in an elegant way. Secondly, we structure combinations of atoms and associated characteristic trees in global trees registering \causal " relationships among such pairs. This will allow us to spot looming nontermination and consequently perform proper generalisation in order to avert the danger, without having to impose a depth bound on characteristic trees. Leaving unspecied the specic local control one may wish to plug in, the resulting global control strategy enables partial deduction that always terminates in an elegant, non ad hoc way, while providing excellent specialisation as well as negrained (but reasonable) polyvariance.
Logic Program Specialisation: How To Be More Specific
 Proceedings of the International Symposium on Programming Languages, Implementations, Logics and Programs (PLILP'96), LNCS 1140
, 1996
"... Standard partial deduction suffers from several drawbacks when compared to topdown abstract interpretation schemes. Conjunctive partial deduction, an extension of standard partial deduction, remedies one of those, namely the lack of sideways information passing. But two other problems remain: the l ..."
Abstract

Cited by 38 (24 self)
 Add to MetaCart
Standard partial deduction suffers from several drawbacks when compared to topdown abstract interpretation schemes. Conjunctive partial deduction, an extension of standard partial deduction, remedies one of those, namely the lack of sideways information passing. But two other problems remain: the lack of successpropagation as well as the lack of inference of global successinformation. We illustrate these drawbacks and show how they can be remedied by combining conjunctive partial deduction with an abstract interpretation technique known as more specific program construction. We present a simple, as well as a more refined integration of these methods. Finally we illustrate the practical relevance of this approach for some advanced applications, like proving functionality or specialising certain metaprograms written in the ground representation, where it surpasses the precision of current abstract interpretation techniques. 1 Introduction The heart of any technique for partial deduc...
G.: Abstract Interpretation over NonDeterministic Finite Tree Automata for SetBased Analysis of Logic Programs
 In: Fourth International Symposium on Practical Aspects of Declarative Languages (PADL’02). LNCS (2002
"... Abstract. Setbased program analysis has many potential applications, including compiler optimisations, typechecking, debugging, verification and planning. One method of setbased analysis is to solve a set of set constraints derived directly from the program text. Another approach is based on abs ..."
Abstract

Cited by 31 (11 self)
 Add to MetaCart
(Show Context)
Abstract. Setbased program analysis has many potential applications, including compiler optimisations, typechecking, debugging, verification and planning. One method of setbased analysis is to solve a set of set constraints derived directly from the program text. Another approach is based on abstract interpretation (with widening) over an infiniteheight domain of regular types. Up till now only deterministic types have been used in abstract interpretations, whereas solving set constraints yields nondeterministic types, which are more precise. It was pointed out by Cousot and Cousot that set constraint analysis of a particular program P could be understood as an abstract interpretation over a finite domain of regular tree grammars, constructed from P. In this paper we define such an abstract interpretation for logic programs, formulated over a domain of nondeterministic finite tree automata, and describe its implementation. Both goaldependent and goalindependent analysis are considered. Variations on the abstract domains operations are introduced, and we discuss the associated tradeoffs of precision and complexity. The experimental results indicate that this approach is a practical way of achieving the precision of setconstraints in the abstract interpretation framework. 1
Regular Approximation of Computation Paths in Logic and Functional Languages
, 1996
"... . The aim of this work is to compute descriptions of successful computation paths in logic or functional program executions. Computation paths are represented as terms, built from special constructor symbols, each constructor symbol corresponding to a specific clause or equation in a program. Such t ..."
Abstract

Cited by 23 (6 self)
 Add to MetaCart
. The aim of this work is to compute descriptions of successful computation paths in logic or functional program executions. Computation paths are represented as terms, built from special constructor symbols, each constructor symbol corresponding to a specific clause or equation in a program. Such terms, called traceterms, are abstractions of computation trees, which capture information about the control flow of the program. A method of approximating traceterms is described, based on wellestablished methods for computing regular approximations of terms. The special function symbols are first introduced into programs as extra arguments in predicates or functions. Then a regular approximation of the program is computed, describing the terms occurring in some set of program executions. The approximation of the extra arguments (the traceterms) can then be examined to see what computation paths were followed during the computation. This information can then be used to control both offl...
Solving Classes of Set Constraints with Tree Automata
 Proceedings of the Third International Conference on Principles and Practice of Constraint Programming  CP97, volume 1330 of LNCS
, 1997
"... . Set constraints is a suitable formalism for static analysis of programs. However, it is known that the complexity of set constraint problems in the most general cases is very high (NEXPTIMEcompleteness of the satisfiability test). Lots of works are involved in finding more tractable subclasses. I ..."
Abstract

Cited by 22 (2 self)
 Add to MetaCart
(Show Context)
. Set constraints is a suitable formalism for static analysis of programs. However, it is known that the complexity of set constraint problems in the most general cases is very high (NEXPTIMEcompleteness of the satisfiability test). Lots of works are involved in finding more tractable subclasses. In this paper, we investigate two classes of set constraints shown to be useful for program analysis: the first one is an extension of definite set constraints including the main feature of quantified set expressions. We will show that the satisfiability problem for this class is EXPTIME complete. The second one concerns constraints of the form X ` exp, where exp is built with function symbols, the intersection and union connectives and projection operators. The dual aspects of those two classes allows to find a common approach for solving both of them. This approach uses as basic tool tree automata, which are suitable both for computation and representing the solution of those solving prob...
Partial Deduction of the Ground Representation and its Application to Integrity Checking
 Proceedings of ILPS'95, the International Logic Programming Symposium
, 1995
"... Integrity constraints are very useful in many contexts, such as, for example, deductive databases, abductive and inductive logic programming. However, fully testing the integrity constraints after each update or modification can be very expensive and methods have been developed which simplify the in ..."
Abstract

Cited by 19 (12 self)
 Add to MetaCart
(Show Context)
Integrity constraints are very useful in many contexts, such as, for example, deductive databases, abductive and inductive logic programming. However, fully testing the integrity constraints after each update or modification can be very expensive and methods have been developed which simplify the integrity constraints. In this paper, we pursue the goal of writing this simplification procedure as a metaprogram in logic programming and then using partial deduction to obtain precompiled integrity checks for certain update patterns. We argue that the ground representation has to be used to write this metaprogram declaratively. We however also show that, contrary to what one might expect, current partial deduction techniques are then unable to specialise this metainterpreter in an interesting way and no precompilation of integrity checks can be obtained. In fact, we show that partial deduction (alone) is not able to perform any (sophisticated) specialisation at the objectlevel for meta...
Directional Type Inference for Logic Programs
, 1998
"... . We follow the setbased approach to directional types proposed by Aiken and Lakshman [1]. Their type checking algorithm works via set constraint solving and is sound and complete for given discriminative types. We characterize directional types in modeltheoretic terms. We present an algorithm ..."
Abstract

Cited by 16 (6 self)
 Add to MetaCart
. We follow the setbased approach to directional types proposed by Aiken and Lakshman [1]. Their type checking algorithm works via set constraint solving and is sound and complete for given discriminative types. We characterize directional types in modeltheoretic terms. We present an algorithm for inferring directional types. The directional type that we derive from a logic program P is uniformly at least as precise as any discriminative directional type of P, i.e., any directional type out of the class for which the type checking algorithm of Aiken and Lakshman is sound and complete. We improve their algorithm as well as their lower bound and thereby settle the complexity (DEXPTIMEcomplete) of the corresponding problem. 1 Introduction Directional types form a type system for logic programs which is based on the view of a predicate as a directional procedure which, when applied to a tuple of input terms, generates a tuple of output terms. There is a rich literature on ty...
Inclusion Constraints over Nonempty Sets of Trees
, 1997
"... We present a new constraint system called INES. Its constraints are conjunctions of inclusions t1 `t2 between firstorder terms (without set operators) which are interpreted over nonempty sets of trees. The existing systems of set constraints can express INES constraints only if they include ne ..."
Abstract

Cited by 14 (5 self)
 Add to MetaCart
We present a new constraint system called INES. Its constraints are conjunctions of inclusions t1 `t2 between firstorder terms (without set operators) which are interpreted over nonempty sets of trees. The existing systems of set constraints can express INES constraints only if they include negation. Their satisfiability problem is NEXPTIMEcomplete. We present an incremental algorithm that solves the satisfiability problem of INES constraints in cubic time. We intend to apply INES constraints for type analysis for a concurrent constraint programming language.