Results

**1 - 2**of**2**### The Worker/Wrapper Transformation (Extended Version)

"... The worker/wrapper transformation is a technique for changing the type of a computation, usually with the aim of improving its performance. It has been used by compiler writers for many years, but the technique is little-known in the wider functional programming community, and has never been describ ..."

Abstract
- Add to MetaCart

The worker/wrapper transformation is a technique for changing the type of a computation, usually with the aim of improving its performance. It has been used by compiler writers for many years, but the technique is little-known in the wider functional programming community, and has never been described precisely. In this article we explain, formalise, and explore the generality of the worker/wrapper transformation. We also provide a systematic recipe for its use as an equational reasoning technique for improving the performance of programs, and illustrate the power of this recipe using a range of examples. 1

### Calculating Graph Algorithms by Abstract Interpretation

"... We present a technique to calculate iterative, polynomial-time graph algorithms directly from the definition of the properties. We do this by fixed-point fusion of (1) a least fixed point expressing all finite paths through a directed graph and (2) Galois connections that capture the properties of i ..."

Abstract
- Add to MetaCart

We present a technique to calculate iterative, polynomial-time graph algorithms directly from the definition of the properties. We do this by fixed-point fusion of (1) a least fixed point expressing all finite paths through a directed graph and (2) Galois connections that capture the properties of interest. We demonstrate the technique by constructing three algorithms from the literature: a transitiveclosurealgorithm, adominancealgorithm andanalgorithm forthesingle-sourceshortest path problem. Furthermore we show how the transitive closure algorithm can be understood as an abstraction of a fourth iterative all-pairs shortest path algorithm. The approach illustrates that reasoning in the style of fixed-point calculus extends gracefully to the domain of graph algorithms. We thereby bridge common practice from the school of program calculation with common practice from the school of static program analysis, where fixed-point fusion is known as a complete abstraction, and build a novel view on iterative graph algorithms as instances of abstract interpretation.