Skip to content

Print negative integer constants as (- n) in SMT-LIB2 - #314

Merged
coord-e merged 3 commits into
mainfrom
fix-negative-int-smtlib2
Sep 30, 2026
Merged

coord-e merged 3 commits into
mainfrom
fix-negative-int-smtlib2

Conversation

@coord-e

@coord-e coord-e commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Fixes #307

SMT-LIB2 has no negative numerals, so -7 is rejected by solvers in standard-compliant mode (e.g. z3 smtlib2_compliant=true). Negative values are now printed as (- 7) by a small IntConst wrapper, used for both Term::Int and the discriminants in datatype_discr<..>.

No test is added: default z3 accepts both spellings, so a UI test would pass before and after the change.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E3F27ojeP8M3P9NeHVQHsG


Generated by Claude Code

SMT-LIB2 has no negative numerals, so -7 is rejected by solvers running
in standard-compliant mode. Print negative Term::Int values and negative
datatype discriminants as (- n).

Fixes #307

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E3F27ojeP8M3P9NeHVQHsG
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-30T22:49:26.374020Z 22d20bd New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E3F27ojeP8M3P9NeHVQHsG
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E3F27ojeP8M3P9NeHVQHsG
@coord-e
coord-e merged commit 24e95f9 into main Sep 30, 2026
6 checks passed
@coord-e
coord-e deleted the fix-negative-int-smtlib2 branch September 30, 2026 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants