Пример #1
0
 def stress_test(self):
     """
     Runs a Large file.  Note:  The specifications of the assignment
     indicate that the max for literals or clauses is 65536.  If a file of
     this size were actually generated it would be in excess of 30 GB.  I
     will not generate a file of that size here.  I have settled on an
     size of approximately 300 MB.
     """
     solver = SatFileInstance(1000, 1000)
     filename = solver.create_file()
     self.execute(filename)
Пример #2
0
 def test_simple(self):
     """
     Runs the simple tests, on small files.  Runs several versions of each type of file
     to increase chances of receiving SATISFIABLE and UNSATISFIABLE
     """
     for i in range(0, 20):
         literals = random.randint(1, self.nvars)
         clauses = random.randint(1, self.nclauses)
         solver = SatFileInstance(literals, clauses)
         for j in range (0,10):
             filename = solver.create_file()
             self.execute(filename)