Algorithms for Synthesis and Testing of Asynchronous Circuits