Results 1  10
of
11
A Survey of Rewriting Strategies in Program Transformation Systems
 In Workshop on Reduction Strategies in Rewriting and Programming (WRS’01), volume 57 of Electronic Notes in Theoretical Computer Science
, 2001
"... Program transformation is used in a wide range of applications including compiler construction, optimization, program synthesis, refactoring, software renovation, and reverse engineering. Complex program transformations are achieved through a number of consecutive modifications of a program. Transfo ..."
Abstract

Cited by 24 (1 self)
 Add to MetaCart
Program transformation is used in a wide range of applications including compiler construction, optimization, program synthesis, refactoring, software renovation, and reverse engineering. Complex program transformations are achieved through a number of consecutive modifications of a program. Transformation rules define basic modifications. A transformation strategy is an algorithm for choosing a path in the rewrite relation induced by a set of rules. This paper surveys the support for the definition of strategies in program transformation systems. After a discussion of kinds of program transformation and choices in program representation, the basic elements of a strategy system are discussed and the choices in the design of a strategy language are considered. Several styles of strategy systems as provided in existing languages are then analyzed.
Algebra of logic programming
 International Conference on Logic Programming
, 1999
"... At present, the field of declarative programming is split into two main areas based on different formalisms; namely, functional programming, which is based on lambda calculus, and logic programming, which is based on firstorder logic. There are currently several language proposals for integrating th ..."
Abstract

Cited by 20 (3 self)
 Add to MetaCart
