[CSG111] New test setup for MP5


Subject: [CSG111] New test setup for MP5
From: Therapon Skotiniotis (skotthe@ccs.neu.edu)
Date: Tue Mar 07 2006 - 12:45:55 EST


 To test your statement language for questions 3 and 4 in MP5 you are
required to use "drscheme-mp5-init.scm" (attached with this email). The
file provides a new print function "logged:printf" as well as a new test
setup. You will have to use "logged:printf" in your interpreter for the
"print" statement. logged:printf has exactly the same specification as
eopl:printf so a simple rename in your interpreter should do the trick.

The changes in the testing setup allow for the specification of a trace in
each of your tests. By trace here we mean the values (booleans and numbers)
that your test will print out using the language's print statement. So you
are required to provide the expected trace for each test that you provide.
The trace provided and the test's actual trace are checked for equality.
Equality between traces means that the same values in the same sequence
appear in the 2 lists.

A mini howto on what exactly you need to do follows. For any questions,
drop us an email.

-- Theo

MP5 MINI HOWTO
--------------

1) replace
    
    (require "drscheme-init.scm")

  with

    (require "drscheme-mp5-init.scm")

 in all your modules.

2) Make sure your interpreter uses "logged:printf" for any printing
operations of your language. The contract for logged:printf is the same as
eopl:printf.

3) Test cases have the following form

   (test-name program trace)

where

 test-name : as before

 program: as before

 trace: list of bools and/or numbers OR error

examples of tests

  (block-stmt1 "var i,j; { i = 3 ; j = 4 ; print -(i,j); print -(j,i)}"
   (-1 1))

  (block-test-2 "var i,j; { i = 3 ; j = 4 ; print -(p,j); print -(j,i)}"
   error)


_______________________________________________
csg111 mailing list
csg111@lists.ccs.neu.edu
https://lists.ccs.neu.edu/bin/listinfo/csg111



This archive was generated by hypermail 2b28 : Thu Mar 15 2007 - 15:00:09 EDT