-
Notifications
You must be signed in to change notification settings - Fork 11
/
Assignment9-Boggle-Trie.txt
293 lines (215 loc) · 11.2 KB
/
Assignment9-Boggle-Trie.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
See the Assessment Guide for information on how to interpret this report.
ASSESSMENT SUMMARY
Compilation: PASSED
API: PASSED
Spotbugs: PASSED
PMD: FAILED (1 warning)
Checkstyle: FAILED (0 errors, 4 warnings)
Correctness: 13/13 tests passed
Memory: 3/3 tests passed
Timing: 9/9 tests passed
Aggregate score: 100.00%
[Compilation: 5%, API: 5%, Spotbugs: 0%, PMD: 0%, Checkstyle: 0%, Correctness: 60%, Memory: 10%, Timing: 20%]
ASSESSMENT DETAILS
The following files were submitted:
----------------------------------
5.3K Apr 12 00:31 BoggleSolver.java
********************************************************************************
* COMPILING
********************************************************************************
% javac BoggleSolver.java
*-----------------------------------------------------------
================================================================
Checking the APIs of your programs.
*-----------------------------------------------------------
BoggleSolver:
================================================================
********************************************************************************
* CHECKING STYLE AND COMMON BUG PATTERNS
********************************************************************************
% spotbugs *.class
*-----------------------------------------------------------
================================================================
% pmd .
*-----------------------------------------------------------
BoggleSolver.java:75: Are you using the correct loop index variable? You are modifying an outer 'for' loop index variable in an inner 'for' loop update expression. [JumbledIncrementer]
PMD ends with 1 warning.
================================================================
% checkstyle *.java
*-----------------------------------------------------------
[WARN] BoggleSolver.java:64:13: The local (or parameter) variable 'R' has the same name as an instance variable. Use a different name. [HiddenField]
[WARN] BoggleSolver.java:64:13: The local variable 'R' must start with a lowercase letter and use camelCase. [LocalVariableName]
[WARN] BoggleSolver.java:64:31: The local variable 'C' must start with a lowercase letter and use camelCase. [LocalVariableName]
[WARN] BoggleSolver.java:142:17: The local variable 'N' must start with a lowercase letter and use camelCase. [LocalVariableName]
Checkstyle ends with 0 errors and 4 warnings.
================================================================
********************************************************************************
* TESTING CORRECTNESS
********************************************************************************
Testing correctness of BoggleSolver
*-----------------------------------------------------------
Tests 1-9 create one BoggleSolver object corresponding to the specified
dictionary and call getAllValidWords() with several different boards
as arguments.
Running 13 total tests.
Test 1: check getAllValidWords() on two fixed 4-by-4 boards given in assignment
* dictionary = dictionary-algs4.txt; board = board4x4.txt
* dictionary = dictionary-algs4.txt; board = board-q.txt
==> passed
Test 2: check getAllValidWords() on fixed 4-by-4 boards
* dictionary = dictionary-yawl.txt; board = board4x4.txt
* dictionary = dictionary-yawl.txt; board = board-points1.txt
* dictionary = dictionary-yawl.txt; board = board-points2.txt
* dictionary = dictionary-yawl.txt; board = board-points3.txt
* dictionary = dictionary-yawl.txt; board = board-points4.txt
* dictionary = dictionary-yawl.txt; board = board-points5.txt
==> passed
Test 3: check getAllValidWords() on more fixed 4-by-4 boards
* dictionary = dictionary-yawl.txt; board = board-points100.txt
* dictionary = dictionary-yawl.txt; board = board-points200.txt
* dictionary = dictionary-yawl.txt; board = board-points300.txt
* dictionary = dictionary-yawl.txt; board = board-points400.txt
* dictionary = dictionary-yawl.txt; board = board-points500.txt
* dictionary = dictionary-yawl.txt; board = board-points750.txt
* dictionary = dictionary-yawl.txt; board = board-points1000.txt
* dictionary = dictionary-yawl.txt; board = board-points1250.txt
* dictionary = dictionary-yawl.txt; board = board-points1500.txt
* dictionary = dictionary-yawl.txt; board = board-points2000.txt
==> passed
Test 4: check getAllValidWords() on random Hasbro boards
* dictionary = dictionary-yawl.txt; board = 10 random Hasbro boards
* dictionary = dictionary-yawl.txt; board = 50 random Hasbro boards
* dictionary = dictionary-yawl.txt; board = 100 random Hasbro boards
==> passed
Test 5: check getAllValidWords() on high-scoring n-by-n boards
* dictionary = dictionary-yawl.txt; board = board-points4410.txt
* dictionary = dictionary-yawl.txt; board = board-points4527.txt
* dictionary = dictionary-yawl.txt; board = board-points13464.txt
* dictionary = dictionary-yawl.txt; board = board-points26539.txt
==> passed
Test 6: check getAllValidWords() on exotic boards
* dictionary = dictionary-yawl.txt; board = board-dodo.txt
* dictionary = dictionary-yawl.txt; board = board-noon.txt
* dictionary = dictionary-yawl.txt; board = board-couscous.txt
* dictionary = dictionary-yawl.txt; board = board-rotavator.txt
* dictionary = dictionary-yawl.txt; board = board-estrangers.txt
* dictionary = dictionary-yawl.txt; board = board-antidisestablishmentarianisms.txt
* dictionary = dictionary-yawl.txt; board = board-dichlorodiphenyltrichloroethanes.txt
* dictionary = dictionary-yawl.txt; board = board-pneumonoultramicroscopicsilicovolcanoconiosis.txt
==> passed
Test 7: check getAllValidWords() on boards with a Q
* dictionary = dictionary-yawl.txt; board = board-qwerty.txt
* dictionary = dictionary-yawl.txt; board = board-quinquevalencies.txt
* dictionary = dictionary-yawl.txt; board = board-inconsequentially.txt
* dictionary = dictionary-yawl.txt; board = board-qaimaqam.txt
* dictionary = dictionary-yawl.txt; board = board-aqua.txt
* dictionary = dictionary-yawl.txt; board = 100 random Hasbro boards
* dictionary = dictionary-16q.txt; board = board-9q.txt
* dictionary = dictionary-16q.txt; board = board-16q.txt
==> passed
Test 8: check getAllValidWords() on random m-by-n boards
* dictionary = dictionary-common.txt; board = 100 random 3-by-3 boards
* dictionary = dictionary-common.txt; board = 100 random 4-by-4 boards
* dictionary = dictionary-common.txt; board = 100 random 5-by-5 boards
* dictionary = dictionary-common.txt; board = 20 random 5-by-10 boards
* dictionary = dictionary-common.txt; board = 20 random 10-by-5 boards
==> passed
Test 9: check getAllValidWords() on random m-by-n boards
* dictionary = dictionary-common.txt; board = 10 random 2-by-2 boards
* dictionary = dictionary-common.txt; board = 10 random 1-by-10 boards
* dictionary = dictionary-common.txt; board = 10 random 10-by-1 boards
* dictionary = dictionary-common.txt; board = 10 random 1-by-1 boards
* dictionary = dictionary-common.txt; board = 10 random 1-by-2 boards
* dictionary = dictionary-common.txt; board = 10 random 2-by-1 boards
==> passed
Test 10: check getAllValidWords() on boards with no valid words
* dictionary = dictionary-nursery.txt; board = board-points0.txt
* dictionary = dictionary-2letters.txt; board = board-points4410.txt
==> passed
Test 11: mutating dictionary[] after passing to BoggleSolver constructor
* dictionary = dictionary-algs4.txt
* dictionary = dictionary-algs4.txt; board = 10 random Hasbro boards
==> passed
Test 12: create more than one BoggleSolver object at a time
[ BoggleSolver object 1 uses dictionary-algs4.txt ]
[ BoggleSolver object 2 uses dictionary-nursery.txt ]
* dictionary = dictionary-algs4.txt; board = 10 random Hasbro boards
* dictionary = dictionary-nursery.txt; board = 10 random Hasbro boards
* dictionary = dictionary-algs4.txt; board = 10 random Hasbro boards
==> passed
Test 13: check scoreOf() on various dictionaries
* dictionary = dictionary-algs4.txt
* dictionary = dictionary-common.txt
* dictionary = dictionary-shakespeare.txt
* dictionary = dictionary-nursery.txt
* dictionary = dictionary-yawl.txt
==> passed
Total: 13/13 tests passed!
================================================================
********************************************************************************
* MEMORY
********************************************************************************
Analyzing memory of BoggleSolver
*-----------------------------------------------------------
Running 3 total tests.
Test 1: memory with dictionary-algs4.txt (must be <= 2x reference solution)
* memory of dictionary[] = 494472 bytes
* memory of student BoggleSolver = 4562696 bytes
* memory of reference BoggleSolver = 5135408 bytes
* student / reference = 0.89
==> passed
Test 2: memory with dictionary-shakespeare.txt (must be <= 2x reference solution)
* memory of dictionary[] = 1925320 bytes
* memory of student BoggleSolver = 15191112 bytes
* memory of reference BoggleSolver = 17478880 bytes
* student / reference = 0.87
==> passed
Test 3: memory with dictionary-yawl.txt (must be <= 2x reference solution)
* memory of dictionary[] = 22596632 bytes
* memory of student BoggleSolver = 154348512 bytes
* memory of reference BoggleSolver = 179421048 bytes
* student / reference = 0.86
==> passed
Total: 3/3 tests passed!
================================================================
********************************************************************************
* TIMING
********************************************************************************
Timing BoggleSolver
*-----------------------------------------------------------
All timing tests are for random 4-by-4 boards (using the Hasbro dice).
The dictionary is specified with each test.
Running 9 total tests.
Test 1: timing constructor (must be <= 5x reference solution)
* dictionary-algs4.txt
- student solution time (in seconds): 0.01
- reference solution time (in seconds): 0.01
- ratio: 0.92
==> passed
* dictionary-enable2k.txt
- student solution time (in seconds): 0.12
- reference solution time (in seconds): 0.12
- ratio: 1.03
==> passed
* dictionary-yawl.txt
- student solution time (in seconds): 0.03
- reference solution time (in seconds): 0.04
- ratio: 0.87
==> passed
* dictionary-zingarelli2005.txt
- student solution time (in seconds): 0.21
- reference solution time (in seconds): 0.10
- ratio: 2.14
==> passed
Test 2: timing getAllValidWords() for 5.0 seconds using dictionary-yawl.txt
(must be <= 2x reference solution)
- reference solution calls per second: 7724.19
- student solution calls per second: 5303.23
- reference / student ratio: 1.46
=> passed student <= 10000x reference
=> passed student <= 25x reference
=> passed student <= 10x reference
=> passed student <= 5x reference
=> passed student <= 2x reference
Total: 9/9 tests passed!
================================================================