Skip to content

Python: Add exception, reachability, and other kinds of modelling#21668

Draft
tausbn wants to merge 7 commits intomainfrom
tausbn/python-port-shared-infrastructure
Draft

Python: Add exception, reachability, and other kinds of modelling#21668
tausbn wants to merge 7 commits intomainfrom
tausbn/python-port-shared-infrastructure

Conversation

@tausbn
Copy link
Copy Markdown
Contributor

@tausbn tausbn commented Apr 8, 2026

A grab bag of infrastructure that is needed for the next bunch of queries to be ported.

Should be reviewed commit-by-commit.

@tausbn tausbn added the no-change-note-required This PR does not need a change note label Apr 8, 2026
@github-actions github-actions bot added the Python label Apr 8, 2026
@tausbn tausbn force-pushed the tausbn/python-port-shared-infrastructure branch from c51a476 to c70427d Compare April 8, 2026 14:48
tausbn added 6 commits April 8, 2026 15:54
The implementation is essentially the same as the one from
`BasicBlockWithPointsTo`, with the main difference being that this one
uses the exception machinery we just added (and some extensions added in
this commit).
Adds support for finding instances, and adds things like a
`BaseException` convenience class.
Used for queries where we mention the class of a literal in the alert
message.
Adds `if False: ...` and `if typing.TYPE_CHECKING: ...` to the set of
nodes that are unlikely to be reachable.
Adds `maybeUndefined` to the reachability module, modelling which
names/variables may be undefined at runtime. The approach is very close
to the one used in points-to, though it of course relies on our new
modelling of exceptions/reachability instead.
@tausbn tausbn force-pushed the tausbn/python-port-shared-infrastructure branch from c70427d to ca59ca0 Compare April 8, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-change-note-required This PR does not need a change note Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant