Add bdd generalized cofactor procedure and test case