From: trevor_hansen Date: Mon, 14 Mar 2011 02:59:02 +0000 (+0000) Subject: Improvement. With stats enabled, only output the first unique config_ option found. X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=067debc39c2dce008632d3f8d7d89d585b2964ac;p=francis%2Fstp.git Improvement. With stats enabled, only output the first unique config_ option found. git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@1211 e59a4935-1847-0410-ae03-e826735625c1 --- diff --git a/src/STPManager/UserDefinedFlags.h b/src/STPManager/UserDefinedFlags.h index ff73c1e..650b575 100644 --- a/src/STPManager/UserDefinedFlags.h +++ b/src/STPManager/UserDefinedFlags.h @@ -13,6 +13,7 @@ #include #include #include +#include namespace BEEV { using std::string; @@ -25,6 +26,9 @@ namespace BEEV ******************************************************************/ struct UserDefinedFlags { + private: + std::set 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; } diff --git a/src/to-sat/AIG/ToCNFAIG.h b/src/to-sat/AIG/ToCNFAIG.h index 0a2b8cd..077b840 100644 --- a/src/to-sat/AIG/ToCNFAIG.h +++ b/src/to-sat/AIG/ToCNFAIG.h @@ -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;