publications: - title: "Strongly Typed Rewriting For Coupled Software Transformation" author: - name: "Alcino Cunha" link: "http://www.di.uminho.pt/~mac" - name: "Joost Visser" link: "http://www.di.uminho.pt/~joost.visser/" year: "2007" doi: "http://dx.doi.org/10.1016/j.entcs.2006.10.019" abstract: "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 type-safe, type-changing 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 type-safely by a generalized abstract data type (GADT). These representations are then subjected to program calculation rules, harnessed in type-safe, type-preserving strategic rewrite systems. For ease of calculation, we use point-free representations and corresponding calculation rules. Thus, coupled transformations are carried out in two steps. First, a type-changing 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 type-preserving 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 type-safe." links: doi: "http://dx.doi.org/10.1016/j.entcs.2006.10.019" tags: - "model-to-model transformation" - "object-oriented programming" - "rule-based" - "graph transformation" - "coupled evolution" - "composition" - "coupled transformation" - "type system" - "data-flow programming" - "data-flow" - "software evolution" - "source-to-source" - "graph-rewriting" - "rules" - "migration" - "strategic programming" - "transformation system" - "model transformation" - "subject-oriented programming" - "safe composition" - "2LT" - "rewriting" - "feature-oriented programming" - "open-source" - "transformation" - "program transformation" researchr: "https://researchr.org/publication/CunhaV07%3A0" cites: 0 citedby: 0 journal: "ENTCS" volume: "174" number: "1" pages: "17-34" kind: "article" key: "CunhaV07:0" - title: "Transformation of structure-shy programs with application to XPath queries and strategic functions" author: - name: "Alcino Cunha" link: "http://www.di.uminho.pt/~mac" - name: "Joost Visser" link: "http://www.di.uminho.pt/~joost.visser/" year: "2010" doi: "DOI: 10.1016/j.scico.2010.01.003" abstract: "Various programming languages allow the construction of structure-shy 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 object-oriented programming. In this paper, we present an algebraic approach to transformation of declarative structure-shy programs, in particular for strategic functions and XML queries. We formulate a rich set of algebraic laws, not just for transformation of structure-shy programs, but also for their conversion into structure-sensitive 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 structure-shy programs. We present a type-safe encoding of these rewrite systems in Haskell which itself uses strategic functional programming techniques. We discuss the application of these rewrite systems for XPath query optimization and for query migration in the context of schema evolution." links: "url": "http://www.sciencedirect.com/science/article/B6V17-4Y5GXTK-1/2/7b68ff063fea2fd01336b7c360ebf859" tags: - "programming languages" - "structure-shy programming" - "optimization" - "object-oriented programming" - "meta programming" - "generic programming" - "graph transformation" - "XML" - "XML Schema" - "tagging" - "graph query" - "transformation language" - "functional programming" - "polytypic programming" - "XPath" - "Haskell" - "type system" - "graph-rewriting" - "migration" - "subtyping" - "strategic programming" - "transformation system" - " algebra" - "programming" - "subject-oriented programming" - "context-aware" - "program optimization" - "Meta-Environment" - "rewriting" - "polytypic" - "systematic-approach" - "feature-oriented programming" - "meta-objects" - "transformation" - "query language" - "program transformation" - "domain-specific language" researchr: "https://researchr.org/publication/Cunha2010" cites: 0 citedby: 0 journal: "SCP" volume: "In Press, Corrected Proof" kind: "article" key: "Cunha2010"