return false;
} // End of IntroduceSymbolSet
+ void ClearAllTables(void)
+ {
+ Arrayname_ReadindicesMap->clear();
+ Arrayread_SymbolMap.clear();
+ Arrayread_IteMap->clear();
+ Introduced_SymbolsSet.clear();
+ TransformMap->clear();
+ }
}; //end of class Transformer
};//end of namespace
TermsAlreadySeenMap.clear();
}
+ void ClearAllTables(void)
+ {
+ _interior_unique_table.clear();
+ _bvconst_unique_table.clear();
+ _symbol_unique_table.clear();
+ }
+
};//End of Class STPMgr
};//end of namespace
#endif
ASTNode::ASTNodeHasher,
ASTNode::ASTNodeEqual> ASTtoBitvectorMap;
- ASTtoBitvectorMap _ASTNode_to_Bitvector;
+ ASTtoBitvectorMap _ASTNode_to_BitvectorMap;
// This memo map is used by the ComputeFormulaUsingModel()
ASTNodeMap ComputeFormulaMap;
// finiteloop); ASTNode Check_FiniteLoop_UsingModel(const
// ASTNode& finiteloop);
+ void ClearAllTables(void)
+ {
+ _ASTNode_to_BitvectorMap.clear();
+ ComputeFormulaMap.clear();
+ } //End of ClearAllTables()
};//End of Class CounterExample
class CompleteCounterExample
//'v' is the map from bit-index to bit-value
HASHMAP<unsigned, bool> * v;
- if (_ASTNode_to_Bitvector.find(symbol) == _ASTNode_to_Bitvector.end())
- _ASTNode_to_Bitvector[symbol] =
- new HASHMAP<unsigned, bool> (symbolWidth);
+ if (_ASTNode_to_BitvectorMap.find(symbol) ==
+ _ASTNode_to_BitvectorMap.end())
+ {
+ _ASTNode_to_BitvectorMap[symbol] =
+ new HASHMAP<unsigned, bool> (symbolWidth);
+ }
//v holds the map from bit-index to bit-value
- v = _ASTNode_to_Bitvector[symbol];
+ v = _ASTNode_to_BitvectorMap[symbol];
//kk is the index of BVGETBIT
unsigned int kk = GetUnsignedConst(s[1]);
//iterate over the ASTNode_to_Bitvector data-struct and construct
//the the aggregate value of the bitvector, and populate the
//CounterExampleMap datastructure
- for (ASTtoBitvectorMap::iterator it = _ASTNode_to_Bitvector.begin(),
- itend = _ASTNode_to_Bitvector.end(); it != itend; it++)
+ for (ASTtoBitvectorMap::iterator it = _ASTNode_to_BitvectorMap.begin(),
+ itend = _ASTNode_to_BitvectorMap.end(); it != itend; it++)
{
ASTNode var = it->first;
//debugging
//cerr << var;
if (SYMBOL != var.GetKind())
- FatalError("ConstructCounterExample: error while constructing counterexample: not a variable: ", var);
-
+ {
+ FatalError("ConstructCounterExample:"\
+ "error while constructing counterexample: not a variable: ", var);
+ }
//construct the bitvector value
HASHMAP<unsigned, bool> * w = it->second;
ASTNode value = BoolVectoBVConst(w, var.GetValueWidth());
return SolverMap;
} // End of SolverMap()
+ void ClearAllTables(void)
+ {
+ SimplifyMap->clear();
+ SimplifyNegMap->clear();
+ SolverMap->clear();
+ ReadOverWrite_NewName_Map->clear();
+ NewName_ReadOverWrite_Map.clear();
+ AlwaysTrueFormMap.clear();
+ MultInverseMap.clear();
+ }
};//end of class Simplifier
}; //end of namespace
#endif
//look for the symbol in the global map from ASTNodes to ints. if
//not found, create a S.newVar(), else use the existing one.
- if ((it = _ASTNode_to_SATVar.find(n)) == _ASTNode_to_SATVar.end())
+ if ((it = _ASTNode_to_SATVar_Map.find(n)) == _ASTNode_to_SATVar_Map.end())
{
v = newS.newVar();
- _ASTNode_to_SATVar[n] = v;
+ _ASTNode_to_SATVar_Map[n] = v;
//ASSUMPTION: I am assuming that the newS.newVar() call increments v
//by 1 each time it is called, and the initial value of a
//MINISAT::Var is 0.
- _SATVar_to_AST.push_back(n);
+ _SATVar_to_AST_Vector.push_back(n);
}
else
v = it->second;
// Returns ASTTrue if true, ASTFalse if false or undefined.
ASTNode ToSAT::SymbolTruthValue(MINISAT::Solver &newS, ASTNode form)
{
- MINISAT::Var satvar = _ASTNode_to_SATVar[form];
+ MINISAT::Var satvar = _ASTNode_to_SATVar_Map[form];
if (newS.model[satvar] == MINISAT::l_True)
{
return ASTTrue;
MINISAT::Var,
ASTNode::ASTNodeHasher,
ASTNode::ASTNodeEqual> ASTtoSATMap;
- ASTtoSATMap _ASTNode_to_SATVar;
+ ASTtoSATMap _ASTNode_to_SATVar_Map;
// MAP: This is a map from MINISAT::Vars to ASTNodes
//
// Reverse map used in building counterexamples. MINISAT returns a
// model in terms of MINISAT Vars, and this map helps us convert
// it to a model over ASTNode variables.
- vector<ASTNode> _SATVar_to_AST;
+ vector<ASTNode> _SATVar_to_AST_Vector;
// Ptr to STPManager
STPMgr * bm;
ASTNode SATVar_to_ASTMap(int i)
{
- return _SATVar_to_AST[i];
+ return _SATVar_to_AST_Vector[i];
}
+ void ClearAllTables(void)
+ {
+ _ASTNode_to_SATVar_Map.clear();
+ _SATVar_to_AST_Vector.clear();
+ }
}; //end of class ToSAT
}; //end of namespace