aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/strap/RCAGG-.lsp
blob: 0546ebc4d555d1504d9a9d0cdeb49bd54d46d9dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
(/VERSIONCHECK 2) 

(DEFUN |RCAGG-;elt;AvalueS;1| (|x| T0 $)
  (SPADCALL |x| (|getShellEntry| $ 8))) 

(DEFUN |RCAGG-;setelt;Avalue2S;2| (|x| T1 |y| $)
  (SPADCALL |x| |y| (|getShellEntry| $ 11))) 

(DEFUN |RCAGG-;child?;2AB;3| (|x| |l| $)
  (SPADCALL |x| (SPADCALL |l| (|getShellEntry| $ 14))
      (|getShellEntry| $ 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 $ (|newShell| 19) . #0#)
        (|setShellEntry| $ 0 |dv$|)
        (|setShellEntry| $ 3
            (LETT |pv$|
                  (|buildPredVector| 0 0
                      (LIST (|HasAttribute| |#1| '|shallowlyMutable|)
                            (|HasCategory| |#2| '(|SetCategory|)))) . #0#))
        (|stuffDomainSlots| $)
        (|setShellEntry| $ 6 |#1|)
        (|setShellEntry| $ 7 |#2|)
        (COND
          ((|testBitVector| |pv$| 1)
           (|setShellEntry| $ 12
               (CONS (|dispatchFunction| |RCAGG-;setelt;Avalue2S;2|) $))))
        (COND
          ((|testBitVector| |pv$| 2)
           (|setShellEntry| $ 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|)) 

(SETQ |$CategoryFrame|
      (|put| '|RecursiveAggregate&| '|isFunctor|
             '(((|setelt| (|#2| $ "value" |#2|)) T (ELT $ 12))
               ((|child?| ((|Boolean|) $ $)) T (ELT $ 18))
               ((|elt| (|#2| $ "value")) T (ELT $ 10)))
             (|addModemap| '|RecursiveAggregate&|
                 '(|RecursiveAggregate&| |#1| |#2|)
                 '((CATEGORY |domain|
                       (SIGNATURE |setelt| (|#2| |#1| "value" |#2|))
                       (SIGNATURE |child?| ((|Boolean|) |#1| |#1|))
                       (SIGNATURE |elt| (|#2| |#1| "value")))
                   (|RecursiveAggregate| |#2|) (|Type|))
                 T '|RecursiveAggregate&|
                 (|put| '|RecursiveAggregate&| '|mode|
                        '(|Mapping|
                             (CATEGORY |domain|
                                 (SIGNATURE |setelt|
                                     (|#2| |#1| "value" |#2|))
                                 (SIGNATURE |child?|
                                     ((|Boolean|) |#1| |#1|))
                                 (SIGNATURE |elt| (|#2| |#1| "value")))
                             (|RecursiveAggregate| |#2|) (|Type|))
                        |$CategoryFrame|))))