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

Extraction hooks to support custom extraction by extensions #3058

Merged
merged 13 commits into from
Sep 28, 2023
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/dsls/bool_refinement/BoolRefinement.fst
Original file line number Diff line number Diff line change
Expand Up @@ -1690,7 +1690,7 @@ let main (src:src_exp) : RT.dsl_tac_t =
then
let (| src_ty, _ |) = check f [] src in
soundness_lemma f [] src src_ty;
elab_exp src, elab_ty src_ty
Some (elab_exp src), None, elab_ty src_ty
else T.fail "Not locally nameless"

(***** Examples *****)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -876,12 +876,12 @@ and closed_ty (t:src_ty)
| TRefineBool e -> closed e
| TArrow t1 t2 -> closed_ty t1 && closed_ty t2

let main (f:fstar_top_env)
(src:src_exp)
: T.Tac (e:R.term & t:R.term { RT.tot_typing f e t })
= if closed src
then
let (| src_ty, _ |) = check f [] src in
soundness_lemma f [] src src_ty;
(| elab_exp src, elab_ty src_ty |)
else T.fail "Not locally nameless"
let main (src:src_exp)
: RT.dsl_tac_t
= fun f ->
if closed src
then
let (| src_ty, _ |) = check f [] src in
soundness_lemma f [] src src_ty;
Some(elab_exp src), None, elab_ty src_ty
else T.fail "Not locally nameless"
2 changes: 1 addition & 1 deletion examples/dsls/stlc/STLC.Core.fst
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ let main (src:stlc_exp) : RT.dsl_tac_t =
then
let (| src_ty, d |) = check g [] src in
soundness_lemma [] src src_ty g;
elab_exp src, elab_ty src_ty
Some (elab_exp src), None, elab_ty src_ty
else T.fail "Not locally nameless"

(***** Tests *****)
Expand Down
2 changes: 1 addition & 1 deletion ocaml/fstar-lib/generated/FStar_CheckedFiles.ml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,012 changes: 540 additions & 472 deletions ocaml/fstar-lib/generated/FStar_Extraction_ML_Modul.ml

Large diffs are not rendered by default.

227 changes: 226 additions & 1 deletion ocaml/fstar-lib/generated/FStar_Extraction_ML_Syntax.ml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading