Skip to content

Lean: cheri_capreg test fails #1155

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

Closed
protoben opened this issue Mar 11, 2025 · 1 comment · Fixed by #1233
Closed

Lean: cheri_capreg test fails #1155

protoben opened this issue Mar 11, 2025 · 1 comment · Fixed by #1233
Labels
Lean Issues with Sail to Lean translation

Comments

@protoben
Copy link
Collaborator

The cheri_capreg Lean test fails with the following messages:

error: ././././Out.lean:48:9: application type mismatch
  zeros n
argument
  n
has type
  Nat : Type
but is expected to have type
  Unit : Type
error: ././././Out.lean:47:4: fail to show termination for
  Functions.zeros
with errors
failed to infer structural recursion:
Not considering parameter n of Functions.zeros:
  it is unchanged in the recursive calls
Not considering parameter x_1 of Functions.zeros:
  it is unchanged in the recursive calls
no parameters suitable for structural recursion

well-founded recursion cannot be used, 'Functions.zeros' does not take any (non-fixed) arguments
error: ././././Out.lean:192:23: application type mismatch
  capRegToCapStruct (reg_deref CapRegs[i]!)
argument
  reg_deref CapRegs[i]!
has type
  SailM CapReg : Type
but is expected to have type
  BitVec 257 : Type
error: Lean exited with code 1
@protoben protoben added the Lean Issues with Sail to Lean translation label Mar 11, 2025
@javra
Copy link
Collaborator

javra commented Apr 15, 2025

First error is due to a missing pure annotation in the test file, third one is a consequence of the second one, second one is due to reg_deref not being recognized as effectful for some reason

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lean Issues with Sail to Lean translation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants