aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/strap/HOAGG-.lsp
blob: 7e964eea78440e58e94bab93f799476892f4b0f9 (plain)
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
(/VERSIONCHECK 2) 

(DECLAIM (FTYPE (FUNCTION (|%Thing| |%List| |%Shell|) |%Thing|)
                |HOAGG-;eval;ALA;1|)) 

(DECLAIM (FTYPE (FUNCTION (|%Thing| |%Shell|) (|%IntegerSection| 0))
                |HOAGG-;#;ANni;2|)) 

(DECLAIM (FTYPE (FUNCTION (|%Thing| |%Thing| |%Shell|) |%Boolean|)
                |HOAGG-;any?;MAB;3|)) 

(DECLAIM (FTYPE (FUNCTION (|%Thing| |%Thing| |%Shell|) |%Boolean|)
                |HOAGG-;every?;MAB;4|)) 

(DECLAIM (FTYPE (FUNCTION (|%Thing| |%Thing| |%Shell|)
                    (|%IntegerSection| 0))
                |HOAGG-;count;MANni;5|)) 

(DECLAIM (FTYPE (FUNCTION (|%Thing| |%Shell|) |%List|)
                |HOAGG-;members;AL;6|)) 

(DECLAIM (FTYPE (FUNCTION (|%Thing| |%Thing| |%Shell|) |%Boolean|)
                |HOAGG-;=;2AB;7|)) 

(DECLAIM (FTYPE (FUNCTION (|%Thing| |%Thing| |%Shell|)
                    (|%IntegerSection| 0))
                |HOAGG-;count;SANni;8|)) 

(DECLAIM (FTYPE (FUNCTION (|%Thing| |%Thing| |%Shell|) |%Boolean|)
                |HOAGG-;member?;SAB;9|)) 

(DECLAIM (FTYPE (FUNCTION (|%Thing| |%Shell|) |%Thing|)
                |HOAGG-;coerce;AOf;10|)) 

(DEFUN |HOAGG-;eval;ALA;1| (|u| |l| $)
  (SPADCALL (CONS #'|HOAGG-;eval;ALA;1!0| (VECTOR $ |l|)) |u|
      (|shellEntry| $ 12))) 

(DEFUN |HOAGG-;eval;ALA;1!0| (|#1| $$)
  (SPADCALL |#1| (SVREF $$ 1) (|shellEntry| (SVREF $$ 0) 10))) 

(DEFUN |HOAGG-;#;ANni;2| (|c| $)
  (LIST-LENGTH (SPADCALL |c| (|shellEntry| $ 15)))) 

(DEFUN |HOAGG-;any?;MAB;3| (|f| |c| $)
  (LET ((#0=#:G1380 NIL) (#1=#:G1381 T)
        (#2=#:G1403 (SPADCALL |c| (|shellEntry| $ 15))))
    (LOOP
      (COND
        ((ATOM #2#) (RETURN (COND (#1# NIL) (T #0#))))
        (T (LET ((|x| (CAR #2#)))
             (LET ((#3=#:G1379 (SPADCALL |x| |f|)))
               (COND (#1# (SETQ #0# #3#)) (T (SETQ #0# (OR #0# #3#))))
               (SETQ #1# NIL)))))
      (SETQ #2# (CDR #2#))))) 

(DEFUN |HOAGG-;every?;MAB;4| (|f| |c| $)
  (LET ((#0=#:G1385 NIL) (#1=#:G1386 T)
        (#2=#:G1404 (SPADCALL |c| (|shellEntry| $ 15))))
    (LOOP
      (COND
        ((ATOM #2#) (RETURN (COND (#1# T) (T #0#))))
        (T (LET ((|x| (CAR #2#)))
             (LET ((#3=#:G1384 (SPADCALL |x| |f|)))
               (COND
                 (#1# (SETQ #0# #3#))
                 (T (SETQ #0# (AND #0# #3#))))
               (SETQ #1# NIL)))))
      (SETQ #2# (CDR #2#))))) 

(DEFUN |HOAGG-;count;MANni;5| (|f| |c| $)
  (LET ((#0=#:G1389 NIL) (#1=#:G1390 T)
        (#2=#:G1405 (SPADCALL |c| (|shellEntry| $ 15))))
    (LOOP
      (COND
        ((ATOM #2#) (RETURN (COND (#1# 0) (T #0#))))
        (T (LET ((|x| (CAR #2#)))
             (AND (SPADCALL |x| |f|)
                  (LET ((#3=#:G1388 1))
                    (COND
                      (#1# (SETQ #0# #3#))
                      (T (SETQ #0# (+ #0# #3#))))
                    (SETQ #1# NIL))))))
      (SETQ #2# (CDR #2#))))) 

(DEFUN |HOAGG-;members;AL;6| (|x| $)
  (SPADCALL |x| (|shellEntry| $ 15))) 

(DEFUN |HOAGG-;=;2AB;7| (|x| |y| $)
  (COND
    ((SPADCALL |x| (SPADCALL |y| (|shellEntry| $ 32))
         (|shellEntry| $ 33))
     (LET ((#0=#:G1394 NIL) (#1=#:G1395 T)
           (#2=#:G1406 (SPADCALL |x| (|shellEntry| $ 15)))
           (#3=#:G1407 (SPADCALL |y| (|shellEntry| $ 15))))
       (LOOP
         (COND
           ((OR (ATOM #2#) (ATOM #3#)) (RETURN (COND (#1# T) (T #0#))))
           (T (LET ((|a| (CAR #2#)) (|b| (CAR #3#)))
                (LET ((#4=#:G1393 (SPADCALL |a| |b|
                                      (|shellEntry| $ 34))))
                  (COND
                    (#1# (SETQ #0# #4#))
                    (T (SETQ #0# (AND #0# #4#))))
                  (SETQ #1# NIL)))))
         (SETQ #2# (CDR #2#))
         (SETQ #3# (CDR #3#)))))
    (T NIL))) 

(DEFUN |HOAGG-;count;SANni;8| (|s| |x| $)
  (SPADCALL (CONS #'|HOAGG-;count;SANni;8!0| (VECTOR $ |s|)) |x|
      (|shellEntry| $ 36))) 

(DEFUN |HOAGG-;count;SANni;8!0| (|#1| $$)
  (SPADCALL (SVREF $$ 1) |#1| (|shellEntry| (SVREF $$ 0) 34))) 

(DEFUN |HOAGG-;member?;SAB;9| (|e| |c| $)
  (SPADCALL (CONS #'|HOAGG-;member?;SAB;9!0| (VECTOR $ |e|)) |c|
      (|shellEntry| $ 38))) 

(DEFUN |HOAGG-;member?;SAB;9!0| (|#1| $$)
  (SPADCALL (SVREF $$ 1) |#1| (|shellEntry| (SVREF $$ 0) 34))) 

(DEFUN |HOAGG-;coerce;AOf;10| (|x| $)
  (SPADCALL
      (SPADCALL
          (LET ((#0=#:G1409 (SPADCALL |x| (|shellEntry| $ 15)))
                (#1=#:G1408 NIL))
            (LOOP
              (COND
                ((ATOM #0#) (RETURN (NREVERSE #1#)))
                (T (LET ((|a| (CAR #0#)))
                     (SETQ #1#
                           (CONS (SPADCALL |a| (|shellEntry| $ 41))
                                 #1#)))))
              (SETQ #0# (CDR #0#))))
          (|shellEntry| $ 43))
      (|shellEntry| $ 44))) 

(DEFUN |HomogeneousAggregate&| (|#1| |#2|)
  (LET* ((|dv$1| (|devaluate| |#1|)) (|dv$2| (|devaluate| |#2|))
         (|dv$| (LIST '|HomogeneousAggregate&| |dv$1| |dv$2|))
         ($ (|newShell| 46))
         (|pv$| (|buildPredVector| 0 0
                    (LIST (|HasAttribute| |#1| '|finiteAggregate|)
                          (|HasAttribute| |#1| '|shallowlyMutable|)
                          (|HasCategory| |#2|
                              (LIST '|Evalable| (|devaluate| |#2|)))
                          (|HasCategory| |#2| '(|SetCategory|))
                          (|HasCategory| |#2| '(|BasicType|))
                          (|HasCategory| |#2|
                              '(|CoercibleTo| (|OutputForm|)))))))
    (SETF (|shellEntry| $ 0) |dv$|)
    (SETF (|shellEntry| $ 3) |pv$|)
    (|stuffDomainSlots| $)
    (SETF (|shellEntry| $ 6) |#1|)
    (SETF (|shellEntry| $ 7) |#2|)
    (COND
      ((|testBitVector| |pv$| 3)
       (SETF (|shellEntry| $ 13)
             (CONS (|dispatchFunction| |HOAGG-;eval;ALA;1|) $))))
    (COND
      ((|testBitVector| |pv$| 1)
       (PROGN
         (SETF (|shellEntry| $ 18)
               (CONS (|dispatchFunction| |HOAGG-;#;ANni;2|) $))
         (SETF (|shellEntry| $ 23)
               (CONS (|dispatchFunction| |HOAGG-;any?;MAB;3|) $))
         (SETF (|shellEntry| $ 26)
               (CONS (|dispatchFunction| |HOAGG-;every?;MAB;4|) $))
         (SETF (|shellEntry| $ 30)
               (CONS (|dispatchFunction| |HOAGG-;count;MANni;5|) $))
         (SETF (|shellEntry| $ 31)
               (CONS (|dispatchFunction| |HOAGG-;members;AL;6|) $))
         (COND
           ((|testBitVector| |pv$| 5)
            (SETF (|shellEntry| $ 35)
                  (CONS (|dispatchFunction| |HOAGG-;=;2AB;7|) $))))
         (COND
           ((|testBitVector| |pv$| 4)
            (PROGN
              (SETF (|shellEntry| $ 37)
                    (CONS (|dispatchFunction| |HOAGG-;count;SANni;8|)
                          $))
              (SETF (|shellEntry| $ 39)
                    (CONS (|dispatchFunction| |HOAGG-;member?;SAB;9|)
                          $)))))
         (COND
           ((|testBitVector| |pv$| 6)
            (SETF (|shellEntry| $ 45)
                  (CONS (|dispatchFunction| |HOAGG-;coerce;AOf;10|) $)))))))
    $)) 

(MAKEPROP '|HomogeneousAggregate&| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (|Equation| 7) (|List| 8) (0 . |eval|) (|Mapping| 7 7)
             (6 . |map|) (12 . |eval|) (|List| 7) (18 . |parts|)
             (|NonNegativeInteger|) (23 . |#|) (28 . |#|) (|Boolean|)
             (33 . |or|) (39 . |false|) (|Mapping| 19 7) (43 . |any?|)
             (49 . |and|) (55 . |true|) (59 . |every?|) (65 . |One|)
             (69 . +) (75 . |Zero|) (79 . |count|) (85 . |members|)
             (90 . |#|) (95 . |size?|) (101 . =) (107 . =)
             (113 . |count|) (119 . |count|) (125 . |any?|)
             (131 . |member?|) (|OutputForm|) (137 . |coerce|)
             (|List| $) (142 . |commaSeparate|) (147 . |bracket|)
             (152 . |coerce|))
          '#(|members| 157 |member?| 162 |every?| 168 |eval| 174
             |count| 180 |coerce| 192 |any?| 197 = 203 |#| 209)
          'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 45
                                '(2 7 0 0 9 10 2 6 0 11 0 12 2 0 0 0 9
                                  13 1 6 14 0 15 1 14 16 0 17 1 0 16 0
                                  18 2 19 0 0 0 20 0 19 0 21 2 0 19 22
                                  0 23 2 19 0 0 0 24 0 19 0 25 2 0 19
                                  22 0 26 0 16 0 27 2 16 0 0 0 28 0 16
                                  0 29 2 0 16 22 0 30 1 0 14 0 31 1 6
                                  16 0 32 2 6 19 0 16 33 2 7 19 0 0 34
                                  2 0 19 0 0 35 2 6 16 22 0 36 2 0 16 7
                                  0 37 2 6 19 22 0 38 2 0 19 7 0 39 1 7
                                  40 0 41 1 40 0 42 43 1 40 0 0 44 1 0
                                  40 0 45 1 0 14 0 31 2 0 19 7 0 39 2 0
                                  19 22 0 26 2 0 0 0 9 13 2 0 16 7 0 37
                                  2 0 16 22 0 30 1 0 40 0 45 2 0 19 22
                                  0 23 2 0 19 0 0 35 1 0 16 0 18)))))
          '|lookupComplete|))