From 5ef8977acb0e7baed53c75a6e95059ee4ab502bf Mon Sep 17 00:00:00 2001 From: trevor_hansen Date: Tue, 26 Apr 2011 23:56:29 +0000 Subject: [PATCH] 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 --- src/AST/NodeFactory/SimplifyingNodeFactory.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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: -- 2.47.3