Results 11  20
of
36
From Dynamic Programming to Greedy Algorithms
 Formal Program Development, volume 755 of Lecture Notes in Computer Science
, 1992
"... A calculus of relations is used to reason about specifications and algorithms for optimisation problems. It is shown how certain greedy algorithms can be seen as refinements of dynamic programming. Throughout, the maximum lateness problem is used as a motivating example. 1 Introduction An optimisat ..."
Abstract

Cited by 14 (3 self)
 Add to MetaCart
A calculus of relations is used to reason about specifications and algorithms for optimisation problems. It is shown how certain greedy algorithms can be seen as refinements of dynamic programming. Throughout, the maximum lateness problem is used as a motivating example. 1 Introduction An optimisation problem can be solved by dynamic programming if an optimal solution is composed of optimal solutions to subproblems. This property, which is known as the principle of optimality, can be formalised as a monotonicity condition. If the principle of optimality is satisfied, one can compute a solution by decomposing the input in all possible ways, recursively solving the subproblems, and then combining optimal solutions to subproblems into an optimal solution for the whole problem. By contrast, a greedy algorithm considers only one decomposition of the argument. This decomposition is usually unbalanced, and greedy in the sense that at each step the algorithm reduces the input as much as poss...
Uniform Traversal Combinators: Definition, Use and Properties
, 1992
"... In this paper we explore ways of capturing wellformed patterns of recursion in the form of generic reductions. These reductions, called uniform traversal combinators, can substantially help the theorem proving process by eliminating the need for induction and can also be an aid in achieving effecti ..."
Abstract

Cited by 13 (6 self)
 Add to MetaCart
In this paper we explore ways of capturing wellformed patterns of recursion in the form of generic reductions. These reductions, called uniform traversal combinators, can substantially help the theorem proving process by eliminating the need for induction and can also be an aid in achieving effective program synthesis. 1 Introduction Recursive structures, such as lists and trees, can be defined inductively in most functional languages [6]. The recursive types of these structures can be formalized using axiom sets generated automatically from their type definition, which are basically equivalent to Hoare's axioms for recursive data structures [5]. Programs that operate on instances of these types can be expressed as recursive functions in a pure applicative language. Theorems about these functions can be proved using induction principles on the structure of the parameter types of these functions. The BoyerMoore theorem prover [3], for example, proves theorems about recursive function...
Efficient Optimization of Iterative Queries
 In Fourth International Workshop on Database Programming Languages
, 1993
"... This paper presents a new query algebra based on fold iterations that facilitates database implementation. An algebraic normalization algorithm is introduced that reduces any program expressed in this algebra to a canonical form that generates no intermediate data structures and has no more nested i ..."
Abstract

Cited by 11 (5 self)
 Add to MetaCart
