publications: - title: "Program Transformation with Scoped Dynamic Rewrite Rules" author: - name: "Martin Bravenboer" link: "http://martin.bravenboer.name/" - name: "Arthur van Dam" link: "https://researchr.org/profile/arthurvandam/publications" - name: "Karina Olmos" link: "https://researchr.org/profile/karinaolmos/publications" - name: "Eelco Visser" link: "http://eelcovisser.org" year: "2006" doi: "https://content.iospress.com/articles/fundamenta-informaticae/fi69-1-2-06" abstract: "The applicability of term rewriting to program transformation is limited by the lack of control over rule application and by the context-free nature of rewrite rules. The first problem is addressed by languages supporting user-definable rewriting strategies. The second problem is addressed by the extension of rewriting strategies with scoped dynamic rewrite rules. Dynamic rules are defined at run-time and can access variables available from their definition context. Rules defined within a rule scope are automatically retracted at the end of that scope. In this paper, we explore the design space of dynamic rules, and their application to transformation problems. The technique is formally defined by extending the operational semantics underlying the program transformation language Stratego, and illustrated by means of several program transformations in Stratego, including constant propagation, bound variable renaming, dead code elimination, function inlining, and function specialization. " links: doi: "https://content.iospress.com/articles/fundamenta-informaticae/fi69-1-2-06" "technical report": "http://www.cs.uu.nl/research/techreps/UU-CS-2005-005.html" tags: - "programming languages" - "semantics" - "rule-based" - "formal semantics" - "graph transformation" - "dynamic rewrite rules" - "Stratego/XT" - "transformation language" - "term rewriting" - "language design" - "graph-rewriting" - "rules" - "operational semantics" - "context-aware" - "access control" - "rewriting" - "design" - "role-based access control" - "rewriting strategies" - "transformation" - "Stratego" - "program transformation" researchr: "https://researchr.org/publication/BravenboerDOV06" cites: 0 citedby: 4 journal: "Fundamenta Informaticae" volume: "69" number: "1-2" pages: "123-178" kind: "article" key: "BravenboerDOV06" - title: "Turning Dynamic Typing into Static Typing by Program Specialization in a Compiler Front-end for Octave" author: - name: "Karina Olmos" link: "https://researchr.org/profile/karinaolmos/publications" - name: "Eelco Visser" link: "http://eelcovisser.org" year: "2003" doi: "https://doi.org/10.1109/SCAM.2003.1238040" abstract: "Array processing languages such as APL, Matlab and Octave rely on dynamic typechecking by the interpreter rather than static typechecking and are designed for user convenience with a syntax close to mathematical notation. Functions and operators are highly overloaded. The price to be paid for this flexibility is computational performance, since the run-time system is responsible for type checking, array shape determination, function call dispatching, and handling possible run-time errors. In order to produce effecient code, an Octave compiler should address those issues at compile-time as much as possible. In particular, static type and shape inferencing can improve the quality of the generated code. In this paper we discuss how overloading in dynamically typed Octave programs can be resolved by program specialization. We discuss the typing issues in compilation of Octave programs and give an overview of the implementation of the specializer in the transformation language Stratego." links: doi: "https://doi.org/10.1109/SCAM.2003.1238040" tags: - "programming languages" - "type inference" - "dynamic typing" - "interpreter" - "Stratego/XT" - "transformation language" - "Octave" - "language design" - "type system" - "type checking" - "transformation system" - "compiler" - "higher-order transformations" - "program specialization" - "transformation" - "Stratego" - "program transformation" researchr: "https://researchr.org/publication/OlmosV03" cites: 0 citedby: 0 pages: "141-150" booktitle: "3rd IEEE International Workshop on Source Code Analysis and Manipulation (SCAM 2003), 26-27 September 2003, Amsterdam, The Netherlands" publisher: "IEEE Computer Society" isbn: "0-7695-2005-7" kind: "inproceedings" key: "OlmosV03" - title: "Composing Source-to-Source Data-Flow Transformations with Rewriting Strategies and Dependent Dynamic Rewrite Rules" author: - name: "Karina Olmos" link: "https://researchr.org/profile/karinaolmos/publications" - name: "Eelco Visser" link: "http://eelcovisser.org" year: "2005" doi: "https://doi.org/10.1007/978-3-540-31985-6_14" abstract: "Data-flow transformations used in optimizing compilers are also useful in other programming tools such as code generators, aspect weavers, domain-specific optimizers, and refactoring tools. These applications require source-to-source transformations rather than transformations on a low-level intermediate representation. In this paper we describe the composition of source-to-source data-flow transformations in the program transformation language Stratego. The language supports the high-level specification of transformations by means of rewriting strategy combinators that allow a natural modeling of data- and control-flow without committing to a specific source language. Data-flow facts are propagated using dynamic rewriting rules. In particular, we introduce the concept of dependent dynamic rewrite rules for modeling the dependencies of data-flow facts on program entities such as variables. The approach supports the combination of analysis and transformation, the combination of multiple transformations, the combination with other types of transformations, and the correct treatment of variable binding constructs and lexical scope to avoid free variable capture." links: doi: "https://doi.org/10.1007/978-3-540-31985-6_14" tags: - "programming languages" - "model-to-model transformation" - "optimization" - "rule-based" - "intermediate representation" - "program analysis" - "meta programming" - "data-flow language" - "graph transformation" - "meta-model" - "dynamic rewrite rules" - "modeling language" - "modeling" - "variable binding" - "Stratego/XT" - "model refactoring" - "refactoring" - "transformation language" - "language modeling" - "composition" - "dynamic rules" - "points-to analysis" - "domain analysis" - "dependent dynamic rewrite rules" - "analysis" - "data-flow programming" - "data-flow" - "source-to-source" - "graph-rewriting" - "rules" - "rule-based refactoring" - "compiler" - "model transformation" - "programming" - "program optimization" - "Meta-Environment" - "rewriting" - "data-flow analysis" - "systematic-approach" - "rewriting strategies" - "open-source" - "transformation" - "Stratego" - "program transformation" - "domain-specific language" researchr: "https://researchr.org/publication/OlmosV05" cites: 0 citedby: 0 pages: "204-220" booktitle: "Compiler Construction, 14th International Conference, CC 2005, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2005, Edinburgh, UK, April 4-8, 2005, Proceedings" editor: - name: "Rastislav Bodík" link: "https://researchr.org/alias/rastislav-bod%C3%ADk" volume: "3443" series: "Lecture Notes in Computer Science" publisher: "Springer" isbn: "3-540-25411-0" kind: "inproceedings" key: "OlmosV05" - title: "Strategies for Source-to-Source Constant Progagation" author: - name: "Karina Olmos" link: "https://researchr.org/profile/karinaolmos/publications" - name: "Eelco Visser" link: "http://eelcovisser.org" year: "2002" doi: "https://doi.org/10.1016/S1571-0661(04)80605-4" abstract: "Data-flow optimizations are usually implemented on low-level intermediate repre- sentations. This is not appropriate for source-to-source optimizations, which re- construct a source level program after transformation. In this paper we show how constant propagation, a well known data-flow optimization problem, can be imple- mented on abstract syntax trees in Stratego, a rewriting system extended with programmable rewriting strategies for the control over the application of rules and dynamic rewrite rules for the propagation of information. " links: doi: "https://doi.org/10.1016/S1571-0661(04)80605-4" tags: - "control systems" - "model-to-model transformation" - "optimization" - "rule-based" - "graph transformation" - "dynamic rewrite rules" - "abstract syntax" - "Stratego/XT" - "data-flow programming" - "data-flow" - "source-to-source" - "graph-rewriting" - "rules" - "transformation system" - "model transformation" - "program optimization" - "rewriting" - "constant propagation" - "rewriting strategies" - "open-source" - "transformation" - "Stratego" - "program transformation" researchr: "https://researchr.org/publication/OlmosV02" cites: 0 citedby: 0 journal: "Electronic Notes in Theoretical Computer Science" volume: "70" number: "6" pages: "156-175" kind: "article" key: "OlmosV02"