Fix MC_Equals to handle NODEP MCIDs.
[satcheck.git] / constgen.cc
index e7f8c2d68004928529c2441d2024b0fe7208d85d..27c17fb37643b5ffe2ea58ff60bdd7e0600287f1 100644 (file)
@@ -347,7 +347,8 @@ void ConstGen::printRecord(EPRecord *record, int file) {
                doPrint(record,file);
 
                if (record->getType()==LOOPENTER) {
-                       workstack->push_back(record->getNextRecord());
+                       if (record->getNextRecord()!=NULL)
+                               workstack->push_back(record->getNextRecord());
                        workstack->push_back(record->getChildRecord());
                        return;
                }
@@ -1762,6 +1763,7 @@ void ConstGen::processEquals(EPRecord *record) {
                Constraint *l2=getRetValueEncoding(r, constval);
                Constraint *functionimplication2=new Constraint(IMPLIES, outputtrue, l2);
                ADDCONSTRAINT(functionimplication2,"equalsimpl");
+        return;
        }
 
        IntIterator *iit=record->getSet(VC_BASEINDEX)->iterator();
@@ -1975,7 +1977,8 @@ void ConstGen::traverseRecord(EPRecord *record, bool initial) {
                        processRecord(record);
                }
                if (record->getType()==LOOPENTER) {
-                       workstack->push_back(record->getNextRecord());
+                       if (record->getNextRecord()!=NULL)
+                               workstack->push_back(record->getNextRecord());
                        workstack->push_back(record->getChildRecord());
                        return;
                }