Skip to content

Commit 07648e8

Browse files
committed
fixed testing
1 parent 1853cea commit 07648e8

File tree

10 files changed

+130
-199
lines changed

10 files changed

+130
-199
lines changed

tst/AuxFun.tst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,19 @@
33
#A AuxFun.tst PatternClass package Ruth Hoffmann
44
##
55
gap> START_TEST("PatternClass");
6-
76
gap> LoadPackage("patternclass",false);
87
true
98
gap> SetAssertionLevel(1);
10-
119
gap> a1:=RationalExpression("(bUcUd)*ab*");
1210
(bUcUd)*ab*
1311
gap> a2:=RationalExpression("(acUd)*(aU@)");
1412
(acUd)*(aU@)
1513
gap> NDIntersectionAutomaton(a1,a2);
1614
Error, The arguments must be two automata over the same alphabet
17-
1815
gap> a2:=RationalExpression("(acUd)*(aUb)");
1916
(acUd)*(aUb)
2017
gap> NDIntersectionAutomaton(a1,a2);
2118
< epsilon automaton on 5 letters with 9 states >
22-
2319
gap> NDUnionAutomata(a1,a2);
2420
Error, The arguments must be two automata
2521
gap> a1:=RatExpToAut(RationalExpression("(bUcU@)*ab*"));
@@ -28,7 +24,6 @@ gap> a2:=RatExpToAut(RationalExpression("(acUd)*(@Ub)"));
2824
< deterministic automaton on 4 letters with 4 states >
2925
gap> NDUnionAutomata(a1,a2);
3026
Error, The arguments must be two automata over the same alphabet
31-
3227
gap> a1:=RatExpToAut(RationalExpression("(bUcUdU@)*ab*"));
3328
< deterministic automaton on 4 letters with 3 states >
3429
gap> a2:=RatExpToAut(RationalExpression("(acUd)*(@Ub)"));
@@ -41,5 +36,4 @@ gap> a2:=RatExpToAut(RationalExpression("(acUd)*(@Ub)"));
4136
< deterministic automaton on 4 letters with 4 states >
4237
gap> NDUnionAutomata(a1,a2);
4338
Error, The arguments must be two automata over the same alphabet
44-
4539
gap> STOP_TEST( "AuxFun.tst", 10000 );

tst/SubAut.tst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#A SubAut.tst PatternClass package Ruth Hoffmann
44
##
55
gap> START_TEST("PatternClass");
6-
76
gap> LoadPackage("patternclass",false);
87
true
98
gap> SetAssertionLevel(1);
@@ -16,11 +15,10 @@ gap> InbetweenPermAutomaton([1,2,3,4,5,6,7],[1,2,3]);
1615
gap> InbetweenPermAutomaton([5,4,3,2,1],[1]);
1716
< deterministic automaton on 5 letters with 7 states >
1817
gap> InbetweenPermSet([1,2,3,4,5,6,7],[1,2,3]);
19-
[ [ 1, 2, 3 ], [ 1, 2, 3, 4 ], [ 1, 2, 3, 4, 5 ], [ 1, 2, 3, 4, 5, 6 ],
18+
[ [ 1, 2, 3 ], [ 1, 2, 3, 4 ], [ 1, 2, 3, 4, 5 ], [ 1, 2, 3, 4, 5, 6 ],
2019
[ 1, 2, 3, 4, 5, 6, 7 ] ]
2120
gap> IsSubPerm([1,2,3,4,5,6,7],[1,2,3]);
2221
true
2322
gap> IsSubPerm([1,2,3,4,7,6,5],[5,4,3,2,1]);
2423
false
25-
2624
gap> STOP_TEST( "SubAut.tst", 10000 );

tst/chap10.tst

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,31 @@
33
#A chap10.tst PatternClass package Ruth Hoffmann
44
##
55
gap> START_TEST("PatternClass");
6-
76
gap> LoadPackage("patternclass",false);
87
true
98
gap> SetAssertionLevel(1);
10-
119
gap> a:=Automaton("det",4,3,[[2,4,3,3],[4,4,1,4],[3,1,2,4]],[1],[2]);
1210
< deterministic automaton on 3 letters with 4 states >
1311
gap> b:=LoopFreeAut(a);
1412
< deterministic automaton on 3 letters with 5 states >
1513
gap> Display(b);
16-
| 1 2 3 4 5
14+
| 1 2 3 4 5
1715
--------------------
18-
a | 2 4 5 3 5
19-
b | 4 4 1 5 5
20-
c | 3 1 2 5 5
16+
a | 2 4 5 3 5
17+
b | 4 4 1 5 5
18+
c | 3 1 2 5 5
2119
Initial state: [ 1 ]
2220
Accepting state: [ 2 ]
2321
gap> a:=Automaton("det",4,3,[[2,4,3,3],[4,4,1,4],[3,1,2,4]],[1],[2]);
2422
< deterministic automaton on 3 letters with 4 states >
2523
gap> b:=LoopVertexFreeAut(a);
2624
< deterministic automaton on 3 letters with 3 states >
2725
gap> Display(b);
28-
| 1 2 3
26+
| 1 2 3
2927
--------------
30-
a | 2 2 1
31-
b | 2 2 2
32-
c | 3 2 2
28+
a | 2 2 1
29+
b | 2 2 2
30+
c | 3 2 2
3331
Initial state: [ 3 ]
3432
Accepting state: [ 1 ]
35-
3633
gap> STOP_TEST( "chap10.tst", 10000 );

tst/chap2.tst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ gap> LoadPackage("patternclass",false);
77
true
88
gap> SetAssertionLevel(1);
99
gap> Parstacks(3,5);
10-
[ [ 2, 5 ], [ 3, 10 ], [ 2, 4 ], [ 3 ], [ 6, 10 ], [ 5, 7 ], [ 6, 8 ],
10+
[ [ 2, 5 ], [ 3, 10 ], [ 2, 4 ], [ 3 ], [ 6, 10 ], [ 5, 7 ], [ 6, 8 ],
1111
[ 7, 9 ], [ 8 ], [ ] ]
1212
gap> Parstacks(3,5);
13-
[ [ 2, 5 ], [ 3, 10 ], [ 2, 4 ], [ 3 ], [ 6, 10 ], [ 5, 7 ], [ 6, 8 ],
13+
[ [ 2, 5 ], [ 3, 10 ], [ 2, 4 ], [ 3 ], [ 6, 10 ], [ 5, 7 ], [ 6, 8 ],
1414
[ 7, 9 ], [ 8 ], [ ] ]
1515
gap> Seqstacks(3,4,3,3);
16-
[ [ 2 ], [ 3, 5 ], [ 2, 4 ], [ 3 ], [ 6, 9 ], [ 5, 7 ], [ 6, 8 ], [ 7 ],
16+
[ [ 2 ], [ 3, 5 ], [ 2, 4 ], [ 3 ], [ 6, 9 ], [ 5, 7 ], [ 6, 8 ], [ 7 ],
1717
[ 10, 12 ], [ 9, 11 ], [ 10 ], [ 13, 15 ], [ 12, 14 ], [ 13 ], [ ] ]
1818
gap> BufferAndStack(4,4);
19-
[ [ 2 .. 5 ], [ 6 ], [ 6 ], [ 6 ], [ 6 ], [ 7, 10 ], [ 6, 8 ], [ 7, 9 ],
19+
[ [ 2 .. 5 ], [ 6 ], [ 6 ], [ 6 ], [ 6 ], [ 7, 10 ], [ 6, 8 ], [ 7, 9 ],
2020
[ 8 ], [ ] ]
2121
gap> STOP_TEST( "chap2.tst", 10000 );

tst/chap4.tst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ gap> a:=Seqstacks(3,3);
1111
gap> aut:=GraphToAut(a,1,8);
1212
< epsilon automaton on 6 letters with 680 states >
1313
gap> a:=Parstacks(5,5);
14-
[ [ 2, 7 ], [ 3, 12 ], [ 2, 4 ], [ 3, 5 ], [ 4, 6 ], [ 5 ], [ 8, 12 ],
14+
[ [ 2, 7 ], [ 3, 12 ], [ 2, 4 ], [ 3, 5 ], [ 4, 6 ], [ 5 ], [ 8, 12 ],
1515
[ 7, 9 ], [ 8, 10 ], [ 9, 11 ], [ 10 ], [ ] ]
1616
gap> aut:=ConstrainedGraphToAut(a,1,12,5);
1717
< epsilon automaton on 12 letters with 5074 states >

tst/chap6.tst

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7,45 +7,45 @@ gap> LoadPackage("patternclass",false);
77
true
88
gap> SetAssertionLevel(1);
99
gap> trans:=Transducer(3,1,[[1,2,1,2],[1,2,2,2],[2,2,1,3],[2,2,2,3],[1,1,3,3],[2,2,3,3]],[2]);
10-
rec( accepting := [ 2 ], initial := 1, states := 3,
11-
transitions := [ [ 1, 2, 1, 2 ], [ 1, 2, 2, 2 ], [ 2, 2, 1, 3 ],
10+
rec( accepting := [ 2 ], initial := 1, states := 3,
11+
transitions := [ [ 1, 2, 1, 2 ], [ 1, 2, 2, 2 ], [ 2, 2, 1, 3 ],
1212
[ 2, 2, 2, 3 ], [ 1, 1, 3, 3 ], [ 2, 2, 3, 3 ] ] )
1313
gap> DeletionTrans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, 2, 2, 4 ], [ 2, 0, 2, 2 ], [ 3, 2, 2, 2 ],
40+
[ 3, 0, 2, 2 ], [ 1, 1, 3, 2 ], [ 1, 0, 3, 3 ], [ 2, 1, 3, 1 ],
41+
[ 2, 0, 3, 3 ], [ 3, 1, 3, 3 ], [ 3, 0, 3, 3 ], [ 1, 1, 4, 4 ],
42+
[ 1, 0, 4, 1 ], [ 2, 2, 4, 4 ], [ 2, 0, 4, 2 ], [ 3, 3, 4, 4 ],
4343
[ 3, 0, 4, 4 ] ] )
4444
gap> a:=Automaton("det",1,1,[[1]],[1],[1]);
4545
< deterministic automaton on 1 letters with 1 states >
4646
gap> t:=Transducer(2,1,[[1,2,1,2],[2,1,1,2],[1,1,2,1],[2,2,2,1]],[1]);
47-
rec( accepting := [ 1 ], initial := 1, states := 2,
48-
transitions := [ [ 1, 2, 1, 2 ], [ 2, 1, 1, 2 ], [ 1, 1, 2, 1 ],
47+
rec( accepting := [ 1 ], initial := 1, states := 2,
48+
transitions := [ [ 1, 2, 1, 2 ], [ 2, 1, 1, 2 ], [ 1, 1, 2, 1 ],
4949
[ 2, 2, 2, 1 ] ] )
5050
gap> res:=CombineAutTransducer(a,t);
5151
< non deterministic automaton on 2 letters with 2 states >
@@ -88,12 +88,12 @@ gap> aut:=Automaton("det",3,2,[[2,2,3],[3,3,3]],[1],[3]);
8888
gap> ExpandAlphabet(aut,4);
8989
< deterministic automaton on 4 letters with 3 states >
9090
gap> Display(last);
91-
| 1 2 3
91+
| 1 2 3
9292
--------------
93-
a | 2 2 3
94-
b | 3 3 3
95-
c |
96-
d |
93+
a | 2 2 3
94+
b | 3 3 3
95+
c |
96+
d |
9797
Initial state: [ 1 ]
9898
Accepting state: [ 3 ]
9999
gap> ClassDirectSum(BoundedClassAutomaton(4),BoundedClassAutomaton(3));
@@ -103,28 +103,28 @@ gap> ClassDirectSum(BoundedClassAutomaton(3),BoundedClassAutomaton(6));
103103
gap> a:=BoundedClassAutomaton(5);
104104
< deterministic automaton on 5 letters with 5 states >
105105
gap> Spectrum(a);
106-
[ 1, 2, 6, 24, 120, 600, 3000, 15000, 75000, 375000, 1875000, 9375000,
106+
[ 1, 2, 6, 24, 120, 600, 3000, 15000, 75000, 375000, 1875000, 9375000,
107107
46875000, 234375000, 1171875000 ]
108108
gap> Spectrum(a,10);
109109
[ 1, 2, 6, 24, 120, 600, 3000, 15000, 75000, 375000 ]
110110
gap> NumberAcceptedWords(a,10);
111111
375000
112112
gap> AutStateTransitionMatrix(a);
113-
[ [ 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1 ], [ 0, 2, 1, 1, 1 ], [ 0, 0, 3, 1, 1 ],
113+
[ [ 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1 ], [ 0, 2, 1, 1, 1 ], [ 0, 0, 3, 1, 1 ],
114114
[ 0, 0, 0, 4, 1 ] ]
115115
gap> AcceptedWords(a,4);
116-
[ [ 1, 1, 1, 1 ], [ 1, 1, 2, 1 ], [ 1, 2, 1, 1 ], [ 1, 2, 2, 1 ],
117-
[ 1, 3, 1, 1 ], [ 1, 3, 2, 1 ], [ 2, 1, 1, 1 ], [ 2, 1, 2, 1 ],
118-
[ 2, 2, 1, 1 ], [ 2, 2, 2, 1 ], [ 2, 3, 1, 1 ], [ 2, 3, 2, 1 ],
119-
[ 3, 1, 1, 1 ], [ 3, 1, 2, 1 ], [ 3, 2, 1, 1 ], [ 3, 2, 2, 1 ],
120-
[ 3, 3, 1, 1 ], [ 3, 3, 2, 1 ], [ 4, 1, 1, 1 ], [ 4, 1, 2, 1 ],
116+
[ [ 1, 1, 1, 1 ], [ 1, 1, 2, 1 ], [ 1, 2, 1, 1 ], [ 1, 2, 2, 1 ],
117+
[ 1, 3, 1, 1 ], [ 1, 3, 2, 1 ], [ 2, 1, 1, 1 ], [ 2, 1, 2, 1 ],
118+
[ 2, 2, 1, 1 ], [ 2, 2, 2, 1 ], [ 2, 3, 1, 1 ], [ 2, 3, 2, 1 ],
119+
[ 3, 1, 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tst

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@
33
#A chap8.tst PatternClass package Ruth Hoffmann
44
##
55
gap> START_TEST("PatternClass");
6-
76
gap> LoadPackage("patternclass",false);
87
true
98
gap> SetAssertionLevel(1);
10-
119
gap> IsInterval([3,6,9,2]);
1210
false
1311
gap> IsInterval([2,6,5,3,4]);
1412
true
15-
1613
gap> IsSimplePerm([2,3,4,5,1,1,1,1]);
1714
true
1815
gap> IsSimplePerm([2,4,6,8,1,3,5,7]);
@@ -21,16 +18,17 @@ gap> IsSimplePerm([3,2,8,6,7,1,5,4]);
2118
false
2219
gap> IsSimplePerm([1,1,1,1]);
2320
false
24-
2521
gap> OnePointDelete([5,2,3,1,2,1]);
2622
[ [ 2, 3, 1, 2, 1 ], [ 4, 1, 2, 2, 1 ] ]
2723
gap> OnePointDelete([5,2,4,1,6,3]);
2824
[ [ 2, 3, 1, 2, 1 ], [ 4, 1, 2, 2, 1 ] ]
2925
gap> OnePointDelete([2,4,6,8,1,3,5,7]);
30-
[ 2, 4, 6, 8, 1, 3, 5, 7
31-
]is an exceptional permutation and needs 2 point deletion.fail
26+
[ 2, 4, 6, 8, 1, 3, 5, 7
27+
] is an exceptional permutation and needs 2 point deletion.
28+
fail
3229
gap> OnePointDelete([1,2,4,6,8,3,5,7]);
33-
[ 1, 2, 4, 6, 8, 3, 5, 7 ]is not simple.fail
30+
[ 1, 2, 4, 6, 8, 3, 5, 7 ] is not simple.
31+
fail
3432
gap> TwoPointDelete([2,4,6,8,1,3,5,7]);
3533
[ [ 2, 3, 4, 1, 1, 1 ] ]
3634
gap> TwoPointDelete([2,3,4,5,1,1,1,1]);
@@ -53,8 +51,8 @@ gap> PointDeletion([2,4,6,8,1,3,5,7]);
5351
gap> PointDeletion([2,3,4,5,1,1,1,1]);
5452
[ [ 2, 3, 4, 1, 1, 1 ] ]
5553
gap> PointDeletion([1,2,3,4,5]);
56-
[ 1, 2, 3, 4, 5 ]is not simple.fail
57-
54+
[ 1, 2, 3, 4, 5 ] is not simple.
55+
fail
5856
gap> Inflation([[3,2,1],[1],[1,2],[1,2,3]]);
5957
[ 6, 4, 5, 1, 2, 3 ]
6058
gap> Inflation([[1,2],[1],[4,2,1,3]]);
@@ -67,14 +65,12 @@ gap> BlockDecomposition([1,2,3,4,5]);
6765
[ [ 1, 2 ], [ 1, 2, 3, 4 ], [ 1 ] ]
6866
gap> BlockDecomposition([5,4,3,2,1]);
6967
[ [ 2, 1 ], [ 4, 3, 2, 1 ], [ 1 ] ]
70-
7168
gap> IsPlusDecomposable([3,3,2,3,2,2,1,1]);
7269
true
7370
gap> IsPlusDecomposable([3,2,8,6,7,1,5,4]);
7471
false
7572
gap> IsPlusDecomposable([3,4,2,6,5,7,1,8]);
7673
true
77-
7874
gap> IsMinusDecomposable([3,3,3,3,3,3,2,1]);
7975
true
8076
gap> IsMinusDecomposable([3,4,5,6,7,8,2,1]);
@@ -83,7 +79,6 @@ gap> IsMinusDecomposable([3,2,8,6,7,1,5,4]);
8379
false
8480
gap> IsMinusDecomposable([1,2,6,5,4,3]);
8581
false
86-
8782
gap> PermDirectSum([2,4,1,3],[2,5,4,1,3]);
8883
[ 2, 4, 1, 3, 6, 9, 8, 5, 7 ]
8984
gap> PermDirectSum([2,3,1,1],[2,4,3,1,1]);
@@ -92,6 +87,4 @@ gap> PermSkewSum([2,4,1,3],[2,5,4,1,3]);
9287
[ 7, 9, 6, 8, 2, 5, 4, 1, 3 ]
9388
gap> PermSkewSum([2,3,1,1],[2,4,3,1,1]);
9489
[ 7, 8, 6, 6, 2, 4, 3, 1, 1 ]
95-
96-
9790
gap> STOP_TEST( "chap8.tst", 10000 );

tst/chap9.tst

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
#A chap9.tst PatternClass package Ruth Hoffmann
44
##
55
gap> START_TEST("PatternClass");
6-
76
gap> LoadPackage("patternclass",false);
87
true
98
gap> SetAssertionLevel(1);
10-
119
gap> a:=InversionAut(1);
1210
< deterministic automaton on 2 letters with 4 states >
1311
gap> Spectrum(a);
@@ -17,14 +15,13 @@ gap> b:=InversionAut(5);
1715
gap> Spectrum(b);
1816
[ 0, 0, 0, 3, 22, 71, 169, 343, 628, 1068, 1717, 2640, 3914, 5629, 7889 ]
1917
gap> InversionAutOfClass(BoundedClassAutomaton(5),4);
20-
< deterministic automaton on 5 letters with 20 states >
18+
< epsilon automaton on 6 letters with 20 states >
2119
gap> InversionAutOfClass(BoundedClassAutomaton(5),6);
22-
< deterministic automaton on 7 letters with 42 states >
20+
< epsilon automaton on 8 letters with 30 states >
2321
gap> InversionAutOfClass(BoundedClassAutomaton(5),10);
24-
< deterministic automaton on 11 letters with 86 states >
22+
< epsilon automaton on 12 letters with 50 states >
2523
gap> InversionAutOfClass(BoundedClassAutomaton(7),4);
26-
< deterministic automaton on 7 letters with 27 states >
27-
24+
< epsilon automaton on 8 letters with 20 states >
2825
gap> PlusDecomposableAut(BoundedClassAutomaton(4));
2926
< deterministic automaton on 4 letters with 7 states >
3027
gap> PlusDecomposableAut(BoundedClassAutomaton(10));
@@ -41,7 +38,6 @@ gap> MinusIndecomposableAut(BoundedClassAutomaton(4));
4138
< deterministic automaton on 4 letters with 9 states >
4239
gap> MinusIndecomposableAut(BoundedClassAutomaton(8));
4340
< deterministic automaton on 8 letters with 31 states >
44-
4541
gap> NonSimpleAut(5);
4642
< epsilon automaton on 6 letters with 187 states >
4743
gap> NonSimpleAut(7);
@@ -56,7 +52,6 @@ gap> SimplePermAut(5);
5652
< deterministic automaton on 5 letters with 77 states >
5753
gap> SimplePermAut(6);
5854
< deterministic automaton on 6 letters with 266 states >
59-
6055
gap> IsExceptionalPerm([1,2,5,3,4]);
6156
false
6257
gap> IsExceptionalPerm([1,1,3,1,1]);
@@ -85,6 +80,4 @@ gap> ExceptionalBoundedAutomaton(15);
8580
< deterministic automaton on 15 letters with 104 states >
8681
gap> Spectrum(last);
8782
[ 0, 2, 0, 2, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0 ]
88-
89-
9083
gap> STOP_TEST( "chap9.tst", 10000 );

0 commit comments

Comments
 (0)