deliverable: benchmark
programs
Note that this is one of two
deliverables due by the end of week 5!
Each project group must produce a small JOOS program, i.e. a
collection of classes and a main()
method. The combined size
should be at least 100 non-sequential semicolons (empty expression
statements are not so useful), but that is really the bare minimum for
an interesting program. (At least on unix you can use the count script to count your lines of
code.) The program must "do something" and
illustrate some aspect(s) of JOOS. This means that if you just write
procedural C code disguised as JOOS it might be bad for you. Remember
to run and test your programs!
One important requirement is that your benchmarks for this year should do
something funny. "Funny" is defined as making your TA and
instructor laugh. Computing the factorial function is not funny.
Your program should be an application (which it will be if it
has a
main() method), and it should take input from stdin and write output
to stdout. It should be possible to put the input in a file called in1 ,
and run the program as:
$ java Myprog < in1
You should also be able to run the program capturing the
expected
output in a file called out1 using:
$ java Myprog < in1 > out1
Your program should be deterministic: it must always produce
exactly
the same output for a given input. This lets us run the benchmarks
automatically and test the actual output against an expected output
using diff, which will be important for the peephole contest where
unsound optimizations can break your programs and mess up the output.
Your test program should be compilable with both javac and
joosc. If
your program consists of files f1.java f2.java f3.java ,
then you should be able to compile them using:
$ javac f1.java f2.java f3.java
and
$ joosc f1.java f2.java f3.java
Recall that joosc automatically links in the joos externs for
you.
If you need or want to create more externs, feel free to do so.
However,
your externs may only refer to methods provided in the JDK -
you may not use externs to include Java code that you wrote by yourself.
These programs will be the benchmarks for the peephole contest. The more features of
JOOS you use, the more
"interesting" the contest will be: you must develop static
optimizations to reduce code size. Feel free to make your benchmark
program require your improved compiler from the other concurrent JOOS
deliverable (i.e. for-loops etc.).
The JOOS benchmarks from 2004 are available here. They will also appear in
your public_html directory if you do svn up .
You should check your benchmark in to a directory called group-X/joos/benchmark/
that contains all of the files
that comprise
your benchmark, a README file describing your benchmark (group-X/joos/benchmark/README),
a test input
file called in1 and the matching output file called out1 .
There is no need to email us on
completion.
Unless you took a late day we will automatically take the version into
account that was checked in last before the point of the deadline.
|