Results 1  10
of
17
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 28 (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 5 (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.
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 4 (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.
HIGHERORDER MATCHING MODULO (SUPER)DEVELOPMENTS APPLICATIONS TO SECONDORDER MATCHING
, 2009
"... 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 equiv ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
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.
Algebra of programming using dependent types
, 2008
"... Abstract. Dependent type theory is rich enough to express that a program satisfies an input/output relational specification, but it could be hard to construct the proof term. On the other hand, squiggolists know very well how to show that one relation is included in another by algebraic reasoning. ..."
Abstract

Cited by 3 (1 self)
 Add to MetaCart
Abstract. Dependent type theory is rich enough to express that a program satisfies an input/output relational specification, but it could be hard to construct the proof term. On the other hand, squiggolists know very well how to show that one relation is included in another by algebraic reasoning. We demonstrate how to encode functional and relational derivations in a dependently typed programming language. A program is coupled with an algebraic derivation from a specification, whose correctness is guaranteed by the type system. 1
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
Program transformations using temporal logic side conditions
 In SEFM ’06: Proceedings of the Fourth IEEE International Conference on Software Engineering and Formal Methods
, 2009
"... conditions ..."
A Survey of Rewriting Strategies in Program Transformation Systems
"... Many systems for program transformation exist that are often specialized for a specific object language and/or kind of transformation. All these systems share many ideas about program transformation and use similar techniques, but are often adhoc in many respects. The ultimate goal is to achieve a ..."
Abstract
 Add to MetaCart
Many systems for program transformation exist that are often specialized for a specific object language and/or kind of transformation. All these systems share many ideas about program transformation and use similar techniques, but are often adhoc in many respects. The ultimate goal is to achieve a specification language or family of specification languages for the highlevel, declarative specification of program transformation systems in which generic, language independent schemas of transformation can be captured, and which admits efficient implementation of those transformations that can scale up to large programs.