-
Notifications
You must be signed in to change notification settings - Fork 1
Support Tools Design Doc v 4.0
A shell which, when given a trie, can print out a variety of visualizations of the trie for debugging purposes.
Currently, all commands within the shell must indicate the index of one of three hardcoded tries (0, 1, or 2). We hope to allow for a key-based interaction with a remote Redis server soon. This document will be updated when such functionality is integrated. At that time, the shell will interface with the API team's functions in order to access the Redis server.
This visualization will be exhaustive and print out each node of the trie, whether or not the node is a word.
Debugging the flow of a trie
print 0
This visualization will be exhaustive and print out each child node of the trie of a certain prefix, whether or not the node is a word.
Debugging the flow of a trie
print 0 all pre
This visualization will print out every word in the trie.
Debugging whether words are correctly counted as words and not strings
This visualization will print out every word in the trie with a given prefix.
Debugging whether words are correctly counted as words and not strings
This visualization will print out the leaves of the trie (or the words which have no children)
Debugging how extensive the words the trie contains is
print 0 only-leaves
This visualization will print out the leaves of the trie (or the words which have no children)
Debugging how extensive the words the trie contains is
print 0 only-leaves pre
This visualization would
Note: # refers to the hardcoded trie to call
- Basic print: ' ' ' print # ' ' '
- Printing only words: ''' print # only-words '''
- Printing only words that begin with a prefix: ''' print # only-words prefix '''
- Printing only leaves ''' print # only-leaves '''
- Printing only leaves that begin with a prefix: ''' print # only-leaves prefix '''
- Printing n-completions: ''' print # n-completions letter # '''
- Elizabeth Crowdus
- Marco Kaisth
- Maxine King
- Hongji Li
- Richard Pei
- This project was supervised by:
- Borja Sotomayor (class instructor)
- Lydia Filipe (class TA)