Skip to content

feat(solidity-import): lower exact numeric literals, units and named constants - #2468

Open
Th0rgal wants to merge 9 commits into
feat/solidity-import-if-else-linuxfrom
feat/solidity-import-numeric-literals-linux
Open

Th0rgal wants to merge 9 commits into
feat/solidity-import-if-else-linuxfrom
feat/solidity-import-numeric-literals-linux

Conversation

@Th0rgal

@Th0rgal Th0rgal commented Oct 3, 2026

Copy link
Copy Markdown
Member

Solidity numeric literals such as 1 days, .5 hours and 1e-3 ether previously rejected. Lower exact integral decimal/scientific/hex values and time/currency units using natural rational arithmetic, resolve unsigned/bool constants by declaration ID, and admit bounded natural constant sums. Fractional results, oversized words and unsupported rational operations fail with located diagnostics.

Add a stateful A/B/C fixture with three equivalent spellings, near-miss rejection controls, 16 semantic mutants with minimal witnesses, generated variants and support/trust documentation. No golden model or pilot provenance changes. This PR is stacked on feat/solidity-import-if-else-linux (#2466).

Validation on exact head b0fa7b0e2d97afede09dd603884c4fea42debc7a: all 12 serial gates passed (make check, full Verity/Contracts/SolidityImportSmoke build, whole mutation suite, smoke, loss, generated programs, axiom generator, pinned Midnight pilot, stateful composite with 64 transactions per variant, require, custom require, proof axiom audit). Terminal receipts: linux-validation/numeric-b0fa7b0e-1/complete.json in the mission workspace. The development documentation records the earlier focused campaign; release validation is now complete. Full Midnight coverage is being remeasured separately; this PR does not claim complete Midnight support.

Checkpoint only: lowering, A/B/C fixture, three generated variants, thirteen mutations and located rejection controls prepared. Static checks only; Lean and EVM validations remain pending until the serial ifelse campaign finishes.
Keep named constants within unsigned integer and bool declarations. Add bool and narrow unsigned positive controls plus address and bytes32 near misses. Static review checkpoint; execution remains pending the active serial campaign.
solc 0.8.34 rejects 2E+3; use 2E3 for the intended value 2000. All three source variants compile to identical deployed runtime with metadata disabled. Importer, mutation and A/B/C gates remain pending; no assertions or golden models changed.
Solc AST preserves .5 and underscores. Normalize separators and interpret an omitted whole part as zero, retaining exact rational scaling and rejection. Add fixture values, normalized variants, two mutation rules and three located controls. Solc-only preflight passes three identical runtimes and all thirteen numeric control sources; Lean and A/B/C validation pending.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 3, 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-10-03T07:24:22.187412Z b0fa7b0 PR opened
ℹ️ 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.

This branch has not been deployed

No deployments
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