]> git.unchartedbackwaters.co.uk Git - francis/stp.git/commitdiff
Improvement. With stats enabled, only output the first unique config_ option found.
authortrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Mon, 14 Mar 2011 02:59:02 +0000 (02:59 +0000)
committertrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Mon, 14 Mar 2011 02:59:02 +0000 (02:59 +0000)
git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@1211 e59a4935-1847-0410-ae03-e826735625c1

src/STPManager/UserDefinedFlags.h
src/to-sat/AIG/ToCNFAIG.h

index ff73c1ee07ae86fce0b5cf7f69dec5f9a03e95fd..650b5757616b9b0eab12f9baa2a4592af5e4fbcf 100644 (file)
@@ -13,6 +13,7 @@
 #include <string>
 #include <assert.h>
 #include <iostream>
+#include <set>
 namespace BEEV
 {
        using std::string;
@@ -25,6 +26,9 @@ namespace BEEV
    ******************************************************************/
 
   struct UserDefinedFlags {
+  private:
+       std::set<string> alreadyOutput;
+
   public:
     //collect statistics on certain functions
     bool stats_flag;
@@ -146,18 +150,18 @@ namespace BEEV
        config_options[n] = v;
     }
 
-    string get(string n) const
+    string get(string n)
     {
        return get(n,"");
     }
 
     // "1" is set.
-    bool isSet(string n, string def) const
+    bool isSet(string n, string def)
     {
        return (get(n,def) == string("1"));
     }
 
-    string get(string n, string def) const
+    string get(string n, string def)
     {
        if (config_options.empty())
                return def;
@@ -170,8 +174,8 @@ namespace BEEV
                result = it->second;
 
        if (stats_flag)
-               std::cout << n << ":"  << result << std::endl;
-
+               if (alreadyOutput.insert(n).second)
+                       std::cout << n << ":"  << result << std::endl;
        return result;
     }
 
index 0a2b8cd13875fcedc1e77866fc628c72e939620a..077b8407f041ccb983586f39fd6d01852b2be738 100644 (file)
@@ -16,11 +16,11 @@ class ToCNFAIG {
        ToCNFAIG&  operator = (const ToCNFAIG& other);
        ToCNFAIG(const ToCNFAIG& other);
 
-       const UserDefinedFlags& uf;
+       UserDefinedFlags& uf;
 
 
 public:
-       ToCNFAIG(const UserDefinedFlags& _uf):
+       ToCNFAIG(UserDefinedFlags& _uf):
                uf(_uf)
        {
                priorCnfData = NULL;