Skip to main content

Computing with conditional rewrite rules

  • Part 1 Research Articles
  • Conference paper
  • First Online:
  • 125 Accesses

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 308))

Abstract

We present a method for validating abstract data type specifications. The method takes as input a set of ground terms L 0 and a set of conditional equations A 0 over L 0. The object of this method is to find a normal form function, Norm, for the pair 〈 L 0, A 0 〉. The function Norm is computed as a sequence of step functions S 1, S 2, ..., S n.

Each step function S i, 0 ≤ in, takes as input a pair 〈 L i−1, A i−1 〉, where L i−1 is a set of ground terms and A i is a set of conditional equations over the set of terms L i−1. At each step i, a set of equations E i is selected from the set of theorems of the pair 〈 L i−1, A i−1 〉. The set of equations E i is transformed into a set of reductions R i. The step function S i is defined as the top-down reduction extention of R i to L i−1. The output of S i is the pair 〈 L i, Ai 〉, where L i is the set of normal forms of L i−1 under the set of reductions R i and A i is the set of normal forms of the equations in A i−1 under the same set of reductions. This way, a theorem in the system 〈 L i−1, A i−1 〉 becomes a theorem in the system 〈 L i, Ai 〉. The last step, S n, has as output the pair 〈 L n, φ 〉. The only theorems in 〈 L n, φ 〉 are the identities. This way the sequence\(< L_0 ,A_0 > \mathop \to \limits^{S_1 } < L_1 ,A_1 > \mathop \to \limits^{S_2 } ... < L_{n - 1} ,A_{n - 1} > \mathop \to \limits^{S_n } < A_n ,\phi >\)gives us a procedure to compute the normal form of the terms in 〈 L 0, A 0 〉.

In this paper we present criteria for choosing the sets of equations E i which simplify the pair 〈 L i−1, A i−1 〉. We also present results that characterize the output set 〈 L i, Ai 〉 of S i as a function of the set 〈 L i−1, A i−1 〉 and of the set of reductions R i. If the sets of reductions R i are confluent and terminating, then they can be combined, by using a priority system similar to the one developed by Baeten, Bergstra and Klop, to form a confluent and terminating set of reductions on the set 〈 L 0, A 0 〉.

This is a preview of subscription content, log in via an institution.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

5. Bibliography

  1. Baeten, J.C.M.,Bergstra, J.A., and Klop, J.W.:“Term Rewriting Systems with Priorities”, in Proceedings of the 2nd Conference on Rewriting Techniques and Applications, edited by P.Lescanne, Springer-Verlag Lecture Notes in Computer Science, Vol. 256, 1987, pp. 83–94.

    Google Scholar 

  2. Ehrig,H. and Mahr,B.:Fundamentals of Algebraic Specifications 1: Equations and Initial Semantics, Springer-Verlag, 1985.

    Google Scholar 

  3. Goguen,J.A., Thatcher,J.W., Wagner, E.G.:“An Initial Algebra Approach to the Specification, Correctness and Implementation of Abstract Data Types”, in Current Trends in Programming Methodology IV: Data Structuring, Editor R. Yeah, Prentice Hall, 1978, pp. 80–144.

    Google Scholar 

  4. Huet, G.:“Confluent Reductions: Abstract Properties and Applications”, in Journal of the ACM, Vol. 27, 1980,pp. 797–821.

    Article  Google Scholar 

  5. Huet,G.,and Oppen,D.:“Equations and Rewrite Rules:A Survey”, in Formal Language Theory:Perspectives and Open Problems, Editor R.Book, Academic Press, 1980,pp. 349–405.

    Google Scholar 

  6. Jouannaud, J. and Kirchner, H.:“Completion of a Set Rules Modulo a Set of Equations”, SIAM Journal of Computing, Vol.15(4), 1986, pp. 1155–1194.

    Article  Google Scholar 

  7. Kaplan,S.:“Symplifying Conditional Term Rewriting Systems: Unification, Termination and Confluence”,L.R.I. Report 316, December, 1986.

    Google Scholar 

  8. Klop,J.W.:“Term Rewriting Systems: A Tutorial”,in Bulletin of EATCS,No.32, June 1987, pp.143–182.

    Google Scholar 

  9. Knuth,D. and Bendix, P.:“Simple Word Problems in Universal Algebras”, in Computational Problems in Abstract Algebra, edited by J. Leech, Pergamon Press, 1970, pp. 263–297.

    Google Scholar 

  10. Pelin,A., and Gallier,J.:“Building Exact Computation Sequences”, to appear in Theoretical Computer Science.

    Google Scholar 

  11. Pelin,A., and Gallier,J.:“Exact Computation Sequences”, in 11th Colloquium on Trees in Algebra and Programming, edited by P. Franchi-Zannettacci, Springer-Verlag Lecture Notes in Computer Science, Vol. 214, pp.45–59.

    Google Scholar 

  12. Zhang,H., and Remy,J.-L.: “Contextual Rewriting”, in Proceedings of the 1st Conference on Rewriting Techniques and Applications, edited by J.P. Jouannaud, Springer-Verlag Lecture notes in Computer Science, Vol. 202, pp. 46–62.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

S. Kaplan J. -P. Jouannaud

Rights and permissions

Reprints and permissions

Copyright information

© 1988 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Pelin, A. (1988). Computing with conditional rewrite rules. In: Kaplan, S., Jouannaud, J.P. (eds) Conditional Term Rewriting Systems. CTRS 1987. Lecture Notes in Computer Science, vol 308. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-19242-5_15

Download citation

  • DOI: https://doi.org/10.1007/3-540-19242-5_15

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-19242-8

  • Online ISBN: 978-3-540-39166-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics