Petite Chez Scheme Version 6.0a Copyright (c) 1998 Cadence Research Systems loading d:/classes/cs342/lib/displayln.scm ... loading d:/classes/cs342/lib/test-homework.scm ... loading D:/scheme/scm/slib/require.scm ... loading D:/scheme/scm/slib/random.scm ... loading D:/scheme/scm/slib/byte.scm ... loading D:/scheme/scm/slib/logical.scm ... loading D:/scheme/scm/slib/randinex.scm ... loading r5rs.scm ... loading sllgen.scm ... sllgen.scm 2000-09-25 11:48 loading define-datatype.scm ... define-datatype.scm version J3 2001-08-26 07:44 loading test-harness.scm ... test-harness.scm: unified test harness 2000-12-21 15:24 loading d:/classes/cs342/lib/type-predicates.scm ... > (load "type-check-infer-bad.tst") loading type-check-infer-bad.tst ... loading d:/classes/cs342/lib/type-check-infer.scm ... loading D:/scheme/scm/slib/hashtab.scm ... loading D:/scheme/scm/slib/hash.scm ... loading D:/scheme/scm/slib/alist.scm ... : line 1: Unknown variable: an-unknown-name : line 1: Operator and argument types don't match Offending call: (+ #t 3) Operator type : (-> (number ...) number) Argument type list: (boolean number) : line 1: Wrong type for test expression Test expression: 7 Expected: boolean Inferred: number : line 3: Non-void type for ignored result of command Offending command: 3 Expected: void Inferred: number : line 4: Wrong type for test expression Test expression: 3 Expected: boolean Inferred: number : line 4: Wrong type for test expression Test expression: 4 Expected: boolean Inferred: number : line 5: Wrong type for test expression Test expression: 3 Expected: boolean Inferred: number : line 5: Wrong type for test expression Test expression: 4 Expected: boolean Inferred: number : line 5: Operator and argument types don't match Offending call: (+ (read) 4) Operator type : (-> (number ...) number) Argument type list: (datum number) : line 5: Operator and argument types don't match Offending call: (not) Operator type : (-> (boolean) boolean) Argument type list: () : line 6: Attempt to apply non-procedure Not a procedure: x Inferred type : number : line 8: Clauses of cond expression have different types line 8: Left clause's body: (begin (displayln 3) (quote ())) line 9: Right clause's body: (eq? (quote a) (car ls)) Left clause's body's type: (forall (t) (list-of t)) Right clause's body's type: boolean : line 14: Non-void type for ignored result of command Offending command: (cdr ls) Expected: void Inferred: (list-of symbol) : line 19: Type mismatch in application implicit in => form of cond clause Offending clause as an application: ((lambda (b) (+ b 3)) (not (null? ls))) Recipient type : (-> (number) number) Test's type in a list: (boolean) : line 21: Type mismatch in set! between variable `n' and expresion Offending expression: #t Expected: number Inferred: boolean : line 23: Attempt to assign to a polymorphic variable: ls Offending assignment: (set! ls (cons (quote y) ls)) Variable type : (forall (t) (list-of t)) : line 24: Attempt to assign to a polymorphic variable: first Offending assignment: (set! first cdr) Variable type : (forall (s t u) (all-of (-> ((list-of s)) s) (-> ((pair-of u t)) u))) : line 24: If statement (no false part) has body with non-void type Offending body: 3 Expected: void Inferred: number : line 24: A list must follow unquote-splicing (,@) Offending expression: x Expected: (forall (t) (list-of t)) Inferred: number : line 26: Mismatch between type of tested expression and datums Offending case clause datums: (a b c) Type of tested expression : number Type of case clause datums : symbol : line 26: Non-void type for ignored result of command Offending command: (+ x 3) Expected: void Inferred: number : line 26: Clauses of case expression have different types line 26: Left clause's body: (begin (+ x 3) (quote ())) line 27: Right clause's body: (quote many) Left clause's body's type: (forall (t) (list-of t)) Right clause's body's type: symbol : line 30: Mismatch between type of tested expression and datums Offending case clause datums: (a b c) Type of tested expression : number Type of case clause datums : symbol : lines 29 to 31: Clauses of no-else case statement don't have type void Expected clause type: void Inferred clause type: symbol : line 32: Wrong type for second expression in cases expression Offending expression: x Expected: my-vehicle Inferred: number : lines 32 to 34: Unknown variable: my-vehicle : line 36: Arms of if expression have different types line 36: Left arm: n line 36: Right arm: (my-odd? (- n 1)) Left arm's type: number Right arm's type: boolean : line 39: Unknown variable: my-odd? : line 42: Unknown variable: my-odd? : line 44: Unknown variable: i : line 47: Unknown variable: i : line 46: Type mismatch between initializer for `i' and step expression Offending expression: #t Expected: number Inferred: boolean : line 52: Non-void type for ignored result of command Offending command: (+ i j) Expected: void Inferred: number : line 51: Non-void type for ignored result of command Offending command: 3 Expected: void Inferred: number : line 54: Unknown variable: addx : line 55: Unknown variable: addxy : line 59: Unknown variable: my-odd? : line 63: Unknown variable: my-even? : lines 65 to 77: Type mismatch in application implicit in named let Offending application of named procedure to initial values: ((letrec ((loop (lambda (numbers nonneg neg) (cond ((null? numbers) (list nonneg neg)) ((>= (car numbers) 0) (loop (cdr numbers) (cons (car numbers) nonneg) neg)) (else (loop (cdr numbers) nonneg (cons (car numbers) neg))))))) loop) (quote (3 -2 1 6 -5)) (quote (#t)) (quote ())) Named procedure's type : (-> ((list-of number) (list-of number) (list-of number)) (list-of (list-of number))) Initial value types in a list: ((list-of number) (list-of boolean) (forall (t) (list-of t))) : lines 77 to 83: Expected type of variable and definition differ Variable: ot? Type from deftype or uses : (forall (t) (-> ((list-of t)) boolean)) Type of defining expression: (forall (t) (-> (t (list-of t)) boolean)) : line 85: Duplicate formal parameters: (f1) Offending formals: (f1 f1) : line 86: Duplicate formal parameters: (x) Offending formals: (x x) : line 87: Duplicate formal parameters: (y) Offending formals: (y . y) : line 88: Repeated declaration of variable names Repeatedly declared variable name(s): (n) : line 89: Repeated declaration of variable names in letrec Repeatedly declared variable name(s): (q) : lines 90 to 91: Duplicate formal parameters: (r) Offending formals: (r r) : lines 92 to 95: Repeated declaration of variant names in define-datatype Repeatedly declared variant name(s): (three-four) : line 95: Expected type of variable and definition differ Variable: three-four Type from deftype or uses : (-> (number boolean) bar) Type of defining expression: (-> (number number boolean) bar) : line 98: Unknown variable: number : line 99: Unknown variable: boolean : line 98: Unknown variable: number : line 99: Unknown variable: boolean : line 113: Unknown variable: passengers : line 121: Unknown variable: passengers : line 125: Duplicate formal parameters: (t?) Offending formals: (t? t?) : lines 128 to 131: Repeated declaration of variable names in do expression Repeatedly declared variable name(s): (i) : lines 132 to 134: Body expression in a forall is not a type predicate Offending body expression: (lambda (obj) (and ((list-of t?) obj) (not ((vector-of t?) obj)))) Expected: (forall (t) (type-predicate-for t)) Inferred: (forall (t) (-> (t) boolean)) > (quit) Process scheme finished