Advertisement

Design strategies for rewrite rules

  • Sergio Antoy
Chapter 5 Architecture, Compilers And Parallel Computation
Part of the Lecture Notes in Computer Science book series (LNCS, volume 516)

Abstract

Term rewriting systems employed for the specification of abstract data types and for very high level programming languages based on rewrite rules are often required to have properties, such as confluence, termination, and sufficient-completeness, which are undecidable. Rather than attempting, as it is usually done, to check these properties in a system a posteriori, i.e. after the rules have been designed, we propose two strategies for addressing this problem a priori, i.e. during the design phase of rules. We propose the concepts of under- and over-specification, determine sufficient and/or necessary conditions to avoid them, show how to obtain these conditions in a constructive way, and relate them to a number of desirable properties which have appeared in the literature. Our approach is based on the completeness and parsimony properties of sets of tuples of terms and on a recursive mechanism which extends primitive recursion from natural numbers to abstract data types. We prove a number of results, illustrate their application to the design of rewriting systems by means of examples, and discuss the power and the limitations of our approach.

Keywords

Rewriting systems Algebraic specifications Under- and Over-specification Completeness Parsimony Termination Confluence Linearity Sufficient-completeness Binary choice procedure Recursive reduction Rewrite rule design 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [ANTO90]
    Antoy S., P. Forcheri, and M.T. Molfino, “Specification-based Code Generation”, 23rd Hawaii Int'l Conf. on System Sciences, Kona, Hawaii, Jan. 3–5, 1990, 165–173.Google Scholar
  2. [BERG89]
    Bergstra J.A., J. Heering, and P. Klint, (eds.) Algebraic Specifications, Addison-Wesley, Wokingham, England, 1989.Google Scholar
  3. [BURS69]
    Burstall L., “Proving Properties of Programs by Structural Induction”, Computer Journal, 21-1, 1969, 41–48.Google Scholar
  4. [DERS85]
    Dershowitz N., “Termination”, Proc. Rewriting Techniques and Applications, Dijon, France, Springer-Verlag, May 1985, 180–223.Google Scholar
  5. [EHRI85]
    Ehrig M. and B. Mahr, Fundamentals of Algebraic Specification 1, Springer-Verlag, Berlin, 1985.Google Scholar
  6. [EMDE87]
    van Emden M. and K. Yukawa, “Logic Programming with Equations”, The Journal of Logic Prog., 4, 265–288, 1987.Google Scholar
  7. [FUTA84]
    Futatsugi K., J.A. Goguen, J. P. Jouannaud, and J. Meseguer, “Principles of OBJ2”, in 12th Annual Symp. on Principles of Prog. Languages, 52–66, SIGPLAN and SIGACT, 1984.Google Scholar
  8. [GARL88]
    Garland S.J. and J.V. Guttag, “Inductive Methods for Reasoning about Abstract Data Types” Proc. of the 15th ACM Conf. on Principle of Prog. Lang., 219–228, 1988.Google Scholar
  9. [GOGU78]
    Goguen J.A., J.W. Thatcher, and E.G. Wagner, “An Initial Algebra Approach to the Specification, Correctness, and Implementation of Abstract Data Types”, in Current Trends in Programming Methodology 4, 80–149 (Ed. R.T. Yeh), Prentice-Hall, Englewood Cliff, NJ, 1978.Google Scholar
  10. [GOGU88]
    Goguen J.A. and T. Winkler, “Introducing OBJ3”, SRI-CSL-88-9, SRI International, Menlo Park, CA, 1988Google Scholar
  11. [GUTT78a]
    Guttag J.V., E. Horowitz, and D. Musser, “The Design of Data Type Specifications”, in Current Trends in Programming Methodology 4, 60–79 (Ed. R.T. Yeh), Prentice-Hall, Englewood Cliff, NJ, 1978.Google Scholar
  12. [GUTT78b]
    Guttag J.V., E. Horowitz, and D. Musser, “Abstract Data Types and Software Validation”, CACM, 21, 1978, 1048–1064.Google Scholar
  13. [GUTT78c]
    Guttag J.V. and J.J. Horning, “The Algebraic Specifications of Abstract Data Types”, Acta Informatica, 10, 1978, 27–52.Google Scholar
  14. [GUTT85a]
    Guttag J.V., J.J. Horning, and J.M. Wing, “The Larch Family of Specification Languages”, IEEE Software, Sept 1985, 24–36.Google Scholar
  15. [GUTT85b]
    Guttag J.V. and Horning J.J., “A Larch Shared Language Handbook” Science of Computer Programming 6–2, 135–157, 1985.Google Scholar
  16. [HALM88]
    Halme H. and J. Heilanen, “GNU Emacs as a Dynamically Extensible Programming Environment”, Software—Practice and Experience, 18–10, 1988, 999–1009.Google Scholar
  17. [HOPC79]
    Hopcroft J.E. and J.D. Ullman, Introduction to Automata Theory, Languages, and Computations, Addison-Wesley, Reading, MA, 1979.Google Scholar
  18. [HUET80a]
    Huet G. and D. Oppen, “Equations and rewrite rules: A survey”, in Formal Language Theory (R. Book, ed.), Academic Press, 1980, 349–405.Google Scholar
  19. [HUET80b]
    Huet G., “Confluent Reductions: Abstract Properties and Applications to Term-Rewriting Systems”, JACM, 27, 1980, 797–821.Google Scholar
  20. [HUET82]
    Huet G. and J.-M. Hullot, “Proofs by Induction in Equational Theories with Constructors”, JCSS 25, 1982, 239–266.Google Scholar
  21. [KAPU87]
    Kapur D., P. Narendran, and H. Zhang, “On Sufficient-Completeness and Related Properties of Term Rewriting Systems”, Acta Informatica, 24, 1987, 395–415.Google Scholar
  22. [KFOU82]
    Kfoury A., R. Moll, and M. Arbib, A Programming Approach to Computability, Springer-Verlag, New York, NY, 1982.Google Scholar
  23. [KNUT70]
    Knuth D.E. and P.B. Bendix, “Simple Word Problems in Universal Algebras”, in Computational Problems in Abstract Algebras, (J. Leech, ed.), Pergamon Press, New York, 1970, 263–297.Google Scholar
  24. [KOUN85]
    Kounalis E., “Completeness in Data Type Specifications”, EUROCAL '85, LNCS 204, 1985, 348–362.Google Scholar
  25. [MANN85]
    Manna Z. and R. Waldinger, The Logical Basis for Computer Programming, Addison-Wesley, Reading, MA, 1985.Google Scholar
  26. [MINS67]
    Minsky M. L., Computation: Finite and Infinite Machines, Prentice-Hall, Englewood Cliffs, NJ, 1967.Google Scholar
  27. [STAL81]
    Stallman R., “Emacs: the Extensible, Customizable, Self-documenting Display Editor”, Proc. ACM SIGPLA/SIGOA Symp. on Text Manipulation, Portland, OR, 1981.Google Scholar
  28. [STAL87]
    Stallman R., GNU Emacs Manual, Sixth ed., Version 18, Free Software Foundation, Cambridge, MA, 1987.Google Scholar
  29. [THIE84]
    Thiel J.J., “Stop Losing Sleep over Incomplete Data Type Specifications”, in 11th Annual Symp. on Principles of Prog. Languages, 76–82, ACM, 1984.Google Scholar
  30. [TOGA87]
    Togashi A. and S Noguchi, “A Program Transformation from Equational Programs into Logic Programs”, The Journal of Logic Prog., 4, 85–103, 1987.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1991

Authors and Affiliations

  • Sergio Antoy
    • 1
  1. 1.Virginia Polytechnic Institute and State University Northern Virginia Graduate CenterFalls Church

Personalised recommendations