From: trevor_hansen Date: Sun, 26 Jun 2011 16:23:55 +0000 (+0000) Subject: Move the filename counter out so it's saved between CNF converter objects. X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=1d1e1873256ddea2f6eb1354b1c815c1aa8759bc;p=francis%2Fstp.git Move the filename counter out so it's saved between CNF converter objects. git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@1356 e59a4935-1847-0410-ae03-e826735625c1 --- diff --git a/src/STPManager/STPManager.h b/src/STPManager/STPManager.h index e9c8601..83f6b0b 100644 --- a/src/STPManager/STPManager.h +++ b/src/STPManager/STPManager.h @@ -172,6 +172,9 @@ namespace BEEV //count is used in the creation of new variables unsigned int _symbol_count; + // The value to append to the filename when saving the CNF. + unsigned int CNFFileNameCounter; + /**************************************************************** * Public Member Functions * ****************************************************************/ @@ -182,7 +185,8 @@ namespace BEEV _bvconst_unique_table(), _interior_unique_table(), UserFlags(), - _symbol_count(0) + _symbol_count(0), + CNFFileNameCounter(0) { _max_node_num = 0; Begin_RemoveWrites = false; diff --git a/src/to-sat/AIG/ToSATAIG.cpp b/src/to-sat/AIG/ToSATAIG.cpp index d48cb82..7d53053 100644 --- a/src/to-sat/AIG/ToSATAIG.cpp +++ b/src/to-sat/AIG/ToSATAIG.cpp @@ -60,7 +60,7 @@ namespace BEEV if (bm->UserFlags.output_CNF_flag) { stringstream fileName; - fileName << "output_" << CNFFileNameCounter++ << ".cnf"; + fileName << "output_" << bm->CNFFileNameCounter++ << ".cnf"; Cnf_DataWriteIntoFile(cnfData, (char*)fileName.str().c_str(), 0); } first = false; diff --git a/src/to-sat/AIG/ToSATAIG.h b/src/to-sat/AIG/ToSATAIG.h index f5b4e4b..5a795cb 100644 --- a/src/to-sat/AIG/ToSATAIG.h +++ b/src/to-sat/AIG/ToSATAIG.h @@ -37,7 +37,6 @@ namespace BEEV int count; bool first; - int CNFFileNameCounter; ToCNFAIG toCNF; @@ -45,7 +44,6 @@ namespace BEEV { count = 0; first = true; - CNFFileNameCounter =0; arrayTransformer = NULL; }