CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

Path: gap4r8 / pkg / ace-5.2 / src / enum00.c
Views: 418346
1
2
/**************************************************************************
3
4
enum00.c
5
Colin Ramsay ([email protected])
6
25 Feb 00
7
8
ADVANCED COSET ENUMERATOR, Version 3.001
9
10
Copyright 2000
11
Centre for Discrete Mathematics and Computing,
12
Department of Mathematics and
13
Department of Computer Science & Electrical Engineering,
14
The University of Queensland, QLD 4072.
15
(http://staff.itee.uq.edu.au/havas)
16
17
This is the include file for the enumerator's finite automata. The
18
transition tables take the current state & the previous action's result,
19
and give the next action & the next state. Note that the complete state
20
machine also includes an initialisation phase & some special actions at the
21
exiting of a state with a particular result. These are coded into the
22
start of the _enum() function and a switch() at the end of the machine's
23
main loop respectively.
24
25
States:
26
0 catch-all dummy/invalid state (forces return with fatal error)
27
1 initial state for start mode R/C-style
28
2 --"-- R*-style
29
3 --"-- Cr-style
30
4 --"-- C*-style
31
5 --"-- reserved
32
6 --"-- C-style
33
7 --"-- Rc-style
34
8 --"-- R-style
35
9 --"-- CR-style
36
10 initial state for continue mode R/C-style
37
11 --"-- R*-style
38
12 --"-- Cr-style
39
13 --"-- C*-style
40
14 --"-- reserved
41
15 --"-- C-style
42
16 --"-- Rc-style
43
17 --"-- R-style
44
18 --"-- CR-style
45
19 initial state for redo mode R/C-style
46
20 --"-- R*-style
47
21 --"-- Cr-style
48
22 --"-- C*-style
49
23 --"-- reserved
50
24 --"-- C-style
51
25 --"-- Rc-style
52
26 --"-- R-style
53
27 --"-- CR-style
54
28 RD in R-style
55
29 Lx in R-style
56
30 CO in R-style
57
31 Check phase (all styles)
58
32 CL in C-style
59
33 SG in C-style
60
34 RS in C-style
61
35 CD in C-style
62
36 CO in C-style
63
37 SG in R-style
64
38 CL in CR-style
65
39 SG in CR-style
66
40 RS in CR-style
67
41 CD in CR-style
68
42 CO in CR-style
69
43 RD in CR-style
70
44 SG in R/C-style
71
45 RD in R/C-style
72
46 CL in R/C-style
73
47 CL in Cr-style
74
48 SG in Cr-style
75
49 RS in Cr-style
76
50 CD in Cr-style
77
51 CO in Cr-style
78
52 RD in Cr-style
79
53 SG in Rc-style
80
54 RD in Rc-style
81
55 CL in Rc-style
82
56 CL in Rc-style
83
57 CO in Rc-style
84
58 CD in Rc-style
85
59 CL in R*-style
86
60 SG in R*-style
87
61 RP in R*-style
88
62 CO in R*-style
89
90
Results (internal):
91
0 unable to make definition (overflow)
92
-1 success (continue)
93
-2 finite result (potential index)
94
95
Actions (may cause state machine exit & force return from al0_enum()):
96
-1 catch-all dummy/invalid action (forces return with fatal error)
97
0 null action (always succeeds)
98
1 definitions (R-style)
99
2 lookahead (R-style)
100
3 compaction (any style; no space forces overflow return)
101
4 definitions/deductions (C-style)
102
5 lookahead (C-style)
103
6 check finite result (always returns; index or incomplete table)
104
7 apply subgroup generators to coset 1 (overflow returns -260)
105
8 apply relators to coset 1
106
9 definitions/deductions (R*-style)
107
108
**************************************************************************/
109
110
static int al0_act[63][3] =
111
{
112
{-1, -1, -1}, /* 0 */
113
{-1, 7, -1}, /* 1 */
114
{-1, 7, -1}, /* 2 */
115
{-1, 7, -1}, /* 3 */
116
{-1, -1, -1}, /* 4 */
117
{-1, -1, -1}, /* 5 */
118
{-1, 7, -1}, /* 6 */
119
{-1, 7, -1}, /* 7 */
120
{-1, 7, -1}, /* 8 */
121
{-1, 7, -1}, /* 9 */
122
{-1, 1, -1}, /* 10 */
123
{-1, 9, -1}, /* 11 */
124
{-1, 4, -1}, /* 12 */
125
{-1, -1, -1}, /* 13 */
126
{-1, -1, -1}, /* 14 */
127
{-1, 4, -1}, /* 15 */
128
{-1, 1, -1}, /* 16 */
129
{-1, 1, -1}, /* 17 */
130
{-1, 4, -1}, /* 18 */
131
{-1, 7, -1}, /* 19 */
132
{-1, 5, -1}, /* 20 */
133
{-1, 5, -1}, /* 21 */
134
{-1, -1, -1}, /* 22 */
135
{-1, -1, -1}, /* 23 */
136
{-1, 5, -1}, /* 24 */
137
{-1, 7, -1}, /* 25 */
138
{-1, 7, -1}, /* 26 */
139
{-1, 5, -1}, /* 27 */
140
{ 2, 1, 6}, /* 28 */
141
{-1, 3, 6}, /* 29 */
142
{-1, 1, -1}, /* 30 */
143
{-1, -1, -1}, /* 31 */
144
{-1, 7, 6}, /* 32 */
145
{-1, 8, 6}, /* 33 */
146
{ 4, 4, 6}, /* 34 */
147
{ 3, 4, 6}, /* 35 */
148
{-1, 4, -1}, /* 36 */
149
{-1, 1, 6}, /* 37 */
150
{-1, 7, 6}, /* 38 */
151
{-1, 8, 6}, /* 39 */
152
{ 4, 4, 6}, /* 40 */
153
{ 3, 1, 6}, /* 41 */
154
{-1, 1, -1}, /* 42 */
155
{ 4, 4, 6}, /* 43 */
156
{-1, 1, 6}, /* 44 */
157
{ 5, 1, 6}, /* 45 */
158
{-1, 4, 6}, /* 46 */
159
{-1, 7, 6}, /* 47 */
160
{-1, 8, 6}, /* 48 */
161
{ 4, 4, 6}, /* 49 */
162
{ 3, 1, 6}, /* 50 */
163
{-1, 1, -1}, /* 51 */
164
{ 4, 4, 6}, /* 52 */
165
{-1, 1, 6}, /* 53 */
166
{ 5, 5, 6}, /* 54 */
167
{-1, 3, 6}, /* 55 */
168
{-1, 4, 6}, /* 56 */
169
{-1, 4, -1}, /* 57 */
170
{ 3, 1, 6}, /* 58 */
171
{-1, 7, 6}, /* 59 */
172
{-1, 9, 6}, /* 60 */
173
{ 3, 9, 6}, /* 61 */
174
{-1, 9, -1} /* 62 */
175
};
176
177
static int al0_st[63][3] =
178
{
179
{ 0, 0, 0}, /* 0 */
180
{ 0, 44, 0}, /* 1 */
181
{ 0, 60, 0}, /* 2 */
182
{ 0, 48, 0}, /* 3 */
183
{ 0, 0, 0}, /* 4 */
184
{ 0, 0, 0}, /* 5 */
185
{ 0, 33, 0}, /* 6 */
186
{ 0, 53, 0}, /* 7 */
187
{ 0, 37, 0}, /* 8 */
188
{ 0, 39, 0}, /* 9 */
189
{ 0, 45, 0}, /* 10 */
190
{ 0, 61, 0}, /* 11 */
191
{ 0, 50, 0}, /* 12 */
192
{ 0, 0, 0}, /* 13 */
193
{ 0, 0, 0}, /* 14 */
194
{ 0, 35, 0}, /* 15 */
195
{ 0, 54, 0}, /* 16 */
196
{ 0, 28, 0}, /* 17 */
197
{ 0, 41, 0}, /* 18 */
198
{ 0, 44, 0}, /* 19 */
199
{ 0, 59, 0}, /* 20 */
200
{ 0, 47, 0}, /* 21 */
201
{ 0, 0, 0}, /* 22 */
202
{ 0, 0, 0}, /* 23 */
203
{ 0, 32, 0}, /* 24 */
204
{ 0, 53, 0}, /* 25 */
205
{ 0, 37, 0}, /* 26 */
206
{ 0, 38, 0}, /* 27 */
207
{29, 28, 31}, /* 28 */
208
{ 0, 30, 31}, /* 29 */
209
{ 0, 28, 0}, /* 30 */
210
{ 0, 0, 0}, /* 31 */
211
{ 0, 33, 31}, /* 32 */
212
{ 0, 34, 31}, /* 33 */
213
{35, 35, 31}, /* 34 */
214
{36, 35, 31}, /* 35 */
215
{ 0, 35, 0}, /* 36 */
216
{ 0, 28, 31}, /* 37 */
217
{ 0, 39, 31}, /* 38 */
218
{ 0, 40, 31}, /* 39 */
219
{41, 41, 31}, /* 40 */
220
{42, 43, 31}, /* 41 */
221
{ 0, 43, 0}, /* 42 */
222
{41, 41, 31}, /* 43 */
223
{ 0, 45, 31}, /* 44 */
224
{46, 45, 31}, /* 45 */
225
{ 0, 41, 31}, /* 46 */
226
{ 0, 48, 31}, /* 47 */
227
{ 0, 49, 31}, /* 48 */
228
{50, 50, 31}, /* 49 */
229
{51, 52, 31}, /* 50 */
230
{ 0, 52, 0}, /* 51 */
231
{35, 35, 31}, /* 52 */
232
{ 0, 54, 31}, /* 53 */
233
{55, 56, 31}, /* 54 */
234
{ 0, 57, 31}, /* 55 */
235
{ 0, 58, 31}, /* 56 */
236
{ 0, 58, 0}, /* 57 */
237
{30, 28, 31}, /* 58 */
238
{ 0, 60, 31}, /* 59 */
239
{ 0, 61, 31}, /* 60 */
240
{62, 61, 31}, /* 61 */
241
{ 0, 61, 0} /* 62 */
242
};
243
244
245