Abstract
Programs which process tree structures usually cannot handle cyclic trees. This paper describes some new, very simple, and efficient algorithms for detecting and traversing cyclic trees. Traversed structures do not have to be modified. Tail recursion optimisation can be used, which reduces stack requirements greatly. The over head for non-cyclic structures is very small.
This is a preview of subscription content, log in via an institution.
Preview
Unable to display preview. Download preview PDF.
9. References
Colmerauer, A.: "Prolog and Infinite Trees". In Clark. K. and Tärnlund, S.-Å.: (eds.): "Logic Programming." Academic Press, 1982.
Fages. F.: "Note sur l'unification des termes de premier ordre finis et infinis." In conf. proc. Dincbas. M. (ed.): "Programmation en logique." Perros-Guirrec. France. March 22–23. 1983.
Filgueiras, M.: "A Prolog interpreter working with infinite terms”. In Campbell, J.A. (ed.); “Implementations of Prolog,” Ellis Horwood, Chichester, 1985.
Haridi, S., Sahlin, D.: “Efficient implementation of unification of cyclic structures.” In Campbell, J.A. (ed.): “Implementations of Prolog.” Ellis Horwood, Chichester, 1985.
Knuth, D.E.: “The Art of Computer Programming,” vol. 2, Seminumerical Algorithms, 2nd ed., problems 3.1.6-7. p. 7, 517–518. Addison-Wesley, 1981.
Mukai, K.: “A Unification algorithm for Infinite Trees.” In Bundy, A. (ed.): Proc. of the Int. Joint Conf. on Artificial Intelligence. August 1983.
Nilsson, M., Tanaka, H., Moto-oka, T.: “Detection of Cyclic Tree Structures:” In The Japanese Information Processing Society: Proc. 32nd Nat. Japanese Conf. Information Processing, 4C-6, 1986.
Sedgewick, R. and Szymanski, S.G.: “The Complexity of Finding Periods.” In Proc. ACM Symp. Th. Comp. 11. p. 74–80, 1979.
Yuhara, M., Koike, H., Tanaka, H., Moto-oka, T.: “A Unify Processor Pilot Machine for PIE.” In Proc. of the Japanese Logic Programming Conference '84, Tokyo, March 1984.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1986 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Nilsson, M., Tanaka, H. (1986). Cyclic tree traversal. In: Shapiro, E. (eds) Third International Conference on Logic Programming. ICLP 1986. Lecture Notes in Computer Science, vol 225. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-16492-8_108
Download citation
DOI: https://doi.org/10.1007/3-540-16492-8_108
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-16492-0
Online ISBN: 978-3-540-39831-8
eBook Packages: Springer Book Archive