ILOS Specification nonconformity
Closed this issue · 8 comments
sasagawa888 commented
In verify/object.lsp
many incorrect test cases.
Easy-ISLisp Ver2.15
> (load "verify/object.lsp")
(READ-FOO-A X) is bad. correct is <class error> but got <class null>
(ACCESS-FOO-A X) is bad. correct is <class error> but got <class null>
(+ (DEFGENERIC FOO NIL)) is bad. correct is <class error> but got <class domain-error>
(EQ (CLASS-OF (FUNCTION CREATE)) (CLASS <STANDARD-GENERIC-FUNCTION>)) is bad. correct is T but got NIL
(EQ (CLASS-OF (QUOTE A)) (CLASS <SYMBOL>)) is bad. correct is T but got NIL
(EQ (CLASS-OF CC) (CLASS <SIMPLE-ERROR>)) is bad. correct is T but got NIL
(EQ (CLASS-OF CC) (CLASS <END-OF-STREAM>)) is bad. correct is T but got NIL
(EQ (CLASS-OF A-3) (CLASS <INVALID>)) is bad. correct is T but got NIL
(INSTANCEP CC (CLASS <SIMPLE-ERROR>)) is bad. correct is T but got NIL
(INSTANCEP CC (CLASS <STREAM-ERROR>)) is bad. correct is T but got NIL
(INSTANCEP CC (CLASS <END-OF-STREAM>)) is bad. correct is T but got NIL
(INSTANCEP (QUOTE A) (CLASS <SYMBOL>)) is bad. correct is T but got NIL
(INSTANCEP (QUOTE A) (CLASS <STANDARD-CLASS>)) is bad. correct is NIL but got T
(INSTANCEP (QUOTE A) (CLASS <STANDARD-OBJECT>)) is bad. correct is NIL but got T
(INSTANCEP (CLASS C1111) (CLASS <STANDARD-CLASS>)) is bad. correct is T but got NIL
T
>
sasagawa888 commented
Partially fixed.
The symbol remained a symbol, even if it was assigned a class with defclass.
e.g.
> (defclass b () ())
B
> (class-of 'b)
<class symbol>
> (instancep 'b (class <symbol>))
T
>
sasagawa888 commented
Partially fixed.
create is standard-generic-function
Easy-ISLisp Ver2.16
> (class-of #'create)
<class standard-generic-function>
>
sasagawa888 commented
Partially fixed.
Easy-ISLisp Ver2.16
> (instancep #'create (class <standard-generic-function>))
NIL
> (instancep #'create (class <generic-function>))
T
> (instancep #'create (class <object>))
T
>
sasagawa888 commented
Partially fixed.
error function generate class is simple-error
‘‘‘
;;
($eval (catch-condition (error "err")))
(test (eq (class-of cc) (class )) t)
‘‘‘
sasagawa888 commented
Partially fixed.
Fixed instancep.
user defined class is standard-class.
sasagawa888 commented
I added meta-class and syntax error checks to defclass syntax.
sasagawa888 commented
I added top-lebel check to defgeneric and defmethod. I added test library $error1 macro to test top-level check.
sasagawa888 commented
I have fixed many nonconformities. If you use ILOS normally, it's probably okay.