Use globally unique bound variable names in SMT encoding#681
Merged
Conversation
Always generate $__bv{N} names for quantifier-bound variables instead of
reusing user-provided names. This guarantees globally unique bound
variable names across all quantifiers.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
CC: @aqjune-aws This is along the lines of #632 but stricter. |
aqjune-aws
approved these changes
Mar 27, 2026
joscoh
approved these changes
Mar 27, 2026
MikaelMayer
added a commit
that referenced
this pull request
Mar 27, 2026
… flag (#683) Default behavior now uses human-readable names (e.g. 'n', 'x') for quantifier-bound variables in SMT output, with disambiguation when names clash with other bound variables or free variables. The --unique-bound-names flag enables the PR #681 behavior of always using globally unique $__bv{N} names for bound variables. The existing isUsed check already ensures generated bound variable names do not conflict with free variable names in the context.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 27, 2026
PR #681 replaced human-readable bound variable names (e.g. `n`, `m`, `x`) with globally unique `$__bv{N}` identifiers in SMT output. While this guarantees uniqueness, most SMT solvers don't require it and the output becomes harder to read. This PR restores human-readable names as the default behavior, with disambiguation (e.g. `x@1`) when names clash with other bound variables or free variables. The `$__bv{N}` naming is still available via the `--unique-bound-names` CLI flag for solvers that need it. The existing clash detection already ensures generated bound variable names never conflict with free variable names passed through in the context. Existing tests pass. No new tests needed since the test expectations were restored to their pre-#681 values. Fixes #683
olivier-aws
pushed a commit
that referenced
this pull request
Mar 30, 2026
## Summary
- Always generate `$__bv{N}` names for quantifier-bound variables
instead of reusing user-provided names
- This guarantees globally unique bound variable names across all
quantifiers.
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
olivier-aws
pushed a commit
that referenced
this pull request
Mar 30, 2026
PR #681 replaced human-readable bound variable names (e.g. `n`, `m`, `x`) with globally unique `$__bv{N}` identifiers in SMT output. While this guarantees uniqueness, most SMT solvers don't require it and the output becomes harder to read. This PR restores human-readable names as the default behavior, with disambiguation (e.g. `x@1`) when names clash with other bound variables or free variables. The `$__bv{N}` naming is still available via the `--unique-bound-names` CLI flag for solvers that need it. The existing clash detection already ensures generated bound variable names never conflict with free variable names passed through in the context. Existing tests pass. No new tests needed since the test expectations were restored to their pre-#681 values. Fixes #683
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
$__bv{N}names for quantifier-bound variables instead of reusing user-provided namesBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
🤖 Generated with Claude Code