A fold/unfold transformation framework for rewrite theories extended to CCT

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]  Hisao Tamaki,et al.  Unfold/Fold Transformation of Logic Programs , 1984, ICLP.

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

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

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

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

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

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

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

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

[10]  Demis Ballis,et al.  A Fold/Unfold Transformation Framework for Rewrite Theories and its Application to CCT Technical Report , 2010 .

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

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

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

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

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

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

[17]  Konstantine Arkoudas An Athena tutorial , 2005 .

[18]  J. Darlington,et al.  Functional Programming and its Applications: An Advanced Course , 1982 .

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

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

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

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

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

[24]  Konstantinos Arkoudas Denotational proof languages , 2000 .

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

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

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

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

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

[30]  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.

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

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

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

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

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

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

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

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

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

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