Added reverse AD mode lib, randomized test generator and validator