At present, the field of declarative programming is split into two main areas based on different formalisms; namely, functional programming, which is based on lambda calculus, and logic programming, which is based on firstorder logic. There are currently several language proposals for integrating the expressiveness of these two models of computation. In this thesis we work towards an integration of the methodology from the two research areas. To this end, we propose an algebraic approach to reasoning about logic programs, corresponding to the approach taken in functional programming. In the first half of the thesis we develop and discuss a framework which forms the basis for our algebraic analysis and transformation methods. The framework is based on an embedding of definite logic programs into lazy functional programs in Haskell, such that both the declarative and the operational semantics of the logic programs are preserved. In spite of its conciseness and apparent simplicity, the embedding proves to have many interesting properties and it gives rise to an algebraic semantics of logic programming. It also allows us to reason about logic programs in a simple calculational style, using rewriting and the algebraic laws of combinators. In the embedding, the meaning of a logic program arises compositionally from the meaning of its constituent subprograms and the combinators that connect them. In the second half of the thesis we explore applications of the embedding to the algebraic transformation of logic programs. A series of examples covers simple program derivations, where our techniques simplify some of the current techniques. Another set of examples explores applications of the more advanced program development techniques from the Algebra of Programming by Bird and de Moor [18], where we expand the techniques currently available for logic program derivation and optimisation. To my parents, Sandor and Erzsebet. And the end of all our exploring Will be to arrive where we started And know the place for the first time.
Program transformation by templates based on term rewriting
 In Proceedings of the 7th ACMSIGPLAN International Conference on Principles and Practice of Declarative Programming (PPDP 2005
, 2005
"... Huet and Lang (1978) presented a framework of automated program transformation based on lambda calculus in which programs are transformed according to a given program transformation template. They introduced a secondorder matching algorithm of simplytyped lambda calculus to verify whether the inpu ..."
Abstract

Cited by 4 (3 self)
 Add to MetaCart
Huet and Lang (1978) presented a framework of automated program transformation based on lambda calculus in which programs are transformed according to a given program transformation template. They introduced a secondorder matching algorithm of simplytyped lambda calculus to verify whether the input program matches the template. They also showed how to validate the correctness of the program transformation using the denotational semantics. We propose in this paper a framework of program transformation by templates based on term rewriting. In our new framework, programs are given by term rewriting systems. To automate our program transformation, we introduce a term pattern matching problem and present a sound and complete algorithm that solves this problem. We also discuss how to validate the correctness of program transformation in our framework. We introduce a notion of developed templates and a simple method to construct such templates without explicit use of induction. We then show that in any program transformation by developed templates the correctness of the transformation can be verified automatically. In our framework the correctness of the program transformation is discussed based on the operational semantics. This is a sharp contrast to Huet and Lang’s framework.
Matching modulo superdevelopments application to secondorder matching
 In 13th International Conference on Logic for Programming, Artificial Intelligence, and Reasoning  LPAR’06
, 2006
"... Abstract. To perform higherorder matching, we need to decide the βηequivalence on λterms. The first way to do it is to use simply typed λcalculus and this is the usual framework where higherorder matching is performed. Another approach consists in deciding a restricted equivalence based on fini ..."
Abstract

Cited by 4 (1 self)
 Add to MetaCart
Abstract. To perform higherorder matching, we need to decide the βηequivalence on λterms. The first way to do it is to use simply typed λcalculus and this is the usual framework where higherorder matching is performed. Another approach consists in deciding a restricted equivalence based on finite superdevelopments. We consider higherorder matching modulo this equivalence over untyped λterms for which we propose a terminating, sound and complete matching algorithm. This is in particular of interest since all secondorder βmatches are matches modulo superdevelopments. We further propose a restriction to secondorder matching that gives exactly all secondorder matches.
Deterministic Secondorder Patterns
, 2004
"... Secondorder patterns, together with secondorder matching, enable concise speci cation of program transformation, and have been implemented in several program transformation systems. However, secondorder matching in general is nondeterministic, and the matching algorithm is so expensive that the ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
Secondorder patterns, together with secondorder matching, enable concise speci cation of program transformation, and have been implemented in several program transformation systems. However, secondorder matching in general is nondeterministic, and the matching algorithm is so expensive that the matching is NPcomplete. It is orthodox to impose constraints on the form of higherorder patterns so as to obtain the desirable matches satisfying certain properties such as decidability and niteness. In the context of uni cation, Miller's higherorder patterns have a single most general uni er. In this paper, we relax the restriction of his patterns without changing determinism in the context of matching instead of uni cation. As a consequence, our deterministic secondorder patterns cover a wide class of useful patterns for program transformation. The time complexity of our deterministic matching algorithm is linear in the size of a term for a xed pattern.
Data Refinement by Rewriting
, 2001
"... One of the activities in the stepwise development of programs is the transformation of abstract programs involving abstract data types, such as graphs, sets, and sequences, that are not normally available as primitive in programming languages, into executable concrete programs in which a representa ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
One of the activities in the stepwise development of programs is the transformation of abstract programs involving abstract data types, such as graphs, sets, and sequences, that are not normally available as primitive in programming languages, into executable concrete programs in which a representation of these types is provided. Apart from the change of data representation, such a data refinement should have no effect on the results computed by the program. A judicious choice of representation of each abstract data type contributes to produce an efficient implementation of a program. In realistic programs the representation of many abstract data types cannot be chosen automatically. This means that programmers need control over what data refinements are applied, and we suggest that they can gain this control by annotating the abstract program with just enough information to allow the transformation to be mechanised. programs using term rewriting, and investigates its practical application to programs
RAPT: A program transformation system based on term rewriting
 14 IPSJ Transactions on Programming 2007 3
, 2006
"... Abstract. Chiba et al. (2005) proposed a framework of program transformation by template and automated verification of its correctness based on term rewriting. This paper describes a design and implementation of RAPT which implements this framework. RAPT transforms a term rewriting system according ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
Abstract. Chiba et al. (2005) proposed a framework of program transformation by template and automated verification of its correctness based on term rewriting. This paper describes a design and implementation of RAPT which implements this framework. RAPT transforms a term rewriting system according to a specified program transformation template. Presupposing the program transformation template is developed, the correctness of the transformation is automatically verified so that the transformation keeps the relationship between initial ground terms and their normal forms. 1
Higher Order Pattern Matching for Program Transformation
, 1999
"... Higher order matching allows program transformation systems to recognise complex patterns in programs and to use these patterns to apply useful transformations to these programs. We review existing algorithms, and in the attached paper "Higher order matching for program transformation" present a new ..."
Abstract
 Add to MetaCart
Higher order matching allows program transformation systems to recognise complex patterns in programs and to use these patterns to apply useful transformations to these programs. We review existing algorithms, and in the attached paper "Higher order matching for program transformation" present a new algorithm known as "one step matching" which we believe offers significant benefits over existing algorithms. Practical use of this algorithm is made in the MAG system for transforming Haskell programs, described in the paper "Generic Program Transformation" which is also attached. Finally, we discuss possible future work to develop the use of pattern matching techniques in program transformation systems.
Deterministic Secondorder Patterns in Program Transformation
 In International Symposium on Logicbased Program Synthesis and Transformation (LOPSTR 2003
, 2003
"... Higherorder patterns, together with higherorder matching, enable concise specification of program transformation, and have been implemented in several program transformation systems. However, higherorder matching generally generates nondeterministic matches, and the matching algorithm is so ex ..."
Abstract
 Add to MetaCart
Higherorder patterns, together with higherorder matching, enable concise specification of program transformation, and have been implemented in several program transformation systems. However, higherorder matching generally generates nondeterministic matches, and the matching algorithm is so expensive that even secondorder matching is NPcomplete. It is orthodox to impose constraint on the form of patterns so as to obtain the desirable matches satisfying certain properties such as decidability and finiteness. In the context of unification, Miller's higherorder patterns have a single most general unifier, while unification of general patterns is nondeterministic (and even undecidable). We relax the restriction of his patterns without changing determinism in the context of matching instead of unification. As a consequence, our deterministic secondorder pattern covers a wide class of useful patterns for program transformation. Our deterministic matching algorithm is as fast as the firstorder matching algorithm, almost in proportion to the size of the term.
1 2 HIGHERORDER MATCHING MODULO (SUPER)DEVELOPMENTS APPLICATIONS TO SECONDORDER MATCHING 3
, 2009
"... Abstract. To perform higherorder matching, we need to decide the βηequivalence on λterms. The first way to do it is to use simply typed λcalculus and this is the usual framework where higherorder matching is performed. Another approach consists in deciding a restricted equivalence. This restric ..."
Abstract
 Add to MetaCart
Abstract. To perform higherorder matching, we need to decide the βηequivalence on λterms. The first way to do it is to use simply typed λcalculus and this is the usual framework where higherorder matching is performed. Another approach consists in deciding a restricted equivalence. This restricted equivalence can be based on finite developments or more interestingly on finite superdevelopments. We consider higherorder matching modulo (super)developments over untyped λterms for which we propose terminating, sound and complete matching algorithms. This is in particular of interest since all secondorder βmatches are matches modulo superdevelopments. We further propose a restriction to secondorder matching that gives exactly all secondorder matches. We finally apply these results in the context of higherorder rewriting. Contents 1. Normalization in the lambdacalculus 3 2. Matching modulo beta (and eta) 9 3. Matching modulo superdevelopments (and eta) 11