Hygiene: const-ify some constant things.
Refactor out Location->string conversion.

I'm going to want to use this code elsewhere.
Add ways to get an Automaton from a Manifest.

Reduce code duplication by putting this logic in one central place.
Trivial: fix some top-of-file comments.
Refactor out integer-ish casting into a function.

I'm about to use this functionality elsewhere, too.
Trivial: state namespace explicitly.

Just to catch .h/.cpp discrepancies.
Oops: mask location mask is not array-dependent.
Trivial: add an assertion.
Split ConstructKey() into front- and back-ends.

The (currently only) front-end interprets a FunctionEvent and rearranges function parameters into the instrumentation-expected order. The back-end stores these values into a key.

We are about to write another front-end that will do similar things for NOW events.
Add assertion site InstrumentationFn().

This simply finds (or creates) the instrumentation function for an Automaton's 'NOW' event.
Trivial: fix variable name.
Convert assertions to real instrumentation calls.

This new code creates calls to realisable instrumentation functions: we pass all of the dynamic information that we need to look up automata.

For instance, the zero'th automaton will create an instrumentation function called __tesla_instrumentation_assertion_reached_0() that knows how to interpret the arguments expected by automaton 0.

This does break the 'strawman' build, as we are no longer calling the same function for all automata, but that code should follow very soon.
Trivial: build PDF before binary.

The PDF is more likely to work correctly at any given moment.
Don't try to handle 'NOW' events here.

The Callee instrumenter should only deal with function transitions; the appropriate place to deal with 'NOW' events is in the assertion site instrumenter.
Generate instrumentation stubs for 'NOW' events.

This doesn't correctly handle 'NOW' events (that should come fairly shortly), but it does mean that we can be rid of the last vestiges of tesla-hack.c!