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

07/29/2019
by   Jesús J. Doménech, et al.
0

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. Under consideration for acceptance in TPLP.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/10/2021

Termination Analysis of Programs with Multiphase Control-Flow

Programs with multiphase control-flow are programs where the execution p...
research
08/07/2020

An Experiment Combining Specialization with Abstract Interpretation

It was previously shown that control-flow refinement can be achieved by ...
research
08/20/2019

Polyvariant Program Specialisation with Property-based Abstraction

In this paper we show that property-based abstraction, an established te...
research
02/12/2002

Logic program specialisation through partial deduction: Control issues

Program specialisation aims at improving the overall performance of prog...
research
07/23/2019

Resource Analysis driven by (Conditional) Termination Proofs

When programs feature a complex control flow, existing techniques for re...
research
08/16/2018

Compiling Control as Offline Partial Deduction

We present a new approach to a technique known as compiling control, who...
research
08/06/2018

Size-Change Termination as a Contract

Program termination is an undecidable, yet important, property relevant ...

Please sign up or login with your details

Forgot password? Click here to reset