Skip to content

Fix/port assignment3 to abstract interpretation#62

Merged
bjjwwang merged 2 commits intoSVF-tools:mainfrom
bjjwwang:fix/port-Assignment3-to-AbstractInterpretation
May 2, 2026
Merged

Fix/port assignment3 to abstract interpretation#62
bjjwwang merged 2 commits intoSVF-tools:mainfrom
bjjwwang:fix/port-Assignment3-to-AbstractInterpretation

Conversation

@bjjwwang
Copy link
Copy Markdown
Collaborator

@bjjwwang bjjwwang commented May 2, 2026

No description provided.

bjjwwang and others added 2 commits May 2, 2026 21:22
…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>
@bjjwwang bjjwwang merged commit 58d9949 into SVF-tools:main May 2, 2026
2 checks passed
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.

1 participant