Issue: #802 Roadmap extension: #967
This document defines the opt-in backend profile used for deterministic output-shape alignment with Solidity-style workflows.
v1 exposes three explicit levels:
semantic(default)solidity-parity-orderingsolidity-parity--parity-pack <id>(tuple-pinned selection that maps to a backend profile + patch defaults)
All levels preserve Verity's semantic guarantees. Parity levels only normalize output shape.
| Rule ID | Description | semantic |
solidity-parity-ordering |
solidity-parity |
|---|---|---|---|---|
dispatch.selector.sort.asc |
Sort runtime dispatch case blocks by selector (ascending) |
no | yes | yes |
helpers.funcdef.sort.lex |
Sort compiler-generated/internal helper function declarations lexicographically by name | no | yes | yes |
patch.pass.enable |
Enable deterministic expression patch pass | no (opt-in only) | no (opt-in only) | yes (forced on) |
For a fixed source, fixed profile, fixed tool version, and fixed CLI options:
- emitted Yul output is deterministic;
- profile-normalized ordering is stable across repeated runs;
- profile behavior is fully opt-in (
semanticremains default).
For parity-pack mode, reproducibility is additionally keyed by the pack ID and compatibility tuple metadata.
v1 does not attempt full byte-for-byte solc output identity. In particular:
- it does not rewrite all helper naming patterns to mirror
solcinternals; - it does not force ABI/content layout rewrites beyond documented deterministic normalizations;
- it does not weaken verification constraints to chase shape parity.
Future versions can add additional rules with explicit IDs and migration notes.
All backend profiles use identical wrapping modular arithmetic at 2^256. Profiles differ only in output-shape normalization (selector sorting, helper sorting, patch pass enablement), not semantic behavior. A contract compiled with --backend-profile semantic and --backend-profile solidity-parity will produce semantically equivalent Yul with identical arithmetic.
See docs/ARITHMETIC_PROFILE.md for the full arithmetic specification and proof coverage.
Issue #967 defines the path from output-shape parity to exact solc Yul identity for pinned compiler tuples.
Planned extensions (beyond current --parity-pack registry/selection support):
- Versioned parity packs (
solc-version + optimizer + evm version) with explicit compatibility metadata. - Typed rewrite rules (
ExprRule,StmtRule,BlockRule,ObjectRule) with strict scope boundaries. - Proof-carrying rule activation and pack-level composition theorem.
- AST-level identity checker with mismatch localization and machine-readable reports.
- Canonicalization phase for helper naming/order/layout normalization.
See: