AIB 2007-13: Second-Order Adjoints by Source Code Manipulation of Numerical Programs