-
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
The fourth visualization will take a string (not necessarily a word) and print all of its children
Debugging spelling or whether a specific word has been misspelled.
To enter the shell, the user will input:
./trie-viz [file]
From there they will see
Welcome to the Trie-Viz shell!
Please either load in a trie or create a new one.
Elizabeth Crowdus Marco Kaisth Maxine King Hongji Li Richard Pei
This project was supervised by: Borja Sotomayor (class instructor) Lydia Filipe (class TA)