Results 1  10
of
16
A complexity tradeoff in rankingfunction termination proofs
 Acta Informatica
, 2009
"... To prove that a program terminates, we can employ a ranking function argument, where program states are ranked so that every transition decreases the rank. Alternatively, we can use a set of ranking functions with the property that every cycle in the program’s flowchart can be ranked with one of th ..."
Abstract

Cited by 12 (3 self)
 Add to MetaCart
(Show Context)
To prove that a program terminates, we can employ a ranking function argument, where program states are ranked so that every transition decreases the rank. Alternatively, we can use a set of ranking functions with the property that every cycle in the program’s flowchart can be ranked with one of the functions. This “local ” approach has gained interest recently on the grounds that local ranking functions would be simpler and easier to find. The current study is aimed at better understanding the tradeoffs involved, in a precise quantitative sense. We concentrate on a convenient setting, SizeChange Termination framework (SCT). In SCT, programs are replaced by an abstraction whose termination is decidable. Moreover, sufficient classes of ranking functions (both global and local) are known. Our results show a tradeoff: either exponentially many local functions of certain simple forms, or an exponentially complex global function may be required for proving termination.
QuasiTerminating Logic Programs for Ensuring the Termination of Partial Evaluation
 In Proc. of the ACM SIGPLAN 2007 Workshop on Partial Evaluation and Program Manipulation (PEPM’07
, 2007
"... Abstract. A logic program strongly quasiterminates when only a finite number of distinct atoms (modulo variable renaming) are derivable from any given query and computation rule. This notion of quasitermination, though stronger than related notions that only consider Prolog’s computation rule, is ..."
Abstract

Cited by 9 (5 self)
 Add to MetaCart
(Show Context)
Abstract. A logic program strongly quasiterminates when only a finite number of distinct atoms (modulo variable renaming) are derivable from any given query and computation rule. This notion of quasitermination, though stronger than related notions that only consider Prolog’s computation rule, is essential for ensuring the termination of partial evaluation, where liberal selection policies are often mandatory to achieve a good specialization. In this paper, we introduce sufficient conditions for the strong termination and quasitermination of logic programs which are based on the construction of sizechange graphs. The class of strongly quasiterminating logic programs, however, is too restricted. Therefore, we also introduce an annotation procedure that annotates those predicate arguments which are responsible of the nonquasitermination. As a consequence, the annotated program behaves like a quasiterminating program if annotated arguments are generalized (i.e., replaced by a fresh variable) when they occur in a computation. We illustrate the usefulness of our approach by designing a simple partial evaluator in which global termination is always ensured offline (i.e., statically). A prototype implementation demonstrates its viability. 1
SizeChange Termination and Transition Invariants
"... Abstract. Two directions of recent work on program termination use the concepts of sizechange termination resp. transition invariants. The difference in the setting has as consequence the inherent incomparability of the analysis and verification methods that result from this work. Yet, in order to ..."
Abstract

Cited by 9 (0 self)
 Add to MetaCart
Abstract. Two directions of recent work on program termination use the concepts of sizechange termination resp. transition invariants. The difference in the setting has as consequence the inherent incomparability of the analysis and verification methods that result from this work. Yet, in order to facilitate the crossover of ideas and techniques in further developments, it seems interesting to identify which aspects in the respective formal foundation are related. This paper presents initial results in this direction. 1
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.
TypeBased Homeomorphic Embedding and Its Applications to Online Partial Evaluation
"... Abstract. Homeomorphic Embedding (HEm) hasproventobevery powerful for supervising termination of computations, provided that such computations are performed over a finite signature, i.e., the number of constants and function symbols involved is finite. However, there are situations, for example nume ..."
Abstract

Cited by 4 (4 self)
 Add to MetaCart
(Show Context)
Abstract. Homeomorphic Embedding (HEm) hasproventobevery powerful for supervising termination of computations, provided that such computations are performed over a finite signature, i.e., the number of constants and function symbols involved is finite. However, there are situations, for example numeric computations, which involve an infinite (or too large) signature, in which HEm does not guarantee termination. Some extensions to HEm for the case of infinite signatures have been proposed which guarantee termination, but they either do not provide systematic means for generating such extensions or the extensions are too simplistic and do not produce the expected results in practice. We introduce Typebased Homeomorphic Embedding (TbHEm) asanextension of the standard, untyped HEm to deal with infinite signatures. In the paper, we show how TbHEm can be used to improve the accuracy of online partial evaluation. For this purpose, we propose an approach to constructing suitable types for partial evaluation automatically based on existing analysis tools for constraint logic programs. We also present useful properties of types which allow us to take full advantage of TbHEm in practice. Experimental results are reported which show that our work improves the state of the practice of online partial evaluation. 1
Towards Constructing Reusable Specialization Components
, 2007
"... Componentbased software development advocates the reuse of generic offtheshelf components to build complex and reliable applications. Unfortunately, the genericness of components results in degradation of system performance. Little progress has been made in promoting the specialization of a compo ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
Componentbased software development advocates the reuse of generic offtheshelf components to build complex and reliable applications. Unfortunately, the genericness of components results in degradation of system performance. Little progress has been made in promoting the specialization of a component independent of its use context. In this paper we propose a component specialization framework aiming at producing reusable specialization component which are adaptive to different specialization contexts. We advocate profitability declaration, a novel methodology to capture specialization opportunities independent of how components are deployed. This conceptual profitability declaration is translated into a profitability signature in the form of the bindingtime constraint. A profitable specialization component, PSC for short, is then developed, aiming to be deployed in various applications in place of the original generic component, as well as to be adaptive to different specialization contexts. In addition to the merit of reusability, PSC also achieves a reasonable balance between multiplicity of specialized codes and the space required for keeping them. We believe that our framework will promote the usage of program specialization in componentbased software development.
Preserving Sharing in the Partial Evaluation of Lazy Functional Programs ⋆
"... Abstract. The goal of partial evaluation is the specialization of programs w.r.t. part of their input data. Although this technique is already wellknown in the context of functional languages, current approaches are either overly restrictive or destroy sharing through the specialization process, wh ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
(Show Context)
Abstract. The goal of partial evaluation is the specialization of programs w.r.t. part of their input data. Although this technique is already wellknown in the context of functional languages, current approaches are either overly restrictive or destroy sharing through the specialization process, which is unacceptable from a performance point of view. In this work, we present the basis of a new partial evaluation scheme for firstorder lazy functional programs that preserves sharing through the specialization process and still allows the unfolding of arbitrary function calls. 1
I/O Optimisation and elimination via partial evaluation
, 2014
"... Computer programs commonly repeat work. Short programs go through the same initialisation sequence each time they are run, and longrunning servers may be given a sequence of similar or identical requests. In both cases, there is an opportunity to save time by reusing previously computed results; h ..."
Abstract
 Add to MetaCart
Computer programs commonly repeat work. Short programs go through the same initialisation sequence each time they are run, and longrunning servers may be given a sequence of similar or identical requests. In both cases, there is an opportunity to save time by reusing previously computed results; however, programmers often do not exploit that opportunity because to do so would cost development time and increase code complexity. Partial evaluation is a semiautomatic technique for specialising programs or parts thereof to perform better in particular circumstances, and can reduce repeated work by generating a program variant that is specialised for use in frequentlyoccurring circumstances. However, existing partial evaluators are limited in both their depth of analysis and their support for realworld programs, making them ineffective at specialising practical software. In this dissertation, I present a new, more accurate partial evaluation system that can specialise programs, written in lowlevel languages including C and C++, that interact with the operating system to read external data. It is capable of specialising programs that are challenging to analyse, including those which use arbitrarily deep pointer indirection, unsafe type casts, and multithreading. I use this partial evaluator to specialise programs with respect to files that they read from disk, or data they consume from the network, producing specialised variants that perform better when that external data is as expected, but which continue to function like the original program when it is not. To demonstrate the system’s practical utility, I evaluate the system specialising realworld software, and show that it can achieve significant runtime improvements with little manual assistance.
Towards Predicting the Effectiveness of Partial Evaluation
"... Recent approaches to partial evaluation—a wellknown technique for program specialization—include a so called sizechange analysis for ensuring the termination of the process. This paper presents a novel application of sizechange analysis for predicting the effectiveness of partial evaluation. Size ..."
Abstract
 Add to MetaCart
(Show Context)
Recent approaches to partial evaluation—a wellknown technique for program specialization—include a so called sizechange analysis for ensuring the termination of the process. This paper presents a novel application of sizechange analysis for predicting the effectiveness of partial evaluation. Sizechange analysis is based on computing an approximation of the program loops. Here, we present an automatic transformation that takes the output of the sizechange analysis and produces an approximation of the loops in the specialized program. This information can be used for determining—before performing the actual specialization process—when partial evaluation may produce a significant improvement and when it would be useless. An experimental evaluation demonstrates the usefulness of our approach.
Ranking Functions for SizeChange Termination CHIN SOON
"... This article explains how to construct a ranking function for any program that is proved terminating by sizechange analysis. The “principle of sizechange termination ” for a firstorder functional language with wellordered data is intuitive: A program terminates on all inputs, if every infinite ca ..."
Abstract
 Add to MetaCart
This article explains how to construct a ranking function for any program that is proved terminating by sizechange analysis. The “principle of sizechange termination ” for a firstorder functional language with wellordered data is intuitive: A program terminates on all inputs, if every infinite call sequence (following program control flow) would imply an infinite descent in some data values. Sizechange analysis is based on information associated with the subject program’s callsites. This information indicates, for each callsite, strict or weak data decreases observed as a computation traverses the callsite. The set DESC of callsite sequences for which the sizechanges imply infinite descent is ωregular, as is the set FLOW of infinite callsite sequences following the program flowchart. If FLOW ⊆ DESC (a decidable problem), every infinite call sequence would imply infinite descent in a wellordering — an impossibility — so the program must terminate. This analysis accounts for the termination arguments applicable to different callsite sequences, without indicating a ranking function for the program’s termination. In this article, it is explained how one can be constructed whenever sizechange analysis succeeds. The constructed function has an unexpectedly simple form; it is expressed using only min, max, and lexicographic tuples of