Results 1 -
7 of
7
Benefits of Tree Transducers for Optimizing Functional Programs
- In FST & TCS'98, Chennai, India, Proceedings, volume 1530 of LNCS
, 1998
"... We present a technique to prevent the construction of intermediate data structures in functional programs, which is based on results from the theory of tree transducers. We first decompose function definitions, which correspond to macro tree transducers, into smaller pieces. Under certain restrictio ..."
Abstract
-
Cited by 29 (6 self)
- Add to MetaCart
We present a technique to prevent the construction of intermediate data structures in functional programs, which is based on results from the theory of tree transducers. We first decompose function definitions, which correspond to macro tree transducers, into smaller pieces. Under certain restrictions...
Reconstruction of paradigm shifts
- IN SECOND WORKSHOP ON ATTRIBUTE GRAMMARS AND THEIR APPLICATIONS, WAGA 99
, 1999
"... There are many extensions of the basic attribute grammar formalism intended to improve its pragmatics, e.g. certain modularity concepts, remote access, object-orientation, templates, rule models and higher-order features. In the paper, a generic and formal approach to an effective and orthogonal rec ..."
Abstract
-
Cited by 8 (5 self)
- Add to MetaCart
There are many extensions of the basic attribute grammar formalism intended to improve its pragmatics, e.g. certain modularity concepts, remote access, object-orientation, templates, rule models and higher-order features. In the paper, a generic and formal approach to an effective and orthogonal reconstruction of the concepts underlying some extensions is described. The reconstruction is effective in the sense that the reconstructed concepts are presented as executable meta-programs. The approach to reconstruction is formal in the sense that the derived meta-programs modelling certain concepts can be analysed based on properties of the meta-programs, e.g. preservation properties. It is a generic approach because the meta-programming framework can be instantiated not only for attribute grammars but also for several other representatives of the declarative paradigm, e.g. natural semantics and algebraic specification. Thereby, concepts can be imported from and exported to other frameworks. Finally, the reconstructions are derived orthogonally in the sense that potential roles are first unbundled and then particular combinations of the roles can be investigated. The described meta-programming framework has been implemented in the specification framework of Λ∆Λ and it is used for reusable formal language definition based on attribute grammars and operational semantics.
Symbolic Composition
, 1998
"... The deforestation of a functional program is a transformation which gets rid of intermediate data structures constructions that appear when two functions are composed. The descriptional composition, initially introduced by Ganzinger and Giegerich, is a deforestation method dedicated to the compositi ..."
Abstract
-
Cited by 7 (4 self)
- Add to MetaCart
The deforestation of a functional program is a transformation which gets rid of intermediate data structures constructions that appear when two functions are composed. The descriptional composition, initially introduced by Ganzinger and Giegerich, is a deforestation method dedicated to the composition of two attribute grammars. This article presents a new functional deforestation technique, called symbolic composition, based on the descriptional composition mechanism, but extending it. An automatic translation from a functional program into an equivalent attribute grammar allows symbolic composition to be applied, and then the result can be translated back into a functional program. This yields a source to source functional program transformation. The resulting deforestation method provides a better deforestation than other existing functional techniques. Symbolic composition, that uses the declarative and descriptional features of attribute grammars is intrinsically more powerful th...
Structure-directed Genericity in Functional Programming and Attribute Grammars
, 1997
"... : Generic control operators, such as fold, have been introduced in functional programming to increase the power and applicability of data-structure-based transformations. This is achieved by making the structure of the data more explicit in program specifications. We argue that this very important p ..."
Abstract
-
Cited by 5 (3 self)
- Add to MetaCart
: Generic control operators, such as fold, have been introduced in functional programming to increase the power and applicability of data-structure-based transformations. This is achieved by making the structure of the data more explicit in program specifications. We argue that this very important property is one of the original concepts of attribute grammars. In this paper, we present the similarities between the fold formalism and attribute grammars. In particular, we show the equivalence of their respective deforestation methods. Given these results and the fundamental role of deforestation in the concept of structuredirected genericity, first devised for attribute grammars with descriptional composition, we show how the fold operator with its fusion method allow us to transport this concept in the area of functional programming. Key-words: Attribute grammars, static analysis, functional programming, structuredirected programming, program transformation, deforestation, genericity....
Attribute Grammars and Functional Programming Deforestation
- In Fourth International Static Analysis Symposium -- Poster Session
, 1997
"... The functional programming community is paying increasing attention to static structure-based transformations. For example, generic control operators, such as fold, have been introduced in functional programming to increase the power and applicability of a particular kind of static transformation, c ..."
Abstract
-
Cited by 4 (3 self)
- Add to MetaCart
The functional programming community is paying increasing attention to static structure-based transformations. For example, generic control operators, such as fold, have been introduced in functional programming to increase the power and applicability of a particular kind of static transformation, called deforestation, which prevents the construction of useless intermediate data structures in function composition. This is achieved by making the structure of the data more explicit in program specifications. We argue that one of the original concepts of Attribute Grammars is precisely to make data structures explicit in program specifications. Furthermore, there exists a powerful static deforestation-like transformation in their context. In this paper, we present similarities between deforestation methods, on the one hand with the functional approach, and on the other hand with the Attribute Grammars approach. In order to gain a grasp of these similarities, we first make a simple compar...
Generic Programming by Program Composition
- In Workshop on Generic Programming, Marstrand
, 1998
"... Recently, generic programming becomes of a major interest in several programming paradigms. A recurrent idea to achieve genericity is to abstract computations from their representative data structures. This allows these generic specifications to be instantiated onto a large number of neighboring dat ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
Recently, generic programming becomes of a major interest in several programming paradigms. A recurrent idea to achieve genericity is to abstract computations from their representative data structures. This allows these generic specifications to be instantiated onto a large number of neighboring data structures. Moreover the program can be adapted when the data structures have to evolve. Polytypic programming, adaptive programming and generic attribute grammars are generic programming methods related to this approach. Their comparison leads us to propose a common framework for generic programming: automatic generation of programs that compute morphisms between data structures, and program composition. Thanks to this compositional approach, the complete specialization of generic programs could be advantageously delegated to some powerful and general deforestation method. 1 Introduction In several programming paradigms, generic programming is being emerging. When an algorithm is specifi...
Why Automatic Transformation Matters
"... rtance when software is generated from specifications given in a declarative, domain-specific language, rather than being programmed directly by a human. A program naively generated by direct interpretation of the semantics of the high level specification may have performance parameters that are ord ..."
Abstract
- Add to MetaCart
rtance when software is generated from specifications given in a declarative, domain-specific language, rather than being programmed directly by a human. A program naively generated by direct interpretation of the semantics of the high level specification may have performance parameters that are orders of magnitude removed from what is desired and could be achieved by detailed programming. Automatic transformation, incorporating partial evaluation, recursion elimination, and fusion of control structures can specialize the naive interpretation, adapting it to a particular term given in the specification language. The combination of specialization and transformation can dramatically improve the performance of the program that realizes a high-level specification. Our prior experience with such a strategy [KB + 94] confirmed its promise but also called attention to the need for better integration of the component transformations. ffl Compilers for high-le

