[plt-dev] Stepper tests for DeinProgramm language levels?

From: John Clements (clements at brinckerhoff.org)
Date: Wed Mar 18 17:08:51 EDT 2009

As part of pre-release testing, I run the tests in plt/collects/tests/ 
stepper/through-tests... which don't cover any of the deinprogramm  
language levels.  You clearly have a stake in making sure that the  
stepper still works for these language levels, so I'm wondering if  
you'd like to contribute some tests.  Currently, the tests are all in  
one place--though that could easily change--and they're in one of two  
formats: my straightforward if somewhat verbose style, and Eli's  
compact but non-sexp-y flavor.  Here are a couple of examples:

;; my verbose style

(t1 let2
      (test-both-ints "(let ([a (+ 4 5)] [b (+ 9 20)]) (+ a b))"
                      `((before-after ((hilite (let ([a (+ 4 5)] [b (+  
9 20)]) (+ a b))))
                                      ((hilite (define a_0 (+ 4 5)))  
(hilite (define b_0 (+ 9 20))) (hilite (+ a_0 b_0))))
                        (before-after ((define a_0 (hilite (+ 4 5)))  
(define b_0 (+ 9 20)) (+ a_0 b_0))
                                      ((define a_0 (hilite 9)) (define  
b_0 (+ 9 20)) (+ a_0 b_0)))
                        (before-after ((define a_0 9) (define b_0  
(hilite (+ 9 20))) (+ a_0 b_0))
                                      ((define a_0 9) (define b_0  
(hilite 29)) (+ a_0 b_0)))
                        (before-after ((define a_0 9) (define b_0 29)  
(+ (hilite a_0) b_0))
                                      ((define a_0 9) (define b_0 29)  
(+ (hilite 9) b_0)))
                        (before-after ((define a_0 9) (define b_0 29)  
(+ 9 (hilite b_0)))
                                      ((define a_0 9) (define b_0 29)  
(+ 9 (hilite 29))))
                        (before-after ((define a_0 9) (define b_0 29)  
(hilite (+ 9 29)))
                                      ((define a_0 9) (define b_0 29)  
(hilite 38)))
                        (finished-stepping))))


;; eli's compact style:

(let ([def `(define a5 (lambda (a5) (+ a5 13)))])
     (t lam-def test-upto-int
        ,def (a5 23)
        :: ,def {(a5 23)}
        -> ,def {(+ 23 13)}
        -> ,def {36}))


Looking at this more closely, the lowest-hanging fruit here would  
simply be identifying existing tests where the expected result in some  
DeinProgramm language level is the same as the existing expected  
result for some test.

I took a quick crack at running a beginner programm in the lowest  
DeinProgramm level, but the error message suggested that I couldn't  
define new operations in this language level, so I just gave up :).

Anyhow, if you find time to do this at some point, it would probably  
increase the reliability of the stepper w.r.t. DeinProgramm.

cc'ing plt-dev, in case anyone else has good suggestions.

John

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2484 bytes
Desc: not available
URL: <http://lists.racket-lang.org/dev/archive/attachments/20090318/1de004dd/attachment.p7s>

Posted on the dev mailing list.