Skip to content

Commit 4588e9d

Browse files
authored
Merge pull request #1355 from cryspen/fix-lemmas-fstar-backend
fix(engine/fstar-backend): drop spurious precondition on `Lemma`s
2 parents 43363c5 + c6b972b commit 4588e9d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

engine/backends/fstar/fstar_backend.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ struct
943943
if is_lemma then mk [] "Lemma" else prims "Pure"
944944
else prims "Tot"
945945
in
946-
F.mk_e_app effect (if is_lemma then args else typ :: args)
946+
F.mk_e_app effect (if is_lemma then List.drop args 1 else typ :: args)
947947

948948
(** Prints doc comments out of a list of attributes *)
949949
let pdoc_comments attrs =

test-harness/src/snapshots/toolchain__attributes into-fstar.snap

+4-4
Original file line numberDiff line numberDiff line change
@@ -565,10 +565,10 @@ let issue_844_ (e_x: u8)
565565
true) = e_x
566566

567567
let add3_lemma (x: u32)
568-
: Lemma Prims.l_True
569-
(ensures
570-
x <=. mk_u32 10 || x >=. (u32_max /! mk_u32 3 <: u32) ||
571-
(add3 x x x <: u32) =. (x *! mk_u32 3 <: u32)) = ()
568+
: Lemma
569+
(ensures
570+
x <=. mk_u32 10 || x >=. (u32_max /! mk_u32 3 <: u32) ||
571+
(add3 x x x <: u32) =. (x *! mk_u32 3 <: u32)) = ()
572572

573573
type t_Foo = {
574574
f_x:u32;

0 commit comments

Comments
 (0)