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

Cited By

View all
  • (2023)Safety Enforcement via Programmable Strategies in MaudeJournal of Logical and Algebraic Methods in Programming10.1016/j.jlamp.2023.100849(100849)Online publication date: Jan-2023
  • (2019)An Assertion Language for Slicing Constraint Logic LanguagesLogic-Based Program Synthesis and Transformation10.1007/978-3-030-13838-7_9(148-165)Online publication date: 23-Feb-2019
  • (2015)Exploring conditional rewriting logic computationsJournal of Symbolic Computation10.1016/j.jsc.2014.09.02869:C(3-39)Online publication date: 1-Jul-2015
  • Show More Cited By

Index Terms

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

    Recommendations

    Comments

    Information & Contributors

    Information

    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
    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]

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 18 January 2010

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. code carrying theory
    2. fold/unfold transformation
    3. rewriting logic

    Qualifiers

    • Research-article

    Conference

    PEPM '10
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 66 of 120 submissions, 55%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)2
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 22 Feb 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2023)Safety Enforcement via Programmable Strategies in MaudeJournal of Logical and Algebraic Methods in Programming10.1016/j.jlamp.2023.100849(100849)Online publication date: Jan-2023
    • (2019)An Assertion Language for Slicing Constraint Logic LanguagesLogic-Based Program Synthesis and Transformation10.1007/978-3-030-13838-7_9(148-165)Online publication date: 23-Feb-2019
    • (2015)Exploring conditional rewriting logic computationsJournal of Symbolic Computation10.1016/j.jsc.2014.09.02869:C(3-39)Online publication date: 1-Jul-2015
    • (2014)Inspecting Rewriting Logic Computations (in a Parametric and Stepwise Way)Specification, Algebra, and Software10.1007/978-3-642-54624-2_12(229-255)Online publication date: 2014
    • (2012)Enabling USDL by ToolsHandbook of Service Description10.1007/978-1-4614-1864-1_15(385-414)Online publication date: 11-Feb-2012
    • (2011)Backward trace slicing for rewriting logic theoriesProceedings of the 23rd international conference on Automated deduction10.5555/2032266.2032271(34-48)Online publication date: 31-Jul-2011
    • (2011)Backward Trace Slicing for Rewriting Logic TheoriesAutomated Deduction – CADE-2310.1007/978-3-642-22438-6_5(34-48)Online publication date: 2011
    • (2010)Transformation and debugging of functional logic programsA 25-year perspective on logic programming10.5555/1880413.1880427(271-299)Online publication date: 1-Jan-2010
    • (2010)Completeness of Unfolding for Rewriting Logic TheoriesProceedings of the 2010 12th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing10.1109/SYNASC.2010.32(116-123)Online publication date: 23-Sep-2010
    • (2010)Transformation and Debugging of Functional Logic ProgramsA 25-Year Perspective on Logic Programming10.1007/978-3-642-14309-0_13(271-299)Online publication date: 2010

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media