Skip to content
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

Lean: Adding a specialization file from PreSailM to SailM #1084

Merged
merged 4 commits into from
Feb 27, 2025

Conversation

lfrenot
Copy link
Collaborator

@lfrenot lfrenot commented Feb 27, 2025

This is preliminary work for changing the way loops and early returns are handled.
That change will help fix #1071

Copy link

github-actions bot commented Feb 27, 2025

Test Results

   13 files  ±0     29 suites  ±0   0s ⏱️ ±0s
  844 tests ±0    842 ✅  - 2  0 💤 ±0  0 ❌ ±0  2 🔥 +2 
3 532 runs  +3  3 530 ✅ +1  0 💤 ±0  0 ❌ ±0  2 🔥 +2 

For more details on these errors, see this check.

Results for commit ed03e2e. ± Comparison against base commit fe85f30.

♻️ This comment has been updated with latest results.

@Alasdair
Copy link
Collaborator

Seems to be causing the tests to fail with:

error: ././././Out.lean:110:2: unknown identifier 'main_of_sail_main'
error: Lean exited with code 1

@Alasdair
Copy link
Collaborator

Looks like the same issue with sailTryCatch?

error: ././././Out.lean:90:2: unknown identifier 'sailTryCatch'
error: Lean exited with code 1

@ineol
Copy link
Collaborator

ineol commented Feb 27, 2025

Should be fixed!

@ineol ineol added the Lean Issues with Sail to Lean translation label Feb 27, 2025
@Alasdair Alasdair merged commit b2687c3 into rems-project:sail2 Feb 27, 2025
6 checks passed
@tobiasgrosser
Copy link
Collaborator

I now see:

✔ [2/8] Built LeanRV64DLEAN.Sail.BitVec
✔ [3/8] Built LeanRV64DLEAN.Sail.Sail
✔ [4/8] Built LeanRV64DLEAN.Defs
✖ [5/8] Building LeanRV64DLEAN.RiscvExtras
trace: .> LEAN_PATH=././.lake/build/lib LD_LIBRARY_PATH= /home/runner/.elan/toolchains/leanprover--lean4-nightly---nightly-2025-02-05/bin/lean --tstack=400000 ././././LeanRV64DLEAN/RiscvExtras.lean -R ./././. -o ././.lake/build/lib/LeanRV64DLEAN/RiscvExtras.olean -i ././.lake/build/lib/LeanRV64DLEAN/RiscvExtras.ilean -c ././.lake/build/ir/LeanRV64DLEAN/RiscvExtras.c --json
error: ././././LeanRV64DLEAN/RiscvExtras.lean:64:32: function expected at
  PreSailM
term has type
  ?m.461
error: ././././LeanRV64DLEAN/RiscvExtras.lean:65:30: function expected at
  PreSailM
term has type
  ?m.503
error: ././././LeanRV64DLEAN/RiscvExtras.lean:68:35: function expected at
  PreSailM
term has type
  ?m.544
error: ././././LeanRV64DLEAN/RiscvExtras.lean:70:34: function expected at
  PreSailM
term has type
  ?m.609
error: ././././LeanRV64DLEAN/RiscvExtras.lean:72:34: function expected at
  PreSailM
term has type
  ?m.648
error: ././././LeanRV64DLEAN/RiscvExtras.lean:74:37: function expected at
  PreSailM
term has type
  ?m.687
error: Lean exited with code 1
✔ [6/8] Built LeanRV64DLEAN.Specialization
Some required builds logged failures:
- LeanRV64DLEAN.RiscvExtras
-

Is there a https://github.com/riscv/sail-riscv/pulls PR that I am missing?

@ineol
Copy link
Collaborator

ineol commented Feb 28, 2025

We need the associated RISC-V model patch riscv/sail-riscv#763

Timmmm pushed a commit to riscv/sail-riscv that referenced this pull request Feb 28, 2025
Adapt to the specialization patch [1], which hides the PreSailM monad in
the PreSail namespace, and use the SailM monad instead.

[1] rems-project/sail#1084
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 this pull request may close these issues.

4 participants