CMPSC 311, Spring 2013, Project 3, Grading info

The grades were based on 25 points, calculated as follows.

Testing was done on Linux by
gcc -std=c99 -Wall -Wextra -o pass1 pass1.c
{ cat test_input/test1-in | pass1 | visible > test1-stdout ;} 2>&1 | visible > test1-stderr
diff solution_output/test1-stdout test1-stdout
etc.
The program visible translates space characters to [SP], etc., so that the diff output is easier to read.

Each pass was tested separately, at 8 points each (we're going to divide by 2 later) for stdout, and 1 point each for stderr.  Each line of the following input-output display ends with newline, which is not shown explicitly.

1.  \f \v \t --> sp, \r \r\n --> \n
.[FF].
.[VT].
.[HT].
.[RT].
.[NL].
.[RT][NL].
.aB12!@#\
.

.[SP].
.[SP].
.[SP].
.[NL].
.[NL].
.[NL].
.aB12!@#\
.

2.  9 trigraphs
??([SP]
??)[SP]
??<[SP]
??>[SP]
??/[SP]
??![SP]
??'[SP]
??-[SP]
??=[SP]
a??[SP]??a[SP]???[SP]abc
[[SP]
][SP]
{[SP]
}[SP]
\[SP]
|[SP]
^[SP]
~[SP]
#[SP]
a??[SP]??a[SP]???[SP]abc

3a.  line continuation
ab\
cd
ef
gh\ij
klm\n
op
abcd
ef
gh\ij
klm\n
op

4a.  multiple comments
// comment 1
/* comment 2 */
/*
 * comment 3
 */
// comment 4 /* inside comment 4 */
char foo[] = "// looks like a comment";
char bar[] = "/* looks like a comment */";
[SP]
[SP]



[SP]
char[SP]foo[][SP]=[SP]"//[SP]looks[SP]like[SP]a[SP]comment";
char[SP]bar[][SP]=[SP]"/*[SP]looks[SP]like[SP]a[SP]comment[SP]*/";

There were some additional tests for pass 3 and pass 4, at 2 points for stdout, and 1 point for stderr.  These should produce a warning message to stderr.

3b.  letter, backslash, newline.  warning: backslash-newline at end of file
p\
p

3c.  letter, backslash, no newline.  warning: backslash at end of file
p\
p\

4b.  unclosed multiline comment.  warning: unterminated /* */ comment, fixed, Pass 4
/* unclosed
 * comment
two newline characters


In summary,


score 8
score 2
score 1
total points
pass 1
test1-stdout

test1-stderr
9
pass 2
test2-stdout

test2-stderr
9
pass 3
test3a-stdout
test3b-stdout
test3c-stdout
test3a-stderr
test3b-stderr
test3c-stderr
15
pass 4
test4a-stdout
test4b-stdout
test4a-stderr
test4b-stderr
12
points
32
6
7
45

Then 5 points (or less) were added based on the compiler warnings, and points may have been restored if the output differences were only because of the content of a warning message sent to stderr.

The total of 50 points was then divided by 2 (round up), and that's the grade that was recorded.



These have no impact on the grade: