DataMuseum.dk

Presents historical artifacts from the history of:

RegneCentralen RC850

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RegneCentralen RC850

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦03acc7126⟧ TextFile

    Length: 8192 (0x2000)
    Types: TextFile
    Names: »SIMPLE.LOG«

Derivation

└─⟦0c23030ba⟧ Bits:30005892 LPA Prolog rel 2.0 (RC855)
    └─⟦this⟧ »SIMPLE.LOG« 

TextFile

"Simple"
(add Add List list Kill kill Delete delete Does does One one Which which 
Save save Load load Accept accept Edit edit All all Not not Is-All is-all 
For-All for-all Quit quit "?REV-P?" CONS APPEND ON PROD true-of
# @ Parse-of-S Parse-of-SS Parse-of-ConjC
Parse-of-Cond + - ü * % = function)
(End end dict func yes all All vars
tell c C & and if exptran-mod Expression-Parse)
((COPYRIGHT 1983 LPA LTD (V 10-3)))
((add X)
  (NUM X)
  /
  (R Y)
  (add X Y))
((add X)
  /
  (add 32767 X))
((add X Y)
  (Parse-of-S ((Zøx)øy) Y)
  (ADDCL ((Zøx)øy) X)
  (declare Z))
((AddøX)
  (addøX))
((Parse-of-S (XøY) Z)
  (Parse-of-SS  X Z x)
  (Parse-of-ConjC (if) Y x))
((Parse-of-SS (XøY) (X Yøy) y) 
  (VAR Y)(CON X)/)
((Parse-of-SS (X) (X xøY)  Y)
  (CON X)
  (EQ x ())/)
((Parse-of-SS (Y X Z)(X Y Zøx)  x)
  (CON Y)
  /)
((Parse-of-SS (X øZ)(X Zøx)  x)
  (CON X)
  (LST Z)/)
((Parse-of-SS Y X  Z)
  (IF (VAR X) (FAIL) ((find (and & if) X Y1 Z)(PPøY1)
               (PP not a valid simple sentence form)
               ABORT)))
((Parse-of-ConjC X () ()))
((Parse-of-ConjC X (YøZ) (xøy))
  (IF ("?CEQ?" Y x X)()((PP x should be one of X)ABORT))
  (Parse-of-Cond Y y z)
  (Parse-of-ConjC (and &) Z z))
((Parse-of-Cond X Y Z)
  (Special-Cond X Y Z)
  /)
((Parse-of-Cond X Y Z)
  (Parse-of-SS X Y  Z))
