$SPAD/src/input cachedf.input

Mark Clements December 3, 2016

Abstract

This was posted by Mark Clements.

— clements.spad —

)abbrev domain ORDKE OrderedKeyEntry
OrderedKeyEntry(Key:OrderedSet,Entry:SetCategory):
  Exports == Implementation where
    Exports == OrderedSet with
      construct: (Key,Entry) -> %
      elt: (%,"key") -> Key
      elt: (%,"entry") -> Entry
    Implementation == add
      Rep := Record(k:Key,e:Entry)
      x,y: %
      construct(a,b) == construct(a,b)$Rep @ %
      elt(x,"key"):Key == (x @ Rep).k
      elt(x,"entry"):Entry == (x @ Rep).e
      x < y == x.key < y.key
      x = y == x.key = y.key
      hash x == hash(x.key)
      if Entry has CoercibleTo OutputForm then
        coerce(x):OutputForm ==
          bracket [(x.key)::OutputForm,(x.entry)::OutputForm]

———-

— * —

)set break resume
)sys rm -f clements.output
)spool clements.output
)set message test on
)set message auto off
)clear all
)sys cp $AXIOM/../../src/input/clements.input.pamphlet .
)lisp (tangle "clements.input.pamphlet" "clements.spad" "clements.spad")
--S 1 of 6
)co clements
--R
--R   Compiling AXIOM source code from file
--I      /root/axiom/int/input/clements.spad using old system compiler.
--R   ORDKE abbreviates domain OrderedKeyEntry
--R------------------------------------------------------------------------
--R   initializing nrlib ORDKE for OrderedKeyEntry
--R   compiling into nrlib ORDKE
--R   compiling exported construct : (Key,Entry) -> $
--R      ORDKE;construct;KeyEntry$;1 is replaced by CONS
--ITime: 0 SEC.
--R
--R   compiling exported elt : ($,key) -> Key
--R      ORDKE;elt;$keyKey;2 is replaced by QCARx

--ITime: 0 SEC.
--R
--R   compiling exported elt : ($,entry) -> Entry
--R      ORDKE;elt;$entryEntry;3 is replaced by QCDRx
--ITime: 0 SEC.
--R
--R   compiling exported < : ($,$) -> Boolean
--ITime: 0 SEC.
--R
--R   compiling exported = : ($,$) -> Boolean
--ITime: 0 SEC.
--R
--R   compiling exported hash : $ -> SingleInteger
--ITime: 0 SEC.
--R
--R   compiling exported coerce : $ -> OutputForm
--ITime: 0.01 SEC.
--R
--I(time taken in buildFunctor:  0 . NIL)
--R
--R;;;     ***       |OrderedKeyEntry| REDEFINED
--R
--R;;;     ***       |OrderedKeyEntry| REDEFINED
--ITime: 0.01 SEC.
--R
--R
--R   Cumulative Statistics for Constructor OrderedKeyEntry
--I      Time: 0.02 seconds
--R
--R   finalizing nrlib ORDKE
--R   Processing OrderedKeyEntry for Browser database:
--R--->-->OrderedKeyEntry((construct (% Key Entry))): Not documented!!!!
--R--->-->OrderedKeyEntry((elt (Key % key))): Not documented!!!!
--R--->-->OrderedKeyEntry((elt (Entry % entry))): Not documented!!!!
--R--->-->OrderedKeyEntry(constructor): Not documented!!!!
--R--->-->OrderedKeyEntry(): Missing Description
--R------------------------------------------------------------------------
--I   OrderedKeyEntry is now explicitly exposed in frame frame0
--R   OrderedKeyEntry will be automatically loaded when needed from
--I      /root/axiom/int/input/ORDKE.nrlib/code
--R
--E 1
--S 2 of 6
KE := OrderedKeyEntry(Integer,String)
--R
--R
--R   (1)  OrderedKeyEntry(Integer,String)
--R                                                                 Type: Domain
--E 2

--S 3 of 6
test1 := [1,"name1"]$KE
--R
--R
--R   (2)  [1,"name1"]
--R                                        Type: OrderedKeyEntry(Integer,String)
--E 3
--S 4 of 6
test2 := [2,"name2"]$KE
--R
--R
--R   (3)  [2,"name2"]
--R                                        Type: OrderedKeyEntry(Integer,String)
--E 4
--S 5 of 6
min(test1,test2)
--R
--R
--R   (4)  [1,"name1"]
--R                                        Type: OrderedKeyEntry(Integer,String)
--E 5
--S 6 of 6
max(test1,test2)
--R
--R
--R   (5)  [2,"name2"]
--R                                        Type: OrderedKeyEntry(Integer,String)
--E 6
)spool
)lisp (bye)

———-

References^{[1] nothing}

5