-
Notifications
You must be signed in to change notification settings - Fork 236
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
3 changed files
with
29 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,15 @@ | ||
module NoInlineLet | ||
open FStar.Tactics | ||
|
||
let test_no_inline (f: int): int = | ||
(* this one shouldn't be inlined in tactics or extraction *) | ||
[@@no_inline_let] | ||
let x = f + 1 in | ||
(* this one will be inlined by the norm tactic in the below test *) | ||
let y = x + 2 in | ||
y + y | ||
|
||
[@@(postprocess_with (fun _ -> norm [delta_only [`%test_no_inline]]; trefl ()))] | ||
let test_postprocess (f: int): int = | ||
let x = test_no_inline f in | ||
x |
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,8 @@ | ||
open Prims | ||
let (test_no_inline : Prims.int -> Prims.int) = | ||
fun f -> | ||
let x = f + Prims.int_one in let y = x + (Prims.of_int (2)) in y + y | ||
let (test_postprocess : Prims.int -> Prims.int) = | ||
fun f -> | ||
let x = f + Prims.int_one in | ||
(x + (Prims.of_int (2))) + (x + (Prims.of_int (2))) |