Skip to content

AbsExtAPI: make constructor private (friend AbstractInterpretation)#1831

Merged
yuleisui merged 1 commit into
SVF-tools:masterfrom
bjjwwang:ass3/absextapi-private-ctor
Jun 2, 2026
Merged

AbsExtAPI: make constructor private (friend AbstractInterpretation)#1831
yuleisui merged 1 commit into
SVF-tools:masterfrom
bjjwwang:ass3/absextapi-private-ctor

Conversation

@bjjwwang

@bjjwwang bjjwwang commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Only AbstractInterpretation creates and owns the single AbsExtAPI instance (exposed via its already-private getUtils()). Making the constructor private prevents external code from constructing its own AbsExtAPI to call handleExtAPI()/handleMemcpy()/... directly, which is useful when AbsExtAPI must not be reachable by client code (e.g. an assignment where the external-API summaries are the task). The library itself is unaffected: the in-class new AbsExtAPI(this) in AbstractInterpretation compiles via the friend grant.

Only AbstractInterpretation creates and owns the single AbsExtAPI instance
(exposed via its already-private getUtils()). Making the constructor private
prevents external code from constructing its own AbsExtAPI to call
handleExtAPI()/handleMemcpy()/... directly, which is useful when AbsExtAPI must
not be reachable by client code (e.g. an assignment where the external-API
summaries are the task). The library itself is unaffected: the in-class
new AbsExtAPI(this) in AbstractInterpretation compiles via the friend grant.
@bjjwwang bjjwwang marked this pull request as ready for review June 2, 2026 04:12
@yuleisui yuleisui merged commit 28de5b8 into SVF-tools:master Jun 2, 2026
3 checks passed
@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.45%. Comparing base (e0377d5) to head (5bfcde6).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1831   +/-   ##
=======================================
  Coverage   64.45%   64.45%           
=======================================
  Files         252      252           
  Lines       25210    25210           
  Branches     4768     4768           
=======================================
  Hits        16248    16248           
  Misses       8962     8962           
Files with missing lines Coverage Δ
svf/include/AE/Svfexe/AbsExtAPI.h 0.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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