Added clause generation methods.  They haven't been tested, but the logic should be approximately correct.