Conversation
Contributor
| \n### CI Failure Hints\n\nFailed jobs: `compiler-audits`, `compiler-regressions`, `foundry`\n\nCopy-paste local triage:\n```bash\nmake check\nlake build\nFOUNDRY_PROFILE=difftest forge test -vv\n``` |
dd29128 to
ea84c08
Compare
ea84c08 to
624f0ad
Compare
# Conflicts: # Contracts/MacroTranslateInvariantTest.lean
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
Closes #1759.
Adds
Uint256.pow/a ^ bsupport for decimal exponentiation without adding a new CompilationModel expression constructor:Uint256.powplusHPow/Powinstancespow a banda ^ bto a reserved compiler builtinexp(a, b)Validation
lake build Verity.Core.Uint256 Verity.EVM.Uint256 Compiler.CompilationModel.ExpressionCompile Verity.Macro.Translate Contracts.Smoke Compiler.CompilationModelFeatureTestlake build Compilerlake buildpython3 scripts/generate_print_axioms.py --checkgit diff --checkNote:
lake build Compilerstill reports the pre-existing unnecessarysimpawarnings inCompiler/Proofs/IRGeneration/ContractFeatureTest.lean.Note
Medium Risk
Adds new arithmetic operator lowering that changes how
Expr.externalCallis compiled/validated and how purity/external-interaction checks classify a reserved name; mistakes could misclassify real externals or generate wrong Yulexpcalls.Overview
Adds EVM-style modular exponentiation to the EDSL (
Uint256.powanda ^ b) and lowers it through macros to a reserved external-call namebuiltinExpName.Updates compilation and analysis so that
Expr.externalCall builtinExpName [...]compiles directly to Yulexp(base, exponent)(with arity checks) and is treated as pure arithmetic (excluded from call-like/external-interaction/state read-write detection and from trust-surface linked-externals reporting).Extends validation to reserve the builtin name against user
externalsshadowing, and adds smoke tests/contracts, generated Solidity property stubs, and docs/feature-matrix updates coveringpow.Reviewed by Cursor Bugbot for commit 3920322. Bugbot is set up for automated code reviews on this repo. Configure here.