(*Arrayname_ReadindicesMap)[arrName].push_back(readIndex);
//save the ite corresponding to 'processedTerm'
(*Arrayread_IteMap)[processedTerm] = result;
+
+ assert(arrName.GetType() == ARRAY_TYPE);
+ assert(result.GetValueWidth() == CurrentSymbol.GetValueWidth());
arrayToIndexToRead[arrName].insert(make_pair(readIndex,ArrayRead (result, CurrentSymbol)));
break;
} //end of READ over a SYMBOL
// array reads in the input Read(A,i) and Read(A,j). Then
// Read(A,i) is replaced with a symbolic constant, say v1, and
// Read(A,j) is replaced with the following ITE: ITE(i=j,v1,v2)
+ public:
ASTNodeMap * Arrayread_IteMap;
-
-
- // Count to keep track of new symbolic constants introduced
- // corresponding to Array Reads
- unsigned int _symbol_count;
+ private:
// Memo table used by the transformer while it is transforming the
// formulas and terms
bm(bm),
simp(s),
debug_transform(0),
- TransformMap(NULL),
- _symbol_count(0)
+ TransformMap(NULL)
{
Arrayread_IteMap = new ASTNodeMap();
Arrayname_ReadindicesMap = new ASTNodeToVecMap();
return symbol;
} //End of ArrayRead_SymbolMap
- const ASTNodeMap * ArrayRead_IteMap()
- {
- return Arrayread_IteMap;
- } //End of ArrayRead_IteMap
ASTNode ArrayRead_Ite(const ASTNode& arrread)
{
//In this loop, we compute the value of each array read, the
//corresponding ITE against the counterexample generated above.
for (ASTNodeMap::const_iterator it =
- ArrayTransform->ArrayRead_IteMap()->begin(), itend =
- ArrayTransform->ArrayRead_IteMap()->end(); it != itend; it++)
+ ArrayTransform->Arrayread_IteMap->begin(), itend =
+ ArrayTransform->Arrayread_IteMap->end(); it != itend; it++)
{
//the array read
- ASTNode arrayread = it->first;
- ASTNode value_ite = ArrayTransform->ArrayRead_Ite(arrayread);
+ const ASTNode& arrayread = it->first;
+ const ASTNode& value_ite = it->second;
//convert it to a constant array-read and store it in the
//counter-example. First convert the index into a constant. then