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 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 ... loading D:/SCHEME/scm/slib/hashtab.scm ... loading D:/SCHEME/scm/slib/hash.scm ... loading D:/SCHEME/scm/slib/alist.scm ... Typed Scheme interpreter loop (by Curtis Clifton and Gary T. Leavens) Use "(type-help)" to list options. typed> (load "aop-3-7.scm") Type checking "aop-3-7.scm" ... ... done type checking "aop-3-7.scm" show-the-datatypes : (-> () (list-of datum)) scan&parse : (-> (string) program) just-scan : (forall (t) (-> (string) (list-of t))) read-eval-print : (-> () poof) procval? : (type-predicate-for procval) closure : (-> ((list-of symbol) expression environment) procval) apply-procval : (-> (procval (list-of expressed-value)) expressed-value) empty-advice-table : (-> () advice-table) add-advice! : (-> (advice-table advice) void) around-advice-for-get : (-> (advice-table symbol) (list-of expression)) around-advice-for-set : (-> (advice-table symbol) (list-of expression)) number->expressed : (-> (number) expressed-value) procval->expressed : (-> (procval) expressed-value) expressed->number : (-> (expressed-value) number) expressed->procval : (-> (expressed-value) procval) a-ref : (forall (t) (-> (number (vector-of t)) (ref-of t))) deref : (forall (t) (-> ((ref-of t)) t)) setref! : (forall (t) (-> ((ref-of t) t) void)) ref-of : (forall (t) (-> ((type-predicate-for t)) (type-predicate-for (ref-of t)))) environment? : (type-predicate-for environment) empty-env : (-> () environment) extend-env : (-> ((list-of symbol) (list-of expressed-value) environment) environment) extend-env-recursively : (-> ((list-of symbol) (list-of (list-of symbol)) (list-of expression) environment) environment) apply-env : (-> (environment symbol) expressed-value) apply-env-ref : (-> (environment symbol) (ref-of expressed-value)) defined-in-env? : (-> (environment symbol) boolean) true-value? : (-> (expressed-value) boolean) *advice-table* : advice-table eval-program : (-> (program) expressed-value) dynamically-weave-around-get : (-> ((list-of expression) expression environment) expressed-value) dynamically-weave-around-set : (-> ((list-of expression) expression symbol expression environment) expressed-value) eval-expression : (-> (expression environment) expressed-value) eval-rands : (-> ((list-of expression) environment) (list-of expressed-value)) eval-rand : (-> (expression environment) expressed-value) apply-primitive : (-> (primitive (list-of expressed-value)) expressed-value) init-env : (-> () environment) run : (-> (string) expressed-value) run-all : (-> () void) run-one : (-> (symbol) void) equal-external-reps? : (forall (t) (-> (t t) boolean)) program? : (type-predicate-for program) program : (forall (s t) (variant-record (a-program (advice-defs (list-of s)) (exp t)))) a-program : (forall (s t) (-> ((list-of s) t) program)) advice? : (type-predicate-for advice) advice : (forall (s t) (variant-record (around-adv (pcd s) (body t)))) around-adv : (forall (s t) (-> (s t) advice)) pcd? : (type-predicate-for pcd) pcd : (forall (t) (variant-record (get-pcd (id-pat t)) (set-pcd (id-pat t)))) get-pcd : (forall (t) (-> (t) pcd)) set-pcd : (forall (t) (-> (t) pcd)) idpattern? : (type-predicate-for idpattern) idpattern : (variant-record (id-pat (id symbol)) (wild-pat)) id-pat : (-> (symbol) idpattern) wild-pat : (-> () idpattern) expression? : (type-predicate-for expression) expression : (forall (s t) (variant-record (lit-exp (datum number)) (var-exp (id symbol)) (primapp-exp (prim s) (rands (list-of t))) (if-exp (test-exp t) (true-exp t) (false-exp t)) (let-exp (ids (list-of symbol)) (rands (list-of t)) (body t)) (proc-exp (ids (list-of symbol)) (body t)) (app-exp (rator t) (rands (list-of t))) (begin-exp (first t) (rest (list-of t))) (letrec-exp (proc-names (list-of symbol)) (idss (list-of (list-of symbol))) (bodies (list-of t)) (letrec-body t)) (varassign-exp (id symbol) (rhs-exp t)) (proceed-exp) (varassign-lhs-exp (rhs-exp t)) (rhs-exp) (unadvisable-var-exp (id symbol)) (unadvisable-varassign-exp (id symbol) (rhs-exp t)) (continue-weave-get-exp (remaining-advice (list-of t)) (base-exp t)) (continue-weave-set-exp (remaining-advice (list-of t)) (base-exp t) (id symbol) (rhs-exp t)))) lit-exp : (-> (number) expression) var-exp : (-> (symbol) expression) primapp-exp : (forall (s t) (-> (s (list-of t)) expression)) if-exp : (forall (t) (-> (t t t) expression)) let-exp : (forall (t) (-> ((list-of symbol) (list-of t) t) expression)) proc-exp : (forall (t) (-> ((list-of symbol) t) expression)) app-exp : (forall (t) (-> (t (list-of t)) expression)) begin-exp : (forall (t) (-> (t (list-of t)) expression)) letrec-exp : (forall (t) (-> ((list-of symbol) (list-of (list-of symbol)) (list-of t) t) expression)) varassign-exp : (forall (t) (-> (symbol t) expression)) proceed-exp : (-> () expression) varassign-lhs-exp : (forall (t) (-> (t) expression)) rhs-exp : (-> () expression) unadvisable-var-exp : (-> (symbol) expression) unadvisable-varassign-exp : (forall (t) (-> (symbol t) expression)) continue-weave-get-exp : (forall (t) (-> ((list-of t) t) expression)) continue-weave-set-exp : (forall (t) (-> ((list-of t) t symbol t) expression)) primitive? : (type-predicate-for primitive) primitive : (variant-record (add-prim) (subtract-prim) (mult-prim) (incr-prim) (decr-prim) (zero-test-prim)) add-prim : (-> () primitive) subtract-prim : (-> () primitive) mult-prim : (-> () primitive) incr-prim : (-> () primitive) decr-prim : (-> () primitive) zero-test-prim : (-> () primitive) the-lexical-spec : (list-of (list-of datum)) the-grammar : (list-of (list-of datum)) loading aop-3-7.scm ... aop-3-7.scm - interp with AOP and variable assignment 2004-04-23 05:11 letrec3.scm -- AST rep of environments with circular links 2000-12-12 19:04 typed> (read-eval-print) --> around get x do 0 run let x = 3 in x 0 --> run let x = 3 in x 3 --> around get x do add1(proceed) run let x = 3 in x 4 --> around get x do add1(proceed) run let x = 3 in +(x,x) 8 --> around get y do begin set y = add1(proceed); proceed end run let y = 10 in +(y,y) 23 --> around get * do add1(proceed) run let y = 10 z = 5 in +(y, z) 17 --> proceed Error reported by sllgen during parsing: at line 9 Nonterminal can't begin with literal-string17 "proceed" Process scheme finished 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 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 ... loading D:/SCHEME/scm/slib/hashtab.scm ... loading D:/SCHEME/scm/slib/hash.scm ... loading D:/SCHEME/scm/slib/alist.scm ... Typed Scheme interpreter loop (by Curtis Clifton and Gary T. Leavens) Use "(type-help)" to list options. typed> (load "aop-3-7.scm") Type checking "aop-3-7.scm" ... ... done type checking "aop-3-7.scm" show-the-datatypes : (-> () (list-of datum)) scan&parse : (-> (string) program) just-scan : (forall (t) (-> (string) (list-of t))) read-eval-print : (-> () poof) procval? : (type-predicate-for procval) closure : (-> ((list-of symbol) expression environment) procval) apply-procval : (-> (procval (list-of expressed-value)) expressed-value) empty-advice-table : (-> () advice-table) add-advice! : (-> (advice-table advice) void) around-advice-for-get : (-> (advice-table symbol) (list-of expression)) around-advice-for-set : (-> (advice-table symbol) (list-of expression)) number->expressed : (-> (number) expressed-value) procval->expressed : (-> (procval) expressed-value) expressed->number : (-> (expressed-value) number) expressed->procval : (-> (expressed-value) procval) a-ref : (forall (t) (-> (number (vector-of t)) (ref-of t))) deref : (forall (t) (-> ((ref-of t)) t)) setref! : (forall (t) (-> ((ref-of t) t) void)) ref-of : (forall (t) (-> ((type-predicate-for t)) (type-predicate-for (ref-of t)))) environment? : (type-predicate-for environment) empty-env : (-> () environment) extend-env : (-> ((list-of symbol) (list-of expressed-value) environment) environment) extend-env-recursively : (-> ((list-of symbol) (list-of (list-of symbol)) (list-of expression) environment) environment) apply-env : (-> (environment symbol) expressed-value) apply-env-ref : (-> (environment symbol) (ref-of expressed-value)) defined-in-env? : (-> (environment symbol) boolean) true-value? : (-> (expressed-value) boolean) *advice-table* : advice-table eval-program : (-> (program) expressed-value) dynamically-weave-around-get : (-> ((list-of expression) expression environment) expressed-value) dynamically-weave-around-set : (-> ((list-of expression) expression symbol expression environment) expressed-value) eval-expression : (-> (expression environment) expressed-value) eval-rands : (-> ((list-of expression) environment) (list-of expressed-value)) eval-rand : (-> (expression environment) expressed-value) apply-primitive : (-> (primitive (list-of expressed-value)) expressed-value) init-env : (-> () environment) run : (-> (string) expressed-value) run-all : (-> () void) run-one : (-> (symbol) void) equal-external-reps? : (forall (t) (-> (t t) boolean)) program? : (type-predicate-for program) program : (forall (s t) (variant-record (a-program (advice-defs (list-of s)) (exp t)))) a-program : (forall (s t) (-> ((list-of s) t) program)) advice? : (type-predicate-for advice) advice : (forall (s t) (variant-record (around-adv (pcd s) (body t)))) around-adv : (forall (s t) (-> (s t) advice)) pcd? : (type-predicate-for pcd) pcd : (forall (t) (variant-record (get-pcd (id-pat t)) (set-pcd (id-pat t)))) get-pcd : (forall (t) (-> (t) pcd)) set-pcd : (forall (t) (-> (t) pcd)) idpattern? : (type-predicate-for idpattern) idpattern : (variant-record (id-pat (id symbol)) (wild-pat)) id-pat : (-> (symbol) idpattern) wild-pat : (-> () idpattern) expression? : (type-predicate-for expression) expression : (forall (s t) (variant-record (lit-exp (datum number)) (var-exp (id symbol)) (primapp-exp (prim s) (rands (list-of t))) (if-exp (test-exp t) (true-exp t) (false-exp t)) (let-exp (ids (list-of symbol)) (rands (list-of t)) (body t)) (proc-exp (ids (list-of symbol)) (body t)) (app-exp (rator t) (rands (list-of t))) (begin-exp (first t) (rest (list-of t))) (letrec-exp (proc-names (list-of symbol)) (idss (list-of (list-of symbol))) (bodies (list-of t)) (letrec-body t)) (varassign-exp (id symbol) (rhs-exp t)) (proceed-exp) (varassign-lhs-exp (rhs-exp t)) (rhs-exp) (unadvisable-var-exp (id symbol)) (unadvisable-varassign-exp (id symbol) (rhs-exp t)) (continue-weave-get-exp (remaining-advice (list-of t)) (base-exp t)) (continue-weave-set-exp (remaining-advice (list-of t)) (base-exp t) (id symbol) (rhs-exp t)))) lit-exp : (-> (number) expression) var-exp : (-> (symbol) expression) primapp-exp : (forall (s t) (-> (s (list-of t)) expression)) if-exp : (forall (t) (-> (t t t) expression)) let-exp : (forall (t) (-> ((list-of symbol) (list-of t) t) expression)) proc-exp : (forall (t) (-> ((list-of symbol) t) expression)) app-exp : (forall (t) (-> (t (list-of t)) expression)) begin-exp : (forall (t) (-> (t (list-of t)) expression)) letrec-exp : (forall (t) (-> ((list-of symbol) (list-of (list-of symbol)) (list-of t) t) expression)) varassign-exp : (forall (t) (-> (symbol t) expression)) proceed-exp : (-> () expression) varassign-lhs-exp : (forall (t) (-> (t) expression)) rhs-exp : (-> () expression) unadvisable-var-exp : (-> (symbol) expression) unadvisable-varassign-exp : (forall (t) (-> (symbol t) expression)) continue-weave-get-exp : (forall (t) (-> ((list-of t) t) expression)) continue-weave-set-exp : (forall (t) (-> ((list-of t) t symbol t) expression)) primitive? : (type-predicate-for primitive) primitive : (variant-record (add-prim) (subtract-prim) (mult-prim) (incr-prim) (decr-prim) (zero-test-prim)) add-prim : (-> () primitive) subtract-prim : (-> () primitive) mult-prim : (-> () primitive) incr-prim : (-> () primitive) decr-prim : (-> () primitive) zero-test-prim : (-> () primitive) the-lexical-spec : (list-of (list-of datum)) the-grammar : (list-of (list-of datum)) loading aop-3-7.scm ... aop-3-7.scm - interp with AOP and variable assignment 2004-04-23 05:11 letrec3.scm -- AST rep of environments with circular links 2000-12-12 19:04 typed> proceed : line 2: Unknown variable: proceed Skipping evaluation because of the type errors... typed> (run "proceed") Error reported by sllgen during parsing: at line 1 Nonterminal can't begin with literal-string1 "proceed" Process scheme finished 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 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 ... loading D:/SCHEME/scm/slib/hashtab.scm ... loading D:/SCHEME/scm/slib/hash.scm ... loading D:/SCHEME/scm/slib/alist.scm ... Typed Scheme interpreter loop (by Curtis Clifton and Gary T. Leavens) Use "(type-help)" to list options. typed> (load "aop-3-7.scm") Type checking "aop-3-7.scm" ... ... done type checking "aop-3-7.scm" show-the-datatypes : (-> () (list-of datum)) scan&parse : (-> (string) program) just-scan : (forall (t) (-> (string) (list-of t))) read-eval-print : (-> () poof) procval? : (type-predicate-for procval) closure : (-> ((list-of symbol) expression environment) procval) apply-procval : (-> (procval (list-of expressed-value)) expressed-value) empty-advice-table : (-> () advice-table) add-advice! : (-> (advice-table advice) void) around-advice-for-get : (-> (advice-table symbol) (list-of expression)) around-advice-for-set : (-> (advice-table symbol) (list-of expression)) number->expressed : (-> (number) expressed-value) procval->expressed : (-> (procval) expressed-value) expressed->number : (-> (expressed-value) number) expressed->procval : (-> (expressed-value) procval) a-ref : (forall (t) (-> (number (vector-of t)) (ref-of t))) deref : (forall (t) (-> ((ref-of t)) t)) setref! : (forall (t) (-> ((ref-of t) t) void)) ref-of : (forall (t) (-> ((type-predicate-for t)) (type-predicate-for (ref-of t)))) environment? : (type-predicate-for environment) empty-env : (-> () environment) extend-env : (-> ((list-of symbol) (list-of expressed-value) environment) environment) extend-env-recursively : (-> ((list-of symbol) (list-of (list-of symbol)) (list-of expression) environment) environment) apply-env : (-> (environment symbol) expressed-value) apply-env-ref : (-> (environment symbol) (ref-of expressed-value)) defined-in-env? : (-> (environment symbol) boolean) true-value? : (-> (expressed-value) boolean) *advice-table* : advice-table eval-program : (-> (program) expressed-value) dynamically-weave-around-get : (-> ((list-of expression) expression environment) expressed-value) dynamically-weave-around-set : (-> ((list-of expression) expression symbol expression environment) expressed-value) eval-expression : (-> (expression environment) expressed-value) eval-rands : (-> ((list-of expression) environment) (list-of expressed-value)) eval-rand : (-> (expression environment) expressed-value) apply-primitive : (-> (primitive (list-of expressed-value)) expressed-value) init-env : (-> () environment) run : (-> (string) expressed-value) run-all : (-> () void) run-one : (-> (symbol) void) equal-external-reps? : (forall (t) (-> (t t) boolean)) program? : (type-predicate-for program) program : (forall (s t) (variant-record (a-program (advice-defs (list-of s)) (exp t)))) a-program : (forall (s t) (-> ((list-of s) t) program)) advice? : (type-predicate-for advice) advice : (forall (s t) (variant-record (around-adv (pcd s) (body t)))) around-adv : (forall (s t) (-> (s t) advice)) pcd? : (type-predicate-for pcd) pcd : (forall (t) (variant-record (get-pcd (id-pat t)) (set-pcd (id-pat t)))) get-pcd : (forall (t) (-> (t) pcd)) set-pcd : (forall (t) (-> (t) pcd)) idpattern? : (type-predicate-for idpattern) idpattern : (variant-record (id-pat (id symbol)) (wild-pat)) id-pat : (-> (symbol) idpattern) wild-pat : (-> () idpattern) expression? : (type-predicate-for expression) expression : (forall (s t) (variant-record (lit-exp (datum number)) (var-exp (id symbol)) (primapp-exp (prim s) (rands (list-of t))) (if-exp (test-exp t) (true-exp t) (false-exp t)) (let-exp (ids (list-of symbol)) (rands (list-of t)) (body t)) (proc-exp (ids (list-of symbol)) (body t)) (app-exp (rator t) (rands (list-of t))) (begin-exp (first t) (rest (list-of t))) (letrec-exp (proc-names (list-of symbol)) (idss (list-of (list-of symbol))) (bodies (list-of t)) (letrec-body t)) (varassign-exp (id symbol) (rhs-exp t)) (proceed-exp) (varassign-lhs-exp (rhs-exp t)) (rhs-exp) (unadvisable-var-exp (id symbol)) (unadvisable-varassign-exp (id symbol) (rhs-exp t)) (continue-weave-get-exp (remaining-advice (list-of t)) (base-exp t)) (continue-weave-set-exp (remaining-advice (list-of t)) (base-exp t) (id symbol) (rhs-exp t)))) lit-exp : (-> (number) expression) var-exp : (-> (symbol) expression) primapp-exp : (forall (s t) (-> (s (list-of t)) expression)) if-exp : (forall (t) (-> (t t t) expression)) let-exp : (forall (t) (-> ((list-of symbol) (list-of t) t) expression)) proc-exp : (forall (t) (-> ((list-of symbol) t) expression)) app-exp : (forall (t) (-> (t (list-of t)) expression)) begin-exp : (forall (t) (-> (t (list-of t)) expression)) letrec-exp : (forall (t) (-> ((list-of symbol) (list-of (list-of symbol)) (list-of t) t) expression)) varassign-exp : (forall (t) (-> (symbol t) expression)) proceed-exp : (-> () expression) varassign-lhs-exp : (forall (t) (-> (t) expression)) rhs-exp : (-> () expression) unadvisable-var-exp : (-> (symbol) expression) unadvisable-varassign-exp : (forall (t) (-> (symbol t) expression)) continue-weave-get-exp : (forall (t) (-> ((list-of t) t) expression)) continue-weave-set-exp : (forall (t) (-> ((list-of t) t symbol t) expression)) primitive? : (type-predicate-for primitive) primitive : (variant-record (add-prim) (subtract-prim) (mult-prim) (incr-prim) (decr-prim) (zero-test-prim)) add-prim : (-> () primitive) subtract-prim : (-> () primitive) mult-prim : (-> () primitive) incr-prim : (-> () primitive) decr-prim : (-> () primitive) zero-test-prim : (-> () primitive) the-lexical-spec : (list-of (list-of datum)) the-grammar : (list-of (list-of datum)) loading aop-3-7.scm ... aop-3-7.scm - interp with AOP and variable assignment 2004-04-23 05:11 letrec3.scm -- AST rep of environments with circular links 2000-12-12 19:04 typed> (run "around get x do 0 run let x = 3 in x") 0 : expressed-value typed> (exit) Process scheme finished