Skip to content

Commit 08b717e

Browse files
committed
Add ExprCompileCore constructors for bitwise ops, prove sorry #1 (5→4 sorries)
- Add bitAnd/bitOr/bitXor/bitNot constructors to ExprCompileCore inductive - Add eval_compileExpr helpers for all 4 bitwise ops in FunctionBody.lean - Add cases to mutual blocks (eval_compileExpr_core_onExpr, evalExpr_lt_evmModulus_core_onExpr, compileRequireFailCond, eval_compileRequireFailCond) - Add cases to GenericInduction.lean match statements - Tighten SupportedSpec.lean surface checks: sdiv/smod/sgt/slt now return true (unsupported), matching that ExprCompileCore has no constructors for them - Prove exprCompileCore_of_exprTouchesUnsupportedContractSurface_eq_false by structural recursion on Expr, eliminating sorry #1 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d712394 commit 08b717e

4 files changed

Lines changed: 701 additions & 68 deletions

File tree

Compiler/Proofs/IRGeneration/ExprCore.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@ inductive ExprCompileCore : Expr → Prop where
111111
ExprCompileCore lhs → ExprCompileCore rhs → ExprCompileCore (.logicalAnd lhs rhs)
112112
| logicalOr {lhs rhs : Expr} :
113113
ExprCompileCore lhs → ExprCompileCore rhs → ExprCompileCore (.logicalOr lhs rhs)
114+
| bitAnd {lhs rhs : Expr} :
115+
ExprCompileCore lhs → ExprCompileCore rhs → ExprCompileCore (.bitAnd lhs rhs)
116+
| bitOr {lhs rhs : Expr} :
117+
ExprCompileCore lhs → ExprCompileCore rhs → ExprCompileCore (.bitOr lhs rhs)
118+
| bitXor {lhs rhs : Expr} :
119+
ExprCompileCore lhs → ExprCompileCore rhs → ExprCompileCore (.bitXor lhs rhs)
120+
| bitNot {expr : Expr} :
121+
ExprCompileCore expr → ExprCompileCore (.bitNot expr)
114122

115123
/-! ## Scope analysis -/
116124

0 commit comments

Comments
 (0)