Add debug option to dump blocker graph - #163
Open
gsps wants to merge 1 commit into
Open
Conversation
samarion
reviewed
Sep 10, 2021
samarion
left a comment
Member
There was a problem hiding this comment.
Maybe you could add an UnrollingDebugger trait similarly to the SMTLIBDebugger and have it override checkAssumptions?
Comment on lines
+41
to
+42
| // Note: This position is best-effort, since function templates are cached. | ||
| val call: Expr = tfd.applied(fdArgs).setPos(pos) |
Member
There was a problem hiding this comment.
Is the goal here to ensure that all calls in the dumped blocker graph have positions? If so, I don't think you need to set a position on this call because it should never be part of the blocker graph.
(If possible, I'd like to avoid making positions part of the FunctionTemplate API)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a debug section
blocker-graphthat dumps the (non-strict) implication graph among all blocking literals. The current graph is dumped at the end ofcheckAssumptionsand saved inblocker-graphs/*file*-*n*.dot.Nodes that correspond to
defBlockers also contain the corresponding function name and the call site's position. The positional information is unreliable, since we only store the call site position when the callee'sFunctionTemplateis first cached (the cache key being theTypedFunDef).As an example, the following program requires multiple unfolding steps to prove the assertion in
testUnfoldMe:Running with
--debug=blocker-graphyields multiple.dotfiles, one of which corresponds to the assertion's VC:must-unfold-thrice.pdf
@samarion Any preference on where to move the dot-graph-dumping code that new lives in
checkAssumptions?