import java.util.*; import java.io.*; /** * Driver class for Msat. * * @author (Danielle Socha) * @version 2008/04 * Known Bugs: * NONE * Modification log: * 0. Created 2008/April by Danielle Socha (DS) */ public class MsatDriver { public static void main (String [] args) throws IOException { String fileName = args[0]; msatSolver(fileName); //testSplit(); } // Test the Msat class // also used to obtain performance results private static void msatSolver(String fileName) throws FileNotFoundException { // the first parameter is the number of processors Msat msat = new Msat ( 4, fileName); // change number of subproblems here msat.setNumSubProb(512); // solve problem msat.solve(); } // Test the (private) split method of the Msat class. // WARNING: Before you run this test, make the split method public. // Then run test, and then make method private again!!! private static void testSplit() throws FileNotFoundException { Msat msat = new Msat (4); Formula f = new Formula ("u15.cnf"); //msat.setFormula (f); System.out.println ("The original formula is \n" + f + "\n***\n"); HashSet setOfSubProb = msat.split(f); System.out.println ("The subproblems are \n"); for (SubProblem s:setOfSubProb) System.out.println ( s.getAssignment() ); } }// end Driver