Skip to content

Union-Find Alias Analyses#820

Open
fabianbs96 wants to merge 84 commits intosecure-software-engineering:developmentfrom
fabianbs96:f-AnalysesTesting
Open

Union-Find Alias Analyses#820
fabianbs96 wants to merge 84 commits intosecure-software-engineering:developmentfrom
fabianbs96:f-AnalysesTesting

Conversation

@fabianbs96
Copy link
Copy Markdown
Member

Adds multiple new Steensgaard-style alias analyses, focusing on high performance and recall.

Main additions:

  • LLVMUnionFindAliasSet: Similar to LLVMAliasSet, but featuring the new analyses
  • LLVMUnionFindAliasIterator: Compatible with LLVMAliasIteratorRef
  • compute[...]SensUnionFindAA(): Functions to invoke the new analyses directly, without going through LLVMUnionFindAliasSet.
  • LLVMPAGBuilder : Utility to build pointer-assignment graphs with different strategies that can be plugged-in. This class may be reused for other analyses as well.

The currently implemented POC analyses are integrated into phasar-cli as --alias-analysis=union-find and the following analysis variants:

  --union-find-aa=<value>       - The union-find alias analysis type to use (default: ctx-ind-sens)
    =ctx-sens                   -   Context-sensitive analysis with k=1 heap-cloning
    =ind-sens                   -   Pointer-indirection-sensitive analysis with k=5 heap-cloning
    =ctx-ind-sens               -   Intersection of ctx-sens and ind-sens
    =botctx-sens                -   Unbounded context-sensitive analysis, but only provides function-local results
    =botctx-ind-sens            -   Intersection of botctx-sens and ind-sens

As initial estimation on the results quality, we ran the new analyses on SVF's PTABen test suite. You can find details here.

fabianbs96 and others added 30 commits December 27, 2025 16:54
mxHuber and others added 19 commits February 24, 2026 14:34
Documents edge types, concepts, strategy combinators, analysis variants
(BasicUnionFindAA, CallingContextSens, IndirectionSens, BottomupUnionFindAA),
LLVM adapters, and utility types (RawAliasSet, UnionFind, ValueCompressor,
TypedArray, CallingContextConstructor).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…_iterator), operator==, max_size

- Add iterator-range constructor with O(1) reserve for random-access iterators
- Add initializer_list constructor (delegating to range ctor) and assignment operator,
  both accepting any V constructible to ValueT to avoid unnecessary copies
- Replace erase(iterator) with erase(const_iterator) per STL convention
- Add operator== hidden friend: compares IsSet bitsets first, then values directly
  via slot() without find(), for lower constant vs. a naive lookup-per-element
- Add max_size() capped at INT_MAX (llvm::BitVector internal limit)
- Add missing type aliases: difference_type, reference, const_reference, pointer,
  const_pointer
- Add #include <limits> and <initializer_list>

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@fabianbs96 fabianbs96 requested a review from sritejakv March 29, 2026 18:47
@fabianbs96 fabianbs96 self-assigned this Mar 29, 2026
@fabianbs96 fabianbs96 added enhancement New feature or request extensive Bigger piece of work labels Mar 29, 2026
@fabianbs96 fabianbs96 marked this pull request as ready for review March 30, 2026 16:46
@fabianbs96 fabianbs96 requested a review from MMory as a code owner March 30, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request extensive Bigger piece of work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants