ACL & structure type checking? 
Author Message
 ACL & structure type checking?

Every once in a while, when I move code from ACL to CMUCL, I'm bitten by
structure type mismatches.  As I understand it, ACL turns structure
references into indexes into an array of structure elements.  As long as
struct A element 1 has the same type as struct B element 1, you can call
the right accessor for the wrong structure, and it all works out.

Case in point:

CL-USER(15): (defstruct m1

CL-USER(16): (defstruct m2

CL-USER(17): (setf *m1* (make-m1 :id 'hi :name "m1-itude"))
#S(M1 :ID HI :NAME "m1-itude")

CL-USER(18): (setf *m2* (make-m2 :id 'bye :name "m2itude" :date
#S(M2 :ID BYE :NAME "m2itude" :DATE 3220992127)

CL-USER(19): (m1-id *m1*)

CL-USER(20): (m1-id *m2*)

CL-USER(21): (m2-id *m1*)

CL-USER(22): (m2-id *m2*)

Safety was turned up to 3, as was debugging, but nothing in this is

No errors were generated in the making of this example, but I want errors
here.  Is there a way for me to get that?


Michael Hannemann

Wed, 14 Jul 2004 18:06:57 GMT  
 [ 1 post ] 

 Relevant Pages 

1. structured types & procedures

2. algorithm for type checking recursive types

3. type checking recursive types

4. type-checking / type() function

5. A Type checking/reconstruction procedure for Typed-Prolog

6. Accessing foreign type array slot value (ACL 5.0)

7. ACL Unix vs. ACL Linux

8. read-sequence & ACL

9. Compatibilty issues with ACL & MCL

10. Checking record structure of a data file

11. conflict between CS-PICK and control structure checking

12. Type resolution & classwide access types


Powered by phpBB® Forum Software