Results 1 -
2 of
2
Roles of Program Extension
- Post-workshop proceedings International Workshop on Logicbased Program Synthesis and Transformation, LOPSTR 1999, number 1817 in LNCS
, 2000
"... . A formal and effective approach to the extension of the computational behaviour of logic programs is presented. The approach builds upon the following concepts. The extension of computational behaviour is modelled by semantics-preserving program transformations. Several basic roles involved in ..."
Abstract
-
Cited by 5 (3 self)
- Add to MetaCart
. A formal and effective approach to the extension of the computational behaviour of logic programs is presented. The approach builds upon the following concepts. The extension of computational behaviour is modelled by semantics-preserving program transformations. Several basic roles involved in such transformations are identified. Every transformation defined solely in terms of the basic roles will be semanticspreserving by definition. Functional meta-programs on logic object programs are used to specify the basic roles and to derive programming techniques in the style of stepwise enhancement. Thus, the process of extending the computational behaviour of logic programs is regarded as disciplined meta-programming. 1 Introduction This paper is about adding functionality to declarative programs. We present a rigorous approach which relies on program transformation concepts and metaprogramming technology. Transformations are used to model the enhancement of programs, i.e., the...
Meta-Programming with Tabaluga
"... We present a lightweight approach to meta-programming in the functional programming language Haskell. In this approach, meta-programs are constructed with the help of generalised (possibly monadic) folds over the system of datatypes that represents the abstract syntax of the objectlanguage. Such fol ..."
Abstract
- Add to MetaCart
We present a lightweight approach to meta-programming in the functional programming language Haskell. In this approach, meta-programs are constructed with the help of generalised (possibly monadic) folds over the system of datatypes that represents the abstract syntax of the objectlanguage. Such folds are obtained by (1) reusing, refining, and combining basic fold algebras, and (2) feeding the resulting fold algebra to a fold function. A library of basic fold algebras, combinators and fold functions can be generated from a system of datatypes by our tool Tabaluga. To demonstrate this technique of meta-programming with folds, we present a case study involving Haskell itself as object-language: a simple application extractor, which analyses and transforms collections of Haskell modules to remove unused (library) code. 1 Introduction According to Cameron [3], "a meta-programming system is a programming facility (...) whose basic data objects include the programs and program fragments o...

