Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Representations do not work on CCL #3

Open
Symbolics opened this issue Nov 20, 2020 · 3 comments
Open

Representations do not work on CCL #3

Symbolics opened this issue Nov 20, 2020 · 3 comments

Comments

@Symbolics
Copy link
Collaborator

Symbolics commented Nov 20, 2020

The function representation-initial-value throws a type-error on CCL. Strangely, the type error is intermittent, or appears at different locations. At times it is thrown from the check at the end of the fully macro expanded function:

The value *CS* is not of the expected type (OR
                                            ALEXANDRIA.1.0.0:ARRAY-INDEX
                                            SLCT::CANONICAL-RANGE
                                            SLCT::CANONICAL-SEQUENCE).

Other times from elsewhere:

The value #(2 3 5) is not of the expected type CCL::SIMPLE-UNSIGNED-DOUBLEWORD-VECTOR.
   [Condition of type TYPE-ERROR]

and sometimes (rarely), it's not thrown at all and it works properly:

SLCT-T> (SLCT::CANONICAL-SEQUENCE #(2 3 5))
#S(SLCT::CANONICAL-SEQUENCE :VECTOR #(2 3 5))
SLCT-T> (slct::representation-initial-value *)
; Evaluation aborted on #<TYPE-ERROR #x2101FD5EAD>.
SLCT-T> (slct::representation-initial-value **)
2
SLCT-T> (slct::representation-initial-value ***)
2
SLCT-T> (lisp-implementation-version)
"Version 1.11.8 (v1.11.8-2-gd411e378) WindowsX8664"

CCL::SIMPLE-UNSIGNED-DOUBLEWORD-VECTOR is an un-exported type internal to CCL, used in some kind of class translation. It is not used in the code.

My best guess at this point is that this is a CLOS problem with CCL, although it's intermittent nature is puzzling and could indicate a deeper issue in CCL. The code works fine on SBCL and ACL implementations. Experiments with various array types for the vector did not change the result. There is a possibly related discussion on comp.lang.lisp from 2017 that may be worth reading through.

@Symbolics Symbolics added the bug label Nov 20, 2020
@kwccoin
Copy link

kwccoin commented Mar 29, 2022

Not adding to this. But somehow my macos has to use CCL64 under brew install to use jupyter-lab. SBCL does not work. The
CCL::SIMPLE-UNSIGNED-DOUBLEWORD-VECTOR problem is NOT intermittent, as it is easily reproduced in the leaf-and-stem call in the tutorial.

(stem-and-leaf (select scfdata (range 23 nil) 'scfdata:absorption)) ;arrays are 0 based, so we start at 23
TYPE-ERROR: The value #(6 10) is not of the expected type CCL::SIMPLE-UNSIGNED-DOUBLEWORD-VECTOR.

0: (CCL::DEFAULT-INITARGS #<STANDARD-CLASS ENVIRONMENT> (#<TAGGED-RETURN-ADDRESS in function (:INTERNAL DISSECT:PRESENT) (+181) #x30200121D214> . 15393191038189))
1: (CCL::%MAKE-STD-INSTANCE #<STANDARD-CLASS ENVIRONMENT> (#<TAGGED-RETURN-ADDRESS in function (:INTERNAL DISSECT:PRESENT) (+181) #x30200121D214> . 15393191038189))
2: (#<CCL::STANDARD-KERNEL-METHOD MAKE-INSTANCE (STANDARD-CLASS)> #<STANDARD-CLASS ENVIRONMENT> CONDITION The value #(6 10) is not of the expected type CCL::SIMPLE-UNSIGNED-DOUBLEWORD-VECTOR.)
3: (CCL::%MAKE-INSTANCE #<CLASS-CELL for DISSECT:ENVIRONMENT #x30200121C2ED> CONDITION The value #(6 10) is not of the expected type CCL::SIMPLE-UNSIGNED-DOUBLEWORD-VECTOR.)
4: ((:INTERNAL (JUPYTER:EVALUATE-CODE (JUPYTER/COMMON-LISP:KERNEL T))) The value #(6 10) is not of the expected type CCL::SIMPLE-UNSIGNED-DOUBLEWORD-VECTOR.)
5: (SIGNAL The value #(6 10) is not of the expected type CCL::SIMPLE-UNSIGNED-DOUBLEWORD-VECTOR.)
6: (CCL::%ERROR The value #(6 10) is not of the expected type CCL::SIMPLE-UNSIGNED-DOUBLEWORD-VECTOR. NIL 78294785)
7: ((:INTERNAL CCL::%XERR-DISP))
8: (CCL::FUNCALL-WITH-ERROR-REENTRY-DETECTION #<COMPILED-LEXICAL-CLOSURE (INTERNAL %XERR-DISP) #x2567A27F>)
9: (CCL::%XERR-DISP 15393191038164)
10: (CCL::%PASCAL-FUNCTIONS% 2 15393191038164)
11: (NIL #<Unknown Arguments>)
12: (SELECT-DEV::REPRESENTATION-INITIAL-VALUE #S(CANONICAL-SEQUENCE :VECTOR #(6 10)))
13: (SELECT-DEV:ROW-MAJOR-SETUP (#S(CANONICAL-SEQUENCE :VECTOR #(6 10))) #<COMPILED-LEXICAL-CLOSURE (INTERNAL (SELECT (ARRAY))) #x302005F5A70F>)
14: (#<STANDARD-METHOD SELECT (ARRAY)> #(0 3 3 4 0 4 5 9 4 6 1 8 1 0 2 7 2 5 3 9 3 3 3) #(6 10))
15: (STEM-AND-LEAF #(50 43 43 44 50 44 35 49 54 76 31 48 61 70 62 47 42 45 43 59 53 53 73) STEM-SIZE 10 LEAF-SIZE 1)
16: (CCL::CALL-CHECK-REGS STEM-AND-LEAF #(50 43 43 44 50 44 35 49 54 76 31 48 61 70 62 47 42 45 43 59 53 53 73))
17: (JUPYTER/COMMON-LISP::EVAL-AND-PRINT (STEM-AND-LEAF (SELECT SCFDATA (RANGE 23 NIL) 'ABSORPTION)) NIL NIL)
18: (#<STANDARD-METHOD JUPYTER:EVALUATE-FORM (JUPYTER/COMMON-LISP:KERNEL T T T)> #<KERNEL #x3020029BC66D> #<BASIC-FILE-CHARACTER-INPUT-STREAM ("CELL:1077300313.LISP.newest"/30 UTF-8) #x302005F5CF0D> CELL:1077300313.LISP.newest NIL NIL NIL)
19: (JUPYTER/COMMON-LISP::REPL ;(stem-and-leaf  (aops:each #'ffloor (select scfdata (range 23 nil) 'scfdata:absorption) ) )
     
(stem-and-leaf (select scfdata (range 23 nil) 'scfdata:absorption)) ;arrays are 0 based, so we start at 23
; (stem-and-leaf (select scfdata (range 0 26) 'scfdata:absorption)) CELL:1077300313.LISP.newest NIL)
20: (#<STANDARD-METHOD JUPYTER:EVALUATE-CODE (JUPYTER/COMMON-LISP:KERNEL T)> #<KERNEL #x3020029BC66D> ;(stem-and-leaf  (aops:each #'ffloor (select scfdata (range 23 nil) 'scfdata:absorption) ) )
     
(stem-and-leaf (select scfdata (range 23 nil) 'scfdata:absorption)) ;arrays are 0 based, so we start at 23
; (stem-and-leaf (select scfdata (range 0 26) 'scfdata:absorption)) CELL:1077300313.LISP.newest NIL)
21: (JUPYTER::HANDLE-EXECUTE-REQUEST)
22: (JUPYTER::RUN-SHELL #<KERNEL #x3020029BC66D>)
23: ((:INTERNAL BORDEAUX-THREADS::BINDING-DEFAULT-SPECIALS))
24: (CCL::RUN-PROCESS-INITIAL-FORM #<PROCESS SHELL Thread(3) [Active] #x3020029C7BDD> (#<COMPILED-LEXICAL-CLOSURE (INTERNAL %PROCESS-RUN-FUNCTION) #x3020029C796F>))
25: ((:INTERNAL (CCL::%PROCESS-PRESET-INTERNAL (CCL:PROCESS))) #<PROCESS SHELL Thread(3) [Active] #x3020029C7BDD> (#<COMPILED-LEXICAL-CLOSURE (INTERNAL %PROCESS-RUN-FUNCTION) #x3020029C796F>))
26: ((:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION))

@Symbolics
Copy link
Collaborator Author

Thanks for the update. I do not recommend CCL for any numeric work. There are serious errors in floating point computations that have been reported, but unfixed for more than a year. Even if CCL were to work, you risk getting inaccurate results.

@snunez1 snunez1 closed this as completed Jul 18, 2022
@snunez1 snunez1 reopened this Jan 31, 2024
@snunez1 snunez1 removed the bug label Feb 1, 2024
@snunez1
Copy link

snunez1 commented Feb 3, 2024

This has been reported as a CCL bug. Leaving open here to monitor for a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants