Results 1 
9 of
9
Fast Offline Partial Evaluation of Large Logic Programs
 In Logicbased Program Synthesis and Transformation (revised and selected papers from LOPSTR’08
, 2009
"... There are two main approaches to partial evaluation [6], a wellknown technique for program specialisation. Online partial evaluators basically include an augmented interpreter that tries to evaluate the program constructs as much as possible—using the partially known input data—while still ensuring ..."
Abstract

Cited by 10 (7 self)
 Add to MetaCart
(Show Context)
There are two main approaches to partial evaluation [6], a wellknown technique for program specialisation. Online partial evaluators basically include an augmented interpreter that tries to evaluate the program constructs as much as possible—using the partially known input data—while still ensuring the termination
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
Improving sizechange analysis in offline partial evaluation
, 2008
"... Abstract. Some recent approaches for scalable offline partial evaluation of logic programs include a sizechange analysis for ensuring both so called local and global termination. In this work—inspired by experimental evaluation—we introduce several improvements that may increase the accuracy of the ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
(Show Context)
Abstract. Some recent approaches for scalable offline partial evaluation of logic programs include a sizechange analysis for ensuring both so called local and global termination. In this work—inspired by experimental evaluation—we introduce several improvements that may increase the accuracy of the analysis and, thus, the quality of the associated specialized programs. We aim to achieve this while maintaining the same complexity and scalability of the recent works. 1
Predicting the Effectiveness of Partial Evaluation
"... Abstract. Partial evaluation aims at improving programs by specializing them w.r.t. part of their input data. In general, however, the effectiveness of the partial evaluation process is hard to measure, even a posteriori. Recent approaches have introduced experimental (often computationally expensiv ..."
Abstract
 Add to MetaCart
(Show Context)
Abstract. Partial evaluation aims at improving programs by specializing them w.r.t. part of their input data. In general, however, the effectiveness of the partial evaluation process is hard to measure, even a posteriori. Recent approaches have introduced experimental (often computationally expensive) frameworks for this purpose. In this paper, we present an alternative, symbolic approach for predicting the effectiveness of partial evaluation by combining a trace analysis with a termination analysis. The termination analysis—namely, a sizechange analysis—is used to determine which procedures are potentially removable by partial evaluation (i.e., can be fully unfolded at specialization time). Then, the trace analysis helps us to put this information into context by producing a compact representation of the call sequences of the program. By inspecting the output of the combined analysis, the user may determine the impact of a partial evaluation before it is performed. 1
Fast and Accurate Strong Termination Analysis with an Application to Partial Evaluation ⋆
"... Abstract. A logic program strongly terminates if it terminates for any selection rule. Clearly, considering a particular selection rule—like Prolog’s leftmost selection rule—allows one to prove more goals terminating. In contrast, a strong termination analysis gives valuable information for those ap ..."
Abstract
 Add to MetaCart
(Show Context)
Abstract. A logic program strongly terminates if it terminates for any selection rule. Clearly, considering a particular selection rule—like Prolog’s leftmost selection rule—allows one to prove more goals terminating. In contrast, a strong termination analysis gives valuable information for those applications in which the selection rule cannot be fixed in advance (e.g., partial evaluation, dynamic selection rules, parallel execution). In this paper, we introduce a fast and accurate sizechange analysis that can be used to infer conditions for both strong termination and strong quasitermination of logic programs. We also provide several ways to increase the accuracy of the analysis without sacrificing scalability. In the experimental evaluation, we show that the new algorithm is up to three orders of magnitude faster than the previous implementation, meaning that we can efficiently deal with programs exceeding 25,000 lines of Prolog. 1
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.
Typedbased Homeomorphic Embedding for Online Termination
"... Abstract. We introduce the typebased homeomorphic embedding relation as an extension of the standard, untyped homeomorphic embedding which allows us to obtain more precise results in the presence of infinite signatures (e.g., the integers). In particular, we show how our typebased relation can be ..."
Abstract
 Add to MetaCart
(Show Context)
Abstract. We introduce the typebased homeomorphic embedding relation as an extension of the standard, untyped homeomorphic embedding which allows us to obtain more precise results in the presence of infinite signatures (e.g., the integers). In particular, we show how our typebased relation can be used to improve the accuracy of online partial evaluation. For this purpose, we outline an approach to constructing suitable types for partial evaluation automatically, given an untyped program and a goal or set of goals. Our approach is based on existing analysis tools for constraint logic programs: (i) inference of a welltyping of a program and goal, and (ii) bounds analysis for numerical values. We argue that our work improves the state of the practice of online termination and it is very relevant for instance in the context of the specialization of interpreters. 1
Abstract QuasiTerminating Logic Programs for Ensuring the Termination of Partial Evaluation ∗
"... One of the most important challenges in partial evaluation is the design of automatic methods for ensuring the termination of specialisation. It is well known that the termination of partial evaluation can be ensured when the considered computations are quasiterminating, i.e., when only finitely man ..."
Abstract
 Add to MetaCart
(Show Context)
One of the most important challenges in partial evaluation is the design of automatic methods for ensuring the termination of specialisation. It is well known that the termination of partial evaluation can be ensured when the considered computations are quasiterminating, i.e., when only finitely many different calls occur. In this work, we adapt the use of the so called sizechange graphs to logic programming and introduce new sufficient conditions for strong (i.e., w.r.t. any computation rule) termination and quasitermination. To the best of our knowledge, this is the first sufficient condition for the strong quasitermination of logic programs. The class of strongly quasiterminating logic programs, however, is too restrictive. Therefore, we also introduce an annotation procedure that combines the information from sizechange graphs and the output of a traditional bindingtime analysis. Annotated programs can then be used to guarantee termination of partial evaluation. We finally illustrate the usefulness of our approach by designing a simple partial evaluator in which termination is always ensured offline (i.e., statically).