MCPcopy Create free account
hub / github.com/SVF-tools/SVF / writeObjVarToFile

Method writeObjVarToFile

svf/lib/MemoryModel/PointerAnalysisImpl.cpp:162–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162void BVDataPTAImpl::writeObjVarToFile(const string& filename)
163{
164 outs() << "Storing ObjVar to '" << filename << "'...";
165 error_code err;
166 std::fstream f(filename.c_str(), std::ios_base::out);
167 if (!f.good())
168 {
169 outs() << " error opening file for writing!\n";
170 return;
171 }
172
173 // Write BaseNodes insensitivity to file
174 NodeBS NodeIDs;
175 for (auto it = pag->begin(), ie = pag->end(); it != ie; ++it)
176 {
177 PAGNode* pagNode = it->second;
178 if (!isa<ObjVar>(pagNode)) continue;
179 NodeID n = pag->getBaseObjVarID(it->first);
180 if (NodeIDs.test(n)) continue;
181 f << n << " ";
182 f << isFieldInsensitive(n) << "\n";
183 NodeIDs.set(n);
184 }
185
186 f << "------\n";
187
188 f.close();
189 if (f.good())
190 {
191 outs() << "\n";
192 return;
193 }
194
195
196}
197
198void BVDataPTAImpl::writePtsResultToFile(std::fstream& f)
199{

Callers 1

Calls 5

beginMethod · 0.45
endMethod · 0.45
getBaseObjVarIDMethod · 0.45
testMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected