]> git.unchartedbackwaters.co.uk Git - francis/stp.git/commitdiff
Short cut on constant evaluation
authortrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Wed, 23 Jun 2010 14:12:16 +0000 (14:12 +0000)
committertrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Wed, 23 Jun 2010 14:12:16 +0000 (14:12 +0000)
git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@868 e59a4935-1847-0410-ae03-e826735625c1

src/simplifier/consteval.cpp

index 8fbab6057289a07e0d112a8c6029ee1e3eb99cb8..b4465f3a24d588be0127e8418f22a48feda97f52 100644 (file)
@@ -24,7 +24,10 @@ namespace BEEV
 // Const evaluator logical and arithmetic operations.
   ASTNode NonMemberBVConstEvaluator(const ASTNode& t)
   {
-    ASTNode OutputNode;
+    if (t.isConstant())
+               return t;
+
+       ASTNode OutputNode;
     Kind k = t.GetKind();
 
     STPMgr* _bm = t.GetSTPMgr();
@@ -694,6 +697,9 @@ namespace BEEV
 
   ASTNode Simplifier::BVConstEvaluator(const ASTNode& t)
   {
+         if (t.isConstant())
+               return t;
+
          ASTNode OutputNode;
 
          if (CheckSubstitutionMap(t, OutputNode))