Associative-Commutative Rewriting on Large Terms
We introduce a novel representation for associative-commutative (AC) terms which, for certain important classes of rewrite rules, allows both the AC matching and the AC renormalization steps to be accomplished using time and space that is logarithmic in the size of the flattened AC argument lists involved. This novel representation can be cumbersome for other, more general algorithms and manipulations. Hence, we describe machine efficient techniques for converting to and from a more conventional representation together with a heuristic for deciding at runtime when to convert a term to the new representation. We sketch how our approach can be generalized to order-sorted AC rewriting and to other equational theories. We also present some experimental results using the Maude 2 interpreter.
KeywordsFunction Symbol Equational Theory Ground Term Large Term Maximum Multiplicity
Unable to display preview. Download preview PDF.
- 1.G. M. Adel’son-Vel’skii and E. M. Landis. An algorithm for the organization of information. Soviet Mathematics Doklady, 3:1259–1263, 1962.Google Scholar
- 6.M. Clavel, F. Durán, S. Eker, P. Lincoln, N. Martí-Oliet, J. Meseguer, and C. Talcott. The Maude 2.0 system. This volume.Google Scholar
- 7.Thomas H. Cormen, Charles E. Leierson, and Ronald L. Rivest. Introduction to Algorithms. MIT Press and McGra w-Hill, 1990.Google Scholar
- 10.Steven Eker. Fast matching in combinations of regular equational theories. In J. Meseguer, editor, Proceedings of the First International Workshop on Rewriting Logic and its Applications, volume 4 of Electronic Notes in Theoretical Computer Science. Elsevier, 1996.Google Scholar
- 12.S. J. Garland and J. V. Guttag. An overview of LP, the Larch Prover. In N. Dershowitz, editor, Proceedings of 3rd International Conference on Rewriting Techniques and Applications (RTA’ 89), number 355 in Lecture Notes in Computer Science, pages 137–151. Springer-Verlag, April 1989.Google Scholar
- 14.J. A. Goguen, T. Winkler, J. Meseguer, K. Futatsugi, and J.-P. Jouannaud. Introducing OBJ3. Technical Report SRI-CSL-92-03, Computer Science Laboratory, SRI International, March 1992.Google Scholar
- 15.Bernhard Gramlich and Jörg Denzinger. Efficient AC-matching using constraint propagation. Technical report, FB Informatik, Universität Kaiserslautern, Pf. 3049, D-6750, Kaiserslautern, Germany, 1988.Google Scholar
- 16.Ralf Hinze. Constructing red-black trees. In Chris Okasaki, editor, Proceedings of the Workshop on Algorithmic Aspects of Advanced Programming Languages (WAAAPL’ 99), volume CUCS-023-99 of Computer Science Technical Reports, pages 89–99. Columbia University, September 1999.Google Scholar
- 17.M. Ishisone and T. Sawada. Brute: brute force rewriting engine. In Proceedings of the CafeOBJ Symposium’ 98, Numazu, Japan. CafeOBJ Project, April 1998.Google Scholar
- 19.Haim Kaplan and Robert E. Tarjan. Persistent lists with catenation via recursive slowdown. In Proceedings of the 27th Annual ACM Symposium on the Theory of Computing (STOC’ 95), pages 93–102. ACM Press, May 1995.Google Scholar
- 22.Pierre-Etienne Moreau and Helèné Kirchner. A compiler for rewrite programs in associative-commutative theories. In C. Palamidessi, H. Glaser, and K. Meinke, editors, Principles of Declarative Programming (PLILP/ALP’ 98), number 1490 in Lecture Notes in Computer Science, pages 230–249. Springer-Verlag, September 1998.CrossRefGoogle Scholar
- 24.Salvador Roura. A new method for balancing binary search trees. In Fernando Orejas, Paul G. Spirakis, and Jan van Leeuwen, editors, Proceedings of the 28th International Colloquium on Automata, Languages and Programming (ICALP 2001), number 2076 in Lecture Notes in Computer Science, pages 469–480. Springer-Verlag, July 2001.CrossRefGoogle Scholar