3,988 research outputs found
Worker/wrapper/makes it/faster
Much research in program optimization has focused on formal approaches to correctness: proving that the meaning of programs is preserved by the optimisation. Paradoxically, there has been comparatively little work on formal approaches to efficiency: proving that the performance of optimized programs is actually improved. This paper addresses this problem for a general-purpose optimization technique, the worker/wrapper transformation. In particular, we use the call-by-need variant of improvement theory to establish conditions under which the worker/wrapper transformation is formally guaranteed to preserve or improve the time performance of programs in lazy languages such as Haskell
Worker/wrapper/makes it/faster
Much research in program optimization has focused on formal approaches to correctness: proving that the meaning of programs is preserved by the optimisation. Paradoxically, there has been comparatively little work on formal approaches to efficiency: proving that the performance of optimized programs is actually improved. This paper addresses this problem for a general-purpose optimization technique, the worker/wrapper transformation. In particular, we use the call-by-need variant of improvement theory to establish conditions under which the worker/wrapper transformation is formally guaranteed to preserve or improve the time performance of programs in lazy languages such as Haskell
Type-Inference Based Short Cut Deforestation (nearly) without Inlining
Deforestation optimises a functional program by transforming it into another one that does not create certain intermediate data structures. In [ICFP'99] we presented a type-inference based deforestation algorithm which performs extensive inlining. However, across module boundaries only limited inlining is practically feasible. Furthermore, inlining is a non-trivial transformation which is therefore best implemented as a separate optimisation pass. To perform short cut deforestation (nearly) without inlining, Gill suggested to split definitions into workers and wrappers and inline only the small wrappers, which transfer the information needed for deforestation. We show that Gill's use of a function build limits deforestation and note that his reasons for using build do not apply to our approach. Hence we develop a more general worker/wrapper scheme without build. We give a type-inference based algorithm which splits definitions into workers and wrappers. Finally, we show that we can deforest more expressions with the worker/wrapper scheme than the algorithm with inlining
Work it, wrap it, fix it, fold it
The worker/wrapper transformation is a general-purpose technique for refactoring recursive programs to improve their performance. The two previous approaches to formalising the technique were based upon different recursion operators and different correctness conditions. In this paper we show how these two approaches can be generalised in a uniform manner by combining their correctness conditions, extend the theory with new conditions that are both necessary and sufficient to ensure the correctness of the worker/wrapper technique, and explore the benefits that result. All the proofs have been mechanically verified using the Agda system
The Life Changing HERMIT: A Case Study of the Worker/Wrapper Transformation
In software engineering, altering a program's original implementation disconnects it from the model that produced it. Reconnecting the model and new implementations must be done in a way that does not decrease confidence in the design's correctness and performance. This thesis demonstrates that it is possible, in practice, to connect the model of Conway's Game of Life with new implementations, using the worker/wrapper transformation theory. This connection allows development to continue without the sacrifice of re-implementation. HERMIT is a tool that allows programs implemented in Haskell to be transformed during the compilation process, and has features capable of performing worker/wrapper transformations. Specifically in these experiments, HERMIT is used to apply syntax transformations to replace Life's linked-list based implementation with one that uses other data structures in an effort to explore alternative implementations and improve overall performance. Previous work has successfully performed the worker/wrapper conversion on an individual function using HERMIT. This thesis presents the first time that a programmer-directed worker/wrapper transformation has been attempted on an entire program. From this experiment, substantial observations have been made. These observations have led to proposed improvements to the HERMIT system, as well as the formal approach to the worker/wrapper transformation process
Worker/Wrapper/Makes It/Faster. In
Abstract Much research in program optimization has focused on formal approaches to correctness: proving that the meaning of programs is preserved by the optimisation. Paradoxically, there has been comparatively little work on formal approaches to efficiency: proving that the performance of optimized programs is actually improved. This paper addresses this problem for a general-purpose optimization technique, the worker/wrapper transformation. In particular, we use the call-by-need variant of improvement theory to establish conditions under which the worker/wrapper transformation is formally guaranteed to preserve or improve the time performance of programs in lazy languages such as Haskell
Tabling as a Library with Delimited Control
Tabling is probably the most widely studied extension of Prolog. But despite
its importance and practicality, tabling is not implemented by most Prolog
systems. Existing approaches require substantial changes to the Prolog engine,
which is an investment out of reach of most systems. To enable more widespread
adoption, we present a new implementation of tabling in under 600 lines of
Prolog code. Our lightweight approach relies on delimited control and provides
reasonable performance.Comment: 15 pages. To appear in Theory and Practice of Logic Programming
(TPLP), Proceedings of ICLP 201
Transformation in HaRe
HaRe [?] is a system developed at the University of Kent Computing Laboratory to support refactoring in Haskell. We also want HaRe to be an open platform to support general Haskell program transformation so it can be used by other researchers in the field. This paper demonstrates the facilities HaRe provides for program transformation by implementing a deforestation transformation as a case study
The Grid[Way] Job Template Manager, a tool for parameter sweeping
Parameter sweeping is a widely used algorithmic technique in computational
science. It is specially suited for high-throughput computing since the jobs
evaluating the parameter space are loosely coupled or independent.
A tool that integrates the modeling of a parameter study with the control of
jobs in a distributed architecture is presented. The main task is to facilitate
the creation and deletion of job templates, which are the elements describing
the jobs to be run. Extra functionality relies upon the GridWay Metascheduler,
acting as the middleware layer for job submission and control. It supports
interesting features like multi-dimensional sweeping space, wildcarding of
parameters, functional evaluation of ranges, value-skipping and job template
automatic indexation.
The use of this tool increases the reliability of the parameter sweep study
thanks to the systematic bookkeping of job templates and respective job
statuses. Furthermore, it simplifies the porting of the target application to
the grid reducing the required amount of time and effort.Comment: 26 pages, 1 figure
- ā¦