skip to main content
10.1145/1706356.1706367acmconferencesArticle/Chapter ViewAbstractPublication PagespepmConference Proceedingsconference-collections
research-article

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

Published:18 January 2010Publication History

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.

References

  1. 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 ScholarGoogle Scholar
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. K. Arkoudas. Denotational Proof Languages. PhD thesis, Massachusetts Institute of Technology, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. K. Arkoudas. An Athena tutorial, 2005. Available at: http://www.cag.csail.mit.edu/kostas/dpls/athena/athenaTutorial.pdf.Google ScholarGoogle Scholar
  5. J.A. Bergstra, J. Heering, and P. Klint. Algebraic Specification. ACM Press, 1989. Google ScholarGoogle Scholar
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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 ScholarGoogle ScholarCross RefCross Ref
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. R.M. Burstall and J. Darlington. Some Transformations for Developing Recursive Programs. SIGPLAN Not., 10(6):465--472, 1975. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. R.M. Burstall and J. Darlington. A Transformation System for Developing Recursive Programs. Journal of ACM, 24(1):44--67, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle Scholar
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. J. Darlington. A Semantic Approach to Automatic Program Improvement. PhD thesis, Department of Machine Intelligence, Edimburgh University, Edimburgh, U.K., 1972.Google ScholarGoogle Scholar
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. R. Diaconescu and K. Futatsugi. CafeOBJ Report, volume 6 of AMAST Series in Computing. World Scientific, AMAST Series, 1998.Google ScholarGoogle Scholar
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle Scholar
  22. M. Fay. First Order Unification in an Equational Theory. In Proc. of 4th International Conference on Automated Deduction, pages 161--167, 1979.Google ScholarGoogle Scholar
  23. 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 ScholarGoogle Scholar
  24. 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 ScholarGoogle Scholar
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. T. Kawamura and T. Kanamori. Preservation of Stronger Equivalence in Unfold/Fold Logic Program Transformation. Theoretical Computer Science, 75:139--156, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  28. M.J. Maher. A Transformation System for Deductive Database Modules with Perfect Model Semantics. Theoretical Computer Science, 110(2):377--403, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Z. Manna and R.J. Waldinger. Toward Automatic Program Synthesis. Communication of the ACM, 14(3):151--165, 1971. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. N. Martí-Oliet and J. Meseguer. Rewriting Logic: Roadmap and Bibliography. Theoretical Computer Science, 285(2):121--154, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  32. José Meseguer. Conditioned Rewriting Logic as a United Model of Concurrency. Theoretical Computer Science, 96(1):73--155, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  34. G. Sittampalam O. de Moore. Generic Program Transformation. In Advanced Functional Programming, pages 116--149, 1998.Google ScholarGoogle Scholar
  35. A. Pettorossi and M. Proietti. Transformation of Logic Programs: Foundations and Techniques. Journal of Logic Programming, 19,20:261--320, 1994.Google ScholarGoogle ScholarCross RefCross Ref
  36. A. Pettorossi and M. Proietti. Rules and Strategies for Transforming Functional and Logic Programs. ACM Computing Surveys, 28(2):360--414, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  38. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  39. 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 ScholarGoogle Scholar
  40. The Maude Team. Full Maude, 2009. Available at: http://www.lcc.uma.es/ duran/FullMaude/Google ScholarGoogle Scholar
  41. A. Vargun. Code-Carrying Theory. PhD thesis, Rensselaer Polytechnic Institute, Troy, NY, USA, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  43. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  44. E. Visser. A Survey of Strategies in Program Transformation Systems. Electronic Notes in Theoretical Computer Science, 57:109--143, 2001.Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

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

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      PEPM '10: Proceedings of the 2010 ACM SIGPLAN workshop on Partial evaluation and program manipulation
      January 2010
      168 pages
      ISBN:9781605587271
      DOI:10.1145/1706356

      Copyright © 2010 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 18 January 2010

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate66of120submissions,55%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader