Skip to content

Document Deadcode exception - #2271

Open
sim642 wants to merge 1 commit into
masterfrom
deadcode-doc
Open

sim642 wants to merge 1 commit into
masterfrom
deadcode-doc

Conversation

@sim642

@sim642 sim642 commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

In the light of #2206 and possibly others, this PR documents the Deadcode exception and which transfer functions may raise it, and crucially which shouldn't.

The latter currently are query, enter and threadenter. This is based on which MCP transfer functions handle Deadcode correctly (using map_deadcode), while these three don't.

For some of the rest, e.g., body, skip and return, it may be questionable if they ever should, but at least it's supported by the framework.

TODO

  • Make it an error to raise Deadcode during query? That might break something and reveal existing issues.

@sim642 sim642 added this to the v2.9.0 Dizzy Dullahan milestone Oct 23, 2026
@sim642 sim642 added the documentation Documentation, comments label Oct 23, 2026
Comment thread src/framework/analyses.ml
val startcontext: unit -> C.t

(** @raise Deadcode if resulting state is unreachable. *)
val sync : (D.t, G.t, C.t, V.t) man -> [`Normal | `Join | `JoinCall of CilType.Fundec.t | `Return] -> D.t

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does it mean for sync to raise Deadcode?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation, comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants