Results 1 -
4 of
4
Evolution of Rule-Based Programs
, 2004
"... The term rule-based program is meant to include definite clause programs, SOS specifications, attribute grammars, and conditional rewrite systems. These setups are widely used for the executable specification or implementation of language-based tools, e.g., interpreters, translators, type checkers, ..."
Abstract
-
Cited by 5 (2 self)
- Add to MetaCart
The term rule-based program is meant to include definite clause programs, SOS specifications, attribute grammars, and conditional rewrite systems. These setups are widely used for the executable specification or implementation of language-based tools, e.g., interpreters, translators, type checkers, program analysers, and program transformations. We provide a pragmatic, transformation-based approach for expressing and tracking changes in rule-based programs in the course of program evolution. To this end, we design an operator suite for the transformation of rule-based programs. The operators facilitate steps for clean-up, refactoring, and enhancement. We use SOS-based interpreter examples to illustrate evolution of rule-based programs. We use logic programming to execute the examples, while the relevant evolution operators are made available as logic meta-programs.
Evolution scenarios for rule-based implementations of language-based functionality
- SOS 2004 PRELIMINARY VERSION
, 2004
"... ..."
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...

