Skip to content

IR-306: specify nested integer operand intervals - #362

Merged
kreneskyp merged 4 commits into
mainfrom
spec/ir-306-nested-operands
Oct 11, 2026
Merged

kreneskyp merged 4 commits into
mainfrom
spec/ir-306-nested-operands

Conversation

@kreneskyp

Copy link
Copy Markdown
Contributor

Refs IR-306

QSL emits (x + 1) + 1, x * -1, and -(x + 1) with plain-Integer inner applications. The outer operation directly references those applications; only the outer result is narrowed. The existing scalar oracle therefore treats the inner operand as unbounded even when its leaves have finite ranges.

This spec defines a conservative integer interval from independently bounded leaves for add, sub, mul, and negate, with explicit resource limits and typed refusals. It uses that interval for the corresponding Kani argument and preserves the existing rule that a raw application cannot borrow a separate consumer's narrowing bound. Plain-Integer parameters still refuse RequiresBound.

Current QSL output for all three expressions was emitted and admitted by Contract IR in a temporary read-only probe; outer arithmetic lowered with bounded scalar settings. This PR changes only FR-014, FR-015, TC-024, and TC-033. make spec passed twice, with only the existing FR-017 line-186 warnings; no code tests were run for this spec-only change. The separate CG code implementation and its full gates remain to do.

@kreneskyp
kreneskyp marked this pull request as ready for review October 11, 2026 18:56
@kreneskyp
kreneskyp merged commit 96652c2 into main Oct 11, 2026
3 checks passed
@kreneskyp
kreneskyp deleted the spec/ir-306-nested-operands branch October 11, 2026 18:56
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.

1 participant