Results 1  10
of
13
Offline specialisation in Prolog using a handwritten compiler generator
, 2004
"... The so called âcogen approachâ to program specialisation, writing a compiler generator instead of a specialiser, has been used with considerable success in partial evaluation of both functional and imperative languages. This paper demonstrates that this approach is also applicable to partial eva ..."
Abstract

Cited by 47 (23 self)
 Add to MetaCart
The so called âcogen approachâ to program specialisation, writing a compiler generator instead of a specialiser, has been used with considerable success in partial evaluation of both functional and imperative languages. This paper demonstrates that this approach is also applicable to partial evaluation of logic programming languages, also called partial deduction. Selfapplication has not been as much in focus in logic programming as for functional and imperative languages, and the attempts to selfapply partial deduction systems have, of yet, not been altogether that successful. So, especially for partial deduction, the cogen approach should prove to have a considerable importance when it comes to practical applications. This paper first develops a generic offline partial deduction technique for pure logic programs, notably supporting partially instantiated datastructures via binding types. From this a very efficient cogen is derived, which generates very efficient generating extensions (executing up to several orders of magnitude faster than current online systems) which in turn perform very good and nontrivial specialisation, even rivalling existing online systems. All this is supported by extensive benchmarks. Finally, it is shown how the cogen can be extended to directly support a large part of Prologâs declarative and nondeclarative features and how semionline specialisation can be efficiently integrated.
Termination Analysis with Types is More Accurate
 In ICLP 2003: Proceedings of the 19th International Conference on Logic Programming, C. Palamidessi, Ed. Lecture Notes in Computer Science
, 2003
"... In this paper we show how we can use size and groundness analyses lifted to regular and (polymorphic) Hindley/Milner typed programs to determine more accurate termination of (type correct) programs. ..."
Abstract

Cited by 17 (6 self)
 Add to MetaCart
(Show Context)
In this paper we show how we can use size and groundness analyses lifted to regular and (polymorphic) Hindley/Milner typed programs to determine more accurate termination of (type correct) programs.
Inference of Welltypings for Logic Programs with Application to Termination Analysis
, 2005
"... This paper develops a method to infer a polymorphic welltyping for a logic program. One of the main motivations is to contribute to a better automation of termination analysis in logic programs, by deriving types from which norms can automatically be constructed. Previous work on typebased termina ..."
Abstract

Cited by 15 (7 self)
 Add to MetaCart
(Show Context)
This paper develops a method to infer a polymorphic welltyping for a logic program. One of the main motivations is to contribute to a better automation of termination analysis in logic programs, by deriving types from which norms can automatically be constructed. Previous work on typebased termination analysis used either types declared by the user, or automatically generated monomorphic types describing the success set of predicates. Declared types are typically more precise and result in stronger termination conditions than those obtained with inferred types. Our type inference procedure involves solving set constraints generated from the program and derives a welltyping in contrast to a successset approximation. Experiments show that our automatically inferred welltypings are close to the declared types and thus result in termination conditions that are as good as those obtained with declared types for all our experiments to date. We describe the method, its implementation and experiments with termination analysis based on the inferred types.
Inference of Termination Conditions for Numerical Loops in Prolog
 Logic for Programming, Arti Intelligence, and Reasoning, 8th International Conference, Proceedings, volume 2250 of Lecture Notes in Computer Science
, 2001
"... Numerical computations form an essential part of almost any realworld program. Clearly, in order for a termination analyser to be of practical use it should contain a mechanism for inferring termination of such computations. However, this topic attracted less attention of the research community. In ..."
Abstract

Cited by 9 (6 self)
 Add to MetaCart
Numerical computations form an essential part of almost any realworld program. Clearly, in order for a termination analyser to be of practical use it should contain a mechanism for inferring termination of such computations. However, this topic attracted less attention of the research community. In this work we concentrate on automatic termination inference for logic programs depending on numerical computations. Dershowitz et al. [8] showed that termination of general numerical computations, for instance on floating point numbers, may be counterintuitive, i.e., the observed behaviour does not necessarily coincide with the theoretically expected one. Thus, we restrict ourselves to integer computations only. While discussing termination of integer computations the following question should be asked: what conditions on the queries should be assumed, such that the queries will terminate. We refer to this question as the termination inference...
Reuse of Results in Termination Analysis of Typed Logic Programs
 In Static Analysis, 9th International Symposium
, 2002
"... Recent works by the authors address the problem of automating the selection of a candidate norm for the purpose of termination analysis. These works illustrate a powerful technique in which a collection of simple typebased norms, one for each data type in the program, are combined together to provi ..."
Abstract

Cited by 8 (1 self)
 Add to MetaCart
(Show Context)
Recent works by the authors address the problem of automating the selection of a candidate norm for the purpose of termination analysis. These works illustrate a powerful technique in which a collection of simple typebased norms, one for each data type in the program, are combined together to provide the candidate norm. This paper extends these results by investigating type polymorphism. We show that by considering polymorphic types we reduce, without sacrificing precision, the number of typebased norms which should be combined to provide the candidate norm. Moreover, we show that when a generic polymorphic typed program component occurs in one or more specific type contexts, we need not reanalyse it. All of the information concerning its termination and its e ect on the termination of other predicates in that context can be derived directly from the context independent analysis of that component based on norms derived from the polymorphic types.
Offline narrowingdriven partial evaluation
, 2005
"... Narrowingdriven partial evaluation (NPE) is a powerful technique for the specialization of rewrite systems. Although it gives good results on small programs, it does not scale up well to realistic problems (e.g., interpreter specialization). In this work, we introduce a faster partial evaluation sc ..."
Abstract

