Adding checks to avoid further processing on UNSAT Problems
[satune.git] / src / Test / deserializersolveprintopt.cc
old mode 100755 (executable)
new mode 100644 (file)
index 4e9637d..d5f5c2e
@@ -1,20 +1,20 @@
 #include "csolver.h"
 
 
-int main(int argc, char ** argv){
-       if(argc < 2){
+int main(int argc, char **argv) {
+       if (argc < 2) {
                printf("You should specify file names ...");
-               exit(-1);       
+               exit(-1);
        }
-       for(int i = 1; i < argc; i++) {
-               CSolver* solver = CSolver::deserialize(argv[i]);
-               int value=solver->solve();
-               if (value ==1) {
+       for (int i = 1; i < argc; i++) {
+               CSolver *solver = CSolver::deserialize(argv[i]);
+               solver->printConstraints();
+               int value = solver->solve();
+               if (value == 1) {
                        printf("%s is SAT\n", argv[i]);
                } else {
                        printf("%s is UNSAT\n", argv[i]);
                }
-               solver->printConstraints();
 
                delete solver;
        }