((Special-Cond (# (EQ X1 Y1) Z1) (X x1 Yøy) y)
  ("?CEQ?" Z1 x1 (=))
  ("?EQNTEST?" Z1)
  (Expression-Parse (X Y) (X1 Y1) Z1)/)
((Special-Cond (# (Xø Y1) Z1) (X x1 Yøy) y)
  (CON X)("?CEQ?" Z1 x1 (#))
  ("?EQNTEST?" Z1)
  (Expression-Parse Y  Y1 Z1)/)
((Special-Cond (# (XøY1)Y2) (X1 x1 Zøy) y)
  ("?CEQ?" Y2 x1 (#))(Parse-of-SS (XøY1) X1 ())
  (Parse-of-ConjC (?) Y2 (?øZ))/)
((Special-Cond (NOT ? X) (x YøZ) Z)
  ("?CEQ?" X x (Not not)) 
  (IF (VAR X) ((OR ((LST Y)/) ((PP Bracketed condition must follow Not)ABORT)))
              ())
  (Parse-of-ConjC (?) X (?øY))/)
((Special-Cond (ISALL X Y øZ) (X x1 (Yøx)øy) y)
  ("?CEQ?" Z x1 (Is-All is-all ))
  (Parse-of-ConjC (?) Z (?øx))/) 
((Special-Cond (FORALL ((/* vars Y)øZ) X) (x x1(Yøy)øz) z)
  ("?CEQ?" X x1 (For-All for-all ))
  (Parse-of-ConjC (?) X (?øx))(Parse-of-ConjC (?) Z (?øy)))
((find X () () ())
  /)
((find X (YøZ) () (YøZ))
  (Mem1 Y X)
  /)
((find X (YøZ) (YøZ1) x)
  (find X Z Z1 x))
(("?CEQ?" y x z)
  (IF (VAR y) ((Mem1 x z)) ((ON x z)/)))
((Mem1 x y)
  (NOT VAR x)
  (ON x y)/)
((ON X (XøY)))
((ON X (YøZ))
  (ON X Z))
(("?EQNTEST?" X)(VAR X)/)
(("?EQNTEST?" X)(OPMOD exptran-mod)CLMOD)
((ListøX)
  (listøX))
((list x)(ON x (all All))/
  (FORALL ((CL ((dict X)))) ((List-pred X))))
((list X)
  (List-pred X))
((List-pred X)
  (CL ((XøY)øZ))
  ("?REV-P?" ((XøY)øZ) x)
  (Pøx)
  (PP)
  FAIL)
((List-pred X))
(("?REV-P?" (XøY) Z)
  (Parse-of-SS X Z  x)
  (Rev-body Y x "if@M@J        "))
((Rev-body () () X))
((Rev-body (XøY) (Zøx) Z)
  (Parse-of-Cond X x y)
  (Rev-body Y y "and@M@J        "))
((KilløX)
  (killøX))
((kill X)(CON X)
  (DELCL ((dict X)))/
  (KILL X)(OR ((DELCL ((func X)))) ())    
  (PP Definition for X deleted))
((kill Z)(ON Z (all All))/
  (P Entire program "?(yes/no)")
  (R y)(EQ y yes)(KILL ALL)(KILL (dict func))  
  (PP Entire program deleted))
((kill X)(OPMOD X) CLMOD
  (KILL X)
  (PP Module X deleted))
((DeleteøX)
  (deleteøX))
((delete (XøY))
  /
  (Parse-of-S Z (XøY))
  (OR ((DELCL Z)) ((PP No such sentence))))
((delete X)
  (CON X)
  (R Y)
  (IF (DELCL X Y) () ((PP No such sentence))))
((DoesøX)
  (doesøX))
((does X)
  (Parse-of-ConjC (?) Y (?øX))
  (IF (? Y) ((PP YES)) ((PP NO))))
((OneøX)
  (oneøX))
((one (XøY))
  (Parse-of-ConjC (?) Z (?øY))
  (Oneex X Z))
((WhichøX)
  (whichøX))
((which (XøY))
  (Parse-of-ConjC (?) Z (?øY))
  (Whichex X Z))
((Save X)
  (SAVE X))
((save X)
  (SAVE X))
((Load X)
  (load X))
((load X)
  (LOAD X))
((AcceptøX)
  (acceptøX))
((accept X)
  (declare X)
  (Acceptin X))
((EditøX)
  (editøX))
((edit X)
  (CON X)(dict X)
  (R Y)
  (INT Y)
  (CL ((XøZ)øx) Y Y)
  (OR ((Parse-of-S ((XøZ)øx) y) (RFILL (y) z) (Parse-of-S ((X1øY1)øZ1) z) /) 
         ((RFILL (((XøZ)øx)) z) (EQ z ((X1øY1)øZ1))))
  (IF (EQ X X1) ((ADDCL ((XøY1)øZ1) Y)) 
       ((P Add z to X1 "yes/no" ?) (R x1) 
        (EQ x1 yes) (P Where ?) (R y1) (INT y1) 
                (ADDCL ((X1øY1)øZ1) y1)(declare X1)))
  (DELCL X Y))
((Acceptin X)
  (P X)
  (R Y)
  (OR ((LST Y) (ADDCL ((X øY))) (Acceptin X)) 
      ((OR ((ON Y (End end))) ((P " " Y not a list)(PP)(Acceptin X)))) 
  ))
((Oneex X Y)
  (? Y)
  (P Answer is X)
  (R Z)
  (IF (ON Z (c C)) (FAIL) ()))
((OneexøX)
  (PP No (More) answers))
((Whichex X Y)
  (? Y)
  (P Answer is X)
  (PP)
  FAIL)
((Whichex X Y)
  (PP No (more) answers))
((declare X)
  (OR ((CL ((dict X)))) ((ADDCL ((dict X))))))
((function X)
  (OR ((CL ((func X)))) ((ADDCL ((func X))))))
((quitøX)
  QT)
((true-of X Y)
  (XøY))
((CONS X Y (XøY)))
((APPEND () X X))
((APPEND (XøY) Z (XøZ1))
  (APPEND Y Z Z1))
((PROD X Y Z)/
  (TIMES X Y Z)
  (INT X)
  (INT Y)
  (INT Z))
((PROD X Y Z x)
  (VAR Y)
  (VAR x)
  /
  (TIMES X y Z)
  (INT y Y)
  (TIMES X Y z)
  (SUM x z Z))
((PROD X Y Z x)
  (VAR X)
  (VAR x)
  (TIMES Y y Z)
  (INT y X)
  (TIMES Y X z)
  (SUM x z Z))
((@ xøy)(xøy))
((# X Y)
  (? Y)/X)
((%  Y Z X)
  (TIMES X Z Y))
(("-" Y Z X)
  (SUM Z X Y))
((+ Y Z X)
  (SUM Y Z X))
((* Y Z X)
  (TIMES Y Z X))
CLMOD
errmess-mod ("?ERROR?") ()
(("?ERROR?" 4 (ADDCL ((XøY)øZ)øx))/
  (PP Cannot add sentences to X)
  ABORT)
(("?ERROR?" X (YøY1))
  (E-code X Z)
  (P Z )(PP)(PP trying : Y Y1)
  ABORT)
((E-code 0 "Arithmetic overflow"))
((E-code 1 "Arithmetic underflow"))
((E-code 2 "No definition for relation"))
((E-code 3 "Control error"))
((E-code 4 "Error in adding sentence"))
((E-code 5 "File error"))
((E-code 6 "Too many files opened at once"))
((E-code 7 "Close all files first"))
((E-code 8 "Bad data in file"))
((E-code 9 "Write error"))
((E-code 10 "Disk or directory is full"))
((E-code 11 "Break !"))
((E-code 12 "Illegal use of modules"))
((E-code X (Error X)))
CLMOD
told-mod (is-told)(yes no just ans)
((is-told X)( LST X)/(told X))
((is-told øX)(told X))
((told X)(P øX)(P " ? ")
  (R Y)(answer X Y))
((answer X yes)/)
((answer X no)/FAIL)
((answer X just)/(match X))
((answer X ans) (match X)) 
((answer X x) (NOT EQ x ans)(P x ignored - enter: yes/no/ans ..
  /just ..)(PP)FAIL)
((answer X x)(told X)) 
((match ())/)
((match (xøX))
  (VAR x)/(R x)(match X))
((match ((xøy)øX))/
  (match (xøy))
  (match X))
((match (xøX))
  (match X))
CLMOD
exptran-mod
( Expression-Parse )
(@ # + - ü * % 
APPEND CONS func & and yes rel-form)
((less + x2)) 
((less "-" x2))
((less ü x2))
((op x)
  (NOT VAR x)
  (sysop x))
((fn x)
  (CON x)(fn1 x))
((fn1 APPEND))
((fn1  @))
((fn1 x)(CL ((func x))))
((fn1 x)
  (PP x assumed not to be function name)FAIL)
((sysop +))
((sysop ü))
((sysop "-"))
((sysop *))
((sysop %))
((sysop /))
(("?EQNS-IN?"))
((Expression-Parse x y z)
  (VAR z)/
  (X-parse x y z ()))
((Expression-Parse x x z)
  (NOT CL ((rel-form)))(symbval z)/)
((symbval ()))
((symbval ((XøY)øZ))
  (APPEND Y1 (x) Y)
  (IF (op X) ((EQ Y1 (y1 y2))(EQ x (y1 X y2))) ((EQ x (XøY1))))
  (symbval Z))
((name / %)/)
((name ü -)/)
((name x x))
((X-parse x x y y) (NOT LST x)/)
((X-parse (y1 x y2) z Z Y)
  (op x)
  (X-parse y1 z1 Z Y1)(name x x1)
  (X-parse y2 z2 Y1 ((x1 z1 z2 z)øY))
  /)
((X-parse (y1 x1 y2 x2 øY) z Z X)
  (op x1)(op x2)/
  (IF (less x1 x2) ((X-parse (y1 x1 (y2 x2øY)) z Z X))
				 ((X-parse ((y1 x1 y2)x2øY) z Z X)))
  )
((X-parse (x y Y) z ((CONS y1 Y1 z)øZ) Z1)
  (NOT VAR x)(EQ x CONS)/
  (Zip (y Y) (y1 Y1) Z Z1))
((X-parse (xøY) z Z Z1)
  (fn x)/
  (Zip Y Y1 Z ((xøY2)øZ1))
  (APPEND Y1 (z) Y2))
((X-parse X Y Z Z1)
  (Zip X Y Z Z1))
((Zip x x y y )
  (NOT LST x)
  /)
((Zip ()() y y)/)
((Zip (yøY) (y1øY1) Z Z2)
  (X-parse y y1 Z Z1)
  (Zip Y Y1 Z1 Z2))
CLMOD
«eof»