Hostname: page-component-cd9895bd7-gxg78 Total loading time: 0 Render date: 2024-12-26T09:34:51.108Z Has data issue: false hasContentIssue false

A generalization of the trie data structure

Published online by Cambridge University Press:  04 March 2009

Richard H. Connelly
Affiliation:
Department of Mathematics and Computer Science, Providence College, River and Eaton Streets, Providence, Rhode Island 02918, USA. Email: rconnell@sequent1.providence.edu
F. Lockwood Morris
Affiliation:
School of Computer and Information Science, 4–116 Center for Science and Technology, Syracuse University, Syracuse, New York 13244–4100, USA. Email: lockwood@top.cis.syr.Edu

Abstract

Tries, a form of string-indexed look-up structure, are generalized, in a manner first discovered by Wadsworth, to permit indexing by terms built according to an arbitrary signature. The construction is parametric with respect to the type of data to be stored as values; this is essential, because the recursion that defines tries appeals from one value type to others. ‘Trie’ (for any fixed signature) is then a functor, and the corresponding look-up function is a natural isomorphism.

The trie functor is in principle definable by the ‘initial fixed point’ semantics of Smyth and Plotkin. We simplify the construction, however, by introducing the ‘category-cpo’, a class of category within which calculations can retain some domain-theoretic flavor. Our construction of tries extends easily to many-sorted signatures.

Type
Research Article
Copyright
Copyright © Cambridge University Press 1995

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Beierle, C. (1985) Algebraic Implementations in an Integrated Software Development and Verification System, dissertation, University of Kaiserlautern.Google Scholar
Casley, R., Crew, R. F., Meseguer, J. and Pratt, V. (1989) Temporal Structures. In: Category Theory and Computer Science. Springer-Verlag Lecture Notes in Computer Science 389.CrossRefGoogle Scholar
Connelly, R. H. (1990) A Comparison of Semantic Domains for Interleaving, dissertation, Syracuse University.Google Scholar
Connelly, R. H. and Morris, F. L. (1993) A Generalization of the Trie Data Structure. Syracuse University School of Computer and Information Science report SU-CIS-93–23.Google Scholar
Fredkin, E. (1960) Trie Memory. Comm. ACM 3 (3) 490499.CrossRefGoogle Scholar
Goguen, J. A., Thatcher, J. W., Wagner, E. G. and Wright, J. B. (1977) Initial Algebra Semantics and Continuous Algebras. J. ACM 24 6895.CrossRefGoogle Scholar
Henglein, F. (1993) Type Inference with Polymorphic Recursion. ACM Transactions on Programminmg Languages and Systems 15 253289.CrossRefGoogle Scholar
Knuth, D. E. (1973) The Art of Computer Programming, Vol. 3: Sorting and Searching, Addison-Wesley.Google Scholar
Larsen, K. G. and Winskel, G. (1991) Using Information Systems to Solve Recursive Domain Equations. Information and Computation 91 232258.CrossRefGoogle Scholar
Mac Lane, S. (1971) Categories for the Working Mathematician, Springer-Verlag Graduate Texts in Mathematics 5.CrossRefGoogle Scholar
Poigné, A. (1985) Cartesian Closure – Higher Types in Categories. In: Category Theory and Computer Programming. Springer-Verlag Lecture Notes in Computer Science 240.Google Scholar
kReynolds, J. C. (1974) On the Relation between Direct and Continuation Semantics. In: Automata, Languages, and Programming - Second Colloquium. Springer-Verlag Lecture Notes in Computer Science 14.CrossRefGoogle Scholar
Reynolds, J. C. (1988) Semantics as a Design Tool. Class notes for CS15–850A - Advanced Topics in Theory, Carnegie-Mellon University.Google Scholar
Smyth, M. B. and Plotkin, G. D. (1982) The Category-Theoretic Solution of Recursive Domain Equations. SIAM J. on Computing 11 761783.CrossRefGoogle Scholar
Spivey, M. (1989) A Categorical Approach to the Theory of Lists. In: van de Snepscheut, J. L. A. (ed.) Mathematics of Program Construction. Springer-Verlag Lecture Notes in Computer Science 375 399408.CrossRefGoogle Scholar
Wadsworth, C. P. (1979) Recursive Type Operators which are More than Type Schemes. Bulletin of the EATCS 8 8788. (Abstract of talk given at the 2nd International Workshop on the Semantics of Programming Languages, Bad Honnef, Germany, 19–23 March 1979.)Google Scholar