Finished the 3-SAT reduction code.