pcostanza / contextl

ContextL is a CLOS extension for Context-oriented Programming (COP), and was the first language extension that explicitly supports COP when it was originally introduced in 2005.
MIT License
47 stars 3 forks source link

How to determine whether ContextL works correctlY? #3

Closed dkochmanski closed 1 year ago

dkochmanski commented 1 year ago

I've read in the README in this project, that ContextL does not work on ECL, so I've ran tests on the newest release:

~/quicklisp/dists/quicklisp/software/contextl-20211230-git/test $ sh ecl-runall 
;;; Loading #P"/home/jack/quicklisp/setup.lisp"
;;; Loading #P"/home/jack/Warsztat/cl-builds/ecl-23.9.9/lib64/ecl-23.9.9/asdf.fas"
;;;
;;; Compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/contextl-packages.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Finished compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/contextl-packages.lisp.
;;;
;;;
;;; Compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-threads.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Finished compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-threads.lisp.
;;;
;;;
;;; Compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-util.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Finished compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-util.lisp.
;;;
;;;
;;; Compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-dynamic-environments.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Finished compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-dynamic-environments.lisp.
;;;
;;;
;;; Compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-dynamic-variables.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Finished compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-dynamic-variables.lisp.
;;;
;;;
;;; Compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-dynascope.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Finished compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-dynascope.lisp.
;;;
;;;
;;; Compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-special-class.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Finished compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-special-class.lisp.
;;;
;;;
;;; Compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-singleton-class.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Finished compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-singleton-class.lisp.
;;;
;;;
;;; Compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-layered-function-macros.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Finished compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-layered-function-macros.lisp.
;;;
;;;
;;; Compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-layer-metaclasses.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Finished compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-layer-metaclasses.lisp.
;;;
;;;
;;; Compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-gc.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Finished compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-gc.lisp.
;;;
;;;
;;; Compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-layer.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Finished compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-layer.lisp.
;;;
;;;
;;; Compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-partial-class.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Style warning:
;;;   in file cx-partial-class.lisp, position 821
;;;   at (DEFMETHOD INITIALIZE-INSTANCE ...)
;;;   ! The variable NAME is not used.
;;; Finished compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-partial-class.lisp.
;;;
;;; Warning: Lisp compilation had style-warnings while
             compiling #<cl-source-file "contextl" "cx-partial-class">
;;;
;;; Compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-class-in-layer.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Finished compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-class-in-layer.lisp.
;;;
;;;
;;; Compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-layered-function.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Finished compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-layered-function.lisp.
;;;
;;;
;;; Compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-layered-access-class.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Finished compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-layered-access-class.lisp.
;;;
;;;
;;; Compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-layered-class.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Finished compiling /home/jack/quicklisp/dists/quicklisp/software/contextl-20211230-git/cx-layered-class.lisp.
;;;

(PERSON :NAME PASCAL) 
(EMPLOYER :NAME VUB) 
(PERSON :NAME PASCAL) 
(PERSON :NAME PASCAL) 
(EMPLOYER :NAME VUB) 
(:EMPLOYER (EMPLOYER :NAME VUB)) 
(PERSON :NAME ROBERT) 
(PERSON :NAME ROBERT) 
(EMPLOYER :NAME DOCOMO) 
(:EMPLOYER (EMPLOYER :NAME DOCOMO)) 
(PERSON :NAME ROBERT) 
(:CITY ILMENAU) 
(EMPLOYER :NAME DOCOMO) 
(:CITY MUNICH) 
(:EMPLOYER (EMPLOYER :NAME DOCOMO :CITY MUNICH)) 
(PERSON :NAME ROBERT :CITY ILMENAU :EMPLOYER
 (EMPLOYER :NAME DOCOMO :CITY MUNICH)) 
(PERSON :NAME ROBERT) 
(:CITY ILMENAU) 
(EMPLOYER :NAME DOCOMO) 
(:CITY MUNICH) 
(:EMPLOYER (EMPLOYER :NAME DOCOMO :CITY MUNICH)) 
(PERSON :NAME ROBERT) 
(EMPLOYER :NAME DOCOMO) 
(:EMPLOYER (EMPLOYER :NAME DOCOMO)) 
(PERSON :NAME ROBERT) 
(EMPLOYER :NAME DOCOMO) 
(:EMPLOYER (EMPLOYER :NAME DOCOMO)) 
(PERSON :NAME ROBERT) 
(:CITY ILMENAU) 
(EMPLOYER :NAME DOCOMO) 
(:CITY MUNICH) 
(:EMPLOYER (EMPLOYER :NAME DOCOMO :CITY MUNICH)) 
(PERSON :NAME ROBERT) 
(:CITY ILMENAU) 
(EMPLOYER :NAME DOCOMO) 
(:CITY MUNICH) 
(:EMPLOYER (EMPLOYER :NAME DOCOMO :CITY MUNICH)) 
(NAME (ROBERT :SLOT-ACCESS SUCCESSFUL) EMPLOYER (NAME DOCOMO CITY MUNICH)) 
:DONE ;;; Loading #P"/home/jack/quicklisp/setup.lisp"
;;; Loading #P"/home/jack/Warsztat/cl-builds/ecl-23.9.9/lib64/ecl-23.9.9/asdf.fas"

