]> git.unchartedbackwaters.co.uk Git - francis/stp.git/commitdiff
Fix. Missing break; in a switch. Dumb luck meant it didn't cause any problems.
authortrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Sat, 12 Mar 2011 23:36:07 +0000 (23:36 +0000)
committertrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Sat, 12 Mar 2011 23:36:07 +0000 (23:36 +0000)
git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@1204 e59a4935-1847-0410-ae03-e826735625c1

src/AST/NodeFactory/SimplifyingNodeFactory.cpp
src/STPManager/STP.cpp

index 2339adefe29e34403544073ea78d6b95c79083c1..cea9846afbed84fcf5a2a17088340bddd091541b 100644 (file)
@@ -467,12 +467,15 @@ ASTNode SimplifyingNodeFactory::CreateTerm(Kind kind, unsigned int width,
        switch (kind)
        {
        case BEEV::ITE:
+       {
                if (children[0]== ASTTrue)
                        result = children[1];
-               if (children[0]== ASTFalse)
+               else if (children[0]== ASTFalse)
                        result = children[2];
-
-
+               else if (children[1] == children[2])
+                       result = children[1];
+               break;
+       }
 
        case BEEV::BVNEG:
        {
@@ -484,18 +487,15 @@ ASTNode SimplifyingNodeFactory::CreateTerm(Kind kind, unsigned int width,
                        break;
                default: // quieten compiler.
                        break;
-
                }
        }
-               break;
+       break;
        default: // quieten compiler.
                break;
-
        }
 
        if (result.IsNull())
                result = hashing.CreateTerm(kind, width, children);
 
        return result;
-
 }
index cf7d0031711cc132cbb15a198e3ad1f59b7a09a0..dd3890be0ca6b04958341d16e90d1271f07d8efb 100644 (file)
@@ -371,7 +371,7 @@ namespace BEEV {
 
 
     bool optimize_enabled = bm->UserFlags.optimize_flag;
-    if (final_difficulty_score > 1.1 *initial_difficulty_score  && !arrayops)
+    if (final_difficulty_score > 1.1 *initial_difficulty_score  && !arrayops && bm->UserFlags.isSet("difficulty-reversion","1"))
     {
        // If the simplified problem is harder, than the
        // initial problem we revert back to the initial