Compiler 2015: Phase 5: Testing environment specification - final
外观
How a submission is judged in this phase
- 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
git clone
one's compiler2015- (IMPORTANT)
git checkout final
, the version with the 'final' tag is literally the most important one. Do push tags! - To judge this submission (e.g.
abc/compiler2015/
)- Kill all irrelevant processes
- Setup a new bash process
- Reset environment variables
cd abc/compiler2015/
make clean
# delete the bin dirmake all
# compile your code, please put your executables in a bin directory. A makefile is required!source finalvars.sh
# setup environment variables for mid-term testing. Define $CCHK in this script.cd bin
- For each test case, copy the test case to abc/compiler2015/bin/data.c
$CCHK < data.c > assem.s
- Check
$?
(the exit status); 0 for OK, 1 for error spim -stat -file assem.s
- 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 |