A Fold/Unfold Transformation Framework for Rewrite Theories and its Application to CCT Technical Report

Many transformation systems for program optimization, program synthesis, and program specialization are based on fold/unfold transformations. In this paper, we present a fold/unfold‐based transformation framework for rewriting logic theories which is based on narrowing. For the best of our knowledge, this is the first fold/unfold transformation framework which allows one to deal with functions, rules, equations, sorts, and algebraic laws (such as commutativity and associativity). We provide correctness results for the transformation system w.r.t. the semantics of ground reducts. Moreover, we show how our transformation technique can be naturally applied to implement a Code Carrying Theory (CCT) system. CCT is an approach for securing delivery of code from a producer to a consumer where only a certificate (usually in the form of assertions and proofs) is transmitted from the producer to the consumer who can check its validity and then extract executable code from it. Within our framework, the certificate consists of a sequence of transformation steps which can be applied to a given consumer specification in order to automatically synthesize safe code in agreement with the original requirements. We also provide an implementation of the program transformation framework in the high‐performance, rewriting logic language Maude which, by means of an experimental evaluation of the system, highlights the potentiality of our approach.

[1]  María Alpuente,et al.  Rules + strategies for transforming lazy functional logic programs , 2004, Theor. Comput. Sci..

[2]  Eelco Visser,et al.  A Survey of Strategies in Program Transformation Systems , 2001, WRS.

[3]  David R. Musser,et al.  Code-carrying theory , 2008, SAC '08.

[4]  Patrick Viry Rewriting: An Effective Model of Concurrency , 1994, PARLE.

[5]  George C. Necula,et al.  Proof-Carrying Code , 2011, Encyclopedia of Cryptography and Security.

[6]  Michael J. Maher A Transformation System for Deductive Database Modules with Perfect Model Semantics , 1989, FSTTCS.

[7]  John Darlington,et al.  A semantic approach to automatic program improvement , 1972 .

[8]  Alberto Pettorossi,et al.  Rules and strategies for transforming functional and logic programs , 1996, CSUR.

[9]  José Meseguer,et al.  A Sufficient Completeness Checker for Linear Order-Sorted Specifications Modulo Axioms , 2006, IJCAR.

[10]  Narciso Martí-Oliet,et al.  The Maude 2.0 System , 2003, RTA.

[11]  Wei-Ngan Chin,et al.  Effective Optimization of Multiple Traversals in Lazy Languages , 1999, PEPM.

[12]  Konstantinos Arkoudas Denotational proof languages , 2000 .

[13]  José Meseguer,et al.  Conditioned Rewriting Logic as a United Model of Concurrency , 1992, Theor. Comput. Sci..

[14]  Zohar Manna,et al.  Toward automatic program synthesis , 1971, Symposium on Semantics of Algorithmic Languages.

[15]  José Meseguer,et al.  Rewriting logic: roadmap and bibliography , 2002, Theor. Comput. Sci..

[16]  John Darlington,et al.  Some transformations for developing recursive programs , 1975, Reliable Software.

[17]  José Meseguer,et al.  Unification and Narrowing in Maude 2.4 , 2009, RTA.

[18]  José Meseguer,et al.  Symbolic reachability analysis using narrowing and its application to verification of cryptographic protocols , 2007, High. Order Symb. Comput..

[19]  Claude Kirchner,et al.  ELAN from a rewriting logic point of view , 2002, Theor. Comput. Sci..

[20]  John Darlington,et al.  A Transformation System for Developing Recursive Programs , 1977, J. ACM.

[21]  Oege de Moor,et al.  Generic Program Transformation , 1998, Advanced Functional Programming.

[22]  Alberto Pettorossi,et al.  Transformation of Logic Programs: Foundations and Techniques , 1994, J. Log. Program..

[23]  José Meseguer,et al.  Specification and proof in membership equational logic , 2000, Theor. Comput. Sci..

[24]  John C. Shepherdson,et al.  Unfold/fold transformations of logic programs , 1992, Mathematical Structures in Computer Science.

[25]  Annalisa Bossi,et al.  Basic Transformation Operations which Preserve Computed Answer Substitutions of Logic Programs , 1993, J. Log. Program..

[26]  Narciso Martí-Oliet,et al.  All About Maude - A High-Performance Logical Framework, How to Specify, Program and Verify Systems in Rewriting Logic , 2007, All About Maude.

[27]  Tadashi Kanamori,et al.  Preservation of Stronger Equivalence in Unfold/Fold Logic Program Transformation , 1990, Theor. Comput. Sci..

[28]  David Sands,et al.  Total correctness by local improvement in the transformation of functional programs , 1996, TOPL.

[29]  Yuki Chiba,et al.  Program transformation by templates based on term rewriting , 2005, PPDP.

[30]  Jan Willem Klop,et al.  Term Rewriting Systems: From Church-Rosser to Knuth-Bendix and Beyond , 1990, ICALP.

[31]  Jan A. Bergstra,et al.  Algebraic specification , 1989 .

[32]  William L. Scherlis,et al.  Program improvement by internal specialization , 1981, POPL '81.

[33]  Francisco Durán,et al.  MTT: The Maude Termination Tool (System Description) , 2008, IJCAR.

[34]  Joseph A. Goguen,et al.  Software Engineering with Obj: Algebraic Specification In Action , 2010 .

[35]  Francisco Durán,et al.  A Church-Rosser Checker Tool for Conditional Order-Sorted Equational Maude Specifications , 2010, WRLA.

[36]  Wei-Ngan Chin Towards an automated tupling strategy , 1993, PEPM '93.