The "code" type used to be a list of instructions; it is now structured into conditionals and loops. The "pseudo" type now supports conditionals and loops too. The code loader isn't right yet, but I'm committing anyway because the project currently builds happily (albeit with warnings).
Moving towards a semantics of if- and while-statements. Currently if-statements are treated as non-deterministic branches, and while-loops iterate exactly once.
Added minimal "while" statement to C syntax. Added silly litmus test for experimenting with it. Currently having problems with getting the "program_order_index" field set correctly, as it's not clear what to do with this field now that programs are no longer just straight-line code. It may be necessary to change the underlying type of the event monad. The underlying type of the event monad includes a function that takes the current event-instance-id and returns the next event-instance-id. It may be necessary to extend this with a function that does the same thing with program_order_index. Maybe.
Changed type of "zeroT" from "unit T" to "'a T". I think that's a better type for "zeroT". The semantics of loops is now able to place po-edges between the test condition and the body.
Improved C parsing. C litmus tests are now provided in a "linear" form, i.e. a sequence of C functions rather than a grid of assembly threads. Fixed the insertion of prog_order edges so as not to skip indexes.
Minor.
All instructions (even assembly instructions) now produce an optional return value. That is, the evaluation of instructions no longer just produces a "branch" value -- it now produces a branch together with a "V.v option". All existing instructions set this second component to "None". The idea is that C instructions will return a meaningful value, and this value will be useful when the instruction forms the test condition of an if-statement or a while-loop.
Added expressions. These can occur anywhere in the program, but are most appropriate in if/while test conditions. Expressions are either numeric constants (e.g. 4), registers (e.g. r0), or locations (e.g. x). If statements are no longer non-deterministic: they correctly branch according to the value of the test condition (0 is false, everything else is true). In due course I intend to add more expressions to the mix.
Made some progress on semantics of while-loops. I've made it so that the loop-body is evaluated once (only once) if the test condition is non-zero, and it is skipped if the test condition is zero. Now all I have to do is to repeatedly evaluate the loop, which shouldn't be too hard, given that the "unroll" flag is already in existence.
Slightly refactored "code memory" type.  While loops now seem to work reasonably well.
a bit of refactoring
A bit more refactoring. Changed name from "CPP11" to "C" throughout, for better consistency with the litmus tool. Working on C parser, getting it to accept parameters, and be closer to actual C code. Added a few more litmus tests. Moved CAst module from litmus into lib, so that Herd can use it too; same for RunType. Adjusted litmus a little bit, so that it accepts the newly-extended "pseudo" type. I also made the CAst.t type parametric in the type of the body. For litmus, the body of each procedure is uninterpreted, so the type is "string CAst.t". For herd, the body is interpreted as a list of pseudo-instructions, so the type is "(pseudo list) CAst.t".
Merge commit '411e13dcdfcf3b6889adf99e71d3dc69c0b09bc5' into johnc3

Conflicts:
	litmus/CTarget.mli
Found a different way to add parameter data to Herd: by putting it into the gpu_data field of the test record.
Finished renaming "CPP11" to "C". C files can now contain type annotations for local variables. E.g. one can write "int r0 = 5" or "r0 = 5" and it makes no difference, since we assume that all the r0, r1, r2, ... registers are already declared.
More work on C parser
Fixed semantics of "if (1 == r0) { ... } else { ... }". I think it now generates the constraints correctly.
Testsuite working.