A Quick Logic Synthesis Algorithm