P3 and P4 grading suites available; scripts to follow

48 views
Skip to first unread message

Matt Might

unread,
Apr 17, 2013, 5:27:55 PM4/17/13
to utah-compilers-spring-2013
If you want a preview of your grade, you can run the test cases yourself here:

For P3:

The inputs are in /pub/p3/inputs.ast/

The expected outputs are in /pub/p3/outputs/


For P4:

The inputs are in /pub/p4/inputs.hir/

The expected outputs are in /pub/p4/outputs/


I'm finishing the self-grading scripts and will let you know once
they're ready to roll.

The allowable diff will be 100 lines for p3 and and 200 lines for p4.

-Matt

Michael Bradshaw

unread,
Apr 18, 2013, 11:44:00 AM4/18/13
to utah-compiler...@googlegroups.com, mi...@cs.utah.edu
For those wanting to test but haven't made a script yet, here's what I used to test project 4 (I put it in a shell file in the project directory):

PYDESUGAR=./pydesugar # change me if needed
PYCPS=./pycps # change me if needed

OUTPUT_FOLDER=output
rm -rf ${OUTPUT_FOLDER}
mkdir ${OUTPUT_FOLDER}

RACKET=racket

for i in /pub/p4/inputs.hir/*.py.hir; do
  base=`basename $i .hir`
  expected=/pub/p4/outputs/${base}.out
  out=${OUTPUT_FOLDER}/${base}.out
  echo Testing $i
  ${PYDESUGAR} < $i | ${PYCPS} > ${out}.cps
  cat cps-header.rkt ${out}.cps > ${out}.crkt
  ${RACKET} ${out}.crkt > ${out}
  diff -q ${expected} ${out}
done


For project 3:

PYTRANS=./pytrans-stub # change me to your executable file

OUTPUT_FOLDER=output
rm -rf ${OUTPUT_FOLDER}
mkdir ${OUTPUT_FOLDER}

RACKET=racket

for i in /pub/p3/inputs.ast/*.py.ast; do
  base=`basename $i .ast`
  expected=/pub/p3/outputs/${base}.out
  out=${OUTPUT_FOLDER}/${base}.out
  echo Testing $i
  ${PYTRANS} < $i > ${out}.hir
  cat hir-header.rkt ${out}.hir > ${out}.hrkt
  ${RACKET} ${out}.hrkt > ${out}
  diff -q ${expected} ${out}
done

Abdulrahman Al-Abdulsalam

unread,
Apr 18, 2013, 12:29:45 PM4/18/13
to Michael Bradshaw, utah-compilers-spring-2013, mi...@cs.utah.edu
Michael,

Thank you for the scripts .. very helpful :)




--
You received this message because you are subscribed to the Google Groups "Utah Compilers, Spring 2013" group.
To unsubscribe from this group and stop receiving emails from it, send an email to utah-compilers-spri...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Abdulrahman Khalifa


Reply all
Reply to author
Forward
0 new messages