def test_encode_bind_transitive(self): sat_problem = SATProblem() Encoder.encode_each_site_binds_at_most_once(self.tbn_problem, sat_problem) Encoder.encode_limiting_site_binds(self.tbn_problem, sat_problem) Encoder.encode_pair_implies_bind(self.tbn_problem, sat_problem) Encoder.encode_bind_transitive(self.tbn_problem, sat_problem) self.assertEqual(len(sat_problem.bind_to_id), 36) self.assertEqual(len(sat_problem.bind_transitive_clauses), 252)
def test_encode_bind_representatives(self): sat_problem = SATProblem() Encoder.encode_each_site_binds_at_most_once(self.tbn_problem, sat_problem) Encoder.encode_limiting_site_binds(self.tbn_problem, sat_problem) Encoder.encode_pair_implies_bind(self.tbn_problem, sat_problem) Encoder.encode_bind_transitive(self.tbn_problem, sat_problem) Encoder.encode_bind_representatives(self.tbn_problem, sat_problem) self.assertEqual(len(sat_problem.rep_to_id), self.tbn_problem.monomer_count) self.assertEqual(len(sat_problem.bind_representatives_clauses), 36)