]> git.unchartedbackwaters.co.uk Git - francis/stp.git/commitdiff
Two extra simplification rules.
authortrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Tue, 26 Apr 2011 23:56:29 +0000 (23:56 +0000)
committertrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Tue, 26 Apr 2011 23:56:29 +0000 (23:56 +0000)
git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@1282 e59a4935-1847-0410-ae03-e826735625c1

src/AST/NodeFactory/SimplifyingNodeFactory.cpp

index 7f2b3f3828cf89e1ba4b10849cdff62bfd38324b..a3ef9b9b65a21d62bb3be94a5f0af864976dbe85 100644 (file)
@@ -733,7 +733,12 @@ ASTNode SimplifyingNodeFactory::CreateTerm(Kind kind, unsigned int width,
                        result = children[2];
                else if (children[1] == children[2])
                        result = children[1];
-               break;
+               else if (children[2].GetKind() == BEEV::ITE && (children[2][0] == children[0]))
+                       result = NodeFactory::CreateTerm(BEEV::ITE, width, children[0], children[1], children[2][2]);
+                else if (children[1].GetKind() == BEEV::ITE && (children[1][0] == children[0]))
+                        result = NodeFactory::CreateTerm(BEEV::ITE, width, children[0], children[1][1], children[2]);
+
+                 break;
        }
 
        case BEEV::BVMULT: