Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue 1139 #1155

Merged
Merged

Conversation

JasonZhongZexin
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Merging #1155 (74a1671) into master (3f20e97) will decrease coverage by 0.02%.
The diff coverage is 69.38%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1155      +/-   ##
==========================================
- Coverage   64.68%   64.66%   -0.02%     
==========================================
  Files         223      223              
  Lines       23821    23856      +35     
==========================================
+ Hits        15408    15426      +18     
- Misses       8413     8430      +17     
Impacted Files Coverage Δ
svf/include/WPA/Andersen.h 80.30% <ø> (ø)
svf/include/WPA/FlowSensitive.h 85.00% <ø> (ø)
svf/lib/MemoryModel/PointerAnalysisImpl.cpp 75.64% <ø> (ø)
svf/lib/WPA/FlowSensitive.cpp 78.01% <37.50%> (-3.93%) ⬇️
svf/lib/WPA/Andersen.cpp 89.83% <100.00%> (+0.37%) ⬆️

*/
void AndersenBase::analyze()
{
/// Initialization for the Solver
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if(!Options::ReadAnder().empty()){
readPtsFromFile(Options::ReadAnder());
}
else{
if(Options::WriteAnder().empty()) {
initialize();
solveConstraints();
finalize();
}
else{
solveAndwritePtsToFile(Options::WriteAnder());
}
}

readPtsFromFile(filename){

initialize();
this->readFromFile(Options::ReadAnder());
PointerAnalysis::finalize();
}

@@ -157,6 +159,30 @@ void AndersenBase::analyze()
finalize();
}


void AndersenBase::analyzeAndWrite(const std::string& filename)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

analyzeAndWrite => SolveAndWritePtsToFile

SolveAndWritePtsToFile(filename){

initialize();
this->writeObjVarToFile(filename);
solveConstraints();
this->writeToFile(filename);
finalize();

}

/*!
* Start analysis
*/
void FlowSensitive::analyzeAndWrite(const std::string& filename)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add two methods "solveAndwritePtsToFile" and "readPtsFromFile"

@yuleisui yuleisui merged commit d1d843a into SVF-tools:master Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants