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

Comment out the xor_swap_rust proof #1450

Merged
merged 1 commit into from
Sep 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions heapster-saw/examples/xor_swap_rust_proofs.v
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ From CryptolToCoq Require Import CompMExtra.
Require Import Examples.xor_swap_rust_gen.
Import xor_swap_rust.

Definition xor_swap_spec x1 x2 :
CompM (bitvector 64 * (bitvector 64 * unit)) :=
returnM (x2, (x1, tt)).
Arguments xor_swap_spec /.

(* FIXME: move lemma to SAWCorePrelude...? *)
Lemma bvXor_twice_r n x y :
SAWCorePrelude.bvXor n (SAWCorePrelude.bvXor n x y) y = x.
Expand All @@ -30,9 +25,17 @@ Proof.
admit.
Admitted.

(* FIXME: write a spec for xor_swap_rust that works! *)
(*
Definition xor_swap_spec x1 x2 :
CompM (bitvector 64 * (bitvector 64 * unit)) :=
returnM (x2, (x1, tt)).
Arguments xor_swap_spec /.

Lemma xor_swap_correct : refinesFun xor_swap_rust xor_swap_spec.
Proof.
prove_refinement.
rewrite bvXor_twice_r. rewrite bvXor_twice_l.
reflexivity.
Qed.
*)