
(/VERSIONCHECK 2) 

(PUT '|DBASE;coerce;L$;1| '|SPADreplace| '(XLAM (|u|) |u|)) 

(DEFUN |DBASE;coerce;L$;1| (|u| $) |u|) 

(DEFUN |DBASE;elt;$SDl;2| (|data| |s| $)
  (PROG (#0=#:G1819 |x| #1=#:G1820)
    (RETURN
      (SEQ (SPADCALL
               (PROGN
                 (LETT #0# NIL . #2=(|DBASE;elt;$SDl;2|))
                 (SEQ (LETT |x| NIL . #2#) (LETT #1# |data| . #2#) G190
                      (COND
                        ((OR (ATOM #1#)
                             (PROGN (LETT |x| (CAR #1#) . #2#) NIL))
                         (GO G191)))
                      (SEQ (EXIT (LETT #0#
                                       (CONS
                                        (SPADCALL |x| |s|
                                         (QREFELT $ 11))
                                        #0#) . #2#)))
                      (LETT #1# (CDR #1#) . #2#) (GO G190) G191
                      (EXIT (NREVERSE0 #0#))))
               (QREFELT $ 14)))))) 

(DEFUN |DBASE;elt;$Qe$;3| (|data| |eq| $)
  (PROG (|field| |val| #0=#:G1824 |x| #1=#:G1825)
    (RETURN
      (SEQ (LETT |field| (SPADCALL |eq| (QREFELT $ 17))
                 . #2=(|DBASE;elt;$Qe$;3|))
           (LETT |val| (SPADCALL |eq| (QREFELT $ 18)) . #2#)
           (EXIT (PROGN
                   (LETT #0# NIL . #2#)
                   (SEQ (LETT |x| NIL . #2#) (LETT #1# |data| . #2#)
                        G190
                        (COND
                          ((OR (ATOM #1#)
                               (PROGN (LETT |x| (CAR #1#) . #2#) NIL))
                           (GO G191)))
                        (SEQ (EXIT (COND
                                     ((|stringMatches?| |val|
                                       (SPADCALL |x| |field|
                                        (QREFELT $ 11)))
                                      (LETT #0# (CONS |x| #0#) . #2#)))))
                        (LETT #1# (CDR #1#) . #2#) (GO G190) G191
                        (EXIT (NREVERSE0 #0#))))))))) 

(DEFUN |DBASE;+;3$;4| (|x| |y| $)
  (SPADCALL (SPADCALL |x| |y| (QREFELT $ 20)) (QREFELT $ 21))) 

(DEFUN |DBASE;-;3$;5| (|x| |y| $)
  (SPADCALL (SPADCALL |x| (QREFELT $ 24)) |y| (QREFELT $ 26))) 

(DEFUN |DBASE;coerce;$Of;6| (|data| $)
  (SPADCALL (LENGTH |data|) (QREFELT $ 30))) 

(DEFUN |DBASE;display;$V;7| (|data| $)
  (PROG (|x| #0=#:G1831)
    (RETURN
      (SEQ (LETT |x| NIL . #1=(|DBASE;display;$V;7|))
           (LETT #0# |data| . #1#) G190
           (COND
             ((OR (ATOM #0#) (PROGN (LETT |x| (CAR #0#) . #1#) NIL))
              (GO G191)))
           (SEQ (EXIT (SPADCALL |x| (QREFELT $ 33))))
           (LETT #0# (CDR #0#) . #1#) (GO G190) G191 (EXIT NIL))))) 

(DEFUN |DBASE;fullDisplay;$V;8| (|data| $)
  (PROG (|x| #0=#:G1834)
    (RETURN
      (SEQ (LETT |x| NIL . #1=(|DBASE;fullDisplay;$V;8|))
           (LETT #0# |data| . #1#) G190
           (COND
             ((OR (ATOM #0#) (PROGN (LETT |x| (CAR #0#) . #1#) NIL))
              (GO G191)))
           (SEQ (EXIT (SPADCALL |x| (QREFELT $ 35))))
           (LETT #0# (CDR #0#) . #1#) (GO G190) G191 (EXIT NIL))))) 

(DEFUN |DBASE;fullDisplay;$2PiV;9| (|data| |n| |m| $)
  (PROG (|i| |x| #0=#:G1837)
    (RETURN
      (SEQ (LETT |i| 1 . #1=(|DBASE;fullDisplay;$2PiV;9|))
           (LETT |x| NIL . #1#) (LETT #0# |data| . #1#) G190
           (COND
             ((OR (ATOM #0#) (PROGN (LETT |x| (CAR #0#) . #1#) NIL)
                  (QSGREATERP |i| |m|))
              (GO G191)))
           (SEQ (EXIT (COND
                        ((NULL (< |i| |n|))
                         (SPADCALL |x| (QREFELT $ 35))))))
           (LETT #0#
                 (PROG1 (CDR #0#) (LETT |i| (QSADD1 |i|) . #1#)) . #1#)
           (GO G190) G191 (EXIT NIL))))) 

(DEFUN |Database| (#0=#:G1838)
  (PROG ()
    (RETURN
      (PROG (#1=#:G1839)
        (RETURN
          (COND
            ((LETT #1#
                   (|lassocShiftWithFunction| (LIST (|devaluate| #0#))
                       (HGET |$ConstructorCache| '|Database|)
                       '|domainEqualList|)
                   . #2=(|Database|))
             (|CDRwithIncrement| #1#))
            ('T
             (UNWIND-PROTECT
               (PROG1 (|Database;| #0#) (LETT #1# T . #2#))
               (COND
                 ((NOT #1#) (HREM |$ConstructorCache| '|Database|))))))))))) 

(DEFUN |Database;| (|#1|)
  (PROG (DV$1 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|) . #0=(|Database|))
        (LETT |dv$| (LIST '|Database| DV$1) . #0#)
        (LETT $ (GETREFV 41) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|haddProp| |$ConstructorCache| '|Database| (LIST DV$1)
            (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (QSETREFV $ 7 (|List| |#1|))
        $)))) 

(MAKEPROP '|Database| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL (|List| 6) (|local| |#1|) '|Rep|
             |DBASE;coerce;L$;1| (|String|) (|Symbol|) (0 . |elt|)
             (|List| 9) (|DataList| 9) (6 . |coerce|)
             |DBASE;elt;$SDl;2| (|QueryEquation|) (11 . |variable|)
             (16 . |value|) |DBASE;elt;$Qe$;3| (21 . |merge|)
             (27 . |removeDuplicates!|) |DBASE;+;3$;4| (32 . |copy|)
             (37 . |copy|) (|MergeThing| 6) (42 . |mergeDifference|)
             |DBASE;-;3$;5| (|OutputForm|) (|NonNegativeInteger|)
             (48 . |coerce|) |DBASE;coerce;$Of;6| (|Void|)
             (53 . |display|) |DBASE;display;$V;7| (58 . |fullDisplay|)
             |DBASE;fullDisplay;$V;8| (|PositiveInteger|)
             |DBASE;fullDisplay;$2PiV;9| (|SingleInteger|) (|Boolean|))
          '#(~= 63 |latex| 69 |hash| 74 |fullDisplay| 79 |elt| 91
             |display| 103 |coerce| 108 = 118 - 124 + 130)
          'NIL
          (CONS (|makeByteWordVec2| 1 '(0 0 0))
                (CONS '#(|SetCategory&| |BasicType&| NIL)
                      (CONS '#((|SetCategory|) (|BasicType|)
                               (|CoercibleTo| 28))
                            (|makeByteWordVec2| 40
                                '(2 6 9 0 10 11 1 13 0 12 14 1 16 10 0
                                  17 1 16 9 0 18 2 7 0 0 0 20 1 7 0 0
                                  21 1 7 0 0 23 1 5 0 0 24 2 25 5 5 5
                                  26 1 29 28 0 30 1 6 32 0 33 1 6 32 0
                                  35 2 0 40 0 0 1 1 0 9 0 1 1 0 39 0 1
                                  3 0 32 0 37 37 38 1 0 32 0 36 2 0 13
                                  0 10 15 2 0 0 0 16 19 1 0 32 0 34 1 0
                                  0 5 8 1 0 28 0 31 2 0 40 0 0 1 2 0 0
                                  0 0 27 2 0 0 0 0 22)))))
          '|lookupComplete|)) 
