Hostname: page-component-7b7567c8c-fvjsw Total loading time: 0 Render date: 2026-11-14T07:30:17.189Z Has data issue: false hasContentIssue false

Control-Flow Refinement by Partial Evaluation, and its Application to Termination and Cost Analysis

Published online by Cambridge University Press:  20 September 2019

JESÚS J. DOMÉNECH
Affiliation:
Universidad Complutense de Madrid, Spain (e-mail: jdomenech@ucm.es)
JOHN P. GALLAGHER
Affiliation:
Roskilde University, Denmark and IMDEA Software Institute, Spain (e-mail: jpg@ruc.dk)
SAMIR GENAIM
Affiliation:
Universidad Complutense de Madrid, Spain (e-mail: sgenaim@ucm.es)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

Control-flow refinement refers to program transformations whose purpose is to make implicit control-flow explicit, and is used in the context of program analysis to increase precision. Several techniques have been suggested for different programming models, typically tailored to improving precision for a particular analysis. In this paper we explore the use of partial evaluation of Horn clauses as a general-purpose technique for control-flow refinement for integer transitions systems. These are control-flow graphs where edges are annotated with linear constraints describing transitions between corresponding nodes, and they are used in many program analysis tools. Using partial evaluation for control-flow refinement has the clear advantage over other approaches in that soundness follows from the general properties of partial evaluation; in particular, properties such as termination and complexity are preserved. We use a partial evaluation algorithm incorporating property-based abstraction, and show how the right choice of properties allows us to prove termination and to infer complexity of challenging programs that cannot be handled by state-of-the-art tools. We report on the integration of the technique in a termination analyzer, and its use as a preprocessing step for several cost analyzers.

Information

Type
Original Article
Copyright
© Cambridge University Press 2019