跳转到内容

Compiler 2015: Phase 5: Testing environment specification - final

来自ACM Class Wiki

How a submission is judged in this phase

  1. Boot a virtual machine in vbox of Ubuntu 14.04 (gcc 4.9.2) with both /usr/lib/jvm/java-8-oracle/jre/bin/java and /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
  2. git clone one's compiler2015
  3. (IMPORTANT)git checkout final, the version with the 'final' tag is literally the most important one. Do push tags!
  4. To judge this submission (e.g. abc/compiler2015/)
    1. Kill all irrelevant processes
    2. Setup a new bash process
    3. Reset environment variables
    4. cd abc/compiler2015/
    5. make clean # delete the bin dir
    6. make all # compile your code, please put your executables in a bin directory. A makefile is required!
    7. source finalvars.sh # setup environment variables for mid-term testing. Define $CCHK in this script.
    8. cd bin
    9. For each test case, copy the test case to abc/compiler2015/bin/data.c
      1. $CCHK < data.c > assem.s
      2. Check $? (the exit status); 0 for OK, 1 for error
      3. spim -stat -file assem.s
      4. Don't output debug information to standard output in your submission. Please print your assembly only.

Notes

Do pay attention to Makefile!

Define $CCHK in your finalvars.sh


Standard-library Functions

printf
malloc
getchar

Thresholds

20 programs from the Inherited dataset are promoted to performance test. If you're interested in optimization, you can promote some programs from the New dataset when you're the TA someday!

Unless your compiler pass the correctness test, you cannot get any bonus from optimization.

If the assembly of a specific program generated by your compiler successfully terminates and the instruction count reported by statspim is lower than the threshold, it literally means you get the bonus of this program.

Program Threshold
basicopt1 480000
Bulgarian 1100000
expr 30000
hanoi2 500000
hanoi 180000
hashmap 350000
heapsort 13000000
horse2 9000000
horse3 13000000
horse 11000000
magic 1350000
maxflow 13000000
prime 3500000
qsort 2500000
queens 500000
spill2 23000
superloop 2100000
tak 1800000
treap 6000000
twinprime 1000000