Welcome to DrScheme, version 205.10-cvs6jan2004.
Language: Essentials of Programming Languages (2nd ed.).
cps2.scm: 2004-03-22 13:07
test-harness.scm: unified test harness for CSG111 2004-01-08 13:12
test-suite.scm: unified test suite 2004-03-16 10:45
> (run "+(3,5,7)")
8
> (trace eval-exp-c apply-context apply-primitive)
(eval-exp-c apply-context apply-primitive)
> (run "+(3,5,7)")
|(eval-exp-c
   #(struct:primapp-exp
     #(struct:add-prim)
     (#(struct:lit-exp 3) #(struct:lit-exp 5) #(struct:lit-exp 7)))
   #(struct:empty-env-record)
   #(struct:empty-context))
| (eval-exp-c
    #(struct:lit-exp 3)
    #(struct:empty-env-record)
    #(struct:eval-exps1-context
      (#(struct:lit-exp 5) #(struct:lit-exp 7))
      #(struct:empty-env-record)
      #(struct:apply-primitive-context
        #(struct:add-prim)
        #(struct:empty-context))))
| |(apply-context
     #(struct:eval-exps1-context
       (#(struct:lit-exp 5) #(struct:lit-exp 7))
       #(struct:empty-env-record)
       #(struct:apply-primitive-context
         #(struct:add-prim)
         #(struct:empty-context)))
     3)
| | (eval-exp-c
      #(struct:lit-exp 5)
      #(struct:empty-env-record)
      #(struct:eval-exps1-context
        (#(struct:lit-exp 7))
        #(struct:empty-env-record)
        #(struct:eval-exps2-context
          3
          #(struct:apply-primitive-context
            #(struct:add-prim)
            #(struct:empty-context)))))
| | |(apply-context
       #(struct:eval-exps1-context
         (#(struct:lit-exp 7))
         #(struct:empty-env-record)
         #(struct:eval-exps2-context
           3
           #(struct:apply-primitive-context
             #(struct:add-prim)
             #(struct:empty-context))))
       5)
| | | (eval-exp-c
        #(struct:lit-exp 7)
        #(struct:empty-env-record)
        #(struct:eval-exps1-context
          ()
          #(struct:empty-env-record)
          #(struct:eval-exps2-context
            5
            #(struct:eval-exps2-context
              3
              #(struct:apply-primitive-context
                #(struct:add-prim)
                #(struct:empty-context))))))
| | | |(apply-context
         #(struct:eval-exps1-context
           ()
           #(struct:empty-env-record)
           #(struct:eval-exps2-context
             5
             #(struct:eval-exps2-context
               3
               #(struct:apply-primitive-context
                 #(struct:add-prim)
                 #(struct:empty-context)))))
         7)
| | | | (apply-context
          #(struct:eval-exps2-context
            7
            #(struct:eval-exps2-context
              5
              #(struct:eval-exps2-context
                3
                #(struct:apply-primitive-context
                  #(struct:add-prim)
                  #(struct:empty-context)))))
          ())
| | | | |(apply-context
           #(struct:eval-exps2-context
             5
             #(struct:eval-exps2-context
               3
               #(struct:apply-primitive-context
                 #(struct:add-prim)
                 #(struct:empty-context))))
           (7))
| | | | | (apply-context
            #(struct:eval-exps2-context
              3
              #(struct:apply-primitive-context
                #(struct:add-prim)
                #(struct:empty-context)))
            (5 7))
| | | |[10](apply-context
             #(struct:apply-primitive-context
               #(struct:add-prim)
               #(struct:empty-context))
             (3 5 7))
| | | |[11](apply-primitive #(struct:add-prim) (3 5 7))
| | | |[11]8
| | | |[11](apply-context #(struct:empty-context) 8)
| | | |[11]8
| | | |[10]8
| | | | | 8
| | | | |8
| | | | 8
| | | |8
| | | 8
| | |8
| | 8
| |8
| 8
|8
8
> 