Automated synthesis and optimization of multilevel logic circuits.