:DONE ;;; Loading #P"/home/jack/quicklisp/setup.lisp"
;;; Loading #P"/home/jack/Warsztat/cl-builds/ecl-23.9.9/lib64/ecl-23.9.9/asdf.fas"

:DONE ;;; Loading #P"/home/jack/quicklisp/setup.lisp"
;;; Loading #P"/home/jack/Warsztat/cl-builds/ecl-23.9.9/lib64/ecl-23.9.9/asdf.fas"
;;;
;;; Compiling figure-editor.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Warning: No generic function present when encountering a defmethod for (SETF =LAYERED-FUNCTION-DEFINER-FOR-POINT-X=). Assuming it will be an instance of standard-generic-function.
;;; Warning: No generic function present when encountering a defmethod for (SETF =LAYERED-FUNCTION-DEFINER-FOR-POINT-Y=). Assuming it will be an instance of standard-generic-function.
;;; Warning: No generic function present when encountering a defmethod for (SETF =LAYERED-FUNCTION-DEFINER-FOR-LINE-P1=). Assuming it will be an instance of standard-generic-function.
;;; Warning: No generic function present when encountering a defmethod for (SETF =LAYERED-FUNCTION-DEFINER-FOR-LINE-P2=). Assuming it will be an instance of standard-generic-function.
;;; Finished compiling figure-editor.lisp.
;;;
real time : 5.983 secs
run time  : 10.721 secs
gc count  : 435 times
consed    : 2179202000 bytes
real time : 6.426 secs
run time  : 11.661 secs
gc count  : 470 times
consed    : 2355244976 bytes
;;; Loading #P"/home/jack/quicklisp/setup.lisp"
;;; Loading #P"/home/jack/Warsztat/cl-builds/ecl-23.9.9/lib64/ecl-23.9.9/asdf.fas"
;;;
;;; Compiling figure-editor-2.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Finished compiling figure-editor-2.lisp.
;;;
real time : 7.936 secs
run time  : 14.764 secs
gc count  : 600 times
consed    : 2998401744 bytes
real time : 8.389 secs
run time  : 15.738 secs
gc count  : 636 times
consed    : 3177645040 bytes
;;; Loading #P"/home/jack/quicklisp/setup.lisp"
;;; Loading #P"/home/jack/Warsztat/cl-builds/ecl-23.9.9/lib64/ecl-23.9.9/asdf.fas"

:DONE ;;; Loading #P"/home/jack/quicklisp/setup.lisp"
;;; Loading #P"/home/jack/Warsztat/cl-builds/ecl-23.9.9/lib64/ecl-23.9.9/asdf.fas"

:DONE ;;; Loading #P"/home/jack/quicklisp/setup.lisp"
;;; Loading #P"/home/jack/Warsztat/cl-builds/ecl-23.9.9/lib64/ecl-23.9.9/asdf.fas"

:DONE ;;; Loading #P"/home/jack/quicklisp/setup.lisp"
;;; Loading #P"/home/jack/Warsztat/cl-builds/ecl-23.9.9/lib64/ecl-23.9.9/asdf.fas"

1 
2 
3 
4 
5 
6 
7 
8 
:DONE 
1 
2 
3 
4 
5 
6 
7 
8 
:DONE ;;; Loading #P"/home/jack/quicklisp/setup.lisp"
;;; Loading #P"/home/jack/Warsztat/cl-builds/ecl-23.9.9/lib64/ecl-23.9.9/asdf.fas"

"error caught correctly" ;;; Loading #P"/home/jack/quicklisp/setup.lisp"
;;; Loading #P"/home/jack/Warsztat/cl-builds/ecl-23.9.9/lib64/ecl-23.9.9/asdf.fas"

:DONE

I'm not sure what to make of it -- does it mean that all works correctly now, or there are some signs that it does not work, or these tests are not the good measure of whether the implementation works?

pcostanza commented 1 year ago

My apologies. This comment should have been removed already longer ago. It's gone now. I can confirm that ContextL works on ECL. :)

dkochmanski commented 1 year ago

thanks! :)