Results 1  10
of
11
Strongly typed rewriting for coupled software transformation
 Proc. 7th Int. Workshop on RuleBased Programming (RULE 2006), ENTCS
, 2006
"... Coupled transformations occur in software evolution when multiple artifacts must be modified in such a way that they remain consistent with each other. An important example involves the coupled transformation of a data type, its instances, and the programs that consume or produce it. Previously, we ..."
Abstract

Cited by 22 (8 self)
 Add to MetaCart
(Show Context)
Coupled transformations occur in software evolution when multiple artifacts must be modified in such a way that they remain consistent with each other. An important example involves the coupled transformation of a data type, its instances, and the programs that consume or produce it. Previously, we have provided a formal treatment of transformation of the first two: data types and instances. The treatment involved the construction of typesafe, typechanging strategic rewrite systems. In this paper, we extend our treatment to the transformation of corresponding data processing programs. The key insight underlying the extension is that both data migration functions and data processors can be represented typesafely by a generalized abstract data type (GADT). These representations are then subjected to program calculation rules, harnessed in typesafe, typepreserving strategic rewrite systems. For ease of calculation, we use pointfree representations and corresponding calculation rules. Thus, coupled transformations are carried out in two steps. First, a typechanging rewrite system is applied to a source type to obtain a target type together with (representations of) migration functions between source and target. Then, a typepreserving rewrite system is applied to the composition of a migration function and a data processor on the source (or target) type to obtain a data processor on the target (or source) type. All rewrites are typesafe. Key words: Program transformation, term rewriting, strategic programming, generalized abstract datatypes, data refinement.
Transformation of structureshy programs: applied to XPath queries and strategic functions, in
 PEPM’07: Proceedings of the 2007 ACM SIGPLAN Workshop on Partial Evaluation and Semanticsbased Program Manipulation, ACM
"... Various programming languages allow the construction of structureshy programs. Such programs are defined generically for many different datatypes and only specify specific behavior for a few relevant subtypes. Typical examples are XML query languages that allow selection of subdocuments without exha ..."
Abstract

Cited by 17 (4 self)
 Add to MetaCart
(Show Context)
Various programming languages allow the construction of structureshy programs. Such programs are defined generically for many different datatypes and only specify specific behavior for a few relevant subtypes. Typical examples are XML query languages that allow selection of subdocuments without exhaustively specifying intermediate element tags. Other examples are languages and libraries for polytypic or strategic functional programming and for adaptive objectoriented programming. In this paper, we present an algebraic approach to transformation of declarative structureshy programs, in particular for strategic functions and XML queries. We formulate a rich set of algebraic laws, not just for transformation of structureshy programs, but also for their conversion into structuresensitive programs and vice versa. We show how subsets of these laws can be used to construct effective rewrite systems for specialization, generalization, and optimization of structureshy programs. We present a typesafe encoding of these rewrite systems in Haskell which itself uses strategic functional programming techniques.
A.: Calculating with lenses: Optimising bidirectional transformations
 In: Proceedings of Partial Evaluation and Program Manipulation
"... This paper presents an equational calculus to reason about bidirectional transformations specified in the pointfree style. In particular, it focuses on the socalled lenses as a bidirectional idiom, and shows that many standard laws characterising pointfree combinators and recursion patterns ar ..."
Abstract

Cited by 7 (5 self)
 Add to MetaCart
(Show Context)
This paper presents an equational calculus to reason about bidirectional transformations specified in the pointfree style. In particular, it focuses on the socalled lenses as a bidirectional idiom, and shows that many standard laws characterising pointfree combinators and recursion patterns are also valid in that setting. A key result is that uniqueness also holds for bidirectional folds and unfolds, thus unleashing the power of fusion as a program optimisation technique. A rewriting system for automatic lens optimisation is also presented, to prove the usefulness of the proposed calculus.
Constraintaware Schema Transformation
 In The Ninth International Workshop on RuleBased Programming
, 2008
"... Abstract. Data schema transformations occur in the context of software evolution, refactoring, and crossparadigm data mappings. When constraints exist on the initial schema, these need to be transformed into constraints on the target schema. Moreover, when highlevel data types are refined to lowe ..."
Abstract

Cited by 4 (1 self)
 Add to MetaCart
