Fix/port assignment3 to abstract interpretation#62
Merged
bjjwwang merged 2 commits intoSVF-tools:mainfrom May 2, 2026
Merged
Conversation
…tion
Upstream SVF folded the AbstractStateManager class back into the .cpp
implementations and removed the public AE/Svfexe/AbstractStateManager.h
header. Assignment_3.h still tried to include that header, so the
macOS-latest CI fails with:
Assignment-3/CPP/Assignment_3.h:29:10: fatal error:
'AE/Svfexe/AbstractStateManager.h' file not found
The methods Assignment-3 actually uses on the manager — getTrace(),
operator[], getGepByteOffset() — are now on AbstractInterpretation.
Switch the field type to AbstractInterpretation* and obtain it via the
upstream singleton (AbstractInterpretation::getAEInstance()). The
singleton wires SVFIR from PAG::getPAG() internally, so we no longer
need to construct an explicit Andersen analysis just to feed the
manager.
The destructor used to 'delete svfStateMgr'; that's wrong for the
singleton (SVF owns its lifetime), so drop it.
Verified locally: docker run ubuntu:24.04 with svf-lib (v1.0.2555) +
LLVM 21.1.0 prebuilt + Z3, cmake . && make -j4 builds 100% — both
libassign3 and the ass3 binary link cleanly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirror the C++ port: AbstractStateManager was folded into AbstractInterpretation upstream and removed; the Python helper similarly switches from 'pysvf.AbstractStateManager(svfir, ander)' to 'pysvf.AbstractInterpretation.getAEInstance()'. That requires the matching SVF-Python change (PR on bjjwwang/SVF-Python2: fix/port-AE-bindings-to-AbstractInterpretation) to land first so a fresh pysvf wheel actually exposes 'AbstractInterpretation.getAEInstance()'. The Andersen instance is no longer needed: the AI singleton pulls SVFIR from PAG::getPAG() and runs its own pointer analysis when needed. Drop the explicit 'self.ander = pysvf.AndersenWaveDiff(...)' line. Verified end-to-end: - 'python3 -c "import ast; ast.parse(open(...))"' on the patched helper -> syntax OK. - Built the matching SVF-Python wheel in 'docker run --rm ubuntu:24.04', installed it, and 'import Assignment_3_Helper' succeeds — both AbstractExecutionHelper and AbstractExecution classes resolve. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.