diff options
author | dos-reis <gdr@axiomatics.org> | 2007-12-03 10:25:00 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2007-12-03 10:25:00 +0000 |
commit | 26219569be28dc05b86ab030b393f8465dee33ca (patch) | |
tree | 19fd1ca9540923a735765c8653afdd1a2272433a /src | |
parent | 343269a2cb9ba10117847c36636dc31bad7404ab (diff) | |
download | open-axiom-26219569be28dc05b86ab030b393f8465dee33ca.tar.gz |
* aggcat.spad.pamphlet: Update cached Lisp translations.
Diffstat (limited to 'src')
-rw-r--r-- | src/algebra/ChangeLog | 4 | ||||
-rw-r--r-- | src/algebra/aggcat.spad.pamphlet | 3458 | ||||
-rw-r--r-- | src/algebra/list.spad.pamphlet | 1019 |
3 files changed, 3957 insertions, 524 deletions
diff --git a/src/algebra/ChangeLog b/src/algebra/ChangeLog index 2e9ad98f..5f0739de 100644 --- a/src/algebra/ChangeLog +++ b/src/algebra/ChangeLog @@ -1,3 +1,7 @@ +2007-12-03 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * aggcat.spad.pamphlet: Update cached Lisp translations. + 2007-12-02 Gabriel Dos Reis <gdr@cs.tamu.edu> * bags.spad.pamphlet (Stack): Relax requirement element type S. diff --git a/src/algebra/aggcat.spad.pamphlet b/src/algebra/aggcat.spad.pamphlet index e6163807..86f3ca7e 100644 --- a/src/algebra/aggcat.spad.pamphlet +++ b/src/algebra/aggcat.spad.pamphlet @@ -154,80 +154,117 @@ Note that this code is not included in the generated catdef.spad file. <<HOAGG.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(SETQ |HomogeneousAggregate;CAT| (QUOTE NIL)) - -(SETQ |HomogeneousAggregate;AL| (QUOTE NIL)) - -(DEFUN |HomogeneousAggregate| (#1=#:G82375) - (LET (#2=#:G82376) - (COND - ((SETQ #2# (|assoc| (|devaluate| #1#) |HomogeneousAggregate;AL|)) - (CDR #2#)) - (T - (SETQ |HomogeneousAggregate;AL| - (|cons5| - (CONS (|devaluate| #1#) (SETQ #2# (|HomogeneousAggregate;| #1#))) - |HomogeneousAggregate;AL|)) - #2#)))) - -(DEFUN |HomogeneousAggregate;| (|t#1|) - (PROG (#1=#:G82374) - (RETURN - (PROG1 - (LETT #1# - (|sublisV| - (PAIR (QUOTE (|t#1|)) (LIST (|devaluate| |t#1|))) - (COND - (|HomogeneousAggregate;CAT|) - ((QUOTE T) - (LETT |HomogeneousAggregate;CAT| - (|Join| - (|Aggregate|) - (|mkCategory| - (QUOTE |domain|) - (QUOTE ( - ((|map| (|$| (|Mapping| |t#1| |t#1|) |$|)) T) - ((|map!| (|$| (|Mapping| |t#1| |t#1|) |$|)) - (|has| |$| (ATTRIBUTE |shallowlyMutable|))) - ((|any?| - ((|Boolean|) (|Mapping| (|Boolean|) |t#1|) |$|)) - (|has| |$| (ATTRIBUTE |finiteAggregate|))) - ((|every?| - ((|Boolean|) (|Mapping| (|Boolean|) |t#1|) |$|)) - (|has| |$| (ATTRIBUTE |finiteAggregate|))) - ((|count| - ((|NonNegativeInteger|) - (|Mapping| (|Boolean|) |t#1|) |$|)) - (|has| |$| (ATTRIBUTE |finiteAggregate|))) - ((|parts| ((|List| |t#1|) |$|)) - (|has| |$| (ATTRIBUTE |finiteAggregate|))) - ((|members| ((|List| |t#1|) |$|)) - (|has| |$| (ATTRIBUTE |finiteAggregate|))) - ((|count| ((|NonNegativeInteger|) |t#1| |$|)) - (AND - (|has| |t#1| (|SetCategory|)) - (|has| |$| (ATTRIBUTE |finiteAggregate|)))) - ((|member?| ((|Boolean|) |t#1| |$|)) - (AND - (|has| |t#1| (|SetCategory|)) - (|has| |$| (ATTRIBUTE |finiteAggregate|)))))) - (QUOTE ( - ((|SetCategory|) (|has| |t#1| (|SetCategory|))) - ((|Evalable| |t#1|) - (AND - (|has| |t#1| (|Evalable| |t#1|)) - (|has| |t#1| (|SetCategory|)))))) - (QUOTE ( - (|Boolean|) - (|NonNegativeInteger|) - (|List| |t#1|))) - NIL)) - . #2=(|HomogeneousAggregate|))))) . #2#) - (SETELT #1# 0 - (LIST (QUOTE |HomogeneousAggregate|) (|devaluate| |t#1|))))))) - +(/VERSIONCHECK 2) + +(DEFPARAMETER |HomogeneousAggregate;CAT| 'NIL) + +(DEFPARAMETER |HomogeneousAggregate;AL| 'NIL) + +(DEFUN |HomogeneousAggregate| (#0=#:G1399) + (LET (#1=#:G1400) + (COND + ((SETQ #1# (|assoc| (|devaluate| #0#) |HomogeneousAggregate;AL|)) + (CDR #1#)) + (T (SETQ |HomogeneousAggregate;AL| + (|cons5| (CONS (|devaluate| #0#) + (SETQ #1# (|HomogeneousAggregate;| #0#))) + |HomogeneousAggregate;AL|)) + #1#)))) + +(DEFUN |HomogeneousAggregate;| (|t#1|) + (PROG (#0=#:G1398) + (RETURN + (PROG1 (LETT #0# + (|sublisV| + (PAIR '(|t#1|) (LIST (|devaluate| |t#1|))) + (COND + (|HomogeneousAggregate;CAT|) + ('T + (LETT |HomogeneousAggregate;CAT| + (|Join| (|Aggregate|) + (|mkCategory| '|domain| + '(((|map| + ($ (|Mapping| |t#1| |t#1|) + $)) + T) + ((|map!| + ($ (|Mapping| |t#1| |t#1|) + $)) + (|has| $ + (ATTRIBUTE + |shallowlyMutable|))) + ((|any?| + ((|Boolean|) + (|Mapping| (|Boolean|) + |t#1|) + $)) + (|has| $ + (ATTRIBUTE + |finiteAggregate|))) + ((|every?| + ((|Boolean|) + (|Mapping| (|Boolean|) + |t#1|) + $)) + (|has| $ + (ATTRIBUTE + |finiteAggregate|))) + ((|count| + ((|NonNegativeInteger|) + (|Mapping| (|Boolean|) + |t#1|) + $)) + (|has| $ + (ATTRIBUTE + |finiteAggregate|))) + ((|parts| + ((|List| |t#1|) $)) + (|has| $ + (ATTRIBUTE + |finiteAggregate|))) + ((|members| + ((|List| |t#1|) $)) + (|has| $ + (ATTRIBUTE + |finiteAggregate|))) + ((|count| + ((|NonNegativeInteger|) + |t#1| $)) + (AND + (|has| |t#1| + (|SetCategory|)) + (|has| $ + (ATTRIBUTE + |finiteAggregate|)))) + ((|member?| + ((|Boolean|) |t#1| $)) + (AND + (|has| |t#1| + (|SetCategory|)) + (|has| $ + (ATTRIBUTE + |finiteAggregate|))))) + '(((|CoercibleTo| + (|OutputForm|)) + (|has| |t#1| + (|CoercibleTo| + (|OutputForm|)))) + ((|SetCategory|) + (|has| |t#1| + (|SetCategory|))) + ((|Evalable| |t#1|) + (AND + (|has| |t#1| + (|Evalable| |t#1|)) + (|has| |t#1| + (|SetCategory|))))) + '((|Boolean|) + (|NonNegativeInteger|) + (|List| |t#1|)) + NIL)) + . #1=(|HomogeneousAggregate|))))) . #1#) + (SETELT #0# 0 + (LIST '|HomogeneousAggregate| (|devaluate| |t#1|))))))) @ \section{HOAGG-.lsp BOOTSTRAP} {\bf HOAGG-} depends on {\bf HOAGG}. We need to break this cycle to build @@ -240,37 +277,293 @@ Note that this code is not included in the generated catdef.spad file. <<HOAGG-.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(DEFUN |HOAGG-;eval;ALA;1| (|u| |l| |$|) (SPADCALL (CONS (FUNCTION |HOAGG-;eval;ALA;1!0|) (VECTOR |$| |l|)) |u| (QREFELT |$| 11))) - -(DEFUN |HOAGG-;eval;ALA;1!0| (|#1| |$$|) (SPADCALL |#1| (QREFELT |$$| 1) (QREFELT (QREFELT |$$| 0) 9))) - -(DEFUN |HOAGG-;#;ANni;2| (|c| |$|) (LENGTH (SPADCALL |c| (QREFELT |$| 14)))) - -(DEFUN |HOAGG-;any?;MAB;3| (|f| |c| |$|) (PROG (|x| #1=#:G82396 #2=#:G82393 #3=#:G82391 #4=#:G82392) (RETURN (SEQ (PROGN (LETT #4# NIL |HOAGG-;any?;MAB;3|) (SEQ (LETT |x| NIL |HOAGG-;any?;MAB;3|) (LETT #1# (SPADCALL |c| (QREFELT |$| 14)) |HOAGG-;any?;MAB;3|) G190 (COND ((OR (ATOM #1#) (PROGN (LETT |x| (CAR #1#) |HOAGG-;any?;MAB;3|) NIL)) (GO G191))) (SEQ (EXIT (PROGN (LETT #2# (SPADCALL |x| |f|) |HOAGG-;any?;MAB;3|) (COND (#4# (LETT #3# (COND (#3# (QUOTE T)) ((QUOTE T) #2#)) |HOAGG-;any?;MAB;3|)) ((QUOTE T) (PROGN (LETT #3# #2# |HOAGG-;any?;MAB;3|) (LETT #4# (QUOTE T) |HOAGG-;any?;MAB;3|))))))) (LETT #1# (CDR #1#) |HOAGG-;any?;MAB;3|) (GO G190) G191 (EXIT NIL)) (COND (#4# #3#) ((QUOTE T) (QUOTE NIL)))))))) - -(DEFUN |HOAGG-;every?;MAB;4| (|f| |c| |$|) (PROG (|x| #1=#:G82401 #2=#:G82399 #3=#:G82397 #4=#:G82398) (RETURN (SEQ (PROGN (LETT #4# NIL |HOAGG-;every?;MAB;4|) (SEQ (LETT |x| NIL |HOAGG-;every?;MAB;4|) (LETT #1# (SPADCALL |c| (QREFELT |$| 14)) |HOAGG-;every?;MAB;4|) G190 (COND ((OR (ATOM #1#) (PROGN (LETT |x| (CAR #1#) |HOAGG-;every?;MAB;4|) NIL)) (GO G191))) (SEQ (EXIT (PROGN (LETT #2# (SPADCALL |x| |f|) |HOAGG-;every?;MAB;4|) (COND (#4# (LETT #3# (COND (#3# #2#) ((QUOTE T) (QUOTE NIL))) |HOAGG-;every?;MAB;4|)) ((QUOTE T) (PROGN (LETT #3# #2# |HOAGG-;every?;MAB;4|) (LETT #4# (QUOTE T) |HOAGG-;every?;MAB;4|))))))) (LETT #1# (CDR #1#) |HOAGG-;every?;MAB;4|) (GO G190) G191 (EXIT NIL)) (COND (#4# #3#) ((QUOTE T) (QUOTE T)))))))) - -(DEFUN |HOAGG-;count;MANni;5| (|f| |c| |$|) (PROG (|x| #1=#:G82406 #2=#:G82404 #3=#:G82402 #4=#:G82403) (RETURN (SEQ (PROGN (LETT #4# NIL |HOAGG-;count;MANni;5|) (SEQ (LETT |x| NIL |HOAGG-;count;MANni;5|) (LETT #1# (SPADCALL |c| (QREFELT |$| 14)) |HOAGG-;count;MANni;5|) G190 (COND ((OR (ATOM #1#) (PROGN (LETT |x| (CAR #1#) |HOAGG-;count;MANni;5|) NIL)) (GO G191))) (SEQ (EXIT (COND ((SPADCALL |x| |f|) (PROGN (LETT #2# 1 |HOAGG-;count;MANni;5|) (COND (#4# (LETT #3# (|+| #3# #2#) |HOAGG-;count;MANni;5|)) ((QUOTE T) (PROGN (LETT #3# #2# |HOAGG-;count;MANni;5|) (LETT #4# (QUOTE T) |HOAGG-;count;MANni;5|))))))))) (LETT #1# (CDR #1#) |HOAGG-;count;MANni;5|) (GO G190) G191 (EXIT NIL)) (COND (#4# #3#) ((QUOTE T) 0))))))) - -(DEFUN |HOAGG-;members;AL;6| (|x| |$|) (SPADCALL |x| (QREFELT |$| 14))) - -(DEFUN |HOAGG-;count;SANni;7| (|s| |x| |$|) (SPADCALL (CONS (FUNCTION |HOAGG-;count;SANni;7!0|) (VECTOR |$| |s|)) |x| (QREFELT |$| 24))) - -(DEFUN |HOAGG-;count;SANni;7!0| (|#1| |$$|) (SPADCALL (QREFELT |$$| 1) |#1| (QREFELT (QREFELT |$$| 0) 23))) - -(DEFUN |HOAGG-;member?;SAB;8| (|e| |c| |$|) (SPADCALL (CONS (FUNCTION |HOAGG-;member?;SAB;8!0|) (VECTOR |$| |e|)) |c| (QREFELT |$| 26))) - -(DEFUN |HOAGG-;member?;SAB;8!0| (|#1| |$$|) (SPADCALL (QREFELT |$$| 1) |#1| (QREFELT (QREFELT |$$| 0) 23))) - -(DEFUN |HOAGG-;=;2AB;9| (|x| |y| |$|) (PROG (|b| #1=#:G82416 |a| #2=#:G82415 #3=#:G82412 #4=#:G82410 #5=#:G82411) (RETURN (SEQ (COND ((SPADCALL |x| (SPADCALL |y| (QREFELT |$| 28)) (QREFELT |$| 29)) (PROGN (LETT #5# NIL |HOAGG-;=;2AB;9|) (SEQ (LETT |b| NIL |HOAGG-;=;2AB;9|) (LETT #1# (SPADCALL |y| (QREFELT |$| 14)) |HOAGG-;=;2AB;9|) (LETT |a| NIL |HOAGG-;=;2AB;9|) (LETT #2# (SPADCALL |x| (QREFELT |$| 14)) |HOAGG-;=;2AB;9|) G190 (COND ((OR (ATOM #2#) (PROGN (LETT |a| (CAR #2#) |HOAGG-;=;2AB;9|) NIL) (ATOM #1#) (PROGN (LETT |b| (CAR #1#) |HOAGG-;=;2AB;9|) NIL)) (GO G191))) (SEQ (EXIT (PROGN (LETT #3# (SPADCALL |a| |b| (QREFELT |$| 23)) |HOAGG-;=;2AB;9|) (COND (#5# (LETT #4# (COND (#4# #3#) ((QUOTE T) (QUOTE NIL))) |HOAGG-;=;2AB;9|)) ((QUOTE T) (PROGN (LETT #4# #3# |HOAGG-;=;2AB;9|) (LETT #5# (QUOTE T) |HOAGG-;=;2AB;9|))))))) (LETT #2# (PROG1 (CDR #2#) (LETT #1# (CDR #1#) |HOAGG-;=;2AB;9|)) |HOAGG-;=;2AB;9|) (GO G190) G191 (EXIT NIL)) (COND (#5# #4#) ((QUOTE T) (QUOTE T))))) ((QUOTE T) (QUOTE NIL))))))) - -(DEFUN |HOAGG-;coerce;AOf;10| (|x| |$|) (PROG (#1=#:G82420 |a| #2=#:G82421) (RETURN (SEQ (SPADCALL (SPADCALL (PROGN (LETT #1# NIL |HOAGG-;coerce;AOf;10|) (SEQ (LETT |a| NIL |HOAGG-;coerce;AOf;10|) (LETT #2# (SPADCALL |x| (QREFELT |$| 14)) |HOAGG-;coerce;AOf;10|) G190 (COND ((OR (ATOM #2#) (PROGN (LETT |a| (CAR #2#) |HOAGG-;coerce;AOf;10|) NIL)) (GO G191))) (SEQ (EXIT (LETT #1# (CONS (SPADCALL |a| (QREFELT |$| 32)) #1#) |HOAGG-;coerce;AOf;10|))) (LETT #2# (CDR #2#) |HOAGG-;coerce;AOf;10|) (GO G190) G191 (EXIT (NREVERSE0 #1#)))) (QREFELT |$| 34)) (QREFELT |$| 35)))))) - -(DEFUN |HomogeneousAggregate&| (|#1| |#2|) (PROG (|DV$1| |DV$2| |dv$| |$| |pv$|) (RETURN (PROGN (LETT |DV$1| (|devaluate| |#1|) . #1=(|HomogeneousAggregate&|)) (LETT |DV$2| (|devaluate| |#2|) . #1#) (LETT |dv$| (LIST (QUOTE |HomogeneousAggregate&|) |DV$1| |DV$2|) . #1#) (LETT |$| (GETREFV 38) . #1#) (QSETREFV |$| 0 |dv$|) (QSETREFV |$| 3 (LETT |pv$| (|buildPredVector| 0 0 (LIST (|HasAttribute| |#1| (QUOTE |finiteAggregate|)) (|HasAttribute| |#1| (QUOTE |shallowlyMutable|)) (|HasCategory| |#2| (LIST (QUOTE |Evalable|) (|devaluate| |#2|))) (|HasCategory| |#2| (QUOTE (|SetCategory|))))) . #1#)) (|stuffDomainSlots| |$|) (QSETREFV |$| 6 |#1|) (QSETREFV |$| 7 |#2|) (COND ((|testBitVector| |pv$| 3) (QSETREFV |$| 12 (CONS (|dispatchFunction| |HOAGG-;eval;ALA;1|) |$|)))) (COND ((|testBitVector| |pv$| 1) (PROGN (QSETREFV |$| 16 (CONS (|dispatchFunction| |HOAGG-;#;ANni;2|) |$|)) (QSETREFV |$| 19 (CONS (|dispatchFunction| |HOAGG-;any?;MAB;3|) |$|)) (QSETREFV |$| 20 (CONS (|dispatchFunction| |HOAGG-;every?;MAB;4|) |$|)) (QSETREFV |$| 21 (CONS (|dispatchFunction| |HOAGG-;count;MANni;5|) |$|)) (QSETREFV |$| 22 (CONS (|dispatchFunction| |HOAGG-;members;AL;6|) |$|)) (COND ((|testBitVector| |pv$| 4) (PROGN (QSETREFV |$| 25 (CONS (|dispatchFunction| |HOAGG-;count;SANni;7|) |$|)) (QSETREFV |$| 27 (CONS (|dispatchFunction| |HOAGG-;member?;SAB;8|) |$|)) (QSETREFV |$| 30 (CONS (|dispatchFunction| |HOAGG-;=;2AB;9|) |$|)) (QSETREFV |$| 36 (CONS (|dispatchFunction| |HOAGG-;coerce;AOf;10|) |$|)))))))) |$|)))) - -(MAKEPROP (QUOTE |HomogeneousAggregate&|) (QUOTE |infovec|) (LIST (QUOTE #(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) (|List| 37) (0 . |eval|) (|Mapping| 7 7) (6 . |map|) (12 . |eval|) (|List| 7) (18 . |parts|) (|NonNegativeInteger|) (23 . |#|) (|Boolean|) (|Mapping| 17 7) (28 . |any?|) (34 . |every?|) (40 . |count|) (46 . |members|) (51 . |=|) (57 . |count|) (63 . |count|) (69 . |any?|) (75 . |member?|) (81 . |#|) (86 . |size?|) (92 . |=|) (|OutputForm|) (98 . |coerce|) (|List| |$|) (103 . |commaSeparate|) (108 . |bracket|) (113 . |coerce|) (|Equation| 7))) (QUOTE #(|members| 118 |member?| 123 |every?| 129 |eval| 135 |count| 141 |coerce| 153 |any?| 158 |=| 164 |#| 170)) (QUOTE NIL) (CONS (|makeByteWordVec2| 1 (QUOTE NIL)) (CONS (QUOTE #()) (CONS (QUOTE #()) (|makeByteWordVec2| 36 (QUOTE (2 7 0 0 8 9 2 6 0 10 0 11 2 0 0 0 8 12 1 6 13 0 14 1 0 15 0 16 2 0 17 18 0 19 2 0 17 18 0 20 2 0 15 18 0 21 1 0 13 0 22 2 7 17 0 0 23 2 6 15 18 0 24 2 0 15 7 0 25 2 6 17 18 0 26 2 0 17 7 0 27 1 6 15 0 28 2 6 17 0 15 29 2 0 17 0 0 30 1 7 31 0 32 1 31 0 33 34 1 31 0 0 35 1 0 31 0 36 1 0 13 0 22 2 0 17 7 0 27 2 0 17 18 0 20 2 0 0 0 8 12 2 0 15 7 0 25 2 0 15 18 0 21 1 0 31 0 36 2 0 17 18 0 19 2 0 17 0 0 30 1 0 15 0 16)))))) (QUOTE |lookupComplete|))) +(/VERSIONCHECK 2) + +(DEFUN |HOAGG-;eval;ALA;1| (|u| |l| $) + (SPADCALL (CONS #'|HOAGG-;eval;ALA;1!0| (VECTOR $ |l|)) |u| + (QREFELT $ 11))) + +(DEFUN |HOAGG-;eval;ALA;1!0| (|#1| $$) + (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 9))) + +(DEFUN |HOAGG-;#;ANni;2| (|c| $) + (LENGTH (SPADCALL |c| (QREFELT $ 14)))) + +(DEFUN |HOAGG-;any?;MAB;3| (|f| |c| $) + (PROG (|x| #0=#:G1409 #1=#:G1406 #2=#:G1404 #3=#:G1405) + (RETURN + (SEQ (PROGN + (LETT #3# NIL |HOAGG-;any?;MAB;3|) + (SEQ (LETT |x| NIL |HOAGG-;any?;MAB;3|) + (LETT #0# (SPADCALL |c| (QREFELT $ 14)) + |HOAGG-;any?;MAB;3|) + G190 + (COND + ((OR (ATOM #0#) + (PROGN + (LETT |x| (CAR #0#) |HOAGG-;any?;MAB;3|) + NIL)) + (GO G191))) + (SEQ (EXIT (PROGN + (LETT #1# (SPADCALL |x| |f|) + |HOAGG-;any?;MAB;3|) + (COND + (#3# (LETT #2# + (COND (#2# 'T) ('T #1#)) + |HOAGG-;any?;MAB;3|)) + ('T + (PROGN + (LETT #2# #1# |HOAGG-;any?;MAB;3|) + (LETT #3# 'T |HOAGG-;any?;MAB;3|))))))) + (LETT #0# (CDR #0#) |HOAGG-;any?;MAB;3|) (GO G190) + G191 (EXIT NIL)) + (COND (#3# #2#) ('T 'NIL))))))) + +(DEFUN |HOAGG-;every?;MAB;4| (|f| |c| $) + (PROG (|x| #0=#:G1414 #1=#:G1412 #2=#:G1410 #3=#:G1411) + (RETURN + (SEQ (PROGN + (LETT #3# NIL |HOAGG-;every?;MAB;4|) + (SEQ (LETT |x| NIL |HOAGG-;every?;MAB;4|) + (LETT #0# (SPADCALL |c| (QREFELT $ 14)) + |HOAGG-;every?;MAB;4|) + G190 + (COND + ((OR (ATOM #0#) + (PROGN + (LETT |x| (CAR #0#) |HOAGG-;every?;MAB;4|) + NIL)) + (GO G191))) + (SEQ (EXIT (PROGN + (LETT #1# (SPADCALL |x| |f|) + |HOAGG-;every?;MAB;4|) + (COND + (#3# (LETT #2# + (COND (#2# #1#) ('T 'NIL)) + |HOAGG-;every?;MAB;4|)) + ('T + (PROGN + (LETT #2# #1# + |HOAGG-;every?;MAB;4|) + (LETT #3# 'T |HOAGG-;every?;MAB;4|))))))) + (LETT #0# (CDR #0#) |HOAGG-;every?;MAB;4|) (GO G190) + G191 (EXIT NIL)) + (COND (#3# #2#) ('T 'T))))))) + +(DEFUN |HOAGG-;count;MANni;5| (|f| |c| $) + (PROG (|x| #0=#:G1419 #1=#:G1417 #2=#:G1415 #3=#:G1416) + (RETURN + (SEQ (PROGN + (LETT #3# NIL |HOAGG-;count;MANni;5|) + (SEQ (LETT |x| NIL |HOAGG-;count;MANni;5|) + (LETT #0# (SPADCALL |c| (QREFELT $ 14)) + |HOAGG-;count;MANni;5|) + G190 + (COND + ((OR (ATOM #0#) + (PROGN + (LETT |x| (CAR #0#) |HOAGG-;count;MANni;5|) + NIL)) + (GO G191))) + (SEQ (EXIT (COND + ((SPADCALL |x| |f|) + (PROGN + (LETT #1# 1 |HOAGG-;count;MANni;5|) + (COND + (#3# + (LETT #2# (+ #2# #1#) + |HOAGG-;count;MANni;5|)) + ('T + (PROGN + (LETT #2# #1# + |HOAGG-;count;MANni;5|) + (LETT #3# 'T + |HOAGG-;count;MANni;5|))))))))) + (LETT #0# (CDR #0#) |HOAGG-;count;MANni;5|) (GO G190) + G191 (EXIT NIL)) + (COND (#3# #2#) ('T 0))))))) + +(DEFUN |HOAGG-;members;AL;6| (|x| $) (SPADCALL |x| (QREFELT $ 14))) + +(DEFUN |HOAGG-;count;SANni;7| (|s| |x| $) + (SPADCALL (CONS #'|HOAGG-;count;SANni;7!0| (VECTOR $ |s|)) |x| + (QREFELT $ 24))) + +(DEFUN |HOAGG-;count;SANni;7!0| (|#1| $$) + (SPADCALL (QREFELT $$ 1) |#1| (QREFELT (QREFELT $$ 0) 23))) + +(DEFUN |HOAGG-;member?;SAB;8| (|e| |c| $) + (SPADCALL (CONS #'|HOAGG-;member?;SAB;8!0| (VECTOR $ |e|)) |c| + (QREFELT $ 26))) + +(DEFUN |HOAGG-;member?;SAB;8!0| (|#1| $$) + (SPADCALL (QREFELT $$ 1) |#1| (QREFELT (QREFELT $$ 0) 23))) + +(DEFUN |HOAGG-;=;2AB;9| (|x| |y| $) + (PROG (|b| #0=#:G1429 |a| #1=#:G1428 #2=#:G1425 #3=#:G1423 + #4=#:G1424) + (RETURN + (SEQ (COND + ((SPADCALL |x| (SPADCALL |y| (QREFELT $ 28)) + (QREFELT $ 29)) + (PROGN + (LETT #4# NIL |HOAGG-;=;2AB;9|) + (SEQ (LETT |b| NIL |HOAGG-;=;2AB;9|) + (LETT #0# (SPADCALL |y| (QREFELT $ 14)) + |HOAGG-;=;2AB;9|) + (LETT |a| NIL |HOAGG-;=;2AB;9|) + (LETT #1# (SPADCALL |x| (QREFELT $ 14)) + |HOAGG-;=;2AB;9|) + G190 + (COND + ((OR (ATOM #1#) + (PROGN + (LETT |a| (CAR #1#) |HOAGG-;=;2AB;9|) + NIL) + (ATOM #0#) + (PROGN + (LETT |b| (CAR #0#) |HOAGG-;=;2AB;9|) + NIL)) + (GO G191))) + (SEQ (EXIT (PROGN + (LETT #2# + (SPADCALL |a| |b| + (QREFELT $ 23)) + |HOAGG-;=;2AB;9|) + (COND + (#4# + (LETT #3# + (COND (#3# #2#) ('T 'NIL)) + |HOAGG-;=;2AB;9|)) + ('T + (PROGN + (LETT #3# #2# |HOAGG-;=;2AB;9|) + (LETT #4# 'T |HOAGG-;=;2AB;9|))))))) + (LETT #1# + (PROG1 (CDR #1#) + (LETT #0# (CDR #0#) |HOAGG-;=;2AB;9|)) + |HOAGG-;=;2AB;9|) + (GO G190) G191 (EXIT NIL)) + (COND (#4# #3#) ('T 'T)))) + ('T 'NIL)))))) + +(DEFUN |HOAGG-;coerce;AOf;10| (|x| $) + (PROG (#0=#:G1433 |a| #1=#:G1434) + (RETURN + (SEQ (SPADCALL + (SPADCALL + (PROGN + (LETT #0# NIL |HOAGG-;coerce;AOf;10|) + (SEQ (LETT |a| NIL |HOAGG-;coerce;AOf;10|) + (LETT #1# (SPADCALL |x| (QREFELT $ 14)) + |HOAGG-;coerce;AOf;10|) + G190 + (COND + ((OR (ATOM #1#) + (PROGN + (LETT |a| (CAR #1#) + |HOAGG-;coerce;AOf;10|) + NIL)) + (GO G191))) + (SEQ (EXIT (LETT #0# + (CONS + (SPADCALL |a| (QREFELT $ 32)) + #0#) + |HOAGG-;coerce;AOf;10|))) + (LETT #1# (CDR #1#) |HOAGG-;coerce;AOf;10|) + (GO G190) G191 (EXIT (NREVERSE0 #0#)))) + (QREFELT $ 34)) + (QREFELT $ 35)))))) + +(DEFUN |HomogeneousAggregate&| (|#1| |#2|) + (PROG (|dv$1| |dv$2| |dv$| $ |pv$|) + (RETURN + (PROGN + (LETT |dv$1| (|devaluate| |#1|) . #0=(|HomogeneousAggregate&|)) + (LETT |dv$2| (|devaluate| |#2|) . #0#) + (LETT |dv$| + (LIST '|HomogeneousAggregate&| |dv$1| |dv$2|) . #0#) + (LETT $ (GETREFV 38) . #0#) + (QSETREFV $ 0 |dv$|) + (QSETREFV $ 3 + (LETT |pv$| + (|buildPredVector| 0 0 + (LIST (|HasAttribute| |#1| '|finiteAggregate|) + (|HasAttribute| |#1| '|shallowlyMutable|) + (|HasCategory| |#2| + (LIST '|Evalable| (|devaluate| |#2|))) + (|HasCategory| |#2| '(|SetCategory|)) + (|HasCategory| |#2| + '(|CoercibleTo| (|OutputForm|))))) . #0#)) + (|stuffDomainSlots| $) + (QSETREFV $ 6 |#1|) + (QSETREFV $ 7 |#2|) + (COND + ((|testBitVector| |pv$| 3) + (QSETREFV $ 12 + (CONS (|dispatchFunction| |HOAGG-;eval;ALA;1|) $)))) + (COND + ((|testBitVector| |pv$| 1) + (PROGN + (QSETREFV $ 16 + (CONS (|dispatchFunction| |HOAGG-;#;ANni;2|) $)) + (QSETREFV $ 19 + (CONS (|dispatchFunction| |HOAGG-;any?;MAB;3|) $)) + (QSETREFV $ 20 + (CONS (|dispatchFunction| |HOAGG-;every?;MAB;4|) $)) + (QSETREFV $ 21 + (CONS (|dispatchFunction| |HOAGG-;count;MANni;5|) $)) + (QSETREFV $ 22 + (CONS (|dispatchFunction| |HOAGG-;members;AL;6|) $)) + (COND + ((|testBitVector| |pv$| 4) + (PROGN + (QSETREFV $ 25 + (CONS (|dispatchFunction| |HOAGG-;count;SANni;7|) + $)) + (QSETREFV $ 27 + (CONS (|dispatchFunction| |HOAGG-;member?;SAB;8|) + $)) + (QSETREFV $ 30 + (CONS (|dispatchFunction| |HOAGG-;=;2AB;9|) $))))) + (COND + ((|testBitVector| |pv$| 5) + (QSETREFV $ 36 + (CONS (|dispatchFunction| |HOAGG-;coerce;AOf;10|) + $))))))) + $)))) + +(MAKEPROP '|HomogeneousAggregate&| '|infovec| + (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) + (|List| 37) (0 . |eval|) (|Mapping| 7 7) (6 . |map|) + (12 . |eval|) (|List| 7) (18 . |parts|) + (|NonNegativeInteger|) (23 . |#|) (|Boolean|) + (|Mapping| 17 7) (28 . |any?|) (34 . |every?|) + (40 . |count|) (46 . |members|) (51 . =) (57 . |count|) + (63 . |count|) (69 . |any?|) (75 . |member?|) (81 . |#|) + (86 . |size?|) (92 . =) (|OutputForm|) (98 . |coerce|) + (|List| $) (103 . |commaSeparate|) (108 . |bracket|) + (113 . |coerce|) (|Equation| 7)) + '#(|members| 118 |member?| 123 |every?| 129 |eval| 135 + |count| 141 |coerce| 153 |any?| 158 = 164 |#| 170) + 'NIL + (CONS (|makeByteWordVec2| 1 'NIL) + (CONS '#() + (CONS '#() + (|makeByteWordVec2| 36 + '(2 7 0 0 8 9 2 6 0 10 0 11 2 0 0 0 8 + 12 1 6 13 0 14 1 0 15 0 16 2 0 17 18 + 0 19 2 0 17 18 0 20 2 0 15 18 0 21 1 + 0 13 0 22 2 7 17 0 0 23 2 6 15 18 0 + 24 2 0 15 7 0 25 2 6 17 18 0 26 2 0 + 17 7 0 27 1 6 15 0 28 2 6 17 0 15 29 + 2 0 17 0 0 30 1 7 31 0 32 1 31 0 33 + 34 1 31 0 0 35 1 0 31 0 36 1 0 13 0 + 22 2 0 17 7 0 27 2 0 17 18 0 20 2 0 0 + 0 8 12 2 0 15 7 0 25 2 0 15 18 0 21 1 + 0 31 0 36 2 0 17 18 0 19 2 0 17 0 0 + 30 1 0 15 0 16))))) + '|lookupComplete|)) @ \section{category CLAGG Collection} <<category CLAGG Collection>>= @@ -367,15 +660,109 @@ Note that this code is not included in the generated catdef.spad file. <<CLAGG.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(SETQ |Collection;CAT| (QUOTE NIL)) - -(SETQ |Collection;AL| (QUOTE NIL)) - -(DEFUN |Collection| (#1=#:G82618) (LET (#2=#:G82619) (COND ((SETQ #2# (|assoc| (|devaluate| #1#) |Collection;AL|)) (CDR #2#)) (T (SETQ |Collection;AL| (|cons5| (CONS (|devaluate| #1#) (SETQ #2# (|Collection;| #1#))) |Collection;AL|)) #2#)))) - -(DEFUN |Collection;| (|t#1|) (PROG (#1=#:G82617) (RETURN (PROG1 (LETT #1# (|sublisV| (PAIR (QUOTE (|t#1|)) (LIST (|devaluate| |t#1|))) (COND (|Collection;CAT|) ((QUOTE T) (LETT |Collection;CAT| (|Join| (|HomogeneousAggregate| (QUOTE |t#1|)) (|mkCategory| (QUOTE |domain|) (QUOTE (((|construct| (|$| (|List| |t#1|))) T) ((|find| ((|Union| |t#1| "failed") (|Mapping| (|Boolean|) |t#1|) |$|)) T) ((|reduce| (|t#1| (|Mapping| |t#1| |t#1| |t#1|) |$|)) (|has| |$| (ATTRIBUTE |finiteAggregate|))) ((|reduce| (|t#1| (|Mapping| |t#1| |t#1| |t#1|) |$| |t#1|)) (|has| |$| (ATTRIBUTE |finiteAggregate|))) ((|remove| (|$| (|Mapping| (|Boolean|) |t#1|) |$|)) (|has| |$| (ATTRIBUTE |finiteAggregate|))) ((|select| (|$| (|Mapping| (|Boolean|) |t#1|) |$|)) (|has| |$| (ATTRIBUTE |finiteAggregate|))) ((|reduce| (|t#1| (|Mapping| |t#1| |t#1| |t#1|) |$| |t#1| |t#1|)) (AND (|has| |t#1| (|SetCategory|)) (|has| |$| (ATTRIBUTE |finiteAggregate|)))) ((|remove| (|$| |t#1| |$|)) (AND (|has| |t#1| (|SetCategory|)) (|has| |$| (ATTRIBUTE |finiteAggregate|)))) ((|removeDuplicates| (|$| |$|)) (AND (|has| |t#1| (|SetCategory|)) (|has| |$| (ATTRIBUTE |finiteAggregate|)))))) (QUOTE (((|ConvertibleTo| (|InputForm|)) (|has| |t#1| (|ConvertibleTo| (|InputForm|)))))) (QUOTE ((|List| |t#1|))) NIL)) . #2=(|Collection|))))) . #2#) (SETELT #1# 0 (LIST (QUOTE |Collection|) (|devaluate| |t#1|))))))) +(/VERSIONCHECK 2) + +(DEFPARAMETER |Collection;CAT| 'NIL) + +(DEFPARAMETER |Collection;AL| 'NIL) + +(DEFUN |Collection| (#0=#:G1398) + (LET (#1=#:G1399) + (COND + ((SETQ #1# (|assoc| (|devaluate| #0#) |Collection;AL|)) + (CDR #1#)) + (T (SETQ |Collection;AL| + (|cons5| (CONS (|devaluate| #0#) + (SETQ #1# (|Collection;| #0#))) + |Collection;AL|)) + #1#)))) + +(DEFUN |Collection;| (|t#1|) + (PROG (#0=#:G1397) + (RETURN + (PROG1 (LETT #0# + (|sublisV| + (PAIR '(|t#1|) (LIST (|devaluate| |t#1|))) + (COND + (|Collection;CAT|) + ('T + (LETT |Collection;CAT| + (|Join| (|HomogeneousAggregate| '|t#1|) + (|mkCategory| '|domain| + '(((|construct| + ($ (|List| |t#1|))) + T) + ((|find| + ((|Union| |t#1| "failed") + (|Mapping| (|Boolean|) + |t#1|) + $)) + T) + ((|reduce| + (|t#1| + (|Mapping| |t#1| |t#1| + |t#1|) + $)) + (|has| $ + (ATTRIBUTE + |finiteAggregate|))) + ((|reduce| + (|t#1| + (|Mapping| |t#1| |t#1| + |t#1|) + $ |t#1|)) + (|has| $ + (ATTRIBUTE + |finiteAggregate|))) + ((|remove| + ($ + (|Mapping| (|Boolean|) + |t#1|) + $)) + (|has| $ + (ATTRIBUTE + |finiteAggregate|))) + ((|select| + ($ + (|Mapping| (|Boolean|) + |t#1|) + $)) + (|has| $ + (ATTRIBUTE + |finiteAggregate|))) + ((|reduce| + (|t#1| + (|Mapping| |t#1| |t#1| + |t#1|) + $ |t#1| |t#1|)) + (AND + (|has| |t#1| + (|SetCategory|)) + (|has| $ + (ATTRIBUTE + |finiteAggregate|)))) + ((|remove| ($ |t#1| $)) + (AND + (|has| |t#1| + (|SetCategory|)) + (|has| $ + (ATTRIBUTE + |finiteAggregate|)))) + ((|removeDuplicates| ($ $)) + (AND + (|has| |t#1| + (|SetCategory|)) + (|has| $ + (ATTRIBUTE + |finiteAggregate|))))) + '(((|ConvertibleTo| + (|InputForm|)) + (|has| |t#1| + (|ConvertibleTo| + (|InputForm|))))) + '((|List| |t#1|)) NIL)) + . #1=(|Collection|))))) . #1#) + (SETELT #0# 0 (LIST '|Collection| (|devaluate| |t#1|))))))) @ \section{CLAGG-.lsp BOOTSTRAP} {\bf CLAGG-} depends on {\bf CLAGG}. We need to break this cycle to build @@ -388,37 +775,226 @@ Note that this code is not included in the generated catdef.spad file. <<CLAGG-.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(DEFUN |CLAGG-;#;ANni;1| (|c| |$|) (LENGTH (SPADCALL |c| (QREFELT |$| 9)))) - -(DEFUN |CLAGG-;count;MANni;2| (|f| |c| |$|) (PROG (|x| #1=#:G82637 #2=#:G82634 #3=#:G82632 #4=#:G82633) (RETURN (SEQ (PROGN (LETT #4# NIL |CLAGG-;count;MANni;2|) (SEQ (LETT |x| NIL |CLAGG-;count;MANni;2|) (LETT #1# (SPADCALL |c| (QREFELT |$| 9)) |CLAGG-;count;MANni;2|) G190 (COND ((OR (ATOM #1#) (PROGN (LETT |x| (CAR #1#) |CLAGG-;count;MANni;2|) NIL)) (GO G191))) (SEQ (EXIT (COND ((SPADCALL |x| |f|) (PROGN (LETT #2# 1 |CLAGG-;count;MANni;2|) (COND (#4# (LETT #3# (|+| #3# #2#) |CLAGG-;count;MANni;2|)) ((QUOTE T) (PROGN (LETT #3# #2# |CLAGG-;count;MANni;2|) (LETT #4# (QUOTE T) |CLAGG-;count;MANni;2|))))))))) (LETT #1# (CDR #1#) |CLAGG-;count;MANni;2|) (GO G190) G191 (EXIT NIL)) (COND (#4# #3#) ((QUOTE T) 0))))))) - -(DEFUN |CLAGG-;any?;MAB;3| (|f| |c| |$|) (PROG (|x| #1=#:G82642 #2=#:G82640 #3=#:G82638 #4=#:G82639) (RETURN (SEQ (PROGN (LETT #4# NIL |CLAGG-;any?;MAB;3|) (SEQ (LETT |x| NIL |CLAGG-;any?;MAB;3|) (LETT #1# (SPADCALL |c| (QREFELT |$| 9)) |CLAGG-;any?;MAB;3|) G190 (COND ((OR (ATOM #1#) (PROGN (LETT |x| (CAR #1#) |CLAGG-;any?;MAB;3|) NIL)) (GO G191))) (SEQ (EXIT (PROGN (LETT #2# (SPADCALL |x| |f|) |CLAGG-;any?;MAB;3|) (COND (#4# (LETT #3# (COND (#3# (QUOTE T)) ((QUOTE T) #2#)) |CLAGG-;any?;MAB;3|)) ((QUOTE T) (PROGN (LETT #3# #2# |CLAGG-;any?;MAB;3|) (LETT #4# (QUOTE T) |CLAGG-;any?;MAB;3|))))))) (LETT #1# (CDR #1#) |CLAGG-;any?;MAB;3|) (GO G190) G191 (EXIT NIL)) (COND (#4# #3#) ((QUOTE T) (QUOTE NIL)))))))) - -(DEFUN |CLAGG-;every?;MAB;4| (|f| |c| |$|) (PROG (|x| #1=#:G82647 #2=#:G82645 #3=#:G82643 #4=#:G82644) (RETURN (SEQ (PROGN (LETT #4# NIL |CLAGG-;every?;MAB;4|) (SEQ (LETT |x| NIL |CLAGG-;every?;MAB;4|) (LETT #1# (SPADCALL |c| (QREFELT |$| 9)) |CLAGG-;every?;MAB;4|) G190 (COND ((OR (ATOM #1#) (PROGN (LETT |x| (CAR #1#) |CLAGG-;every?;MAB;4|) NIL)) (GO G191))) (SEQ (EXIT (PROGN (LETT #2# (SPADCALL |x| |f|) |CLAGG-;every?;MAB;4|) (COND (#4# (LETT #3# (COND (#3# #2#) ((QUOTE T) (QUOTE NIL))) |CLAGG-;every?;MAB;4|)) ((QUOTE T) (PROGN (LETT #3# #2# |CLAGG-;every?;MAB;4|) (LETT #4# (QUOTE T) |CLAGG-;every?;MAB;4|))))))) (LETT #1# (CDR #1#) |CLAGG-;every?;MAB;4|) (GO G190) G191 (EXIT NIL)) (COND (#4# #3#) ((QUOTE T) (QUOTE T)))))))) - -(DEFUN |CLAGG-;find;MAU;5| (|f| |c| |$|) (SPADCALL |f| (SPADCALL |c| (QREFELT |$| 9)) (QREFELT |$| 18))) - -(DEFUN |CLAGG-;reduce;MAS;6| (|f| |x| |$|) (SPADCALL |f| (SPADCALL |x| (QREFELT |$| 9)) (QREFELT |$| 21))) - -(DEFUN |CLAGG-;reduce;MA2S;7| (|f| |x| |s| |$|) (SPADCALL |f| (SPADCALL |x| (QREFELT |$| 9)) |s| (QREFELT |$| 23))) - -(DEFUN |CLAGG-;remove;M2A;8| (|f| |x| |$|) (SPADCALL (SPADCALL |f| (SPADCALL |x| (QREFELT |$| 9)) (QREFELT |$| 25)) (QREFELT |$| 26))) - -(DEFUN |CLAGG-;select;M2A;9| (|f| |x| |$|) (SPADCALL (SPADCALL |f| (SPADCALL |x| (QREFELT |$| 9)) (QREFELT |$| 28)) (QREFELT |$| 26))) - -(DEFUN |CLAGG-;remove;S2A;10| (|s| |x| |$|) (SPADCALL (CONS (FUNCTION |CLAGG-;remove;S2A;10!0|) (VECTOR |$| |s|)) |x| (QREFELT |$| 31))) - -(DEFUN |CLAGG-;remove;S2A;10!0| (|#1| |$$|) (SPADCALL |#1| (QREFELT |$$| 1) (QREFELT (QREFELT |$$| 0) 30))) - -(DEFUN |CLAGG-;reduce;MA3S;11| (|f| |x| |s1| |s2| |$|) (SPADCALL |f| (SPADCALL |x| (QREFELT |$| 9)) |s1| |s2| (QREFELT |$| 33))) - -(DEFUN |CLAGG-;removeDuplicates;2A;12| (|x| |$|) (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT |$| 9)) (QREFELT |$| 35)) (QREFELT |$| 26))) - -(DEFUN |Collection&| (|#1| |#2|) (PROG (|DV$1| |DV$2| |dv$| |$| |pv$|) (RETURN (PROGN (LETT |DV$1| (|devaluate| |#1|) . #1=(|Collection&|)) (LETT |DV$2| (|devaluate| |#2|) . #1#) (LETT |dv$| (LIST (QUOTE |Collection&|) |DV$1| |DV$2|) . #1#) (LETT |$| (GETREFV 37) . #1#) (QSETREFV |$| 0 |dv$|) (QSETREFV |$| 3 (LETT |pv$| (|buildPredVector| 0 0 (LIST (|HasCategory| |#2| (QUOTE (|ConvertibleTo| (|InputForm|)))) (|HasCategory| |#2| (QUOTE (|SetCategory|))) (|HasAttribute| |#1| (QUOTE |finiteAggregate|)))) . #1#)) (|stuffDomainSlots| |$|) (QSETREFV |$| 6 |#1|) (QSETREFV |$| 7 |#2|) (COND ((|testBitVector| |pv$| 3) (PROGN (QSETREFV |$| 11 (CONS (|dispatchFunction| |CLAGG-;#;ANni;1|) |$|)) (QSETREFV |$| 13 (CONS (|dispatchFunction| |CLAGG-;count;MANni;2|) |$|)) (QSETREFV |$| 15 (CONS (|dispatchFunction| |CLAGG-;any?;MAB;3|) |$|)) (QSETREFV |$| 16 (CONS (|dispatchFunction| |CLAGG-;every?;MAB;4|) |$|)) (QSETREFV |$| 19 (CONS (|dispatchFunction| |CLAGG-;find;MAU;5|) |$|)) (QSETREFV |$| 22 (CONS (|dispatchFunction| |CLAGG-;reduce;MAS;6|) |$|)) (QSETREFV |$| 24 (CONS (|dispatchFunction| |CLAGG-;reduce;MA2S;7|) |$|)) (QSETREFV |$| 27 (CONS (|dispatchFunction| |CLAGG-;remove;M2A;8|) |$|)) (QSETREFV |$| 29 (CONS (|dispatchFunction| |CLAGG-;select;M2A;9|) |$|)) (COND ((|testBitVector| |pv$| 2) (PROGN (QSETREFV |$| 32 (CONS (|dispatchFunction| |CLAGG-;remove;S2A;10|) |$|)) (QSETREFV |$| 34 (CONS (|dispatchFunction| |CLAGG-;reduce;MA3S;11|) |$|)) (QSETREFV |$| 36 (CONS (|dispatchFunction| |CLAGG-;removeDuplicates;2A;12|) |$|)))))))) |$|)))) - -(MAKEPROP (QUOTE |Collection&|) (QUOTE |infovec|) (LIST (QUOTE #(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) (|List| 7) (0 . |parts|) (|NonNegativeInteger|) (5 . |#|) (|Mapping| 14 7) (10 . |count|) (|Boolean|) (16 . |any?|) (22 . |every?|) (|Union| 7 (QUOTE "failed")) (28 . |find|) (34 . |find|) (|Mapping| 7 7 7) (40 . |reduce|) (46 . |reduce|) (52 . |reduce|) (59 . |reduce|) (66 . |remove|) (72 . |construct|) (77 . |remove|) (83 . |select|) (89 . |select|) (95 . |=|) (101 . |remove|) (107 . |remove|) (113 . |reduce|) (121 . |reduce|) (129 . |removeDuplicates|) (134 . |removeDuplicates|))) (QUOTE #(|select| 139 |removeDuplicates| 145 |remove| 150 |reduce| 162 |find| 183 |every?| 189 |count| 195 |any?| 201 |#| 207)) (QUOTE NIL) (CONS (|makeByteWordVec2| 1 (QUOTE NIL)) (CONS (QUOTE #()) (CONS (QUOTE #()) (|makeByteWordVec2| 36 (QUOTE (1 6 8 0 9 1 0 10 0 11 2 0 10 12 0 13 2 0 14 12 0 15 2 0 14 12 0 16 2 8 17 12 0 18 2 0 17 12 0 19 2 8 7 20 0 21 2 0 7 20 0 22 3 8 7 20 0 7 23 3 0 7 20 0 7 24 2 8 0 12 0 25 1 6 0 8 26 2 0 0 12 0 27 2 8 0 12 0 28 2 0 0 12 0 29 2 7 14 0 0 30 2 6 0 12 0 31 2 0 0 7 0 32 4 8 7 20 0 7 7 33 4 0 7 20 0 7 7 34 1 8 0 0 35 1 0 0 0 36 2 0 0 12 0 29 1 0 0 0 36 2 0 0 7 0 32 2 0 0 12 0 27 4 0 7 20 0 7 7 34 3 0 7 20 0 7 24 2 0 7 20 0 22 2 0 17 12 0 19 2 0 14 12 0 16 2 0 10 12 0 13 2 0 14 12 0 15 1 0 10 0 11)))))) (QUOTE |lookupComplete|))) +(/VERSIONCHECK 2) + +(DEFUN |CLAGG-;#;ANni;1| (|c| $) + (LENGTH (SPADCALL |c| (QREFELT $ 9)))) + +(DEFUN |CLAGG-;count;MANni;2| (|f| |c| $) + (PROG (|x| #0=#:G1406 #1=#:G1403 #2=#:G1401 #3=#:G1402) + (RETURN + (SEQ (PROGN + (LETT #3# NIL |CLAGG-;count;MANni;2|) + (SEQ (LETT |x| NIL |CLAGG-;count;MANni;2|) + (LETT #0# (SPADCALL |c| (QREFELT $ 9)) + |CLAGG-;count;MANni;2|) + G190 + (COND + ((OR (ATOM #0#) + (PROGN + (LETT |x| (CAR #0#) |CLAGG-;count;MANni;2|) + NIL)) + (GO G191))) + (SEQ (EXIT (COND + ((SPADCALL |x| |f|) + (PROGN + (LETT #1# 1 |CLAGG-;count;MANni;2|) + (COND + (#3# + (LETT #2# (+ #2# #1#) + |CLAGG-;count;MANni;2|)) + ('T + (PROGN + (LETT #2# #1# + |CLAGG-;count;MANni;2|) + (LETT #3# 'T + |CLAGG-;count;MANni;2|))))))))) + (LETT #0# (CDR #0#) |CLAGG-;count;MANni;2|) (GO G190) + G191 (EXIT NIL)) + (COND (#3# #2#) ('T 0))))))) + +(DEFUN |CLAGG-;any?;MAB;3| (|f| |c| $) + (PROG (|x| #0=#:G1411 #1=#:G1409 #2=#:G1407 #3=#:G1408) + (RETURN + (SEQ (PROGN + (LETT #3# NIL |CLAGG-;any?;MAB;3|) + (SEQ (LETT |x| NIL |CLAGG-;any?;MAB;3|) + (LETT #0# (SPADCALL |c| (QREFELT $ 9)) + |CLAGG-;any?;MAB;3|) + G190 + (COND + ((OR (ATOM #0#) + (PROGN + (LETT |x| (CAR #0#) |CLAGG-;any?;MAB;3|) + NIL)) + (GO G191))) + (SEQ (EXIT (PROGN + (LETT #1# (SPADCALL |x| |f|) + |CLAGG-;any?;MAB;3|) + (COND + (#3# (LETT #2# + (COND (#2# 'T) ('T #1#)) + |CLAGG-;any?;MAB;3|)) + ('T + (PROGN + (LETT #2# #1# |CLAGG-;any?;MAB;3|) + (LETT #3# 'T |CLAGG-;any?;MAB;3|))))))) + (LETT #0# (CDR #0#) |CLAGG-;any?;MAB;3|) (GO G190) + G191 (EXIT NIL)) + (COND (#3# #2#) ('T 'NIL))))))) + +(DEFUN |CLAGG-;every?;MAB;4| (|f| |c| $) + (PROG (|x| #0=#:G1416 #1=#:G1414 #2=#:G1412 #3=#:G1413) + (RETURN + (SEQ (PROGN + (LETT #3# NIL |CLAGG-;every?;MAB;4|) + (SEQ (LETT |x| NIL |CLAGG-;every?;MAB;4|) + (LETT #0# (SPADCALL |c| (QREFELT $ 9)) + |CLAGG-;every?;MAB;4|) + G190 + (COND + ((OR (ATOM #0#) + (PROGN + (LETT |x| (CAR #0#) |CLAGG-;every?;MAB;4|) + NIL)) + (GO G191))) + (SEQ (EXIT (PROGN + (LETT #1# (SPADCALL |x| |f|) + |CLAGG-;every?;MAB;4|) + (COND + (#3# (LETT #2# + (COND (#2# #1#) ('T 'NIL)) + |CLAGG-;every?;MAB;4|)) + ('T + (PROGN + (LETT #2# #1# + |CLAGG-;every?;MAB;4|) + (LETT #3# 'T |CLAGG-;every?;MAB;4|))))))) + (LETT #0# (CDR #0#) |CLAGG-;every?;MAB;4|) (GO G190) + G191 (EXIT NIL)) + (COND (#3# #2#) ('T 'T))))))) + +(DEFUN |CLAGG-;find;MAU;5| (|f| |c| $) + (SPADCALL |f| (SPADCALL |c| (QREFELT $ 9)) (QREFELT $ 18))) + +(DEFUN |CLAGG-;reduce;MAS;6| (|f| |x| $) + (SPADCALL |f| (SPADCALL |x| (QREFELT $ 9)) (QREFELT $ 21))) + +(DEFUN |CLAGG-;reduce;MA2S;7| (|f| |x| |s| $) + (SPADCALL |f| (SPADCALL |x| (QREFELT $ 9)) |s| (QREFELT $ 23))) + +(DEFUN |CLAGG-;remove;M2A;8| (|f| |x| $) + (SPADCALL (SPADCALL |f| (SPADCALL |x| (QREFELT $ 9)) (QREFELT $ 25)) + (QREFELT $ 26))) + +(DEFUN |CLAGG-;select;M2A;9| (|f| |x| $) + (SPADCALL (SPADCALL |f| (SPADCALL |x| (QREFELT $ 9)) (QREFELT $ 28)) + (QREFELT $ 26))) + +(DEFUN |CLAGG-;remove;S2A;10| (|s| |x| $) + (SPADCALL (CONS #'|CLAGG-;remove;S2A;10!0| (VECTOR $ |s|)) |x| + (QREFELT $ 31))) + +(DEFUN |CLAGG-;remove;S2A;10!0| (|#1| $$) + (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 30))) + +(DEFUN |CLAGG-;reduce;MA3S;11| (|f| |x| |s1| |s2| $) + (SPADCALL |f| (SPADCALL |x| (QREFELT $ 9)) |s1| |s2| (QREFELT $ 33))) + +(DEFUN |CLAGG-;removeDuplicates;2A;12| (|x| $) + (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT $ 9)) (QREFELT $ 35)) + (QREFELT $ 26))) + +(DEFUN |Collection&| (|#1| |#2|) + (PROG (|dv$1| |dv$2| |dv$| $ |pv$|) + (RETURN + (PROGN + (LETT |dv$1| (|devaluate| |#1|) . #0=(|Collection&|)) + (LETT |dv$2| (|devaluate| |#2|) . #0#) + (LETT |dv$| (LIST '|Collection&| |dv$1| |dv$2|) . #0#) + (LETT $ (GETREFV 37) . #0#) + (QSETREFV $ 0 |dv$|) + (QSETREFV $ 3 + (LETT |pv$| + (|buildPredVector| 0 0 + (LIST (|HasCategory| |#2| + '(|ConvertibleTo| (|InputForm|))) + (|HasCategory| |#2| '(|SetCategory|)) + (|HasAttribute| |#1| '|finiteAggregate|))) . #0#)) + (|stuffDomainSlots| $) + (QSETREFV $ 6 |#1|) + (QSETREFV $ 7 |#2|) + (COND + ((|testBitVector| |pv$| 3) + (PROGN + (QSETREFV $ 11 + (CONS (|dispatchFunction| |CLAGG-;#;ANni;1|) $)) + (QSETREFV $ 13 + (CONS (|dispatchFunction| |CLAGG-;count;MANni;2|) $)) + (QSETREFV $ 15 + (CONS (|dispatchFunction| |CLAGG-;any?;MAB;3|) $)) + (QSETREFV $ 16 + (CONS (|dispatchFunction| |CLAGG-;every?;MAB;4|) $)) + (QSETREFV $ 19 + (CONS (|dispatchFunction| |CLAGG-;find;MAU;5|) $)) + (QSETREFV $ 22 + (CONS (|dispatchFunction| |CLAGG-;reduce;MAS;6|) $)) + (QSETREFV $ 24 + (CONS (|dispatchFunction| |CLAGG-;reduce;MA2S;7|) $)) + (QSETREFV $ 27 + (CONS (|dispatchFunction| |CLAGG-;remove;M2A;8|) $)) + (QSETREFV $ 29 + (CONS (|dispatchFunction| |CLAGG-;select;M2A;9|) $)) + (COND + ((|testBitVector| |pv$| 2) + (PROGN + (QSETREFV $ 32 + (CONS (|dispatchFunction| |CLAGG-;remove;S2A;10|) + $)) + (QSETREFV $ 34 + (CONS (|dispatchFunction| + |CLAGG-;reduce;MA3S;11|) + $)) + (QSETREFV $ 36 + (CONS (|dispatchFunction| + |CLAGG-;removeDuplicates;2A;12|) + $)))))))) + $)))) + +(MAKEPROP '|Collection&| '|infovec| + (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) + (|List| 7) (0 . |parts|) (|NonNegativeInteger|) (5 . |#|) + (|Mapping| 14 7) (10 . |count|) (|Boolean|) (16 . |any?|) + (22 . |every?|) (|Union| 7 '"failed") (28 . |find|) + (34 . |find|) (|Mapping| 7 7 7) (40 . |reduce|) + (46 . |reduce|) (52 . |reduce|) (59 . |reduce|) + (66 . |remove|) (72 . |construct|) (77 . |remove|) + (83 . |select|) (89 . |select|) (95 . =) (101 . |remove|) + (107 . |remove|) (113 . |reduce|) (121 . |reduce|) + (129 . |removeDuplicates|) (134 . |removeDuplicates|)) + '#(|select| 139 |removeDuplicates| 145 |remove| 150 |reduce| + 162 |find| 183 |every?| 189 |count| 195 |any?| 201 |#| + 207) + 'NIL + (CONS (|makeByteWordVec2| 1 'NIL) + (CONS '#() + (CONS '#() + (|makeByteWordVec2| 36 + '(1 6 8 0 9 1 0 10 0 11 2 0 10 12 0 13 + 2 0 14 12 0 15 2 0 14 12 0 16 2 8 17 + 12 0 18 2 0 17 12 0 19 2 8 7 20 0 21 + 2 0 7 20 0 22 3 8 7 20 0 7 23 3 0 7 + 20 0 7 24 2 8 0 12 0 25 1 6 0 8 26 2 + 0 0 12 0 27 2 8 0 12 0 28 2 0 0 12 0 + 29 2 7 14 0 0 30 2 6 0 12 0 31 2 0 0 + 7 0 32 4 8 7 20 0 7 7 33 4 0 7 20 0 7 + 7 34 1 8 0 0 35 1 0 0 0 36 2 0 0 12 0 + 29 1 0 0 0 36 2 0 0 7 0 32 2 0 0 12 0 + 27 4 0 7 20 0 7 7 34 3 0 7 20 0 7 24 + 2 0 7 20 0 22 2 0 17 12 0 19 2 0 14 + 12 0 16 2 0 10 12 0 13 2 0 14 12 0 15 + 1 0 10 0 11))))) + '|lookupComplete|)) @ \section{category BGAGG BagAggregate} <<category BGAGG BagAggregate>>= @@ -822,15 +1398,62 @@ Note that this code is not included in the generated catdef.spad file. <<SETAGG.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(SETQ |SetAggregate;CAT| (QUOTE NIL)) - -(SETQ |SetAggregate;AL| (QUOTE NIL)) - -(DEFUN |SetAggregate| (#1=#:G83200) (LET (#2=#:G83201) (COND ((SETQ #2# (|assoc| (|devaluate| #1#) |SetAggregate;AL|)) (CDR #2#)) (T (SETQ |SetAggregate;AL| (|cons5| (CONS (|devaluate| #1#) (SETQ #2# (|SetAggregate;| #1#))) |SetAggregate;AL|)) #2#)))) - -(DEFUN |SetAggregate;| (|t#1|) (PROG (#1=#:G83199) (RETURN (PROG1 (LETT #1# (|sublisV| (PAIR (QUOTE (|t#1|)) (LIST (|devaluate| |t#1|))) (COND (|SetAggregate;CAT|) ((QUOTE T) (LETT |SetAggregate;CAT| (|Join| (|SetCategory|) (|Collection| (QUOTE |t#1|)) (|mkCategory| (QUOTE |domain|) (QUOTE (((|<| ((|Boolean|) |$| |$|)) T) ((|brace| (|$|)) T) ((|brace| (|$| (|List| |t#1|))) T) ((|set| (|$|)) T) ((|set| (|$| (|List| |t#1|))) T) ((|intersect| (|$| |$| |$|)) T) ((|difference| (|$| |$| |$|)) T) ((|difference| (|$| |$| |t#1|)) T) ((|symmetricDifference| (|$| |$| |$|)) T) ((|subset?| ((|Boolean|) |$| |$|)) T) ((|union| (|$| |$| |$|)) T) ((|union| (|$| |$| |t#1|)) T) ((|union| (|$| |t#1| |$|)) T))) (QUOTE ((|partiallyOrderedSet| T))) (QUOTE ((|Boolean|) (|List| |t#1|))) NIL)) . #2=(|SetAggregate|))))) . #2#) (SETELT #1# 0 (LIST (QUOTE |SetAggregate|) (|devaluate| |t#1|))))))) +(/VERSIONCHECK 2) + +(DEFPARAMETER |SetAggregate;CAT| 'NIL) + +(DEFPARAMETER |SetAggregate;AL| 'NIL) + +(DEFUN |SetAggregate| (#0=#:G1398) + (LET (#1=#:G1399) + (COND + ((SETQ #1# (|assoc| (|devaluate| #0#) |SetAggregate;AL|)) + (CDR #1#)) + (T (SETQ |SetAggregate;AL| + (|cons5| (CONS (|devaluate| #0#) + (SETQ #1# (|SetAggregate;| #0#))) + |SetAggregate;AL|)) + #1#)))) + +(DEFUN |SetAggregate;| (|t#1|) + (PROG (#0=#:G1397) + (RETURN + (PROG1 (LETT #0# + (|sublisV| + (PAIR '(|t#1|) (LIST (|devaluate| |t#1|))) + (COND + (|SetAggregate;CAT|) + ('T + (LETT |SetAggregate;CAT| + (|Join| (|SetCategory|) + (|Collection| '|t#1|) + (|mkCategory| '|domain| + '(((< ((|Boolean|) $ $)) T) + ((|brace| ($)) T) + ((|brace| + ($ (|List| |t#1|))) + T) + ((|set| ($)) T) + ((|set| ($ (|List| |t#1|))) + T) + ((|intersect| ($ $ $)) T) + ((|difference| ($ $ $)) T) + ((|difference| ($ $ |t#1|)) + T) + ((|symmetricDifference| + ($ $ $)) + T) + ((|subset?| + ((|Boolean|) $ $)) + T) + ((|union| ($ $ $)) T) + ((|union| ($ $ |t#1|)) T) + ((|union| ($ |t#1| $)) T)) + '((|partiallyOrderedSet| T)) + '((|Boolean|) (|List| |t#1|)) + NIL)) + . #1=(|SetAggregate|))))) . #1#) + (SETELT #0# 0 (LIST '|SetAggregate| (|devaluate| |t#1|))))))) @ \section{SETAGG-.lsp BOOTSTRAP} {\bf SETAGG-} depends on {\bf SETAGG}. We need to break this cycle to build @@ -843,19 +1466,51 @@ Note that this code is not included in the generated catdef.spad file. <<SETAGG-.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(DEFUN |SETAGG-;symmetricDifference;3A;1| (|x| |y| |$|) (SPADCALL (SPADCALL |x| |y| (QREFELT |$| 8)) (SPADCALL |y| |x| (QREFELT |$| 8)) (QREFELT |$| 9))) - -(DEFUN |SETAGG-;union;ASA;2| (|s| |x| |$|) (SPADCALL |s| (SPADCALL (LIST |x|) (QREFELT |$| 12)) (QREFELT |$| 9))) - -(DEFUN |SETAGG-;union;S2A;3| (|x| |s| |$|) (SPADCALL |s| (SPADCALL (LIST |x|) (QREFELT |$| 12)) (QREFELT |$| 9))) - -(DEFUN |SETAGG-;difference;ASA;4| (|s| |x| |$|) (SPADCALL |s| (SPADCALL (LIST |x|) (QREFELT |$| 12)) (QREFELT |$| 8))) - -(DEFUN |SetAggregate&| (|#1| |#2|) (PROG (|DV$1| |DV$2| |dv$| |$| |pv$|) (RETURN (PROGN (LETT |DV$1| (|devaluate| |#1|) . #1=(|SetAggregate&|)) (LETT |DV$2| (|devaluate| |#2|) . #1#) (LETT |dv$| (LIST (QUOTE |SetAggregate&|) |DV$1| |DV$2|) . #1#) (LETT |$| (GETREFV 16) . #1#) (QSETREFV |$| 0 |dv$|) (QSETREFV |$| 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#)) (|stuffDomainSlots| |$|) (QSETREFV |$| 6 |#1|) (QSETREFV |$| 7 |#2|) |$|)))) - -(MAKEPROP (QUOTE |SetAggregate&|) (QUOTE |infovec|) (LIST (QUOTE #(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) (0 . |difference|) (6 . |union|) |SETAGG-;symmetricDifference;3A;1| (|List| 7) (12 . |brace|) |SETAGG-;union;ASA;2| |SETAGG-;union;S2A;3| |SETAGG-;difference;ASA;4|)) (QUOTE #(|union| 17 |symmetricDifference| 29 |difference| 35)) (QUOTE NIL) (CONS (|makeByteWordVec2| 1 (QUOTE NIL)) (CONS (QUOTE #()) (CONS (QUOTE #()) (|makeByteWordVec2| 15 (QUOTE (2 6 0 0 0 8 2 6 0 0 0 9 1 6 0 11 12 2 0 0 7 0 14 2 0 0 0 7 13 2 0 0 0 0 10 2 0 0 0 7 15)))))) (QUOTE |lookupComplete|))) +(/VERSIONCHECK 2) + +(DEFUN |SETAGG-;symmetricDifference;3A;1| (|x| |y| $) + (SPADCALL (SPADCALL |x| |y| (QREFELT $ 8)) + (SPADCALL |y| |x| (QREFELT $ 8)) (QREFELT $ 9))) + +(DEFUN |SETAGG-;union;ASA;2| (|s| |x| $) + (SPADCALL |s| (SPADCALL (LIST |x|) (QREFELT $ 12)) (QREFELT $ 9))) + +(DEFUN |SETAGG-;union;S2A;3| (|x| |s| $) + (SPADCALL |s| (SPADCALL (LIST |x|) (QREFELT $ 12)) (QREFELT $ 9))) + +(DEFUN |SETAGG-;difference;ASA;4| (|s| |x| $) + (SPADCALL |s| (SPADCALL (LIST |x|) (QREFELT $ 12)) (QREFELT $ 8))) + +(DEFUN |SetAggregate&| (|#1| |#2|) + (PROG (|dv$1| |dv$2| |dv$| $ |pv$|) + (RETURN + (PROGN + (LETT |dv$1| (|devaluate| |#1|) . #0=(|SetAggregate&|)) + (LETT |dv$2| (|devaluate| |#2|) . #0#) + (LETT |dv$| (LIST '|SetAggregate&| |dv$1| |dv$2|) . #0#) + (LETT $ (GETREFV 16) . #0#) + (QSETREFV $ 0 |dv$|) + (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#)) + (|stuffDomainSlots| $) + (QSETREFV $ 6 |#1|) + (QSETREFV $ 7 |#2|) + $)))) + +(MAKEPROP '|SetAggregate&| '|infovec| + (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) + (0 . |difference|) (6 . |union|) + |SETAGG-;symmetricDifference;3A;1| (|List| 7) + (12 . |brace|) |SETAGG-;union;ASA;2| |SETAGG-;union;S2A;3| + |SETAGG-;difference;ASA;4|) + '#(|union| 17 |symmetricDifference| 29 |difference| 35) 'NIL + (CONS (|makeByteWordVec2| 1 'NIL) + (CONS '#() + (CONS '#() + (|makeByteWordVec2| 15 + '(2 6 0 0 0 8 2 6 0 0 0 9 1 6 0 11 12 2 + 0 0 7 0 14 2 0 0 0 7 13 2 0 0 0 0 10 + 2 0 0 0 7 15))))) + '|lookupComplete|)) @ \section{category FSAGG FiniteSetAggregate} <<category FSAGG FiniteSetAggregate>>= @@ -1397,15 +2052,79 @@ Note that this code is not included in the generated catdef.spad file. <<RCAGG.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(SETQ |RecursiveAggregate;CAT| (QUOTE NIL)) - -(SETQ |RecursiveAggregate;AL| (QUOTE NIL)) - -(DEFUN |RecursiveAggregate| (#1=#:G84501) (LET (#2=#:G84502) (COND ((SETQ #2# (|assoc| (|devaluate| #1#) |RecursiveAggregate;AL|)) (CDR #2#)) (T (SETQ |RecursiveAggregate;AL| (|cons5| (CONS (|devaluate| #1#) (SETQ #2# (|RecursiveAggregate;| #1#))) |RecursiveAggregate;AL|)) #2#)))) - -(DEFUN |RecursiveAggregate;| (|t#1|) (PROG (#1=#:G84500) (RETURN (PROG1 (LETT #1# (|sublisV| (PAIR (QUOTE (|t#1|)) (LIST (|devaluate| |t#1|))) (COND (|RecursiveAggregate;CAT|) ((QUOTE T) (LETT |RecursiveAggregate;CAT| (|Join| (|HomogeneousAggregate| (QUOTE |t#1|)) (|mkCategory| (QUOTE |domain|) (QUOTE (((|children| ((|List| |$|) |$|)) T) ((|nodes| ((|List| |$|) |$|)) T) ((|leaf?| ((|Boolean|) |$|)) T) ((|value| (|t#1| |$|)) T) ((|elt| (|t#1| |$| "value")) T) ((|cyclic?| ((|Boolean|) |$|)) T) ((|leaves| ((|List| |t#1|) |$|)) T) ((|distance| ((|Integer|) |$| |$|)) T) ((|child?| ((|Boolean|) |$| |$|)) (|has| |t#1| (|SetCategory|))) ((|node?| ((|Boolean|) |$| |$|)) (|has| |t#1| (|SetCategory|))) ((|setchildren!| (|$| |$| (|List| |$|))) (|has| |$| (ATTRIBUTE |shallowlyMutable|))) ((|setelt| (|t#1| |$| "value" |t#1|)) (|has| |$| (ATTRIBUTE |shallowlyMutable|))) ((|setvalue!| (|t#1| |$| |t#1|)) (|has| |$| (ATTRIBUTE |shallowlyMutable|))))) NIL (QUOTE ((|List| |$|) (|Boolean|) (|Integer|) (|List| |t#1|))) NIL)) . #2=(|RecursiveAggregate|))))) . #2#) (SETELT #1# 0 (LIST (QUOTE |RecursiveAggregate|) (|devaluate| |t#1|))))))) +(/VERSIONCHECK 2) + +(DEFPARAMETER |RecursiveAggregate;CAT| 'NIL) + +(DEFPARAMETER |RecursiveAggregate;AL| 'NIL) + +(DEFUN |RecursiveAggregate| (#0=#:G1398) + (LET (#1=#:G1399) + (COND + ((SETQ #1# (|assoc| (|devaluate| #0#) |RecursiveAggregate;AL|)) + (CDR #1#)) + (T (SETQ |RecursiveAggregate;AL| + (|cons5| (CONS (|devaluate| #0#) + (SETQ #1# (|RecursiveAggregate;| #0#))) + |RecursiveAggregate;AL|)) + #1#)))) + +(DEFUN |RecursiveAggregate;| (|t#1|) + (PROG (#0=#:G1397) + (RETURN + (PROG1 (LETT #0# + (|sublisV| + (PAIR '(|t#1|) (LIST (|devaluate| |t#1|))) + (COND + (|RecursiveAggregate;CAT|) + ('T + (LETT |RecursiveAggregate;CAT| + (|Join| (|HomogeneousAggregate| '|t#1|) + (|mkCategory| '|domain| + '(((|children| ((|List| $) $)) + T) + ((|nodes| ((|List| $) $)) T) + ((|leaf?| ((|Boolean|) $)) + T) + ((|value| (|t#1| $)) T) + ((|elt| (|t#1| $ "value")) + T) + ((|cyclic?| ((|Boolean|) $)) + T) + ((|leaves| + ((|List| |t#1|) $)) + T) + ((|distance| + ((|Integer|) $ $)) + T) + ((|child?| + ((|Boolean|) $ $)) + (|has| |t#1| + (|SetCategory|))) + ((|node?| ((|Boolean|) $ $)) + (|has| |t#1| + (|SetCategory|))) + ((|setchildren!| + ($ $ (|List| $))) + (|has| $ + (ATTRIBUTE + |shallowlyMutable|))) + ((|setelt| + (|t#1| $ "value" |t#1|)) + (|has| $ + (ATTRIBUTE + |shallowlyMutable|))) + ((|setvalue!| + (|t#1| $ |t#1|)) + (|has| $ + (ATTRIBUTE + |shallowlyMutable|)))) + NIL + '((|List| $) (|Boolean|) + (|Integer|) (|List| |t#1|)) + NIL)) + . #1=(|RecursiveAggregate|))))) . #1#) + (SETELT #0# 0 (LIST '|RecursiveAggregate| (|devaluate| |t#1|))))))) @ \section{RCAGG-.lsp BOOTSTRAP} {\bf RCAGG-} depends on {\bf RCAGG}. We need to break this cycle to build @@ -1418,17 +2137,59 @@ Note that this code is not included in the generated catdef.spad file. <<RCAGG-.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(DEFUN |RCAGG-;elt;AvalueS;1| (|x| G84515 |$|) (SPADCALL |x| (QREFELT |$| 8))) - -(DEFUN |RCAGG-;setelt;Avalue2S;2| (|x| G84517 |y| |$|) (SPADCALL |x| |y| (QREFELT |$| 11))) - -(DEFUN |RCAGG-;child?;2AB;3| (|x| |l| |$|) (SPADCALL |x| (SPADCALL |l| (QREFELT |$| 14)) (QREFELT |$| 17))) - -(DEFUN |RecursiveAggregate&| (|#1| |#2|) (PROG (|DV$1| |DV$2| |dv$| |$| |pv$|) (RETURN (PROGN (LETT |DV$1| (|devaluate| |#1|) . #1=(|RecursiveAggregate&|)) (LETT |DV$2| (|devaluate| |#2|) . #1#) (LETT |dv$| (LIST (QUOTE |RecursiveAggregate&|) |DV$1| |DV$2|) . #1#) (LETT |$| (GETREFV 19) . #1#) (QSETREFV |$| 0 |dv$|) (QSETREFV |$| 3 (LETT |pv$| (|buildPredVector| 0 0 (LIST (|HasAttribute| |#1| (QUOTE |shallowlyMutable|)) (|HasCategory| |#2| (QUOTE (|SetCategory|))))) . #1#)) (|stuffDomainSlots| |$|) (QSETREFV |$| 6 |#1|) (QSETREFV |$| 7 |#2|) (COND ((|testBitVector| |pv$| 1) (QSETREFV |$| 12 (CONS (|dispatchFunction| |RCAGG-;setelt;Avalue2S;2|) |$|)))) (COND ((|testBitVector| |pv$| 2) (QSETREFV |$| 18 (CONS (|dispatchFunction| |RCAGG-;child?;2AB;3|) |$|)))) |$|)))) - -(MAKEPROP (QUOTE |RecursiveAggregate&|) (QUOTE |infovec|) (LIST (QUOTE #(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) (0 . |value|) (QUOTE "value") |RCAGG-;elt;AvalueS;1| (5 . |setvalue!|) (11 . |setelt|) (|List| |$|) (18 . |children|) (|Boolean|) (|List| 6) (23 . |member?|) (29 . |child?|))) (QUOTE #(|setelt| 35 |elt| 42 |child?| 48)) (QUOTE NIL) (CONS (|makeByteWordVec2| 1 (QUOTE NIL)) (CONS (QUOTE #()) (CONS (QUOTE #()) (|makeByteWordVec2| 18 (QUOTE (1 6 7 0 8 2 6 7 0 7 11 3 0 7 0 9 7 12 1 6 13 0 14 2 16 15 6 0 17 2 0 15 0 0 18 3 0 7 0 9 7 12 2 0 7 0 9 10 2 0 15 0 0 18)))))) (QUOTE |lookupComplete|))) +(/VERSIONCHECK 2) + +(DEFUN |RCAGG-;elt;AvalueS;1| (|x| T0 $) (SPADCALL |x| (QREFELT $ 8))) + +(DEFUN |RCAGG-;setelt;Avalue2S;2| (|x| T1 |y| $) + (SPADCALL |x| |y| (QREFELT $ 11))) + +(DEFUN |RCAGG-;child?;2AB;3| (|x| |l| $) + (SPADCALL |x| (SPADCALL |l| (QREFELT $ 14)) (QREFELT $ 17))) + +(DEFUN |RecursiveAggregate&| (|#1| |#2|) + (PROG (|dv$1| |dv$2| |dv$| $ |pv$|) + (RETURN + (PROGN + (LETT |dv$1| (|devaluate| |#1|) . #0=(|RecursiveAggregate&|)) + (LETT |dv$2| (|devaluate| |#2|) . #0#) + (LETT |dv$| (LIST '|RecursiveAggregate&| |dv$1| |dv$2|) . #0#) + (LETT $ (GETREFV 19) . #0#) + (QSETREFV $ 0 |dv$|) + (QSETREFV $ 3 + (LETT |pv$| + (|buildPredVector| 0 0 + (LIST (|HasAttribute| |#1| '|shallowlyMutable|) + (|HasCategory| |#2| '(|SetCategory|)))) . #0#)) + (|stuffDomainSlots| $) + (QSETREFV $ 6 |#1|) + (QSETREFV $ 7 |#2|) + (COND + ((|testBitVector| |pv$| 1) + (QSETREFV $ 12 + (CONS (|dispatchFunction| |RCAGG-;setelt;Avalue2S;2|) $)))) + (COND + ((|testBitVector| |pv$| 2) + (QSETREFV $ 18 + (CONS (|dispatchFunction| |RCAGG-;child?;2AB;3|) $)))) + $)))) + +(MAKEPROP '|RecursiveAggregate&| '|infovec| + (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) + (0 . |value|) '"value" |RCAGG-;elt;AvalueS;1| + (5 . |setvalue!|) (11 . |setelt|) (|List| $) + (18 . |children|) (|Boolean|) (|List| 6) (23 . |member?|) + (29 . |child?|)) + '#(|setelt| 35 |elt| 42 |child?| 48) 'NIL + (CONS (|makeByteWordVec2| 1 'NIL) + (CONS '#() + (CONS '#() + (|makeByteWordVec2| 18 + '(1 6 7 0 8 2 6 7 0 7 11 3 0 7 0 9 7 12 + 1 6 13 0 14 2 16 15 6 0 17 2 0 15 0 0 + 18 3 0 7 0 9 7 12 2 0 7 0 9 10 2 0 15 + 0 0 18))))) + '|lookupComplete|)) @ \section{category BRAGG BinaryRecursiveAggregate} <<category BRAGG BinaryRecursiveAggregate>>= @@ -1864,15 +2625,118 @@ Note that this code is not included in the generated catdef.spad file. <<URAGG.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(SETQ |UnaryRecursiveAggregate;CAT| (QUOTE NIL)) - -(SETQ |UnaryRecursiveAggregate;AL| (QUOTE NIL)) - -(DEFUN |UnaryRecursiveAggregate| (#1=#:G84596) (LET (#2=#:G84597) (COND ((SETQ #2# (|assoc| (|devaluate| #1#) |UnaryRecursiveAggregate;AL|)) (CDR #2#)) (T (SETQ |UnaryRecursiveAggregate;AL| (|cons5| (CONS (|devaluate| #1#) (SETQ #2# (|UnaryRecursiveAggregate;| #1#))) |UnaryRecursiveAggregate;AL|)) #2#)))) - -(DEFUN |UnaryRecursiveAggregate;| (|t#1|) (PROG (#1=#:G84595) (RETURN (PROG1 (LETT #1# (|sublisV| (PAIR (QUOTE (|t#1|)) (LIST (|devaluate| |t#1|))) (COND (|UnaryRecursiveAggregate;CAT|) ((QUOTE T) (LETT |UnaryRecursiveAggregate;CAT| (|Join| (|RecursiveAggregate| (QUOTE |t#1|)) (|mkCategory| (QUOTE |domain|) (QUOTE (((|concat| (|$| |$| |$|)) T) ((|concat| (|$| |t#1| |$|)) T) ((|first| (|t#1| |$|)) T) ((|elt| (|t#1| |$| "first")) T) ((|first| (|$| |$| (|NonNegativeInteger|))) T) ((|rest| (|$| |$|)) T) ((|elt| (|$| |$| "rest")) T) ((|rest| (|$| |$| (|NonNegativeInteger|))) T) ((|last| (|t#1| |$|)) T) ((|elt| (|t#1| |$| "last")) T) ((|last| (|$| |$| (|NonNegativeInteger|))) T) ((|tail| (|$| |$|)) T) ((|second| (|t#1| |$|)) T) ((|third| (|t#1| |$|)) T) ((|cycleEntry| (|$| |$|)) T) ((|cycleLength| ((|NonNegativeInteger|) |$|)) T) ((|cycleTail| (|$| |$|)) T) ((|concat!| (|$| |$| |$|)) (|has| |$| (ATTRIBUTE |shallowlyMutable|))) ((|concat!| (|$| |$| |t#1|)) (|has| |$| (ATTRIBUTE |shallowlyMutable|))) ((|cycleSplit!| (|$| |$|)) (|has| |$| (ATTRIBUTE |shallowlyMutable|))) ((|setfirst!| (|t#1| |$| |t#1|)) (|has| |$| (ATTRIBUTE |shallowlyMutable|))) ((|setelt| (|t#1| |$| "first" |t#1|)) (|has| |$| (ATTRIBUTE |shallowlyMutable|))) ((|setrest!| (|$| |$| |$|)) (|has| |$| (ATTRIBUTE |shallowlyMutable|))) ((|setelt| (|$| |$| "rest" |$|)) (|has| |$| (ATTRIBUTE |shallowlyMutable|))) ((|setlast!| (|t#1| |$| |t#1|)) (|has| |$| (ATTRIBUTE |shallowlyMutable|))) ((|setelt| (|t#1| |$| "last" |t#1|)) (|has| |$| (ATTRIBUTE |shallowlyMutable|))) ((|split!| (|$| |$| (|Integer|))) (|has| |$| (ATTRIBUTE |shallowlyMutable|))))) NIL (QUOTE ((|Integer|) (|NonNegativeInteger|))) NIL)) . #2=(|UnaryRecursiveAggregate|))))) . #2#) (SETELT #1# 0 (LIST (QUOTE |UnaryRecursiveAggregate|) (|devaluate| |t#1|))))))) +(/VERSIONCHECK 2) + +(DEFPARAMETER |UnaryRecursiveAggregate;CAT| 'NIL) + +(DEFPARAMETER |UnaryRecursiveAggregate;AL| 'NIL) + +(DEFUN |UnaryRecursiveAggregate| (#0=#:G1426) + (LET (#1=#:G1427) + (COND + ((SETQ #1# + (|assoc| (|devaluate| #0#) |UnaryRecursiveAggregate;AL|)) + (CDR #1#)) + (T (SETQ |UnaryRecursiveAggregate;AL| + (|cons5| (CONS (|devaluate| #0#) + (SETQ #1# + (|UnaryRecursiveAggregate;| #0#))) + |UnaryRecursiveAggregate;AL|)) + #1#)))) + +(DEFUN |UnaryRecursiveAggregate;| (|t#1|) + (PROG (#0=#:G1425) + (RETURN + (PROG1 (LETT #0# + (|sublisV| + (PAIR '(|t#1|) (LIST (|devaluate| |t#1|))) + (COND + (|UnaryRecursiveAggregate;CAT|) + ('T + (LETT |UnaryRecursiveAggregate;CAT| + (|Join| (|RecursiveAggregate| '|t#1|) + (|mkCategory| '|domain| + '(((|concat| ($ $ $)) T) + ((|concat| ($ |t#1| $)) T) + ((|first| (|t#1| $)) T) + ((|elt| (|t#1| $ "first")) + T) + ((|first| + ($ $ + (|NonNegativeInteger|))) + T) + ((|rest| ($ $)) T) + ((|elt| ($ $ "rest")) T) + ((|rest| + ($ $ + (|NonNegativeInteger|))) + T) + ((|last| (|t#1| $)) T) + ((|elt| (|t#1| $ "last")) T) + ((|last| + ($ $ + (|NonNegativeInteger|))) + T) + ((|tail| ($ $)) T) + ((|second| (|t#1| $)) T) + ((|third| (|t#1| $)) T) + ((|cycleEntry| ($ $)) T) + ((|cycleLength| + ((|NonNegativeInteger|) $)) + T) + ((|cycleTail| ($ $)) T) + ((|concat!| ($ $ $)) + (|has| $ + (ATTRIBUTE + |shallowlyMutable|))) + ((|concat!| ($ $ |t#1|)) + (|has| $ + (ATTRIBUTE + |shallowlyMutable|))) + ((|cycleSplit!| ($ $)) + (|has| $ + (ATTRIBUTE + |shallowlyMutable|))) + ((|setfirst!| + (|t#1| $ |t#1|)) + (|has| $ + (ATTRIBUTE + |shallowlyMutable|))) + ((|setelt| + (|t#1| $ "first" |t#1|)) + (|has| $ + (ATTRIBUTE + |shallowlyMutable|))) + ((|setrest!| ($ $ $)) + (|has| $ + (ATTRIBUTE + |shallowlyMutable|))) + ((|setelt| ($ $ "rest" $)) + (|has| $ + (ATTRIBUTE + |shallowlyMutable|))) + ((|setlast!| + (|t#1| $ |t#1|)) + (|has| $ + (ATTRIBUTE + |shallowlyMutable|))) + ((|setelt| + (|t#1| $ "last" |t#1|)) + (|has| $ + (ATTRIBUTE + |shallowlyMutable|))) + ((|split!| + ($ $ (|Integer|))) + (|has| $ + (ATTRIBUTE + |shallowlyMutable|)))) + NIL + '((|Integer|) + (|NonNegativeInteger|)) + NIL)) + . #1=(|UnaryRecursiveAggregate|))))) . #1#) + (SETELT #0# 0 + (LIST '|UnaryRecursiveAggregate| (|devaluate| |t#1|))))))) @ \section{URAGG-.lsp BOOTSTRAP} {\bf URAGG-} depends on {\bf URAGG}. We need to break this cycle to build @@ -1885,77 +2749,617 @@ Note that this code is not included in the generated catdef.spad file. <<URAGG-.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(DEFUN |URAGG-;elt;AfirstS;1| (|x| G84610 |$|) (SPADCALL |x| (QREFELT |$| 8))) - -(DEFUN |URAGG-;elt;AlastS;2| (|x| G84612 |$|) (SPADCALL |x| (QREFELT |$| 11))) - -(DEFUN |URAGG-;elt;ArestA;3| (|x| G84614 |$|) (SPADCALL |x| (QREFELT |$| 14))) - -(DEFUN |URAGG-;second;AS;4| (|x| |$|) (SPADCALL (SPADCALL |x| (QREFELT |$| 14)) (QREFELT |$| 8))) - -(DEFUN |URAGG-;third;AS;5| (|x| |$|) (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT |$| 14)) (QREFELT |$| 14)) (QREFELT |$| 8))) - -(DEFUN |URAGG-;cyclic?;AB;6| (|x| |$|) (COND ((OR (SPADCALL |x| (QREFELT |$| 20)) (SPADCALL (|URAGG-;findCycle| |x| |$|) (QREFELT |$| 20))) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) - -(DEFUN |URAGG-;last;AS;7| (|x| |$|) (SPADCALL (SPADCALL |x| (QREFELT |$| 22)) (QREFELT |$| 8))) - -(DEFUN |URAGG-;nodes;AL;8| (|x| |$|) (PROG (|l|) (RETURN (SEQ (LETT |l| NIL |URAGG-;nodes;AL;8|) (SEQ G190 (COND ((NULL (COND ((SPADCALL |x| (QREFELT |$| 20)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (LETT |l| (CONS |x| |l|) |URAGG-;nodes;AL;8|) (EXIT (LETT |x| (SPADCALL |x| (QREFELT |$| 14)) |URAGG-;nodes;AL;8|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (NREVERSE |l|)))))) - -(DEFUN |URAGG-;children;AL;9| (|x| |$|) (PROG (|l|) (RETURN (SEQ (LETT |l| NIL |URAGG-;children;AL;9|) (EXIT (COND ((SPADCALL |x| (QREFELT |$| 20)) |l|) ((QUOTE T) (CONS (SPADCALL |x| (QREFELT |$| 14)) |l|)))))))) - -(DEFUN |URAGG-;leaf?;AB;10| (|x| |$|) (SPADCALL |x| (QREFELT |$| 20))) - -(DEFUN |URAGG-;value;AS;11| (|x| |$|) (COND ((SPADCALL |x| (QREFELT |$| 20)) (|error| "value of empty object")) ((QUOTE T) (SPADCALL |x| (QREFELT |$| 8))))) - -(DEFUN |URAGG-;less?;ANniB;12| (|l| |n| |$|) (PROG (|i|) (RETURN (SEQ (LETT |i| |n| |URAGG-;less?;ANniB;12|) (SEQ G190 (COND ((NULL (COND ((|<| 0 |i|) (COND ((SPADCALL |l| (QREFELT |$| 20)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) ((QUOTE T) (QUOTE NIL)))) (GO G191))) (SEQ (LETT |l| (SPADCALL |l| (QREFELT |$| 14)) |URAGG-;less?;ANniB;12|) (EXIT (LETT |i| (|-| |i| 1) |URAGG-;less?;ANniB;12|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (|<| 0 |i|)))))) - -(DEFUN |URAGG-;more?;ANniB;13| (|l| |n| |$|) (PROG (|i|) (RETURN (SEQ (LETT |i| |n| |URAGG-;more?;ANniB;13|) (SEQ G190 (COND ((NULL (COND ((|<| 0 |i|) (COND ((SPADCALL |l| (QREFELT |$| 20)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) ((QUOTE T) (QUOTE NIL)))) (GO G191))) (SEQ (LETT |l| (SPADCALL |l| (QREFELT |$| 14)) |URAGG-;more?;ANniB;13|) (EXIT (LETT |i| (|-| |i| 1) |URAGG-;more?;ANniB;13|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (COND ((ZEROP |i|) (COND ((SPADCALL |l| (QREFELT |$| 20)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) ((QUOTE T) (QUOTE NIL)))))))) - -(DEFUN |URAGG-;size?;ANniB;14| (|l| |n| |$|) (PROG (|i|) (RETURN (SEQ (LETT |i| |n| |URAGG-;size?;ANniB;14|) (SEQ G190 (COND ((NULL (COND ((SPADCALL |l| (QREFELT |$| 20)) (QUOTE NIL)) ((QUOTE T) (|<| 0 |i|)))) (GO G191))) (SEQ (LETT |l| (SPADCALL |l| (QREFELT |$| 14)) |URAGG-;size?;ANniB;14|) (EXIT (LETT |i| (|-| |i| 1) |URAGG-;size?;ANniB;14|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (COND ((SPADCALL |l| (QREFELT |$| 20)) (ZEROP |i|)) ((QUOTE T) (QUOTE NIL)))))))) - -(DEFUN |URAGG-;#;ANni;15| (|x| |$|) (PROG (|k|) (RETURN (SEQ (SEQ (LETT |k| 0 |URAGG-;#;ANni;15|) G190 (COND ((NULL (COND ((SPADCALL |x| (QREFELT |$| 20)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (COND ((EQL |k| 1000) (COND ((SPADCALL |x| (QREFELT |$| 33)) (EXIT (|error| "cyclic list")))))) (EXIT (LETT |x| (SPADCALL |x| (QREFELT |$| 14)) |URAGG-;#;ANni;15|))) (LETT |k| (QSADD1 |k|) |URAGG-;#;ANni;15|) (GO G190) G191 (EXIT NIL)) (EXIT |k|))))) - -(DEFUN |URAGG-;tail;2A;16| (|x| |$|) (PROG (|k| |y|) (RETURN (SEQ (COND ((SPADCALL |x| (QREFELT |$| 20)) (|error| "empty list")) ((QUOTE T) (SEQ (LETT |y| (SPADCALL |x| (QREFELT |$| 14)) |URAGG-;tail;2A;16|) (SEQ (LETT |k| 0 |URAGG-;tail;2A;16|) G190 (COND ((NULL (COND ((SPADCALL |y| (QREFELT |$| 20)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (COND ((EQL |k| 1000) (COND ((SPADCALL |x| (QREFELT |$| 33)) (EXIT (|error| "cyclic list")))))) (EXIT (LETT |y| (SPADCALL (LETT |x| |y| |URAGG-;tail;2A;16|) (QREFELT |$| 14)) |URAGG-;tail;2A;16|))) (LETT |k| (QSADD1 |k|) |URAGG-;tail;2A;16|) (GO G190) G191 (EXIT NIL)) (EXIT |x|)))))))) - -(DEFUN |URAGG-;findCycle| (|x| |$|) (PROG (#1=#:G84667 |y|) (RETURN (SEQ (EXIT (SEQ (LETT |y| (SPADCALL |x| (QREFELT |$| 14)) |URAGG-;findCycle|) (SEQ G190 (COND ((NULL (COND ((SPADCALL |y| (QREFELT |$| 20)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (COND ((SPADCALL |x| |y| (QREFELT |$| 36)) (PROGN (LETT #1# |x| |URAGG-;findCycle|) (GO #1#)))) (LETT |x| (SPADCALL |x| (QREFELT |$| 14)) |URAGG-;findCycle|) (LETT |y| (SPADCALL |y| (QREFELT |$| 14)) |URAGG-;findCycle|) (COND ((SPADCALL |y| (QREFELT |$| 20)) (PROGN (LETT #1# |y| |URAGG-;findCycle|) (GO #1#)))) (COND ((SPADCALL |x| |y| (QREFELT |$| 36)) (PROGN (LETT #1# |y| |URAGG-;findCycle|) (GO #1#)))) (EXIT (LETT |y| (SPADCALL |y| (QREFELT |$| 14)) |URAGG-;findCycle|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT |y|))) #1# (EXIT #1#))))) - -(DEFUN |URAGG-;cycleTail;2A;18| (|x| |$|) (PROG (|y| |z|) (RETURN (SEQ (COND ((SPADCALL (LETT |y| (LETT |x| (SPADCALL |x| (QREFELT |$| 37)) |URAGG-;cycleTail;2A;18|) |URAGG-;cycleTail;2A;18|) (QREFELT |$| 20)) |x|) ((QUOTE T) (SEQ (LETT |z| (SPADCALL |x| (QREFELT |$| 14)) |URAGG-;cycleTail;2A;18|) (SEQ G190 (COND ((NULL (COND ((SPADCALL |x| |z| (QREFELT |$| 36)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (LETT |y| |z| |URAGG-;cycleTail;2A;18|) (EXIT (LETT |z| (SPADCALL |z| (QREFELT |$| 14)) |URAGG-;cycleTail;2A;18|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT |y|)))))))) - -(DEFUN |URAGG-;cycleEntry;2A;19| (|x| |$|) (PROG (|l| |z| |k| |y|) (RETURN (SEQ (COND ((SPADCALL |x| (QREFELT |$| 20)) |x|) ((SPADCALL (LETT |y| (|URAGG-;findCycle| |x| |$|) |URAGG-;cycleEntry;2A;19|) (QREFELT |$| 20)) |y|) ((QUOTE T) (SEQ (LETT |z| (SPADCALL |y| (QREFELT |$| 14)) |URAGG-;cycleEntry;2A;19|) (SEQ (LETT |l| 1 |URAGG-;cycleEntry;2A;19|) G190 (COND ((NULL (COND ((SPADCALL |y| |z| (QREFELT |$| 36)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (EXIT (LETT |z| (SPADCALL |z| (QREFELT |$| 14)) |URAGG-;cycleEntry;2A;19|))) (LETT |l| (QSADD1 |l|) |URAGG-;cycleEntry;2A;19|) (GO G190) G191 (EXIT NIL)) (LETT |y| |x| |URAGG-;cycleEntry;2A;19|) (SEQ (LETT |k| 1 |URAGG-;cycleEntry;2A;19|) G190 (COND ((QSGREATERP |k| |l|) (GO G191))) (SEQ (EXIT (LETT |y| (SPADCALL |y| (QREFELT |$| 14)) |URAGG-;cycleEntry;2A;19|))) (LETT |k| (QSADD1 |k|) |URAGG-;cycleEntry;2A;19|) (GO G190) G191 (EXIT NIL)) (SEQ G190 (COND ((NULL (COND ((SPADCALL |x| |y| (QREFELT |$| 36)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (LETT |x| (SPADCALL |x| (QREFELT |$| 14)) |URAGG-;cycleEntry;2A;19|) (EXIT (LETT |y| (SPADCALL |y| (QREFELT |$| 14)) |URAGG-;cycleEntry;2A;19|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT |x|)))))))) - -(DEFUN |URAGG-;cycleLength;ANni;20| (|x| |$|) (PROG (|k| |y|) (RETURN (SEQ (COND ((OR (SPADCALL |x| (QREFELT |$| 20)) (SPADCALL (LETT |x| (|URAGG-;findCycle| |x| |$|) |URAGG-;cycleLength;ANni;20|) (QREFELT |$| 20))) 0) ((QUOTE T) (SEQ (LETT |y| (SPADCALL |x| (QREFELT |$| 14)) |URAGG-;cycleLength;ANni;20|) (SEQ (LETT |k| 1 |URAGG-;cycleLength;ANni;20|) G190 (COND ((NULL (COND ((SPADCALL |x| |y| (QREFELT |$| 36)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (EXIT (LETT |y| (SPADCALL |y| (QREFELT |$| 14)) |URAGG-;cycleLength;ANni;20|))) (LETT |k| (QSADD1 |k|) |URAGG-;cycleLength;ANni;20|) (GO G190) G191 (EXIT NIL)) (EXIT |k|)))))))) - -(DEFUN |URAGG-;rest;ANniA;21| (|x| |n| |$|) (PROG (|i|) (RETURN (SEQ (SEQ (LETT |i| 1 |URAGG-;rest;ANniA;21|) G190 (COND ((QSGREATERP |i| |n|) (GO G191))) (SEQ (EXIT (COND ((SPADCALL |x| (QREFELT |$| 20)) (|error| "Index out of range")) ((QUOTE T) (LETT |x| (SPADCALL |x| (QREFELT |$| 14)) |URAGG-;rest;ANniA;21|))))) (LETT |i| (QSADD1 |i|) |URAGG-;rest;ANniA;21|) (GO G190) G191 (EXIT NIL)) (EXIT |x|))))) - -(DEFUN |URAGG-;last;ANniA;22| (|x| |n| |$|) (PROG (|m| #1=#:G84694) (RETURN (SEQ (LETT |m| (SPADCALL |x| (QREFELT |$| 42)) |URAGG-;last;ANniA;22|) (EXIT (COND ((|<| |m| |n|) (|error| "index out of range")) ((QUOTE T) (SPADCALL (SPADCALL |x| (PROG1 (LETT #1# (|-| |m| |n|) |URAGG-;last;ANniA;22|) (|check-subtype| (|>=| #1# 0) (QUOTE (|NonNegativeInteger|)) #1#)) (QREFELT |$| 43)) (QREFELT |$| 44))))))))) - -(DEFUN |URAGG-;=;2AB;23| (|x| |y| |$|) (PROG (|k| #1=#:G84705) (RETURN (SEQ (EXIT (COND ((SPADCALL |x| |y| (QREFELT |$| 36)) (QUOTE T)) ((QUOTE T) (SEQ (SEQ (LETT |k| 0 |URAGG-;=;2AB;23|) G190 (COND ((NULL (COND ((OR (SPADCALL |x| (QREFELT |$| 20)) (SPADCALL |y| (QREFELT |$| 20))) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (COND ((EQL |k| 1000) (COND ((SPADCALL |x| (QREFELT |$| 33)) (EXIT (|error| "cyclic list")))))) (COND ((NULL (SPADCALL (SPADCALL |x| (QREFELT |$| 8)) (SPADCALL |y| (QREFELT |$| 8)) (QREFELT |$| 46))) (EXIT (PROGN (LETT #1# (QUOTE NIL) |URAGG-;=;2AB;23|) (GO #1#))))) (LETT |x| (SPADCALL |x| (QREFELT |$| 14)) |URAGG-;=;2AB;23|) (EXIT (LETT |y| (SPADCALL |y| (QREFELT |$| 14)) |URAGG-;=;2AB;23|))) (LETT |k| (QSADD1 |k|) |URAGG-;=;2AB;23|) (GO G190) G191 (EXIT NIL)) (EXIT (COND ((SPADCALL |x| (QREFELT |$| 20)) (SPADCALL |y| (QREFELT |$| 20))) ((QUOTE T) (QUOTE NIL)))))))) #1# (EXIT #1#))))) - -(DEFUN |URAGG-;node?;2AB;24| (|u| |v| |$|) (PROG (|k| #1=#:G84711) (RETURN (SEQ (EXIT (SEQ (SEQ (LETT |k| 0 |URAGG-;node?;2AB;24|) G190 (COND ((NULL (COND ((SPADCALL |v| (QREFELT |$| 20)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (EXIT (COND ((SPADCALL |u| |v| (QREFELT |$| 48)) (PROGN (LETT #1# (QUOTE T) |URAGG-;node?;2AB;24|) (GO #1#))) ((QUOTE T) (SEQ (COND ((EQL |k| 1000) (COND ((SPADCALL |v| (QREFELT |$| 33)) (EXIT (|error| "cyclic list")))))) (EXIT (LETT |v| (SPADCALL |v| (QREFELT |$| 14)) |URAGG-;node?;2AB;24|))))))) (LETT |k| (QSADD1 |k|) |URAGG-;node?;2AB;24|) (GO G190) G191 (EXIT NIL)) (EXIT (SPADCALL |u| |v| (QREFELT |$| 48))))) #1# (EXIT #1#))))) - -(DEFUN |URAGG-;setelt;Afirst2S;25| (|x| G84713 |a| |$|) (SPADCALL |x| |a| (QREFELT |$| 50))) - -(DEFUN |URAGG-;setelt;Alast2S;26| (|x| G84715 |a| |$|) (SPADCALL |x| |a| (QREFELT |$| 52))) - -(DEFUN |URAGG-;setelt;Arest2A;27| (|x| G84717 |a| |$|) (SPADCALL |x| |a| (QREFELT |$| 54))) - -(DEFUN |URAGG-;concat;3A;28| (|x| |y| |$|) (SPADCALL (SPADCALL |x| (QREFELT |$| 44)) |y| (QREFELT |$| 56))) - -(DEFUN |URAGG-;setlast!;A2S;29| (|x| |s| |$|) (SEQ (COND ((SPADCALL |x| (QREFELT |$| 20)) (|error| "setlast: empty list")) ((QUOTE T) (SEQ (SPADCALL (SPADCALL |x| (QREFELT |$| 22)) |s| (QREFELT |$| 50)) (EXIT |s|)))))) - -(DEFUN |URAGG-;setchildren!;ALA;30| (|u| |lv| |$|) (COND ((EQL (LENGTH |lv|) 1) (SPADCALL |u| (|SPADfirst| |lv|) (QREFELT |$| 54))) ((QUOTE T) (|error| "wrong number of children specified")))) - -(DEFUN |URAGG-;setvalue!;A2S;31| (|u| |s| |$|) (SPADCALL |u| |s| (QREFELT |$| 50))) - -(DEFUN |URAGG-;split!;AIA;32| (|p| |n| |$|) (PROG (#1=#:G84725 |q|) (RETURN (SEQ (COND ((|<| |n| 1) (|error| "index out of range")) ((QUOTE T) (SEQ (LETT |p| (SPADCALL |p| (PROG1 (LETT #1# (|-| |n| 1) |URAGG-;split!;AIA;32|) (|check-subtype| (|>=| #1# 0) (QUOTE (|NonNegativeInteger|)) #1#)) (QREFELT |$| 43)) |URAGG-;split!;AIA;32|) (LETT |q| (SPADCALL |p| (QREFELT |$| 14)) |URAGG-;split!;AIA;32|) (SPADCALL |p| (SPADCALL (QREFELT |$| 61)) (QREFELT |$| 54)) (EXIT |q|)))))))) - -(DEFUN |URAGG-;cycleSplit!;2A;33| (|x| |$|) (PROG (|y| |z|) (RETURN (SEQ (COND ((OR (SPADCALL (LETT |y| (SPADCALL |x| (QREFELT |$| 37)) |URAGG-;cycleSplit!;2A;33|) (QREFELT |$| 20)) (SPADCALL |x| |y| (QREFELT |$| 36))) |y|) ((QUOTE T) (SEQ (LETT |z| (SPADCALL |x| (QREFELT |$| 14)) |URAGG-;cycleSplit!;2A;33|) (SEQ G190 (COND ((NULL (COND ((SPADCALL |z| |y| (QREFELT |$| 36)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (LETT |x| |z| |URAGG-;cycleSplit!;2A;33|) (EXIT (LETT |z| (SPADCALL |z| (QREFELT |$| 14)) |URAGG-;cycleSplit!;2A;33|))) NIL (GO G190) G191 (EXIT NIL)) (SPADCALL |x| (SPADCALL (QREFELT |$| 61)) (QREFELT |$| 54)) (EXIT |y|)))))))) - -(DEFUN |UnaryRecursiveAggregate&| (|#1| |#2|) (PROG (|DV$1| |DV$2| |dv$| |$| |pv$|) (RETURN (PROGN (LETT |DV$1| (|devaluate| |#1|) . #1=(|UnaryRecursiveAggregate&|)) (LETT |DV$2| (|devaluate| |#2|) . #1#) (LETT |dv$| (LIST (QUOTE |UnaryRecursiveAggregate&|) |DV$1| |DV$2|) . #1#) (LETT |$| (GETREFV 66) . #1#) (QSETREFV |$| 0 |dv$|) (QSETREFV |$| 3 (LETT |pv$| (|buildPredVector| 0 0 (LIST (|HasAttribute| |#1| (QUOTE |shallowlyMutable|)))) . #1#)) (|stuffDomainSlots| |$|) (QSETREFV |$| 6 |#1|) (QSETREFV |$| 7 |#2|) (COND ((|HasAttribute| |#1| (QUOTE |finiteAggregate|)) (QSETREFV |$| 45 (CONS (|dispatchFunction| |URAGG-;last;ANniA;22|) |$|)))) (COND ((|HasCategory| |#2| (QUOTE (|SetCategory|))) (PROGN (QSETREFV |$| 47 (CONS (|dispatchFunction| |URAGG-;=;2AB;23|) |$|)) (QSETREFV |$| 49 (CONS (|dispatchFunction| |URAGG-;node?;2AB;24|) |$|))))) (COND ((|testBitVector| |pv$| 1) (PROGN (QSETREFV |$| 51 (CONS (|dispatchFunction| |URAGG-;setelt;Afirst2S;25|) |$|)) (QSETREFV |$| 53 (CONS (|dispatchFunction| |URAGG-;setelt;Alast2S;26|) |$|)) (QSETREFV |$| 55 (CONS (|dispatchFunction| |URAGG-;setelt;Arest2A;27|) |$|)) (QSETREFV |$| 57 (CONS (|dispatchFunction| |URAGG-;concat;3A;28|) |$|)) (QSETREFV |$| 58 (CONS (|dispatchFunction| |URAGG-;setlast!;A2S;29|) |$|)) (QSETREFV |$| 59 (CONS (|dispatchFunction| |URAGG-;setchildren!;ALA;30|) |$|)) (QSETREFV |$| 60 (CONS (|dispatchFunction| |URAGG-;setvalue!;A2S;31|) |$|)) (QSETREFV |$| 63 (CONS (|dispatchFunction| |URAGG-;split!;AIA;32|) |$|)) (QSETREFV |$| 64 (CONS (|dispatchFunction| |URAGG-;cycleSplit!;2A;33|) |$|))))) |$|)))) - -(MAKEPROP (QUOTE |UnaryRecursiveAggregate&|) (QUOTE |infovec|) (LIST (QUOTE #(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) (0 . |first|) (QUOTE "first") |URAGG-;elt;AfirstS;1| (5 . |last|) (QUOTE "last") |URAGG-;elt;AlastS;2| (10 . |rest|) (QUOTE "rest") |URAGG-;elt;ArestA;3| |URAGG-;second;AS;4| |URAGG-;third;AS;5| (|Boolean|) (15 . |empty?|) |URAGG-;cyclic?;AB;6| (20 . |tail|) |URAGG-;last;AS;7| (|List| |$|) |URAGG-;nodes;AL;8| |URAGG-;children;AL;9| |URAGG-;leaf?;AB;10| |URAGG-;value;AS;11| (|NonNegativeInteger|) |URAGG-;less?;ANniB;12| |URAGG-;more?;ANniB;13| |URAGG-;size?;ANniB;14| (25 . |cyclic?|) |URAGG-;#;ANni;15| |URAGG-;tail;2A;16| (30 . |eq?|) (36 . |cycleEntry|) |URAGG-;cycleTail;2A;18| |URAGG-;cycleEntry;2A;19| |URAGG-;cycleLength;ANni;20| |URAGG-;rest;ANniA;21| (41 . |#|) (46 . |rest|) (52 . |copy|) (57 . |last|) (63 . |=|) (69 . |=|) (75 . |=|) (81 . |node?|) (87 . |setfirst!|) (93 . |setelt|) (100 . |setlast!|) (106 . |setelt|) (113 . |setrest!|) (119 . |setelt|) (126 . |concat!|) (132 . |concat|) (138 . |setlast!|) (144 . |setchildren!|) (150 . |setvalue!|) (156 . |empty|) (|Integer|) (160 . |split!|) (166 . |cycleSplit!|) (QUOTE "value"))) (QUOTE #(|value| 171 |third| 176 |tail| 181 |split!| 186 |size?| 192 |setvalue!| 198 |setlast!| 204 |setelt| 210 |setchildren!| 231 |second| 237 |rest| 242 |nodes| 248 |node?| 253 |more?| 259 |less?| 265 |leaf?| 271 |last| 276 |elt| 287 |cyclic?| 305 |cycleTail| 310 |cycleSplit!| 315 |cycleLength| 320 |cycleEntry| 325 |concat| 330 |children| 336 |=| 341 |#| 347)) (QUOTE NIL) (CONS (|makeByteWordVec2| 1 (QUOTE NIL)) (CONS (QUOTE #()) (CONS (QUOTE #()) (|makeByteWordVec2| 64 (QUOTE (1 6 7 0 8 1 6 7 0 11 1 6 0 0 14 1 6 19 0 20 1 6 0 0 22 1 6 19 0 33 2 6 19 0 0 36 1 6 0 0 37 1 6 29 0 42 2 6 0 0 29 43 1 6 0 0 44 2 0 0 0 29 45 2 7 19 0 0 46 2 0 19 0 0 47 2 6 19 0 0 48 2 0 19 0 0 49 2 6 7 0 7 50 3 0 7 0 9 7 51 2 6 7 0 7 52 3 0 7 0 12 7 53 2 6 0 0 0 54 3 0 0 0 15 0 55 2 6 0 0 0 56 2 0 0 0 0 57 2 0 7 0 7 58 2 0 0 0 24 59 2 0 7 0 7 60 0 6 0 61 2 0 0 0 62 63 1 0 0 0 64 1 0 7 0 28 1 0 7 0 18 1 0 0 0 35 2 0 0 0 62 63 2 0 19 0 29 32 2 0 7 0 7 60 2 0 7 0 7 58 3 0 7 0 12 7 53 3 0 0 0 15 0 55 3 0 7 0 9 7 51 2 0 0 0 24 59 1 0 7 0 17 2 0 0 0 29 41 1 0 24 0 25 2 0 19 0 0 49 2 0 19 0 29 31 2 0 19 0 29 30 1 0 19 0 27 2 0 0 0 29 45 1 0 7 0 23 2 0 7 0 12 13 2 0 0 0 15 16 2 0 7 0 9 10 1 0 19 0 21 1 0 0 0 38 1 0 0 0 64 1 0 29 0 40 1 0 0 0 39 2 0 0 0 0 57 1 0 24 0 26 2 0 19 0 0 47 1 0 29 0 34)))))) (QUOTE |lookupComplete|))) +(/VERSIONCHECK 2) + +(DEFUN |URAGG-;elt;AfirstS;1| (|x| T0 $) (SPADCALL |x| (QREFELT $ 8))) + +(DEFUN |URAGG-;elt;AlastS;2| (|x| T1 $) (SPADCALL |x| (QREFELT $ 11))) + +(DEFUN |URAGG-;elt;ArestA;3| (|x| T2 $) (SPADCALL |x| (QREFELT $ 14))) + +(DEFUN |URAGG-;second;AS;4| (|x| $) + (SPADCALL (SPADCALL |x| (QREFELT $ 14)) (QREFELT $ 8))) + +(DEFUN |URAGG-;third;AS;5| (|x| $) + (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT $ 14)) (QREFELT $ 14)) + (QREFELT $ 8))) + +(DEFUN |URAGG-;cyclic?;AB;6| (|x| $) + (COND + ((SPADCALL |x| (QREFELT $ 20)) 'NIL) + ('T + (SPADCALL (SPADCALL (|URAGG-;findCycle| |x| $) (QREFELT $ 20)) + (QREFELT $ 21))))) + +(DEFUN |URAGG-;last;AS;7| (|x| $) + (SPADCALL (SPADCALL |x| (QREFELT $ 23)) (QREFELT $ 8))) + +(DEFUN |URAGG-;nodes;AL;8| (|x| $) + (PROG (|l|) + (RETURN + (SEQ (LETT |l| NIL |URAGG-;nodes;AL;8|) + (SEQ G190 + (COND + ((NULL (SPADCALL (SPADCALL |x| (QREFELT $ 20)) + (QREFELT $ 21))) + (GO G191))) + (SEQ (LETT |l| (CONS |x| |l|) |URAGG-;nodes;AL;8|) + (EXIT (LETT |x| (SPADCALL |x| (QREFELT $ 14)) + |URAGG-;nodes;AL;8|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (NREVERSE |l|)))))) + +(DEFUN |URAGG-;children;AL;9| (|x| $) + (PROG (|l|) + (RETURN + (SEQ (LETT |l| NIL |URAGG-;children;AL;9|) + (EXIT (COND + ((SPADCALL |x| (QREFELT $ 20)) |l|) + ('T (CONS (SPADCALL |x| (QREFELT $ 14)) |l|)))))))) + +(DEFUN |URAGG-;leaf?;AB;10| (|x| $) (SPADCALL |x| (QREFELT $ 20))) + +(DEFUN |URAGG-;value;AS;11| (|x| $) + (COND + ((SPADCALL |x| (QREFELT $ 20)) (|error| "value of empty object")) + ('T (SPADCALL |x| (QREFELT $ 8))))) + +(DEFUN |URAGG-;less?;ANniB;12| (|l| |n| $) + (PROG (|i|) + (RETURN + (SEQ (LETT |i| |n| |URAGG-;less?;ANniB;12|) + (SEQ G190 + (COND + ((NULL (COND + ((< 0 |i|) + (SPADCALL (SPADCALL |l| (QREFELT $ 20)) + (QREFELT $ 21))) + ('T 'NIL))) + (GO G191))) + (SEQ (LETT |l| (SPADCALL |l| (QREFELT $ 14)) + |URAGG-;less?;ANniB;12|) + (EXIT (LETT |i| (- |i| 1) |URAGG-;less?;ANniB;12|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (< 0 |i|)))))) + +(DEFUN |URAGG-;more?;ANniB;13| (|l| |n| $) + (PROG (|i|) + (RETURN + (SEQ (LETT |i| |n| |URAGG-;more?;ANniB;13|) + (SEQ G190 + (COND + ((NULL (COND + ((< 0 |i|) + (SPADCALL (SPADCALL |l| (QREFELT $ 20)) + (QREFELT $ 21))) + ('T 'NIL))) + (GO G191))) + (SEQ (LETT |l| (SPADCALL |l| (QREFELT $ 14)) + |URAGG-;more?;ANniB;13|) + (EXIT (LETT |i| (- |i| 1) |URAGG-;more?;ANniB;13|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (COND + ((ZEROP |i|) + (SPADCALL (SPADCALL |l| (QREFELT $ 20)) + (QREFELT $ 21))) + ('T 'NIL))))))) + +(DEFUN |URAGG-;size?;ANniB;14| (|l| |n| $) + (PROG (|i|) + (RETURN + (SEQ (LETT |i| |n| |URAGG-;size?;ANniB;14|) + (SEQ G190 + (COND + ((NULL (COND + ((SPADCALL |l| (QREFELT $ 20)) 'NIL) + ('T (< 0 |i|)))) + (GO G191))) + (SEQ (LETT |l| (SPADCALL |l| (QREFELT $ 14)) + |URAGG-;size?;ANniB;14|) + (EXIT (LETT |i| (- |i| 1) |URAGG-;size?;ANniB;14|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (COND + ((SPADCALL |l| (QREFELT $ 20)) (ZEROP |i|)) + ('T 'NIL))))))) + +(DEFUN |URAGG-;#;ANni;15| (|x| $) + (PROG (|k|) + (RETURN + (SEQ (SEQ (LETT |k| 0 |URAGG-;#;ANni;15|) G190 + (COND + ((NULL (SPADCALL (SPADCALL |x| (QREFELT $ 20)) + (QREFELT $ 21))) + (GO G191))) + (SEQ (COND + ((EQL |k| 1000) + (COND + ((SPADCALL |x| (QREFELT $ 34)) + (EXIT (|error| "cyclic list")))))) + (EXIT (LETT |x| (SPADCALL |x| (QREFELT $ 14)) + |URAGG-;#;ANni;15|))) + (LETT |k| (QSADD1 |k|) |URAGG-;#;ANni;15|) (GO G190) + G191 (EXIT NIL)) + (EXIT |k|))))) + +(DEFUN |URAGG-;tail;2A;16| (|x| $) + (PROG (|k| |y|) + (RETURN + (SEQ (COND + ((SPADCALL |x| (QREFELT $ 20)) (|error| "empty list")) + ('T + (SEQ (LETT |y| (SPADCALL |x| (QREFELT $ 14)) + |URAGG-;tail;2A;16|) + (SEQ (LETT |k| 0 |URAGG-;tail;2A;16|) G190 + (COND + ((NULL (SPADCALL + (SPADCALL |y| (QREFELT $ 20)) + (QREFELT $ 21))) + (GO G191))) + (SEQ (COND + ((EQL |k| 1000) + (COND + ((SPADCALL |x| (QREFELT $ 34)) + (EXIT (|error| "cyclic list")))))) + (EXIT (LETT |y| + (SPADCALL + (LETT |x| |y| |URAGG-;tail;2A;16|) + (QREFELT $ 14)) + |URAGG-;tail;2A;16|))) + (LETT |k| (QSADD1 |k|) |URAGG-;tail;2A;16|) + (GO G190) G191 (EXIT NIL)) + (EXIT |x|)))))))) + +(DEFUN |URAGG-;findCycle| (|x| $) + (PROG (#0=#:G1475 |y|) + (RETURN + (SEQ (EXIT (SEQ (LETT |y| (SPADCALL |x| (QREFELT $ 14)) + |URAGG-;findCycle|) + (SEQ G190 + (COND + ((NULL (SPADCALL + (SPADCALL |y| (QREFELT $ 20)) + (QREFELT $ 21))) + (GO G191))) + (SEQ (COND + ((SPADCALL |x| |y| (QREFELT $ 37)) + (PROGN + (LETT #0# |x| |URAGG-;findCycle|) + (GO #0#)))) + (LETT |x| (SPADCALL |x| (QREFELT $ 14)) + |URAGG-;findCycle|) + (LETT |y| (SPADCALL |y| (QREFELT $ 14)) + |URAGG-;findCycle|) + (COND + ((SPADCALL |y| (QREFELT $ 20)) + (PROGN + (LETT #0# |y| |URAGG-;findCycle|) + (GO #0#)))) + (COND + ((SPADCALL |x| |y| (QREFELT $ 37)) + (PROGN + (LETT #0# |y| |URAGG-;findCycle|) + (GO #0#)))) + (EXIT (LETT |y| + (SPADCALL |y| (QREFELT $ 14)) + |URAGG-;findCycle|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |y|))) + #0# (EXIT #0#))))) + +(DEFUN |URAGG-;cycleTail;2A;18| (|x| $) + (PROG (|y| |z|) + (RETURN + (SEQ (COND + ((SPADCALL + (LETT |y| + (LETT |x| (SPADCALL |x| (QREFELT $ 38)) + |URAGG-;cycleTail;2A;18|) + |URAGG-;cycleTail;2A;18|) + (QREFELT $ 20)) + |x|) + ('T + (SEQ (LETT |z| (SPADCALL |x| (QREFELT $ 14)) + |URAGG-;cycleTail;2A;18|) + (SEQ G190 + (COND + ((NULL (SPADCALL + (SPADCALL |x| |z| (QREFELT $ 37)) + (QREFELT $ 21))) + (GO G191))) + (SEQ (LETT |y| |z| |URAGG-;cycleTail;2A;18|) + (EXIT (LETT |z| + (SPADCALL |z| (QREFELT $ 14)) + |URAGG-;cycleTail;2A;18|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |y|)))))))) + +(DEFUN |URAGG-;cycleEntry;2A;19| (|x| $) + (PROG (|l| |z| |k| |y|) + (RETURN + (SEQ (COND + ((SPADCALL |x| (QREFELT $ 20)) |x|) + ((SPADCALL + (LETT |y| (|URAGG-;findCycle| |x| $) + |URAGG-;cycleEntry;2A;19|) + (QREFELT $ 20)) + |y|) + ('T + (SEQ (LETT |z| (SPADCALL |y| (QREFELT $ 14)) + |URAGG-;cycleEntry;2A;19|) + (SEQ (LETT |l| 1 |URAGG-;cycleEntry;2A;19|) G190 + (COND + ((NULL (SPADCALL + (SPADCALL |y| |z| (QREFELT $ 37)) + (QREFELT $ 21))) + (GO G191))) + (SEQ (EXIT (LETT |z| + (SPADCALL |z| (QREFELT $ 14)) + |URAGG-;cycleEntry;2A;19|))) + (LETT |l| (QSADD1 |l|) + |URAGG-;cycleEntry;2A;19|) + (GO G190) G191 (EXIT NIL)) + (LETT |y| |x| |URAGG-;cycleEntry;2A;19|) + (SEQ (LETT |k| 1 |URAGG-;cycleEntry;2A;19|) G190 + (COND ((QSGREATERP |k| |l|) (GO G191))) + (SEQ (EXIT (LETT |y| + (SPADCALL |y| (QREFELT $ 14)) + |URAGG-;cycleEntry;2A;19|))) + (LETT |k| (QSADD1 |k|) + |URAGG-;cycleEntry;2A;19|) + (GO G190) G191 (EXIT NIL)) + (SEQ G190 + (COND + ((NULL (SPADCALL + (SPADCALL |x| |y| (QREFELT $ 37)) + (QREFELT $ 21))) + (GO G191))) + (SEQ (LETT |x| (SPADCALL |x| (QREFELT $ 14)) + |URAGG-;cycleEntry;2A;19|) + (EXIT (LETT |y| + (SPADCALL |y| (QREFELT $ 14)) + |URAGG-;cycleEntry;2A;19|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |x|)))))))) + +(DEFUN |URAGG-;cycleLength;ANni;20| (|x| $) + (PROG (|k| |y|) + (RETURN + (SEQ (COND + ((OR (SPADCALL |x| (QREFELT $ 20)) + (SPADCALL + (LETT |x| (|URAGG-;findCycle| |x| $) + |URAGG-;cycleLength;ANni;20|) + (QREFELT $ 20))) + 0) + ('T + (SEQ (LETT |y| (SPADCALL |x| (QREFELT $ 14)) + |URAGG-;cycleLength;ANni;20|) + (SEQ (LETT |k| 1 |URAGG-;cycleLength;ANni;20|) G190 + (COND + ((NULL (SPADCALL + (SPADCALL |x| |y| (QREFELT $ 37)) + (QREFELT $ 21))) + (GO G191))) + (SEQ (EXIT (LETT |y| + (SPADCALL |y| (QREFELT $ 14)) + |URAGG-;cycleLength;ANni;20|))) + (LETT |k| (QSADD1 |k|) + |URAGG-;cycleLength;ANni;20|) + (GO G190) G191 (EXIT NIL)) + (EXIT |k|)))))))) + +(DEFUN |URAGG-;rest;ANniA;21| (|x| |n| $) + (PROG (|i|) + (RETURN + (SEQ (SEQ (LETT |i| 1 |URAGG-;rest;ANniA;21|) G190 + (COND ((QSGREATERP |i| |n|) (GO G191))) + (SEQ (EXIT (COND + ((SPADCALL |x| (QREFELT $ 20)) + (|error| "Index out of range")) + ('T + (LETT |x| (SPADCALL |x| (QREFELT $ 14)) + |URAGG-;rest;ANniA;21|))))) + (LETT |i| (QSADD1 |i|) |URAGG-;rest;ANniA;21|) + (GO G190) G191 (EXIT NIL)) + (EXIT |x|))))) + +(DEFUN |URAGG-;last;ANniA;22| (|x| |n| $) + (PROG (|m| #0=#:G1498) + (RETURN + (SEQ (LETT |m| (SPADCALL |x| (QREFELT $ 43)) + |URAGG-;last;ANniA;22|) + (EXIT (COND + ((< |m| |n|) (|error| "index out of range")) + ('T + (SPADCALL + (SPADCALL |x| + (PROG1 (LETT #0# (- |m| |n|) + |URAGG-;last;ANniA;22|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) #0#)) + (QREFELT $ 44)) + (QREFELT $ 45))))))))) + +(DEFUN |URAGG-;=;2AB;23| (|x| |y| $) + (PROG (|k| #0=#:G1508) + (RETURN + (SEQ (EXIT (COND + ((SPADCALL |x| |y| (QREFELT $ 37)) 'T) + ('T + (SEQ (SEQ (LETT |k| 0 |URAGG-;=;2AB;23|) G190 + (COND + ((NULL (COND + ((SPADCALL |x| (QREFELT $ 20)) + 'NIL) + ('T + (SPADCALL + (SPADCALL |y| + (QREFELT $ 20)) + (QREFELT $ 21))))) + (GO G191))) + (SEQ (COND + ((EQL |k| 1000) + (COND + ((SPADCALL |x| (QREFELT $ 34)) + (EXIT (|error| "cyclic list")))))) + (COND + ((NULL + (SPADCALL + (SPADCALL |x| (QREFELT $ 8)) + (SPADCALL |y| (QREFELT $ 8)) + (QREFELT $ 47))) + (EXIT + (PROGN + (LETT #0# 'NIL + |URAGG-;=;2AB;23|) + (GO #0#))))) + (LETT |x| + (SPADCALL |x| (QREFELT $ 14)) + |URAGG-;=;2AB;23|) + (EXIT + (LETT |y| + (SPADCALL |y| (QREFELT $ 14)) + |URAGG-;=;2AB;23|))) + (LETT |k| (QSADD1 |k|) |URAGG-;=;2AB;23|) + (GO G190) G191 (EXIT NIL)) + (EXIT (COND + ((SPADCALL |x| (QREFELT $ 20)) + (SPADCALL |y| (QREFELT $ 20))) + ('T 'NIL))))))) + #0# (EXIT #0#))))) + +(DEFUN |URAGG-;node?;2AB;24| (|u| |v| $) + (PROG (|k| #0=#:G1513) + (RETURN + (SEQ (EXIT (SEQ (SEQ (LETT |k| 0 |URAGG-;node?;2AB;24|) G190 + (COND + ((NULL (SPADCALL + (SPADCALL |v| (QREFELT $ 20)) + (QREFELT $ 21))) + (GO G191))) + (SEQ (EXIT (COND + ((SPADCALL |u| |v| + (QREFELT $ 49)) + (PROGN + (LETT #0# 'T + |URAGG-;node?;2AB;24|) + (GO #0#))) + ('T + (SEQ + (COND + ((EQL |k| 1000) + (COND + ((SPADCALL |v| + (QREFELT $ 34)) + (EXIT + (|error| + "cyclic list")))))) + (EXIT + (LETT |v| + (SPADCALL |v| + (QREFELT $ 14)) + |URAGG-;node?;2AB;24|))))))) + (LETT |k| (QSADD1 |k|) + |URAGG-;node?;2AB;24|) + (GO G190) G191 (EXIT NIL)) + (EXIT (SPADCALL |u| |v| (QREFELT $ 49))))) + #0# (EXIT #0#))))) + +(DEFUN |URAGG-;setelt;Afirst2S;25| (|x| T3 |a| $) + (SPADCALL |x| |a| (QREFELT $ 51))) + +(DEFUN |URAGG-;setelt;Alast2S;26| (|x| T4 |a| $) + (SPADCALL |x| |a| (QREFELT $ 53))) + +(DEFUN |URAGG-;setelt;Arest2A;27| (|x| T5 |a| $) + (SPADCALL |x| |a| (QREFELT $ 55))) + +(DEFUN |URAGG-;concat;3A;28| (|x| |y| $) + (SPADCALL (SPADCALL |x| (QREFELT $ 45)) |y| (QREFELT $ 57))) + +(DEFUN |URAGG-;setlast!;A2S;29| (|x| |s| $) + (SEQ (COND + ((SPADCALL |x| (QREFELT $ 20)) + (|error| "setlast: empty list")) + ('T + (SEQ (SPADCALL (SPADCALL |x| (QREFELT $ 23)) |s| + (QREFELT $ 51)) + (EXIT |s|)))))) + +(DEFUN |URAGG-;setchildren!;ALA;30| (|u| |lv| $) + (COND + ((EQL (LENGTH |lv|) 1) + (SPADCALL |u| (|SPADfirst| |lv|) (QREFELT $ 55))) + ('T (|error| "wrong number of children specified")))) + +(DEFUN |URAGG-;setvalue!;A2S;31| (|u| |s| $) + (SPADCALL |u| |s| (QREFELT $ 51))) + +(DEFUN |URAGG-;split!;AIA;32| (|p| |n| $) + (PROG (#0=#:G1524 |q|) + (RETURN + (SEQ (COND + ((< |n| 1) (|error| "index out of range")) + ('T + (SEQ (LETT |p| + (SPADCALL |p| + (PROG1 (LETT #0# (- |n| 1) + |URAGG-;split!;AIA;32|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) #0#)) + (QREFELT $ 44)) + |URAGG-;split!;AIA;32|) + (LETT |q| (SPADCALL |p| (QREFELT $ 14)) + |URAGG-;split!;AIA;32|) + (SPADCALL |p| (SPADCALL (QREFELT $ 62)) + (QREFELT $ 55)) + (EXIT |q|)))))))) + +(DEFUN |URAGG-;cycleSplit!;2A;33| (|x| $) + (PROG (|y| |z|) + (RETURN + (SEQ (COND + ((OR (SPADCALL + (LETT |y| (SPADCALL |x| (QREFELT $ 38)) + |URAGG-;cycleSplit!;2A;33|) + (QREFELT $ 20)) + (SPADCALL |x| |y| (QREFELT $ 37))) + |y|) + ('T + (SEQ (LETT |z| (SPADCALL |x| (QREFELT $ 14)) + |URAGG-;cycleSplit!;2A;33|) + (SEQ G190 + (COND + ((NULL (SPADCALL + (SPADCALL |z| |y| (QREFELT $ 37)) + (QREFELT $ 21))) + (GO G191))) + (SEQ (LETT |x| |z| |URAGG-;cycleSplit!;2A;33|) + (EXIT (LETT |z| + (SPADCALL |z| (QREFELT $ 14)) + |URAGG-;cycleSplit!;2A;33|))) + NIL (GO G190) G191 (EXIT NIL)) + (SPADCALL |x| (SPADCALL (QREFELT $ 62)) + (QREFELT $ 55)) + (EXIT |y|)))))))) + +(DEFUN |UnaryRecursiveAggregate&| (|#1| |#2|) + (PROG (|dv$1| |dv$2| |dv$| $ |pv$|) + (RETURN + (PROGN + (LETT |dv$1| (|devaluate| |#1|) + . #0=(|UnaryRecursiveAggregate&|)) + (LETT |dv$2| (|devaluate| |#2|) . #0#) + (LETT |dv$| + (LIST '|UnaryRecursiveAggregate&| |dv$1| |dv$2|) . #0#) + (LETT $ (GETREFV 67) . #0#) + (QSETREFV $ 0 |dv$|) + (QSETREFV $ 3 + (LETT |pv$| + (|buildPredVector| 0 0 + (LIST (|HasAttribute| |#1| '|shallowlyMutable|))) . #0#)) + (|stuffDomainSlots| $) + (QSETREFV $ 6 |#1|) + (QSETREFV $ 7 |#2|) + (COND + ((|HasAttribute| |#1| '|finiteAggregate|) + (QSETREFV $ 46 + (CONS (|dispatchFunction| |URAGG-;last;ANniA;22|) $)))) + (COND + ((|HasCategory| |#2| '(|SetCategory|)) + (PROGN + (QSETREFV $ 48 + (CONS (|dispatchFunction| |URAGG-;=;2AB;23|) $)) + (QSETREFV $ 50 + (CONS (|dispatchFunction| |URAGG-;node?;2AB;24|) $))))) + (COND + ((|testBitVector| |pv$| 1) + (PROGN + (QSETREFV $ 52 + (CONS (|dispatchFunction| |URAGG-;setelt;Afirst2S;25|) + $)) + (QSETREFV $ 54 + (CONS (|dispatchFunction| |URAGG-;setelt;Alast2S;26|) + $)) + (QSETREFV $ 56 + (CONS (|dispatchFunction| |URAGG-;setelt;Arest2A;27|) + $)) + (QSETREFV $ 58 + (CONS (|dispatchFunction| |URAGG-;concat;3A;28|) $)) + (QSETREFV $ 59 + (CONS (|dispatchFunction| |URAGG-;setlast!;A2S;29|) $)) + (QSETREFV $ 60 + (CONS (|dispatchFunction| + |URAGG-;setchildren!;ALA;30|) + $)) + (QSETREFV $ 61 + (CONS (|dispatchFunction| |URAGG-;setvalue!;A2S;31|) + $)) + (QSETREFV $ 64 + (CONS (|dispatchFunction| |URAGG-;split!;AIA;32|) $)) + (QSETREFV $ 65 + (CONS (|dispatchFunction| |URAGG-;cycleSplit!;2A;33|) + $))))) + $)))) + +(MAKEPROP '|UnaryRecursiveAggregate&| '|infovec| + (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) + (0 . |first|) '"first" |URAGG-;elt;AfirstS;1| (5 . |last|) + '"last" |URAGG-;elt;AlastS;2| (10 . |rest|) '"rest" + |URAGG-;elt;ArestA;3| |URAGG-;second;AS;4| + |URAGG-;third;AS;5| (|Boolean|) (15 . |empty?|) + (20 . |not|) |URAGG-;cyclic?;AB;6| (25 . |tail|) + |URAGG-;last;AS;7| (|List| $) |URAGG-;nodes;AL;8| + |URAGG-;children;AL;9| |URAGG-;leaf?;AB;10| + |URAGG-;value;AS;11| (|NonNegativeInteger|) + |URAGG-;less?;ANniB;12| |URAGG-;more?;ANniB;13| + |URAGG-;size?;ANniB;14| (30 . |cyclic?|) + |URAGG-;#;ANni;15| |URAGG-;tail;2A;16| (35 . |eq?|) + (41 . |cycleEntry|) |URAGG-;cycleTail;2A;18| + |URAGG-;cycleEntry;2A;19| |URAGG-;cycleLength;ANni;20| + |URAGG-;rest;ANniA;21| (46 . |#|) (51 . |rest|) + (57 . |copy|) (62 . |last|) (68 . =) (74 . =) (80 . =) + (86 . |node?|) (92 . |setfirst!|) (98 . |setelt|) + (105 . |setlast!|) (111 . |setelt|) (118 . |setrest!|) + (124 . |setelt|) (131 . |concat!|) (137 . |concat|) + (143 . |setlast!|) (149 . |setchildren!|) + (155 . |setvalue!|) (161 . |empty|) (|Integer|) + (165 . |split!|) (171 . |cycleSplit!|) '"value") + '#(|value| 176 |third| 181 |tail| 186 |split!| 191 |size?| + 197 |setvalue!| 203 |setlast!| 209 |setelt| 215 + |setchildren!| 236 |second| 242 |rest| 247 |nodes| 253 + |node?| 258 |more?| 264 |less?| 270 |leaf?| 276 |last| 281 + |elt| 292 |cyclic?| 310 |cycleTail| 315 |cycleSplit!| 320 + |cycleLength| 325 |cycleEntry| 330 |concat| 335 |children| + 341 = 346 |#| 352) + 'NIL + (CONS (|makeByteWordVec2| 1 'NIL) + (CONS '#() + (CONS '#() + (|makeByteWordVec2| 65 + '(1 6 7 0 8 1 6 7 0 11 1 6 0 0 14 1 6 + 19 0 20 1 19 0 0 21 1 6 0 0 23 1 6 19 + 0 34 2 6 19 0 0 37 1 6 0 0 38 1 6 30 + 0 43 2 6 0 0 30 44 1 6 0 0 45 2 0 0 0 + 30 46 2 7 19 0 0 47 2 0 19 0 0 48 2 6 + 19 0 0 49 2 0 19 0 0 50 2 6 7 0 7 51 + 3 0 7 0 9 7 52 2 6 7 0 7 53 3 0 7 0 + 12 7 54 2 6 0 0 0 55 3 0 0 0 15 0 56 + 2 6 0 0 0 57 2 0 0 0 0 58 2 0 7 0 7 + 59 2 0 0 0 25 60 2 0 7 0 7 61 0 6 0 + 62 2 0 0 0 63 64 1 0 0 0 65 1 0 7 0 + 29 1 0 7 0 18 1 0 0 0 36 2 0 0 0 63 + 64 2 0 19 0 30 33 2 0 7 0 7 61 2 0 7 + 0 7 59 3 0 7 0 12 7 54 3 0 0 0 15 0 + 56 3 0 7 0 9 7 52 2 0 0 0 25 60 1 0 7 + 0 17 2 0 0 0 30 42 1 0 25 0 26 2 0 19 + 0 0 50 2 0 19 0 30 32 2 0 19 0 30 31 + 1 0 19 0 28 2 0 0 0 30 46 1 0 7 0 24 + 2 0 7 0 12 13 2 0 0 0 15 16 2 0 7 0 9 + 10 1 0 19 0 22 1 0 0 0 39 1 0 0 0 65 + 1 0 30 0 41 1 0 0 0 40 2 0 0 0 0 58 1 + 0 25 0 27 2 0 19 0 0 48 1 0 30 0 35))))) + '|lookupComplete|)) @ \section{category STAGG StreamAggregate} <<category STAGG StreamAggregate>>= @@ -2059,15 +3463,46 @@ Note that this code is not included in the generated catdef.spad file. <<STAGG.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(SETQ |StreamAggregate;CAT| (QUOTE NIL)) - -(SETQ |StreamAggregate;AL| (QUOTE NIL)) - -(DEFUN |StreamAggregate| (#1=#:G87035) (LET (#2=#:G87036) (COND ((SETQ #2# (|assoc| (|devaluate| #1#) |StreamAggregate;AL|)) (CDR #2#)) (T (SETQ |StreamAggregate;AL| (|cons5| (CONS (|devaluate| #1#) (SETQ #2# (|StreamAggregate;| #1#))) |StreamAggregate;AL|)) #2#)))) - -(DEFUN |StreamAggregate;| (|t#1|) (PROG (#1=#:G87034) (RETURN (PROG1 (LETT #1# (|sublisV| (PAIR (QUOTE (|t#1|)) (LIST (|devaluate| |t#1|))) (COND (|StreamAggregate;CAT|) ((QUOTE T) (LETT |StreamAggregate;CAT| (|Join| (|UnaryRecursiveAggregate| (QUOTE |t#1|)) (|LinearAggregate| (QUOTE |t#1|)) (|mkCategory| (QUOTE |domain|) (QUOTE (((|explicitlyFinite?| ((|Boolean|) |$|)) T) ((|possiblyInfinite?| ((|Boolean|) |$|)) T))) NIL (QUOTE ((|Boolean|))) NIL)) . #2=(|StreamAggregate|))))) . #2#) (SETELT #1# 0 (LIST (QUOTE |StreamAggregate|) (|devaluate| |t#1|))))))) +(/VERSIONCHECK 2) + +(DEFPARAMETER |StreamAggregate;CAT| 'NIL) + +(DEFPARAMETER |StreamAggregate;AL| 'NIL) + +(DEFUN |StreamAggregate| (#0=#:G1405) + (LET (#1=#:G1406) + (COND + ((SETQ #1# (|assoc| (|devaluate| #0#) |StreamAggregate;AL|)) + (CDR #1#)) + (T (SETQ |StreamAggregate;AL| + (|cons5| (CONS (|devaluate| #0#) + (SETQ #1# (|StreamAggregate;| #0#))) + |StreamAggregate;AL|)) + #1#)))) + +(DEFUN |StreamAggregate;| (|t#1|) + (PROG (#0=#:G1404) + (RETURN + (PROG1 (LETT #0# + (|sublisV| + (PAIR '(|t#1|) (LIST (|devaluate| |t#1|))) + (COND + (|StreamAggregate;CAT|) + ('T + (LETT |StreamAggregate;CAT| + (|Join| (|UnaryRecursiveAggregate| + '|t#1|) + (|LinearAggregate| '|t#1|) + (|mkCategory| '|domain| + '(((|explicitlyFinite?| + ((|Boolean|) $)) + T) + ((|possiblyInfinite?| + ((|Boolean|) $)) + T)) + NIL '((|Boolean|)) NIL)) + . #1=(|StreamAggregate|))))) . #1#) + (SETELT #0# 0 (LIST '|StreamAggregate| (|devaluate| |t#1|))))))) @ \section{STAGG-.lsp BOOTSTRAP} {\bf STAGG-} depends on {\bf STAGG}. We need to break this cycle to build @@ -2080,37 +3515,302 @@ Note that this code is not included in the generated catdef.spad file. <<STAGG-.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(DEFUN |STAGG-;explicitlyFinite?;AB;1| (|x| |$|) (COND ((SPADCALL |x| (QREFELT |$| 9)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) - -(DEFUN |STAGG-;possiblyInfinite?;AB;2| (|x| |$|) (SPADCALL |x| (QREFELT |$| 9))) - -(DEFUN |STAGG-;first;ANniA;3| (|x| |n| |$|) (PROG (#1=#:G87053 |i|) (RETURN (SEQ (SPADCALL (PROGN (LETT #1# NIL |STAGG-;first;ANniA;3|) (SEQ (LETT |i| 1 |STAGG-;first;ANniA;3|) G190 (COND ((QSGREATERP |i| |n|) (GO G191))) (SEQ (EXIT (LETT #1# (CONS (|STAGG-;c2| |x| (LETT |x| (SPADCALL |x| (QREFELT |$| 12)) |STAGG-;first;ANniA;3|) |$|) #1#) |STAGG-;first;ANniA;3|))) (LETT |i| (QSADD1 |i|) |STAGG-;first;ANniA;3|) (GO G190) G191 (EXIT (NREVERSE0 #1#)))) (QREFELT |$| 14)))))) - -(DEFUN |STAGG-;c2| (|x| |r| |$|) (COND ((SPADCALL |x| (QREFELT |$| 17)) (|error| "Index out of range")) ((QUOTE T) (SPADCALL |x| (QREFELT |$| 18))))) - -(DEFUN |STAGG-;elt;AIS;5| (|x| |i| |$|) (PROG (#1=#:G87056) (RETURN (SEQ (LETT |i| (|-| |i| (SPADCALL |x| (QREFELT |$| 20))) |STAGG-;elt;AIS;5|) (COND ((OR (|<| |i| 0) (SPADCALL (LETT |x| (SPADCALL |x| (PROG1 (LETT #1# |i| |STAGG-;elt;AIS;5|) (|check-subtype| (|>=| #1# 0) (QUOTE (|NonNegativeInteger|)) #1#)) (QREFELT |$| 21)) |STAGG-;elt;AIS;5|) (QREFELT |$| 17))) (EXIT (|error| "index out of range")))) (EXIT (SPADCALL |x| (QREFELT |$| 18))))))) - -(DEFUN |STAGG-;elt;AUsA;6| (|x| |i| |$|) (PROG (|l| #1=#:G87060 |h| #2=#:G87062 #3=#:G87063) (RETURN (SEQ (LETT |l| (|-| (SPADCALL |i| (QREFELT |$| 24)) (SPADCALL |x| (QREFELT |$| 20))) |STAGG-;elt;AUsA;6|) (EXIT (COND ((|<| |l| 0) (|error| "index out of range")) ((NULL (SPADCALL |i| (QREFELT |$| 25))) (SPADCALL (SPADCALL |x| (PROG1 (LETT #1# |l| |STAGG-;elt;AUsA;6|) (|check-subtype| (|>=| #1# 0) (QUOTE (|NonNegativeInteger|)) #1#)) (QREFELT |$| 21)) (QREFELT |$| 26))) ((QUOTE T) (SEQ (LETT |h| (|-| (SPADCALL |i| (QREFELT |$| 27)) (SPADCALL |x| (QREFELT |$| 20))) |STAGG-;elt;AUsA;6|) (EXIT (COND ((|<| |h| |l|) (SPADCALL (QREFELT |$| 28))) ((QUOTE T) (SPADCALL (SPADCALL |x| (PROG1 (LETT #2# |l| |STAGG-;elt;AUsA;6|) (|check-subtype| (|>=| #2# 0) (QUOTE (|NonNegativeInteger|)) #2#)) (QREFELT |$| 21)) (PROG1 (LETT #3# (|+| (|-| |h| |l|) 1) |STAGG-;elt;AUsA;6|) (|check-subtype| (|>=| #3# 0) (QUOTE (|NonNegativeInteger|)) #3#)) (QREFELT |$| 29))))))))))))) - -(DEFUN |STAGG-;concat;3A;7| (|x| |y| |$|) (SPADCALL (SPADCALL |x| (QREFELT |$| 26)) |y| (QREFELT |$| 31))) - -(DEFUN |STAGG-;concat;LA;8| (|l| |$|) (COND ((NULL |l|) (SPADCALL (QREFELT |$| 28))) ((QUOTE T) (SPADCALL (SPADCALL (|SPADfirst| |l|) (QREFELT |$| 26)) (SPADCALL (CDR |l|) (QREFELT |$| 34)) (QREFELT |$| 31))))) - -(DEFUN |STAGG-;map!;M2A;9| (|f| |l| |$|) (PROG (|y|) (RETURN (SEQ (LETT |y| |l| |STAGG-;map!;M2A;9|) (SEQ G190 (COND ((NULL (COND ((SPADCALL |l| (QREFELT |$| 17)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (SPADCALL |l| (SPADCALL (SPADCALL |l| (QREFELT |$| 18)) |f|) (QREFELT |$| 36)) (EXIT (LETT |l| (SPADCALL |l| (QREFELT |$| 12)) |STAGG-;map!;M2A;9|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT |y|))))) - -(DEFUN |STAGG-;fill!;ASA;10| (|x| |s| |$|) (PROG (|y|) (RETURN (SEQ (LETT |y| |x| |STAGG-;fill!;ASA;10|) (SEQ G190 (COND ((NULL (COND ((SPADCALL |y| (QREFELT |$| 17)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (SPADCALL |y| |s| (QREFELT |$| 36)) (EXIT (LETT |y| (SPADCALL |y| (QREFELT |$| 12)) |STAGG-;fill!;ASA;10|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT |x|))))) - -(DEFUN |STAGG-;setelt;AI2S;11| (|x| |i| |s| |$|) (PROG (#1=#:G87081) (RETURN (SEQ (LETT |i| (|-| |i| (SPADCALL |x| (QREFELT |$| 20))) |STAGG-;setelt;AI2S;11|) (COND ((OR (|<| |i| 0) (SPADCALL (LETT |x| (SPADCALL |x| (PROG1 (LETT #1# |i| |STAGG-;setelt;AI2S;11|) (|check-subtype| (|>=| #1# 0) (QUOTE (|NonNegativeInteger|)) #1#)) (QREFELT |$| 21)) |STAGG-;setelt;AI2S;11|) (QREFELT |$| 17))) (EXIT (|error| "index out of range")))) (EXIT (SPADCALL |x| |s| (QREFELT |$| 36))))))) - -(DEFUN |STAGG-;setelt;AUs2S;12| (|x| |i| |s| |$|) (PROG (|l| |h| #1=#:G87086 #2=#:G87087 |z| |y|) (RETURN (SEQ (LETT |l| (|-| (SPADCALL |i| (QREFELT |$| 24)) (SPADCALL |x| (QREFELT |$| 20))) |STAGG-;setelt;AUs2S;12|) (EXIT (COND ((|<| |l| 0) (|error| "index out of range")) ((QUOTE T) (SEQ (LETT |h| (COND ((SPADCALL |i| (QREFELT |$| 25)) (|-| (SPADCALL |i| (QREFELT |$| 27)) (SPADCALL |x| (QREFELT |$| 20)))) ((QUOTE T) (SPADCALL |x| (QREFELT |$| 41)))) |STAGG-;setelt;AUs2S;12|) (EXIT (COND ((|<| |h| |l|) |s|) ((QUOTE T) (SEQ (LETT |y| (SPADCALL |x| (PROG1 (LETT #1# |l| |STAGG-;setelt;AUs2S;12|) (|check-subtype| (|>=| #1# 0) (QUOTE (|NonNegativeInteger|)) #1#)) (QREFELT |$| 21)) |STAGG-;setelt;AUs2S;12|) (LETT |z| (SPADCALL |y| (PROG1 (LETT #2# (|+| (|-| |h| |l|) 1) |STAGG-;setelt;AUs2S;12|) (|check-subtype| (|>=| #2# 0) (QUOTE (|NonNegativeInteger|)) #2#)) (QREFELT |$| 21)) |STAGG-;setelt;AUs2S;12|) (SEQ G190 (COND ((NULL (COND ((SPADCALL |y| |z| (QREFELT |$| 42)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (SPADCALL |y| |s| (QREFELT |$| 36)) (EXIT (LETT |y| (SPADCALL |y| (QREFELT |$| 12)) |STAGG-;setelt;AUs2S;12|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT |s|))))))))))))) - -(DEFUN |STAGG-;concat!;3A;13| (|x| |y| |$|) (SEQ (COND ((SPADCALL |x| (QREFELT |$| 17)) |y|) ((QUOTE T) (SEQ (SPADCALL (SPADCALL |x| (QREFELT |$| 44)) |y| (QREFELT |$| 45)) (EXIT |x|)))))) - -(DEFUN |StreamAggregate&| (|#1| |#2|) (PROG (|DV$1| |DV$2| |dv$| |$| |pv$|) (RETURN (PROGN (LETT |DV$1| (|devaluate| |#1|) . #1=(|StreamAggregate&|)) (LETT |DV$2| (|devaluate| |#2|) . #1#) (LETT |dv$| (LIST (QUOTE |StreamAggregate&|) |DV$1| |DV$2|) . #1#) (LETT |$| (GETREFV 51) . #1#) (QSETREFV |$| 0 |dv$|) (QSETREFV |$| 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#)) (|stuffDomainSlots| |$|) (QSETREFV |$| 6 |#1|) (QSETREFV |$| 7 |#2|) (COND ((|HasAttribute| |#1| (QUOTE |shallowlyMutable|)) (PROGN (QSETREFV |$| 32 (CONS (|dispatchFunction| |STAGG-;concat;3A;7|) |$|)) (QSETREFV |$| 35 (CONS (|dispatchFunction| |STAGG-;concat;LA;8|) |$|)) (QSETREFV |$| 38 (CONS (|dispatchFunction| |STAGG-;map!;M2A;9|) |$|)) (QSETREFV |$| 39 (CONS (|dispatchFunction| |STAGG-;fill!;ASA;10|) |$|)) (QSETREFV |$| 40 (CONS (|dispatchFunction| |STAGG-;setelt;AI2S;11|) |$|)) (QSETREFV |$| 43 (CONS (|dispatchFunction| |STAGG-;setelt;AUs2S;12|) |$|)) (QSETREFV |$| 46 (CONS (|dispatchFunction| |STAGG-;concat!;3A;13|) |$|))))) |$|)))) - -(MAKEPROP (QUOTE |StreamAggregate&|) (QUOTE |infovec|) (LIST (QUOTE #(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) (|Boolean|) (0 . |cyclic?|) |STAGG-;explicitlyFinite?;AB;1| |STAGG-;possiblyInfinite?;AB;2| (5 . |rest|) (|List| 7) (10 . |construct|) (|NonNegativeInteger|) |STAGG-;first;ANniA;3| (15 . |empty?|) (20 . |first|) (|Integer|) (25 . |minIndex|) (30 . |rest|) |STAGG-;elt;AIS;5| (|UniversalSegment| 19) (36 . |lo|) (41 . |hasHi|) (46 . |copy|) (51 . |hi|) (56 . |empty|) (60 . |first|) |STAGG-;elt;AUsA;6| (66 . |concat!|) (72 . |concat|) (|List| |$|) (78 . |concat|) (83 . |concat|) (88 . |setfirst!|) (|Mapping| 7 7) (94 . |map!|) (100 . |fill!|) (106 . |setelt|) (113 . |maxIndex|) (118 . |eq?|) (124 . |setelt|) (131 . |tail|) (136 . |setrest!|) (142 . |concat!|) (QUOTE "rest") (QUOTE "last") (QUOTE "first") (QUOTE "value"))) (QUOTE #(|setelt| 148 |possiblyInfinite?| 162 |map!| 167 |first| 173 |fill!| 179 |explicitlyFinite?| 185 |elt| 190 |concat!| 202 |concat| 208)) (QUOTE NIL) (CONS (|makeByteWordVec2| 1 (QUOTE NIL)) (CONS (QUOTE #()) (CONS (QUOTE #()) (|makeByteWordVec2| 46 (QUOTE (1 6 8 0 9 1 6 0 0 12 1 6 0 13 14 1 6 8 0 17 1 6 7 0 18 1 6 19 0 20 2 6 0 0 15 21 1 23 19 0 24 1 23 8 0 25 1 6 0 0 26 1 23 19 0 27 0 6 0 28 2 6 0 0 15 29 2 6 0 0 0 31 2 0 0 0 0 32 1 6 0 33 34 1 0 0 33 35 2 6 7 0 7 36 2 0 0 37 0 38 2 0 0 0 7 39 3 0 7 0 19 7 40 1 6 19 0 41 2 6 8 0 0 42 3 0 7 0 23 7 43 1 6 0 0 44 2 6 0 0 0 45 2 0 0 0 0 46 3 0 7 0 19 7 40 3 0 7 0 23 7 43 1 0 8 0 11 2 0 0 37 0 38 2 0 0 0 15 16 2 0 0 0 7 39 1 0 8 0 10 2 0 7 0 19 22 2 0 0 0 23 30 2 0 0 0 0 46 1 0 0 33 35 2 0 0 0 0 32)))))) (QUOTE |lookupComplete|))) +(/VERSIONCHECK 2) + +(DEFUN |STAGG-;explicitlyFinite?;AB;1| (|x| $) + (SPADCALL (SPADCALL |x| (QREFELT $ 9)) (QREFELT $ 10))) + +(DEFUN |STAGG-;possiblyInfinite?;AB;2| (|x| $) + (SPADCALL |x| (QREFELT $ 9))) + +(DEFUN |STAGG-;first;ANniA;3| (|x| |n| $) + (PROG (#0=#:G1411 |i|) + (RETURN + (SEQ (SPADCALL + (PROGN + (LETT #0# NIL |STAGG-;first;ANniA;3|) + (SEQ (LETT |i| 1 |STAGG-;first;ANniA;3|) G190 + (COND ((QSGREATERP |i| |n|) (GO G191))) + (SEQ (EXIT (LETT #0# + (CONS + (|STAGG-;c2| |x| + (LETT |x| + (SPADCALL |x| (QREFELT $ 13)) + |STAGG-;first;ANniA;3|) + $) + #0#) + |STAGG-;first;ANniA;3|))) + (LETT |i| (QSADD1 |i|) |STAGG-;first;ANniA;3|) + (GO G190) G191 (EXIT (NREVERSE0 #0#)))) + (QREFELT $ 15)))))) + +(DEFUN |STAGG-;c2| (|x| |r| $) + (COND + ((SPADCALL |x| (QREFELT $ 18)) (|error| "Index out of range")) + ('T (SPADCALL |x| (QREFELT $ 19))))) + +(DEFUN |STAGG-;elt;AIS;5| (|x| |i| $) + (PROG (#0=#:G1414) + (RETURN + (SEQ (LETT |i| (- |i| (SPADCALL |x| (QREFELT $ 21))) + |STAGG-;elt;AIS;5|) + (COND + ((OR (< |i| 0) + (SPADCALL + (LETT |x| + (SPADCALL |x| + (PROG1 (LETT #0# |i| + |STAGG-;elt;AIS;5|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) #0#)) + (QREFELT $ 22)) + |STAGG-;elt;AIS;5|) + (QREFELT $ 18))) + (EXIT (|error| "index out of range")))) + (EXIT (SPADCALL |x| (QREFELT $ 19))))))) + +(DEFUN |STAGG-;elt;AUsA;6| (|x| |i| $) + (PROG (|l| #0=#:G1418 |h| #1=#:G1420 #2=#:G1421) + (RETURN + (SEQ (LETT |l| + (- (SPADCALL |i| (QREFELT $ 25)) + (SPADCALL |x| (QREFELT $ 21))) + |STAGG-;elt;AUsA;6|) + (EXIT (COND + ((< |l| 0) (|error| "index out of range")) + ((NULL (SPADCALL |i| (QREFELT $ 26))) + (SPADCALL + (SPADCALL |x| + (PROG1 (LETT #0# |l| |STAGG-;elt;AUsA;6|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) #0#)) + (QREFELT $ 22)) + (QREFELT $ 27))) + ('T + (SEQ (LETT |h| + (- (SPADCALL |i| (QREFELT $ 28)) + (SPADCALL |x| (QREFELT $ 21))) + |STAGG-;elt;AUsA;6|) + (EXIT (COND + ((< |h| |l|) + (SPADCALL (QREFELT $ 29))) + ('T + (SPADCALL + (SPADCALL |x| + (PROG1 + (LETT #1# |l| + |STAGG-;elt;AUsA;6|) + (|check-subtype| (>= #1# 0) + '(|NonNegativeInteger|) #1#)) + (QREFELT $ 22)) + (PROG1 + (LETT #2# (+ (- |h| |l|) 1) + |STAGG-;elt;AUsA;6|) + (|check-subtype| (>= #2# 0) + '(|NonNegativeInteger|) #2#)) + (QREFELT $ 30))))))))))))) + +(DEFUN |STAGG-;concat;3A;7| (|x| |y| $) + (SPADCALL (SPADCALL |x| (QREFELT $ 27)) |y| (QREFELT $ 32))) + +(DEFUN |STAGG-;concat;LA;8| (|l| $) + (COND + ((NULL |l|) (SPADCALL (QREFELT $ 29))) + ('T + (SPADCALL (SPADCALL (|SPADfirst| |l|) (QREFELT $ 27)) + (SPADCALL (CDR |l|) (QREFELT $ 35)) (QREFELT $ 32))))) + +(DEFUN |STAGG-;map!;M2A;9| (|f| |l| $) + (PROG (|y|) + (RETURN + (SEQ (LETT |y| |l| |STAGG-;map!;M2A;9|) + (SEQ G190 + (COND + ((NULL (SPADCALL (SPADCALL |l| (QREFELT $ 18)) + (QREFELT $ 10))) + (GO G191))) + (SEQ (SPADCALL |l| + (SPADCALL (SPADCALL |l| (QREFELT $ 19)) |f|) + (QREFELT $ 37)) + (EXIT (LETT |l| (SPADCALL |l| (QREFELT $ 13)) + |STAGG-;map!;M2A;9|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |y|))))) + +(DEFUN |STAGG-;fill!;ASA;10| (|x| |s| $) + (PROG (|y|) + (RETURN + (SEQ (LETT |y| |x| |STAGG-;fill!;ASA;10|) + (SEQ G190 + (COND + ((NULL (SPADCALL (SPADCALL |y| (QREFELT $ 18)) + (QREFELT $ 10))) + (GO G191))) + (SEQ (SPADCALL |y| |s| (QREFELT $ 37)) + (EXIT (LETT |y| (SPADCALL |y| (QREFELT $ 13)) + |STAGG-;fill!;ASA;10|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |x|))))) + +(DEFUN |STAGG-;setelt;AI2S;11| (|x| |i| |s| $) + (PROG (#0=#:G1437) + (RETURN + (SEQ (LETT |i| (- |i| (SPADCALL |x| (QREFELT $ 21))) + |STAGG-;setelt;AI2S;11|) + (COND + ((OR (< |i| 0) + (SPADCALL + (LETT |x| + (SPADCALL |x| + (PROG1 (LETT #0# |i| + |STAGG-;setelt;AI2S;11|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) #0#)) + (QREFELT $ 22)) + |STAGG-;setelt;AI2S;11|) + (QREFELT $ 18))) + (EXIT (|error| "index out of range")))) + (EXIT (SPADCALL |x| |s| (QREFELT $ 37))))))) + +(DEFUN |STAGG-;setelt;AUs2S;12| (|x| |i| |s| $) + (PROG (|l| |h| #0=#:G1442 #1=#:G1443 |z| |y|) + (RETURN + (SEQ (LETT |l| + (- (SPADCALL |i| (QREFELT $ 25)) + (SPADCALL |x| (QREFELT $ 21))) + |STAGG-;setelt;AUs2S;12|) + (EXIT (COND + ((< |l| 0) (|error| "index out of range")) + ('T + (SEQ (LETT |h| + (COND + ((SPADCALL |i| (QREFELT $ 26)) + (- (SPADCALL |i| (QREFELT $ 28)) + (SPADCALL |x| (QREFELT $ 21)))) + ('T (SPADCALL |x| (QREFELT $ 42)))) + |STAGG-;setelt;AUs2S;12|) + (EXIT (COND + ((< |h| |l|) |s|) + ('T + (SEQ (LETT |y| + (SPADCALL |x| + (PROG1 + (LETT #0# |l| + |STAGG-;setelt;AUs2S;12|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) + #0#)) + (QREFELT $ 22)) + |STAGG-;setelt;AUs2S;12|) + (LETT |z| + (SPADCALL |y| + (PROG1 + (LETT #1# (+ (- |h| |l|) 1) + |STAGG-;setelt;AUs2S;12|) + (|check-subtype| (>= #1# 0) + '(|NonNegativeInteger|) + #1#)) + (QREFELT $ 22)) + |STAGG-;setelt;AUs2S;12|) + (SEQ G190 + (COND + ((NULL + (SPADCALL + (SPADCALL |y| |z| + (QREFELT $ 43)) + (QREFELT $ 10))) + (GO G191))) + (SEQ + (SPADCALL |y| |s| + (QREFELT $ 37)) + (EXIT + (LETT |y| + (SPADCALL |y| + (QREFELT $ 13)) + |STAGG-;setelt;AUs2S;12|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |s|))))))))))))) + +(DEFUN |STAGG-;concat!;3A;13| (|x| |y| $) + (SEQ (COND + ((SPADCALL |x| (QREFELT $ 18)) |y|) + ('T + (SEQ (SPADCALL (SPADCALL |x| (QREFELT $ 45)) |y| + (QREFELT $ 46)) + (EXIT |x|)))))) + +(DEFUN |StreamAggregate&| (|#1| |#2|) + (PROG (|dv$1| |dv$2| |dv$| $ |pv$|) + (RETURN + (PROGN + (LETT |dv$1| (|devaluate| |#1|) . #0=(|StreamAggregate&|)) + (LETT |dv$2| (|devaluate| |#2|) . #0#) + (LETT |dv$| (LIST '|StreamAggregate&| |dv$1| |dv$2|) . #0#) + (LETT $ (GETREFV 52) . #0#) + (QSETREFV $ 0 |dv$|) + (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#)) + (|stuffDomainSlots| $) + (QSETREFV $ 6 |#1|) + (QSETREFV $ 7 |#2|) + (COND + ((|HasAttribute| |#1| '|shallowlyMutable|) + (PROGN + (QSETREFV $ 33 + (CONS (|dispatchFunction| |STAGG-;concat;3A;7|) $)) + (QSETREFV $ 36 + (CONS (|dispatchFunction| |STAGG-;concat;LA;8|) $)) + (QSETREFV $ 39 + (CONS (|dispatchFunction| |STAGG-;map!;M2A;9|) $)) + (QSETREFV $ 40 + (CONS (|dispatchFunction| |STAGG-;fill!;ASA;10|) $)) + (QSETREFV $ 41 + (CONS (|dispatchFunction| |STAGG-;setelt;AI2S;11|) $)) + (QSETREFV $ 44 + (CONS (|dispatchFunction| |STAGG-;setelt;AUs2S;12|) $)) + (QSETREFV $ 47 + (CONS (|dispatchFunction| |STAGG-;concat!;3A;13|) $))))) + $)))) + +(MAKEPROP '|StreamAggregate&| '|infovec| + (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) + (|Boolean|) (0 . |cyclic?|) (5 . |not|) + |STAGG-;explicitlyFinite?;AB;1| + |STAGG-;possiblyInfinite?;AB;2| (10 . |rest|) (|List| 7) + (15 . |construct|) (|NonNegativeInteger|) + |STAGG-;first;ANniA;3| (20 . |empty?|) (25 . |first|) + (|Integer|) (30 . |minIndex|) (35 . |rest|) + |STAGG-;elt;AIS;5| (|UniversalSegment| 20) (41 . |lo|) + (46 . |hasHi|) (51 . |copy|) (56 . |hi|) (61 . |empty|) + (65 . |first|) |STAGG-;elt;AUsA;6| (71 . |concat!|) + (77 . |concat|) (|List| $) (83 . |concat|) (88 . |concat|) + (93 . |setfirst!|) (|Mapping| 7 7) (99 . |map!|) + (105 . |fill!|) (111 . |setelt|) (118 . |maxIndex|) + (123 . |eq?|) (129 . |setelt|) (136 . |tail|) + (141 . |setrest!|) (147 . |concat!|) '"rest" '"last" + '"first" '"value") + '#(|setelt| 153 |possiblyInfinite?| 167 |map!| 172 |first| + 178 |fill!| 184 |explicitlyFinite?| 190 |elt| 195 + |concat!| 207 |concat| 213) + 'NIL + (CONS (|makeByteWordVec2| 1 'NIL) + (CONS '#() + (CONS '#() + (|makeByteWordVec2| 47 + '(1 6 8 0 9 1 8 0 0 10 1 6 0 0 13 1 6 0 + 14 15 1 6 8 0 18 1 6 7 0 19 1 6 20 0 + 21 2 6 0 0 16 22 1 24 20 0 25 1 24 8 + 0 26 1 6 0 0 27 1 24 20 0 28 0 6 0 29 + 2 6 0 0 16 30 2 6 0 0 0 32 2 0 0 0 0 + 33 1 6 0 34 35 1 0 0 34 36 2 6 7 0 7 + 37 2 0 0 38 0 39 2 0 0 0 7 40 3 0 7 0 + 20 7 41 1 6 20 0 42 2 6 8 0 0 43 3 0 + 7 0 24 7 44 1 6 0 0 45 2 6 0 0 0 46 2 + 0 0 0 0 47 3 0 7 0 20 7 41 3 0 7 0 24 + 7 44 1 0 8 0 12 2 0 0 38 0 39 2 0 0 0 + 16 17 2 0 0 0 7 40 1 0 8 0 11 2 0 7 0 + 20 23 2 0 0 0 24 31 2 0 0 0 0 47 1 0 + 0 34 36 2 0 0 0 0 33))))) + '|lookupComplete|)) @ \section{category LNAGG LinearAggregate} <<category LNAGG LinearAggregate>>= @@ -2208,15 +3908,86 @@ Note that this code is not included in the generated catdef.spad file. <<LNAGG.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(SETQ |LinearAggregate;CAT| (QUOTE NIL)) - -(SETQ |LinearAggregate;AL| (QUOTE NIL)) - -(DEFUN |LinearAggregate| (#1=#:G85818) (LET (#2=#:G85819) (COND ((SETQ #2# (|assoc| (|devaluate| #1#) |LinearAggregate;AL|)) (CDR #2#)) (T (SETQ |LinearAggregate;AL| (|cons5| (CONS (|devaluate| #1#) (SETQ #2# (|LinearAggregate;| #1#))) |LinearAggregate;AL|)) #2#)))) - -(DEFUN |LinearAggregate;| (|t#1|) (PROG (#1=#:G85817) (RETURN (PROG1 (LETT #1# (|sublisV| (PAIR (QUOTE (|t#1|)) (LIST (|devaluate| |t#1|))) (|sublisV| (PAIR (QUOTE (#2=#:G85816)) (LIST (QUOTE (|Integer|)))) (COND (|LinearAggregate;CAT|) ((QUOTE T) (LETT |LinearAggregate;CAT| (|Join| (|IndexedAggregate| (QUOTE #2#) (QUOTE |t#1|)) (|Collection| (QUOTE |t#1|)) (|mkCategory| (QUOTE |domain|) (QUOTE (((|new| (|$| (|NonNegativeInteger|) |t#1|)) T) ((|concat| (|$| |$| |t#1|)) T) ((|concat| (|$| |t#1| |$|)) T) ((|concat| (|$| |$| |$|)) T) ((|concat| (|$| (|List| |$|))) T) ((|map| (|$| (|Mapping| |t#1| |t#1| |t#1|) |$| |$|)) T) ((|elt| (|$| |$| (|UniversalSegment| (|Integer|)))) T) ((|delete| (|$| |$| (|Integer|))) T) ((|delete| (|$| |$| (|UniversalSegment| (|Integer|)))) T) ((|insert| (|$| |t#1| |$| (|Integer|))) T) ((|insert| (|$| |$| |$| (|Integer|))) T) ((|setelt| (|t#1| |$| (|UniversalSegment| (|Integer|)) |t#1|)) (|has| |$| (ATTRIBUTE |shallowlyMutable|))))) NIL (QUOTE ((|UniversalSegment| (|Integer|)) (|Integer|) (|List| |$|) (|NonNegativeInteger|))) NIL)) . #3=(|LinearAggregate|)))))) . #3#) (SETELT #1# 0 (LIST (QUOTE |LinearAggregate|) (|devaluate| |t#1|))))))) +(/VERSIONCHECK 2) + +(DEFPARAMETER |LinearAggregate;CAT| 'NIL) + +(DEFPARAMETER |LinearAggregate;AL| 'NIL) + +(DEFUN |LinearAggregate| (#0=#:G1400) + (LET (#1=#:G1401) + (COND + ((SETQ #1# (|assoc| (|devaluate| #0#) |LinearAggregate;AL|)) + (CDR #1#)) + (T (SETQ |LinearAggregate;AL| + (|cons5| (CONS (|devaluate| #0#) + (SETQ #1# (|LinearAggregate;| #0#))) + |LinearAggregate;AL|)) + #1#)))) + +(DEFUN |LinearAggregate;| (|t#1|) + (PROG (#0=#:G1399) + (RETURN + (PROG1 (LETT #0# + (|sublisV| + (PAIR '(|t#1|) (LIST (|devaluate| |t#1|))) + (|sublisV| + (PAIR '(#1=#:G1398) (LIST '(|Integer|))) + (COND + (|LinearAggregate;CAT|) + ('T + (LETT |LinearAggregate;CAT| + (|Join| + (|IndexedAggregate| '#1# '|t#1|) + (|Collection| '|t#1|) + (|mkCategory| '|domain| + '(((|new| + ($ (|NonNegativeInteger|) + |t#1|)) + T) + ((|concat| ($ $ |t#1|)) T) + ((|concat| ($ |t#1| $)) T) + ((|concat| ($ $ $)) T) + ((|concat| ($ (|List| $))) T) + ((|map| + ($ + (|Mapping| |t#1| |t#1| + |t#1|) + $ $)) + T) + ((|elt| + ($ $ + (|UniversalSegment| + (|Integer|)))) + T) + ((|delete| ($ $ (|Integer|))) + T) + ((|delete| + ($ $ + (|UniversalSegment| + (|Integer|)))) + T) + ((|insert| + ($ |t#1| $ (|Integer|))) + T) + ((|insert| ($ $ $ (|Integer|))) + T) + ((|setelt| + (|t#1| $ + (|UniversalSegment| + (|Integer|)) + |t#1|)) + (|has| $ + (ATTRIBUTE + |shallowlyMutable|)))) + NIL + '((|UniversalSegment| + (|Integer|)) + (|Integer|) (|List| $) + (|NonNegativeInteger|)) + NIL)) + . #2=(|LinearAggregate|)))))) . #2#) + (SETELT #0# 0 (LIST '|LinearAggregate| (|devaluate| |t#1|))))))) @ \section{LNAGG-.lsp BOOTSTRAP} {\bf LNAGG-} depends on {\bf LNAGG}. We need to break this cycle to build @@ -2229,23 +4000,85 @@ Note that this code is not included in the generated catdef.spad file. <<LNAGG-.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(DEFUN |LNAGG-;indices;AL;1| (|a| |$|) (PROG (#1=#:G85833 |i| #2=#:G85834) (RETURN (SEQ (PROGN (LETT #1# NIL |LNAGG-;indices;AL;1|) (SEQ (LETT |i| (SPADCALL |a| (QREFELT |$| 9)) |LNAGG-;indices;AL;1|) (LETT #2# (SPADCALL |a| (QREFELT |$| 10)) |LNAGG-;indices;AL;1|) G190 (COND ((|>| |i| #2#) (GO G191))) (SEQ (EXIT (LETT #1# (CONS |i| #1#) |LNAGG-;indices;AL;1|))) (LETT |i| (|+| |i| 1) |LNAGG-;indices;AL;1|) (GO G190) G191 (EXIT (NREVERSE0 #1#)))))))) - -(DEFUN |LNAGG-;index?;IAB;2| (|i| |a| |$|) (COND ((OR (|<| |i| (SPADCALL |a| (QREFELT |$| 9))) (|<| (SPADCALL |a| (QREFELT |$| 10)) |i|)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) - -(DEFUN |LNAGG-;concat;ASA;3| (|a| |x| |$|) (SPADCALL |a| (SPADCALL 1 |x| (QREFELT |$| 16)) (QREFELT |$| 17))) - -(DEFUN |LNAGG-;concat;S2A;4| (|x| |y| |$|) (SPADCALL (SPADCALL 1 |x| (QREFELT |$| 16)) |y| (QREFELT |$| 17))) - -(DEFUN |LNAGG-;insert;SAIA;5| (|x| |a| |i| |$|) (SPADCALL (SPADCALL 1 |x| (QREFELT |$| 16)) |a| |i| (QREFELT |$| 20))) - -(DEFUN |LNAGG-;maxIndex;AI;6| (|l| |$|) (|+| (|-| (SPADCALL |l| (QREFELT |$| 22)) 1) (SPADCALL |l| (QREFELT |$| 9)))) - -(DEFUN |LinearAggregate&| (|#1| |#2|) (PROG (|DV$1| |DV$2| |dv$| |$| |pv$|) (RETURN (PROGN (LETT |DV$1| (|devaluate| |#1|) . #1=(|LinearAggregate&|)) (LETT |DV$2| (|devaluate| |#2|) . #1#) (LETT |dv$| (LIST (QUOTE |LinearAggregate&|) |DV$1| |DV$2|) . #1#) (LETT |$| (GETREFV 25) . #1#) (QSETREFV |$| 0 |dv$|) (QSETREFV |$| 3 (LETT |pv$| (|buildPredVector| 0 0 (LIST (|HasAttribute| |#1| (QUOTE |shallowlyMutable|)))) . #1#)) (|stuffDomainSlots| |$|) (QSETREFV |$| 6 |#1|) (QSETREFV |$| 7 |#2|) (COND ((|HasAttribute| |#1| (QUOTE |finiteAggregate|)) (QSETREFV |$| 23 (CONS (|dispatchFunction| |LNAGG-;maxIndex;AI;6|) |$|)))) |$|)))) - -(MAKEPROP (QUOTE |LinearAggregate&|) (QUOTE |infovec|) (LIST (QUOTE #(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) (|Integer|) (0 . |minIndex|) (5 . |maxIndex|) (|List| 8) |LNAGG-;indices;AL;1| (|Boolean|) |LNAGG-;index?;IAB;2| (|NonNegativeInteger|) (10 . |new|) (16 . |concat|) |LNAGG-;concat;ASA;3| |LNAGG-;concat;S2A;4| (22 . |insert|) |LNAGG-;insert;SAIA;5| (29 . |#|) (34 . |maxIndex|) (|List| |$|))) (QUOTE #(|maxIndex| 39 |insert| 44 |indices| 51 |index?| 56 |concat| 62)) (QUOTE NIL) (CONS (|makeByteWordVec2| 1 (QUOTE NIL)) (CONS (QUOTE #()) (CONS (QUOTE #()) (|makeByteWordVec2| 23 (QUOTE (1 6 8 0 9 1 6 8 0 10 2 6 0 15 7 16 2 6 0 0 0 17 3 6 0 0 0 8 20 1 6 15 0 22 1 0 8 0 23 1 0 8 0 23 3 0 0 7 0 8 21 1 0 11 0 12 2 0 13 8 0 14 2 0 0 0 7 18 2 0 0 7 0 19)))))) (QUOTE |lookupComplete|))) +(/VERSIONCHECK 2) + +(DEFUN |LNAGG-;indices;AL;1| (|a| $) + (PROG (#0=#:G1404 |i| #1=#:G1405) + (RETURN + (SEQ (PROGN + (LETT #0# NIL |LNAGG-;indices;AL;1|) + (SEQ (LETT |i| (SPADCALL |a| (QREFELT $ 9)) + |LNAGG-;indices;AL;1|) + (LETT #1# (SPADCALL |a| (QREFELT $ 10)) + |LNAGG-;indices;AL;1|) + G190 (COND ((> |i| #1#) (GO G191))) + (SEQ (EXIT (LETT #0# (CONS |i| #0#) + |LNAGG-;indices;AL;1|))) + (LETT |i| (+ |i| 1) |LNAGG-;indices;AL;1|) (GO G190) + G191 (EXIT (NREVERSE0 #0#)))))))) + +(DEFUN |LNAGG-;index?;IAB;2| (|i| |a| $) + (COND + ((< |i| (SPADCALL |a| (QREFELT $ 9))) 'NIL) + ('T + (SPADCALL (< (SPADCALL |a| (QREFELT $ 10)) |i|) (QREFELT $ 14))))) + +(DEFUN |LNAGG-;concat;ASA;3| (|a| |x| $) + (SPADCALL |a| (SPADCALL 1 |x| (QREFELT $ 17)) (QREFELT $ 18))) + +(DEFUN |LNAGG-;concat;S2A;4| (|x| |y| $) + (SPADCALL (SPADCALL 1 |x| (QREFELT $ 17)) |y| (QREFELT $ 18))) + +(DEFUN |LNAGG-;insert;SAIA;5| (|x| |a| |i| $) + (SPADCALL (SPADCALL 1 |x| (QREFELT $ 17)) |a| |i| (QREFELT $ 21))) + +(DEFUN |LNAGG-;maxIndex;AI;6| (|l| $) + (+ (- (SPADCALL |l| (QREFELT $ 23)) 1) (SPADCALL |l| (QREFELT $ 9)))) + +(DEFUN |LinearAggregate&| (|#1| |#2|) + (PROG (|dv$1| |dv$2| |dv$| $ |pv$|) + (RETURN + (PROGN + (LETT |dv$1| (|devaluate| |#1|) . #0=(|LinearAggregate&|)) + (LETT |dv$2| (|devaluate| |#2|) . #0#) + (LETT |dv$| (LIST '|LinearAggregate&| |dv$1| |dv$2|) . #0#) + (LETT $ (GETREFV 26) . #0#) + (QSETREFV $ 0 |dv$|) + (QSETREFV $ 3 + (LETT |pv$| + (|buildPredVector| 0 0 + (LIST (|HasAttribute| |#1| '|shallowlyMutable|))) . #0#)) + (|stuffDomainSlots| $) + (QSETREFV $ 6 |#1|) + (QSETREFV $ 7 |#2|) + (COND + ((|HasAttribute| |#1| '|finiteAggregate|) + (QSETREFV $ 24 + (CONS (|dispatchFunction| |LNAGG-;maxIndex;AI;6|) $)))) + $)))) + +(MAKEPROP '|LinearAggregate&| '|infovec| + (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) + (|Integer|) (0 . |minIndex|) (5 . |maxIndex|) (|List| 8) + |LNAGG-;indices;AL;1| (|Boolean|) (10 . |not|) + |LNAGG-;index?;IAB;2| (|NonNegativeInteger|) (15 . |new|) + (21 . |concat|) |LNAGG-;concat;ASA;3| + |LNAGG-;concat;S2A;4| (27 . |insert|) + |LNAGG-;insert;SAIA;5| (34 . |#|) (39 . |maxIndex|) + (|List| $)) + '#(|maxIndex| 44 |insert| 49 |indices| 56 |index?| 61 + |concat| 67) + 'NIL + (CONS (|makeByteWordVec2| 1 'NIL) + (CONS '#() + (CONS '#() + (|makeByteWordVec2| 24 + '(1 6 8 0 9 1 6 8 0 10 1 13 0 0 14 2 6 + 0 16 7 17 2 6 0 0 0 18 3 6 0 0 0 8 21 + 1 6 16 0 23 1 0 8 0 24 1 0 8 0 24 3 0 + 0 7 0 8 22 1 0 11 0 12 2 0 13 8 0 15 + 2 0 0 0 7 19 2 0 0 7 0 20))))) + '|lookupComplete|)) @ \section{category FLAGG FiniteLinearAggregate} <<category FLAGG FiniteLinearAggregate>>= @@ -2878,15 +4711,43 @@ Note that this code is not included in the generated catdef.spad file. <<LSAGG.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(SETQ |ListAggregate;CAT| (QUOTE NIL)) - -(SETQ |ListAggregate;AL| (QUOTE NIL)) - -(DEFUN |ListAggregate| (#1=#:G87500) (LET (#2=#:G87501) (COND ((SETQ #2# (|assoc| (|devaluate| #1#) |ListAggregate;AL|)) (CDR #2#)) (T (SETQ |ListAggregate;AL| (|cons5| (CONS (|devaluate| #1#) (SETQ #2# (|ListAggregate;| #1#))) |ListAggregate;AL|)) #2#)))) - -(DEFUN |ListAggregate;| (|t#1|) (PROG (#1=#:G87499) (RETURN (PROG1 (LETT #1# (|sublisV| (PAIR (QUOTE (|t#1|)) (LIST (|devaluate| |t#1|))) (COND (|ListAggregate;CAT|) ((QUOTE T) (LETT |ListAggregate;CAT| (|Join| (|StreamAggregate| (QUOTE |t#1|)) (|FiniteLinearAggregate| (QUOTE |t#1|)) (|ExtensibleLinearAggregate| (QUOTE |t#1|)) (|mkCategory| (QUOTE |domain|) (QUOTE (((|list| (|$| |t#1|)) T))) NIL (QUOTE NIL) NIL)) . #2=(|ListAggregate|))))) . #2#) (SETELT #1# 0 (LIST (QUOTE |ListAggregate|) (|devaluate| |t#1|))))))) +(/VERSIONCHECK 2) + +(DEFPARAMETER |ListAggregate;CAT| 'NIL) + +(DEFPARAMETER |ListAggregate;AL| 'NIL) + +(DEFUN |ListAggregate| (#0=#:G1431) + (LET (#1=#:G1432) + (COND + ((SETQ #1# (|assoc| (|devaluate| #0#) |ListAggregate;AL|)) + (CDR #1#)) + (T (SETQ |ListAggregate;AL| + (|cons5| (CONS (|devaluate| #0#) + (SETQ #1# (|ListAggregate;| #0#))) + |ListAggregate;AL|)) + #1#)))) + +(DEFUN |ListAggregate;| (|t#1|) + (PROG (#0=#:G1430) + (RETURN + (PROG1 (LETT #0# + (|sublisV| + (PAIR '(|t#1|) (LIST (|devaluate| |t#1|))) + (COND + (|ListAggregate;CAT|) + ('T + (LETT |ListAggregate;CAT| + (|Join| (|StreamAggregate| '|t#1|) + (|FiniteLinearAggregate| + '|t#1|) + (|ExtensibleLinearAggregate| + '|t#1|) + (|mkCategory| '|domain| + '(((|list| ($ |t#1|)) T)) NIL + 'NIL NIL)) + . #1=(|ListAggregate|))))) . #1#) + (SETELT #0# 0 (LIST '|ListAggregate| (|devaluate| |t#1|))))))) @ \section{LSAGG-.lsp BOOTSTRAP} {\bf LSAGG-} depends on {\bf LSAGG}. We need to break this cycle to build @@ -2899,63 +4760,799 @@ Note that this code is not included in the generated catdef.spad file. <<LSAGG-.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(DEFUN |LSAGG-;sort!;M2A;1| (|f| |l| |$|) (|LSAGG-;mergeSort| |f| |l| (SPADCALL |l| (QREFELT |$| 9)) |$|)) - -(DEFUN |LSAGG-;list;SA;2| (|x| |$|) (SPADCALL |x| (SPADCALL (QREFELT |$| 12)) (QREFELT |$| 13))) - -(DEFUN |LSAGG-;reduce;MAS;3| (|f| |x| |$|) (COND ((SPADCALL |x| (QREFELT |$| 16)) (|error| "reducing over an empty list needs the 3 argument form")) ((QUOTE T) (SPADCALL |f| (SPADCALL |x| (QREFELT |$| 17)) (SPADCALL |x| (QREFELT |$| 18)) (QREFELT |$| 20))))) - -(DEFUN |LSAGG-;merge;M3A;4| (|f| |p| |q| |$|) (SPADCALL |f| (SPADCALL |p| (QREFELT |$| 22)) (SPADCALL |q| (QREFELT |$| 22)) (QREFELT |$| 23))) - -(DEFUN |LSAGG-;select!;M2A;5| (|f| |x| |$|) (PROG (|y| |z|) (RETURN (SEQ (SEQ G190 (COND ((NULL (COND ((OR (SPADCALL |x| (QREFELT |$| 16)) (SPADCALL (SPADCALL |x| (QREFELT |$| 18)) |f|)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (EXIT (LETT |x| (SPADCALL |x| (QREFELT |$| 17)) |LSAGG-;select!;M2A;5|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (COND ((SPADCALL |x| (QREFELT |$| 16)) |x|) ((QUOTE T) (SEQ (LETT |y| |x| |LSAGG-;select!;M2A;5|) (LETT |z| (SPADCALL |y| (QREFELT |$| 17)) |LSAGG-;select!;M2A;5|) (SEQ G190 (COND ((NULL (COND ((SPADCALL |z| (QREFELT |$| 16)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (EXIT (COND ((SPADCALL (SPADCALL |z| (QREFELT |$| 18)) |f|) (SEQ (LETT |y| |z| |LSAGG-;select!;M2A;5|) (EXIT (LETT |z| (SPADCALL |z| (QREFELT |$| 17)) |LSAGG-;select!;M2A;5|)))) ((QUOTE T) (SEQ (LETT |z| (SPADCALL |z| (QREFELT |$| 17)) |LSAGG-;select!;M2A;5|) (EXIT (SPADCALL |y| |z| (QREFELT |$| 25)))))))) NIL (GO G190) G191 (EXIT NIL)) (EXIT |x|))))))))) - -(DEFUN |LSAGG-;merge!;M3A;6| (|f| |p| |q| |$|) (PROG (|r| |t|) (RETURN (SEQ (COND ((SPADCALL |p| (QREFELT |$| 16)) |q|) ((SPADCALL |q| (QREFELT |$| 16)) |p|) ((SPADCALL |p| |q| (QREFELT |$| 28)) (|error| "cannot merge a list into itself")) ((QUOTE T) (SEQ (COND ((SPADCALL (SPADCALL |p| (QREFELT |$| 18)) (SPADCALL |q| (QREFELT |$| 18)) |f|) (SEQ (LETT |r| (LETT |t| |p| |LSAGG-;merge!;M3A;6|) |LSAGG-;merge!;M3A;6|) (EXIT (LETT |p| (SPADCALL |p| (QREFELT |$| 17)) |LSAGG-;merge!;M3A;6|)))) ((QUOTE T) (SEQ (LETT |r| (LETT |t| |q| |LSAGG-;merge!;M3A;6|) |LSAGG-;merge!;M3A;6|) (EXIT (LETT |q| (SPADCALL |q| (QREFELT |$| 17)) |LSAGG-;merge!;M3A;6|))))) (SEQ G190 (COND ((NULL (COND ((OR (SPADCALL |p| (QREFELT |$| 16)) (SPADCALL |q| (QREFELT |$| 16))) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (EXIT (COND ((SPADCALL (SPADCALL |p| (QREFELT |$| 18)) (SPADCALL |q| (QREFELT |$| 18)) |f|) (SEQ (SPADCALL |t| |p| (QREFELT |$| 25)) (LETT |t| |p| |LSAGG-;merge!;M3A;6|) (EXIT (LETT |p| (SPADCALL |p| (QREFELT |$| 17)) |LSAGG-;merge!;M3A;6|)))) ((QUOTE T) (SEQ (SPADCALL |t| |q| (QREFELT |$| 25)) (LETT |t| |q| |LSAGG-;merge!;M3A;6|) (EXIT (LETT |q| (SPADCALL |q| (QREFELT |$| 17)) |LSAGG-;merge!;M3A;6|))))))) NIL (GO G190) G191 (EXIT NIL)) (SPADCALL |t| (COND ((SPADCALL |p| (QREFELT |$| 16)) |q|) ((QUOTE T) |p|)) (QREFELT |$| 25)) (EXIT |r|)))))))) - -(DEFUN |LSAGG-;insert!;SAIA;7| (|s| |x| |i| |$|) (PROG (|m| #1=#:G87547 |y| |z|) (RETURN (SEQ (LETT |m| (SPADCALL |x| (QREFELT |$| 31)) |LSAGG-;insert!;SAIA;7|) (EXIT (COND ((|<| |i| |m|) (|error| "index out of range")) ((EQL |i| |m|) (SPADCALL |s| |x| (QREFELT |$| 13))) ((QUOTE T) (SEQ (LETT |y| (SPADCALL |x| (PROG1 (LETT #1# (|-| (|-| |i| 1) |m|) |LSAGG-;insert!;SAIA;7|) (|check-subtype| (|>=| #1# 0) (QUOTE (|NonNegativeInteger|)) #1#)) (QREFELT |$| 32)) |LSAGG-;insert!;SAIA;7|) (LETT |z| (SPADCALL |y| (QREFELT |$| 17)) |LSAGG-;insert!;SAIA;7|) (SPADCALL |y| (SPADCALL |s| |z| (QREFELT |$| 13)) (QREFELT |$| 25)) (EXIT |x|))))))))) - -(DEFUN |LSAGG-;insert!;2AIA;8| (|w| |x| |i| |$|) (PROG (|m| #1=#:G87551 |y| |z|) (RETURN (SEQ (LETT |m| (SPADCALL |x| (QREFELT |$| 31)) |LSAGG-;insert!;2AIA;8|) (EXIT (COND ((|<| |i| |m|) (|error| "index out of range")) ((EQL |i| |m|) (SPADCALL |w| |x| (QREFELT |$| 34))) ((QUOTE T) (SEQ (LETT |y| (SPADCALL |x| (PROG1 (LETT #1# (|-| (|-| |i| 1) |m|) |LSAGG-;insert!;2AIA;8|) (|check-subtype| (|>=| #1# 0) (QUOTE (|NonNegativeInteger|)) #1#)) (QREFELT |$| 32)) |LSAGG-;insert!;2AIA;8|) (LETT |z| (SPADCALL |y| (QREFELT |$| 17)) |LSAGG-;insert!;2AIA;8|) (SPADCALL |y| |w| (QREFELT |$| 25)) (SPADCALL |y| |z| (QREFELT |$| 34)) (EXIT |x|))))))))) - -(DEFUN |LSAGG-;remove!;M2A;9| (|f| |x| |$|) (PROG (|p| |q|) (RETURN (SEQ (SEQ G190 (COND ((NULL (COND ((SPADCALL |x| (QREFELT |$| 16)) (QUOTE NIL)) ((QUOTE T) (SPADCALL (SPADCALL |x| (QREFELT |$| 18)) |f|)))) (GO G191))) (SEQ (EXIT (LETT |x| (SPADCALL |x| (QREFELT |$| 17)) |LSAGG-;remove!;M2A;9|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (COND ((SPADCALL |x| (QREFELT |$| 16)) |x|) ((QUOTE T) (SEQ (LETT |p| |x| |LSAGG-;remove!;M2A;9|) (LETT |q| (SPADCALL |x| (QREFELT |$| 17)) |LSAGG-;remove!;M2A;9|) (SEQ G190 (COND ((NULL (COND ((SPADCALL |q| (QREFELT |$| 16)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (EXIT (COND ((SPADCALL (SPADCALL |q| (QREFELT |$| 18)) |f|) (LETT |q| (SPADCALL |p| (SPADCALL |q| (QREFELT |$| 17)) (QREFELT |$| 25)) |LSAGG-;remove!;M2A;9|)) ((QUOTE T) (SEQ (LETT |p| |q| |LSAGG-;remove!;M2A;9|) (EXIT (LETT |q| (SPADCALL |q| (QREFELT |$| 17)) |LSAGG-;remove!;M2A;9|))))))) NIL (GO G190) G191 (EXIT NIL)) (EXIT |x|))))))))) - -(DEFUN |LSAGG-;delete!;AIA;10| (|x| |i| |$|) (PROG (|m| #1=#:G87564 |y|) (RETURN (SEQ (LETT |m| (SPADCALL |x| (QREFELT |$| 31)) |LSAGG-;delete!;AIA;10|) (EXIT (COND ((|<| |i| |m|) (|error| "index out of range")) ((EQL |i| |m|) (SPADCALL |x| (QREFELT |$| 17))) ((QUOTE T) (SEQ (LETT |y| (SPADCALL |x| (PROG1 (LETT #1# (|-| (|-| |i| 1) |m|) |LSAGG-;delete!;AIA;10|) (|check-subtype| (|>=| #1# 0) (QUOTE (|NonNegativeInteger|)) #1#)) (QREFELT |$| 32)) |LSAGG-;delete!;AIA;10|) (SPADCALL |y| (SPADCALL |y| 2 (QREFELT |$| 32)) (QREFELT |$| 25)) (EXIT |x|))))))))) - -(DEFUN |LSAGG-;delete!;AUsA;11| (|x| |i| |$|) (PROG (|l| |m| |h| #1=#:G87569 #2=#:G87570 |t| #3=#:G87571) (RETURN (SEQ (LETT |l| (SPADCALL |i| (QREFELT |$| 39)) |LSAGG-;delete!;AUsA;11|) (LETT |m| (SPADCALL |x| (QREFELT |$| 31)) |LSAGG-;delete!;AUsA;11|) (EXIT (COND ((|<| |l| |m|) (|error| "index out of range")) ((QUOTE T) (SEQ (LETT |h| (COND ((SPADCALL |i| (QREFELT |$| 40)) (SPADCALL |i| (QREFELT |$| 41))) ((QUOTE T) (SPADCALL |x| (QREFELT |$| 42)))) |LSAGG-;delete!;AUsA;11|) (EXIT (COND ((|<| |h| |l|) |x|) ((EQL |l| |m|) (SPADCALL |x| (PROG1 (LETT #1# (|-| (|+| |h| 1) |m|) |LSAGG-;delete!;AUsA;11|) (|check-subtype| (|>=| #1# 0) (QUOTE (|NonNegativeInteger|)) #1#)) (QREFELT |$| 32))) ((QUOTE T) (SEQ (LETT |t| (SPADCALL |x| (PROG1 (LETT #2# (|-| (|-| |l| 1) |m|) |LSAGG-;delete!;AUsA;11|) (|check-subtype| (|>=| #2# 0) (QUOTE (|NonNegativeInteger|)) #2#)) (QREFELT |$| 32)) |LSAGG-;delete!;AUsA;11|) (SPADCALL |t| (SPADCALL |t| (PROG1 (LETT #3# (|+| (|-| |h| |l|) 2) |LSAGG-;delete!;AUsA;11|) (|check-subtype| (|>=| #3# 0) (QUOTE (|NonNegativeInteger|)) #3#)) (QREFELT |$| 32)) (QREFELT |$| 25)) (EXIT |x|))))))))))))) - -(DEFUN |LSAGG-;find;MAU;12| (|f| |x| |$|) (SEQ (SEQ G190 (COND ((NULL (COND ((OR (SPADCALL |x| (QREFELT |$| 16)) (SPADCALL (SPADCALL |x| (QREFELT |$| 18)) |f|)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (EXIT (LETT |x| (SPADCALL |x| (QREFELT |$| 17)) |LSAGG-;find;MAU;12|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (COND ((SPADCALL |x| (QREFELT |$| 16)) (CONS 1 "failed")) ((QUOTE T) (CONS 0 (SPADCALL |x| (QREFELT |$| 18)))))))) - -(DEFUN |LSAGG-;position;MAI;13| (|f| |x| |$|) (PROG (|k|) (RETURN (SEQ (SEQ (LETT |k| (SPADCALL |x| (QREFELT |$| 31)) |LSAGG-;position;MAI;13|) G190 (COND ((NULL (COND ((OR (SPADCALL |x| (QREFELT |$| 16)) (SPADCALL (SPADCALL |x| (QREFELT |$| 18)) |f|)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (EXIT (LETT |x| (SPADCALL |x| (QREFELT |$| 17)) |LSAGG-;position;MAI;13|))) (LETT |k| (|+| |k| 1) |LSAGG-;position;MAI;13|) (GO G190) G191 (EXIT NIL)) (EXIT (COND ((SPADCALL |x| (QREFELT |$| 16)) (|-| (SPADCALL |x| (QREFELT |$| 31)) 1)) ((QUOTE T) |k|))))))) - -(DEFUN |LSAGG-;mergeSort| (|f| |p| |n| |$|) (PROG (#1=#:G87593 |l| |q|) (RETURN (SEQ (COND ((EQL |n| 2) (COND ((SPADCALL (SPADCALL (SPADCALL |p| (QREFELT |$| 17)) (QREFELT |$| 18)) (SPADCALL |p| (QREFELT |$| 18)) |f|) (LETT |p| (SPADCALL |p| (QREFELT |$| 47)) |LSAGG-;mergeSort|))))) (EXIT (COND ((|<| |n| 3) |p|) ((QUOTE T) (SEQ (LETT |l| (PROG1 (LETT #1# (QUOTIENT2 |n| 2) |LSAGG-;mergeSort|) (|check-subtype| (|>=| #1# 0) (QUOTE (|NonNegativeInteger|)) #1#)) |LSAGG-;mergeSort|) (LETT |q| (SPADCALL |p| |l| (QREFELT |$| 48)) |LSAGG-;mergeSort|) (LETT |p| (|LSAGG-;mergeSort| |f| |p| |l| |$|) |LSAGG-;mergeSort|) (LETT |q| (|LSAGG-;mergeSort| |f| |q| (|-| |n| |l|) |$|) |LSAGG-;mergeSort|) (EXIT (SPADCALL |f| |p| |q| (QREFELT |$| 23))))))))))) - -(DEFUN |LSAGG-;sorted?;MAB;15| (|f| |l| |$|) (PROG (#1=#:G87603 |p|) (RETURN (SEQ (EXIT (COND ((SPADCALL |l| (QREFELT |$| 16)) (QUOTE T)) ((QUOTE T) (SEQ (LETT |p| (SPADCALL |l| (QREFELT |$| 17)) |LSAGG-;sorted?;MAB;15|) (SEQ G190 (COND ((NULL (COND ((SPADCALL |p| (QREFELT |$| 16)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (EXIT (COND ((NULL (SPADCALL (SPADCALL |l| (QREFELT |$| 18)) (SPADCALL |p| (QREFELT |$| 18)) |f|)) (PROGN (LETT #1# (QUOTE NIL) |LSAGG-;sorted?;MAB;15|) (GO #1#))) ((QUOTE T) (LETT |p| (SPADCALL (LETT |l| |p| |LSAGG-;sorted?;MAB;15|) (QREFELT |$| 17)) |LSAGG-;sorted?;MAB;15|))))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (QUOTE T)))))) #1# (EXIT #1#))))) - -(DEFUN |LSAGG-;reduce;MA2S;16| (|f| |x| |i| |$|) (PROG (|r|) (RETURN (SEQ (LETT |r| |i| |LSAGG-;reduce;MA2S;16|) (SEQ G190 (COND ((NULL (COND ((SPADCALL |x| (QREFELT |$| 16)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (LETT |r| (SPADCALL |r| (SPADCALL |x| (QREFELT |$| 18)) |f|) |LSAGG-;reduce;MA2S;16|) (EXIT (LETT |x| (SPADCALL |x| (QREFELT |$| 17)) |LSAGG-;reduce;MA2S;16|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT |r|))))) - -(DEFUN |LSAGG-;reduce;MA3S;17| (|f| |x| |i| |a| |$|) (PROG (|r|) (RETURN (SEQ (LETT |r| |i| |LSAGG-;reduce;MA3S;17|) (SEQ G190 (COND ((NULL (COND ((OR (SPADCALL |x| (QREFELT |$| 16)) (SPADCALL |r| |a| (QREFELT |$| 51))) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (LETT |r| (SPADCALL |r| (SPADCALL |x| (QREFELT |$| 18)) |f|) |LSAGG-;reduce;MA3S;17|) (EXIT (LETT |x| (SPADCALL |x| (QREFELT |$| 17)) |LSAGG-;reduce;MA3S;17|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT |r|))))) - -(DEFUN |LSAGG-;new;NniSA;18| (|n| |s| |$|) (PROG (|k| |l|) (RETURN (SEQ (LETT |l| (SPADCALL (QREFELT |$| 12)) |LSAGG-;new;NniSA;18|) (SEQ (LETT |k| 1 |LSAGG-;new;NniSA;18|) G190 (COND ((QSGREATERP |k| |n|) (GO G191))) (SEQ (EXIT (LETT |l| (SPADCALL |s| |l| (QREFELT |$| 13)) |LSAGG-;new;NniSA;18|))) (LETT |k| (QSADD1 |k|) |LSAGG-;new;NniSA;18|) (GO G190) G191 (EXIT NIL)) (EXIT |l|))))) - -(DEFUN |LSAGG-;map;M3A;19| (|f| |x| |y| |$|) (PROG (|z|) (RETURN (SEQ (LETT |z| (SPADCALL (QREFELT |$| 12)) |LSAGG-;map;M3A;19|) (SEQ G190 (COND ((NULL (COND ((OR (SPADCALL |x| (QREFELT |$| 16)) (SPADCALL |y| (QREFELT |$| 16))) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (LETT |z| (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT |$| 18)) (SPADCALL |y| (QREFELT |$| 18)) |f|) |z| (QREFELT |$| 13)) |LSAGG-;map;M3A;19|) (LETT |x| (SPADCALL |x| (QREFELT |$| 17)) |LSAGG-;map;M3A;19|) (EXIT (LETT |y| (SPADCALL |y| (QREFELT |$| 17)) |LSAGG-;map;M3A;19|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (SPADCALL |z| (QREFELT |$| 47))))))) - -(DEFUN |LSAGG-;reverse!;2A;20| (|x| |$|) (PROG (|z| |y|) (RETURN (SEQ (COND ((OR (SPADCALL |x| (QREFELT |$| 16)) (SPADCALL (LETT |y| (SPADCALL |x| (QREFELT |$| 17)) |LSAGG-;reverse!;2A;20|) (QREFELT |$| 16))) |x|) ((QUOTE T) (SEQ (SPADCALL |x| (SPADCALL (QREFELT |$| 12)) (QREFELT |$| 25)) (SEQ G190 (COND ((NULL (COND ((SPADCALL |y| (QREFELT |$| 16)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (LETT |z| (SPADCALL |y| (QREFELT |$| 17)) |LSAGG-;reverse!;2A;20|) (SPADCALL |y| |x| (QREFELT |$| 25)) (LETT |x| |y| |LSAGG-;reverse!;2A;20|) (EXIT (LETT |y| |z| |LSAGG-;reverse!;2A;20|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT |x|)))))))) - -(DEFUN |LSAGG-;copy;2A;21| (|x| |$|) (PROG (|k| |y|) (RETURN (SEQ (LETT |y| (SPADCALL (QREFELT |$| 12)) |LSAGG-;copy;2A;21|) (SEQ (LETT |k| 0 |LSAGG-;copy;2A;21|) G190 (COND ((NULL (COND ((SPADCALL |x| (QREFELT |$| 16)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (COND ((EQL |k| 1000) (COND ((SPADCALL |x| (QREFELT |$| 56)) (EXIT (|error| "cyclic list")))))) (LETT |y| (SPADCALL (SPADCALL |x| (QREFELT |$| 18)) |y| (QREFELT |$| 13)) |LSAGG-;copy;2A;21|) (EXIT (LETT |x| (SPADCALL |x| (QREFELT |$| 17)) |LSAGG-;copy;2A;21|))) (LETT |k| (QSADD1 |k|) |LSAGG-;copy;2A;21|) (GO G190) G191 (EXIT NIL)) (EXIT (SPADCALL |y| (QREFELT |$| 47))))))) - -(DEFUN |LSAGG-;copyInto!;2AIA;22| (|y| |x| |s| |$|) (PROG (|m| #1=#:G87636 |z|) (RETURN (SEQ (LETT |m| (SPADCALL |y| (QREFELT |$| 31)) |LSAGG-;copyInto!;2AIA;22|) (EXIT (COND ((|<| |s| |m|) (|error| "index out of range")) ((QUOTE T) (SEQ (LETT |z| (SPADCALL |y| (PROG1 (LETT #1# (|-| |s| |m|) |LSAGG-;copyInto!;2AIA;22|) (|check-subtype| (|>=| #1# 0) (QUOTE (|NonNegativeInteger|)) #1#)) (QREFELT |$| 32)) |LSAGG-;copyInto!;2AIA;22|) (SEQ G190 (COND ((NULL (COND ((OR (SPADCALL |z| (QREFELT |$| 16)) (SPADCALL |x| (QREFELT |$| 16))) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (SPADCALL |z| (SPADCALL |x| (QREFELT |$| 18)) (QREFELT |$| 58)) (LETT |x| (SPADCALL |x| (QREFELT |$| 17)) |LSAGG-;copyInto!;2AIA;22|) (EXIT (LETT |z| (SPADCALL |z| (QREFELT |$| 17)) |LSAGG-;copyInto!;2AIA;22|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT |y|))))))))) - -(DEFUN |LSAGG-;position;SA2I;23| (|w| |x| |s| |$|) (PROG (|m| #1=#:G87644 |k|) (RETURN (SEQ (LETT |m| (SPADCALL |x| (QREFELT |$| 31)) |LSAGG-;position;SA2I;23|) (EXIT (COND ((|<| |s| |m|) (|error| "index out of range")) ((QUOTE T) (SEQ (LETT |x| (SPADCALL |x| (PROG1 (LETT #1# (|-| |s| |m|) |LSAGG-;position;SA2I;23|) (|check-subtype| (|>=| #1# 0) (QUOTE (|NonNegativeInteger|)) #1#)) (QREFELT |$| 32)) |LSAGG-;position;SA2I;23|) (SEQ (LETT |k| |s| |LSAGG-;position;SA2I;23|) G190 (COND ((NULL (COND ((OR (SPADCALL |x| (QREFELT |$| 16)) (SPADCALL |w| (SPADCALL |x| (QREFELT |$| 18)) (QREFELT |$| 51))) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (EXIT (LETT |x| (SPADCALL |x| (QREFELT |$| 17)) |LSAGG-;position;SA2I;23|))) (LETT |k| (|+| |k| 1) |LSAGG-;position;SA2I;23|) (GO G190) G191 (EXIT NIL)) (EXIT (COND ((SPADCALL |x| (QREFELT |$| 16)) (|-| (SPADCALL |x| (QREFELT |$| 31)) 1)) ((QUOTE T) |k|))))))))))) - -(DEFUN |LSAGG-;removeDuplicates!;2A;24| (|l| |$|) (PROG (|p|) (RETURN (SEQ (LETT |p| |l| |LSAGG-;removeDuplicates!;2A;24|) (SEQ G190 (COND ((NULL (COND ((SPADCALL |p| (QREFELT |$| 16)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (EXIT (LETT |p| (SPADCALL |p| (SPADCALL (CONS (FUNCTION |LSAGG-;removeDuplicates!;2A;24!0|) (VECTOR |$| |p|)) (SPADCALL |p| (QREFELT |$| 17)) (QREFELT |$| 61)) (QREFELT |$| 25)) |LSAGG-;removeDuplicates!;2A;24|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT |l|))))) - -(DEFUN |LSAGG-;removeDuplicates!;2A;24!0| (|#1| |$$|) (PROG (|$|) (LETT |$| (QREFELT |$$| 0) |LSAGG-;removeDuplicates!;2A;24|) (RETURN (PROGN (SPADCALL |#1| (SPADCALL (QREFELT |$$| 1) (QREFELT |$| 18)) (QREFELT |$| 51)))))) - -(DEFUN |LSAGG-;<;2AB;25| (|x| |y| |$|) (PROG (#1=#:G87662) (RETURN (SEQ (EXIT (SEQ (SEQ G190 (COND ((NULL (COND ((OR (SPADCALL |x| (QREFELT |$| 16)) (SPADCALL |y| (QREFELT |$| 16))) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (EXIT (COND ((NULL (SPADCALL (SPADCALL |x| (QREFELT |$| 18)) (SPADCALL |y| (QREFELT |$| 18)) (QREFELT |$| 51))) (PROGN (LETT #1# (SPADCALL (SPADCALL |x| (QREFELT |$| 18)) (SPADCALL |y| (QREFELT |$| 18)) (QREFELT |$| 63)) |LSAGG-;<;2AB;25|) (GO #1#))) ((QUOTE T) (SEQ (LETT |x| (SPADCALL |x| (QREFELT |$| 17)) |LSAGG-;<;2AB;25|) (EXIT (LETT |y| (SPADCALL |y| (QREFELT |$| 17)) |LSAGG-;<;2AB;25|))))))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (COND ((SPADCALL |x| (QREFELT |$| 16)) (COND ((SPADCALL |y| (QREFELT |$| 16)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) ((QUOTE T) (QUOTE NIL)))))) #1# (EXIT #1#))))) - -(DEFUN |ListAggregate&| (|#1| |#2|) (PROG (|DV$1| |DV$2| |dv$| |$| |pv$|) (RETURN (PROGN (LETT |DV$1| (|devaluate| |#1|) . #1=(|ListAggregate&|)) (LETT |DV$2| (|devaluate| |#2|) . #1#) (LETT |dv$| (LIST (QUOTE |ListAggregate&|) |DV$1| |DV$2|) . #1#) (LETT |$| (GETREFV 66) . #1#) (QSETREFV |$| 0 |dv$|) (QSETREFV |$| 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#)) (|stuffDomainSlots| |$|) (QSETREFV |$| 6 |#1|) (QSETREFV |$| 7 |#2|) (COND ((|HasCategory| |#2| (QUOTE (|SetCategory|))) (QSETREFV |$| 52 (CONS (|dispatchFunction| |LSAGG-;reduce;MA3S;17|) |$|)))) (COND ((|HasCategory| |#2| (QUOTE (|SetCategory|))) (PROGN (QSETREFV |$| 60 (CONS (|dispatchFunction| |LSAGG-;position;SA2I;23|) |$|)) (QSETREFV |$| 62 (CONS (|dispatchFunction| |LSAGG-;removeDuplicates!;2A;24|) |$|))))) (COND ((|HasCategory| |#2| (QUOTE (|OrderedSet|))) (QSETREFV |$| 64 (CONS (|dispatchFunction| |LSAGG-;<;2AB;25|) |$|)))) |$|)))) - -(MAKEPROP (QUOTE |ListAggregate&|) (QUOTE |infovec|) (LIST (QUOTE #(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) (|NonNegativeInteger|) (0 . |#|) (|Mapping| 15 7 7) |LSAGG-;sort!;M2A;1| (5 . |empty|) (9 . |concat|) |LSAGG-;list;SA;2| (|Boolean|) (15 . |empty?|) (20 . |rest|) (25 . |first|) (|Mapping| 7 7 7) (30 . |reduce|) |LSAGG-;reduce;MAS;3| (37 . |copy|) (42 . |merge!|) |LSAGG-;merge;M3A;4| (49 . |setrest!|) (|Mapping| 15 7) |LSAGG-;select!;M2A;5| (55 . |eq?|) |LSAGG-;merge!;M3A;6| (|Integer|) (61 . |minIndex|) (66 . |rest|) |LSAGG-;insert!;SAIA;7| (72 . |concat!|) |LSAGG-;insert!;2AIA;8| |LSAGG-;remove!;M2A;9| |LSAGG-;delete!;AIA;10| (|UniversalSegment| 30) (78 . |lo|) (83 . |hasHi|) (88 . |hi|) (93 . |maxIndex|) |LSAGG-;delete!;AUsA;11| (|Union| 7 (QUOTE "failed")) |LSAGG-;find;MAU;12| |LSAGG-;position;MAI;13| (98 . |reverse!|) (103 . |split!|) |LSAGG-;sorted?;MAB;15| |LSAGG-;reduce;MA2S;16| (109 . |=|) (115 . |reduce|) |LSAGG-;new;NniSA;18| |LSAGG-;map;M3A;19| |LSAGG-;reverse!;2A;20| (123 . |cyclic?|) |LSAGG-;copy;2A;21| (128 . |setfirst!|) |LSAGG-;copyInto!;2AIA;22| (134 . |position|) (141 . |remove!|) (147 . |removeDuplicates!|) (152 . |<|) (158 . |<|) (|Mapping| 7 7))) (QUOTE #(|sorted?| 164 |sort!| 170 |select!| 176 |reverse!| 182 |removeDuplicates!| 187 |remove!| 192 |reduce| 198 |position| 219 |new| 232 |merge!| 238 |merge| 245 |map| 252 |list| 259 |insert!| 264 |find| 278 |delete!| 284 |copyInto!| 296 |copy| 303 |<| 308)) (QUOTE NIL) (CONS (|makeByteWordVec2| 1 (QUOTE NIL)) (CONS (QUOTE #()) (CONS (QUOTE #()) (|makeByteWordVec2| 64 (QUOTE (1 6 8 0 9 0 6 0 12 2 6 0 7 0 13 1 6 15 0 16 1 6 0 0 17 1 6 7 0 18 3 6 7 19 0 7 20 1 6 0 0 22 3 6 0 10 0 0 23 2 6 0 0 0 25 2 6 15 0 0 28 1 6 30 0 31 2 6 0 0 8 32 2 6 0 0 0 34 1 38 30 0 39 1 38 15 0 40 1 38 30 0 41 1 6 30 0 42 1 6 0 0 47 2 6 0 0 30 48 2 7 15 0 0 51 4 0 7 19 0 7 7 52 1 6 15 0 56 2 6 7 0 7 58 3 0 30 7 0 30 60 2 6 0 26 0 61 1 0 0 0 62 2 7 15 0 0 63 2 0 15 0 0 64 2 0 15 10 0 49 2 0 0 10 0 11 2 0 0 26 0 27 1 0 0 0 55 1 0 0 0 62 2 0 0 26 0 36 3 0 7 19 0 7 50 4 0 7 19 0 7 7 52 2 0 7 19 0 21 2 0 30 26 0 46 3 0 30 7 0 30 60 2 0 0 8 7 53 3 0 0 10 0 0 29 3 0 0 10 0 0 24 3 0 0 19 0 0 54 1 0 0 7 14 3 0 0 7 0 30 33 3 0 0 0 0 30 35 2 0 44 26 0 45 2 0 0 0 38 43 2 0 0 0 30 37 3 0 0 0 0 30 59 1 0 0 0 57 2 0 15 0 0 64)))))) (QUOTE |lookupComplete|))) +(/VERSIONCHECK 2) + +(DEFUN |LSAGG-;sort!;M2A;1| (|f| |l| $) + (|LSAGG-;mergeSort| |f| |l| (SPADCALL |l| (QREFELT $ 9)) $)) + +(DEFUN |LSAGG-;list;SA;2| (|x| $) + (SPADCALL |x| (SPADCALL (QREFELT $ 12)) (QREFELT $ 13))) + +(DEFUN |LSAGG-;reduce;MAS;3| (|f| |x| $) + (COND + ((SPADCALL |x| (QREFELT $ 16)) + (|error| "reducing over an empty list needs the 3 argument form")) + ('T + (SPADCALL |f| (SPADCALL |x| (QREFELT $ 17)) + (SPADCALL |x| (QREFELT $ 18)) (QREFELT $ 20))))) + +(DEFUN |LSAGG-;merge;M3A;4| (|f| |p| |q| $) + (SPADCALL |f| (SPADCALL |p| (QREFELT $ 22)) + (SPADCALL |q| (QREFELT $ 22)) (QREFELT $ 23))) + +(DEFUN |LSAGG-;select!;M2A;5| (|f| |x| $) + (PROG (|y| |z|) + (RETURN + (SEQ (SEQ G190 + (COND + ((NULL (COND + ((SPADCALL |x| (QREFELT $ 16)) 'NIL) + ('T + (SPADCALL + (SPADCALL (SPADCALL |x| (QREFELT $ 18)) + |f|) + (QREFELT $ 25))))) + (GO G191))) + (SEQ (EXIT (LETT |x| (SPADCALL |x| (QREFELT $ 17)) + |LSAGG-;select!;M2A;5|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (COND + ((SPADCALL |x| (QREFELT $ 16)) |x|) + ('T + (SEQ (LETT |y| |x| |LSAGG-;select!;M2A;5|) + (LETT |z| (SPADCALL |y| (QREFELT $ 17)) + |LSAGG-;select!;M2A;5|) + (SEQ G190 + (COND + ((NULL (SPADCALL + (SPADCALL |z| (QREFELT $ 16)) + (QREFELT $ 25))) + (GO G191))) + (SEQ (EXIT + (COND + ((SPADCALL + (SPADCALL |z| (QREFELT $ 18)) + |f|) + (SEQ + (LETT |y| |z| + |LSAGG-;select!;M2A;5|) + (EXIT + (LETT |z| + (SPADCALL |z| (QREFELT $ 17)) + |LSAGG-;select!;M2A;5|)))) + ('T + (SEQ + (LETT |z| + (SPADCALL |z| (QREFELT $ 17)) + |LSAGG-;select!;M2A;5|) + (EXIT + (SPADCALL |y| |z| + (QREFELT $ 26)))))))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |x|))))))))) + +(DEFUN |LSAGG-;merge!;M3A;6| (|f| |p| |q| $) + (PROG (|r| |t|) + (RETURN + (SEQ (COND + ((SPADCALL |p| (QREFELT $ 16)) |q|) + ((SPADCALL |q| (QREFELT $ 16)) |p|) + ((SPADCALL |p| |q| (QREFELT $ 29)) + (|error| "cannot merge a list into itself")) + ('T + (SEQ (COND + ((SPADCALL (SPADCALL |p| (QREFELT $ 18)) + (SPADCALL |q| (QREFELT $ 18)) |f|) + (SEQ (LETT |r| + (LETT |t| |p| |LSAGG-;merge!;M3A;6|) + |LSAGG-;merge!;M3A;6|) + (EXIT (LETT |p| + (SPADCALL |p| (QREFELT $ 17)) + |LSAGG-;merge!;M3A;6|)))) + ('T + (SEQ (LETT |r| + (LETT |t| |q| |LSAGG-;merge!;M3A;6|) + |LSAGG-;merge!;M3A;6|) + (EXIT (LETT |q| + (SPADCALL |q| (QREFELT $ 17)) + |LSAGG-;merge!;M3A;6|))))) + (SEQ G190 + (COND + ((NULL (COND + ((SPADCALL |p| (QREFELT $ 16)) 'NIL) + ('T + (SPADCALL + (SPADCALL |q| (QREFELT $ 16)) + (QREFELT $ 25))))) + (GO G191))) + (SEQ (EXIT (COND + ((SPADCALL + (SPADCALL |p| (QREFELT $ 18)) + (SPADCALL |q| (QREFELT $ 18)) + |f|) + (SEQ + (SPADCALL |t| |p| + (QREFELT $ 26)) + (LETT |t| |p| + |LSAGG-;merge!;M3A;6|) + (EXIT + (LETT |p| + (SPADCALL |p| (QREFELT $ 17)) + |LSAGG-;merge!;M3A;6|)))) + ('T + (SEQ + (SPADCALL |t| |q| + (QREFELT $ 26)) + (LETT |t| |q| + |LSAGG-;merge!;M3A;6|) + (EXIT + (LETT |q| + (SPADCALL |q| (QREFELT $ 17)) + |LSAGG-;merge!;M3A;6|))))))) + NIL (GO G190) G191 (EXIT NIL)) + (SPADCALL |t| + (COND + ((SPADCALL |p| (QREFELT $ 16)) |q|) + ('T |p|)) + (QREFELT $ 26)) + (EXIT |r|)))))))) + +(DEFUN |LSAGG-;insert!;SAIA;7| (|s| |x| |i| $) + (PROG (|m| #0=#:G1464 |y| |z|) + (RETURN + (SEQ (LETT |m| (SPADCALL |x| (QREFELT $ 32)) + |LSAGG-;insert!;SAIA;7|) + (EXIT (COND + ((< |i| |m|) (|error| "index out of range")) + ((EQL |i| |m|) (SPADCALL |s| |x| (QREFELT $ 13))) + ('T + (SEQ (LETT |y| + (SPADCALL |x| + (PROG1 + (LETT #0# (- (- |i| 1) |m|) + |LSAGG-;insert!;SAIA;7|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) #0#)) + (QREFELT $ 33)) + |LSAGG-;insert!;SAIA;7|) + (LETT |z| (SPADCALL |y| (QREFELT $ 17)) + |LSAGG-;insert!;SAIA;7|) + (SPADCALL |y| + (SPADCALL |s| |z| (QREFELT $ 13)) + (QREFELT $ 26)) + (EXIT |x|))))))))) + +(DEFUN |LSAGG-;insert!;2AIA;8| (|w| |x| |i| $) + (PROG (|m| #0=#:G1468 |y| |z|) + (RETURN + (SEQ (LETT |m| (SPADCALL |x| (QREFELT $ 32)) + |LSAGG-;insert!;2AIA;8|) + (EXIT (COND + ((< |i| |m|) (|error| "index out of range")) + ((EQL |i| |m|) (SPADCALL |w| |x| (QREFELT $ 35))) + ('T + (SEQ (LETT |y| + (SPADCALL |x| + (PROG1 + (LETT #0# (- (- |i| 1) |m|) + |LSAGG-;insert!;2AIA;8|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) #0#)) + (QREFELT $ 33)) + |LSAGG-;insert!;2AIA;8|) + (LETT |z| (SPADCALL |y| (QREFELT $ 17)) + |LSAGG-;insert!;2AIA;8|) + (SPADCALL |y| |w| (QREFELT $ 26)) + (SPADCALL |y| |z| (QREFELT $ 35)) (EXIT |x|))))))))) + +(DEFUN |LSAGG-;remove!;M2A;9| (|f| |x| $) + (PROG (|p| |q|) + (RETURN + (SEQ (SEQ G190 + (COND + ((NULL (COND + ((SPADCALL |x| (QREFELT $ 16)) 'NIL) + ('T + (SPADCALL (SPADCALL |x| (QREFELT $ 18)) + |f|)))) + (GO G191))) + (SEQ (EXIT (LETT |x| (SPADCALL |x| (QREFELT $ 17)) + |LSAGG-;remove!;M2A;9|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (COND + ((SPADCALL |x| (QREFELT $ 16)) |x|) + ('T + (SEQ (LETT |p| |x| |LSAGG-;remove!;M2A;9|) + (LETT |q| (SPADCALL |x| (QREFELT $ 17)) + |LSAGG-;remove!;M2A;9|) + (SEQ G190 + (COND + ((NULL (SPADCALL + (SPADCALL |q| (QREFELT $ 16)) + (QREFELT $ 25))) + (GO G191))) + (SEQ (EXIT + (COND + ((SPADCALL + (SPADCALL |q| (QREFELT $ 18)) + |f|) + (LETT |q| + (SPADCALL |p| + (SPADCALL |q| (QREFELT $ 17)) + (QREFELT $ 26)) + |LSAGG-;remove!;M2A;9|)) + ('T + (SEQ + (LETT |p| |q| + |LSAGG-;remove!;M2A;9|) + (EXIT + (LETT |q| + (SPADCALL |q| (QREFELT $ 17)) + |LSAGG-;remove!;M2A;9|))))))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |x|))))))))) + +(DEFUN |LSAGG-;delete!;AIA;10| (|x| |i| $) + (PROG (|m| #0=#:G1480 |y|) + (RETURN + (SEQ (LETT |m| (SPADCALL |x| (QREFELT $ 32)) + |LSAGG-;delete!;AIA;10|) + (EXIT (COND + ((< |i| |m|) (|error| "index out of range")) + ((EQL |i| |m|) (SPADCALL |x| (QREFELT $ 17))) + ('T + (SEQ (LETT |y| + (SPADCALL |x| + (PROG1 + (LETT #0# (- (- |i| 1) |m|) + |LSAGG-;delete!;AIA;10|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) #0#)) + (QREFELT $ 33)) + |LSAGG-;delete!;AIA;10|) + (SPADCALL |y| (SPADCALL |y| 2 (QREFELT $ 33)) + (QREFELT $ 26)) + (EXIT |x|))))))))) + +(DEFUN |LSAGG-;delete!;AUsA;11| (|x| |i| $) + (PROG (|l| |m| |h| #0=#:G1485 #1=#:G1486 |t| #2=#:G1487) + (RETURN + (SEQ (LETT |l| (SPADCALL |i| (QREFELT $ 40)) + |LSAGG-;delete!;AUsA;11|) + (LETT |m| (SPADCALL |x| (QREFELT $ 32)) + |LSAGG-;delete!;AUsA;11|) + (EXIT (COND + ((< |l| |m|) (|error| "index out of range")) + ('T + (SEQ (LETT |h| + (COND + ((SPADCALL |i| (QREFELT $ 41)) + (SPADCALL |i| (QREFELT $ 42))) + ('T (SPADCALL |x| (QREFELT $ 43)))) + |LSAGG-;delete!;AUsA;11|) + (EXIT (COND + ((< |h| |l|) |x|) + ((EQL |l| |m|) + (SPADCALL |x| + (PROG1 + (LETT #0# (- (+ |h| 1) |m|) + |LSAGG-;delete!;AUsA;11|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) #0#)) + (QREFELT $ 33))) + ('T + (SEQ (LETT |t| + (SPADCALL |x| + (PROG1 + (LETT #1# (- (- |l| 1) |m|) + |LSAGG-;delete!;AUsA;11|) + (|check-subtype| (>= #1# 0) + '(|NonNegativeInteger|) + #1#)) + (QREFELT $ 33)) + |LSAGG-;delete!;AUsA;11|) + (SPADCALL |t| + (SPADCALL |t| + (PROG1 + (LETT #2# (+ (- |h| |l|) 2) + |LSAGG-;delete!;AUsA;11|) + (|check-subtype| (>= #2# 0) + '(|NonNegativeInteger|) + #2#)) + (QREFELT $ 33)) + (QREFELT $ 26)) + (EXIT |x|))))))))))))) + +(DEFUN |LSAGG-;find;MAU;12| (|f| |x| $) + (SEQ (SEQ G190 + (COND + ((NULL (COND + ((SPADCALL |x| (QREFELT $ 16)) 'NIL) + ('T + (SPADCALL + (SPADCALL (SPADCALL |x| (QREFELT $ 18)) + |f|) + (QREFELT $ 25))))) + (GO G191))) + (SEQ (EXIT (LETT |x| (SPADCALL |x| (QREFELT $ 17)) + |LSAGG-;find;MAU;12|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (COND + ((SPADCALL |x| (QREFELT $ 16)) (CONS 1 "failed")) + ('T (CONS 0 (SPADCALL |x| (QREFELT $ 18)))))))) + +(DEFUN |LSAGG-;position;MAI;13| (|f| |x| $) + (PROG (|k|) + (RETURN + (SEQ (SEQ (LETT |k| (SPADCALL |x| (QREFELT $ 32)) + |LSAGG-;position;MAI;13|) + G190 + (COND + ((NULL (COND + ((SPADCALL |x| (QREFELT $ 16)) 'NIL) + ('T + (SPADCALL + (SPADCALL (SPADCALL |x| (QREFELT $ 18)) + |f|) + (QREFELT $ 25))))) + (GO G191))) + (SEQ (EXIT (LETT |x| (SPADCALL |x| (QREFELT $ 17)) + |LSAGG-;position;MAI;13|))) + (LETT |k| (+ |k| 1) |LSAGG-;position;MAI;13|) (GO G190) + G191 (EXIT NIL)) + (EXIT (COND + ((SPADCALL |x| (QREFELT $ 16)) + (- (SPADCALL |x| (QREFELT $ 32)) 1)) + ('T |k|))))))) + +(DEFUN |LSAGG-;mergeSort| (|f| |p| |n| $) + (PROG (#0=#:G1507 |l| |q|) + (RETURN + (SEQ (COND + ((EQL |n| 2) + (COND + ((SPADCALL + (SPADCALL (SPADCALL |p| (QREFELT $ 17)) + (QREFELT $ 18)) + (SPADCALL |p| (QREFELT $ 18)) |f|) + (LETT |p| (SPADCALL |p| (QREFELT $ 48)) + |LSAGG-;mergeSort|))))) + (EXIT (COND + ((< |n| 3) |p|) + ('T + (SEQ (LETT |l| + (PROG1 (LETT #0# (QUOTIENT2 |n| 2) + |LSAGG-;mergeSort|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) #0#)) + |LSAGG-;mergeSort|) + (LETT |q| (SPADCALL |p| |l| (QREFELT $ 49)) + |LSAGG-;mergeSort|) + (LETT |p| (|LSAGG-;mergeSort| |f| |p| |l| $) + |LSAGG-;mergeSort|) + (LETT |q| + (|LSAGG-;mergeSort| |f| |q| (- |n| |l|) + $) + |LSAGG-;mergeSort|) + (EXIT (SPADCALL |f| |p| |q| (QREFELT $ 23))))))))))) + +(DEFUN |LSAGG-;sorted?;MAB;15| (|f| |l| $) + (PROG (#0=#:G1516 |p|) + (RETURN + (SEQ (EXIT (COND + ((SPADCALL |l| (QREFELT $ 16)) 'T) + ('T + (SEQ (LETT |p| (SPADCALL |l| (QREFELT $ 17)) + |LSAGG-;sorted?;MAB;15|) + (SEQ G190 + (COND + ((NULL (SPADCALL + (SPADCALL |p| (QREFELT $ 16)) + (QREFELT $ 25))) + (GO G191))) + (SEQ (EXIT + (COND + ((NULL + (SPADCALL + (SPADCALL |l| (QREFELT $ 18)) + (SPADCALL |p| (QREFELT $ 18)) + |f|)) + (PROGN + (LETT #0# 'NIL + |LSAGG-;sorted?;MAB;15|) + (GO #0#))) + ('T + (LETT |p| + (SPADCALL + (LETT |l| |p| + |LSAGG-;sorted?;MAB;15|) + (QREFELT $ 17)) + |LSAGG-;sorted?;MAB;15|))))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT 'T))))) + #0# (EXIT #0#))))) + +(DEFUN |LSAGG-;reduce;MA2S;16| (|f| |x| |i| $) + (PROG (|r|) + (RETURN + (SEQ (LETT |r| |i| |LSAGG-;reduce;MA2S;16|) + (SEQ G190 + (COND + ((NULL (SPADCALL (SPADCALL |x| (QREFELT $ 16)) + (QREFELT $ 25))) + (GO G191))) + (SEQ (LETT |r| + (SPADCALL |r| (SPADCALL |x| (QREFELT $ 18)) + |f|) + |LSAGG-;reduce;MA2S;16|) + (EXIT (LETT |x| (SPADCALL |x| (QREFELT $ 17)) + |LSAGG-;reduce;MA2S;16|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |r|))))) + +(DEFUN |LSAGG-;reduce;MA3S;17| (|f| |x| |i| |a| $) + (PROG (|r|) + (RETURN + (SEQ (LETT |r| |i| |LSAGG-;reduce;MA3S;17|) + (SEQ G190 + (COND + ((NULL (COND + ((SPADCALL |x| (QREFELT $ 16)) 'NIL) + ('T + (SPADCALL (SPADCALL |r| |a| (QREFELT $ 52)) + (QREFELT $ 25))))) + (GO G191))) + (SEQ (LETT |r| + (SPADCALL |r| (SPADCALL |x| (QREFELT $ 18)) + |f|) + |LSAGG-;reduce;MA3S;17|) + (EXIT (LETT |x| (SPADCALL |x| (QREFELT $ 17)) + |LSAGG-;reduce;MA3S;17|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |r|))))) + +(DEFUN |LSAGG-;new;NniSA;18| (|n| |s| $) + (PROG (|k| |l|) + (RETURN + (SEQ (LETT |l| (SPADCALL (QREFELT $ 12)) |LSAGG-;new;NniSA;18|) + (SEQ (LETT |k| 1 |LSAGG-;new;NniSA;18|) G190 + (COND ((QSGREATERP |k| |n|) (GO G191))) + (SEQ (EXIT (LETT |l| (SPADCALL |s| |l| (QREFELT $ 13)) + |LSAGG-;new;NniSA;18|))) + (LETT |k| (QSADD1 |k|) |LSAGG-;new;NniSA;18|) (GO G190) + G191 (EXIT NIL)) + (EXIT |l|))))) + +(DEFUN |LSAGG-;map;M3A;19| (|f| |x| |y| $) + (PROG (|z|) + (RETURN + (SEQ (LETT |z| (SPADCALL (QREFELT $ 12)) |LSAGG-;map;M3A;19|) + (SEQ G190 + (COND + ((NULL (COND + ((SPADCALL |x| (QREFELT $ 16)) 'NIL) + ('T + (SPADCALL (SPADCALL |y| (QREFELT $ 16)) + (QREFELT $ 25))))) + (GO G191))) + (SEQ (LETT |z| + (SPADCALL + (SPADCALL (SPADCALL |x| (QREFELT $ 18)) + (SPADCALL |y| (QREFELT $ 18)) |f|) + |z| (QREFELT $ 13)) + |LSAGG-;map;M3A;19|) + (LETT |x| (SPADCALL |x| (QREFELT $ 17)) + |LSAGG-;map;M3A;19|) + (EXIT (LETT |y| (SPADCALL |y| (QREFELT $ 17)) + |LSAGG-;map;M3A;19|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (SPADCALL |z| (QREFELT $ 48))))))) + +(DEFUN |LSAGG-;reverse!;2A;20| (|x| $) + (PROG (|z| |y|) + (RETURN + (SEQ (COND + ((OR (SPADCALL |x| (QREFELT $ 16)) + (SPADCALL + (LETT |y| (SPADCALL |x| (QREFELT $ 17)) + |LSAGG-;reverse!;2A;20|) + (QREFELT $ 16))) + |x|) + ('T + (SEQ (SPADCALL |x| (SPADCALL (QREFELT $ 12)) + (QREFELT $ 26)) + (SEQ G190 + (COND + ((NULL (SPADCALL + (SPADCALL |y| (QREFELT $ 16)) + (QREFELT $ 25))) + (GO G191))) + (SEQ (LETT |z| (SPADCALL |y| (QREFELT $ 17)) + |LSAGG-;reverse!;2A;20|) + (SPADCALL |y| |x| (QREFELT $ 26)) + (LETT |x| |y| |LSAGG-;reverse!;2A;20|) + (EXIT (LETT |y| |z| + |LSAGG-;reverse!;2A;20|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |x|)))))))) + +(DEFUN |LSAGG-;copy;2A;21| (|x| $) + (PROG (|k| |y|) + (RETURN + (SEQ (LETT |y| (SPADCALL (QREFELT $ 12)) |LSAGG-;copy;2A;21|) + (SEQ (LETT |k| 0 |LSAGG-;copy;2A;21|) G190 + (COND + ((NULL (SPADCALL (SPADCALL |x| (QREFELT $ 16)) + (QREFELT $ 25))) + (GO G191))) + (SEQ (COND + ((EQL |k| 1000) + (COND + ((SPADCALL |x| (QREFELT $ 57)) + (EXIT (|error| "cyclic list")))))) + (LETT |y| + (SPADCALL (SPADCALL |x| (QREFELT $ 18)) |y| + (QREFELT $ 13)) + |LSAGG-;copy;2A;21|) + (EXIT (LETT |x| (SPADCALL |x| (QREFELT $ 17)) + |LSAGG-;copy;2A;21|))) + (LETT |k| (QSADD1 |k|) |LSAGG-;copy;2A;21|) (GO G190) + G191 (EXIT NIL)) + (EXIT (SPADCALL |y| (QREFELT $ 48))))))) + +(DEFUN |LSAGG-;copyInto!;2AIA;22| (|y| |x| |s| $) + (PROG (|m| #0=#:G1545 |z|) + (RETURN + (SEQ (LETT |m| (SPADCALL |y| (QREFELT $ 32)) + |LSAGG-;copyInto!;2AIA;22|) + (EXIT (COND + ((< |s| |m|) (|error| "index out of range")) + ('T + (SEQ (LETT |z| + (SPADCALL |y| + (PROG1 + (LETT #0# (- |s| |m|) + |LSAGG-;copyInto!;2AIA;22|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) #0#)) + (QREFELT $ 33)) + |LSAGG-;copyInto!;2AIA;22|) + (SEQ G190 + (COND + ((NULL (COND + ((SPADCALL |z| (QREFELT $ 16)) + 'NIL) + ('T + (SPADCALL + (SPADCALL |x| + (QREFELT $ 16)) + (QREFELT $ 25))))) + (GO G191))) + (SEQ (SPADCALL |z| + (SPADCALL |x| (QREFELT $ 18)) + (QREFELT $ 59)) + (LETT |x| + (SPADCALL |x| (QREFELT $ 17)) + |LSAGG-;copyInto!;2AIA;22|) + (EXIT + (LETT |z| + (SPADCALL |z| (QREFELT $ 17)) + |LSAGG-;copyInto!;2AIA;22|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |y|))))))))) + +(DEFUN |LSAGG-;position;SA2I;23| (|w| |x| |s| $) + (PROG (|m| #0=#:G1552 |k|) + (RETURN + (SEQ (LETT |m| (SPADCALL |x| (QREFELT $ 32)) + |LSAGG-;position;SA2I;23|) + (EXIT (COND + ((< |s| |m|) (|error| "index out of range")) + ('T + (SEQ (LETT |x| + (SPADCALL |x| + (PROG1 + (LETT #0# (- |s| |m|) + |LSAGG-;position;SA2I;23|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) #0#)) + (QREFELT $ 33)) + |LSAGG-;position;SA2I;23|) + (SEQ (LETT |k| |s| |LSAGG-;position;SA2I;23|) + G190 + (COND + ((NULL (COND + ((SPADCALL |x| (QREFELT $ 16)) + 'NIL) + ('T + (SPADCALL + (SPADCALL |w| + (SPADCALL |x| + (QREFELT $ 18)) + (QREFELT $ 52)) + (QREFELT $ 25))))) + (GO G191))) + (SEQ (EXIT + (LETT |x| + (SPADCALL |x| (QREFELT $ 17)) + |LSAGG-;position;SA2I;23|))) + (LETT |k| (+ |k| 1) + |LSAGG-;position;SA2I;23|) + (GO G190) G191 (EXIT NIL)) + (EXIT (COND + ((SPADCALL |x| (QREFELT $ 16)) + (- (SPADCALL |x| (QREFELT $ 32)) 1)) + ('T |k|))))))))))) + +(DEFUN |LSAGG-;removeDuplicates!;2A;24| (|l| $) + (PROG (|p|) + (RETURN + (SEQ (LETT |p| |l| |LSAGG-;removeDuplicates!;2A;24|) + (SEQ G190 + (COND + ((NULL (SPADCALL (SPADCALL |p| (QREFELT $ 16)) + (QREFELT $ 25))) + (GO G191))) + (SEQ (EXIT (LETT |p| + (SPADCALL |p| + (SPADCALL + (CONS + #'|LSAGG-;removeDuplicates!;2A;24!0| + (VECTOR $ |p|)) + (SPADCALL |p| (QREFELT $ 17)) + (QREFELT $ 62)) + (QREFELT $ 26)) + |LSAGG-;removeDuplicates!;2A;24|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |l|))))) + +(DEFUN |LSAGG-;removeDuplicates!;2A;24!0| (|#1| $$) + (PROG ($) + (LETT $ (QREFELT $$ 0) |LSAGG-;removeDuplicates!;2A;24|) + (RETURN + (PROGN + (SPADCALL |#1| (SPADCALL (QREFELT $$ 1) (QREFELT $ 18)) + (QREFELT $ 52)))))) + +(DEFUN |LSAGG-;<;2AB;25| (|x| |y| $) + (PROG (#0=#:G1566) + (RETURN + (SEQ (EXIT (SEQ (SEQ G190 + (COND + ((NULL (COND + ((SPADCALL |x| (QREFELT $ 16)) + 'NIL) + ('T + (SPADCALL + (SPADCALL |y| (QREFELT $ 16)) + (QREFELT $ 25))))) + (GO G191))) + (SEQ (EXIT (COND + ((NULL + (SPADCALL + (SPADCALL |x| + (QREFELT $ 18)) + (SPADCALL |y| + (QREFELT $ 18)) + (QREFELT $ 52))) + (PROGN + (LETT #0# + (SPADCALL + (SPADCALL |x| + (QREFELT $ 18)) + (SPADCALL |y| + (QREFELT $ 18)) + (QREFELT $ 64)) + |LSAGG-;<;2AB;25|) + (GO #0#))) + ('T + (SEQ + (LETT |x| + (SPADCALL |x| + (QREFELT $ 17)) + |LSAGG-;<;2AB;25|) + (EXIT + (LETT |y| + (SPADCALL |y| + (QREFELT $ 17)) + |LSAGG-;<;2AB;25|))))))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (COND + ((SPADCALL |x| (QREFELT $ 16)) + (SPADCALL (SPADCALL |y| (QREFELT $ 16)) + (QREFELT $ 25))) + ('T 'NIL))))) + #0# (EXIT #0#))))) + +(DEFUN |ListAggregate&| (|#1| |#2|) + (PROG (|dv$1| |dv$2| |dv$| $ |pv$|) + (RETURN + (PROGN + (LETT |dv$1| (|devaluate| |#1|) . #0=(|ListAggregate&|)) + (LETT |dv$2| (|devaluate| |#2|) . #0#) + (LETT |dv$| (LIST '|ListAggregate&| |dv$1| |dv$2|) . #0#) + (LETT $ (GETREFV 67) . #0#) + (QSETREFV $ 0 |dv$|) + (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#)) + (|stuffDomainSlots| $) + (QSETREFV $ 6 |#1|) + (QSETREFV $ 7 |#2|) + (COND + ((|HasCategory| |#2| '(|SetCategory|)) + (QSETREFV $ 53 + (CONS (|dispatchFunction| |LSAGG-;reduce;MA3S;17|) $)))) + (COND + ((|HasCategory| |#2| '(|SetCategory|)) + (PROGN + (QSETREFV $ 61 + (CONS (|dispatchFunction| |LSAGG-;position;SA2I;23|) + $)) + (QSETREFV $ 63 + (CONS (|dispatchFunction| + |LSAGG-;removeDuplicates!;2A;24|) + $))))) + (COND + ((|HasCategory| |#2| '(|OrderedSet|)) + (QSETREFV $ 65 + (CONS (|dispatchFunction| |LSAGG-;<;2AB;25|) $)))) + $)))) + +(MAKEPROP '|ListAggregate&| '|infovec| + (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) + (|NonNegativeInteger|) (0 . |#|) (|Mapping| 15 7 7) + |LSAGG-;sort!;M2A;1| (5 . |empty|) (9 . |concat|) + |LSAGG-;list;SA;2| (|Boolean|) (15 . |empty?|) + (20 . |rest|) (25 . |first|) (|Mapping| 7 7 7) + (30 . |reduce|) |LSAGG-;reduce;MAS;3| (37 . |copy|) + (42 . |merge!|) |LSAGG-;merge;M3A;4| (49 . |not|) + (54 . |setrest!|) (|Mapping| 15 7) |LSAGG-;select!;M2A;5| + (60 . |eq?|) |LSAGG-;merge!;M3A;6| (|Integer|) + (66 . |minIndex|) (71 . |rest|) |LSAGG-;insert!;SAIA;7| + (77 . |concat!|) |LSAGG-;insert!;2AIA;8| + |LSAGG-;remove!;M2A;9| |LSAGG-;delete!;AIA;10| + (|UniversalSegment| 31) (83 . |lo|) (88 . |hasHi|) + (93 . |hi|) (98 . |maxIndex|) |LSAGG-;delete!;AUsA;11| + (|Union| 7 '"failed") |LSAGG-;find;MAU;12| + |LSAGG-;position;MAI;13| (103 . |reverse!|) + (108 . |split!|) |LSAGG-;sorted?;MAB;15| + |LSAGG-;reduce;MA2S;16| (114 . =) (120 . |reduce|) + |LSAGG-;new;NniSA;18| |LSAGG-;map;M3A;19| + |LSAGG-;reverse!;2A;20| (128 . |cyclic?|) + |LSAGG-;copy;2A;21| (133 . |setfirst!|) + |LSAGG-;copyInto!;2AIA;22| (139 . |position|) + (146 . |remove!|) (152 . |removeDuplicates!|) (157 . <) + (163 . <) (|Mapping| 7 7)) + '#(|sorted?| 169 |sort!| 175 |select!| 181 |reverse!| 187 + |removeDuplicates!| 192 |remove!| 197 |reduce| 203 + |position| 224 |new| 237 |merge!| 243 |merge| 250 |map| + 257 |list| 264 |insert!| 269 |find| 283 |delete!| 289 + |copyInto!| 301 |copy| 308 < 313) + 'NIL + (CONS (|makeByteWordVec2| 1 'NIL) + (CONS '#() + (CONS '#() + (|makeByteWordVec2| 65 + '(1 6 8 0 9 0 6 0 12 2 6 0 7 0 13 1 6 + 15 0 16 1 6 0 0 17 1 6 7 0 18 3 6 7 + 19 0 7 20 1 6 0 0 22 3 6 0 10 0 0 23 + 1 15 0 0 25 2 6 0 0 0 26 2 6 15 0 0 + 29 1 6 31 0 32 2 6 0 0 8 33 2 6 0 0 0 + 35 1 39 31 0 40 1 39 15 0 41 1 39 31 + 0 42 1 6 31 0 43 1 6 0 0 48 2 6 0 0 + 31 49 2 7 15 0 0 52 4 0 7 19 0 7 7 53 + 1 6 15 0 57 2 6 7 0 7 59 3 0 31 7 0 + 31 61 2 6 0 27 0 62 1 0 0 0 63 2 7 15 + 0 0 64 2 0 15 0 0 65 2 0 15 10 0 50 2 + 0 0 10 0 11 2 0 0 27 0 28 1 0 0 0 56 + 1 0 0 0 63 2 0 0 27 0 37 3 0 7 19 0 7 + 51 4 0 7 19 0 7 7 53 2 0 7 19 0 21 2 + 0 31 27 0 47 3 0 31 7 0 31 61 2 0 0 8 + 7 54 3 0 0 10 0 0 30 3 0 0 10 0 0 24 + 3 0 0 19 0 0 55 1 0 0 7 14 3 0 0 7 0 + 31 34 3 0 0 0 0 31 36 2 0 45 27 0 46 + 2 0 0 0 39 44 2 0 0 0 31 38 3 0 0 0 0 + 31 60 1 0 0 0 58 2 0 15 0 0 65))))) + '|lookupComplete|)) @ \section{category ALAGG AssociationListAggregate} <<category ALAGG AssociationListAggregate>>= @@ -2991,15 +5588,60 @@ Note that this code is not included in the generated catdef.spad file. <<ALAGG.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(SETQ |AssociationListAggregate;CAT| (QUOTE NIL)) - -(SETQ |AssociationListAggregate;AL| (QUOTE NIL)) - -(DEFUN |AssociationListAggregate| (|&REST| #1=#:G88404 |&AUX| #2=#:G88402) (DSETQ #2# #1#) (LET (#3=#:G88403) (COND ((SETQ #3# (|assoc| (|devaluateList| #2#) |AssociationListAggregate;AL|)) (CDR #3#)) (T (SETQ |AssociationListAggregate;AL| (|cons5| (CONS (|devaluateList| #2#) (SETQ #3# (APPLY (FUNCTION |AssociationListAggregate;|) #2#))) |AssociationListAggregate;AL|)) #3#)))) - -(DEFUN |AssociationListAggregate;| (|t#1| |t#2|) (PROG (#1=#:G88401) (RETURN (PROG1 (LETT #1# (|sublisV| (PAIR (QUOTE (|t#1| |t#2|)) (LIST (|devaluate| |t#1|) (|devaluate| |t#2|))) (|sublisV| (PAIR (QUOTE (#2=#:G88400)) (LIST (QUOTE (|Record| (|:| |key| |t#1|) (|:| |entry| |t#2|))))) (COND (|AssociationListAggregate;CAT|) ((QUOTE T) (LETT |AssociationListAggregate;CAT| (|Join| (|TableAggregate| (QUOTE |t#1|) (QUOTE |t#2|)) (|ListAggregate| (QUOTE #2#)) (|mkCategory| (QUOTE |domain|) (QUOTE (((|assoc| ((|Union| (|Record| (|:| |key| |t#1|) (|:| |entry| |t#2|)) "failed") |t#1| |$|)) T))) NIL (QUOTE NIL) NIL)) . #3=(|AssociationListAggregate|)))))) . #3#) (SETELT #1# 0 (LIST (QUOTE |AssociationListAggregate|) (|devaluate| |t#1|) (|devaluate| |t#2|))))))) +(/VERSIONCHECK 2) + +(DEFPARAMETER |AssociationListAggregate;CAT| 'NIL) + +(DEFPARAMETER |AssociationListAggregate;AL| 'NIL) + +(DEFUN |AssociationListAggregate| (&REST #0=#:G1402 &AUX #1=#:G1400) + (DSETQ #1# #0#) + (LET (#2=#:G1401) + (COND + ((SETQ #2# + (|assoc| (|devaluateList| #1#) + |AssociationListAggregate;AL|)) + (CDR #2#)) + (T (SETQ |AssociationListAggregate;AL| + (|cons5| (CONS (|devaluateList| #1#) + (SETQ #2# + (APPLY + #'|AssociationListAggregate;| #1#))) + |AssociationListAggregate;AL|)) + #2#)))) + +(DEFUN |AssociationListAggregate;| (|t#1| |t#2|) + (PROG (#0=#:G1399) + (RETURN + (PROG1 (LETT #0# + (|sublisV| + (PAIR '(|t#1| |t#2|) + (LIST (|devaluate| |t#1|) + (|devaluate| |t#2|))) + (|sublisV| + (PAIR '(#1=#:G1398) + (LIST '(|Record| (|:| |key| |t#1|) + (|:| |entry| |t#2|)))) + (COND + (|AssociationListAggregate;CAT|) + ('T + (LETT |AssociationListAggregate;CAT| + (|Join| + (|TableAggregate| '|t#1| '|t#2|) + (|ListAggregate| '#1#) + (|mkCategory| '|domain| + '(((|assoc| + ((|Union| + (|Record| (|:| |key| |t#1|) + (|:| |entry| |t#2|)) + "failed") + |t#1| $)) + T)) + NIL 'NIL NIL)) + . #2=(|AssociationListAggregate|)))))) . #2#) + (SETELT #0# 0 + (LIST '|AssociationListAggregate| (|devaluate| |t#1|) + (|devaluate| |t#2|))))))) @ \section{category SRAGG StringAggregate} <<category SRAGG StringAggregate>>= diff --git a/src/algebra/list.spad.pamphlet b/src/algebra/list.spad.pamphlet index 3e485db6..93c7b627 100644 --- a/src/algebra/list.spad.pamphlet +++ b/src/algebra/list.spad.pamphlet @@ -213,99 +213,626 @@ Note that this code is not included in the generated catdef.spad file. <<ILIST.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) +(/VERSIONCHECK 2) -(PUT (QUOTE |ILIST;#;$Nni;1|) (QUOTE |SPADreplace|) (QUOTE LENGTH)) +(PUT '|ILIST;#;$Nni;1| '|SPADreplace| 'LENGTH) -(DEFUN |ILIST;#;$Nni;1| (|x| |$|) (LENGTH |x|)) +(DEFUN |ILIST;#;$Nni;1| (|x| $) (LENGTH |x|)) -(PUT (QUOTE |ILIST;concat;S2$;2|) (QUOTE |SPADreplace|) (QUOTE CONS)) +(PUT '|ILIST;concat;S2$;2| '|SPADreplace| 'CONS) -(DEFUN |ILIST;concat;S2$;2| (|s| |x| |$|) (CONS |s| |x|)) +(DEFUN |ILIST;concat;S2$;2| (|s| |x| $) (CONS |s| |x|)) -(PUT (QUOTE |ILIST;eq?;2$B;3|) (QUOTE |SPADreplace|) (QUOTE EQ)) +(PUT '|ILIST;eq?;2$B;3| '|SPADreplace| 'EQ) -(DEFUN |ILIST;eq?;2$B;3| (|x| |y| |$|) (EQ |x| |y|)) +(DEFUN |ILIST;eq?;2$B;3| (|x| |y| $) (EQ |x| |y|)) -(PUT (QUOTE |ILIST;first;$S;4|) (QUOTE |SPADreplace|) (QUOTE |SPADfirst|)) +(PUT '|ILIST;first;$S;4| '|SPADreplace| '|SPADfirst|) -(DEFUN |ILIST;first;$S;4| (|x| |$|) (|SPADfirst| |x|)) +(DEFUN |ILIST;first;$S;4| (|x| $) (|SPADfirst| |x|)) -(PUT (QUOTE |ILIST;elt;$firstS;5|) (QUOTE |SPADreplace|) (QUOTE (XLAM (|x| "first") (|SPADfirst| |x|)))) +(PUT '|ILIST;elt;$firstS;5| '|SPADreplace| + '(XLAM (|x| "first") (|SPADfirst| |x|))) -(DEFUN |ILIST;elt;$firstS;5| (|x| G101995 |$|) (|SPADfirst| |x|)) +(DEFUN |ILIST;elt;$firstS;5| (|x| T0 $) (|SPADfirst| |x|)) -(PUT (QUOTE |ILIST;empty;$;6|) (QUOTE |SPADreplace|) (QUOTE (XLAM NIL NIL))) +(PUT '|ILIST;empty;$;6| '|SPADreplace| '(XLAM NIL NIL)) -(DEFUN |ILIST;empty;$;6| (|$|) NIL) +(DEFUN |ILIST;empty;$;6| ($) NIL) -(PUT (QUOTE |ILIST;empty?;$B;7|) (QUOTE |SPADreplace|) (QUOTE NULL)) +(PUT '|ILIST;empty?;$B;7| '|SPADreplace| 'NULL) -(DEFUN |ILIST;empty?;$B;7| (|x| |$|) (NULL |x|)) +(DEFUN |ILIST;empty?;$B;7| (|x| $) (NULL |x|)) -(PUT (QUOTE |ILIST;rest;2$;8|) (QUOTE |SPADreplace|) (QUOTE CDR)) +(PUT '|ILIST;rest;2$;8| '|SPADreplace| 'CDR) -(DEFUN |ILIST;rest;2$;8| (|x| |$|) (CDR |x|)) +(DEFUN |ILIST;rest;2$;8| (|x| $) (CDR |x|)) -(PUT (QUOTE |ILIST;elt;$rest$;9|) (QUOTE |SPADreplace|) (QUOTE (XLAM (|x| "rest") (CDR |x|)))) +(PUT '|ILIST;elt;$rest$;9| '|SPADreplace| + '(XLAM (|x| "rest") (CDR |x|))) -(DEFUN |ILIST;elt;$rest$;9| (|x| G102000 |$|) (CDR |x|)) - -(DEFUN |ILIST;setfirst!;$2S;10| (|x| |s| |$|) (COND ((SPADCALL |x| (QREFELT |$| 17)) (|error| "Cannot update an empty list")) ((QUOTE T) (QCAR (RPLACA |x| |s|))))) - -(DEFUN |ILIST;setelt;$first2S;11| (|x| G102005 |s| |$|) (COND ((SPADCALL |x| (QREFELT |$| 17)) (|error| "Cannot update an empty list")) ((QUOTE T) (QCAR (RPLACA |x| |s|))))) - -(DEFUN |ILIST;setrest!;3$;12| (|x| |y| |$|) (COND ((SPADCALL |x| (QREFELT |$| 17)) (|error| "Cannot update an empty list")) ((QUOTE T) (QCDR (RPLACD |x| |y|))))) - -(DEFUN |ILIST;setelt;$rest2$;13| (|x| G102010 |y| |$|) (COND ((SPADCALL |x| (QREFELT |$| 17)) (|error| "Cannot update an empty list")) ((QUOTE T) (QCDR (RPLACD |x| |y|))))) - -(PUT (QUOTE |ILIST;construct;L$;14|) (QUOTE |SPADreplace|) (QUOTE (XLAM (|l|) |l|))) - -(DEFUN |ILIST;construct;L$;14| (|l| |$|) |l|) - -(PUT (QUOTE |ILIST;parts;$L;15|) (QUOTE |SPADreplace|) (QUOTE (XLAM (|s|) |s|))) - -(DEFUN |ILIST;parts;$L;15| (|s| |$|) |s|) - -(PUT (QUOTE |ILIST;reverse!;2$;16|) (QUOTE |SPADreplace|) (QUOTE NREVERSE)) - -(DEFUN |ILIST;reverse!;2$;16| (|x| |$|) (NREVERSE |x|)) - -(PUT (QUOTE |ILIST;reverse;2$;17|) (QUOTE |SPADreplace|) (QUOTE REVERSE)) - -(DEFUN |ILIST;reverse;2$;17| (|x| |$|) (REVERSE |x|)) - -(DEFUN |ILIST;minIndex;$I;18| (|x| |$|) (QREFELT |$| 7)) - -(DEFUN |ILIST;rest;$Nni$;19| (|x| |n| |$|) (PROG (|i|) (RETURN (SEQ (SEQ (LETT |i| 1 |ILIST;rest;$Nni$;19|) G190 (COND ((QSGREATERP |i| |n|) (GO G191))) (SEQ (COND ((NULL |x|) (|error| "index out of range"))) (EXIT (LETT |x| (QCDR |x|) |ILIST;rest;$Nni$;19|))) (LETT |i| (QSADD1 |i|) |ILIST;rest;$Nni$;19|) (GO G190) G191 (EXIT NIL)) (EXIT |x|))))) - -(DEFUN |ILIST;copy;2$;20| (|x| |$|) (PROG (|i| |y|) (RETURN (SEQ (LETT |y| (SPADCALL (QREFELT |$| 16)) |ILIST;copy;2$;20|) (SEQ (LETT |i| 0 |ILIST;copy;2$;20|) G190 (COND ((NULL (COND ((NULL |x|) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (COND ((EQ |i| 1000) (COND ((SPADCALL |x| (QREFELT |$| 33)) (|error| "cyclic list"))))) (LETT |y| (CONS (QCAR |x|) |y|) |ILIST;copy;2$;20|) (EXIT (LETT |x| (QCDR |x|) |ILIST;copy;2$;20|))) (LETT |i| (QSADD1 |i|) |ILIST;copy;2$;20|) (GO G190) G191 (EXIT NIL)) (EXIT (NREVERSE |y|)))))) - -(DEFUN |ILIST;coerce;$Of;21| (|x| |$|) (PROG (|s| |y| |z|) (RETURN (SEQ (LETT |y| NIL |ILIST;coerce;$Of;21|) (LETT |s| (SPADCALL |x| (QREFELT |$| 35)) |ILIST;coerce;$Of;21|) (SEQ G190 (COND ((NULL (NEQ |x| |s|)) (GO G191))) (SEQ (LETT |y| (CONS (SPADCALL (SPADCALL |x| (QREFELT |$| 13)) (QREFELT |$| 37)) |y|) |ILIST;coerce;$Of;21|) (EXIT (LETT |x| (SPADCALL |x| (QREFELT |$| 18)) |ILIST;coerce;$Of;21|))) NIL (GO G190) G191 (EXIT NIL)) (LETT |y| (NREVERSE |y|) |ILIST;coerce;$Of;21|) (EXIT (COND ((SPADCALL |s| (QREFELT |$| 17)) (SPADCALL |y| (QREFELT |$| 39))) ((QUOTE T) (SEQ (LETT |z| (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT |$| 13)) (QREFELT |$| 37)) (QREFELT |$| 41)) |ILIST;coerce;$Of;21|) (SEQ G190 (COND ((NULL (NEQ |s| (SPADCALL |x| (QREFELT |$| 18)))) (GO G191))) (SEQ (LETT |x| (SPADCALL |x| (QREFELT |$| 18)) |ILIST;coerce;$Of;21|) (EXIT (LETT |z| (CONS (SPADCALL (SPADCALL |x| (QREFELT |$| 13)) (QREFELT |$| 37)) |z|) |ILIST;coerce;$Of;21|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (SPADCALL (SPADCALL |y| (SPADCALL (SPADCALL (NREVERSE |z|) (QREFELT |$| 42)) (QREFELT |$| 43)) (QREFELT |$| 44)) (QREFELT |$| 39))))))))))) - -(DEFUN |ILIST;=;2$B;22| (|x| |y| |$|) (PROG (#1=#:G102042) (RETURN (SEQ (EXIT (COND ((EQ |x| |y|) (QUOTE T)) ((QUOTE T) (SEQ (SEQ G190 (COND ((NULL (COND ((OR (NULL |x|) (NULL |y|)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (EXIT (COND ((NULL (SPADCALL (QCAR |x|) (QCAR |y|) (QREFELT |$| 46))) (PROGN (LETT #1# (QUOTE NIL) |ILIST;=;2$B;22|) (GO #1#))) ((QUOTE T) (SEQ (LETT |x| (QCDR |x|) |ILIST;=;2$B;22|) (EXIT (LETT |y| (QCDR |y|) |ILIST;=;2$B;22|))))))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (COND ((NULL |x|) (NULL |y|)) ((QUOTE T) (QUOTE NIL)))))))) #1# (EXIT #1#))))) - -(DEFUN |ILIST;latex;$S;23| (|x| |$|) (PROG (|s|) (RETURN (SEQ (LETT |s| "\\left[" |ILIST;latex;$S;23|) (SEQ G190 (COND ((NULL (COND ((NULL |x|) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (LETT |s| (STRCONC |s| (SPADCALL (QCAR |x|) (QREFELT |$| 49))) |ILIST;latex;$S;23|) (LETT |x| (QCDR |x|) |ILIST;latex;$S;23|) (EXIT (COND ((NULL (NULL |x|)) (LETT |s| (STRCONC |s| ", ") |ILIST;latex;$S;23|))))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (STRCONC |s| " \\right]")))))) - -(DEFUN |ILIST;member?;S$B;24| (|s| |x| |$|) (PROG (#1=#:G102052) (RETURN (SEQ (EXIT (SEQ (SEQ G190 (COND ((NULL (COND ((NULL |x|) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (EXIT (COND ((SPADCALL |s| (QCAR |x|) (QREFELT |$| 46)) (PROGN (LETT #1# (QUOTE T) |ILIST;member?;S$B;24|) (GO #1#))) ((QUOTE T) (LETT |x| (QCDR |x|) |ILIST;member?;S$B;24|))))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (QUOTE NIL)))) #1# (EXIT #1#))))) - -(DEFUN |ILIST;concat!;3$;25| (|x| |y| |$|) (PROG (|z|) (RETURN (SEQ (COND ((NULL |x|) (COND ((NULL |y|) |x|) ((QUOTE T) (SEQ (PUSH (SPADCALL |y| (QREFELT |$| 13)) |x|) (QRPLACD |x| (SPADCALL |y| (QREFELT |$| 18))) (EXIT |x|))))) ((QUOTE T) (SEQ (LETT |z| |x| |ILIST;concat!;3$;25|) (SEQ G190 (COND ((NULL (COND ((NULL (QCDR |z|)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (EXIT (LETT |z| (QCDR |z|) |ILIST;concat!;3$;25|))) NIL (GO G190) G191 (EXIT NIL)) (QRPLACD |z| |y|) (EXIT |x|)))))))) - -(DEFUN |ILIST;removeDuplicates!;2$;26| (|l| |$|) (PROG (|f| |p| |pr| |pp|) (RETURN (SEQ (LETT |p| |l| |ILIST;removeDuplicates!;2$;26|) (SEQ G190 (COND ((NULL (COND ((NULL |p|) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (LETT |pp| |p| |ILIST;removeDuplicates!;2$;26|) (LETT |f| (QCAR |p|) |ILIST;removeDuplicates!;2$;26|) (LETT |p| (QCDR |p|) |ILIST;removeDuplicates!;2$;26|) (EXIT (SEQ G190 (COND ((NULL (COND ((NULL (LETT |pr| (QCDR |pp|) |ILIST;removeDuplicates!;2$;26|)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (EXIT (COND ((SPADCALL (QCAR |pr|) |f| (QREFELT |$| 46)) (QRPLACD |pp| (QCDR |pr|))) ((QUOTE T) (LETT |pp| |pr| |ILIST;removeDuplicates!;2$;26|))))) NIL (GO G190) G191 (EXIT NIL)))) NIL (GO G190) G191 (EXIT NIL)) (EXIT |l|))))) - -(DEFUN |ILIST;sort!;M2$;27| (|f| |l| |$|) (|ILIST;mergeSort| |f| |l| (SPADCALL |l| (QREFELT |$| 9)) |$|)) - -(DEFUN |ILIST;merge!;M3$;28| (|f| |p| |q| |$|) (PROG (|r| |t|) (RETURN (SEQ (COND ((NULL |p|) |q|) ((NULL |q|) |p|) ((EQ |p| |q|) (|error| "cannot merge a list into itself")) ((QUOTE T) (SEQ (COND ((SPADCALL (QCAR |p|) (QCAR |q|) |f|) (SEQ (LETT |r| (LETT |t| |p| |ILIST;merge!;M3$;28|) |ILIST;merge!;M3$;28|) (EXIT (LETT |p| (QCDR |p|) |ILIST;merge!;M3$;28|)))) ((QUOTE T) (SEQ (LETT |r| (LETT |t| |q| |ILIST;merge!;M3$;28|) |ILIST;merge!;M3$;28|) (EXIT (LETT |q| (QCDR |q|) |ILIST;merge!;M3$;28|))))) (SEQ G190 (COND ((NULL (COND ((OR (NULL |p|) (NULL |q|)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (EXIT (COND ((SPADCALL (QCAR |p|) (QCAR |q|) |f|) (SEQ (QRPLACD |t| |p|) (LETT |t| |p| |ILIST;merge!;M3$;28|) (EXIT (LETT |p| (QCDR |p|) |ILIST;merge!;M3$;28|)))) ((QUOTE T) (SEQ (QRPLACD |t| |q|) (LETT |t| |q| |ILIST;merge!;M3$;28|) (EXIT (LETT |q| (QCDR |q|) |ILIST;merge!;M3$;28|))))))) NIL (GO G190) G191 (EXIT NIL)) (QRPLACD |t| (COND ((NULL |p|) |q|) ((QUOTE T) |p|))) (EXIT |r|)))))))) - -(DEFUN |ILIST;split!;$I$;29| (|p| |n| |$|) (PROG (#1=#:G102085 |q|) (RETURN (SEQ (COND ((|<| |n| 1) (|error| "index out of range")) ((QUOTE T) (SEQ (LETT |p| (SPADCALL |p| (PROG1 (LETT #1# (|-| |n| 1) |ILIST;split!;$I$;29|) (|check-subtype| (|>=| #1# 0) (QUOTE (|NonNegativeInteger|)) #1#)) (QREFELT |$| 32)) |ILIST;split!;$I$;29|) (LETT |q| (QCDR |p|) |ILIST;split!;$I$;29|) (QRPLACD |p| NIL) (EXIT |q|)))))))) - -(DEFUN |ILIST;mergeSort| (|f| |p| |n| |$|) (PROG (#1=#:G102089 |l| |q|) (RETURN (SEQ (COND ((EQL |n| 2) (COND ((SPADCALL (SPADCALL (SPADCALL |p| (QREFELT |$| 18)) (QREFELT |$| 13)) (SPADCALL |p| (QREFELT |$| 13)) |f|) (LETT |p| (SPADCALL |p| (QREFELT |$| 28)) |ILIST;mergeSort|))))) (EXIT (COND ((|<| |n| 3) |p|) ((QUOTE T) (SEQ (LETT |l| (PROG1 (LETT #1# (QUOTIENT2 |n| 2) |ILIST;mergeSort|) (|check-subtype| (|>=| #1# 0) (QUOTE (|NonNegativeInteger|)) #1#)) |ILIST;mergeSort|) (LETT |q| (SPADCALL |p| |l| (QREFELT |$| 57)) |ILIST;mergeSort|) (LETT |p| (|ILIST;mergeSort| |f| |p| |l| |$|) |ILIST;mergeSort|) (LETT |q| (|ILIST;mergeSort| |f| |q| (|-| |n| |l|) |$|) |ILIST;mergeSort|) (EXIT (SPADCALL |f| |p| |q| (QREFELT |$| 56))))))))))) - -(DEFUN |IndexedList| (|&REST| #1=#:G102103 |&AUX| #2=#:G102101) (DSETQ #2# #1#) (PROG NIL (RETURN (PROG (#3=#:G102102) (RETURN (COND ((LETT #3# (|lassocShiftWithFunction| (|devaluateList| #2#) (HGET |$ConstructorCache| (QUOTE |IndexedList|)) (QUOTE |domainEqualList|)) |IndexedList|) (|CDRwithIncrement| #3#)) ((QUOTE T) (|UNWIND-PROTECT| (PROG1 (APPLY (|function| |IndexedList;|) #2#) (LETT #3# T |IndexedList|)) (COND ((NOT #3#) (HREM |$ConstructorCache| (QUOTE |IndexedList|)))))))))))) - -(DEFUN |IndexedList;| (|#1| |#2|) (PROG (|DV$1| |DV$2| |dv$| |$| #1=#:G102100 |pv$|) (RETURN (PROGN (LETT |DV$1| (|devaluate| |#1|) . #2=(|IndexedList|)) (LETT |DV$2| (|devaluate| |#2|) . #2#) (LETT |dv$| (LIST (QUOTE |IndexedList|) |DV$1| |DV$2|) . #2#) (LETT |$| (GETREFV 71) . #2#) (QSETREFV |$| 0 |dv$|) (QSETREFV |$| 3 (LETT |pv$| (|buildPredVector| 0 0 (LIST (|HasCategory| |#1| (QUOTE (|SetCategory|))) (|HasCategory| |#1| (QUOTE (|ConvertibleTo| (|InputForm|)))) (LETT #1# (|HasCategory| |#1| (QUOTE (|OrderedSet|))) . #2#) (OR #1# (|HasCategory| |#1| (QUOTE (|SetCategory|)))) (|HasCategory| (|Integer|) (QUOTE (|OrderedSet|))) (AND (|HasCategory| |#1| (LIST (QUOTE |Evalable|) (|devaluate| |#1|))) (|HasCategory| |#1| (QUOTE (|SetCategory|)))) (OR (AND (|HasCategory| |#1| (LIST (QUOTE |Evalable|) (|devaluate| |#1|))) #1#) (AND (|HasCategory| |#1| (LIST (QUOTE |Evalable|) (|devaluate| |#1|))) (|HasCategory| |#1| (QUOTE (|SetCategory|))))))) . #2#)) (|haddProp| |$ConstructorCache| (QUOTE |IndexedList|) (LIST |DV$1| |DV$2|) (CONS 1 |$|)) (|stuffDomainSlots| |$|) (QSETREFV |$| 6 |#1|) (QSETREFV |$| 7 |#2|) (COND ((|testBitVector| |pv$| 1) (PROGN (QSETREFV |$| 45 (CONS (|dispatchFunction| |ILIST;coerce;$Of;21|) |$|)) (QSETREFV |$| 47 (CONS (|dispatchFunction| |ILIST;=;2$B;22|) |$|)) (QSETREFV |$| 50 (CONS (|dispatchFunction| |ILIST;latex;$S;23|) |$|)) (QSETREFV |$| 51 (CONS (|dispatchFunction| |ILIST;member?;S$B;24|) |$|))))) (COND ((|testBitVector| |pv$| 1) (QSETREFV |$| 53 (CONS (|dispatchFunction| |ILIST;removeDuplicates!;2$;26|) |$|)))) |$|)))) - -(MAKEPROP (QUOTE |IndexedList|) (QUOTE |infovec|) (LIST (QUOTE #(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) (|NonNegativeInteger|) |ILIST;#;$Nni;1| |ILIST;concat;S2$;2| (|Boolean|) |ILIST;eq?;2$B;3| |ILIST;first;$S;4| (QUOTE "first") |ILIST;elt;$firstS;5| |ILIST;empty;$;6| |ILIST;empty?;$B;7| |ILIST;rest;2$;8| (QUOTE "rest") |ILIST;elt;$rest$;9| |ILIST;setfirst!;$2S;10| |ILIST;setelt;$first2S;11| |ILIST;setrest!;3$;12| |ILIST;setelt;$rest2$;13| (|List| 6) |ILIST;construct;L$;14| |ILIST;parts;$L;15| |ILIST;reverse!;2$;16| |ILIST;reverse;2$;17| (|Integer|) |ILIST;minIndex;$I;18| |ILIST;rest;$Nni$;19| (0 . |cyclic?|) |ILIST;copy;2$;20| (5 . |cycleEntry|) (|OutputForm|) (10 . |coerce|) (|List| |$|) (15 . |bracket|) (|List| 36) (20 . |list|) (25 . |commaSeparate|) (30 . |overbar|) (35 . |concat!|) (41 . |coerce|) (46 . |=|) (52 . |=|) (|String|) (58 . |latex|) (63 . |latex|) (68 . |member?|) |ILIST;concat!;3$;25| (74 . |removeDuplicates!|) (|Mapping| 11 6 6) |ILIST;sort!;M2$;27| |ILIST;merge!;M3$;28| |ILIST;split!;$I$;29| (|Mapping| 6 6 6) (|Equation| 6) (|List| 59) (|Mapping| 11 6) (|Void|) (|UniversalSegment| 30) (QUOTE "last") (QUOTE "value") (|Mapping| 6 6) (|InputForm|) (|SingleInteger|) (|List| 30) (|Union| 6 (QUOTE "failed")))) (QUOTE #(|~=| 79 |value| 85 |third| 90 |tail| 95 |swap!| 100 |split!| 107 |sorted?| 113 |sort!| 124 |sort| 135 |size?| 146 |setvalue!| 152 |setrest!| 158 |setlast!| 164 |setfirst!| 170 |setelt| 176 |setchildren!| 218 |select!| 224 |select| 230 |second| 236 |sample| 241 |reverse!| 245 |reverse| 250 |rest| 255 |removeDuplicates!| 266 |removeDuplicates| 271 |remove!| 276 |remove| 288 |reduce| 300 |qsetelt!| 321 |qelt| 328 |possiblyInfinite?| 334 |position| 339 |parts| 358 |nodes| 363 |node?| 368 |new| 374 |more?| 380 |minIndex| 386 |min| 391 |merge!| 397 |merge| 410 |members| 423 |member?| 428 |maxIndex| 434 |max| 439 |map!| 445 |map| 451 |list| 464 |less?| 469 |leaves| 475 |leaf?| 480 |latex| 485 |last| 490 |insert!| 501 |insert| 515 |indices| 529 |index?| 534 |hash| 540 |first| 545 |find| 556 |fill!| 562 |explicitlyFinite?| 568 |every?| 573 |eval| 579 |eq?| 605 |entry?| 611 |entries| 617 |empty?| 622 |empty| 627 |elt| 631 |distance| 674 |delete!| 680 |delete| 692 |cyclic?| 704 |cycleTail| 709 |cycleSplit!| 714 |cycleLength| 719 |cycleEntry| 724 |count| 729 |copyInto!| 741 |copy| 748 |convert| 753 |construct| 758 |concat!| 763 |concat| 775 |coerce| 798 |children| 803 |child?| 808 |any?| 814 |>=| 820 |>| 826 |=| 832 |<=| 838 |<| 844 |#| 850)) (QUOTE ((|shallowlyMutable| . 0) (|finiteAggregate| . 0))) (CONS (|makeByteWordVec2| 7 (QUOTE (0 0 0 0 0 0 0 0 0 0 3 0 0 7 4 0 0 7 1 2 4))) (CONS (QUOTE #(|ListAggregate&| |StreamAggregate&| |ExtensibleLinearAggregate&| |FiniteLinearAggregate&| |UnaryRecursiveAggregate&| |LinearAggregate&| |RecursiveAggregate&| |IndexedAggregate&| |Collection&| |HomogeneousAggregate&| |OrderedSet&| |Aggregate&| |EltableAggregate&| |Evalable&| |SetCategory&| NIL NIL |InnerEvalable&| NIL NIL |BasicType&|)) (CONS (QUOTE #((|ListAggregate| 6) (|StreamAggregate| 6) (|ExtensibleLinearAggregate| 6) (|FiniteLinearAggregate| 6) (|UnaryRecursiveAggregate| 6) (|LinearAggregate| 6) (|RecursiveAggregate| 6) (|IndexedAggregate| 30 6) (|Collection| 6) (|HomogeneousAggregate| 6) (|OrderedSet|) (|Aggregate|) (|EltableAggregate| 30 6) (|Evalable| 6) (|SetCategory|) (|Type|) (|Eltable| 30 6) (|InnerEvalable| 6 6) (|CoercibleTo| 36) (|ConvertibleTo| 67) (|BasicType|))) (|makeByteWordVec2| 70 (QUOTE (1 0 11 0 33 1 0 0 0 35 1 6 36 0 37 1 36 0 38 39 1 40 0 36 41 1 36 0 38 42 1 36 0 0 43 2 40 0 0 36 44 1 0 36 0 45 2 6 11 0 0 46 2 0 11 0 0 47 1 6 48 0 49 1 0 48 0 50 2 0 11 6 0 51 1 0 0 0 53 2 1 11 0 0 1 1 0 6 0 1 1 0 6 0 1 1 0 0 0 1 3 0 62 0 30 30 1 2 0 0 0 30 57 1 3 11 0 1 2 0 11 54 0 1 1 3 0 0 1 2 0 0 54 0 55 1 3 0 0 1 2 0 0 54 0 1 2 0 11 0 8 1 2 0 6 0 6 1 2 0 0 0 0 23 2 0 6 0 6 1 2 0 6 0 6 21 3 0 6 0 30 6 1 3 0 6 0 63 6 1 3 0 6 0 64 6 1 3 0 0 0 19 0 24 3 0 6 0 14 6 22 3 0 6 0 65 6 1 2 0 0 0 38 1 2 0 0 61 0 1 2 0 0 61 0 1 1 0 6 0 1 0 0 0 1 1 0 0 0 28 1 0 0 0 29 2 0 0 0 8 32 1 0 0 0 18 1 1 0 0 53 1 1 0 0 1 2 1 0 6 0 1 2 0 0 61 0 1 2 1 0 6 0 1 2 0 0 61 0 1 4 1 6 58 0 6 6 1 2 0 6 58 0 1 3 0 6 58 0 6 1 3 0 6 0 30 6 1 2 0 6 0 30 1 1 0 11 0 1 2 1 30 6 0 1 3 1 30 6 0 30 1 2 0 30 61 0 1 1 0 25 0 27 1 0 38 0 1 2 1 11 0 0 1 2 0 0 8 6 1 2 0 11 0 8 1 1 5 30 0 31 2 3 0 0 0 1 2 3 0 0 0 1 3 0 0 54 0 0 56 2 3 0 0 0 1 3 0 0 54 0 0 1 1 0 25 0 1 2 1 11 6 0 51 1 5 30 0 1 2 3 0 0 0 1 2 0 0 66 0 1 3 0 0 58 0 0 1 2 0 0 66 0 1 1 0 0 6 1 2 0 11 0 8 1 1 0 25 0 1 1 0 11 0 1 1 1 48 0 50 2 0 0 0 8 1 1 0 6 0 1 3 0 0 6 0 30 1 3 0 0 0 0 30 1 3 0 0 0 0 30 1 3 0 0 6 0 30 1 1 0 69 0 1 2 0 11 30 0 1 1 1 68 0 1 2 0 0 0 8 1 1 0 6 0 13 2 0 70 61 0 1 2 0 0 0 6 1 1 0 11 0 1 2 0 11 61 0 1 3 6 0 0 6 6 1 3 6 0 0 25 25 1 2 6 0 0 59 1 2 6 0 0 60 1 2 0 11 0 0 12 2 1 11 6 0 1 1 0 25 0 1 1 0 11 0 17 0 0 0 16 2 0 6 0 30 1 3 0 6 0 30 6 1 2 0 0 0 63 1 2 0 6 0 64 1 2 0 0 0 19 20 2 0 6 0 14 15 2 0 6 0 65 1 2 0 30 0 0 1 2 0 0 0 63 1 2 0 0 0 30 1 2 0 0 0 63 1 2 0 0 0 30 1 1 0 11 0 33 1 0 0 0 1 1 0 0 0 1 1 0 8 0 1 1 0 0 0 35 2 1 8 6 0 1 2 0 8 61 0 1 3 0 0 0 0 30 1 1 0 0 0 34 1 2 67 0 1 1 0 0 25 26 2 0 0 0 0 52 2 0 0 0 6 1 1 0 0 38 1 2 0 0 0 6 1 2 0 0 6 0 10 2 0 0 0 0 1 1 1 36 0 45 1 0 38 0 1 2 1 11 0 0 1 2 0 11 61 0 1 2 3 11 0 0 1 2 3 11 0 0 1 2 1 11 0 0 47 2 3 11 0 0 1 2 3 11 0 0 1 1 0 8 0 9)))))) (QUOTE |lookupComplete|))) +(DEFUN |ILIST;elt;$rest$;9| (|x| T1 $) (CDR |x|)) + +(DEFUN |ILIST;setfirst!;$2S;10| (|x| |s| $) + (COND + ((SPADCALL |x| (QREFELT $ 17)) + (|error| "Cannot update an empty list")) + ('T (QCAR (RPLACA |x| |s|))))) + +(DEFUN |ILIST;setelt;$first2S;11| (|x| T2 |s| $) + (COND + ((SPADCALL |x| (QREFELT $ 17)) + (|error| "Cannot update an empty list")) + ('T (QCAR (RPLACA |x| |s|))))) + +(DEFUN |ILIST;setrest!;3$;12| (|x| |y| $) + (COND + ((SPADCALL |x| (QREFELT $ 17)) + (|error| "Cannot update an empty list")) + ('T (QCDR (RPLACD |x| |y|))))) + +(DEFUN |ILIST;setelt;$rest2$;13| (|x| T3 |y| $) + (COND + ((SPADCALL |x| (QREFELT $ 17)) + (|error| "Cannot update an empty list")) + ('T (QCDR (RPLACD |x| |y|))))) + +(PUT '|ILIST;construct;L$;14| '|SPADreplace| '(XLAM (|l|) |l|)) + +(DEFUN |ILIST;construct;L$;14| (|l| $) |l|) + +(PUT '|ILIST;parts;$L;15| '|SPADreplace| '(XLAM (|s|) |s|)) + +(DEFUN |ILIST;parts;$L;15| (|s| $) |s|) + +(PUT '|ILIST;reverse!;2$;16| '|SPADreplace| 'NREVERSE) + +(DEFUN |ILIST;reverse!;2$;16| (|x| $) (NREVERSE |x|)) + +(PUT '|ILIST;reverse;2$;17| '|SPADreplace| 'REVERSE) + +(DEFUN |ILIST;reverse;2$;17| (|x| $) (REVERSE |x|)) + +(DEFUN |ILIST;minIndex;$I;18| (|x| $) (QREFELT $ 7)) + +(DEFUN |ILIST;rest;$Nni$;19| (|x| |n| $) + (PROG (|i|) + (RETURN + (SEQ (SEQ (LETT |i| 1 |ILIST;rest;$Nni$;19|) G190 + (COND ((QSGREATERP |i| |n|) (GO G191))) + (SEQ (COND + ((NULL |x|) (|error| "index out of range"))) + (EXIT (LETT |x| (QCDR |x|) |ILIST;rest;$Nni$;19|))) + (LETT |i| (QSADD1 |i|) |ILIST;rest;$Nni$;19|) (GO G190) + G191 (EXIT NIL)) + (EXIT |x|))))) + +(DEFUN |ILIST;copy;2$;20| (|x| $) + (PROG (|i| |y|) + (RETURN + (SEQ (LETT |y| (SPADCALL (QREFELT $ 16)) |ILIST;copy;2$;20|) + (SEQ (LETT |i| 0 |ILIST;copy;2$;20|) G190 + (COND + ((NULL (SPADCALL (NULL |x|) (QREFELT $ 33))) + (GO G191))) + (SEQ (COND + ((EQ |i| 1000) + (COND + ((SPADCALL |x| (QREFELT $ 34)) + (|error| "cyclic list"))))) + (LETT |y| (CONS (QCAR |x|) |y|) + |ILIST;copy;2$;20|) + (EXIT (LETT |x| (QCDR |x|) |ILIST;copy;2$;20|))) + (LETT |i| (QSADD1 |i|) |ILIST;copy;2$;20|) (GO G190) + G191 (EXIT NIL)) + (EXIT (NREVERSE |y|)))))) + +(DEFUN |ILIST;coerce;$Of;21| (|x| $) + (PROG (|s| |y| |z|) + (RETURN + (SEQ (LETT |y| NIL |ILIST;coerce;$Of;21|) + (LETT |s| (SPADCALL |x| (QREFELT $ 36)) + |ILIST;coerce;$Of;21|) + (SEQ G190 (COND ((NULL (NEQ |x| |s|)) (GO G191))) + (SEQ (LETT |y| + (CONS (SPADCALL + (SPADCALL |x| (QREFELT $ 13)) + (QREFELT $ 38)) + |y|) + |ILIST;coerce;$Of;21|) + (EXIT (LETT |x| (SPADCALL |x| (QREFELT $ 18)) + |ILIST;coerce;$Of;21|))) + NIL (GO G190) G191 (EXIT NIL)) + (LETT |y| (NREVERSE |y|) |ILIST;coerce;$Of;21|) + (EXIT (COND + ((SPADCALL |s| (QREFELT $ 17)) + (SPADCALL |y| (QREFELT $ 40))) + ('T + (SEQ (LETT |z| + (SPADCALL + (SPADCALL + (SPADCALL |x| (QREFELT $ 13)) + (QREFELT $ 38)) + (QREFELT $ 42)) + |ILIST;coerce;$Of;21|) + (SEQ G190 + (COND + ((NULL (NEQ |s| + (SPADCALL |x| (QREFELT $ 18)))) + (GO G191))) + (SEQ (LETT |x| + (SPADCALL |x| (QREFELT $ 18)) + |ILIST;coerce;$Of;21|) + (EXIT + (LETT |z| + (CONS + (SPADCALL + (SPADCALL |x| (QREFELT $ 13)) + (QREFELT $ 38)) + |z|) + |ILIST;coerce;$Of;21|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (SPADCALL + (SPADCALL |y| + (SPADCALL + (SPADCALL (NREVERSE |z|) + (QREFELT $ 43)) + (QREFELT $ 44)) + (QREFELT $ 45)) + (QREFELT $ 40))))))))))) + +(DEFUN |ILIST;=;2$B;22| (|x| |y| $) + (PROG (#0=#:G1469) + (RETURN + (SEQ (EXIT (COND + ((EQ |x| |y|) 'T) + ('T + (SEQ (SEQ G190 + (COND + ((NULL (COND + ((NULL |x|) 'NIL) + ('T + (SPADCALL (NULL |y|) + (QREFELT $ 33))))) + (GO G191))) + (SEQ (EXIT + (COND + ((NULL + (SPADCALL (QCAR |x|) (QCAR |y|) + (QREFELT $ 47))) + (PROGN + (LETT #0# 'NIL + |ILIST;=;2$B;22|) + (GO #0#))) + ('T + (SEQ + (LETT |x| (QCDR |x|) + |ILIST;=;2$B;22|) + (EXIT + (LETT |y| (QCDR |y|) + |ILIST;=;2$B;22|))))))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (COND + ((NULL |x|) (NULL |y|)) + ('T 'NIL))))))) + #0# (EXIT #0#))))) + +(DEFUN |ILIST;latex;$S;23| (|x| $) + (PROG (|s|) + (RETURN + (SEQ (LETT |s| "\\left[" |ILIST;latex;$S;23|) + (SEQ G190 + (COND + ((NULL (SPADCALL (NULL |x|) (QREFELT $ 33))) + (GO G191))) + (SEQ (LETT |s| + (STRCONC |s| + (SPADCALL (QCAR |x|) + (QREFELT $ 50))) + |ILIST;latex;$S;23|) + (LETT |x| (QCDR |x|) |ILIST;latex;$S;23|) + (EXIT (COND + ((NULL (NULL |x|)) + (LETT |s| (STRCONC |s| ", ") + |ILIST;latex;$S;23|))))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (STRCONC |s| " \\right]")))))) + +(DEFUN |ILIST;member?;S$B;24| (|s| |x| $) + (PROG (#0=#:G1477) + (RETURN + (SEQ (EXIT (SEQ (SEQ G190 + (COND + ((NULL (SPADCALL (NULL |x|) + (QREFELT $ 33))) + (GO G191))) + (SEQ (EXIT (COND + ((SPADCALL |s| (QCAR |x|) + (QREFELT $ 47)) + (PROGN + (LETT #0# 'T + |ILIST;member?;S$B;24|) + (GO #0#))) + ('T + (LETT |x| (QCDR |x|) + |ILIST;member?;S$B;24|))))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT 'NIL))) + #0# (EXIT #0#))))) + +(DEFUN |ILIST;concat!;3$;25| (|x| |y| $) + (PROG (|z|) + (RETURN + (SEQ (COND + ((NULL |x|) + (COND + ((NULL |y|) |x|) + ('T + (SEQ (PUSH (SPADCALL |y| (QREFELT $ 13)) |x|) + (QRPLACD |x| (SPADCALL |y| (QREFELT $ 18))) + (EXIT |x|))))) + ('T + (SEQ (LETT |z| |x| |ILIST;concat!;3$;25|) + (SEQ G190 + (COND + ((NULL (SPADCALL (NULL (QCDR |z|)) + (QREFELT $ 33))) + (GO G191))) + (SEQ (EXIT (LETT |z| (QCDR |z|) + |ILIST;concat!;3$;25|))) + NIL (GO G190) G191 (EXIT NIL)) + (QRPLACD |z| |y|) (EXIT |x|)))))))) + +(DEFUN |ILIST;removeDuplicates!;2$;26| (|l| $) + (PROG (|f| |p| |pr| |pp|) + (RETURN + (SEQ (LETT |p| |l| |ILIST;removeDuplicates!;2$;26|) + (SEQ G190 + (COND + ((NULL (SPADCALL (NULL |p|) (QREFELT $ 33))) + (GO G191))) + (SEQ (LETT |pp| |p| |ILIST;removeDuplicates!;2$;26|) + (LETT |f| (QCAR |p|) + |ILIST;removeDuplicates!;2$;26|) + (LETT |p| (QCDR |p|) + |ILIST;removeDuplicates!;2$;26|) + (EXIT (SEQ G190 + (COND + ((NULL + (SPADCALL + (NULL + (LETT |pr| (QCDR |pp|) + |ILIST;removeDuplicates!;2$;26|)) + (QREFELT $ 33))) + (GO G191))) + (SEQ (EXIT + (COND + ((SPADCALL (QCAR |pr|) |f| + (QREFELT $ 47)) + (QRPLACD |pp| (QCDR |pr|))) + ('T + (LETT |pp| |pr| + |ILIST;removeDuplicates!;2$;26|))))) + NIL (GO G190) G191 (EXIT NIL)))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |l|))))) + +(DEFUN |ILIST;sort!;M2$;27| (|f| |l| $) + (|ILIST;mergeSort| |f| |l| (SPADCALL |l| (QREFELT $ 9)) $)) + +(DEFUN |ILIST;merge!;M3$;28| (|f| |p| |q| $) + (PROG (|r| |t|) + (RETURN + (SEQ (COND + ((NULL |p|) |q|) + ((NULL |q|) |p|) + ((EQ |p| |q|) (|error| "cannot merge a list into itself")) + ('T + (SEQ (COND + ((SPADCALL (QCAR |p|) (QCAR |q|) |f|) + (SEQ (LETT |r| + (LETT |t| |p| |ILIST;merge!;M3$;28|) + |ILIST;merge!;M3$;28|) + (EXIT (LETT |p| (QCDR |p|) + |ILIST;merge!;M3$;28|)))) + ('T + (SEQ (LETT |r| + (LETT |t| |q| |ILIST;merge!;M3$;28|) + |ILIST;merge!;M3$;28|) + (EXIT (LETT |q| (QCDR |q|) + |ILIST;merge!;M3$;28|))))) + (SEQ G190 + (COND + ((NULL (COND + ((NULL |p|) 'NIL) + ('T + (SPADCALL (NULL |q|) + (QREFELT $ 33))))) + (GO G191))) + (SEQ (EXIT (COND + ((SPADCALL (QCAR |p|) (QCAR |q|) + |f|) + (SEQ (QRPLACD |t| |p|) + (LETT |t| |p| + |ILIST;merge!;M3$;28|) + (EXIT + (LETT |p| (QCDR |p|) + |ILIST;merge!;M3$;28|)))) + ('T + (SEQ (QRPLACD |t| |q|) + (LETT |t| |q| + |ILIST;merge!;M3$;28|) + (EXIT + (LETT |q| (QCDR |q|) + |ILIST;merge!;M3$;28|))))))) + NIL (GO G190) G191 (EXIT NIL)) + (QRPLACD |t| (COND ((NULL |p|) |q|) ('T |p|))) + (EXIT |r|)))))))) + +(DEFUN |ILIST;split!;$I$;29| (|p| |n| $) + (PROG (#0=#:G1506 |q|) + (RETURN + (SEQ (COND + ((< |n| 1) (|error| "index out of range")) + ('T + (SEQ (LETT |p| + (SPADCALL |p| + (PROG1 (LETT #0# (- |n| 1) + |ILIST;split!;$I$;29|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) #0#)) + (QREFELT $ 32)) + |ILIST;split!;$I$;29|) + (LETT |q| (QCDR |p|) |ILIST;split!;$I$;29|) + (QRPLACD |p| NIL) (EXIT |q|)))))))) + +(DEFUN |ILIST;mergeSort| (|f| |p| |n| $) + (PROG (#0=#:G1510 |l| |q|) + (RETURN + (SEQ (COND + ((EQL |n| 2) + (COND + ((SPADCALL + (SPADCALL (SPADCALL |p| (QREFELT $ 18)) + (QREFELT $ 13)) + (SPADCALL |p| (QREFELT $ 13)) |f|) + (LETT |p| (SPADCALL |p| (QREFELT $ 28)) + |ILIST;mergeSort|))))) + (EXIT (COND + ((< |n| 3) |p|) + ('T + (SEQ (LETT |l| + (PROG1 (LETT #0# (QUOTIENT2 |n| 2) + |ILIST;mergeSort|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) #0#)) + |ILIST;mergeSort|) + (LETT |q| (SPADCALL |p| |l| (QREFELT $ 58)) + |ILIST;mergeSort|) + (LETT |p| (|ILIST;mergeSort| |f| |p| |l| $) + |ILIST;mergeSort|) + (LETT |q| + (|ILIST;mergeSort| |f| |q| (- |n| |l|) + $) + |ILIST;mergeSort|) + (EXIT (SPADCALL |f| |p| |q| (QREFELT $ 57))))))))))) + +(DEFUN |IndexedList| (&REST #0=#:G1525 &AUX #1=#:G1523) + (DSETQ #1# #0#) + (PROG () + (RETURN + (PROG (#2=#:G1524) + (RETURN + (COND + ((LETT #2# + (|lassocShiftWithFunction| (|devaluateList| #1#) + (HGET |$ConstructorCache| '|IndexedList|) + '|domainEqualList|) + |IndexedList|) + (|CDRwithIncrement| #2#)) + ('T + (UNWIND-PROTECT + (PROG1 (APPLY (|function| |IndexedList;|) #1#) + (LETT #2# T |IndexedList|)) + (COND + ((NOT #2#) (HREM |$ConstructorCache| '|IndexedList|))))))))))) + +(DEFUN |IndexedList;| (|#1| |#2|) + (PROG (|dv$1| |dv$2| |dv$| $ #0=#:G1522 #1=#:G1520 |pv$|) + (RETURN + (PROGN + (LETT |dv$1| (|devaluate| |#1|) . #2=(|IndexedList|)) + (LETT |dv$2| (|devaluate| |#2|) . #2#) + (LETT |dv$| (LIST '|IndexedList| |dv$1| |dv$2|) . #2#) + (LETT $ (GETREFV 72) . #2#) + (QSETREFV $ 0 |dv$|) + (QSETREFV $ 3 + (LETT |pv$| + (|buildPredVector| 0 0 + (LIST (|HasCategory| |#1| + '(|ConvertibleTo| (|InputForm|))) + (|HasCategory| |#1| '(|OrderedSet|)) + (|HasCategory| (|Integer|) '(|OrderedSet|)) + (LETT #0# + (|HasCategory| |#1| '(|SetCategory|)) . #2#) + (OR (|HasCategory| |#1| '(|OrderedSet|)) + #0#) + (AND #0# + (|HasCategory| |#1| + (LIST '|Evalable| + (|devaluate| |#1|)))) + (OR (AND (|HasCategory| |#1| + '(|OrderedSet|)) + (|HasCategory| |#1| + (LIST '|Evalable| + (|devaluate| |#1|)))) + (AND #0# + (|HasCategory| |#1| + (LIST '|Evalable| + (|devaluate| |#1|))))) + (LETT #1# + (|HasCategory| |#1| + '(|CoercibleTo| (|OutputForm|))) . #2#) + (OR (AND #0# + (|HasCategory| |#1| + (LIST '|Evalable| + (|devaluate| |#1|)))) + #1#))) . #2#)) + (|haddProp| |$ConstructorCache| '|IndexedList| + (LIST |dv$1| |dv$2|) (CONS 1 $)) + (|stuffDomainSlots| $) + (QSETREFV $ 6 |#1|) + (QSETREFV $ 7 |#2|) + (COND + ((|testBitVector| |pv$| 8) + (QSETREFV $ 46 + (CONS (|dispatchFunction| |ILIST;coerce;$Of;21|) $)))) + (COND + ((|testBitVector| |pv$| 4) + (PROGN + (QSETREFV $ 48 + (CONS (|dispatchFunction| |ILIST;=;2$B;22|) $)) + (QSETREFV $ 51 + (CONS (|dispatchFunction| |ILIST;latex;$S;23|) $)) + (QSETREFV $ 52 + (CONS (|dispatchFunction| |ILIST;member?;S$B;24|) $))))) + (COND + ((|testBitVector| |pv$| 4) + (QSETREFV $ 54 + (CONS (|dispatchFunction| + |ILIST;removeDuplicates!;2$;26|) + $)))) + $)))) + +(MAKEPROP '|IndexedList| '|infovec| + (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) + (|NonNegativeInteger|) |ILIST;#;$Nni;1| + |ILIST;concat;S2$;2| (|Boolean|) |ILIST;eq?;2$B;3| + |ILIST;first;$S;4| '"first" |ILIST;elt;$firstS;5| + |ILIST;empty;$;6| |ILIST;empty?;$B;7| |ILIST;rest;2$;8| + '"rest" |ILIST;elt;$rest$;9| |ILIST;setfirst!;$2S;10| + |ILIST;setelt;$first2S;11| |ILIST;setrest!;3$;12| + |ILIST;setelt;$rest2$;13| (|List| 6) + |ILIST;construct;L$;14| |ILIST;parts;$L;15| + |ILIST;reverse!;2$;16| |ILIST;reverse;2$;17| (|Integer|) + |ILIST;minIndex;$I;18| |ILIST;rest;$Nni$;19| (0 . |not|) + (5 . |cyclic?|) |ILIST;copy;2$;20| (10 . |cycleEntry|) + (|OutputForm|) (15 . |coerce|) (|List| $) (20 . |bracket|) + (|List| 37) (25 . |list|) (30 . |commaSeparate|) + (35 . |overbar|) (40 . |concat!|) (46 . |coerce|) (51 . =) + (57 . =) (|String|) (63 . |latex|) (68 . |latex|) + (73 . |member?|) |ILIST;concat!;3$;25| + (79 . |removeDuplicates!|) (|Mapping| 11 6 6) + |ILIST;sort!;M2$;27| |ILIST;merge!;M3$;28| + |ILIST;split!;$I$;29| (|Mapping| 6 6 6) (|Equation| 6) + (|List| 60) (|Mapping| 11 6) (|Void|) + (|UniversalSegment| 30) '"last" '"value" (|Mapping| 6 6) + (|InputForm|) (|SingleInteger|) (|List| 30) + (|Union| 6 '"failed")) + '#(~= 84 |value| 90 |third| 95 |tail| 100 |swap!| 105 + |split!| 112 |sorted?| 118 |sort!| 129 |sort| 140 |size?| + 151 |setvalue!| 157 |setrest!| 163 |setlast!| 169 + |setfirst!| 175 |setelt| 181 |setchildren!| 223 |select!| + 229 |select| 235 |second| 241 |sample| 246 |reverse!| 250 + |reverse| 255 |rest| 260 |removeDuplicates!| 271 + |removeDuplicates| 276 |remove!| 281 |remove| 293 |reduce| + 305 |qsetelt!| 326 |qelt| 333 |possiblyInfinite?| 339 + |position| 344 |parts| 363 |nodes| 368 |node?| 373 |new| + 379 |more?| 385 |minIndex| 391 |min| 396 |merge!| 402 + |merge| 415 |members| 428 |member?| 433 |maxIndex| 439 + |max| 444 |map!| 450 |map| 456 |list| 469 |less?| 474 + |leaves| 480 |leaf?| 485 |latex| 490 |last| 495 |insert!| + 506 |insert| 520 |indices| 534 |index?| 539 |hash| 545 + |first| 550 |find| 561 |fill!| 567 |explicitlyFinite?| 573 + |every?| 578 |eval| 584 |eq?| 610 |entry?| 616 |entries| + 622 |empty?| 627 |empty| 632 |elt| 636 |distance| 679 + |delete!| 685 |delete| 697 |cyclic?| 709 |cycleTail| 714 + |cycleSplit!| 719 |cycleLength| 724 |cycleEntry| 729 + |count| 734 |copyInto!| 746 |copy| 753 |convert| 758 + |construct| 763 |concat!| 768 |concat| 780 |coerce| 803 + |children| 808 |child?| 813 |any?| 819 >= 825 > 831 = 837 + <= 843 < 849 |#| 855) + '((|shallowlyMutable| . 0) (|finiteAggregate| . 0)) + (CONS (|makeByteWordVec2| 9 + '(0 0 0 0 0 0 0 0 0 0 2 0 0 7 5 0 0 7 9 1 5)) + (CONS '#(|ListAggregate&| |StreamAggregate&| + |ExtensibleLinearAggregate&| + |FiniteLinearAggregate&| + |UnaryRecursiveAggregate&| |LinearAggregate&| + |RecursiveAggregate&| |IndexedAggregate&| + |Collection&| |HomogeneousAggregate&| + |OrderedSet&| |Aggregate&| |EltableAggregate&| + |Evalable&| |SetCategory&| NIL NIL + |InnerEvalable&| NIL NIL |BasicType&|) + (CONS '#((|ListAggregate| 6) + (|StreamAggregate| 6) + (|ExtensibleLinearAggregate| 6) + (|FiniteLinearAggregate| 6) + (|UnaryRecursiveAggregate| 6) + (|LinearAggregate| 6) + (|RecursiveAggregate| 6) + (|IndexedAggregate| 30 6) + (|Collection| 6) + (|HomogeneousAggregate| 6) + (|OrderedSet|) (|Aggregate|) + (|EltableAggregate| 30 6) (|Evalable| 6) + (|SetCategory|) (|Type|) + (|Eltable| 30 6) (|InnerEvalable| 6 6) + (|CoercibleTo| 37) (|ConvertibleTo| 68) + (|BasicType|)) + (|makeByteWordVec2| 71 + '(1 11 0 0 33 1 0 11 0 34 1 0 0 0 36 1 + 6 37 0 38 1 37 0 39 40 1 41 0 37 42 1 + 37 0 39 43 1 37 0 0 44 2 41 0 0 37 45 + 1 0 37 0 46 2 6 11 0 0 47 2 0 11 0 0 + 48 1 6 49 0 50 1 0 49 0 51 2 0 11 6 0 + 52 1 0 0 0 54 2 4 11 0 0 1 1 0 6 0 1 + 1 0 6 0 1 1 0 0 0 1 3 0 63 0 30 30 1 + 2 0 0 0 30 58 1 2 11 0 1 2 0 11 55 0 + 1 1 2 0 0 1 2 0 0 55 0 56 1 2 0 0 1 2 + 0 0 55 0 1 2 0 11 0 8 1 2 0 6 0 6 1 2 + 0 0 0 0 23 2 0 6 0 6 1 2 0 6 0 6 21 3 + 0 6 0 30 6 1 3 0 6 0 64 6 1 3 0 6 0 + 65 6 1 3 0 0 0 19 0 24 3 0 6 0 14 6 + 22 3 0 6 0 66 6 1 2 0 0 0 39 1 2 0 0 + 62 0 1 2 0 0 62 0 1 1 0 6 0 1 0 0 0 1 + 1 0 0 0 28 1 0 0 0 29 2 0 0 0 8 32 1 + 0 0 0 18 1 4 0 0 54 1 4 0 0 1 2 4 0 6 + 0 1 2 0 0 62 0 1 2 4 0 6 0 1 2 0 0 62 + 0 1 4 4 6 59 0 6 6 1 2 0 6 59 0 1 3 0 + 6 59 0 6 1 3 0 6 0 30 6 1 2 0 6 0 30 + 1 1 0 11 0 1 2 4 30 6 0 1 3 4 30 6 0 + 30 1 2 0 30 62 0 1 1 0 25 0 27 1 0 39 + 0 1 2 4 11 0 0 1 2 0 0 8 6 1 2 0 11 0 + 8 1 1 3 30 0 31 2 2 0 0 0 1 2 2 0 0 0 + 1 3 0 0 55 0 0 57 2 2 0 0 0 1 3 0 0 + 55 0 0 1 1 0 25 0 1 2 4 11 6 0 52 1 3 + 30 0 1 2 2 0 0 0 1 2 0 0 67 0 1 3 0 0 + 59 0 0 1 2 0 0 67 0 1 1 0 0 6 1 2 0 + 11 0 8 1 1 0 25 0 1 1 0 11 0 1 1 4 49 + 0 51 2 0 0 0 8 1 1 0 6 0 1 3 0 0 6 0 + 30 1 3 0 0 0 0 30 1 3 0 0 0 0 30 1 3 + 0 0 6 0 30 1 1 0 70 0 1 2 0 11 30 0 1 + 1 4 69 0 1 2 0 0 0 8 1 1 0 6 0 13 2 0 + 71 62 0 1 2 0 0 0 6 1 1 0 11 0 1 2 0 + 11 62 0 1 3 6 0 0 6 6 1 3 6 0 0 25 25 + 1 2 6 0 0 60 1 2 6 0 0 61 1 2 0 11 0 + 0 12 2 4 11 6 0 1 1 0 25 0 1 1 0 11 0 + 17 0 0 0 16 2 0 6 0 30 1 3 0 6 0 30 6 + 1 2 0 0 0 64 1 2 0 6 0 65 1 2 0 0 0 + 19 20 2 0 6 0 14 15 2 0 6 0 66 1 2 0 + 30 0 0 1 2 0 0 0 64 1 2 0 0 0 30 1 2 + 0 0 0 64 1 2 0 0 0 30 1 1 0 11 0 34 1 + 0 0 0 1 1 0 0 0 1 1 0 8 0 1 1 0 0 0 + 36 2 4 8 6 0 1 2 0 8 62 0 1 3 0 0 0 0 + 30 1 1 0 0 0 35 1 1 68 0 1 1 0 0 25 + 26 2 0 0 0 0 53 2 0 0 0 6 1 1 0 0 39 + 1 2 0 0 0 6 1 2 0 0 6 0 10 2 0 0 0 0 + 1 1 8 37 0 46 1 0 39 0 1 2 4 11 0 0 1 + 2 0 11 62 0 1 2 2 11 0 0 1 2 2 11 0 0 + 1 2 4 11 0 0 48 2 2 11 0 0 1 2 2 11 0 + 0 1 1 0 8 0 9))))) + '|lookupComplete|)) @ \section{domain LIST List} <<domain LIST List>>= @@ -455,47 +982,307 @@ Note that this code is not included in the generated catdef.spad file. <<LIST.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(PUT (QUOTE |LIST;nil;$;1|) (QUOTE |SPADreplace|) (QUOTE (XLAM NIL NIL))) - -(DEFUN |LIST;nil;$;1| (|$|) NIL) - -(PUT (QUOTE |LIST;null;$B;2|) (QUOTE |SPADreplace|) (QUOTE NULL)) - -(DEFUN |LIST;null;$B;2| (|l| |$|) (NULL |l|)) - -(PUT (QUOTE |LIST;cons;S2$;3|) (QUOTE |SPADreplace|) (QUOTE CONS)) - -(DEFUN |LIST;cons;S2$;3| (|s| |l| |$|) (CONS |s| |l|)) - -(PUT (QUOTE |LIST;append;3$;4|) (QUOTE |SPADreplace|) (QUOTE APPEND)) - -(DEFUN |LIST;append;3$;4| (|l| |t| |$|) (APPEND |l| |t|)) - -(DEFUN |LIST;writeOMList| (|dev| |x| |$|) (SEQ (SPADCALL |dev| (QREFELT |$| 14)) (SPADCALL |dev| "list1" "list" (QREFELT |$| 16)) (SEQ G190 (COND ((NULL (COND ((NULL |x|) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (SPADCALL |dev| (|SPADfirst| |x|) (QUOTE NIL) (QREFELT |$| 17)) (EXIT (LETT |x| (CDR |x|) |LIST;writeOMList|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (SPADCALL |dev| (QREFELT |$| 18))))) - -(DEFUN |LIST;OMwrite;$S;6| (|x| |$|) (PROG (|sp| |dev| |s|) (RETURN (SEQ (LETT |s| "" |LIST;OMwrite;$S;6|) (LETT |sp| (|OM-STRINGTOSTRINGPTR| |s|) |LIST;OMwrite;$S;6|) (LETT |dev| (SPADCALL |sp| (SPADCALL (QREFELT |$| 20)) (QREFELT |$| 21)) |LIST;OMwrite;$S;6|) (SPADCALL |dev| (QREFELT |$| 22)) (|LIST;writeOMList| |dev| |x| |$|) (SPADCALL |dev| (QREFELT |$| 23)) (SPADCALL |dev| (QREFELT |$| 24)) (LETT |s| (|OM-STRINGPTRTOSTRING| |sp|) |LIST;OMwrite;$S;6|) (EXIT |s|))))) - -(DEFUN |LIST;OMwrite;$BS;7| (|x| |wholeObj| |$|) (PROG (|sp| |dev| |s|) (RETURN (SEQ (LETT |s| "" |LIST;OMwrite;$BS;7|) (LETT |sp| (|OM-STRINGTOSTRINGPTR| |s|) |LIST;OMwrite;$BS;7|) (LETT |dev| (SPADCALL |sp| (SPADCALL (QREFELT |$| 20)) (QREFELT |$| 21)) |LIST;OMwrite;$BS;7|) (COND (|wholeObj| (SPADCALL |dev| (QREFELT |$| 22)))) (|LIST;writeOMList| |dev| |x| |$|) (COND (|wholeObj| (SPADCALL |dev| (QREFELT |$| 23)))) (SPADCALL |dev| (QREFELT |$| 24)) (LETT |s| (|OM-STRINGPTRTOSTRING| |sp|) |LIST;OMwrite;$BS;7|) (EXIT |s|))))) - -(DEFUN |LIST;OMwrite;Omd$V;8| (|dev| |x| |$|) (SEQ (SPADCALL |dev| (QREFELT |$| 22)) (|LIST;writeOMList| |dev| |x| |$|) (EXIT (SPADCALL |dev| (QREFELT |$| 23))))) - -(DEFUN |LIST;OMwrite;Omd$BV;9| (|dev| |x| |wholeObj| |$|) (SEQ (COND (|wholeObj| (SPADCALL |dev| (QREFELT |$| 22)))) (|LIST;writeOMList| |dev| |x| |$|) (EXIT (COND (|wholeObj| (SPADCALL |dev| (QREFELT |$| 23))))))) - -(DEFUN |LIST;setUnion;3$;10| (|l1| |l2| |$|) (SPADCALL (SPADCALL |l1| |l2| (QREFELT |$| 29)) (QREFELT |$| 30))) - -(DEFUN |LIST;setIntersection;3$;11| (|l1| |l2| |$|) (PROG (|u|) (RETURN (SEQ (LETT |u| NIL |LIST;setIntersection;3$;11|) (LETT |l1| (SPADCALL |l1| (QREFELT |$| 30)) |LIST;setIntersection;3$;11|) (SEQ G190 (COND ((NULL (COND ((NULL |l1|) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (COND ((SPADCALL (|SPADfirst| |l1|) |l2| (QREFELT |$| 32)) (LETT |u| (CONS (|SPADfirst| |l1|) |u|) |LIST;setIntersection;3$;11|))) (EXIT (LETT |l1| (CDR |l1|) |LIST;setIntersection;3$;11|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT |u|))))) - -(DEFUN |LIST;setDifference;3$;12| (|l1| |l2| |$|) (PROG (|l11| |lu|) (RETURN (SEQ (LETT |l1| (SPADCALL |l1| (QREFELT |$| 30)) |LIST;setDifference;3$;12|) (LETT |lu| NIL |LIST;setDifference;3$;12|) (SEQ G190 (COND ((NULL (COND ((NULL |l1|) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (LETT |l11| (SPADCALL |l1| 1 (QREFELT |$| 35)) |LIST;setDifference;3$;12|) (COND ((NULL (SPADCALL |l11| |l2| (QREFELT |$| 32))) (LETT |lu| (CONS |l11| |lu|) |LIST;setDifference;3$;12|))) (EXIT (LETT |l1| (CDR |l1|) |LIST;setDifference;3$;12|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT |lu|))))) - -(DEFUN |LIST;convert;$If;13| (|x| |$|) (PROG (#1=#:G102544 |a| #2=#:G102545) (RETURN (SEQ (SPADCALL (CONS (SPADCALL (SPADCALL "construct" (QREFELT |$| 38)) (QREFELT |$| 40)) (PROGN (LETT #1# NIL |LIST;convert;$If;13|) (SEQ (LETT |a| NIL |LIST;convert;$If;13|) (LETT #2# |x| |LIST;convert;$If;13|) G190 (COND ((OR (ATOM #2#) (PROGN (LETT |a| (CAR #2#) |LIST;convert;$If;13|) NIL)) (GO G191))) (SEQ (EXIT (LETT #1# (CONS (SPADCALL |a| (QREFELT |$| 41)) #1#) |LIST;convert;$If;13|))) (LETT #2# (CDR #2#) |LIST;convert;$If;13|) (GO G190) G191 (EXIT (NREVERSE0 #1#))))) (QREFELT |$| 43)))))) - -(DEFUN |List| (#1=#:G102555) (PROG NIL (RETURN (PROG (#2=#:G102556) (RETURN (COND ((LETT #2# (|lassocShiftWithFunction| (LIST (|devaluate| #1#)) (HGET |$ConstructorCache| (QUOTE |List|)) (QUOTE |domainEqualList|)) |List|) (|CDRwithIncrement| #2#)) ((QUOTE T) (|UNWIND-PROTECT| (PROG1 (|List;| #1#) (LETT #2# T |List|)) (COND ((NOT #2#) (HREM |$ConstructorCache| (QUOTE |List|)))))))))))) - -(DEFUN |List;| (|#1|) (PROG (|DV$1| |dv$| |$| #1=#:G102554 |pv$|) (RETURN (PROGN (LETT |DV$1| (|devaluate| |#1|) . #2=(|List|)) (LETT |dv$| (LIST (QUOTE |List|) |DV$1|) . #2#) (LETT |$| (GETREFV 62) . #2#) (QSETREFV |$| 0 |dv$|) (QSETREFV |$| 3 (LETT |pv$| (|buildPredVector| 0 0 (LIST (|HasCategory| |#1| (QUOTE (|SetCategory|))) (|HasCategory| |#1| (QUOTE (|ConvertibleTo| (|InputForm|)))) (LETT #1# (|HasCategory| |#1| (QUOTE (|OrderedSet|))) . #2#) (OR #1# (|HasCategory| |#1| (QUOTE (|SetCategory|)))) (|HasCategory| |#1| (QUOTE (|OpenMath|))) (|HasCategory| (|Integer|) (QUOTE (|OrderedSet|))) (AND (|HasCategory| |#1| (LIST (QUOTE |Evalable|) (|devaluate| |#1|))) (|HasCategory| |#1| (QUOTE (|SetCategory|)))) (OR (AND (|HasCategory| |#1| (LIST (QUOTE |Evalable|) (|devaluate| |#1|))) #1#) (AND (|HasCategory| |#1| (LIST (QUOTE |Evalable|) (|devaluate| |#1|))) (|HasCategory| |#1| (QUOTE (|SetCategory|))))))) . #2#)) (|haddProp| |$ConstructorCache| (QUOTE |List|) (LIST |DV$1|) (CONS 1 |$|)) (|stuffDomainSlots| |$|) (QSETREFV |$| 6 |#1|) (COND ((|testBitVector| |pv$| 5) (PROGN (QSETREFV |$| 25 (CONS (|dispatchFunction| |LIST;OMwrite;$S;6|) |$|)) (QSETREFV |$| 26 (CONS (|dispatchFunction| |LIST;OMwrite;$BS;7|) |$|)) (QSETREFV |$| 27 (CONS (|dispatchFunction| |LIST;OMwrite;Omd$V;8|) |$|)) (QSETREFV |$| 28 (CONS (|dispatchFunction| |LIST;OMwrite;Omd$BV;9|) |$|))))) (COND ((|testBitVector| |pv$| 1) (PROGN (QSETREFV |$| 31 (CONS (|dispatchFunction| |LIST;setUnion;3$;10|) |$|)) (QSETREFV |$| 33 (CONS (|dispatchFunction| |LIST;setIntersection;3$;11|) |$|)) (QSETREFV |$| 36 (CONS (|dispatchFunction| |LIST;setDifference;3$;12|) |$|))))) (COND ((|testBitVector| |pv$| 2) (QSETREFV |$| 44 (CONS (|dispatchFunction| |LIST;convert;$If;13|) |$|)))) |$|)))) - -(MAKEPROP (QUOTE |List|) (QUOTE |infovec|) (LIST (QUOTE #(NIL NIL NIL NIL NIL (|IndexedList| 6 (NRTEVAL 1)) (|local| |#1|) |LIST;nil;$;1| (|Boolean|) |LIST;null;$B;2| |LIST;cons;S2$;3| |LIST;append;3$;4| (|Void|) (|OpenMathDevice|) (0 . |OMputApp|) (|String|) (5 . |OMputSymbol|) (12 . |OMwrite|) (19 . |OMputEndApp|) (|OpenMathEncoding|) (24 . |OMencodingXML|) (28 . |OMopenString|) (34 . |OMputObject|) (39 . |OMputEndObject|) (44 . |OMclose|) (49 . |OMwrite|) (54 . |OMwrite|) (60 . |OMwrite|) (66 . |OMwrite|) (73 . |concat|) (79 . |removeDuplicates|) (84 . |setUnion|) (90 . |member?|) (96 . |setIntersection|) (|Integer|) (102 . |elt|) (108 . |setDifference|) (|Symbol|) (114 . |coerce|) (|InputForm|) (119 . |convert|) (124 . |convert|) (|List| |$|) (129 . |convert|) (134 . |convert|) (|Mapping| 6 6 6) (|NonNegativeInteger|) (|List| 6) (|List| 49) (|Equation| 6) (|Mapping| 8 6) (|Mapping| 8 6 6) (|UniversalSegment| 34) (QUOTE "last") (QUOTE "rest") (QUOTE "first") (QUOTE "value") (|Mapping| 6 6) (|SingleInteger|) (|OutputForm|) (|List| 34) (|Union| 6 (QUOTE "failed")))) (QUOTE #(|setUnion| 139 |setIntersection| 145 |setDifference| 151 |removeDuplicates| 157 |null| 162 |nil| 167 |member?| 171 |elt| 177 |convert| 183 |cons| 188 |concat| 194 |append| 200 |OMwrite| 206)) (QUOTE ((|shallowlyMutable| . 0) (|finiteAggregate| . 0))) (CONS (|makeByteWordVec2| 8 (QUOTE (0 0 0 0 0 0 0 0 0 0 3 0 0 8 4 0 0 8 1 2 4 5))) (CONS (QUOTE #(|ListAggregate&| |StreamAggregate&| |ExtensibleLinearAggregate&| |FiniteLinearAggregate&| |UnaryRecursiveAggregate&| |LinearAggregate&| |RecursiveAggregate&| |IndexedAggregate&| |Collection&| |HomogeneousAggregate&| |OrderedSet&| |Aggregate&| |EltableAggregate&| |Evalable&| |SetCategory&| NIL NIL |InnerEvalable&| NIL NIL |BasicType&| NIL)) (CONS (QUOTE #((|ListAggregate| 6) (|StreamAggregate| 6) (|ExtensibleLinearAggregate| 6) (|FiniteLinearAggregate| 6) (|UnaryRecursiveAggregate| 6) (|LinearAggregate| 6) (|RecursiveAggregate| 6) (|IndexedAggregate| 34 6) (|Collection| 6) (|HomogeneousAggregate| 6) (|OrderedSet|) (|Aggregate|) (|EltableAggregate| 34 6) (|Evalable| 6) (|SetCategory|) (|Type|) (|Eltable| 34 6) (|InnerEvalable| 6 6) (|CoercibleTo| 59) (|ConvertibleTo| 39) (|BasicType|) (|OpenMath|))) (|makeByteWordVec2| 44 (QUOTE (1 13 12 0 14 3 13 12 0 15 15 16 3 6 12 13 0 8 17 1 13 12 0 18 0 19 0 20 2 13 0 15 19 21 1 13 12 0 22 1 13 12 0 23 1 13 12 0 24 1 0 15 0 25 2 0 15 0 8 26 2 0 12 13 0 27 3 0 12 13 0 8 28 2 0 0 0 0 29 1 0 0 0 30 2 0 0 0 0 31 2 0 8 6 0 32 2 0 0 0 0 33 2 0 6 0 34 35 2 0 0 0 0 36 1 37 0 15 38 1 39 0 37 40 1 6 39 0 41 1 39 0 42 43 1 0 39 0 44 2 1 0 0 0 31 2 1 0 0 0 33 2 1 0 0 0 36 1 1 0 0 30 1 0 8 0 9 0 0 0 7 2 1 8 6 0 32 2 0 6 0 34 35 1 2 39 0 44 2 0 0 6 0 10 2 0 0 0 0 29 2 0 0 0 0 11 3 5 12 13 0 8 28 2 5 12 13 0 27 1 5 15 0 25 2 5 15 0 8 26)))))) (QUOTE |lookupIncomplete|))) +(/VERSIONCHECK 2) + +(PUT '|LIST;nil;$;1| '|SPADreplace| '(XLAM NIL NIL)) + +(DEFUN |LIST;nil;$;1| ($) NIL) + +(PUT '|LIST;null;$B;2| '|SPADreplace| 'NULL) + +(DEFUN |LIST;null;$B;2| (|l| $) (NULL |l|)) + +(PUT '|LIST;cons;S2$;3| '|SPADreplace| 'CONS) + +(DEFUN |LIST;cons;S2$;3| (|s| |l| $) (CONS |s| |l|)) + +(PUT '|LIST;append;3$;4| '|SPADreplace| 'APPEND) + +(DEFUN |LIST;append;3$;4| (|l| |t| $) (APPEND |l| |t|)) + +(DEFUN |LIST;writeOMList| (|dev| |x| $) + (SEQ (SPADCALL |dev| (QREFELT $ 14)) + (SPADCALL |dev| "list1" "list" (QREFELT $ 16)) + (SEQ G190 + (COND + ((NULL (SPADCALL (NULL |x|) (QREFELT $ 17))) (GO G191))) + (SEQ (SPADCALL |dev| (|SPADfirst| |x|) 'NIL (QREFELT $ 18)) + (EXIT (LETT |x| (CDR |x|) |LIST;writeOMList|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (SPADCALL |dev| (QREFELT $ 19))))) + +(DEFUN |LIST;OMwrite;$S;6| (|x| $) + (PROG (|sp| |dev| |s|) + (RETURN + (SEQ (LETT |s| "" |LIST;OMwrite;$S;6|) + (LETT |sp| (OM-STRINGTOSTRINGPTR |s|) |LIST;OMwrite;$S;6|) + (LETT |dev| + (SPADCALL |sp| (SPADCALL (QREFELT $ 21)) + (QREFELT $ 22)) + |LIST;OMwrite;$S;6|) + (SPADCALL |dev| (QREFELT $ 23)) + (|LIST;writeOMList| |dev| |x| $) + (SPADCALL |dev| (QREFELT $ 24)) + (SPADCALL |dev| (QREFELT $ 25)) + (LETT |s| (OM-STRINGPTRTOSTRING |sp|) |LIST;OMwrite;$S;6|) + (EXIT |s|))))) + +(DEFUN |LIST;OMwrite;$BS;7| (|x| |wholeObj| $) + (PROG (|sp| |dev| |s|) + (RETURN + (SEQ (LETT |s| "" |LIST;OMwrite;$BS;7|) + (LETT |sp| (OM-STRINGTOSTRINGPTR |s|) |LIST;OMwrite;$BS;7|) + (LETT |dev| + (SPADCALL |sp| (SPADCALL (QREFELT $ 21)) + (QREFELT $ 22)) + |LIST;OMwrite;$BS;7|) + (COND (|wholeObj| (SPADCALL |dev| (QREFELT $ 23)))) + (|LIST;writeOMList| |dev| |x| $) + (COND (|wholeObj| (SPADCALL |dev| (QREFELT $ 24)))) + (SPADCALL |dev| (QREFELT $ 25)) + (LETT |s| (OM-STRINGPTRTOSTRING |sp|) |LIST;OMwrite;$BS;7|) + (EXIT |s|))))) + +(DEFUN |LIST;OMwrite;Omd$V;8| (|dev| |x| $) + (SEQ (SPADCALL |dev| (QREFELT $ 23)) (|LIST;writeOMList| |dev| |x| $) + (EXIT (SPADCALL |dev| (QREFELT $ 24))))) + +(DEFUN |LIST;OMwrite;Omd$BV;9| (|dev| |x| |wholeObj| $) + (SEQ (COND (|wholeObj| (SPADCALL |dev| (QREFELT $ 23)))) + (|LIST;writeOMList| |dev| |x| $) + (EXIT (COND (|wholeObj| (SPADCALL |dev| (QREFELT $ 24))))))) + +(DEFUN |LIST;setUnion;3$;10| (|l1| |l2| $) + (SPADCALL (SPADCALL |l1| |l2| (QREFELT $ 30)) (QREFELT $ 31))) + +(DEFUN |LIST;setIntersection;3$;11| (|l1| |l2| $) + (PROG (|u|) + (RETURN + (SEQ (LETT |u| NIL |LIST;setIntersection;3$;11|) + (LETT |l1| (SPADCALL |l1| (QREFELT $ 31)) + |LIST;setIntersection;3$;11|) + (SEQ G190 + (COND + ((NULL (SPADCALL (NULL |l1|) (QREFELT $ 17))) + (GO G191))) + (SEQ (COND + ((SPADCALL (|SPADfirst| |l1|) |l2| + (QREFELT $ 33)) + (LETT |u| (CONS (|SPADfirst| |l1|) |u|) + |LIST;setIntersection;3$;11|))) + (EXIT (LETT |l1| (CDR |l1|) + |LIST;setIntersection;3$;11|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |u|))))) + +(DEFUN |LIST;setDifference;3$;12| (|l1| |l2| $) + (PROG (|l11| |lu|) + (RETURN + (SEQ (LETT |l1| (SPADCALL |l1| (QREFELT $ 31)) + |LIST;setDifference;3$;12|) + (LETT |lu| NIL |LIST;setDifference;3$;12|) + (SEQ G190 + (COND + ((NULL (SPADCALL (NULL |l1|) (QREFELT $ 17))) + (GO G191))) + (SEQ (LETT |l11| (SPADCALL |l1| 1 (QREFELT $ 36)) + |LIST;setDifference;3$;12|) + (COND + ((NULL (SPADCALL |l11| |l2| (QREFELT $ 33))) + (LETT |lu| (CONS |l11| |lu|) + |LIST;setDifference;3$;12|))) + (EXIT (LETT |l1| (CDR |l1|) + |LIST;setDifference;3$;12|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |lu|))))) + +(DEFUN |LIST;convert;$If;13| (|x| $) + (PROG (#0=#:G1440 |a| #1=#:G1441) + (RETURN + (SEQ (SPADCALL + (CONS (SPADCALL (SPADCALL "construct" (QREFELT $ 39)) + (QREFELT $ 41)) + (PROGN + (LETT #0# NIL |LIST;convert;$If;13|) + (SEQ (LETT |a| NIL |LIST;convert;$If;13|) + (LETT #1# |x| |LIST;convert;$If;13|) G190 + (COND + ((OR (ATOM #1#) + (PROGN + (LETT |a| (CAR #1#) + |LIST;convert;$If;13|) + NIL)) + (GO G191))) + (SEQ (EXIT (LETT #0# + (CONS + (SPADCALL |a| (QREFELT $ 42)) + #0#) + |LIST;convert;$If;13|))) + (LETT #1# (CDR #1#) |LIST;convert;$If;13|) + (GO G190) G191 (EXIT (NREVERSE0 #0#))))) + (QREFELT $ 44)))))) + +(DEFUN |List| (#0=#:G1452) + (PROG () + (RETURN + (PROG (#1=#:G1453) + (RETURN + (COND + ((LETT #1# + (|lassocShiftWithFunction| (LIST (|devaluate| #0#)) + (HGET |$ConstructorCache| '|List|) + '|domainEqualList|) + |List|) + (|CDRwithIncrement| #1#)) + ('T + (UNWIND-PROTECT + (PROG1 (|List;| #0#) (LETT #1# T |List|)) + (COND ((NOT #1#) (HREM |$ConstructorCache| '|List|))))))))))) + +(DEFUN |List;| (|#1|) + (PROG (|dv$1| |dv$| $ #0=#:G1451 #1=#:G1449 |pv$|) + (RETURN + (PROGN + (LETT |dv$1| (|devaluate| |#1|) . #2=(|List|)) + (LETT |dv$| (LIST '|List| |dv$1|) . #2#) + (LETT $ (GETREFV 63) . #2#) + (QSETREFV $ 0 |dv$|) + (QSETREFV $ 3 + (LETT |pv$| + (|buildPredVector| 0 0 + (LIST (|HasCategory| |#1| + '(|ConvertibleTo| (|InputForm|))) + (|HasCategory| |#1| '(|OrderedSet|)) + (|HasCategory| |#1| '(|OpenMath|)) + (|HasCategory| (|Integer|) '(|OrderedSet|)) + (LETT #0# + (|HasCategory| |#1| '(|SetCategory|)) . #2#) + (OR (|HasCategory| |#1| '(|OrderedSet|)) + #0#) + (AND #0# + (|HasCategory| |#1| + (LIST '|Evalable| + (|devaluate| |#1|)))) + (OR (AND (|HasCategory| |#1| + '(|OrderedSet|)) + (|HasCategory| |#1| + (LIST '|Evalable| + (|devaluate| |#1|)))) + (AND #0# + (|HasCategory| |#1| + (LIST '|Evalable| + (|devaluate| |#1|))))) + (LETT #1# + (|HasCategory| |#1| + '(|CoercibleTo| (|OutputForm|))) . #2#) + (OR (AND #0# + (|HasCategory| |#1| + (LIST '|Evalable| + (|devaluate| |#1|)))) + #1#))) . #2#)) + (|haddProp| |$ConstructorCache| '|List| (LIST |dv$1|) + (CONS 1 $)) + (|stuffDomainSlots| $) + (QSETREFV $ 6 |#1|) + (COND + ((|testBitVector| |pv$| 3) + (PROGN + (QSETREFV $ 26 + (CONS (|dispatchFunction| |LIST;OMwrite;$S;6|) $)) + (QSETREFV $ 27 + (CONS (|dispatchFunction| |LIST;OMwrite;$BS;7|) $)) + (QSETREFV $ 28 + (CONS (|dispatchFunction| |LIST;OMwrite;Omd$V;8|) $)) + (QSETREFV $ 29 + (CONS (|dispatchFunction| |LIST;OMwrite;Omd$BV;9|) $))))) + (COND + ((|testBitVector| |pv$| 5) + (PROGN + (QSETREFV $ 32 + (CONS (|dispatchFunction| |LIST;setUnion;3$;10|) $)) + (QSETREFV $ 34 + (CONS (|dispatchFunction| + |LIST;setIntersection;3$;11|) + $)) + (QSETREFV $ 37 + (CONS (|dispatchFunction| |LIST;setDifference;3$;12|) + $))))) + (COND + ((|testBitVector| |pv$| 1) + (QSETREFV $ 45 + (CONS (|dispatchFunction| |LIST;convert;$If;13|) $)))) + $)))) + +(MAKEPROP '|List| '|infovec| + (LIST '#(NIL NIL NIL NIL NIL (|IndexedList| 6 (NRTEVAL 1)) + (|local| |#1|) |LIST;nil;$;1| (|Boolean|) |LIST;null;$B;2| + |LIST;cons;S2$;3| |LIST;append;3$;4| (|Void|) + (|OpenMathDevice|) (0 . |OMputApp|) (|String|) + (5 . |OMputSymbol|) (12 . |not|) (17 . |OMwrite|) + (24 . |OMputEndApp|) (|OpenMathEncoding|) + (29 . |OMencodingXML|) (33 . |OMopenString|) + (39 . |OMputObject|) (44 . |OMputEndObject|) + (49 . |OMclose|) (54 . |OMwrite|) (59 . |OMwrite|) + (65 . |OMwrite|) (71 . |OMwrite|) (78 . |concat|) + (84 . |removeDuplicates|) (89 . |setUnion|) + (95 . |member?|) (101 . |setIntersection|) (|Integer|) + (107 . |elt|) (113 . |setDifference|) (|Symbol|) + (119 . |coerce|) (|InputForm|) (124 . |convert|) + (129 . |convert|) (|List| $) (134 . |convert|) + (139 . |convert|) (|Mapping| 6 6 6) (|NonNegativeInteger|) + (|List| 6) (|List| 50) (|Equation| 6) (|Mapping| 8 6) + (|Mapping| 8 6 6) (|UniversalSegment| 35) '"last" '"rest" + '"first" '"value" (|Mapping| 6 6) (|OutputForm|) + (|SingleInteger|) (|List| 35) (|Union| 6 '"failed")) + '#(|setUnion| 144 |setIntersection| 150 |setDifference| 156 + |removeDuplicates| 162 |null| 167 |nil| 172 |member?| 176 + |elt| 182 |convert| 188 |cons| 193 |concat| 199 |append| + 205 |OMwrite| 211) + '((|shallowlyMutable| . 0) (|finiteAggregate| . 0)) + (CONS (|makeByteWordVec2| 10 + '(0 0 0 0 0 0 0 0 0 0 2 0 0 8 6 0 0 8 10 1 6 3)) + (CONS '#(|ListAggregate&| |StreamAggregate&| + |ExtensibleLinearAggregate&| + |FiniteLinearAggregate&| + |UnaryRecursiveAggregate&| |LinearAggregate&| + |RecursiveAggregate&| |IndexedAggregate&| + |Collection&| |HomogeneousAggregate&| + |OrderedSet&| |Aggregate&| |EltableAggregate&| + |Evalable&| |SetCategory&| NIL NIL + |InnerEvalable&| NIL NIL |BasicType&| NIL) + (CONS '#((|ListAggregate| 6) + (|StreamAggregate| 6) + (|ExtensibleLinearAggregate| 6) + (|FiniteLinearAggregate| 6) + (|UnaryRecursiveAggregate| 6) + (|LinearAggregate| 6) + (|RecursiveAggregate| 6) + (|IndexedAggregate| 35 6) + (|Collection| 6) + (|HomogeneousAggregate| 6) + (|OrderedSet|) (|Aggregate|) + (|EltableAggregate| 35 6) (|Evalable| 6) + (|SetCategory|) (|Type|) + (|Eltable| 35 6) (|InnerEvalable| 6 6) + (|CoercibleTo| 59) (|ConvertibleTo| 40) + (|BasicType|) (|OpenMath|)) + (|makeByteWordVec2| 45 + '(1 13 12 0 14 3 13 12 0 15 15 16 1 8 0 + 0 17 3 6 12 13 0 8 18 1 13 12 0 19 0 + 20 0 21 2 13 0 15 20 22 1 13 12 0 23 + 1 13 12 0 24 1 13 12 0 25 1 0 15 0 26 + 2 0 15 0 8 27 2 0 12 13 0 28 3 0 12 + 13 0 8 29 2 0 0 0 0 30 1 0 0 0 31 2 0 + 0 0 0 32 2 0 8 6 0 33 2 0 0 0 0 34 2 + 0 6 0 35 36 2 0 0 0 0 37 1 38 0 15 39 + 1 40 0 38 41 1 6 40 0 42 1 40 0 43 44 + 1 0 40 0 45 2 5 0 0 0 32 2 5 0 0 0 34 + 2 5 0 0 0 37 1 5 0 0 31 1 0 8 0 9 0 0 + 0 7 2 5 8 6 0 33 2 0 6 0 35 36 1 1 40 + 0 45 2 0 0 6 0 10 2 0 0 0 0 30 2 0 0 + 0 0 11 3 3 12 13 0 8 29 2 3 12 13 0 + 28 1 3 15 0 26 2 3 15 0 8 27))))) + '|lookupIncomplete|)) @ \section{package LIST2 ListFunctions2} <<package LIST2 ListFunctions2>>= |