1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.qedeq.kernel.se.visitor; |
17 |
|
|
18 |
|
import java.io.ByteArrayOutputStream; |
19 |
|
import java.io.UnsupportedEncodingException; |
20 |
|
import java.util.Stack; |
21 |
|
import java.util.Vector; |
22 |
|
|
23 |
|
import org.qedeq.base.io.TextOutput; |
24 |
|
import org.qedeq.base.utility.StringUtility; |
25 |
|
import org.qedeq.kernel.se.base.list.Atom; |
26 |
|
import org.qedeq.kernel.se.base.list.ElementList; |
27 |
|
import org.qedeq.kernel.se.base.module.Add; |
28 |
|
import org.qedeq.kernel.se.base.module.Author; |
29 |
|
import org.qedeq.kernel.se.base.module.AuthorList; |
30 |
|
import org.qedeq.kernel.se.base.module.Axiom; |
31 |
|
import org.qedeq.kernel.se.base.module.ChangedRule; |
32 |
|
import org.qedeq.kernel.se.base.module.ChangedRuleList; |
33 |
|
import org.qedeq.kernel.se.base.module.Chapter; |
34 |
|
import org.qedeq.kernel.se.base.module.ChapterList; |
35 |
|
import org.qedeq.kernel.se.base.module.Conclusion; |
36 |
|
import org.qedeq.kernel.se.base.module.ConditionalProof; |
37 |
|
import org.qedeq.kernel.se.base.module.Existential; |
38 |
|
import org.qedeq.kernel.se.base.module.FormalProof; |
39 |
|
import org.qedeq.kernel.se.base.module.FormalProofLine; |
40 |
|
import org.qedeq.kernel.se.base.module.FormalProofLineList; |
41 |
|
import org.qedeq.kernel.se.base.module.FormalProofList; |
42 |
|
import org.qedeq.kernel.se.base.module.Formula; |
43 |
|
import org.qedeq.kernel.se.base.module.FunctionDefinition; |
44 |
|
import org.qedeq.kernel.se.base.module.Header; |
45 |
|
import org.qedeq.kernel.se.base.module.Hypothesis; |
46 |
|
import org.qedeq.kernel.se.base.module.Import; |
47 |
|
import org.qedeq.kernel.se.base.module.ImportList; |
48 |
|
import org.qedeq.kernel.se.base.module.InitialFunctionDefinition; |
49 |
|
import org.qedeq.kernel.se.base.module.InitialPredicateDefinition; |
50 |
|
import org.qedeq.kernel.se.base.module.Latex; |
51 |
|
import org.qedeq.kernel.se.base.module.LatexList; |
52 |
|
import org.qedeq.kernel.se.base.module.LinkList; |
53 |
|
import org.qedeq.kernel.se.base.module.LiteratureItem; |
54 |
|
import org.qedeq.kernel.se.base.module.LiteratureItemList; |
55 |
|
import org.qedeq.kernel.se.base.module.Location; |
56 |
|
import org.qedeq.kernel.se.base.module.LocationList; |
57 |
|
import org.qedeq.kernel.se.base.module.ModusPonens; |
58 |
|
import org.qedeq.kernel.se.base.module.Node; |
59 |
|
import org.qedeq.kernel.se.base.module.PredicateDefinition; |
60 |
|
import org.qedeq.kernel.se.base.module.Proof; |
61 |
|
import org.qedeq.kernel.se.base.module.ProofList; |
62 |
|
import org.qedeq.kernel.se.base.module.Proposition; |
63 |
|
import org.qedeq.kernel.se.base.module.Qedeq; |
64 |
|
import org.qedeq.kernel.se.base.module.Reason; |
65 |
|
import org.qedeq.kernel.se.base.module.Rename; |
66 |
|
import org.qedeq.kernel.se.base.module.Rule; |
67 |
|
import org.qedeq.kernel.se.base.module.Section; |
68 |
|
import org.qedeq.kernel.se.base.module.SectionList; |
69 |
|
import org.qedeq.kernel.se.base.module.Specification; |
70 |
|
import org.qedeq.kernel.se.base.module.Subsection; |
71 |
|
import org.qedeq.kernel.se.base.module.SubsectionList; |
72 |
|
import org.qedeq.kernel.se.base.module.SubsectionType; |
73 |
|
import org.qedeq.kernel.se.base.module.SubstFree; |
74 |
|
import org.qedeq.kernel.se.base.module.SubstFunc; |
75 |
|
import org.qedeq.kernel.se.base.module.SubstPred; |
76 |
|
import org.qedeq.kernel.se.base.module.Term; |
77 |
|
import org.qedeq.kernel.se.base.module.Universal; |
78 |
|
import org.qedeq.kernel.se.base.module.UsedByList; |
79 |
|
import org.qedeq.kernel.se.common.ModuleDataException; |
80 |
|
|
81 |
|
|
82 |
|
@link |
83 |
|
|
84 |
|
@link |
85 |
|
|
86 |
|
|
87 |
|
@author |
88 |
|
|
|
|
| 95.6% |
Uncovered Elements: 19 (430) |
Complexity: 170 |
Complexity Density: 0.76 |
|
89 |
|
public class QedeqVisitorTester implements QedeqVisitor { |
90 |
|
|
91 |
|
private ByteArrayOutputStream out = new ByteArrayOutputStream(); |
92 |
|
|
93 |
|
private Vector counter = new Vector(); |
94 |
|
|
95 |
|
private TextOutput text; |
96 |
|
|
97 |
|
|
98 |
|
|
99 |
|
private final Stack commaStack = new Stack(); |
100 |
|
|
101 |
|
private final Stack getterStack = new Stack(); |
102 |
|
|
103 |
|
private final Stack objectStack = new Stack(); |
104 |
|
|
105 |
|
private QedeqTraverser traverser; |
106 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
107 |
1
|
public QedeqVisitorTester(final QedeqTraverser traverser) {... |
108 |
1
|
this.traverser = traverser; |
109 |
1
|
init(); |
110 |
|
} |
111 |
|
|
|
|
| 81.8% |
Uncovered Elements: 2 (11) |
Complexity: 2 |
Complexity Density: 0.22 |
|
112 |
1
|
public void init() {... |
113 |
1
|
out.reset(); |
114 |
1
|
if (text != null) { |
115 |
0
|
text.close(); |
116 |
|
} |
117 |
1
|
commaStack.clear(); |
118 |
1
|
objectStack.clear(); |
119 |
1
|
counter.clear(); |
120 |
1
|
getterStack.clear(); |
121 |
1
|
out = new ByteArrayOutputStream(); |
122 |
1
|
text = new TextOutput("local", out, "UTF-8"); |
123 |
|
} |
124 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
125 |
0
|
public String getOutput() {... |
126 |
0
|
try { |
127 |
0
|
return out.toString("UTF-8"); |
128 |
|
} catch (UnsupportedEncodingException e) { |
129 |
0
|
throw new RuntimeException(e); |
130 |
|
} |
131 |
|
} |
132 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
133 |
19
|
public void visitEnter(Atom atom) {... |
134 |
19
|
enter(atom); |
135 |
|
} |
136 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
137 |
19
|
public void visitLeave(Atom atom) {... |
138 |
19
|
leave(atom); |
139 |
|
} |
140 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
141 |
19
|
public void visitEnter(ElementList list) {... |
142 |
19
|
enter(list); |
143 |
|
} |
144 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
145 |
19
|
public void visitLeave(ElementList list) {... |
146 |
19
|
leave(list); |
147 |
|
} |
148 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
149 |
2
|
public void visitEnter(Author author) {... |
150 |
2
|
enter(author); |
151 |
|
} |
152 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
153 |
3
|
public void visitEnter(AuthorList authorList) {... |
154 |
3
|
enter(authorList); |
155 |
|
} |
156 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
157 |
6
|
public void visitEnter(Axiom axiom) {... |
158 |
6
|
enter(axiom); |
159 |
|
} |
160 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
161 |
126
|
public void visitEnter(Chapter chapter) {... |
162 |
126
|
enter(chapter); |
163 |
|
} |
164 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
165 |
127
|
public void visitEnter(ChapterList chapterList) {... |
166 |
127
|
enter(chapterList); |
167 |
|
} |
168 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
169 |
23
|
public void visitEnter(Formula formula) {... |
170 |
23
|
enter(formula); |
171 |
|
} |
172 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
173 |
5
|
public void visitEnter(InitialFunctionDefinition functionDefinition) {... |
174 |
5
|
enter(functionDefinition); |
175 |
|
} |
176 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
177 |
6
|
public void visitEnter(FunctionDefinition functionDefinition) {... |
178 |
6
|
enter(functionDefinition); |
179 |
|
} |
180 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
181 |
20
|
public void visitEnter(Header header) {... |
182 |
20
|
enter(header); |
183 |
|
} |
184 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
185 |
4
|
public void visitEnter(Import imp) {... |
186 |
4
|
enter(imp); |
187 |
|
} |
188 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
189 |
5
|
public void visitEnter(ImportList importList) {... |
190 |
5
|
enter(importList); |
191 |
|
} |
192 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
193 |
24
|
public void visitEnter(Latex latex) {... |
194 |
24
|
enter(latex); |
195 |
|
} |
196 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
197 |
46
|
public void visitEnter(LatexList latexList) {... |
198 |
46
|
enter(latexList); |
199 |
|
} |
200 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
201 |
1
|
public void visitEnter(LinkList linkList) {... |
202 |
1
|
enter(linkList); |
203 |
|
} |
204 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
205 |
3
|
public void visitEnter(LiteratureItem literatureItem) {... |
206 |
3
|
enter(literatureItem); |
207 |
|
} |
208 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
209 |
4
|
public void visitEnter(LiteratureItemList literatureItemList) {... |
210 |
4
|
enter(literatureItemList); |
211 |
|
} |
212 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
213 |
3
|
public void visitEnter(Location location) {... |
214 |
3
|
enter(location); |
215 |
|
} |
216 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
217 |
6
|
public void visitEnter(LocationList locationList) {... |
218 |
6
|
enter(locationList); |
219 |
|
} |
220 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
221 |
107
|
public void visitEnter(Node node) {... |
222 |
107
|
enter(node); |
223 |
|
} |
224 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
225 |
5
|
public void visitEnter(InitialPredicateDefinition predicateDefinition) {... |
226 |
5
|
enter(predicateDefinition); |
227 |
|
} |
228 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
229 |
6
|
public void visitEnter(PredicateDefinition predicateDefinition) {... |
230 |
6
|
enter(predicateDefinition); |
231 |
|
} |
232 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
233 |
47
|
public void visitEnter(FormalProof proof) {... |
234 |
47
|
enter(proof); |
235 |
|
} |
236 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
237 |
48
|
public void visitEnter(FormalProofList proofList) {... |
238 |
48
|
enter(proofList); |
239 |
|
} |
240 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
241 |
32
|
public void visitEnter(FormalProofLine proofLine) {... |
242 |
32
|
enter(proofLine); |
243 |
|
} |
244 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
245 |
28
|
public void visitEnter(Reason reason) {... |
246 |
28
|
enter(reason); |
247 |
|
} |
248 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
249 |
1
|
public void visitEnter(ModusPonens reason) {... |
250 |
1
|
enter(reason); |
251 |
|
} |
252 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
253 |
1
|
public void visitEnter(Add reason) {... |
254 |
1
|
enter(reason); |
255 |
|
} |
256 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
257 |
5
|
public void visitEnter(Rename reason) {... |
258 |
5
|
enter(reason); |
259 |
|
} |
260 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
261 |
5
|
public void visitEnter(SubstFree reason) {... |
262 |
5
|
enter(reason); |
263 |
|
} |
264 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
265 |
5
|
public void visitEnter(SubstFunc reason) {... |
266 |
5
|
enter(reason); |
267 |
|
} |
268 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
269 |
5
|
public void visitEnter(SubstPred reason) {... |
270 |
5
|
enter(reason); |
271 |
|
} |
272 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
273 |
3
|
public void visitEnter(Existential reason) {... |
274 |
3
|
enter(reason); |
275 |
|
} |
276 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
277 |
3
|
public void visitEnter(Universal reason) {... |
278 |
3
|
enter(reason); |
279 |
|
} |
280 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
281 |
9
|
public void visitEnter(ConditionalProof reason) {... |
282 |
9
|
enter(reason); |
283 |
|
} |
284 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
285 |
4
|
public void visitEnter(Hypothesis hypothesis) {... |
286 |
4
|
enter(hypothesis); |
287 |
|
} |
288 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
289 |
4
|
public void visitEnter(Conclusion conclusion) {... |
290 |
4
|
enter(conclusion); |
291 |
|
} |
292 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
293 |
42
|
public void visitEnter(FormalProofLineList proofLineList) {... |
294 |
42
|
enter(proofLineList); |
295 |
|
} |
296 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
297 |
6
|
public void visitEnter(Proof proof) {... |
298 |
6
|
enter(proof); |
299 |
|
} |
300 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
301 |
8
|
public void visitEnter(ProofList proofList) {... |
302 |
8
|
enter(proofList); |
303 |
|
} |
304 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
305 |
58
|
public void visitEnter(Proposition proposition) {... |
306 |
58
|
enter(proposition); |
307 |
|
} |
308 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
309 |
152
|
public void visitEnter(Qedeq qedeq) {... |
310 |
152
|
enter(qedeq); |
311 |
|
} |
312 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
313 |
12
|
public void visitEnter(Rule rule) {... |
314 |
12
|
enter(rule); |
315 |
|
} |
316 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
317 |
4
|
public void visitEnter(ChangedRuleList list) {... |
318 |
4
|
enter(list); |
319 |
|
} |
320 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
321 |
3
|
public void visitEnter(ChangedRule rule) {... |
322 |
3
|
enter(rule); |
323 |
|
} |
324 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
325 |
119
|
public void visitEnter(Section section) {... |
326 |
119
|
enter(section); |
327 |
|
} |
328 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
329 |
120
|
public void visitEnter(SectionList sectionList) {... |
330 |
120
|
enter(sectionList); |
331 |
|
} |
332 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
333 |
9
|
public void visitEnter(Specification specification) {... |
334 |
9
|
enter(specification); |
335 |
|
} |
336 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
337 |
5
|
public void visitEnter(Subsection subsection) {... |
338 |
5
|
enter(subsection); |
339 |
|
} |
340 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
341 |
113
|
public void visitEnter(SubsectionList subsectionList) {... |
342 |
113
|
enter(subsectionList); |
343 |
|
} |
344 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
345 |
0
|
public void visitEnter(SubsectionType subsectionType) {... |
346 |
0
|
enter(subsectionType); |
347 |
|
} |
348 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
349 |
4
|
public void visitEnter(Term term) {... |
350 |
4
|
enter(term); |
351 |
|
} |
352 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
353 |
4
|
public void visitEnter(UsedByList usedByList) {... |
354 |
4
|
enter(usedByList); |
355 |
|
} |
356 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
357 |
2
|
public void visitLeave(Author author) throws ModuleDataException {... |
358 |
2
|
leave(author); |
359 |
|
} |
360 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
361 |
3
|
public void visitLeave(AuthorList authorList) {... |
362 |
3
|
leave(authorList); |
363 |
|
} |
364 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
365 |
6
|
public void visitLeave(Axiom axiom) {... |
366 |
6
|
leave(axiom); |
367 |
|
} |
368 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
369 |
126
|
public void visitLeave(Chapter chapter) {... |
370 |
126
|
leave(chapter); |
371 |
|
} |
372 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
373 |
127
|
public void visitLeave(ChapterList chapterList) {... |
374 |
127
|
leave(chapterList); |
375 |
|
} |
376 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
377 |
23
|
public void visitLeave(Formula formula) {... |
378 |
23
|
leave(formula); |
379 |
|
} |
380 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
381 |
5
|
public void visitLeave(InitialFunctionDefinition functionDefinition) {... |
382 |
5
|
leave(functionDefinition); |
383 |
|
} |
384 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
385 |
6
|
public void visitLeave(FunctionDefinition functionDefinition) {... |
386 |
6
|
leave(functionDefinition); |
387 |
|
} |
388 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
389 |
20
|
public void visitLeave(Header header) {... |
390 |
20
|
leave(header); |
391 |
|
} |
392 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
393 |
4
|
public void visitLeave(Import imp) {... |
394 |
4
|
leave(imp); |
395 |
|
} |
396 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
397 |
5
|
public void visitLeave(ImportList importList) {... |
398 |
5
|
leave(importList); |
399 |
|
} |
400 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
401 |
24
|
public void visitLeave(Latex latex) {... |
402 |
24
|
leave(latex); |
403 |
|
} |
404 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
405 |
46
|
public void visitLeave(LatexList latexList) {... |
406 |
46
|
leave(latexList); |
407 |
|
} |
408 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
409 |
1
|
public void visitLeave(LinkList linkList) {... |
410 |
1
|
leave(linkList); |
411 |
|
} |
412 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
413 |
3
|
public void visitLeave(LiteratureItem literatureItem) {... |
414 |
3
|
leave(literatureItem); |
415 |
|
} |
416 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
417 |
4
|
public void visitLeave(LiteratureItemList literatureItemList) {... |
418 |
4
|
leave(literatureItemList); |
419 |
|
} |
420 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
421 |
3
|
public void visitLeave(Location location) {... |
422 |
3
|
leave(location); |
423 |
|
} |
424 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
425 |
6
|
public void visitLeave(LocationList locationList) {... |
426 |
6
|
leave(locationList); |
427 |
|
} |
428 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
429 |
107
|
public void visitLeave(Node node) {... |
430 |
107
|
leave(node); |
431 |
|
} |
432 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
433 |
5
|
public void visitLeave(InitialPredicateDefinition predicateDefinition) {... |
434 |
5
|
leave(predicateDefinition); |
435 |
|
} |
436 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
437 |
6
|
public void visitLeave(PredicateDefinition predicateDefinition) {... |
438 |
6
|
leave(predicateDefinition); |
439 |
|
} |
440 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
441 |
48
|
public void visitLeave(FormalProofList proofList) {... |
442 |
48
|
leave(proofList); |
443 |
|
} |
444 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
445 |
47
|
public void visitLeave(FormalProof proof) {... |
446 |
47
|
leave(proof); |
447 |
|
} |
448 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
449 |
32
|
public void visitLeave(FormalProofLine proofLine) {... |
450 |
32
|
leave(proofLine); |
451 |
|
} |
452 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
453 |
28
|
public void visitLeave(Reason reason) {... |
454 |
28
|
leave(reason); |
455 |
|
} |
456 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
457 |
42
|
public void visitLeave(FormalProofLineList proofLineList) {... |
458 |
42
|
leave(proofLineList); |
459 |
|
} |
460 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
461 |
1
|
public void visitLeave(ModusPonens reason) {... |
462 |
1
|
leave(reason); |
463 |
|
} |
464 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
465 |
1
|
public void visitLeave(Add reason) {... |
466 |
1
|
leave(reason); |
467 |
|
} |
468 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
469 |
5
|
public void visitLeave(Rename reason) {... |
470 |
5
|
leave(reason); |
471 |
|
} |
472 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
473 |
5
|
public void visitLeave(SubstFree reason) {... |
474 |
5
|
leave(reason); |
475 |
|
} |
476 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
477 |
5
|
public void visitLeave(SubstFunc reason) {... |
478 |
5
|
leave(reason); |
479 |
|
} |
480 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
481 |
5
|
public void visitLeave(SubstPred reason) {... |
482 |
5
|
leave(reason); |
483 |
|
} |
484 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
485 |
3
|
public void visitLeave(Existential reason) {... |
486 |
3
|
leave(reason); |
487 |
|
} |
488 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
489 |
3
|
public void visitLeave(Universal reason) {... |
490 |
3
|
leave(reason); |
491 |
|
} |
492 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
493 |
9
|
public void visitLeave(ConditionalProof reason) {... |
494 |
9
|
leave(reason); |
495 |
|
} |
496 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
497 |
4
|
public void visitLeave(Hypothesis hypothesis) {... |
498 |
4
|
leave(hypothesis); |
499 |
|
} |
500 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
501 |
4
|
public void visitLeave(Conclusion conclusion) {... |
502 |
4
|
leave(conclusion); |
503 |
|
} |
504 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
505 |
6
|
public void visitLeave(Proof proof) {... |
506 |
6
|
leave(proof); |
507 |
|
} |
508 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
509 |
8
|
public void visitLeave(ProofList proofList) {... |
510 |
8
|
leave(proofList); |
511 |
|
} |
512 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
513 |
58
|
public void visitLeave(Proposition proposition) {... |
514 |
58
|
leave(proposition); |
515 |
|
} |
516 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
517 |
152
|
public void visitLeave(Qedeq qedeq) {... |
518 |
152
|
leave(qedeq); |
519 |
|
} |
520 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
521 |
12
|
public void visitLeave(Rule rule) {... |
522 |
12
|
leave(rule); |
523 |
|
} |
524 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
525 |
4
|
public void visitLeave(ChangedRuleList list) {... |
526 |
4
|
leave(list); |
527 |
|
} |
528 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
529 |
3
|
public void visitLeave(ChangedRule rule) {... |
530 |
3
|
leave(rule); |
531 |
|
} |
532 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
533 |
119
|
public void visitLeave(Section section) {... |
534 |
119
|
leave(section); |
535 |
|
} |
536 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
537 |
120
|
public void visitLeave(SectionList sectionList) {... |
538 |
120
|
leave(sectionList); |
539 |
|
} |
540 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
541 |
9
|
public void visitLeave(Specification specification) {... |
542 |
9
|
leave(specification); |
543 |
|
} |
544 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
545 |
5
|
public void visitLeave(Subsection subsection) {... |
546 |
5
|
leave(subsection); |
547 |
|
} |
548 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
549 |
113
|
public void visitLeave(SubsectionList subsectionList) {... |
550 |
113
|
leave(subsectionList); |
551 |
|
} |
552 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
553 |
0
|
public void visitLeave(SubsectionType subsectionType) {... |
554 |
0
|
leave(subsectionType); |
555 |
|
} |
556 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
557 |
4
|
public void visitLeave(Term term) {... |
558 |
4
|
leave(term); |
559 |
|
} |
560 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
561 |
4
|
public void visitLeave(UsedByList usedByList) {... |
562 |
4
|
leave(usedByList); |
563 |
|
} |
564 |
|
|
|
|
| 90% |
Uncovered Elements: 1 (10) |
Complexity: 3 |
Complexity Density: 0.5 |
|
565 |
1476
|
private int getCounter(final int level) {... |
566 |
1476
|
int value = 0; |
567 |
1476
|
if (level < counter.size()) { |
568 |
984
|
Object obj = counter.get(level); |
569 |
984
|
if (obj != null) { |
570 |
984
|
value = ((Integer) obj).intValue(); |
571 |
|
} |
572 |
|
} |
573 |
1476
|
return value; |
574 |
|
} |
575 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
576 |
531
|
private void setCounter(final int level, final int value) {... |
577 |
1141
|
while (level >= counter.size()) { |
578 |
610
|
counter.add(new Integer(0)); |
579 |
|
} |
580 |
531
|
counter.set(level, new Integer(value)); |
581 |
|
} |
582 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
583 |
984
|
private void increaseCounter(final int level) {... |
584 |
1476
|
while (level >= counter.size()) { |
585 |
492
|
counter.add(new Integer(0)); |
586 |
|
} |
587 |
984
|
counter.set(level, new Integer(1 + getCounter(level))); |
588 |
|
} |
589 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
590 |
550
|
private void deleteCounter(final int level) {... |
591 |
550
|
counter.setSize(level); |
592 |
|
} |
593 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 3 |
Complexity Density: 0.5 |
|
594 |
2858
|
public String getContext() {... |
595 |
2858
|
String result = ""; |
596 |
17220
|
for (int i = 1; i < getterStack.size(); i++) { |
597 |
14362
|
if (i > 1) { |
598 |
11808
|
result += "."; |
599 |
|
} |
600 |
14362
|
result += getterStack.get(i); |
601 |
|
} |
602 |
2858
|
return result; |
603 |
|
} |
604 |
|
|
|
|
| 96.9% |
Uncovered Elements: 4 (131) |
Complexity: 37 |
Complexity Density: 0.54 |
|
605 |
1429
|
protected void enter(final Object obj) {... |
606 |
1429
|
if (obj == null) { |
607 |
0
|
return; |
608 |
|
} |
609 |
1429
|
String name = StringUtility.getClassName(obj.getClass()); |
610 |
|
|
611 |
1429
|
if (name.endsWith("Vo")) { |
612 |
1391
|
name = name.substring(0, name.length() - 2); |
613 |
38
|
} else if (name.equals("DefaultAtom")) { |
614 |
19
|
name = "Atom"; |
615 |
19
|
} else if (name.equals("DefaultElementList")) { |
616 |
19
|
name = "ElementList"; |
617 |
|
} |
618 |
1429
|
String lastName = ""; |
619 |
1429
|
if (getLevel() > 0) { |
620 |
1277
|
lastName = objectStack.lastElement().toString(); |
621 |
|
} |
622 |
1429
|
String getter = "get" + name + "()"; |
623 |
1429
|
if (name.equals("Atom")) { |
624 |
19
|
getter = "getElement().getAtom()"; |
625 |
1410
|
} else if (name.equals("ElementList")) { |
626 |
19
|
getter = "getElement().getList()"; |
627 |
|
} |
628 |
|
|
629 |
|
|
630 |
1429
|
if (!getter.startsWith("getElement()") && name.endsWith("List")) { |
631 |
531
|
setCounter(getLevel() + 1, 0); |
632 |
531
|
if ("LatexList".equals(name)) { |
633 |
|
|
634 |
|
|
635 |
46
|
getter = StringUtility.getLastDotString(traverser.getCurrentContext().getLocationWithinModule()); |
636 |
|
|
637 |
|
} |
638 |
|
|
639 |
898
|
} else if (lastName.endsWith("List")) { |
640 |
|
|
641 |
|
|
642 |
|
|
643 |
|
|
644 |
492
|
getter = "get(" + getCounter(getLevel() + 1) + ")"; |
645 |
492
|
if (name.equals("Subsection")) { |
646 |
5
|
getter += ".getSubsection()"; |
647 |
492
|
} if (name.equals("Node")) { |
648 |
107
|
getter += ".getNode()"; |
649 |
|
} |
650 |
492
|
increaseCounter(getLevel() + 1); |
651 |
406
|
} else if (lastName.equals("Author")) { |
652 |
1
|
if (name.equals("Latex")) { |
653 |
1
|
getter = "getName()"; |
654 |
|
} |
655 |
405
|
} else if (lastName.equals("FormalProofLine") && obj instanceof Reason) { |
656 |
28
|
getter = "getReason()"; |
657 |
377
|
} else if (getter.startsWith("getElement()")) { |
658 |
|
|
659 |
38
|
if (lastName.equals("InitialPredicateDefinition")) { |
660 |
|
|
661 |
2
|
getter = "getPredCon()." + StringUtility.getLastDotString(getter); |
662 |
36
|
} else if (lastName.equals("InitialFunctionDefinition")) { |
663 |
2
|
getter = "getFunCon()." + StringUtility.getLastDotString(getter); |
664 |
34
|
} else if (lastName.equals("SubstFree")) { |
665 |
2
|
getter = "getSubjectVariable()." + StringUtility.getLastDotString(getter); |
666 |
32
|
} else if (lastName.equals("SubstPred")) { |
667 |
2
|
getter = "getPredicateVariable()." + StringUtility.getLastDotString(getter); |
668 |
30
|
} else if (lastName.equals("Rename")) { |
669 |
|
|
670 |
|
|
671 |
4
|
getter = StringUtility.getLastTwoDotStrings(traverser.getCurrentContext() |
672 |
|
.getLocationWithinModule()); |
673 |
26
|
} else if (lastName.equals("Existential")) { |
674 |
2
|
getter = "getSubjectVariable()." + StringUtility.getLastDotString(getter); |
675 |
24
|
} else if (lastName.equals("Universal")) { |
676 |
2
|
getter = "getSubjectVariable()." + StringUtility.getLastDotString(getter); |
677 |
22
|
} else if (lastName.equals("SubstFunc")) { |
678 |
2
|
getter = "getFunctionVariable()." + StringUtility.getLastDotString(getter); |
679 |
|
} |
680 |
339
|
} else if (lastName.equals("SubstFree") && name.equals("Term")) { |
681 |
2
|
getter = "getSubstituteTerm()"; |
682 |
337
|
} else if (lastName.equals("SubstFunc") && name.equals("Term")) { |
683 |
2
|
getter = "getSubstituteTerm()"; |
684 |
335
|
} else if (lastName.equals("SubstPred") && name.equals("Formula")) { |
685 |
2
|
getter = "getSubstituteFormula()"; |
686 |
|
|
687 |
333
|
} else if (name.equals("Proposition")) { |
688 |
58
|
getter = "getNodeType()." + getter; |
689 |
275
|
} else if (name.equals("Rule")) { |
690 |
12
|
getter = "getNodeType()." + getter; |
691 |
263
|
} else if (name.endsWith("Definition")) { |
692 |
22
|
getter = "getNodeType()." + getter; |
693 |
241
|
} else if (name.endsWith("Axiom")) { |
694 |
6
|
getter = "getNodeType()." + getter; |
695 |
|
} |
696 |
|
|
697 |
1429
|
objectStack.push(name); |
698 |
1429
|
getterStack.push(getter); |
699 |
1429
|
text.println("<" + name + ">"); |
700 |
1429
|
text.pushLevel(); |
701 |
1429
|
checkEnter(); |
702 |
|
} |
703 |
|
|
|
|
| 90.9% |
Uncovered Elements: 2 (22) |
Complexity: 6 |
Complexity Density: 0.43 |
|
704 |
1429
|
protected void leave(final Object obj) {... |
705 |
1429
|
if (obj == null) { |
706 |
0
|
return; |
707 |
|
} |
708 |
1429
|
checkLeave(); |
709 |
1429
|
String name = StringUtility.getClassName(obj.getClass()); |
710 |
1429
|
if (name.endsWith("Vo")) { |
711 |
1391
|
name = name.substring(0, name.length() - 2); |
712 |
|
} |
713 |
1429
|
if (name.endsWith("List")) { |
714 |
550
|
deleteCounter(getLevel()); |
715 |
|
} else { |
716 |
879
|
if (getterStack.size() > 0 && getterStack.lastElement().toString().startsWith("get(")) { |
717 |
492
|
increaseCounter(getLevel()); |
718 |
|
} |
719 |
|
} |
720 |
1429
|
objectStack.pop(); |
721 |
1429
|
getterStack.pop(); |
722 |
1429
|
text.popLevel(); |
723 |
1429
|
text.println("</" + StringUtility.getClassName(obj.getClass()) + ">"); |
724 |
|
} |
725 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
726 |
4138
|
public int getLevel() {... |
727 |
4138
|
return objectStack.size(); |
728 |
|
} |
729 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
730 |
0
|
protected void checkEnter() {... |
731 |
|
|
732 |
|
|
733 |
|
|
734 |
|
|
735 |
|
|
736 |
|
} |
737 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
738 |
0
|
protected void checkLeave() {... |
739 |
|
|
740 |
|
} |
741 |
|
} |