ABSTRACT
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.
- M. Alpuente, M. Baggi, D. Ballis, and M. Falaschi. A Fold/Unfold Framework for Rewrite Theories and its Application to CCT. Technical Report DSIC-II/06/2009, Technical University of Valencia, 2009.Google Scholar
- M. Alpuente, M. Falaschi, G. Moreno, and G. Vidal. Rules Strategies for Transforming Lazy Functional Logic Programs. Theoretical Computer Science, 311(1-3):479--525, 2004. Google ScholarDigital Library
- K. Arkoudas. Denotational Proof Languages. PhD thesis, Massachusetts Institute of Technology, 2000. Google ScholarDigital Library
- K. Arkoudas. An Athena tutorial, 2005. Available at: http://www.cag.csail.mit.edu/kostas/dpls/athena/athenaTutorial.pdf.Google Scholar
- J.A. Bergstra, J. Heering, and P. Klint. Algebraic Specification. ACM Press, 1989. Google Scholar
- P. Borovanský, C. Kirchner, H. Kirchner, and P.E. Moreau. ELAN from a Rewriting Logic Point of View. Theoretical Computer Science, 285:155--185, 2002. Google ScholarDigital Library
- A. Bossi and N. Cocco. Basic Transformation Operations which preserve Computed Answer Substitutions of Logic Programs. Journal of Logic Programming, 16:47--87, 1993.Google ScholarCross Ref
- A. Bouhoula, J.P. Jouannaud, and J. Meseguer. Specification and Proof in Membership Equational Logic. Theoretical Computer Science, 236(1-2):35--132, 2000. Google ScholarDigital Library
- R.M. Burstall and J. Darlington. Some Transformations for Developing Recursive Programs. SIGPLAN Not., 10(6):465--472, 1975. Google ScholarDigital Library
- R.M. Burstall and J. Darlington. A Transformation System for Developing Recursive Programs. Journal of ACM, 24(1):44--67, 1977. Google ScholarDigital Library
- Y. Chiba, T. Aoto, and Y. Toyama. Program Transformation by Templates Based on Term Rewriting. In Proc. of the 7th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming, (PPDP '05), pages 59--69, New York, NY, USA, 2005. ACM. Google ScholarDigital Library
- W. Chin. Towards an Automated Tupling Strategy. In Proc. of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, (PEPM '93), pages 119--132. ACM, 1993. Google ScholarDigital Library
- W. Chin, A. Goh, and S. Khoo. Effective Optimisation of Multiple Traversals in Lazy Languages. In Proc. of Partial Evaluation and Semantics-Based Program Manipulation, San Antonio, Texas, USA (Technical Report BRICS-NS-99-1), pages 119--130. University of Aarhus, DK, 1999.Google Scholar
- M. Clavel, F. Durán, S. Eker, S. Escobar, P. Lincoln, N. Martí-Oliet, J. Meseguer, and C. Talcott. Unification and Narrowing in Maude 2.4. In Proc. of the 20th International Conference on Rewriting Techniques and Applications, (RTA '09), Brasília, Brazil, 2009, volume 5595 of Lecture Notes in Computer Science, pages 380--390. Springer-Verlag, 2009. Google ScholarDigital Library
- M. Clavel, F. Durán, S. Eker, P. Lincoln, N. Martí-Oliet, J. Meseguer, and C. Talcott. The Maude 2.0 System. In Robert Nieuwenhuis, editor, Rewriting Techniques and Applications (RTA '03), volume 2706 of Lecture Notes in Computer Science, pages 76--87. Springer-Verlag, 2003. Google ScholarDigital Library
- M. Clavel, F. Durán, S. Eker, P. Lincoln, N. Martí-Oliet, J. Meseguer, and C. Talcott. All About Maude -- A High-Performance Logical Framework. Springer-Verlag New York, Inc., Secaucus, NJ, USA, 2007. Google ScholarDigital Library
- J. Darlington. A Semantic Approach to Automatic Program Improvement. PhD thesis, Department of Machine Intelligence, Edimburgh University, Edimburgh, U.K., 1972.Google Scholar
- J. Darlington. Program Transformation. In J. Darlington, P. Henderson, and D.A. Turner, editors, Functional Programming and its Applications, pages 193--215. Cambridge University Press, 1982. Google ScholarDigital Library
- R. Diaconescu and K. Futatsugi. CafeOBJ Report, volume 6 of AMAST Series in Computing. World Scientific, AMAST Series, 1998.Google Scholar
- F. Durán, S. Lucas, and J. Meseguer. MTT: The Maude Termination Tool (System Description). In Proc. of the 4th International Joint Conference on Automated Reasoning, (IJCAR '08), pages 313--319, Berlin, Heidelberg, 2008. Springer-Verlag. Google ScholarDigital Library
- F. Durán and J. Meseguer. A Church-Rosser Checker Tool for Maude Equational Specifications. Technical report, Universidad de Málaga and SRI International, July 2000.Google Scholar
- M. Fay. First Order Unification in an Equational Theory. In Proc. of 4th International Conference on Automated Deduction, pages 161--167, 1979.Google Scholar
- P.A. Gardner and J.C. Shepherdson. Unfold/Fold Transformation of Logic Programs. In J.L Lassez and G. Plotkin, editors, Computational Logic, Essays in Honor of Alan Robinson, pages 565--583. MIT, 1991.Google Scholar
- J. Goguen, T. Winkler, J. Meseguer, K. Futatsugi, and J.P. Jouannaud. Introducing OBJ. In Software Engineering with OBJ: Algebraic Specification in Action, pages 3--167. Kluwer, 2000.Google Scholar
- J. Hendrix, J. Meseguer, and H. Ohsaki. A Sufficient Completeness Checker for Linear Order-Sorted Specifications Modulo Axioms. In U. Furbach and N. Shankar, editors, 3rd International Joint Conference on Automated Reasoning, volume 4130 of Lecture Notes in Computer Science, pages 151--155. Springer, 2006. Google ScholarDigital Library
- T. Kawamura and T. Kanamori. Preservation of Stronger Equivalence in Unfold/Fold Logic Program Transformation. Theoretical Computer Science, 75:139--156, 1990. Google ScholarDigital Library
- J.W. Klop. Term Rewriting Systems. In S. Abramsky, D. Gabbay, and T. Maibaum, editors, Handbook of Logic in Computer Science, volume I, pages 1--112. Oxford University Press, 1992. Google ScholarDigital Library
- M.J. Maher. A Transformation System for Deductive Database Modules with Perfect Model Semantics. Theoretical Computer Science, 110(2):377--403, 1993. Google ScholarDigital Library
- Z. Manna and R.J. Waldinger. Toward Automatic Program Synthesis. Communication of the ACM, 14(3):151--165, 1971. Google ScholarDigital Library
- N. Martí-Oliet and J. Meseguer. Rewriting Logic: Roadmap and Bibliography. Theoretical Computer Science, 285(2):121--154, 2002. Google ScholarDigital Library
- J. Meseguer and P. Thati. Symbolic Reachability Analysis Using Narrowing and its Application to Verification of Cryptographic Protocols. Higher Order Symbolic Computation, 20(1-2):123--160, 2007. Google ScholarDigital Library
- José Meseguer. Conditioned Rewriting Logic as a United Model of Concurrency. Theoretical Computer Science, 96(1):73--155, 1992. Google ScholarDigital Library
- G.C. Necula. Proof-Carrying Code. In Proc. of the 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, (POPL '97), pages 106--119, New York, NY, USA, 1997. ACM. Google ScholarDigital Library
- G. Sittampalam O. de Moore. Generic Program Transformation. In Advanced Functional Programming, pages 116--149, 1998.Google Scholar
- A. Pettorossi and M. Proietti. Transformation of Logic Programs: Foundations and Techniques. Journal of Logic Programming, 19,20:261--320, 1994.Google ScholarCross Ref
- A. Pettorossi and M. Proietti. Rules and Strategies for Transforming Functional and Logic Programs. ACM Computing Surveys, 28(2):360--414, 1996. Google ScholarDigital Library
- D. Sands. Total Correctness by Local Improvement in the Transformation of Functional Programs. ACM Transactions on Programming Languages and Systems, 18(2):175--234, March 1996. Google ScholarDigital Library
- W. Scherlis. Program Improvement by Internal Specialization. In Proc. of the 8th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, (POPL '81), pages 41--49, New York, NY, USA, 1981. ACM. Google ScholarDigital Library
- H. Tamaki and T. Sato. Unfold/Fold Transformations of Logic Programs. In Proc. of the 2nd International Conference on Logic Programming, (ICLP '84), pages 127--139, 1984.Google Scholar
- The Maude Team. Full Maude, 2009. Available at: http://www.lcc.uma.es/ duran/FullMaude/Google Scholar
- A. Vargun. Code-Carrying Theory. PhD thesis, Rensselaer Polytechnic Institute, Troy, NY, USA, 2006. Google ScholarDigital Library
- A. Vargun and D.R. Musser. Code-Carrying Theory. In ACM Symposium on Applied Computing, pages 376--383, New York, NY, USA, 2008. ACM. Google ScholarDigital Library
- P. Viry. Rewriting: An effective Model of Concurrency. In Proc. of the 6th International Conference on Parallel Architectures and Languages Europe, (PARLE '94), pages 648--660, London, UK, 1994. Springer--Verlag. Google ScholarDigital Library
- E. Visser. A Survey of Strategies in Program Transformation Systems. Electronic Notes in Theoretical Computer Science, 57:109--143, 2001.Google ScholarCross Ref
Index Terms
- A fold/unfold transformation framework for rewrite theories extended to CCT
Recommendations
An unfold/fold transformation framework for definite logic programs
Given a logic program P, an unfold/fold program transformation system derives a sequence of programs P = P0, P1, …, Pn, such that Pi+1 is derived from Pi by application of either an unfolding or a folding step. Unfold/fold transformations have been ...
On inductive proofs by extended unfold/fold transformation rules
LOPSTR'10: Proceedings of the 20th international conference on Logic-based program synthesis and transformationWe present an extended framework for unfold/fold transformation of stratified logic programs. We extend our previous transformation system which contains, among others, negative unfolding with a new application condition, by introducing extended ...
Completeness of Unfolding for Rewriting Logic Theories
SYNASC '10: Proceedings of the 2010 12th International Symposium on Symbolic and Numeric Algorithms for Scientific ComputingMany transformation systems for program optimization, program synthesis, and program specialization are based on fold/unfold transformations. In this paper, we investigate the semantic properties of a narrowing-based unfolding transformation that is ...
Comments