Computing with conditional rewrite rules

  • Alex Pelin
Part 1 Research Articles
Part of the Lecture Notes in Computer Science book series (LNCS, volume 308)


We present a method for validating abstract data type specifications. The method takes as input a set of ground terms L0 and a set of conditional equations A0 over L0. The object of this method is to find a normal form function, Norm, for the pair 〈 L0, A0 〉. The function Norm is computed as a sequence of step functions S1, S2, ..., Sn.

Each step function Si, 0 ≤ in, takes as input a pair 〈 Li−1, Ai−1 〉, where Li−1 is a set of ground terms and Ai is a set of conditional equations over the set of terms Li−1. At each step i, a set of equations Ei is selected from the set of theorems of the pair 〈 Li−1, Ai−1 〉. The set of equations Ei is transformed into a set of reductions Ri. The step function Si is defined as the top-down reduction extention of Ri to Li−1. The output of Si is the pair 〈 Li, Ai 〉, where Li is the set of normal forms of Li−1 under the set of reductions Ri and Ai is the set of normal forms of the equations in Ai−1 under the same set of reductions. This way, a theorem in the system 〈 Li−1, Ai−1 〉 becomes a theorem in the system 〈 Li, Ai 〉. The last step, Sn, has as output the pair 〈 Ln, φ 〉. The only theorems in 〈 Ln, φ 〉 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 〈 L0, A0 〉.

In this paper we present criteria for choosing the sets of equations Ei which simplify the pair 〈 Li−1, Ai−1 〉. We also present results that characterize the output set 〈 Li, Ai 〉 of Si as a function of the set 〈 Li−1, Ai−1 〉 and of the set of reductions Ri. If the sets of reductions Ri 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 〈 L0, A0 〉.


Normal Form Free Algebra Transfer Property Computation Sequence Ground Term 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

5. Bibliography

  1. 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. 2.
    Ehrig,H. and Mahr,B.:Fundamentals of Algebraic Specifications 1: Equations and Initial Semantics, Springer-Verlag, 1985.Google Scholar
  3. 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. 4.
    Huet, G.:“Confluent Reductions: Abstract Properties and Applications”, in Journal of the ACM, Vol. 27, 1980,pp. 797–821.CrossRefGoogle Scholar
  5. 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. 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.CrossRefGoogle Scholar
  7. 7.
    Kaplan,S.:“Symplifying Conditional Term Rewriting Systems: Unification, Termination and Confluence”,L.R.I. Report 316, December, 1986.Google Scholar
  8. 8.
    Klop,J.W.:“Term Rewriting Systems: A Tutorial”,in Bulletin of EATCS,No.32, June 1987, pp.143–182.Google Scholar
  9. 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. 10.
    Pelin,A., and Gallier,J.:“Building Exact Computation Sequences”, to appear in Theoretical Computer Science.Google Scholar
  11. 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. 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

Copyright information

© Springer-Verlag Berlin Heidelberg 1988

Authors and Affiliations

  • Alex Pelin
    • 1
  1. 1.School of Computer ScienceFlorida International UniversityUniversity Park, MiamiU.S.A.

Personalised recommendations