Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion examples/PRG.ec
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ section.
inline Resample.resample Psample.init F.init.
rcondf{2} 7;
first by move=> &hr; rnd; wp; conseq (_: _ ==> true) => //.
by wp; rnd; wp; rnd{2} predT; auto; rewrite dseed_ll.
by wp; rnd; wp; rnd{2}; auto; rewrite dseed_ll.
(* presampling ~ postsampling *)
seq 2 2: (={glob A, glob F, glob Plog}); first by sim.
eager (H: Resample.resample(); ~ Resample.resample();
Expand Down
12 changes: 7 additions & 5 deletions src/phl/ecPhlRnd.ml
Original file line number Diff line number Diff line change
Expand Up @@ -587,10 +587,12 @@ let wp_equiv_rnd_r bij tc =

(* -------------------------------------------------------------------- *)
let t_equiv_rnd_r side pos bij_info tc =
match side, pos with
| Some side, None ->
wp_equiv_disj_rnd_r side tc
| None, _ -> begin
match side, pos, bij_info with
| Some side, None, (None, None) ->
wp_equiv_disj_rnd_r side tc
| Some side, None, _ ->
tc_error !!tc "one-sided rnd takes no arguments"
| None, _, _ -> begin
let pos =
match pos with
| None -> None
Expand All @@ -617,7 +619,7 @@ let t_equiv_rnd_r side pos bij_info tc =
end

| _ ->
tc_error !!tc "invalid argument"
tc_error !!tc "two-sided rnd requires a bijection"

(* -------------------------------------------------------------------- *)
let wp_equiv_disj_rnd = FApi.t_low1 "wp-equiv-disj-rnd" wp_equiv_disj_rnd_r
Expand Down