Record push/pop operations and refactor proof query tracking#975
Draft
jcp19 wants to merge 2 commits into
Draft
Conversation
Extends the proof-query metadata recording so every Decider.pushScope and Decider.popScope is logged with its wall-clock duration alongside the existing assert/check/checkSmoke records. The boolean isAssert column is replaced with a string `kind` column whose values are assert/check/push/pop, and the previous `kind` column (Consistency/Heap/PathInfeasibility/etc.) is renamed to `category` to free up the name. Push/pop are recorded only at the Decider scope-management entry points; the inner push/pop calls inside Z3ProverAPI.assertUsingPushPop go through a separate code path and are not counted, so asserts are not double-counted.
…category Add ProofQueryKind.ScopeManagement and use it as the category for push/pop records. Thread `description` through executionFlowController.locally and locallyWithResult, derive `member` from s.currentMember inside, and pass both to Decider.pushScope/popScope. Annotate all 17 locally/locallyWithResult call sites with a descriptive string identifying the scope's purpose (branch verification, loop head, contract production, magic wand package, join-point coordination, quantified expression evaluation, CFG execution, etc.). Push and pop emitted by a single locally invocation share the same description.
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.
Summary
This PR extends proof query recording to include solver push/pop operations (in addition to assert/check queries) and refactors the query classification system for better clarity and extensibility.
Key Changes
New
QueryKindenum: Introduced a new sealed traitQueryKindwith four variants (Assert,Check,Push,Pop) to explicitly identify the type of solver interaction, replacing the booleanisAssertfield.Record push/pop operations: Added timing and recording of
pushScope()andpopScope()operations to the proof query collector, allowing complete tracking of all solver interactions.Refactored
ProofQueryRecord:isAssert: Booleantokind: QueryKindfor clearer semanticskind: ProofQueryKindtocategory: ProofQueryKindto distinguish between the type of interaction (assert/check/push/pop) and the category of proof obligation (PathInfeasibility/FunctionalCorrectness/etc.)Updated CSV export: Modified the proof query CSV header and output to use the new field names (
kindandcategoryinstead ofisAssertandkind).Updated call sites: Changed all
deciderAssert()calls to passqueryKindparameter with appropriateQueryKindvalues instead of theisAssertboolean.Implementation Details
QueryKind.Push/QueryKind.Pop,category = ProofQueryKind.Unknown, andsucceeded = true(since push/pop don't have success/failure semantics).System.nanoTime()consistent with existing query timing.https://claude.ai/code/session_01288E88m5eBVTAmSAZre5o6