Abstract. Data schema transformations occur in the context of software evolution, refactoring, and crossparadigm data mappings. When constraints exist on the initial schema, these need to be transformed into constraints on the target schema. Moreover, when highlevel data types are refined to lower level structures, additional target schema constraints must be introduced, such as referential integrity constraints. We introduce an algebraic approach to schema transformation that is constraintaware in the sense that constraints are preserved from source to target schemas and that new constraints are introduced where needed. Our approach is based on refinement theory and pointfree program transformation. Data refinements are modeled as rewrite rules on types that carry pointfree predicates as constraints. At each rewrite step, the predicate on the reduct is computed from the predicate on the redex. An additional rewrite system on pointfree functions is used to normalize the predicates that are built up along rewrite chains. We implemented our rewrite systems in a typesafe way in the functional programming language Haskell. We demonstrate their application to constraintaware hierarchicalrelational mappings.
XPTO An Xpath Preprocessor with Typeaware Optimization
, 2007
"... Various languages allow specific query languages for selection and transformation of portions of documents. Such queries are defined generically for different data types, and only specify specific behaviours for a few relevant subtypes. This is a wellknown feature of XML query languages, that allow ..."
Abstract

Cited by 2 (2 self)
 Add to MetaCart
(Show Context)
Various languages allow specific query languages for selection and transformation of portions of documents. Such queries are defined generically for different data types, and only specify specific behaviours for a few relevant subtypes. This is a wellknown feature of XML query languages, that allow selection of element nodes without exhaustively specifying intermediate nodes. We have implemented a system for performing optimizations on XPath expressions through schemaspecialization of their structureshy properties. The core of the system consists of a combinator library, based on algebraic laws for transformation of structureshy programs, conversion into structuresensitive programs, and viceversa. We show how the core library can be extended with laws for specific XPath features and adapted to construct an effective rewrite system for specialization and optimization of XPath structureshy programs. The frontend for this system carries the conversion of XML Schema and XPath files into internal representations and the generation of Haskell programs containing optimized queries as Haskell functions. The frontend itself was implemented over the functional language Haskell.
CHRISTIANALBRECHTSUNIVERSITÄT
, 707
"... Seit 1984 veranstaltet die GI–Fachgruppe ” Programmiersprachen und Rechenkonzepte“, die aus ..."
Abstract
 Add to MetaCart
(Show Context)
Seit 1984 veranstaltet die GI–Fachgruppe ” Programmiersprachen und Rechenkonzepte“, die aus
Deriving Sorting Algorithms
, 2006
"... This paper shows how 3 wellknown sorting algorithms can be derived by similar sequences of transformation steps from a common specification. Each derivation uses an auxiliary algorithm based on insertion into an intermediate structure. The proofs given involve both inductive and coinductive reasoni ..."
Abstract
 Add to MetaCart
This paper shows how 3 wellknown sorting algorithms can be derived by similar sequences of transformation steps from a common specification. Each derivation uses an auxiliary algorithm based on insertion into an intermediate structure. The proofs given involve both inductive and coinductive reasoning, which are here expressed in the same program calculation framework, based on unicity properties.
Jorge Sousa Pinto
"... Abstract. Functional programs are particularly well suited to formal manipulation by equational reasoning. In particular, it is straightforward to use calculational methods for program transformation. Wellknown transformation techniques, like tupling or the introduction of accumulating parameters, ..."
Abstract
 Add to MetaCart
(Show Context)
Abstract. Functional programs are particularly well suited to formal manipulation by equational reasoning. In particular, it is straightforward to use calculational methods for program transformation. Wellknown transformation techniques, like tupling or the introduction of accumulating parameters, can be implemented using calculation through the use of the fusion (or promotion) strategy. In this paper we revisit this transformation method, but, unlike most of the previous work on this subject, we adhere to a pure pointfree calculus that emphasizes the advantages of equational reasoning. We focus on the accumulation strategy initially proposed by Bird, where the transformed programs are seen as higherorder folds calculated systematically from a specification. The machinery of the calculus is expanded with higherorder pointfree operators that simplify the calculations. A substantial number of examples (both classic and new) are fully developed, and we introduce several shortcut optimization rules that capture typical transformation patterns. 1.
Abstract Transformation of StructureShy Programs Applied to XPath Queries and Strategic Functions
"... Various programming languages allow the construction of structureshy programs. Such programs are defined generically for many different datatypes and only specify specific behavior for a few relevant subtypes. Typical examples are XML query languages that allow selection of subdocuments without exha ..."
Abstract
 Add to MetaCart
(Show Context)
Various programming languages allow the construction of structureshy programs. Such programs are defined generically for many different datatypes and only specify specific behavior for a few relevant subtypes. Typical examples are XML query languages that allow selection of subdocuments without exhaustively specifying intermediate element tags. Other examples are languages and libraries for polytypic or strategic functional programming and for adaptive objectoriented programming. In this paper, we present an algebraic approach to transformation of declarative structureshy programs, in particular for strategic functions and XML queries. We formulate a rich set of algebraic laws, not just for transformation of structureshy programs, but also for their conversion into structuresensitive programs and vice versa. We show how subsets of these laws can be used to construct effective rewrite systems for specialization, generalization, and optimization of structureshy programs. We present a typesafe encoding of these rewrite systems in Haskell which itself uses strategic functional programming techniques.