Skip to content

Record push/pop operations and refactor proof query tracking#975

Draft
jcp19 wants to merge 2 commits into
benchmarks-scionfrom
claude/record-solver-metadata-s7iC1
Draft

Record push/pop operations and refactor proof query tracking#975
jcp19 wants to merge 2 commits into
benchmarks-scionfrom
claude/record-solver-metadata-s7iC1

Conversation

@jcp19
Copy link
Copy Markdown
Contributor

@jcp19 jcp19 commented May 12, 2026

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 QueryKind enum: Introduced a new sealed trait QueryKind with four variants (Assert, Check, Push, Pop) to explicitly identify the type of solver interaction, replacing the boolean isAssert field.

  • Record push/pop operations: Added timing and recording of pushScope() and popScope() operations to the proof query collector, allowing complete tracking of all solver interactions.

  • Refactored ProofQueryRecord:

    • Renamed isAssert: Boolean to kind: QueryKind for clearer semantics
    • Renamed kind: ProofQueryKind to category: ProofQueryKind to 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 (kind and category instead of isAssert and kind).

  • Updated call sites: Changed all deciderAssert() calls to pass queryKind parameter with appropriate QueryKind values instead of the isAssert boolean.

Implementation Details

  • Push/pop operations are recorded with QueryKind.Push/QueryKind.Pop, category = ProofQueryKind.Unknown, and succeeded = true (since push/pop don't have success/failure semantics).
  • Timing for push/pop is measured using System.nanoTime() consistent with existing query timing.
  • The refactoring maintains backward compatibility in behavior while improving the semantic clarity of the recorded data.

https://claude.ai/code/session_01288E88m5eBVTAmSAZre5o6

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.
@jcp19 jcp19 marked this pull request as draft May 12, 2026 10:41
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants