Skip to content

Commit d5d3421

Browse files
committed
add more tests
1 parent 870fe2d commit d5d3421

File tree

12 files changed

+283
-37
lines changed

12 files changed

+283
-37
lines changed

test-shared/src/test/resources/correctness/tree/ABGrammar/ambig/result.dot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ label=""
1515
3->7
1616
4->2
1717
5->7
18-
6->0
1918
6->1
19+
6->0
2020
}

test-shared/src/test/resources/correctness/tree/LoopDyck/linear/result.dot

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
digraph Input {
2+
label="Minimal worst case, simple loop RSM for Dyck language"
3+
start -> 0;
4+
0 -> 0 [label = "("];
5+
0 -> 1 [label = ")"];
6+
1 -> 0 [label = ")"];
7+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
digraph g {
2+
labelloc="t"
3+
label=""
4+
0 [label = "Epsilon RSM: S_0, input: [0, 0]", shape = invhouse]
5+
1 [label = "Intermediate input: 0, rsm: S_1, input: [0, 0]", shape = plain]
6+
2 [label = "Intermediate input: 0, rsm: S_1, input: [0, 1]", shape = plain]
7+
3 [label = "Intermediate input: 0, rsm: S_2, input: [0, 1]", shape = plain]
8+
4 [label = "Intermediate input: 1, rsm: S_2, input: [0, 0]", shape = plain]
9+
5 [label = "Nonterminal S, input: [0, 0]", shape = invtrapezium]
10+
6 [label = "Nonterminal S, input: [0, 1]", shape = invtrapezium]
11+
7 [label = "Range , input: [0, 0], rsm: [S_0, S_0]", shape = ellipse]
12+
8 [label = "Range , input: [0, 0], rsm: [S_0, S_1]", shape = ellipse]
13+
9 [label = "Range , input: [0, 0], rsm: [S_0, S_2]", shape = ellipse]
14+
10 [label = "Range , input: [0, 0], rsm: [S_1, S_2]", shape = ellipse]
15+
11 [label = "Range , input: [0, 1], rsm: [S_0, S_0]", shape = ellipse]
16+
12 [label = "Range , input: [0, 1], rsm: [S_0, S_2]", shape = ellipse]
17+
13 [label = "Range , input: [0, 1], rsm: [S_1, S_2]", shape = ellipse]
18+
14 [label = "Range , input: [0, 1], rsm: [S_2, S_0]", shape = ellipse]
19+
15 [label = "Range , input: [1, 0], rsm: [S_2, S_0]", shape = ellipse]
20+
16 [label = "Terminal '(', input: [0, 0]", shape = rectangle]
21+
17 [label = "Terminal ')', input: [0, 1]", shape = rectangle]
22+
18 [label = "Terminal ')', input: [1, 0]", shape = rectangle]
23+
1->8
24+
1->10
25+
2->8
26+
2->13
27+
3->9
28+
3->14
29+
4->12
30+
4->15
31+
5->7
32+
6->11
33+
7->0
34+
7->4
35+
8->16
36+
9->1
37+
10->5
38+
11->3
39+
12->2
40+
13->6
41+
14->17
42+
15->18
43+
}

test-shared/src/test/resources/correctness/tree/LoopDyck/linear/input.dot renamed to test-shared/src/test/resources/correctness/tree/LoopDyck/oneVertex/input.dot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
digraph Input {
2+
label="Two loops with common vertex, simple loop RSM for Dyck language"
23
start -> 0;
34
0 -> 0 [label = "("];
45
0 -> 0 [label = ")"];
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
digraph g {
2+
labelloc="t"
3+
label=""
4+
0 [label = "Epsilon RSM: S_0, input: [0, 0]", shape = invhouse]
5+
1 [label = "Intermediate input: 0, rsm: S_1, input: [0, 0]", shape = plain]
6+
2 [label = "Intermediate input: 0, rsm: S_2, input: [0, 0]", shape = plain]
7+
3 [label = "Nonterminal S, input: [0, 0]", shape = invtrapezium]
8+
4 [label = "Range , input: [0, 0], rsm: [S_0, S_0]", shape = ellipse]
9+
5 [label = "Range , input: [0, 0], rsm: [S_0, S_1]", shape = ellipse]
10+
6 [label = "Range , input: [0, 0], rsm: [S_0, S_2]", shape = ellipse]
11+
7 [label = "Range , input: [0, 0], rsm: [S_1, S_2]", shape = ellipse]
12+
8 [label = "Range , input: [0, 0], rsm: [S_2, S_0]", shape = ellipse]
13+
9 [label = "Terminal '(', input: [0, 0]", shape = rectangle]
14+
10 [label = "Terminal ')', input: [0, 0]", shape = rectangle]
15+
1->5
16+
1->7
17+
2->6
18+
2->8
19+
3->4
20+
4->0
21+
4->2
22+
5->9
23+
6->1
24+
7->3
25+
8->10
26+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
digraph Input {
2+
label="Second worst case, simple loop RSM for Dyck language"
3+
start -> 0;
4+
0 -> 1 [label = ")"];
5+
1 -> 2 [label = ")"];
6+
2 -> 0 [label = ")"];
7+
8+
0 -> 3 [label = "("];
9+
3 -> 0 [label = "("];
10+
}
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
digraph g {
2+
labelloc="t"
3+
label=""
4+
0 [label = "Epsilon RSM: S_0, input: [0, 0]", shape = invhouse]
5+
1 [label = "Intermediate input: 0, rsm: S_0, input: [3, 3]", shape = plain]
6+
2 [label = "Intermediate input: 0, rsm: S_1, input: [3, 0]", shape = plain]
7+
3 [label = "Intermediate input: 0, rsm: S_1, input: [3, 1]", shape = plain]
8+
4 [label = "Intermediate input: 0, rsm: S_1, input: [3, 2]", shape = plain]
9+
5 [label = "Intermediate input: 0, rsm: S_2, input: [0, 1]", shape = plain]
10+
6 [label = "Intermediate input: 0, rsm: S_2, input: [3, 1]", shape = plain]
11+
7 [label = "Intermediate input: 1, rsm: S_2, input: [0, 2]", shape = plain]
12+
8 [label = "Intermediate input: 1, rsm: S_2, input: [3, 2]", shape = plain]
13+
9 [label = "Intermediate input: 2, rsm: S_2, input: [0, 0]", shape = plain]
14+
10 [label = "Intermediate input: 2, rsm: S_2, input: [3, 0]", shape = plain]
15+
11 [label = "Intermediate input: 3, rsm: S_1, input: [0, 0]", shape = plain]
16+
12 [label = "Intermediate input: 3, rsm: S_1, input: [0, 1]", shape = plain]
17+
13 [label = "Intermediate input: 3, rsm: S_1, input: [0, 2]", shape = plain]
18+
14 [label = "Intermediate input: 3, rsm: S_1, input: [3, 0]", shape = plain]
19+
15 [label = "Intermediate input: 3, rsm: S_1, input: [3, 1]", shape = plain]
20+
16 [label = "Intermediate input: 3, rsm: S_1, input: [3, 2]", shape = plain]
21+
17 [label = "Nonterminal S, input: [0, 0]", shape = invtrapezium]
22+
18 [label = "Nonterminal S, input: [0, 1]", shape = invtrapezium]
23+
19 [label = "Nonterminal S, input: [0, 2]", shape = invtrapezium]
24+
20 [label = "Nonterminal S, input: [3, 0]", shape = invtrapezium]
25+
21 [label = "Nonterminal S, input: [3, 1]", shape = invtrapezium]
26+
22 [label = "Nonterminal S, input: [3, 2]", shape = invtrapezium]
27+
23 [label = "Range , input: [0, 0], rsm: [S_0, S_0]", shape = ellipse]
28+
24 [label = "Range , input: [0, 0], rsm: [S_0, S_2]", shape = ellipse]
29+
25 [label = "Range , input: [0, 0], rsm: [S_1, S_2]", shape = ellipse]
30+
26 [label = "Range , input: [0, 1], rsm: [S_0, S_0]", shape = ellipse]
31+
27 [label = "Range , input: [0, 1], rsm: [S_0, S_2]", shape = ellipse]
32+
28 [label = "Range , input: [0, 1], rsm: [S_1, S_2]", shape = ellipse]
33+
29 [label = "Range , input: [0, 1], rsm: [S_2, S_0]", shape = ellipse]
34+
30 [label = "Range , input: [0, 2], rsm: [S_0, S_0]", shape = ellipse]
35+
31 [label = "Range , input: [0, 2], rsm: [S_0, S_2]", shape = ellipse]
36+
32 [label = "Range , input: [0, 2], rsm: [S_1, S_2]", shape = ellipse]
37+
33 [label = "Range , input: [0, 3], rsm: [S_0, S_1]", shape = ellipse]
38+
34 [label = "Range , input: [1, 2], rsm: [S_2, S_0]", shape = ellipse]
39+
35 [label = "Range , input: [2, 0], rsm: [S_2, S_0]", shape = ellipse]
40+
36 [label = "Range , input: [3, 0], rsm: [S_0, S_0]", shape = ellipse]
41+
37 [label = "Range , input: [3, 0], rsm: [S_0, S_1]", shape = ellipse]
42+
38 [label = "Range , input: [3, 0], rsm: [S_0, S_2]", shape = ellipse]
43+
39 [label = "Range , input: [3, 0], rsm: [S_1, S_2]", shape = ellipse]
44+
40 [label = "Range , input: [3, 1], rsm: [S_0, S_0]", shape = ellipse]
45+
41 [label = "Range , input: [3, 1], rsm: [S_0, S_2]", shape = ellipse]
46+
42 [label = "Range , input: [3, 1], rsm: [S_1, S_2]", shape = ellipse]
47+
43 [label = "Range , input: [3, 2], rsm: [S_0, S_0]", shape = ellipse]
48+
44 [label = "Range , input: [3, 2], rsm: [S_0, S_2]", shape = ellipse]
49+
45 [label = "Range , input: [3, 2], rsm: [S_1, S_2]", shape = ellipse]
50+
46 [label = "Range , input: [3, 3], rsm: [S_0, S_1]", shape = ellipse]
51+
47 [label = "Terminal '(', input: [0, 3]", shape = rectangle]
52+
48 [label = "Terminal '(', input: [3, 0]", shape = rectangle]
53+
49 [label = "Terminal ')', input: [0, 1]", shape = rectangle]
54+
50 [label = "Terminal ')', input: [1, 2]", shape = rectangle]
55+
51 [label = "Terminal ')', input: [2, 0]", shape = rectangle]
56+
1->36
57+
1->33
58+
2->37
59+
2->25
60+
3->37
61+
3->28
62+
4->37
63+
4->32
64+
5->24
65+
5->29
66+
6->38
67+
6->29
68+
7->27
69+
7->34
70+
8->41
71+
8->34
72+
9->31
73+
9->35
74+
10->44
75+
10->35
76+
11->33
77+
11->39
78+
12->33
79+
12->42
80+
13->33
81+
13->45
82+
14->46
83+
14->39
84+
15->46
85+
15->42
86+
16->46
87+
16->45
88+
17->23
89+
18->26
90+
19->30
91+
20->36
92+
21->40
93+
22->43
94+
23->0
95+
23->9
96+
24->11
97+
25->17
98+
26->5
99+
27->12
100+
28->18
101+
29->49
102+
30->7
103+
31->13
104+
32->19
105+
33->47
106+
34->50
107+
35->51
108+
36->10
109+
37->48
110+
38->2
111+
38->14
112+
39->20
113+
40->6
114+
41->15
115+
41->3
116+
42->21
117+
43->8
118+
44->4
119+
44->16
120+
45->22
121+
46->1
122+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
digraph Input {
2+
label="Two concatenated linear pairs of brackets, simple loop RSM for Dyck language"
3+
start -> 0;
4+
0 -> 1 [label = "("];
5+
1 -> 2 [label = ")"];
6+
2 -> 3 [label = "("];
7+
3 -> 4 [label = ")"];
8+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
digraph g {
2+
labelloc="t"
3+
label=""
4+
0 [label = "Epsilon RSM: S_0, input: [1, 1]", shape = invhouse]
5+
1 [label = "Epsilon RSM: S_0, input: [3, 3]", shape = invhouse]
6+
2 [label = "Intermediate input: 1, rsm: S_1, input: [0, 1]", shape = plain]
7+
3 [label = "Intermediate input: 1, rsm: S_2, input: [0, 2]", shape = plain]
8+
4 [label = "Intermediate input: 2, rsm: S_0, input: [0, 3]", shape = plain]
9+
5 [label = "Intermediate input: 3, rsm: S_1, input: [0, 3]", shape = plain]
10+
6 [label = "Intermediate input: 3, rsm: S_2, input: [0, 4]", shape = plain]
11+
7 [label = "Nonterminal S, input: [1, 1]", shape = invtrapezium]
12+
8 [label = "Nonterminal S, input: [3, 3]", shape = invtrapezium]
13+
9 [label = "Range , input: [0, 1], rsm: [S_0, S_1]", shape = ellipse]
14+
10 [label = "Range , input: [0, 1], rsm: [S_0, S_2]", shape = ellipse]
15+
11 [label = "Range , input: [0, 2], rsm: [S_0, S_0]", shape = ellipse]
16+
12 [label = "Range , input: [0, 3], rsm: [S_0, S_1]", shape = ellipse]
17+
13 [label = "Range , input: [0, 3], rsm: [S_0, S_2]", shape = ellipse]
18+
14 [label = "Range , input: [0, 4], rsm: [S_0, S_0]", shape = ellipse]
19+
15 [label = "Range , input: [1, 1], rsm: [S_0, S_0]", shape = ellipse]
20+
16 [label = "Range , input: [1, 1], rsm: [S_1, S_2]", shape = ellipse]
21+
17 [label = "Range , input: [1, 2], rsm: [S_2, S_0]", shape = ellipse]
22+
18 [label = "Range , input: [2, 3], rsm: [S_0, S_1]", shape = ellipse]
23+
19 [label = "Range , input: [3, 3], rsm: [S_0, S_0]", shape = ellipse]
24+
20 [label = "Range , input: [3, 3], rsm: [S_1, S_2]", shape = ellipse]
25+
21 [label = "Range , input: [3, 4], rsm: [S_2, S_0]", shape = ellipse]
26+
22 [label = "Terminal '(', input: [0, 1]", shape = rectangle]
27+
23 [label = "Terminal '(', input: [2, 3]", shape = rectangle]
28+
24 [label = "Terminal ')', input: [1, 2]", shape = rectangle]
29+
25 [label = "Terminal ')', input: [3, 4]", shape = rectangle]
30+
2->9
31+
2->16
32+
3->10
33+
3->17
34+
4->11
35+
4->18
36+
5->12
37+
5->20
38+
6->13
39+
6->21
40+
7->15
41+
8->19
42+
9->22
43+
10->2
44+
11->3
45+
12->4
46+
13->5
47+
14->6
48+
15->0
49+
16->7
50+
17->24
51+
18->23
52+
19->1
53+
20->8
54+
21->25
55+
}

0 commit comments

Comments
 (0)