forked from FStarLang/FStar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
module Bug1206 | ||
|
||
open FStar.Tactics | ||
open FStar.HyperStack.ST | ||
|
||
#reset-options "--max_fuel 1 --max_ifuel 1" | ||
|
||
type bslice = | ||
| BSlice : len:nat -> bslice | ||
|
||
let serializer_ty = buf:bslice -> Stack (option (off:nat{off <= buf.len})) | ||
(requires (fun h0 -> True)) | ||
(ensures (fun h0 r h1 -> True)) | ||
|
||
let ser_id (s1: serializer_ty) : serializer_ty = | ||
fun buf -> match s1 buf with | ||
| Some off -> Some off | ||
| None -> None | ||
|
||
assume val ser : serializer_ty | ||
|
||
let normalize (#t:Type) (x:t) : tactic unit = | ||
dup;; | ||
exact (quote x);; | ||
norm [delta];; | ||
trefl | ||
|
||
let ser' : serializer_ty = | ||
synth_by_tactic (normalize (ser_id ser)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module Bug1271 | ||
|
||
open FStar.Tactics | ||
|
||
let test = | ||
assert_by_tactic (True ==> True) | ||
(b <-- implies_intro; | ||
qb <-- quote b; | ||
qf <-- quote (fun (b: binder) -> print "f"); // f: tactic unit | ||
let q_fofb = mk_app qf [(qb, Q_Explicit)] in | ||
print ("::: " ^ term_to_string q_fofb);; | ||
tac <-- unquote #(tactic unit) q_fofb; | ||
tac;; | ||
trivial) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module Bug1305 | ||
|
||
open FStar.Tactics | ||
|
||
let _ = | ||
assert_by_tactic True | ||
(fun () -> | ||
admit (); | ||
let x = quote 1 () in | ||
()) |