Added code for sorting generated definitions to ensure def-before-use.
Adding support for recording calls.
Porting to Eavesdropper.
Dain now uses new Eavesdropper instrumentation framework.