Cited by 6 (5 self)
 Add to MetaCart
(Show Context)
Narrowingdriven partial evaluation (NPE) is a powerful technique for the specialization of rewrite systems. Although it gives good results on small programs, it does not scale up well to realistic problems (e.g., interpreter specialization). In this work, we introduce a faster partial evaluation scheme by ensuring the termination of the process offline. For this purpose, we first characterize a class of rewrite systems which are quasiterminating, i.e., the computations performed with needed narrowing (the symbolic computation mechanism of NPE) only contain finitely many different terms (and, thus, partial evaluation terminates). Since this class is quite restrictive, we introduce an annotation algorithm for a broader class of systems so that they behave like quasiterminating rewrite systems w.r.t. a proposed extension of needed narrowing.
Proving Termination With Adornments
 IN PROC. 14TH ICLP
, 1997
"... Proving termination is one of the most intriguing problems of program verification. Recently, the study of termination of numerical programs led to the emerging of the adorning technique. This approach is based on the idea of distinguishing between different subsets of values for variables, and d ..."
Abstract

Cited by 4 (1 self)
 Add to MetaCart
Proving termination is one of the most intriguing problems of program verification. Recently, the study of termination of numerical programs led to the emerging of the adorning technique. This approach is based on the idea of distinguishing between different subsets of values for variables, and deriving piecewise level mappings based on these subsets. In the current paper we generalise the technique and consider symbolical computations. Our experience suggests that such a generalisation will allow automated tools to verify termination of examples that remain at the moment beyond their abilities.
Termination of Logic Programs Using Various Dynamic Selection Rules
, 2004
"... We study termination of logic programs with dynamic scheduling, as it can be realised using delay declarations. Following previous work, our minimum assumption is that derivations are inputconsuming, a notion introduced to define dynamic scheduling in an abstract way. Since this minimum assumptio ..."
Abstract

Cited by 3 (1 self)
 Add to MetaCart
We study termination of logic programs with dynamic scheduling, as it can be realised using delay declarations. Following previous work, our minimum assumption is that derivations are inputconsuming, a notion introduced to define dynamic scheduling in an abstract way. Since this minimum assumption is sometimes insufficient to ensure termination, we consider here various additional assumptions on the permissible derivations. In one dimension, we consider derivations parametrised by any property that the selected atoms must have, e.g. being ground in the input positions. In another dimension, we consider both local and nonlocal derivations. In all cases, we give sufficient criteria for termination. The dimensions can be combined, yielding the most comprehensive approach so far to termination of logic programs with dynamic scheduling. For nonlocal derivations, the termination criterion is even necessary.
Inferring Polymorphic Types from Logic Programs
 Proc. of the Int’l Symposium on Logicbased Program Synthesis and Transformation (LOPSTR’04). Springer LNCS
, 2005
"... Abstract. This extended abstract sketches work in progress on how to infer polymorphic types from logic programs. Type information can contribute to a better automation of termination analysis. However, as sketched in the introduction, the monomorphic types describing the success set of predicates, ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
Abstract. This extended abstract sketches work in progress on how to infer polymorphic types from logic programs. Type information can contribute to a better automation of termination analysis. However, as sketched in the introduction, the monomorphic types describing the success set of predicates, as derived by current inference systems, result in weaker termination conditions than those obtainable with declared types. The analysis of a simple example indicates that the polymorphic types, as inferred in this paper, can contribute to stronger termination conditions. In the remainder of this extended abstract, a sketch is given of a procedure to perform polymorphic type inference. The starting point is a more general notion of type rule that also allows both types and type variables as options in the right hand side. 1
On Termination of MetaPrograms
 Tech. Rep. cs.PL/0110035, The Computing Research Repository (CoRR). Available
, 2001
"... The term metaprogramming... In this paper we aim to specify conditions on the metainterpreters that imply that termination of the object program with respect to some goal is improved or preserved. We start by identifying popular classes of metainterpreters, such as extended metainterpreters [7], ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
The term metaprogramming... In this paper we aim to specify conditions on the metainterpreters that imply that termination of the object program with respect to some goal is improved or preserved. We start by identifying popular classes of metainterpreters, such as extended metainterpreters [7], and then develop a methodology to prove the desired. Our approach is based on two observations. First, termination of logic programs can be proved via general termorderings, similar to those used to prove termination of termrewrite systems [9]. Second, if is an ordering such that termination of a metaprogram, obtained from "vanilla" and an object program P , with respect to a goal solve(G) can be proved via it, then termination of P with respect to G can be proved via >, where > is de ned as A > B if solve(A) solve(B). This is not necessary true for more practical applications of metainterpreters, such as debuggers, since they also are required to produce some additional output or to perform some additional tasks during the execution, such as constructing proof trees. These extensions can and usually will influence termination properties of the metainterpreter. However, for the specified classes of metainterpreters we can state conditions that imply a simple relation between an ordering proving termination of a metaprogram and an ordering proving termination of an object program. These conditions imply termination improvement or preservation