International Allegro CL Free Express Edition 8.2 [Windows] (Jan 7, 2012 10:43) Copyright (C) 1985-2010, Franz Inc., Oakland, CA, USA. All Rights Reserved. This development copy of Allegro CL is licensed to: Allegro CL 8.2 Express user CG version 1.134 / IDE version 1.125 Loaded options from C:\Documents and Settings\chin\My Documents\allegro-prefs-8-2-express.cl. ;; Optimization settings: safety 1, space 1, speed 1, debug 2. ;; For a complete description of all compiler switches given the current optimization settings evaluate ;; (EXPLAIN-COMPILER-SETTINGS). [changing package from "COMMON-LISP-USER" to "COMMON-GRAPHICS-USER"] CG-USER(1): :ld A4/a4 ; Loading C:\acl82express\A4\a4.cl CG-USER(2): Warning: Avoiding an apparent circularity in the global chain of clipboard-viewing applications. CG-USER(2): (defun test-a4 () (print "(define-concept Human) -> ") (print (define-concept Human)) (print "human -> ") (print human) (print "(define-concept Dog) -> ") (print (define-concept Dog)) (print "dog -> ") (print dog) (print "(define-relation Owns Human Dog) -> ") (print (define-relation Owns Human Dog)) (print "(setq h1 (make-concept 'Human 'John)) -> ") (print (setq h1 (make-concept 'Human 'John))) (print "(name h1) -> ") (print (name h1)) (print "(setq d1 (make-concept 'Dog 'Fido)) -> ") (print (setq d1 (make-concept 'Dog 'Fido))) (print "(name d1) -> ") (print (name d1)) (print "(setq o1 (make-relation 'Owns h1 d1)) -> ") (print (setq o1 (make-relation 'Owns h1 d1))) (print "(from o1) -> ") (print (from o1)) (print "(to o1) -> ") (print (to o1)) (print "(froms h1) -> ") (print (froms h1)) (print "(tos d1) -> ") (print (tos d1)) (print "(setq h2 (make-concept 'Human 'Sue)) -> ") (print (setq h2 (make-concept 'Human 'Sue))) (print "(setf (from o1) h2) -> ") (print (setf (from o1) h2)) (print "(from o1) -> ") (print (from o1)) (print "(froms h1) -> ") (print (froms h1)) (print "(froms h2) -> ") (print (froms h2)) ) TEST-A4 CG-USER(3): (test-a4) "(define-concept Human) -> " # "human -> " # "(define-concept Dog) -> " # "dog -> " # "(define-relation Owns Human Dog) -> " # "(setq h1 (make-concept 'Human 'John)) -> " # "(name h1) -> " JOHN "(setq d1 (make-concept 'Dog 'Fido)) -> " # "(name d1) -> " FIDO "(setq o1 (make-relation 'Owns h1 d1)) -> " Error: Unpaired keyword argument passed to MAKE-RELATION [condition type: PROGRAM-ERROR] CG-USER(4): (defun test-a4 () (print "(define-concept Human) -> ") (print (define-concept Human)) (print "human -> ") (print human) (print "(define-concept Dog) -> ") (print (define-concept Dog)) (print "dog -> ") (print dog) (print "(define-relation Owns Human Dog) -> ") (print (define-relation Owns Human Dog)) (print "(setq h1 (make-concept 'Human 'John)) -> ") (print (setq h1 (make-concept 'Human 'John))) (print "(name h1) -> ") (print (name h1)) (print "(setq d1 (make-concept 'Dog 'Fido)) -> ") (print (setq d1 (make-concept 'Dog 'Fido))) (print "(name d1) -> ") (print (name d1)) (print "(setq o1 (make-relation 'Owns 'owns1 :from h1 :to d1)) -> ") (print (setq o1 (make-relation 'Owns 'owns1 :from h1 :to d1))) (print "(from o1) -> ") (print (from o1)) (print "(to o1) -> ") (print (to o1)) (print "(froms h1) -> ") (print (froms h1)) (print "(tos d1) -> ") (print (tos d1)) (print "(setq h2 (make-concept 'Human 'Sue)) -> ") (print (setq h2 (make-concept 'Human 'Sue))) (print "(setf (from o1) h2) -> ") (print (setf (from o1) h2)) (print "(from o1) -> ") (print (from o1)) (print "(froms h1) -> ") (print (froms h1)) (print "(froms h2) -> ") (print (froms h2)) ) TEST-A4 CG-USER(5): (test-a4) "(define-concept Human) -> " # "human -> " # "(define-concept Dog) -> " # "dog -> " # "(define-relation Owns Human Dog) -> " # "(setq h1 (make-concept 'Human 'John)) -> " # "(name h1) -> " JOHN "(setq d1 (make-concept 'Dog 'Fido)) -> " # "(name d1) -> " FIDO "(setq o1 (make-relation 'Owns 'owns1 :from h1 :to d1)) -> " # "(from o1) -> " # "(to o1) -> " # "(froms h1) -> " (#) "(tos d1) -> " (#) "(setq h2 (make-concept 'Human 'Sue)) -> " # "(setf (from o1) h2) -> " # "(from o1) -> " # "(froms h1) -> " NIL "(froms h2) -> " (#) (#) CG-USER(6): (defun test-a4 () (print "(define-concept Human) -> ") (print (define-concept Human)) (print "human -> ") (print human) (print "(define-concept Dog) -> ") (print (define-concept Dog)) (print "dog -> ") (print dog) (print "(define-relation Owns Human Dog) -> ") (print (define-relation Owns Human Dog)) (print "(setq h1 (make-concept 'Human 'John)) -> ") (print (setq h1 (make-concept 'Human 'John))) (print "(name h1) -> ") (print (name h1)) (print "(setq d1 (make-concept 'Dog 'Fido)) -> ") (print (setq d1 (make-concept 'Dog 'Fido))) (print "(name d1) -> ") (print (name d1)) (print "(setq o1 (make-relation 'Owns 'owns1 :from h1 :to d1)) -> ") (print (setq o1 (make-relation 'Owns 'owns1 :from h1 :to d1))) (print "(from o1) -> ") (print (from o1)) (print "(to o1) -> ") (print (to o1)) (print "(froms h1) -> ") (print (froms h1)) (print "(tos d1) -> ") (print (tos d1)) (print "(setq h2 (make-concept 'Human 'Sue)) -> ") (print (setq h2 (make-concept 'Human 'Sue))) (print "(setf (from o1) h2) -> ") (print (setf (from o1) h2)) (print "(from o1) -> ") (print (from o1)) (print "(name (from o1)) -> ") (print (name (from o1))) (print "(froms h1) -> ") (print (froms h1)) (print "(froms h2) -> ") (print (froms h2)) (print "(setq d2 (make-concept 'Dog 'Lassie)) -> ") (print (setq d2 (make-concept 'Dog 'Lassie))) (print "(setf (to o1) d2) -> ") (print (setf (to o1) d2)) (print "(to o1) -> ") (print (to o1)) (print "(name (to o1)) -> ") (print (name (to o1))) (print "(tos d1) -> ") (print (tos d1)) (print "(tos d2) -> ") (print (tos d2)) "done" ) TEST-A4 CG-USER(7): (test-a4) "(define-concept Human) -> " # "human -> " # "(define-concept Dog) -> " # "dog -> " # "(define-relation Owns Human Dog) -> " # "(setq h1 (make-concept 'Human 'John)) -> " # "(name h1) -> " JOHN "(setq d1 (make-concept 'Dog 'Fido)) -> " # "(name d1) -> " FIDO "(setq o1 (make-relation 'Owns 'owns1 :from h1 :to d1)) -> " # "(from o1) -> " # "(to o1) -> " # "(froms h1) -> " (#) "(tos d1) -> " (#) "(setq h2 (make-concept 'Human 'Sue)) -> " # "(setf (from o1) h2) -> " # "(from o1) -> " # "(name (from o1)) -> " SUE "(froms h1) -> " NIL "(froms h2) -> " (#) "(setq d2 (make-concept 'Dog 'Lassie)) -> " # "(setf (to o1) d2) -> " # "(to o1) -> " # "(name (to o1)) -> " LASSIE "(tos d1) -> " NIL "(tos d2) -> " (#) "done" CG-USER(8): ::ld :ld A4/a4 ; Loading C:\acl82express\A4\a4.cl CG-USER(9): (TEST-A4) "(define-concept Human) -> " # "human -> " # "(define-concept Dog) -> " # "dog -> " # "(define-relation Owns Human Dog) -> " # "(setq h1 (make-concept 'Human 'John)) -> " # "(name h1) -> " JOHN "(setq d1 (make-concept 'Dog 'Fido)) -> " # "(name d1) -> " FIDO "(setq o1 (make-relation 'Owns 'owns1 :from h1 :to d1)) -> " # "(from o1) -> " # "(to o1) -> " # "(froms h1) -> " (#) "(tos d1) -> " (#) "(setq h2 (make-concept 'Human 'Sue)) -> " # "(setf (from o1) h2) -> " # "(from o1) -> " # "(name (from o1)) -> " SUE "(froms h1) -> " NIL "(froms h2) -> " (#) "(setq d2 (make-concept 'Dog 'Lassie)) -> " # "(setf (to o1) d2) -> " # "(to o1) -> " # "(name (to o1)) -> " LASSIE "(tos d1) -> " NIL "(tos d2) -> " (#) "done" CG-USER(10): :ld demo-2-27.cl ; Loading C:\acl82express\demo-2-27.cl CG-USER(11): (myadd 1 2) 3 CG-USER(12): (myadd 1 2 3) 6 CG-USER(13): (myadd 1 2 3 :f 5) 11 CG-USER(14): :ld ; Loading C:\acl82express\demo-2-27.cl Error: Attempt to add the method #) @ #x210014c2> to the generic function # but the method has fewer optional arguments than the generic function. [condition type: PROGRAM-ERROR] Restart actions (select using :continue): 0: Add method anyway and modify generic function. 1: retry the load of demo-2-27.cl 2: skip loading demo-2-27.cl 3: recompile C:\acl82express\demo-2-27.cl 4: Return to Top Level (an "abort" restart). 5: Exit the CG event-handling loop (event-loop) 6: Unwind to the top-level event-handling loop. 7: Exit this IDE listener (Listener 1). 8: Abort entirely from this (lisp) process. [1] CG-USER(15): CG-USER(15): (defclass Gate () ((name :initarg :name :accessor name :type Symbol :documentation "the name of the Gate") (outputs :initarg :outputs :accessor outputs :type List :initform nil :documentation "the output Gate(s) connected to this Gate") (value :initarg :value :accessor value :type Boolean :documentation "the output value of this Gate, which should be T or nil")) (:documentation "A Gate")) Error: Attempt to add the method #) @ #x2100eb5a> to the generic function # but the method has fewer optional arguments than the generic function. [condition type: PROGRAM-ERROR] CG-USER(16): (defclass Gate () ((name :initarg :name :accessor name :type Symbol :documentation "the name of the Gate") (outputs :initarg :outputs :accessor outputs :type List :initform nil :documentation "the output Gate(s) connected to this Gate") (val :initarg :value :accessor value :type Boolean :documentation "the output value of this Gate, which should be T or nil")) (:documentation "A Gate")) Error: Attempt to add the method #) @ #x2104a122> to the generic function # but the method has fewer optional arguments than the generic function. [condition type: PROGRAM-ERROR] CG-USER(17): (defclass Gate () ((name :initarg :name :accessor name :type Symbol :documentation "the name of the Gate") (outputs :initarg :outputs :accessor outputs :type List :initform nil :documentation "the output Gate(s) connected to this Gate") (val :initarg :val :accessor val :type Boolean :documentation "the output value of this Gate, which should be T or nil")) (:documentation "A Gate")) # CG-USER(18): :ld ; Loading C:\acl82express\demo-2-27.cl Warning: GATE, :TYPE was defined at the top level and is now being defined in C:\acl82express\demo-2-27.cl Warning: (METHOD NAME (#)), :OPERATOR was defined at the top level and is now being defined in C:\acl82express\demo-2-27.cl Warning: (METHOD (SETF NAME) (# #)), :OPERATOR was defined at the top level and is now being defined in C:\acl82express\demo-2-27.cl Warning: (METHOD OUTPUTS (#)), :OPERATOR was defined at the top level and is now being defined in C:\acl82express\demo-2-27.cl Warning: (METHOD (SETF OUTPUTS) (# #)), :OPERATOR was defined at the top level and is now being defined in C:\acl82express\demo-2-27.cl Warning: (METHOD VAL (#)), :OPERATOR was defined at the top level and is now being defined in C:\acl82express\demo-2-27.cl Warning: (METHOD (SETF VAL) (# #)), :OPERATOR was defined at the top level and is now being defined in C:\acl82express\demo-2-27.cl Error: Attempt to make a TYPE definition for the name SOURCE as a DEFCLASS. This name is in the CG.BASE package and defining it is a violation for portable programs. The package CG.BASE has PACKAGE-DEFINITION-LOCK set, which causes the system to signal this violation. [condition type: PACKAGE-LOCKED-ERROR] CG-USER(19): (defclass Source (Gate) () (:documentation "A Gate with no inputs")) Error: Attempt to make a TYPE definition for the name SOURCE as a DEFCLASS. This name is in the CG.BASE package and defining it is a violation for portable programs. The package CG.BASE has PACKAGE-DEFINITION-LOCK set, which causes the system to signal this violation. [condition type: PACKAGE-LOCKED-ERROR] CG-USER(20): ::ld :ld ; Loading C:\acl82express\demo-2-27.cl Warning: GATE, :TYPE was defined at the top level and is now being defined in C:\acl82express\demo-2-27.cl Warning: (METHOD NAME (#)), :OPERATOR was defined at the top level and is now being defined in C:\acl82express\demo-2-27.cl Warning: (METHOD (SETF NAME) (# #)), :OPERATOR was defined at the top level and is now being defined in C:\acl82express\demo-2-27.cl Warning: (METHOD OUTPUTS (#)), :OPERATOR was defined at the top level and is now being defined in C:\acl82express\demo-2-27.cl Warning: (METHOD (SETF OUTPUTS) (# #)), :OPERATOR was defined at the top level and is now being defined in C:\acl82express\demo-2-27.cl Warning: (METHOD VAL (#)), :OPERATOR was defined at the top level and is now being defined in C:\acl82express\demo-2-27.cl Warning: (METHOD (SETF VAL) (# #)), :OPERATOR was defined at the top level and is now being defined in C:\acl82express\demo-2-27.cl CG-USER(21): (setq n1 (make-instance 'Not-Gate :name 'n1)) # CG-USER(22): (setq hs1 (make-instance 'High-Source :name 'hs1)) Error: Attempt to take the value of the unbound variable `HIGH-SOURCE'. [condition type: UNBOUND-VARIABLE] CG-USER(23): (setq hs1 (make-instance 'High-Source :name 'hs1)) # CG-USER(24): (setf (input n1) hs1) # CG-USER(25): (input n1) # CG-USER(26): (outputs hs1) NIL CG-USER(27): (slot-value n1 'name) N1 CG-USER(28): ::ld :ld ; Loading C:\acl82express\demo-2-27.cl CG-USER(29): (setf (input n1) hs1) # CG-USER(30): (outputs hs1) (#) CG-USER(31): ::ld :ld ; Loading C:\acl82express\demo-2-27.cl CG-USER(32): (setq hl1 (make-instance 'Low-Source :name 'hl1)) # CG-USER(33): (setf (input n1) hl1) # CG-USER(34): (outputs hs1) (#) CG-USER(35): ::ld :ld ; Loading C:\acl82express\demo-2-27.cl CG-USER(36): (setq hs1 (make-instance 'High-Source :name 'hs1)) # CG-USER(37): (outputs hs1) NIL CG-USER(38): (setq hl1 (make-instance 'Low-Source :name 'hl1)) # CG-USER(39): (outputs hl1) NIL CG-USER(40): (setq n1 (make-instance 'Not-Gate :name 'n1)) # CG-USER(41): (input n1) Error: The slot INPUT is unbound in the object # of class #. [condition type: UNBOUND-SLOT] CG-USER(42): (setf (input n1) hs1) # CG-USER(43): (input n1) # CG-USER(44): (outputs hs1) (#) CG-USER(45): (outputs hl1) NIL CG-USER(46): (setf (input n1) hl1) # CG-USER(47): (outputs hs1) NIL CG-USER(48): (outputs hl1) (#) CG-USER(49): (input n1) # CG-USER(50): ::ld :ld ; Loading C:\acl82express\demo-2-27.cl Error: No class named: SOURCE. [condition type: PROGRAM-ERROR] CG-USER(51): ::ld :ld ; Loading C:\acl82express\demo-2-27.cl Error: Attempt to add the method # to the generic function # but the method has fewer optional arguments than the generic function. [condition type: PROGRAM-ERROR] CG-USER(52): ::ld :ld ; Loading C:\acl82express\demo-2-27.cl CG-USER(53): ::ld :ld ; Loading C:\acl82express\demo-2-27.cl CG-USER(54): (val n1) Error: The slot VAL is unbound in the object # of class #. [condition type: UNBOUND-SLOT] CG-USER(55): (setf (input n1) hs1) Error: The slot VALUE is missing from the object # of class # during operation SLOT-BOUNDP [condition type: PROGRAM-ERROR] CG-USER(56): ::ld :ld ; Loading C:\acl82express\demo-2-27.cl CG-USER(57): (setf (input n1) hs1) # CG-USER(58): (val n1) T CG-USER(59): (setf (input n1) hl1) # CG-USER(60): (val n1) NIL CG-USER(61): (compute n1) T CG-USER(62): (val n1) T CG-USER(63): (input n1) # CG-USER(64): (val (input n1)) NIL CG-USER(65): (trace compute) (COMPUTE) CG-USER(66): (setf (input n1) hs1) 0[6]: (COMPUTE #) 0* # 0[6]: returned NIL # CG-USER(67): (val n1) T CG-USER(68): (trace calculate) (CALCULATE) CG-USER(69): CG-USER(69): (compute n1) 0[6]: (COMPUTE #) 0* # 1[6]: (CALCULATE #) 1* # 1[6]: returned NIL 0[6]: returned NIL NIL CG-USER(70): (setf (input n1) hl1) 0[6]: (COMPUTE #) 0* # 1[6]: (CALCULATE #) 1* # 1[6]: returned NIL 0[6]: returned NIL # CG-USER(71): (val (input n1)) NIL CG-USER(72): (not (val (input n1))) T CG-USER(73): (val n1) NIL CG-USER(74): (compute n1) 0[6]: (COMPUTE #) 0* # 1[6]: (CALCULATE #) 1* # 1[6]: returned T 0[6]: returned T T CG-USER(75): (val n1) T CG-USER(76): ::ld :ld ; Loading C:\acl82express\demo-2-27.cl Warning: (METHOD (SETF INPUT) :AFTER (GATE UNARY-GATE)) is defined more than once as `operator' in file C:\acl82express\demo-2-27.cl. CG-USER(77): (setf (input n1) hs1) 0[6]: (COMPUTE #) 0* # 1[6]: (CALCULATE #) 1* # 1[6]: returned NIL 0[6]: returned NIL # CG-USER(78): (val n1) NIL CG-USER(79): (setf (input n1) hs1) 0[6]: (COMPUTE #) 0* # 1[6]: (CALCULATE #) 1* # 1[6]: returned NIL 0[6]: returned NIL # CG-USER(80): (setf (input n1) hl1) 0[6]: (COMPUTE #) 0* # 1[6]: (CALCULATE #) 1* # 1[6]: returned T 0[6]: returned T # CG-USER(81): (val n1) T CG-USER(82):