This paper presents a new query algebra based on fold iterations that facilitates database implementation. An algebraic normalization algorithm is introduced that reduces any program expressed in this algebra to a canonical form that generates no intermediate data structures and has no more nested iterations than the initial program. Given any inductive data type, our system can automatically synthesize the definition of the fold operator that traverses instances of this type, and, more importantly, it can produce the necessary transformations for optimizing expressions involving this fold operator. Database implementation in our framework is controlled by userdefined mappings from abstract types to physical structures. The optimizer uses this information to translate abstract programs and queries into concrete algorithms that conform to the type transformation. Database query optimization can be viewed as a search over the reduced space of all canonical forms which are equivalent to t...
Diffusion: Calculating Efficient Parallel Programs
 IN 1999 ACM SIGPLAN WORKSHOP ON PARTIAL EVALUATION AND SEMANTICSBASED PROGRAM MANIPULATION (PEPM ’99
, 1999
"... Parallel primitives (skeletons) intend to encourage programmers to build a parallel program from readymade components for which efficient implementations are known to exist, making the parallelization process easier. However, programmers often suffer from the difficulty to choose a combination of p ..."
Abstract

Cited by 9 (7 self)
 Add to MetaCart
Parallel primitives (skeletons) intend to encourage programmers to build a parallel program from readymade components for which efficient implementations are known to exist, making the parallelization process easier. However, programmers often suffer from the difficulty to choose a combination of proper parallel primitives so as to construct efficient parallel programs. To overcome this difficulty, we shall propose a new transformation, called diffusion, which can efficiently decompose a recursive definition into several functions such that each function can be described by some parallel primitive. This allows programmers to describe algorithms in a more natural recursive form. We demonstrate our idea with several interesting examples. Our diffusion transformation should be significant not only in development of new parallel algorithms, but also in construction of parallelizing compilers.
Calculating Software Generators from Solution Specifications
 In TAPSOFT'95, volume 915 of LNCS
, 1994
"... Software application generators can eliminate many of the technical aspects of programming for most computer users. We have developed a uniform approach to the design of program generators, based upon a simple ideaprovide a declarative specification language for each application domain and give i ..."
Abstract

Cited by 9 (7 self)
 Add to MetaCart
Software application generators can eliminate many of the technical aspects of programming for most computer users. We have developed a uniform approach to the design of program generators, based upon a simple ideaprovide a declarative specification language for each application domain and give it a computable, denotational semantics. To make this idea practical, however, requires a comprehensive system for transforming and translatiing expressions in the higherorder functional operators of the semantics formulation into a reasonably efficient implementation expressed in a firstorder, imperative programming language. This paper describes the system we have built to accomplish this. The technique and the system have been applied to produce a generator for modules that validate and translate messages sent from a peripheral sensor to a central controller. The input to a generator is a specification of the data formats and data constraints that characterize a message. The output is an...
Composition of restricted Macro Tree Transducers
, 2001
"... A special class of functional programs can be modelled by Macro Tree Transducers. We present a technique that can be used to solve the efficiency problems due to creation and consumption of intermediate results in such functional programs, by constructing for two given Macro Tree Transducers, with a ..."
Abstract

Cited by 9 (6 self)
 Add to MetaCart
A special class of functional programs can be modelled by Macro Tree Transducers. We present a technique that can be used to solve the efficiency problems due to creation and consumption of intermediate results in such functional programs, by constructing for two given Macro Tree Transducers, with appropriate restrictions, a single Macro Tree Transducer that implements the composition of the two original ones. We show that this is possible, if the first Macro Tree Transducer is noncopying and the second one is weakly singleuse. Thus, we obtain the characterization MAC_nc;MAC_wsu=MAC, which generalizes a previous result. We also develop two postprocessing constructions that can be used for optimizing the Macro Tree Transducer obtained from the composition construction, by eliminating superfluous context parameters and superfluous traversals through the input tree. Further, we present two interesting applications of the above characterization to problems about noncopying Macro Tree Transducers.
Tree Transducer Composition as Deforestation Method for Functional Programs
, 2001
"... We demonstrate that composition techniques for tree transducers are suitable to eliminate intermediate results in functional programs. We consider two composition techniques, which view special functional programs as (restricted) macro tree transducers: The first uses composition techniques for macr ..."
Abstract

Cited by 6 (2 self)
 Add to MetaCart
We demonstrate that composition techniques for tree transducers are suitable to eliminate intermediate results in functional programs. We consider two composition techniques, which view special functional programs as (restricted) macro tree transducers: The first uses composition techniques for macro tree transducers directly. The second is indirect in that it (i) translates macro tree transducers into attributed tree transducers, (ii) uses a composition technique for attributed tree transducers, and (iii) translates the composition result back into a macro tree transducer. We informally compare these techniques with the deforestation technique of Wadler. In particular we show that the composition techniques eliminate intermediate results for certain kinds of function definitions, for which classical deforestation fails.
Functional polytypic programming  use and implementation
, 1997
"... Many functions have to be written over and over again for different datatypes, either because datatypes change during the development of programs, or because functions with similar functionality are needed on different datatypes. Examples of such functions are pretty printers, pattern matchers, equ ..."
Abstract

Cited by 5 (2 self)
 Add to MetaCart
Many functions have to be written over and over again for different datatypes, either because datatypes change during the development of programs, or because functions with similar functionality are needed on different datatypes. Examples of such functions are pretty printers, pattern matchers, equality functions, unifiers, rewriting functions, etc. Such functions are called polytypic functions. A polytypic function is a function that is defined by induction on the structure of userdefined datatypes. This thesis introduces polytypic functions, shows how to construct and reason about polytypic functions and describes the implementation of the polytypic programming system PolyP. PolyP extends a functional language (a subset of Haskell) with a construct for writing polytypic functions. The extended language type checks definitions of polytypic functions, and infers the types of all other expressions. Programs in the extended language are translated to Haskell.
Inductive Datatypes with Laws and Subtyping – A Relational Model
 Faculty of Mathematics and Computing
"... ..."
PolyLib  a library of polytypic functions
 In Workshop on Generic Programming (WGP'98), Marstrand
, 1998
"... This paper describes the polytypic functions in PolyLib, motivates their presence in the library, and gives a rationale for their design. Thus we hope to share our experience with other researchers in the field. We will assume the reader has some familiarity with the field of polytypic programming. ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
This paper describes the polytypic functions in PolyLib, motivates their presence in the library, and gives a rationale for their design. Thus we hope to share our experience with other researchers in the field. We will assume the reader has some familiarity with the field of polytypic programming. Of course, a library is an important part of a programming language. Languages like Java, Delphi, Perl and Haskell are popular partly because of their useful and extensive libraries. For a polytypic programming language it is even more important to have a clear and welldesigned library: writing polytypic programs is difficult, and we do not expect many programmers to write polytypic programs. On the other hand, many programmers use polytypic programs such as parser generators, equality functions, etc. This is a first attempt to describe the library of PolyP; we expect that both the form and content of this description will change over time. One of the goals of this paper is to obtain feedback on the library design from other researchers working within the field. At the moment the library only contains the basic