resetting the solver
authorHamed Gorjiara <hgorjiar@uci.edu>
Mon, 8 Jan 2018 19:15:49 +0000 (11:15 -0800)
committerHamed Gorjiara <hgorjiar@uci.edu>
Mon, 8 Jan 2018 19:15:49 +0000 (11:15 -0800)
src/Backend/constraint.cc
src/Test/deserializersolvetest.cc

index 8486282..e867497 100644 (file)
@@ -86,13 +86,12 @@ void resetCNF(CNF *cnf){
        }
         clearVectorEdge(&cnf->constraints);
         clearVectorEdge(&cnf->args);
-        deleteIncrementalSolver(cnf->solver);
+        resetSolver(cnf->solver);
         memset(cnf->node_array, 0, sizeof(Node *) * cnf->capacity);
         
         cnf->varcount = 1;
         cnf->size = 0;
         cnf->enableMatching = true;
-        cnf->solver = allocIncrementalSolver();
         cnf->solveTime = 0;
        cnf->encodeTime = 0;
 }
index 7a938cf..5498f84 100755 (executable)
@@ -1,11 +1,15 @@
 #include "csolver.h"
-
+//#include <unistd.h>
+//#include <sys/types.h>
 
 int main(int argc, char ** argv){
        if(argc < 2){
                printf("You should specify file names ...");
                exit(-1);       
        }
+//     printf("I am pid %d!\n", getpid());
+//        usleep(20000000);
+
        for(int i = 1; i < argc; i++) {
                CSolver* solver = CSolver::deserialize(argv[i]);
                int value=solver->solve();