-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: rewrite semantics to not have pattern match on structure #171
Conversation
This works around leanprover/lean4#5388, and removes uses of `simp (config := { ground := true }) ..`.
BTW,
|
@shigoel I audited these, and they're fine, because their arguments
Consider the diff: - let (carry_in, operand2)
+ let carryInAndOperand2
:= if sub_op then
(1#1, ~~~imm)
else
(0#1, imm)
+ let carry := carryInAndOperand2.fst
+ let operand2 := carryInAndOperand2.snd
let operand2 := BitVec.zeroExtend datasize operand2
- let (result, pstate) := AddWithCarry operand1 operand2 carry_in
+ let (result, pstate) := AddWithCarry operand1 operand2 carry The issue is that we were pattern matching to extract |
@shigoel updated. |
Issues:
This works around leanprover/lean4#5388, and removes uses of
simp (config := { ground := true }) ..
. This makes our proof states cleaner, since we no longer see proof states involvingDecidable.rec ...
. Peeled from #168Testing:
What tests have been run? Did
make all
succeed for your changes? Wasconformance testing successful on an Aarch64 machine?
make all
succeeded, conformance succeeded.License:
By submitting this pull request, I confirm that my contribution is
made under the terms of the Apache 2.0 license.