From: trevor_hansen Date: Tue, 26 Apr 2011 23:56:29 +0000 (+0000) Subject: Two extra simplification rules. X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=5ef8977acb0e7baed53c75a6e95059ee4ab502bf;p=francis%2Fstp.git Two extra simplification rules. git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@1282 e59a4935-1847-0410-ae03-e826735625c1 --- diff --git a/src/AST/NodeFactory/SimplifyingNodeFactory.cpp b/src/AST/NodeFactory/SimplifyingNodeFactory.cpp index 7f2b3f3..a3ef9b9 100644 --- a/src/AST/NodeFactory/SimplifyingNodeFactory.cpp +++ b/src/AST/NodeFactory/SimplifyingNodeFactory.cpp @@ -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: