Beispiel #1
0
 def test_generate_invar_problem(self):
     # PROBLEM = BASE STEP & INDUCTION
     for prop in prop_database():
         expr    = utils.make_nnf_boolean_wff(prop.expr)
         problem = invarspec.generate_invar_problem(self.fsm, expr)
     
         manual  = (invarspec.generate_base_step(self.fsm, expr) & 
                    invarspec.generate_inductive_step(self.fsm, expr))
        
         self.assertEqual(problem.to_cnf().vars_list, manual.to_cnf().vars_list)
Beispiel #2
0
    def test_generate_invar_problem(self):
        # PROBLEM = BASE STEP & INDUCTION
        for prop in prop_database():
            expr = utils.make_nnf_boolean_wff(prop.expr)
            problem = invarspec.generate_invar_problem(self.fsm, expr)

            manual = (invarspec.generate_base_step(self.fsm, expr)
                      & invarspec.generate_inductive_step(self.fsm, expr))

            self.assertEqual(problem.to_cnf().vars_list,
                             manual.to_cnf().vars_list)
Beispiel #3
0
 def test_dump_dimacs_filename(self):
     for prop in prop_database():
         expr    = utils.make_nnf_boolean_wff(prop.expr)
         problem = invarspec.generate_invar_problem(self.fsm, expr)
         invarspec.dump_dimacs_filename(self.fsm.encoding, problem.to_cnf(), "testit")
Beispiel #4
0
 def test_dump_dimacs_filename(self):
     for prop in prop_database():
         expr = utils.make_nnf_boolean_wff(prop.expr)
         problem = invarspec.generate_invar_problem(self.fsm, expr)
         invarspec.dump_dimacs_filename(self.fsm.encoding, problem.to_cnf(),
                                        "testit")