diff --git a/lib/steel/pulse/Pulse.Checker.Abs.fst b/lib/steel/pulse/Pulse.Checker.Abs.fst index 18132bb6a..25837300d 100644 --- a/lib/steel/pulse/Pulse.Checker.Abs.fst +++ b/lib/steel/pulse/Pulse.Checker.Abs.fst @@ -1,12 +1,12 @@ module Pulse.Checker.Abs module T = FStar.Tactics.V2 -module RT = FStar.Reflection.Typing open Pulse.Syntax open Pulse.Typing +open Pulse.Typing.Combinators open Pulse.Checker.Pure -open Pulse.Checker.Common +open Pulse.Checker.Base module P = Pulse.Syntax.Printer module FV = Pulse.Typing.FV @@ -31,18 +31,16 @@ let check_effect_annotation g r (c_annot c_computed:comp) = #push-options "--z3rlimit_factor 2 --fuel 0 --ifuel 1" -let check_abs +let rec check_abs (g:env) (t:st_term{Tm_Abs? t.term}) - (pre:term) - (pre_typing:tot_typing g pre tm_vprop) - (post_hint:post_hint_opt g) (check:check_t) - : T.Tac (checker_result_t g pre post_hint) = - if Some? post_hint then fail g None "Unexpected post-condition annotation from context for an abstraction" else + : T.Tac (t:st_term & c:comp & st_typing g t c)= + let range = t.range in match t.term with | Tm_Abs { b = {binder_ty=t;binder_ppname=ppname}; q=qual; ascription=c; body } -> //pre=pre_hint; body; ret_ty; post=post_hint_body } -> + (* (fun (x:t) -> {pre_hint} body : t { post_hint } *) let (| t, _, _ |) = check_term g t in //elaborate it first let (| u, t_typing |) = check_universe g t in //then check that its universe ... We could collapse the two calls @@ -50,39 +48,54 @@ let check_abs let px = ppname, x in let var = tm_var {nm_ppname=ppname;nm_index=x} in let g' = push_binding g x ppname t in - let pre_opened, ret_ty, post_hint_body = - match c with - | C_Tot { t = Tm_Unknown } -> - tm_emp, None, None + let body_opened = open_st_term_nv body px in + match body_opened.term with + | Tm_Abs _ -> + let (| body, c_body, body_typing |) = check_abs g' body_opened check in + check_effect_annotation g' body.range c c_body; + FV.st_typing_freevars body_typing; + let body_closed = close_st_term body x in + assume (open_st_term body_closed x == body); + let b = {binder_ty=t;binder_ppname=ppname} in + let tt = T_Abs g x qual b u body_closed c_body t_typing body_typing in + let tres = tm_arrow {binder_ty=t;binder_ppname=ppname} qual (close_comp c_body x) in + (| _, C_Tot tres, tt |) + | _ -> + let pre_opened, ret_ty, post_hint_body = + match c with + | C_Tot _ -> + fail g (Some body.range) + "Unexpected error: found a total computation annotation on a top-level function" + + | _ -> + open_term_nv (comp_pre c) px, + Some (open_term_nv (comp_res c) px), + Some (open_term' (comp_post c) var 1) + in + let (| pre_opened, pre_typing |) = check_vprop g' pre_opened in + let pre = close_term pre_opened x in + let post : post_hint_opt g' = + match post_hint_body with + | None -> fail g (Some body.range) "Top-level functions must be annotated with pre and post conditions" + | Some post -> + let post_hint_typing + : post_hint_t + = Pulse.Checker.Base.intro_post_hint (push_context "post_hint_typing" range g') (Some (ctag_of_comp_st c)) ret_ty post + in + Some post_hint_typing + in + + let ppname = mk_ppname_no_range "_fret" in + let r = check g' pre_opened pre_typing post ppname body_opened in + let (| body, c_body, body_typing |) : st_typing_in_ctxt g' pre_opened post = + apply_checker_result_k #_ #_ #(Some?.v post) r ppname in - | C_Tot ty -> - tm_emp, - Some (open_term_nv ty px), - None + check_effect_annotation g' body.range c c_body; - | _ -> - open_term_nv (comp_pre c) px, - Some (open_term_nv (comp_res c) px), - Some (open_term' (comp_post c) var 1) - in - let (| pre_opened, pre_typing |) = check_vprop g' pre_opened in - let pre = close_term pre_opened x in - let post = - match post_hint_body with - | None -> None - | Some post -> - let post_hint_typing - : post_hint_t - = Pulse.Checker.Common.intro_post_hint (push_context "post_hint_typing" range g') ret_ty post - in - Some post_hint_typing - in - let (| body', c_body, body_typing |) = check g' (open_st_term_nv body px) pre_opened pre_typing post in - check_effect_annotation g' body'.range c c_body; - FV.st_typing_freevars body_typing; - let body_closed = close_st_term body' x in - assume (open_st_term body_closed x == body'); - let b = {binder_ty=t;binder_ppname=ppname} in - let tt = T_Abs g x qual b u body_closed c_body t_typing body_typing in - let tres = tm_arrow {binder_ty=t;binder_ppname=ppname} qual (close_comp c_body x) in - (| _, C_Tot tres, tt |) \ No newline at end of file + FV.st_typing_freevars body_typing; + let body_closed = close_st_term body x in + assume (open_st_term body_closed x == body); + let b = {binder_ty=t;binder_ppname=ppname} in + let tt = T_Abs g x qual b u body_closed c_body t_typing body_typing in + let tres = tm_arrow {binder_ty=t;binder_ppname=ppname} qual (close_comp c_body x) in + (| _, C_Tot tres, tt |) diff --git a/lib/steel/pulse/Pulse.Checker.Abs.fst.hints b/lib/steel/pulse/Pulse.Checker.Abs.fst.hints index 1e089791e..bc25947d6 100644 --- a/lib/steel/pulse/Pulse.Checker.Abs.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.Abs.fst.hints @@ -1,5 +1,5 @@ [ - "̎]$Rm\n4", + "jR\u0005h\u0004*ۓz", [ [ "Pulse.Checker.Abs.check_effect_annotation", @@ -13,7 +13,7 @@ "string_typing" ], 0, - "99ab22c732cabb968a68fa9bb11ca57a" + "e3ed564cdb21aa89d1f311e001c5aa9a" ], [ "Pulse.Checker.Abs.check_abs", @@ -25,31 +25,30 @@ "@fuel_correspondence_Pulse.Syntax.Naming.freevars_st.fuel_instrumented", "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", "Pulse.Syntax.Base_pretyping_fe09dc1e796799f4bac0760e63f30d40", + "Pulse.Typing_pretyping_85b09ae4ef91823fbf549acd09fde244", "bool_inversion", "constructor_distinct_FStar.Pervasives.Native.None", "constructor_distinct_FStar.Pervasives.Native.Some", "constructor_distinct_FStar.Tactics.Result.Failed", "constructor_distinct_FStar.Tactics.Result.Success", - "constructor_distinct_Pulse.Syntax.Base.C_Tot", "constructor_distinct_Pulse.Syntax.Base.Tm_Abs", - "constructor_distinct_Pulse.Syntax.Base.Tm_Unknown", "data_elim_FStar.Tactics.Result.Success", "data_elim_Pulse.Syntax.Base.Mkppname", + "data_elim_Pulse.Syntax.Base.Mkst_term", "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_FStar.Pervasives.Native.Some", "disc_equation_Pulse.Syntax.Base.C_ST", "disc_equation_Pulse.Syntax.Base.C_STAtomic", "disc_equation_Pulse.Syntax.Base.C_STGhost", "disc_equation_Pulse.Syntax.Base.C_Tot", "disc_equation_Pulse.Syntax.Base.Tm_Abs", - "disc_equation_Pulse.Syntax.Base.Tm_Unknown", - "equality_tok_Pulse.Syntax.Base.Tm_Unknown@tok", "equation_FStar.Pervasives.Native.fst", "equation_FStar.Pervasives.Native.snd", "equation_FStar.Range.range", - "equation_FStar.Reflection.Typing.fstar_top_env", "equation_FStar.Reflection.Typing.pp_name_t", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Sealed.Inhabited.sealed", + "equation_FStar.Sealed.Inhabited.sealed_", "equation_Prims.eqtype", "equation_Prims.nat", "equation_Pulse.Checker.Pure.push_context", + "equation_Pulse.Syntax.Base.comp_st", "equation_Pulse.Syntax.Base.index", "equation_Pulse.Syntax.Base.nvar", "equation_Pulse.Syntax.Base.ppname_default", @@ -64,16 +63,14 @@ "equation_Pulse.Typing.FV.set_minus", "equation_Pulse.Typing.post_hint_for_env", "equation_Pulse.Typing.post_hint_opt", - "fuel_guarded_inversion_FStar.Pervasives.Native.option", "fuel_guarded_inversion_FStar.Tactics.Result.__result", "fuel_guarded_inversion_Pulse.Syntax.Base.comp", "fuel_guarded_inversion_Pulse.Syntax.Base.ppname", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", - "function_token_typing_Prims.__cache_version_number__", "function_token_typing_Prims.int", "function_token_typing_Prims.string", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", - "int_typing", "kinding_Pulse.Syntax.Base.ppname@tok", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_typing", + "kinding_Pulse.Syntax.Base.ppname@tok", "kinding_Pulse.Syntax.Base.term@tok", "kinding_Pulse.Typing.post_hint_t@tok", "lemma_FStar.Map.lemma_ContainsDom", @@ -88,12 +85,13 @@ "proj_equation_FStar.Pervasives.Native.Mktuple2__1", "proj_equation_FStar.Pervasives.Native.Mktuple2__2", "proj_equation_FStar.Pervasives.Native.Some_v", - "proj_equation_Pulse.Syntax.Base.C_Tot__0", "proj_equation_Pulse.Syntax.Base.Mkbinder_binder_ppname", "proj_equation_Pulse.Syntax.Base.Mkbinder_binder_ty", "proj_equation_Pulse.Syntax.Base.Mknm_nm_ppname", "proj_equation_Pulse.Syntax.Base.Mkppname_name", - "proj_equation_Pulse.Syntax.Base.Mkterm_t", + "proj_equation_Pulse.Syntax.Base.Mkppname_range", + "proj_equation_Pulse.Syntax.Base.Mkst_term_range", + "proj_equation_Pulse.Syntax.Base.Mkst_term_term", "projection_inverse_BoxBool_proj_0", "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", @@ -106,41 +104,41 @@ "projection_inverse_FStar.Tactics.Result.Success_a", "projection_inverse_FStar.Tactics.Result.Success_ps", "projection_inverse_FStar.Tactics.Result.Success_v", - "projection_inverse_Pulse.Syntax.Base.C_Tot__0", "projection_inverse_Pulse.Syntax.Base.Mkbinder_binder_ppname", "projection_inverse_Pulse.Syntax.Base.Mkbinder_binder_ty", "projection_inverse_Pulse.Syntax.Base.Mknm_nm_ppname", "projection_inverse_Pulse.Syntax.Base.Mkppname_name", - "projection_inverse_Pulse.Syntax.Base.Mkterm_t", "projection_inverse_Pulse.Syntax.Base.Tm_Abs__0", "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", - "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_25fe9861b42cf97d961ff4c8f44eb399", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "refinement_interpretation_Tm_refine_6c182d6f9819de8b46a7a4d39f909d33", "refinement_interpretation_Tm_refine_6e8e5238aadfc712ef5fa6bc6310c384", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", "refinement_interpretation_Tm_refine_7f3ad0958305f2921bfac06f466396ae", "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "string_typing", "typing_FStar.Map.contains", - "typing_FStar.Pervasives.Native.fst", - "typing_FStar.Pervasives.Native.uu___is_None", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.complement", - "typing_FStar.Set.mem", "typing_FStar.Set.singleton", + "string_typing", "typing_FStar.Pervasives.Native.fst", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Sealed.seal", + "typing_FStar.Set.complement", "typing_FStar.Set.mem", + "typing_FStar.Set.singleton", "typing_Pulse.Checker.Pure.push_context", "typing_Pulse.Syntax.Base.__proj__Mkppname__item__name", - "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__range", + "typing_Pulse.Syntax.Base.__proj__Mkppname__item__range", + "typing_Pulse.Syntax.Base.ppname_default", "typing_Pulse.Syntax.Base.v_as_nv", "typing_Pulse.Syntax.Naming.close_st_term", + "typing_Pulse.Syntax.Naming.close_st_term_", "typing_Pulse.Syntax.Naming.freevars_st", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.fresh", - "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fresh", "typing_Pulse.Typing.Env.push_binding" ], 0, - "25d95b794f02aa77026e3575b7127935" + "b392d6b9fe11f6e3b5eb6649a0773099" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Abs.fsti b/lib/steel/pulse/Pulse.Checker.Abs.fsti index 7c730b9c5..a04e6bd6f 100644 --- a/lib/steel/pulse/Pulse.Checker.Abs.fsti +++ b/lib/steel/pulse/Pulse.Checker.Abs.fsti @@ -4,13 +4,10 @@ module T = FStar.Tactics.V2 open Pulse.Syntax open Pulse.Typing -open Pulse.Checker.Common +open Pulse.Checker.Base val check_abs (g:env) (t:st_term{Tm_Abs? t.term}) - (pre:term) - (pre_typing:tot_typing g pre tm_vprop) - (post_hint:post_hint_opt g) (check:check_t) - : T.Tac (checker_result_t g pre post_hint) + : T.Tac (t:st_term & c:comp & st_typing g t c) diff --git a/lib/steel/pulse/Pulse.Checker.Abs.fsti.hints b/lib/steel/pulse/Pulse.Checker.Abs.fsti.hints index 08e510ff8..41246dbbd 100644 --- a/lib/steel/pulse/Pulse.Checker.Abs.fsti.hints +++ b/lib/steel/pulse/Pulse.Checker.Abs.fsti.hints @@ -1 +1 @@ -[ "gJq>` fb-", [] ] \ No newline at end of file +[ "\u0004h\u001c\f\u0011muT\u000ev.", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Admit.fst b/lib/steel/pulse/Pulse.Checker.Admit.fst index 5314845a8..663ca88b4 100644 --- a/lib/steel/pulse/Pulse.Checker.Admit.fst +++ b/lib/steel/pulse/Pulse.Checker.Admit.fst @@ -1,14 +1,14 @@ module Pulse.Checker.Admit module T = FStar.Tactics.V2 -module RT = FStar.Reflection.Typing open Pulse.Syntax open Pulse.Typing open Pulse.Checker.Pure -open Pulse.Checker.Common +open Pulse.Checker.Base +open Pulse.Checker.Prover -module FV = Pulse.Typing.FV +module P = Pulse.Syntax.Printer let post_hint_compatible (p:option post_hint_t) (x:var) (t:term) (u:universe) (post:vprop) = match p with @@ -18,15 +18,20 @@ let post_hint_compatible (p:option post_hint_t) (x:var) (t:term) (u:universe) (p p.u == u /\ p.ret_ty == t -#push-options "--z3rlimit_factor 4" -let check_admit +let check (g:env) - (t:st_term{Tm_Admit? t.term}) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) + (res_ppname:ppname) + (t:st_term { Tm_Admit? t.term }) + : T.Tac (checker_result_t g pre post_hint) = + + let g = Pulse.Typing.Env.push_context g "check_admit" t.range in + let Tm_Admit { ctag = c; typ=t; post } = t.term in + let x = fresh g in let px = v_as_nv x in let res @@ -36,9 +41,14 @@ let check_admit post:vprop { post_hint_compatible post_hint x t u post } & tot_typing (push_binding g x (fst px) t) post tm_vprop) = match post, post_hint with - | None, None - | Some _, Some _ -> - fail g None "T_Admit: either no post or two posts" + | None, None -> + fail g None "could not find a post annotation on admit, please add one" + + | Some post1, Some post2 -> + fail g None + (Printf.sprintf "found two post annotations on admit: %s and %s, please remove one" + (P.term_to_string post1) + (P.term_to_string post2.post)) | Some post, _ -> let (| u, t_typing |) = check_universe g t in @@ -51,7 +61,7 @@ let check_admit | _, Some post -> let post : post_hint_t = post in if x `Set.mem` freevars post.post - then fail g None "Unexpected freevar clash in Tm_Admit" + then fail g None "Impossible: unexpected freevar clash in Tm_Admit, please file a bug-report" else ( let post_typing_rec = post_hint_typing g post x in let post_opened = open_term_nv post.post px in @@ -64,9 +74,5 @@ let check_admit let s : st_comp = {u;res=t;pre;post} in assume (open_term (close_term post_opened x) x == post_opened); - (| - _, //Tm_Admit c u t None, - comp_admit c s, - T_Admit _ _ c (STC _ s x t_typing pre_typing post_typing) - |) -#pop-options + let d = T_Admit _ _ c (STC _ s x t_typing pre_typing post_typing) in + prove_post_hint (try_frame_pre pre_typing d res_ppname) post_hint t.range diff --git a/lib/steel/pulse/Pulse.Checker.Admit.fst.hints b/lib/steel/pulse/Pulse.Checker.Admit.fst.hints index a169934f1..f3ef21dcb 100644 --- a/lib/steel/pulse/Pulse.Checker.Admit.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.Admit.fst.hints @@ -1,5 +1,5 @@ [ - "?P/|i3\u0007eyy", + "\u007fO`\u0011Z#", [ [ "Pulse.Checker.Admit.post_hint_compatible", @@ -11,10 +11,10 @@ "lemma_FStar.Pervasives.invertOption" ], 0, - "fe6e3099234e8818e81e3317395f6a15" + "47e3c39481aa9899af8f9bc13b9d21f1" ], [ - "Pulse.Checker.Admit.check_admit", + "Pulse.Checker.Admit.check", 1, 2, 1, @@ -24,6 +24,8 @@ "@fuel_irrelevance_Pulse.Syntax.Naming.freevars.fuel_instrumented", "@query", "FStar.Pervasives.Native_pretyping_b53dbd183c526bc5d0f20d7b966ae125", + "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "Pulse.Syntax.Base_pretyping_fe09dc1e796799f4bac0760e63f30d40", "bool_inversion", "constructor_distinct_FStar.Pervasives.Native.None", "constructor_distinct_FStar.Pervasives.Native.Some", @@ -34,12 +36,10 @@ "constructor_distinct_Pulse.Syntax.Base.C_STGhost", "constructor_distinct_Pulse.Syntax.Base.STT", "constructor_distinct_Pulse.Syntax.Base.STT_Atomic", + "constructor_distinct_Pulse.Syntax.Base.STT_Ghost", "constructor_distinct_Pulse.Syntax.Base.Tm_Admit", "data_elim_Pulse.Typing.Mkpost_hint_t", "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", "disc_equation_Pulse.Syntax.Base.C_Tot", "disc_equation_Pulse.Syntax.Base.Tm_Admit", "equation_FStar.Pervasives.Native.fst", @@ -47,31 +47,21 @@ "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", "equation_Prims.nat", "equation_Pulse.Checker.Admit.post_hint_compatible", - "equation_Pulse.Syntax.Base.comp_post", - "equation_Pulse.Syntax.Base.comp_pre", - "equation_Pulse.Syntax.Base.comp_res", - "equation_Pulse.Syntax.Base.comp_u", - "equation_Pulse.Syntax.Base.index", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.index", "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.v_as_nv", - "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", "equation_Pulse.Syntax.Naming.close_term", "equation_Pulse.Syntax.Naming.open_term", "equation_Pulse.Syntax.Pure.tm_type", - "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.env_extends", - "equation_Pulse.Typing.Env.extends_with", - "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", "equation_Pulse.Typing.FV.set_minus", "equation_Pulse.Typing.comp_admit", - "equation_Pulse.Typing.comp_post_matches_hint", "equation_Pulse.Typing.fresh_wrt", - "equation_Pulse.Typing.post_hint_for_env_p", "equation_Pulse.Typing.post_hint_opt", "fuel_guarded_inversion_FStar.Pervasives.Native.option", "fuel_guarded_inversion_FStar.Tactics.Result.__result", "fuel_guarded_inversion_Pulse.Syntax.Base.ctag", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "fuel_guarded_inversion_Pulse.Syntax.Base.term", "fuel_guarded_inversion_Pulse.Typing.post_hint_t", "function_token_typing_Prims.__cache_version_number__", @@ -84,8 +74,8 @@ "lemma_FStar.Set.mem_complement", "lemma_FStar.Set.mem_intersect", "lemma_FStar.Set.mem_singleton", "lemma_Pulse.Typing.FV.freevars_close_term", - "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", - "primitive_Prims.op_Equality", "primitive_Prims.op_Negation", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_Equality", + "primitive_Prims.op_Negation", "proj_equation_FStar.Pervasives.Native.Mktuple2__1", "proj_equation_FStar.Pervasives.Native.Mktuple2__2", "proj_equation_FStar.Pervasives.Native.Some_v", @@ -93,7 +83,6 @@ "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", "proj_equation_Pulse.Syntax.Base.Mkst_comp_u", - "proj_equation_Pulse.Typing.Mkpost_hint_t_g", "proj_equation_Pulse.Typing.Mkpost_hint_t_post", "proj_equation_Pulse.Typing.Mkpost_hint_t_ret_ty", "proj_equation_Pulse.Typing.Mkpost_hint_t_u", @@ -113,34 +102,32 @@ "projection_inverse_FStar.Tactics.Result.Success_ps", "projection_inverse_FStar.Tactics.Result.Success_v", "projection_inverse_Prims.Mkdtuple2__1", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", - "projection_inverse_Pulse.Syntax.Base.C_ST__0", "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", "projection_inverse_Pulse.Syntax.Base.Mkst_comp_res", "projection_inverse_Pulse.Syntax.Base.Mkst_comp_u", "projection_inverse_Pulse.Syntax.Base.Tm_Admit__0", - "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", - "refinement_interpretation_Tm_refine_1c5e7105979a7231f04ad65b46c30b69", "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_717807cab8f2d0ea552aff3c667b3f67", "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", "refinement_interpretation_Tm_refine_ecc02256d87cc95183f37fc512700b64", + "refinement_interpretation_Tm_refine_eed994d15518279ab75d745192d0d368", + "string_typing", "token_correspondence_Pulse.Syntax.Naming.freevars.fuel_instrumented", "typing_FStar.Pervasives.Native.uu___is_None", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.complement", "typing_FStar.Set.mem", "typing_FStar.Set.singleton", + "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__range", "typing_Pulse.Syntax.Naming.close_term", "typing_Pulse.Syntax.Naming.freevars", "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", - "typing_Pulse.Typing.Env.fstar_env" + "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.push_context" ], 0, - "8b24c521cfd8f8e484e38e7f3d9c5ff5" + "3089e3801a376cde2895ac975287e48a" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Admit.fsti b/lib/steel/pulse/Pulse.Checker.Admit.fsti index b396cd050..278fee368 100644 --- a/lib/steel/pulse/Pulse.Checker.Admit.fsti +++ b/lib/steel/pulse/Pulse.Checker.Admit.fsti @@ -4,12 +4,13 @@ module T = FStar.Tactics.V2 open Pulse.Syntax open Pulse.Typing -open Pulse.Checker.Common +open Pulse.Checker.Base -val check_admit +val check (g:env) - (t:st_term{Tm_Admit? t.term}) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) + (res_ppname:ppname) + (t:st_term { Tm_Admit? t.term }) : T.Tac (checker_result_t g pre post_hint) diff --git a/lib/steel/pulse/Pulse.Checker.Admit.fsti.hints b/lib/steel/pulse/Pulse.Checker.Admit.fsti.hints index fd5362ba4..1e7b972f3 100644 --- a/lib/steel/pulse/Pulse.Checker.Admit.fsti.hints +++ b/lib/steel/pulse/Pulse.Checker.Admit.fsti.hints @@ -1 +1 @@ -[ "Y[v\u0007b>", [] ] \ No newline at end of file +[ "VUPh!G%\u0010H", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.AssertWithBinders.fst b/lib/steel/pulse/Pulse.Checker.AssertWithBinders.fst index bfe10c828..7dc9689e7 100644 --- a/lib/steel/pulse/Pulse.Checker.AssertWithBinders.fst +++ b/lib/steel/pulse/Pulse.Checker.AssertWithBinders.fst @@ -1,110 +1,105 @@ module Pulse.Checker.AssertWithBinders -module T = FStar.Tactics.V2 -module R = FStar.Reflection.V2 + open Pulse.Syntax open Pulse.Typing -open Pulse.Checker.Common +open Pulse.Checker.Base open Pulse.Elaborate.Pure open Pulse.Typing.Env + module L = FStar.List.Tot +module T = FStar.Tactics.V2 +module R = FStar.Reflection.V2 module PC = Pulse.Checker.Pure module P = Pulse.Syntax.Printer -module N = Pulse.Syntax.Naming -module Inf = Pulse.Checker.Inference -module RT = FStar.Reflection.Typing +module N = Pulse.Syntax.Naming +module PS = Pulse.Checker.Prover.Substs +module Prover = Pulse.Checker.Prover + module RU = Pulse.RuntimeUtils + let is_host_term (t:R.term) = not (R.Tv_Unknown? (R.inspect_ln t)) let debug_log = Pulse.Typing.debug_log "with_binders" -let instantiate_binders_with_fresh_names (g:env) (top:R.term) : T.Tac (list nvar & R.term) = - let rec aux g (vars:list nvar) (t:R.term) : T.Tac (list nvar & R.term) = - match R.inspect_ln t with - | R.Tv_Unknown -> T.fail "Impossible: instantiate_binders_with_fresh_names got an unknown term" - | R.Tv_Abs b body -> - let bv = R.inspect_binder b in - let x = fresh g in - let ppname = (mk_ppname bv.ppname (RU.range_of_term t)) in - let g = push_binding g x ppname (with_range Tm_Unknown (RU.range_of_term t)) in - let vars = (ppname, x)::vars in - let body = RT.open_term body x in - aux g vars body - | _ -> - L.rev vars, t - in - aux g [] top - -let instantiate_names_with_uvars (xs:list nvar) (t0 t1:term) - : T.Tac (list (Inf.uvar & term) & vprop & vprop) - = let subst, out = - T.fold_right (fun (p,x) (subst, out) -> - let uv, t = Inf.gen_uvar p in - let out = (uv, t)::out in - let subst = N.NT x t :: subst in - subst, out) - xs - ([], []) - in - out, subst_term t0 subst, subst_term t1 subst - -let instantiate_binders_with_uvars (top:R.term) : T.Tac (list (Inf.uvar & term) & vprop) = - let rec aux uvars (t:R.term) : T.Tac (list (Inf.uvar & term) & vprop) = - match R.inspect_ln t with - | R.Tv_Unknown -> T.fail "Impossible: instantiate_binders_with_uvars got an unknown term" - | R.Tv_Abs b body -> - let bv = R.inspect_binder b in - let uv, t = Inf.gen_uvar (mk_ppname bv.ppname (RU.range_of_term t)) in - let uvars = (uv, t)::uvars in - let body = RT.subst_term body N.(rt_subst [DT 0 t]) in - aux uvars body - | _ -> - match readback_ty t with - | None -> T.fail "Failed to readback elaborated assertion" - | Some t -> L.rev uvars, t - in - aux [] top +let option_must (f:option 'a) (msg:string) : T.Tac 'a = + match f with + | Some x -> x + | None -> T.fail msg + +let rec refl_abs_binders (t:R.term) (acc:list binder) : T.Tac (list binder) = + let open R in + match inspect_ln t with + | Tv_Abs b body -> + let {sort; ppname} = R.inspect_binder b in + let sort = option_must (readback_ty sort) + (Printf.sprintf "Failed to readback elaborated binder sort %s in refl_abs_binders" + (T.term_to_string sort)) in + refl_abs_binders body + ({ binder_ty = sort; binder_ppname = mk_ppname ppname (RU.range_of_term t) }::acc) + | _ -> L.rev acc let infer_binder_types (g:env) (bs:list binder) (v:vprop) - : T.Tac (list nvar & R.term) = + : T.Tac (list binder) = + match bs with + | [] -> [] + | _ -> let tv = elab_term v in if not (is_host_term tv) - then fail g (Some v.range) (Printf.sprintf "Cannot infer type of %s" (P.term_to_string v)); + then fail g (Some v.range) + (Printf.sprintf "assert.infer_binder_types: elaborated %s to %s, which failed the host term check" + (P.term_to_string v) (T.term_to_string tv)); let as_binder (b:binder) : R.binder = - let open R in - let bv : binder_view = - { sort = elab_term b.binder_ty; - ppname = b.binder_ppname.name; - qual = Q_Explicit; - attrs = [] } in - pack_binder bv + let open R in + let bv : binder_view = + { sort = elab_term b.binder_ty; + ppname = b.binder_ppname.name; + qual = Q_Explicit; + attrs = [] } in + pack_binder bv in let abstraction = - L.fold_right - (fun b (tv:host_term) -> - let b = as_binder b in - R.pack_ln (R.Tv_Abs b tv)) - bs - tv + L.fold_right + (fun b (tv:host_term) -> + let b = as_binder b in + R.pack_ln (R.Tv_Abs b tv)) + bs + tv in - // T.print (Printf.sprintf "About to elaborate assert body: %s" (T.term_to_string abstraction)); let inst_abstraction, _ = PC.instantiate_term_implicits g (tm_fstar abstraction v.range) in - // T.print (Printf.sprintf "Instantiated abstraction is: %s" (T.term_to_string abstraction)); match inst_abstraction.t with - | Tm_FStar t -> instantiate_binders_with_fresh_names g t - | t -> - match bs with - | [] -> [], elab_term inst_abstraction - | _ -> T.fail "Impossible: Instantiated abstraction is not embedded F* term" + | Tm_FStar t -> refl_abs_binders t [] + | _ -> T.fail "Impossible: instantiated abstraction is not embedded F* term, please file a bug-report" -let option_must (f:option 'a) (msg:string) : T.Tac 'a = - match f with - | Some x -> x - | None -> T.fail msg +let rec open_binders (g:env) (bs:list binder) (uvs:env { disjoint uvs g }) (v:term) (body:st_term) + : T.Tac (uvs:env { disjoint uvs g } & term & st_term) = + + match bs with + | [] -> (| uvs, v, body |) + | b::bs -> + // these binders are only lax checked so far + let _ = PC.check_universe (push_env g uvs) b.binder_ty in + let x = fresh (push_env g uvs) in + let ss = [ DT 0 (tm_var {nm_index=x;nm_ppname=b.binder_ppname}) ] in + let bs = L.mapi (fun i b -> + assume (i >= 0); + subst_binder b (shift_subst_n i ss)) bs in + let v = subst_term v (shift_subst_n (L.length bs) ss) in + let body = subst_st_term body (shift_subst_n (L.length bs) ss) in + open_binders g bs (push_binding uvs x b.binder_ppname b.binder_ty) v body -let unfold_defs (g:env) (defs:option (list string)) (t:R.term) +let close_binders (bs:list (var & typ)) (t:term) : term = + let r = L.fold_right (fun (x, _) (n, t) -> + let ss = [ ND x 0 ] in + n + 1, + subst_term t (shift_subst_n n ss) + ) bs (0, t) in + snd r + +let unfold_defs (g:env) (defs:option (list string)) (t:term) : T.Tac term - = let head, _ = T.collect_app t in + = let t = elab_term t in + let head, _ = T.collect_app t in match R.inspect_ln head with | R.Tv_FVar fv | R.Tv_UInst fv _ -> ( @@ -115,90 +110,82 @@ let unfold_defs (g:env) (defs:option (list string)) (t:R.term) | None -> [] in let rt = RU.unfold_def (fstar_env g) head fully t in - let rt = option_must rt "Unexpected: reduction produced an ill-formed term" in - let ty = option_must (readback_ty rt) "Unexpected: unable to readback unfolded term" in + let rt = option_must rt + (Printf.sprintf "unfolding %s returned None" (T.term_to_string t)) in + let ty = option_must (readback_ty rt) + (Printf.sprintf "error in reading back the unfolded term %s" (T.term_to_string rt)) in debug_log g (fun _ -> Printf.sprintf "Unfolded %s to F* term %s and readback as %s" (T.term_to_string t) (T.term_to_string rt) (P.term_to_string ty)); ty ) | _ -> - fail g (Some (RU.range_of_term t)) (Printf.sprintf "Cannot unfold %s" (T.term_to_string t)) - -let prepare_goal hint_type g (v:R.term) : T.Tac (term & term) = - match hint_type with - | ASSERT -> - let v = option_must (readback_ty v) "Failed to readback elaborated assertion" in - v, v - | UNFOLD _ -> - option_must (readback_ty v) "Failed to readback elaborated assertion", - unfold_defs g None v - | FOLD ns -> - unfold_defs g ns v, - option_must (readback_ty v) "Failed to readback elaborated assertion" - -let check_unfoldable g hint_type (v:term) : T.Tac unit = - match hint_type with - | ASSERT -> () - | FOLD _ - | UNFOLD _ -> - match v.t with - | Tm_FStar _ -> () - | _ -> - fail g - (Some v.range) - (Printf.sprintf "`fold` and `unfold` expect a single user-defined predicate as an argument, \ - but %s is a primitive term that cannot be folded or unfolded" - (P.term_to_string v)) + fail g (Some (RU.range_of_term t)) + (Printf.sprintf "Cannot unfold %s, the head is not an fvar" (T.term_to_string t)) + +let check_unfoldable g (v:term) : T.Tac unit = + match v.t with + | Tm_FStar _ -> () + | _ -> + fail g + (Some v.range) + (Printf.sprintf "`fold` and `unfold` expect a single user-defined predicate as an argument, \ + but %s is a primitive term that cannot be folded or unfolded" + (P.term_to_string v)) let check (g:env) - (st:st_term{Tm_ProofHintWithBinders? st.term}) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) + (res_ppname:ppname) + (st:st_term { Tm_ProofHintWithBinders? st.term }) (check:check_t) - : T.Tac (checker_result_t g pre post_hint) - = let Tm_ProofHintWithBinders { hint_type; binders; v; t=body } = st.term in - check_unfoldable g hint_type v; - let nvars, v = infer_binder_types g binders v in - let lhs, rhs = prepare_goal hint_type g v in - let uvs, lhs, rhs = instantiate_names_with_uvars nvars lhs rhs in - debug_log g (fun _ -> Printf.sprintf "Trying to solve %s \nagainst context %s" (P.term_to_string lhs) (P.term_to_string pre)); - let solution = Pulse.Checker.Inference.try_inst_uvs_in_goal g pre lhs in - match Inf.unsolved solution uvs with - | Some uvs -> - fail g (Some st.range) - (Printf.sprintf "Could not instantiate %s" - (String.concat ", " (T.map (fun (_, t) -> P.term_to_string t) uvs))) - | _ -> - debug_log g (fun _ -> Printf.sprintf "Solution: %s\n" (Inf.solutions_to_string solution)); - let sub = - T.fold_left - (fun subst (uv, t) -> - let sol = Inf.apply_solution solution t in - N.DT 0 sol::shift_subst subst) - [] - uvs - in - let seq t1 t2 = - { term = Tm_Bind { binder = as_binder (tm_fstar (`unit) st.range); - head = t1; body = t2 }; - range = st.range } - in - match hint_type with - | ASSERT -> - let assert_term = tm_fstar (`(Pulse.Steel.Wrapper.assert_)) st.range in - let vprop_to_assert = Inf.apply_solution solution lhs in - let asrt = { term = Tm_STApp { head=assert_term; arg_qual=None; arg=vprop_to_assert}; - range = st.range } in - let tm = seq asrt (subst_st_term body sub) in - debug_log g (fun _ -> Printf.sprintf "After with_binders: about to check %s\n" (P.st_term_to_string tm)); - check g tm pre pre_typing post_hint - | UNFOLD _ - | FOLD _ -> - let rw = { term = Tm_Rewrite { t1 = Inf.apply_solution solution lhs; - t2 = Inf.apply_solution solution rhs }; - range = st.range } in - let body' = subst_st_term body sub in - let tm = seq rw body' in - debug_log g (fun _ -> Printf.sprintf "After with_binders: about to check %s\n" (P.st_term_to_string tm)); - check g tm pre pre_typing post_hint + + : T.Tac (checker_result_t g pre post_hint) = + + let g = push_context g "check_assert" st.range in + + let Tm_ProofHintWithBinders { hint_type; binders=bs; v; t=body } = st.term in + + let bs = infer_binder_types g bs v in + + let (| uvs, v_opened, body_opened |) = open_binders g bs (mk_env (fstar_env g)) v body in + + match hint_type with + | ASSERT -> + let v, body = v_opened, body_opened in + let (| v, d |) = PC.check_vprop (push_env g uvs) v in + let (| g1, nts, pre', k_frame |) = Prover.prove pre_typing uvs d in + let (| x, x_ty, pre'', g2, k |) = + check g1 (tm_star (PS.nt_subst_term v nts) pre') (magic ()) post_hint res_ppname (PS.nt_subst_st_term body nts) in + (| x, x_ty, pre'', g2, k_elab_trans k_frame k |) + + | _ -> + check_unfoldable g v; + let v_opened, _ = PC.instantiate_term_implicits (push_env g uvs) v_opened in + let lhs, rhs = + match hint_type with + | UNFOLD _ -> + v_opened, + unfold_defs (push_env g uvs) None v_opened + | FOLD ns -> + unfold_defs (push_env g uvs) ns v_opened, + v_opened in + let uvs_bs = L.rev (bindings uvs) in + let lhs, rhs = close_binders uvs_bs lhs, close_binders uvs_bs rhs in + let rw = { term = Tm_Rewrite { t1 = lhs; + t2 = rhs }; + range = st.range } in + let st = { term = Tm_Bind { binder = as_binder (tm_fstar (`unit) st.range); + head = rw; body }; + range = st.range } in + + let st = + match bs with + | [] -> st + | _ -> + { term = Tm_ProofHintWithBinders { hint_type = ASSERT; + binders = bs; + v = lhs; + t = st }; + range = st.range } in + check g pre pre_typing post_hint res_ppname st diff --git a/lib/steel/pulse/Pulse.Checker.AssertWithBinders.fst.hints b/lib/steel/pulse/Pulse.Checker.AssertWithBinders.fst.hints index 350a8606d..d705214f7 100644 --- a/lib/steel/pulse/Pulse.Checker.AssertWithBinders.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.AssertWithBinders.fst.hints @@ -1,42 +1,37 @@ [ - "C7p\u007f]&)8WR", + "v5_<%w[", [ [ - "Pulse.Checker.AssertWithBinders.instantiate_binders_with_fresh_names", + "Pulse.Checker.AssertWithBinders.option_must", 1, 2, 1, - [ - "@MaxIFuel_assumption", "@query", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "equation_FStar.Sealed.Inhabited.is_sealed", "equation_Prims.eqtype", - "equation_Prims.nat", - "equation_Pulse.Syntax.Base.range_singleton_trigger", - "equation_Pulse.Syntax.Base.var", "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "string_typing", "true_interp" - ], + [ "@query", "lemma_FStar.Pervasives.invertOption" ], 0, - "f0fe4d175b5211e17b4db2030572f809" + "223601c56f746132bd21e5bdb42bfa1b" ], [ - "Pulse.Checker.AssertWithBinders.instantiate_binders_with_uvars", + "Pulse.Checker.AssertWithBinders.refl_abs_binders", 1, 2, 1, [ "@MaxIFuel_assumption", "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_FStar.Pervasives.Native.Some", + "constructor_distinct_FStar.Tactics.Result.Failed", + "constructor_distinct_FStar.Tactics.Result.Success", "equation_FStar.Sealed.Inhabited.is_sealed", - "fuel_guarded_inversion_FStar.Pervasives.Native.option", - "projection_inverse_BoxBool_proj_0", "string_typing", "true_interp", - "typing_Pulse.Readback.readback_ty" + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "projection_inverse_FStar.Tactics.Result.Failed_a", + "projection_inverse_FStar.Tactics.Result.Failed_exn", + "projection_inverse_FStar.Tactics.Result.Failed_ps", + "projection_inverse_FStar.Tactics.Result.Success_a", + "projection_inverse_FStar.Tactics.Result.Success_ps", + "projection_inverse_FStar.Tactics.Result.Success_v", "string_typing", + "true_interp" ], 0, - "041a38e172547c683f6be9c8727aea0f" + "15b3120f0dc57ee5bfead3be7616d0e5" ], [ "Pulse.Checker.AssertWithBinders.infer_binder_types", @@ -91,16 +86,76 @@ "typing_tok_FStar.Reflection.V2.Data.Q_Explicit@tok" ], 0, - "1492f3d725f3f77db48cecc5020b7148" + "c1aedee9309bebe7c96b357c0b495da1" ], [ - "Pulse.Checker.AssertWithBinders.option_must", + "Pulse.Checker.AssertWithBinders.open_binders", 1, 2, 1, - [ "@query", "lemma_FStar.Pervasives.invertOption" ], + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "data_elim_Pulse.Syntax.Base.Mkbinder", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", + "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Prims.list", + "fuel_guarded_inversion_Pulse.Syntax.Base.binder", + "fuel_guarded_inversion_Pulse.Syntax.Base.ppname", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "function_token_typing_Prims.__cache_version_number__", + "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Map.lemma_InDomUpd2", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.push_binding_as_map", + "lemma_Pulse.Typing.Env.push_env_as_map", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "proj_equation_Pulse.Syntax.Base.Mkbinder_binder_ppname", + "proj_equation_Pulse.Syntax.Base.Mkbinder_binder_ty", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_26aa72c2bdd0719b051857cb081974bb", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", + "typing_FStar.Map.contains", "typing_FStar.Reflection.V2.Data.var", + "typing_FStar.Set.empty", "typing_FStar.Set.intersect", + "typing_FStar.Set.mem", + "typing_Pulse.Syntax.Base.__proj__Mkbinder__item__binder_ppname", + "typing_Pulse.Syntax.Base.__proj__Mkbinder__item__binder_ty", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fstar_env" + ], + 0, + "a0c40b167498c1b0be38918dff6b69a2" + ], + [ + "Pulse.Checker.AssertWithBinders.close_binders", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "primitive_Prims.op_Addition", + "projection_inverse_BoxInt_proj_0", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2" + ], 0, - "663a5565c67860294df450b8f54eb1d4" + "2305d1a044848b712fef3ffa7f85d3f8" ], [ "Pulse.Checker.AssertWithBinders.unfold_defs", @@ -110,12 +165,18 @@ [ "@MaxIFuel_assumption", "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "constructor_distinct_FStar.Pervasives.Native.None", + "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_FStar.Tactics.Result.Failed", "constructor_distinct_FStar.Tactics.Result.Success", "equation_Prims.eqtype", "equation_Pulse.Syntax.Base.range_singleton_trigger", "fuel_guarded_inversion_FStar.Tactics.Result.__result", "function_token_typing_Prims.string", "kinding_Prims.list@tok", "lemma_FStar.Pervasives.invertOption", + "projection_inverse_FStar.Tactics.Result.Failed_a", + "projection_inverse_FStar.Tactics.Result.Failed_exn", + "projection_inverse_FStar.Tactics.Result.Failed_ps", "projection_inverse_FStar.Tactics.Result.Success_a", "projection_inverse_FStar.Tactics.Result.Success_ps", "projection_inverse_FStar.Tactics.Result.Success_v", @@ -123,23 +184,7 @@ "string_typing" ], 0, - "563df79c374388df7a22f694bc7a6bdc" - ], - [ - "Pulse.Checker.AssertWithBinders.prepare_goal", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.ASSERT", - "disc_equation_Pulse.Syntax.Base.FOLD", - "disc_equation_Pulse.Syntax.Base.UNFOLD", - "fuel_guarded_inversion_Pulse.Syntax.Base.proof_hint_type", - "projection_inverse_BoxBool_proj_0" - ], - 0, - "d06fd7cf73b86250fda59337fcdc3da6" + "f09e54dd66c1f55c55a09afb285920cb" ], [ "Pulse.Checker.AssertWithBinders.check_unfoldable", @@ -148,16 +193,10 @@ 1, [ "@MaxIFuel_assumption", "@query", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "disc_equation_Pulse.Syntax.Base.ASSERT", - "disc_equation_Pulse.Syntax.Base.FOLD", - "disc_equation_Pulse.Syntax.Base.UNFOLD", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.proof_hint_type", - "projection_inverse_BoxBool_proj_0", "string_typing" + "fuel_guarded_inversion_FStar.Tactics.Result.__result" ], 0, - "a941387bddaae0c5a024ef8d0a981ce1" + "035ce47bec49f3e7d88116de51a6164a" ], [ "Pulse.Checker.AssertWithBinders.check", @@ -165,10 +204,7 @@ 2, 1, [ - "@MaxIFuel_assumption", "@query", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "Pulse.Syntax.Base_pretyping_01e6cbbfeab3ba416b144f2c9223a2d4", - "Pulse.Syntax.Base_pretyping_fa5c7efe36c086579ecac559fdac8c1f", + "@MaxIFuel_assumption", "@query", "bool_inversion", "constructor_distinct_FStar.Pervasives.Native.Some", "constructor_distinct_FStar.Reflection.V2.Data.Tv_FVar", "constructor_distinct_FStar.Reflection.V2.Data.Tv_Unknown", @@ -177,29 +213,45 @@ "constructor_distinct_Pulse.Syntax.Base.ASSERT", "constructor_distinct_Pulse.Syntax.Base.Tm_ProofHintWithBinders", "constructor_distinct_Pulse.Syntax.Base.UNFOLD", - "data_elim_Pulse.Syntax.Base.Mkst_term", + "data_elim_FStar.Pervasives.Native.Some", "data_typing_intro_FStar.Reflection.V2.Data.Tv_FVar@tok", - "data_typing_intro_Prims.Cons@tok", - "data_typing_intro_Prims.Nil@tok", "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_FStar.Pervasives.Native.Some", "disc_equation_Pulse.Syntax.Base.ASSERT", "disc_equation_Pulse.Syntax.Base.FOLD", "disc_equation_Pulse.Syntax.Base.Tm_ProofHintWithBinders", "disc_equation_Pulse.Syntax.Base.UNFOLD", "equality_tok_FStar.Reflection.V2.Data.Tv_Unknown@tok", "equation_FStar.Reflection.Const.unit_lid", - "equation_FStar.Reflection.Types.name", "equation_FStar.Reflection.Typing.fstar_top_env", - "equation_FStar.Reflection.Typing.unit_fv", "equation_Prims.eqtype", - "equation_Pulse.Checker.Inference.solution", + "equation_FStar.Reflection.Typing.unit_fv", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Checker.Base.checker_res_matches_post_hint", + "equation_Pulse.Checker.Base.checker_result_inv", "equation_Pulse.Syntax.Base.not_tv_unknown", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.post_hint_for_env_p", + "equation_Pulse.Typing.post_hint_opt", + "fuel_guarded_inversion_FStar.Pervasives.Native.option", "fuel_guarded_inversion_FStar.Tactics.Result.__result", "fuel_guarded_inversion_Pulse.Syntax.Base.proof_hint_type", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "function_token_typing_Prims.__cache_version_number__", - "function_token_typing_Prims.string", "int_inversion", + "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", + "kinding_Pulse.Typing.post_hint_t@tok", + "lemma_FStar.Pervasives.invertOption", "lemma_FStar.Reflection.Typing.inspect_pack", - "proj_equation_Pulse.Syntax.Base.Mkst_term_term", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.env_extends_trans", + "lemma_Pulse.Typing.Env.mk_env_dom", "primitive_Prims.op_AmpAmp", + "proj_equation_FStar.Pervasives.Native.Some_v", + "proj_equation_Prims.Mkdtuple2__1", + "proj_equation_Pulse.Typing.Mkpost_hint_t_g", "projection_inverse_BoxBool_proj_0", "projection_inverse_FStar.Tactics.Result.Failed_a", "projection_inverse_FStar.Tactics.Result.Failed_exn", @@ -208,15 +260,26 @@ "projection_inverse_FStar.Tactics.Result.Success_ps", "projection_inverse_FStar.Tactics.Result.Success_v", "projection_inverse_Pulse.Syntax.Base.Tm_ProofHintWithBinders__0", + "refinement_interpretation_Tm_refine_22829e142fee025de3f65b2dd8597285", "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_7ad5682d990eaec6510764d663af54de", + "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", "refinement_interpretation_Tm_refine_bf49085558242af8c310020a9c32bdc7", - "string_typing", "typing_FStar.Reflection.Typing.unit_fv", - "typing_FStar.Reflection.V2.Builtins.pack_fv", - "typing_Pulse.Typing.Env.fstar_env" + "refinement_interpretation_Tm_refine_c368f222d3b510422f50624ef34643bf", + "refinement_interpretation_Tm_refine_dd3396f06b5a01f3df9ed905e57d2aab", + "refinement_interpretation_Tm_refine_eed994d15518279ab75d745192d0d368", + "string_typing", "typing_FStar.Map.domain", + "typing_FStar.Reflection.Typing.unit_fv", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__range", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.push_context", + "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g" ], 0, - "1aa1feaae11156bd4a42091a32193dc6" + "c6f591576fce77169b45becce2f77642" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.AssertWithBinders.fsti b/lib/steel/pulse/Pulse.Checker.AssertWithBinders.fsti index 94051d784..5666efc45 100644 --- a/lib/steel/pulse/Pulse.Checker.AssertWithBinders.fsti +++ b/lib/steel/pulse/Pulse.Checker.AssertWithBinders.fsti @@ -4,14 +4,15 @@ module T = FStar.Tactics.V2 open Pulse.Syntax open Pulse.Typing -open Pulse.Checker.Common - +open Pulse.Checker.Base val check (g:env) - (st:st_term{Tm_ProofHintWithBinders? st.term}) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) + (res_ppname:ppname) + (st:st_term { Tm_ProofHintWithBinders? st.term }) (check:check_t) - : T.Tac (checker_result_t g pre post_hint) \ No newline at end of file + : T.Tac (checker_result_t g pre post_hint) + diff --git a/lib/steel/pulse/Pulse.Checker.AssertWithBinders.fsti.hints b/lib/steel/pulse/Pulse.Checker.AssertWithBinders.fsti.hints index ce3405fa4..060b3e4e7 100644 --- a/lib/steel/pulse/Pulse.Checker.AssertWithBinders.fsti.hints +++ b/lib/steel/pulse/Pulse.Checker.AssertWithBinders.fsti.hints @@ -1 +1 @@ -[ "\u0001/t =LBr", [] ] \ No newline at end of file +[ ",rf5\u0017H\u0010,K", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Base.fst b/lib/steel/pulse/Pulse.Checker.Base.fst new file mode 100644 index 000000000..83ed9e62e --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Base.fst @@ -0,0 +1,438 @@ +module Pulse.Checker.Base + +module T = FStar.Tactics.V2 +module RT = FStar.Reflection.Typing +module Metatheory = Pulse.Typing.Metatheory +module CP = Pulse.Checker.Pure +module RU = Pulse.RuntimeUtils +module FV = Pulse.Typing.FV +module P = Pulse.Syntax.Printer + +open Pulse.Typing.Combinators + +let format_failed_goal (g:env) (ctxt:list term) (goal:list term) = + let terms_to_strings (ts:list term)= T.map Pulse.Syntax.Printer.term_to_string ts in + let numbered_list ss = + let _, s = T.fold_left (fun (i, acc) s -> (i+1, Printf.sprintf "%d. %s" i s :: acc)) (1, []) ss in + String.concat "\n " (List.rev s) + in + let format_terms (ts:list term) = numbered_list (terms_to_strings ts) in + Printf.sprintf + "Failed to prove the following goals:\n \ + %s\n\ + The remaining conjuncts in the separation logic context available for use are:\n \ + %s\n\ + The typing context is:\n \ + %s\n" + (format_terms goal) + (format_terms ctxt) + (env_to_string g) + + +let mk_arrow ty t = RT.mk_arrow (elab_term ty) T.Q_Explicit (elab_term t) +let mk_abs ty t = RT.(mk_abs (elab_term ty) T.Q_Explicit (elab_term t)) + +let post_typing_as_abstraction + (#g:env) (#x:var) (#ty:term) (#t:term { fresh_wrt x g (freevars t) }) + (_:tot_typing (push_binding g x ppname_default ty) (open_term t x) tm_vprop) + : FStar.Ghost.erased (RT.tot_typing (elab_env g) (mk_abs ty t) (mk_arrow ty tm_vprop)) + = admit() + +let intro_post_hint g ctag_opt ret_ty_opt post = + let x = fresh g in + let ret_ty = + match ret_ty_opt with + | None -> tm_fstar RT.unit_ty FStar.Range.range_0 + | Some t -> t + in + let ret_ty, _ = CP.instantiate_term_implicits g ret_ty in + let (| u, ty_typing |) = CP.check_universe g ret_ty in + let (| post, post_typing |) = CP.check_vprop (push_binding g x ppname_default ret_ty) (open_term_nv post (v_as_nv x)) in + let post' = close_term post x in + Pulse.Typing.FV.freevars_close_term post x 0; + assume (open_term post' x == post); + { g; ctag_hint=ctag_opt; ret_ty; u; ty_typing; post=post'; post_typing=post_typing_as_abstraction #_ #_ #_ #post' post_typing } + +let post_hint_from_comp_typing #g #c ct = + let st_comp_typing = Metatheory.comp_typing_inversion ct in + let (| ty_typing, pre_typing, x, post_typing |) = Metatheory.st_comp_typing_inversion st_comp_typing in + let p : post_hint_t = + { g; + ctag_hint = Some (ctag_of_comp_st c); + ret_ty = comp_res c; u=comp_u c; + ty_typing=ty_typing; + post=comp_post c; + post_typing=post_typing_as_abstraction post_typing } + in + p + +let k_elab_unit (g:env) (ctxt:term) + : continuation_elaborator g ctxt g ctxt + = fun p r -> r + +let k_elab_trans + (#g0:env) (#g1:env { g1 `env_extends` g0 }) (#g2:env { g2 `env_extends` g1 }) (#ctxt0 #ctxt1 #ctxt2:term) + (k0:continuation_elaborator g0 ctxt0 g1 ctxt1) + (k1:continuation_elaborator g1 ctxt1 g2 ctxt2 { g1 `env_extends` g0}) + : continuation_elaborator g0 ctxt0 g2 ctxt2 + = fun post_hint res -> k0 post_hint (k1 post_hint res) + +let comp_st_with_post (c:comp_st) (post:term) + : c':comp_st { st_comp_of_comp c' == ({ st_comp_of_comp c with post} <: st_comp) } = + match c with + | C_ST st -> C_ST { st with post } + | C_STGhost i st -> C_STGhost i { st with post } + | C_STAtomic i st -> C_STAtomic i {st with post} + +let ve_unit_r g (p:term) : vprop_equiv g (tm_star p tm_emp) p = + VE_Trans _ _ _ _ (VE_Comm _ _ _) (VE_Unit _ _) + +let st_equiv_post (#g:env) (#t:st_term) (#c:comp_st) (d:st_typing g t c) + (post:term { freevars post `Set.subset` freevars (comp_post c)}) + (veq: (x:var { fresh_wrt x g (freevars (comp_post c)) } -> + vprop_equiv (push_binding g x ppname_default (comp_res c)) + (open_term (comp_post c) x) + (open_term post x))) + : st_typing g t (comp_st_with_post c post) + = let c' = comp_st_with_post c post in + let (| u_of, pre_typing, x, post_typing |) = Metatheory.(st_comp_typing_inversion (comp_typing_inversion (st_typing_correctness d))) in + let veq = veq x in + let st_equiv : st_equiv g c c' = + ST_VPropEquiv g c c' x pre_typing u_of post_typing (VE_Refl _ _) veq + in + T_Equiv _ _ _ _ d st_equiv + +let simplify_post (#g:env) (#t:st_term) (#c:comp_st) (d:st_typing g t c) + (post:term { comp_post c == tm_star post tm_emp}) + : st_typing g t (comp_st_with_post c post) + = st_equiv_post d post (fun x -> ve_unit_r (push_binding g x ppname_default (comp_res c)) (open_term post x)) + +let simplify_lemma (c:comp_st) (c':comp_st) (post_hint:option post_hint_t) + : Lemma + (requires + comp_post_matches_hint c post_hint /\ + comp_res c' == comp_res c /\ + comp_u c' == comp_u c /\ + comp_post c' == tm_star (comp_post c) tm_emp) + (ensures comp_post_matches_hint (comp_st_with_post c' (comp_post c)) post_hint /\ + comp_pre (comp_st_with_post c' (comp_post c)) == comp_pre c') + = () + +let vprop_equiv_typing_bk (#g:env) (#ctxt:_) (ctxt_typing:tot_typing g ctxt tm_vprop) + (#p:_) (d:vprop_equiv g p ctxt) + : tot_typing g p tm_vprop + = let _, bk = vprop_equiv_typing d in + bk ctxt_typing + + +#push-options "--z3rlimit_factor 4 --ifuel 1 --fuel 0" +let k_elab_equiv_continutation (#g1:env) (#g2:env { g2 `env_extends` g1 }) (#ctxt #ctxt1 #ctxt2:term) + (k:continuation_elaborator g1 ctxt g2 ctxt1) + (d:vprop_equiv g2 ctxt1 ctxt2) + : continuation_elaborator g1 ctxt g2 ctxt2 = + fun post_hint res -> + let framing_token : frame_for_req_in_ctxt g2 ctxt1 ctxt2 = + let d : vprop_equiv g2 (tm_star ctxt2 tm_emp) ctxt1 = + VE_Trans _ _ _ _ (VE_Comm _ _ _) (VE_Trans _ _ _ _ (VE_Unit _ _) (VE_Sym _ _ _ d)) in + (| tm_emp, emp_typing, d |) + in + let (| st, c, st_d |) = res in + let (| _, pre_typing, _, _ |) = + Metatheory.(st_comp_typing_inversion (comp_typing_inversion (st_typing_correctness st_d))) in + let (| c', st_d' |) = + apply_frame (vprop_equiv_typing_bk pre_typing d) st_d framing_token in + assert (comp_post c' == tm_star (comp_post c) tm_emp); + let st_d' = simplify_post st_d' (comp_post c) in + k post_hint (| st, _, st_d' |) +#pop-options + +let vprop_equiv_typing_fwd (#g:env) (#ctxt:_) (ctxt_typing:tot_typing g ctxt tm_vprop) + (#p:_) (d:vprop_equiv g ctxt p) + : tot_typing g p tm_vprop + = let fwd, _ = vprop_equiv_typing d in + fwd ctxt_typing + +#push-options "--z3rlimit_factor 4 --ifuel 1 --fuel 0" +let k_elab_equiv_prefix + (#g1:env) (#g2:env { g2 `env_extends` g1 }) (#ctxt1 #ctxt2 #ctxt:term) + (k:continuation_elaborator g1 ctxt1 g2 ctxt) + (d:vprop_equiv g1 ctxt1 ctxt2) + : continuation_elaborator g1 ctxt2 g2 ctxt = + fun post_hint res -> + let framing_token : frame_for_req_in_ctxt g1 ctxt2 ctxt1 = + let d = VE_Trans _ _ _ _ (VE_Comm _ _ _) (VE_Trans _ _ _ _ (VE_Unit _ _) d) in + (| tm_emp, emp_typing, d |) + in + let res = k post_hint res in + let (| st, c, st_d |) = res in + let (| _, pre_typing, _, _ |) = + Metatheory.(st_comp_typing_inversion (comp_typing_inversion (st_typing_correctness st_d))) in + let (| c', st_d' |) = + apply_frame + (vprop_equiv_typing_fwd pre_typing d) + st_d + framing_token in + simplify_lemma c c' post_hint; + let c'' = comp_st_with_post c' (comp_post c) in + let st_d' : st_typing g1 st c'' = simplify_post st_d' (comp_post c) in + let res : st_typing_in_ctxt g1 ctxt2 post_hint = (| st, c'', st_d' |) in + res +#pop-options + +let k_elab_equiv + (#g1:env) (#g2:env { g2 `env_extends` g1 }) (#ctxt1 #ctxt1' #ctxt2 #ctxt2':term) + (k:continuation_elaborator g1 ctxt1 g2 ctxt2) + (d1:vprop_equiv g1 ctxt1 ctxt1') + (d2:vprop_equiv g2 ctxt2 ctxt2') + : continuation_elaborator g1 ctxt1' g2 ctxt2' = + + let k : continuation_elaborator g1 ctxt1 g2 ctxt2' = + k_elab_equiv_continutation k d2 in + let k : continuation_elaborator g1 ctxt1' g2 ctxt2' = + k_elab_equiv_prefix k d1 in + k + +#push-options "--query_stats --fuel 2 --ifuel 2 --split_queries no --z3rlimit_factor 20" +let continuation_elaborator_with_bind (#g:env) (ctxt:term) + (#c1:comp{stateful_comp c1}) + (#e1:st_term) + (e1_typing:st_typing g e1 c1) + (ctxt_pre1_typing:tot_typing g (tm_star ctxt (comp_pre c1)) tm_vprop) + (x:nvar { None? (lookup g (snd x)) }) + : T.Tac (continuation_elaborator + g + (tm_star ctxt (comp_pre c1)) + (push_binding g (snd x) (fst x) (comp_res c1)) + (tm_star (open_term (comp_post c1) (snd x)) ctxt)) = + + let pre1 = comp_pre c1 in + let res1 = comp_res c1 in + let post1 = comp_post c1 in + let ctxt_typing = star_typing_inversion_l ctxt_pre1_typing in + // let p_prop = Metatheory.pure_typing_inversion pure_typing in + let v_eq = VE_Comm g ctxt pre1 in + let framing_token : frame_for_req_in_ctxt g (tm_star ctxt pre1) pre1 = + (| ctxt, ctxt_typing, VE_Comm g pre1 ctxt |) + in + let (| c1, e1_typing |) = + apply_frame ctxt_pre1_typing e1_typing framing_token in + let (| u_of_1, pre_typing, _, _ |) = + Metatheory.(st_comp_typing_inversion (comp_typing_inversion (st_typing_correctness e1_typing))) in + let b = res1 in + let ppname, x = x in + let g' = push_binding g x ppname b in + + let post1_opened = open_term_nv post1 (v_as_nv x) in + let k : continuation_elaborator g (tm_star ctxt pre1) g' (tm_star post1_opened ctxt) = + fun post_hint res -> + let (| e2, c2, e2_typing |) = res in + let e2_typing : st_typing g' e2 c2 = e2_typing in + let e2_closed = close_st_term e2 x in + assume (open_st_term e2_closed x == e2); + assert (comp_pre c1 == (tm_star ctxt pre1)); + assert (comp_post c1 == tm_star post1 ctxt); + assert (comp_pre c2 == tm_star post1_opened ctxt); + assert (open_term (comp_post c1) x == tm_star post1_opened (open_term ctxt x)); + // ctxt is well-typed, hence ln + assume (open_term ctxt x == ctxt); + assert (open_term (comp_post c1) x == comp_pre c2); + // we closed e2 with x + assume (~ (x `Set.mem` freevars_st e2_closed)); + if x `Set.mem` freevars (comp_post c2) + then fail g' None "Impossible: freevar clash when constructing continuation elaborator for bind, please file a bug-report" + else ( + let t_typing, post_typing = + Pulse.Typing.Combinators.bind_res_and_post_typing g (st_comp_of_comp c2) x post_hint in + let (| e, c, e_typing |) = + Pulse.Typing.Combinators.mk_bind + g (tm_star ctxt pre1) + e1 e2_closed c1 c2 (ppname, x) e1_typing + u_of_1 + e2_typing + t_typing + post_typing + in + (| e, c, e_typing |) + ) + in + k +#pop-options + +module LN = Pulse.Typing.LN +#push-options "--z3rlimit_factor 4 --fuel 1 --ifuel 1" +let continuation_elaborator_with_tot_bind (#g:env) (#ctxt:term) + (ctxt_typing:tot_typing g ctxt tm_vprop) + (#e1:term) + (#t1:term) + (e1_typing:tot_typing g e1 t1) + (x:nvar { None? (lookup g (snd x)) }) + : T.Tac (continuation_elaborator + g ctxt + (push_binding g (snd x) (fst x) t1) ctxt) = + + assert ((push_binding g (snd x) (fst x) t1) `env_extends` g); + fun post_hint (| e2, c2, d2 |) -> + let ppname, x = x in + let e2_closed = close_st_term e2 x in + assume (open_st_term (close_st_term e2 x) x == e2); + + let e = wr (Tm_TotBind {head=e1;body=e2_closed}) in + let c = open_comp_with (close_comp c2 x) e1 in + // we just closed + assume (~ (x `Set.mem` freevars_st e2_closed)); + let d : st_typing g e c = + T_TotBind g e1 e2_closed t1 c2 x e1_typing d2 in + + let _ = + match post_hint with + | None -> () + | Some post_hint -> + // + // The post_hint is well-typed in g + // so it should not have x free + // + // c2 matches post hint, so it should also not have x free + // so closing with x, and opening with e1 should be identity + // + assume (comp_post c == comp_post c2 /\ + comp_res c == comp_res c2 /\ + comp_u c == comp_u c2) in + + FV.tot_typing_freevars ctxt_typing; + close_with_non_freevar ctxt x 0; + LN.tot_typing_ln ctxt_typing; + open_with_gt_ln ctxt (-1) e1 0; + + (| e, c, d |) + +let rec check_equiv_emp (g:env) (vp:term) + : option (vprop_equiv g vp tm_emp) + = match vp.t with + | Tm_Emp -> Some (VE_Refl _ _) + | Tm_Star vp1 vp2 -> + (match check_equiv_emp g vp1, check_equiv_emp g vp2 with + | Some d1, Some d2 -> + let d3 : vprop_equiv g (tm_star vp1 vp2) (tm_star tm_emp tm_emp) + = VE_Ctxt _ _ _ _ _ d1 d2 in + let d4 : vprop_equiv g (tm_star tm_emp tm_emp) tm_emp = + VE_Unit _ _ in + Some (VE_Trans _ _ _ _ d3 d4) + | _, _ -> None) + | _ -> None + +let intro_comp_typing (g:env) + (c:comp_st) + (pre_typing:tot_typing g (comp_pre c) tm_vprop) + (res_typing:universe_of g (comp_res c) (comp_u c)) + (x:var { fresh_wrt x g (freevars (comp_post c)) }) + (post_typing:tot_typing (push_binding g x ppname_default (comp_res c)) (open_term (comp_post c) x) tm_vprop) + : T.Tac (comp_typing g c (comp_u c)) + = let intro_st_comp_typing (st:st_comp { comp_u c == st.u /\ + comp_pre c == st.pre /\ + comp_res c == st.res /\ + comp_post c == st.post } ) + : T.Tac (st_comp_typing g st) + = STC g st x res_typing pre_typing post_typing + in + match c with + | C_ST st -> + let stc = intro_st_comp_typing st in + CT_ST _ _ stc + | C_STAtomic i st -> + let stc = intro_st_comp_typing st in + let (| ty, i_typing |) = CP.core_check_term g i in + if not (eq_tm ty tm_inames) + then fail g None (Printf.sprintf "ill-typed inames term %s" (P.term_to_string i)) + else CT_STAtomic _ _ _ (E i_typing) stc + | C_STGhost i st -> + let stc = intro_st_comp_typing st in + let (| ty, i_typing |) = CP.core_check_term g i in + if not (eq_tm ty tm_inames) + then fail g None (Printf.sprintf "ill-typed inames term %s" (P.term_to_string i)) + else CT_STGhost _ _ _ (E i_typing) stc + +let return_in_ctxt (g:env) (y:var) (y_ppname:ppname) (u:universe) (ty:term) (ctxt:vprop) + (ty_typing:universe_of g ty u) + (post_hint0:post_hint_opt g { Some? post_hint0 /\ checker_res_matches_post_hint g post_hint0 y ty ctxt}) + + : Pure (st_typing_in_ctxt g ctxt post_hint0) + (requires lookup g y == Some ty) + (ensures fun _ -> True) = + + let Some post_hint = post_hint0 in + + let x = fresh g in + assume (~ (x `Set.mem` freevars post_hint.post)); + let ctag = + match post_hint.ctag_hint with + | None -> STT + | Some ctag -> ctag in + let y_tm = tm_var {nm_index=y;nm_ppname=y_ppname} in + let d = T_Return g ctag false u ty y_tm post_hint.post x ty_typing + (magic ()) // that null_var y is well typed at ty in g, we know since lookup g y == Some ty + (magic ()) // typing of (open post x) in (g, x) ... post_hint is well-typed, so should get + in + let t = wr (Tm_Return {ctag=ctag;insert_eq=false;term=y_tm}) in + let c = comp_return ctag false u ty y_tm post_hint.post x in + let d : st_typing g t c = d in + + let _ :squash (comp_pre c == ctxt /\ comp_post_matches_hint c (Some post_hint)) = + match post_hint0 with + | Some post_hint -> + // this u should follow from equality of t + assume (comp_u c == post_hint.u) in + + (| _, _, d |) + +let apply_checker_result_k (#g:env) (#ctxt:vprop) (#post_hint:post_hint_for_env g) + (r:checker_result_t g ctxt (Some post_hint)) + (res_ppname:ppname) + : T.Tac (st_typing_in_ctxt g ctxt (Some post_hint)) = + + // TODO: FIXME add to checker result type? + let (| y, g1, (| u_ty, ty_y, d_ty_y |), (| pre', _ |), k |) = r in + + let (| u_ty_y, d_ty_y |) = Pulse.Checker.Pure.check_universe g1 ty_y in + + let d : st_typing_in_ctxt g1 pre' (Some post_hint) = + return_in_ctxt g1 y res_ppname u_ty_y ty_y pre' d_ty_y (Some post_hint) in + + k (Some post_hint) d + +#push-options "--z3rlimit_factor 2 --fuel 0 --ifuel 1" +let checker_result_for_st_typing (#g:env) (#ctxt:vprop) (#post_hint:post_hint_opt g) + (d:st_typing_in_ctxt g ctxt post_hint) + (ppname:ppname) + : T.Tac (checker_result_t g ctxt post_hint) = + + let (| t, c, d |) = d in + + let x = fresh g in + + let g' = push_binding g x ppname (comp_res c) in + let ctxt' = open_term_nv (comp_post c) (ppname, x) in + let k + : continuation_elaborator + g (tm_star tm_emp (comp_pre c)) + g' (tm_star ctxt' tm_emp) = + continuation_elaborator_with_bind tm_emp d (magic ()) (ppname, x) in + let k + : continuation_elaborator g (comp_pre c) g' ctxt' = + k_elab_equiv k (magic ()) (magic ()) in + + let _ : squash (checker_res_matches_post_hint g post_hint x (comp_res c) ctxt') = + match post_hint with + | None -> () + | Some post_hint -> () in + + assert (g' `env_extends` g); + + let comp_res_typing, _, f = + Metatheory.(st_comp_typing_inversion_cofinite (comp_typing_inversion (st_typing_correctness d))) in + + // magic is the typing of comp_res in g' + // weaken comp_res_typing + + assume (~ (x `Set.mem` freevars (comp_post c))); + (| x, g', (| comp_u c, comp_res c, magic () |), (| ctxt', f x |), k |) +#pop-options diff --git a/lib/steel/pulse/Pulse.Checker.Base.fst.hints b/lib/steel/pulse/Pulse.Checker.Base.fst.hints new file mode 100644 index 000000000..87c12cbba --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Base.fst.hints @@ -0,0 +1,1509 @@ +[ + "\u0017`>\u001f-P", + [ + [ + "Pulse.Checker.Base.format_failed_goal", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "string_typing" + ], + 0, + "7b55850046123a505cc420fbef018e09" + ], + [ + "Pulse.Checker.Base.post_typing_as_abstraction", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "disc_equation_FStar.Pervasives.Native.None", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.fresh_wrt", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_d3a18586d45f1194501142180a9c9338", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "c9105a4a4da4eee9d951956c52c5460a" + ], + [ + "Pulse.Checker.Base.intro_post_hint", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "Pulse.Syntax.Base_pretyping_adc52787535d21bdc2731720d86e99a8", + "constructor_distinct_FStar.Pervasives.Native.None", + "constructor_distinct_FStar.Reflection.V2.Data.Tv_FVar", + "constructor_distinct_FStar.Reflection.V2.Data.Tv_Unknown", + "data_elim_Pulse.Syntax.Base.Mkterm", + "data_typing_intro_FStar.Reflection.V2.Data.Tv_FVar@tok", + "data_typing_intro_Pulse.Syntax.Base.STT_Atomic@tok", + "disc_equation_FStar.Pervasives.Native.None", + "equality_tok_FStar.Reflection.V2.Data.Tv_Unknown@tok", + "equation_FStar.Range.range", + "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_FStar.Reflection.Typing.unit_ty", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.not_tv_unknown", + "equation_Pulse.Syntax.Base.range", "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.universe", + "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Syntax.Naming.close_term", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.FV.set_minus", + "equation_Pulse.Typing.fresh_wrt", + "equation_Pulse.Typing.post_hint_for_env_p", + "fuel_guarded_inversion_FStar.Pervasives.Native.option", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_typing", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Pervasives.invertOption", + "lemma_FStar.Reflection.Typing.inspect_pack", + "lemma_FStar.Set.mem_complement", "lemma_FStar.Set.mem_intersect", + "lemma_FStar.Set.mem_singleton", + "lemma_Pulse.Syntax.Base.range_singleton", + "lemma_Pulse.Typing.Env.env_extends_refl", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_Equality", + "primitive_Prims.op_Negation", + "proj_equation_Pulse.Typing.Mkpost_hint_t_g", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.None_a", + "projection_inverse_Pulse.Typing.Mkpost_hint_t_g", + "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", + "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "typing_FStar.Reflection.Typing.unit_fv", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.complement", + "typing_FStar.Set.singleton", + "typing_Pulse.Syntax.Base.ppname_default", + "typing_Pulse.Syntax.Naming.freevars", + "typing_Pulse.Typing.Env.as_map", + "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.push_binding" + ], + 0, + "be2182d5a67d71f5ed497a7ba4666512" + ], + [ + "Pulse.Checker.Base.post_hint_from_comp_typing", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_Pulse.Syntax.Base.C_ST", + "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", + "constructor_distinct_Pulse.Syntax.Base.C_STGhost", + "constructor_distinct_Pulse.Syntax.Base.C_Tot", + "data_elim_FStar.Pervasives.Mkdtuple4", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.comp_post", + "equation_Pulse.Syntax.Base.comp_res", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.comp_u", + "equation_Pulse.Syntax.Base.st_comp_of_comp", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Syntax.Pure.tm_type", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.Metatheory.Base.comp_typing_u", + "equation_Pulse.Typing.fresh_wrt", + "equation_Pulse.Typing.post_hint_for_env_p", + "equation_Pulse.Typing.tot_typing", "equation_Pulse.Typing.typing", + "equation_Pulse.Typing.universe_of", + "fuel_guarded_inversion_FStar.Pervasives.dtuple4", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "fuel_guarded_inversion_Pulse.Typing.comp_typing", + "fuel_guarded_inversion_Pulse.Typing.my_erased", + "fuel_guarded_inversion_Pulse.Typing.st_comp_typing", + "interpretation_Tm_abs_c8631188b49e797b2c9232f71b480642", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_Pulse.Typing.Env.env_extends_refl", + "primitive_Prims.op_BarBar", + "proj_equation_Pulse.Typing.Mkpost_hint_t_g", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Mkdtuple4__1", + "projection_inverse_FStar.Pervasives.Mkdtuple4__3", + "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", + "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", + "projection_inverse_Pulse.Syntax.Base.C_ST__0", + "projection_inverse_Pulse.Syntax.Base.C_Tot__0", + "projection_inverse_Pulse.Typing.Mkpost_hint_t_g", + "refinement_interpretation_Tm_refine_2e7859babf6dc4b57292f015e044869d", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Metatheory.Base.st_comp_typing_inversion" + ], + 0, + "bb1b3a3bc195ade1e5e289848661c929" + ], + [ + "Pulse.Checker.Base.continuation_elaborator", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "equation_Pulse.Typing.post_hint_for_env_p", + "equation_Pulse.Typing.post_hint_opt", + "kinding_Pulse.Typing.post_hint_t@tok", + "lemma_FStar.Pervasives.invertOption", + "lemma_Pulse.Typing.Env.env_extends_trans", + "proj_equation_FStar.Pervasives.Native.Some_v", + "proj_equation_Pulse.Typing.Mkpost_hint_t_g", + "refinement_interpretation_Tm_refine_4d5241eb6fe198666a8101195bbd4a2a", + "refinement_interpretation_Tm_refine_7ad5682d990eaec6510764d663af54de", + "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", + "typing_FStar.Pervasives.Native.__proj__Some__item__v", + "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g" + ], + 0, + "3c4994ca809c789b05eca23ccaf9e899" + ], + [ + "Pulse.Checker.Base.k_elab_unit", + 1, + 2, + 1, + [ "@query", "lemma_Pulse.Typing.Env.env_extends_refl" ], + 0, + "7e18bf6d5420efa597b521b190050905" + ], + [ + "Pulse.Checker.Base.k_elab_unit", + 2, + 2, + 1, + [ "@query", "lemma_Pulse.Typing.Env.env_extends_refl" ], + 0, + "7d6b72a881b1b8eb6308b06b8e8bfd04" + ], + [ + "Pulse.Checker.Base.k_elab_trans", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "lemma_Pulse.Typing.Env.env_extends_trans", + "refinement_interpretation_Tm_refine_7ad5682d990eaec6510764d663af54de", + "refinement_interpretation_Tm_refine_f7041caef014e9018ca78d8e35b3e1ad" + ], + 0, + "7a7c4508118751f753bd1482c1deb8ac" + ], + [ + "Pulse.Checker.Base.k_elab_trans", + 2, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "data_elim_FStar.Pervasives.Native.Some", + "disc_equation_FStar.Pervasives.Native.Some", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.extends_with", + "equation_Pulse.Typing.post_hint_for_env_p", + "equation_Pulse.Typing.post_hint_opt", + "kinding_Pulse.Typing.post_hint_t@tok", + "lemma_FStar.Pervasives.invertOption", + "lemma_Pulse.Typing.Env.env_extends_trans", + "proj_equation_FStar.Pervasives.Native.Some_v", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_4d5241eb6fe198666a8101195bbd4a2a", + "refinement_interpretation_Tm_refine_7ad5682d990eaec6510764d663af54de", + "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", + "refinement_interpretation_Tm_refine_f7041caef014e9018ca78d8e35b3e1ad", + "typing_FStar.Pervasives.Native.__proj__Some__item__v", + "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g" + ], + 0, + "f604c6f15535e57d842ef45cb094d2f4" + ], + [ + "Pulse.Checker.Base.comp_st_with_post", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "constructor_distinct_Pulse.Syntax.Base.C_ST", + "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", + "constructor_distinct_Pulse.Syntax.Base.C_STGhost", + "data_elim_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.st_comp_of_comp", + "equation_Pulse.Syntax.Base.stateful_comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", + "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", + "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", + "projection_inverse_Pulse.Syntax.Base.C_ST__0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" + ], + 0, + "8be37ed4c061a011d8589b6582621322" + ], + [ + "Pulse.Checker.Base.st_equiv_post", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.fresh_wrt", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", "primitive_Prims.op_BarBar", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_fbeb4eb12902ab763889d17cad7e9920", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "c295c928c458d9a7b282e53af985a061" + ], + [ + "Pulse.Checker.Base.st_equiv_post", + 2, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "Pulse.Syntax.Base_pretyping_b015b044c5bf00a3dd3df9fa711c87dd", + "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_Pulse.Syntax.Base.C_ST", + "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", + "constructor_distinct_Pulse.Syntax.Base.C_STGhost", + "data_elim_FStar.Pervasives.Mkdtuple4", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_FStar.Pervasives.Native.snd", + "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.subset", + "equation_Prims.nat", + "equation_Pulse.Checker.Base.comp_st_with_post", + "equation_Pulse.Syntax.Base.comp_post", + "equation_Pulse.Syntax.Base.comp_pre", + "equation_Pulse.Syntax.Base.comp_res", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.comp_u", + "equation_Pulse.Syntax.Base.ppname_default", + "equation_Pulse.Syntax.Base.st_comp_of_comp", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Syntax.Naming.open_term", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.fresh_wrt", + "equation_Pulse.Typing.st_equiv_pre", + "equation_Pulse.Typing.universe_of", + "fuel_guarded_inversion_FStar.Pervasives.dtuple4", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "fuel_guarded_inversion_Pulse.Typing.st_comp_typing", + "interpretation_Tm_abs_9627aa63c90056f8b614da4dfb4d20bf", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", "primitive_Prims.op_BarBar", + "proj_equation_FStar.Pervasives.Native.Mktuple2__2", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_u", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Mkdtuple4__3", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", + "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", + "projection_inverse_Pulse.Syntax.Base.C_ST__0", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_res", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_u", + "refinement_interpretation_Tm_refine_2e7859babf6dc4b57292f015e044869d", + "refinement_interpretation_Tm_refine_36441f5163bf4613efd69bece0701f67", + "refinement_interpretation_Tm_refine_6262a74a3e7906640b3d8d4146589509", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "typing_FStar.Map.contains", "typing_FStar.Reflection.V2.Data.var", + "typing_FStar.Set.mem", "typing_Pulse.Syntax.Base.stateful_comp", + "typing_Pulse.Syntax.Base.uu___is_C_Tot", + "typing_Pulse.Syntax.Naming.freevars", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Metatheory.Base.comp_typing_inversion", + "typing_Pulse.Typing.Metatheory.Base.st_typing_correctness" + ], + 0, + "c374d83917f9bf663aa69365963013f6" + ], + [ + "Pulse.Checker.Base.simplify_post", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.stateful_comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" + ], + 0, + "a397b854a17ecfe0cdaf3a0350187aaa" + ], + [ + "Pulse.Checker.Base.simplify_post", + 2, + 2, + 1, + [ + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_Pulse.Syntax.Naming.freevars.fuel_instrumented", + "@fuel_correspondence_Pulse.Syntax.Naming.subst_term.fuel_instrumented", + "@fuel_irrelevance_Pulse.Syntax.Naming.freevars.fuel_instrumented", + "@fuel_irrelevance_Pulse.Syntax.Naming.subst_term.fuel_instrumented", + "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_Pulse.Syntax.Base.Tm_Emp", + "constructor_distinct_Pulse.Syntax.Base.Tm_Star", + "data_typing_intro_Prims.Cons@tok", + "data_typing_intro_Prims.Nil@tok", + "data_typing_intro_Pulse.Syntax.Naming.DT@tok", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equality_tok_Pulse.Syntax.Base.Tm_Emp@tok", + "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.subset", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.index", + "equation_Pulse.Syntax.Base.range", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.tm_emp", + "equation_Pulse.Syntax.Base.tm_star", + "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.v_as_nv", + "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", + "equation_Pulse.Syntax.Base.with_range", + "equation_Pulse.Syntax.Naming.open_term", + "equation_Pulse.Syntax.Naming.open_term_", + "equation_Pulse.Syntax.Naming.open_term_nv", + "equation_Pulse.Syntax.Naming.subst", + "equation_Pulse.Syntax.Pure.term_of_nvar", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.fresh_wrt", + "equation_with_fuel_Pulse.Syntax.Naming.freevars.fuel_instrumented", + "equation_with_fuel_Pulse.Syntax.Naming.subst_term.fuel_instrumented", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", "int_inversion", + "int_typing", "kinding_Pulse.Syntax.Base.term@tok", + "kinding_Pulse.Syntax.Naming.subst_elt@tok", + "lemma_FStar.Map.lemma_ContainsDom", "lemma_FStar.Set.mem_union", + "lemma_Pulse.Syntax.Base.range_singleton", + "primitive_Prims.op_BarBar", + "proj_equation_Pulse.Syntax.Base.Mkterm_range", + "proj_equation_Pulse.Syntax.Base.Mkterm_t", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_Pulse.Syntax.Base.Mkterm_range", + "projection_inverse_Pulse.Syntax.Base.Mkterm_t", + "projection_inverse_Pulse.Syntax.Base.Tm_Star_l", + "projection_inverse_Pulse.Syntax.Base.Tm_Star_r", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "refinement_interpretation_Tm_refine_ae82812843756c5d6a3ba807e638b88e", + "refinement_interpretation_Tm_refine_fbeb4eb12902ab763889d17cad7e9920", + "token_correspondence_Pulse.Syntax.Naming.freevars.fuel_instrumented", + "typing_FStar.Map.contains", "typing_FStar.Reflection.V2.Data.var", + "typing_FStar.Set.mem", + "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", + "typing_Pulse.Syntax.Base.tm_emp", + "typing_Pulse.Syntax.Base.tm_star", + "typing_Pulse.Syntax.Base.uu___is_C_Tot", + "typing_Pulse.Syntax.Base.v_as_nv", + "typing_Pulse.Syntax.Naming.freevars", + "typing_Pulse.Syntax.Naming.open_term_nv", + "typing_Pulse.Syntax.Pure.term_of_nvar", + "typing_Pulse.Typing.Env.as_map" + ], + 0, + "63f905d1c353a68fc1a7c2db32549ef0" + ], + [ + "Pulse.Checker.Base.simplify_lemma", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "constructor_distinct_Pulse.Syntax.Base.C_ST", + "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", + "constructor_distinct_Pulse.Syntax.Base.C_STGhost", + "data_elim_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_Pulse.Checker.Base.comp_st_with_post", + "equation_Pulse.Syntax.Base.comp_post", + "equation_Pulse.Syntax.Base.comp_pre", + "equation_Pulse.Syntax.Base.comp_res", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.comp_u", + "equation_Pulse.Syntax.Base.st_comp_of_comp", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.vprop", + "equation_Pulse.Typing.comp_post_matches_hint", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "primitive_Prims.op_BarBar", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_u", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", + "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", + "projection_inverse_Pulse.Syntax.Base.C_ST__0", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_res", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_u", + "refinement_interpretation_Tm_refine_2e82c3c6739f8d96977de8e1ca87d07c", + "refinement_interpretation_Tm_refine_36441f5163bf4613efd69bece0701f67", + "refinement_interpretation_Tm_refine_385f59c31213d29cc308b93df5d99dc9", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "typing_Pulse.Checker.Base.comp_st_with_post", + "typing_Pulse.Syntax.Base.comp_post" + ], + 0, + "0c262e986434b2716c74e0e80955fce8" + ], + [ + "Pulse.Checker.Base.k_elab_equiv_continutation", + 1, + 0, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_Pulse.Syntax.Base.C_ST", + "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", + "constructor_distinct_Pulse.Syntax.Base.C_STGhost", + "constructor_distinct_Pulse.Syntax.Base.C_Tot", + "data_elim_FStar.Pervasives.Mkdtuple3", + "data_elim_FStar.Pervasives.Native.Some", + "data_elim_Prims.Mkdtuple2", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_FStar.Pervasives.Native.Some", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "equation_Pulse.Checker.Base.comp_st_with_post", + "equation_Pulse.Syntax.Base.comp_post", + "equation_Pulse.Syntax.Base.comp_pre", + "equation_Pulse.Syntax.Base.comp_res", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.comp_u", + "equation_Pulse.Syntax.Base.st_comp_of_comp", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Syntax.Base.vprop", + "equation_Pulse.Typing.Combinators.frame_of", + "equation_Pulse.Typing.Combinators.st_typing_in_ctxt", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.extends_with", + "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.Metatheory.Base.comp_typing_u", + "equation_Pulse.Typing.comp_post_matches_hint", + "equation_Pulse.Typing.fresh_wrt", + "equation_Pulse.Typing.post_hint_for_env_p", + "equation_Pulse.Typing.post_hint_opt", + "fuel_guarded_inversion_FStar.Pervasives.dtuple3", + "fuel_guarded_inversion_Prims.dtuple2", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "fuel_guarded_inversion_Pulse.Typing.comp_typing", + "function_token_typing_Prims.__cache_version_number__", + "int_inversion", + "interpretation_Tm_abs_65bc593251765a404ad0a92141178dc4", + "kinding_Pulse.Syntax.Base.term@tok", + "kinding_Pulse.Typing.post_hint_t@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Pervasives.invertOption", + "lemma_Pulse.Typing.Env.env_extends_trans", + "lemma_Pulse.Typing.Env.push_env_as_map", + "primitive_Prims.op_BarBar", + "proj_equation_FStar.Pervasives.Native.Some_v", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_u", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Mkdtuple3__1", + "projection_inverse_FStar.Pervasives.Mkdtuple3__2", + "projection_inverse_Prims.Mkdtuple2__1", + "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", + "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", + "projection_inverse_Pulse.Syntax.Base.C_ST__0", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_res", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_u", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_2e7859babf6dc4b57292f015e044869d", + "refinement_interpretation_Tm_refine_36441f5163bf4613efd69bece0701f67", + "refinement_interpretation_Tm_refine_4d5241eb6fe198666a8101195bbd4a2a", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_7ad5682d990eaec6510764d663af54de", + "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", + "refinement_interpretation_Tm_refine_c7355034ace971446067b77921ef4ff0", + "refinement_interpretation_Tm_refine_e077dd511289100be3832fc884204872", + "typing_FStar.Pervasives.Native.__proj__Some__item__v", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", + "typing_Pulse.Checker.Base.comp_st_with_post", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Metatheory.Base.st_typing_correctness", + "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g" + ], + 0, + "a60acd755bbf6751357de00516d60569" + ], + [ + "Pulse.Checker.Base.k_elab_equiv_prefix", + 1, + 0, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.comp_pre", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.st_comp_of_comp", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Combinators.frame_of", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.extends_with", + "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.fresh_wrt", + "equation_Pulse.Typing.post_hint_for_env_p", + "equation_Pulse.Typing.post_hint_opt", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "fuel_guarded_inversion_Pulse.Typing.st_comp_typing", + "function_token_typing_Prims.__cache_version_number__", + "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", + "kinding_Pulse.Typing.post_hint_t@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Pervasives.invertOption", + "lemma_Pulse.Typing.Env.env_extends_trans", + "primitive_Prims.op_BarBar", + "proj_equation_FStar.Pervasives.Native.Some_v", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Mkdtuple3__1", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_2e7859babf6dc4b57292f015e044869d", + "refinement_interpretation_Tm_refine_4d5241eb6fe198666a8101195bbd4a2a", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_7ad5682d990eaec6510764d663af54de", + "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", + "refinement_interpretation_Tm_refine_e077dd511289100be3832fc884204872", + "refinement_interpretation_Tm_refine_e6b2fe059d644eadbc1b2088639b2786", + "typing_FStar.Pervasives.Native.__proj__Some__item__v", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Metatheory.Base.comp_typing_inversion", + "typing_Pulse.Typing.Metatheory.Base.st_typing_correctness", + "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g" + ], + 0, + "4a39bd4e359d91a1de1792a2ca5f4e39" + ], + [ + "Pulse.Checker.Base.continuation_elaborator_with_bind", + 1, + 2, + 2, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "disc_equation_FStar.Pervasives.Native.None", + "equation_FStar.Pervasives.Native.snd", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.nvar", "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.var", "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.lookup", + "fuel_guarded_inversion_FStar.Pervasives.Native.tuple2", + "kinding_Pulse.Syntax.Base.ppname@tok", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_Pulse.Typing.Env.env_extends_push", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_385f59c31213d29cc308b93df5d99dc9", + "refinement_interpretation_Tm_refine_42683f02c4ca4e60fa6e6c8a4bb2b246", + "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "typing_FStar.Map.contains", + "typing_FStar.Pervasives.Native.__proj__Mktuple2__item___2", + "typing_FStar.Pervasives.Native.fst", + "typing_FStar.Reflection.V2.Data.var", + "typing_Pulse.Syntax.Base.comp_res", "typing_Pulse.Typing.Env.as_map" + ], + 0, + "6aa71b89ef41bf8faf8dd2026d5ef8a0" + ], + [ + "Pulse.Checker.Base.continuation_elaborator_with_bind", + 2, + 2, + 2, + [ + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_Pulse.Syntax.Naming.subst_term.fuel_instrumented", + "@fuel_irrelevance_Pulse.Syntax.Naming.subst_term.fuel_instrumented", + "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_Pulse.Syntax.Base.C_ST", + "constructor_distinct_Pulse.Syntax.Base.Tm_Emp", + "constructor_distinct_Pulse.Syntax.Base.Tm_Inames", + "constructor_distinct_Pulse.Syntax.Base.Tm_Star", + "data_elim_FStar.Pervasives.Native.Mktuple2", + "data_elim_FStar.Pervasives.Native.Some", + "data_elim_Prims.Mkdtuple2", "data_elim_Pulse.Syntax.Base.Mkppname", + "data_elim_Pulse.Syntax.Base.Mkst_comp", + "data_typing_intro_Prims.Cons@tok", + "data_typing_intro_Prims.Nil@tok", + "data_typing_intro_Pulse.Syntax.Naming.DT@tok", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_FStar.Pervasives.Native.Some", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equality_tok_Pulse.Syntax.Base.Tm_Inames@tok", + "equation_FStar.Pervasives.Native.fst", + "equation_FStar.Pervasives.Native.snd", "equation_FStar.Range.range", + "equation_FStar.Reflection.Typing.pp_name_t", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.comp_post", + "equation_Pulse.Syntax.Base.comp_pre", + "equation_Pulse.Syntax.Base.comp_res", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.comp_u", + "equation_Pulse.Syntax.Base.index", + "equation_Pulse.Syntax.Base.nvar", + "equation_Pulse.Syntax.Base.ppname_default", + "equation_Pulse.Syntax.Base.range", + "equation_Pulse.Syntax.Base.st_comp_of_comp", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.tm_star", + "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.v_as_nv", + "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", + "equation_Pulse.Syntax.Base.with_range", + "equation_Pulse.Syntax.Naming.open_st_term", + "equation_Pulse.Syntax.Naming.open_term", + "equation_Pulse.Syntax.Naming.open_term_", + "equation_Pulse.Syntax.Naming.open_term_nv", + "equation_Pulse.Syntax.Naming.subst", + "equation_Pulse.Syntax.Pure.term_of_nvar", + "equation_Pulse.Syntax.Pure.tm_type", + "equation_Pulse.Typing.Combinators.frame_of", + "equation_Pulse.Typing.Combinators.st_comp_with_pre", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.extends_with", + "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.comp_post_matches_hint", + "equation_Pulse.Typing.fresh_wrt", + "equation_Pulse.Typing.post_hint_for_env_p", + "equation_Pulse.Typing.post_hint_opt", + "equation_Pulse.Typing.tot_typing", + "equation_with_fuel_Pulse.Syntax.Naming.subst_term.fuel_instrumented", + "fuel_guarded_inversion_FStar.Pervasives.Native.option", + "fuel_guarded_inversion_FStar.Pervasives.Native.tuple2", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Prims.dtuple2", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.ppname", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "fuel_guarded_inversion_Pulse.Typing.my_erased", + "fuel_guarded_inversion_Pulse.Typing.post_hint_t", + "function_token_typing_Prims.int", + "function_token_typing_Prims.string", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_typing", + "kinding_Pulse.Syntax.Base.ppname@tok", + "kinding_Pulse.Syntax.Base.term@tok", + "kinding_Pulse.Syntax.Naming.subst_elt@tok", + "kinding_Pulse.Typing.post_hint_t@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Pervasives.invertOption", + "lemma_FStar.Sealed.Inhabited.sealed_singleton", + "lemma_Pulse.Syntax.Base.range_singleton", + "lemma_Pulse.Typing.Env.env_extends_push", + "lemma_Pulse.Typing.Env.env_extends_trans", + "lemma_Pulse.Typing.Env.push_env_as_map", + "primitive_Prims.op_BarBar", + "proj_equation_FStar.Pervasives.Native.Mktuple2__1", + "proj_equation_FStar.Pervasives.Native.Mktuple2__2", + "proj_equation_FStar.Pervasives.Native.Some_v", + "proj_equation_Pulse.Syntax.Base.Mknm_nm_ppname", + "proj_equation_Pulse.Syntax.Base.Mkppname_name", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_u", + "proj_equation_Pulse.Syntax.Base.Mkterm_range", + "proj_equation_Pulse.Syntax.Base.Mkterm_t", + "proj_equation_Pulse.Typing.Mkpost_hint_t_g", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Mkdtuple3__1", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_Prims.Mkdtuple2__1", + "projection_inverse_Pulse.Syntax.Base.C_ST__0", + "projection_inverse_Pulse.Syntax.Base.Mknm_nm_ppname", + "projection_inverse_Pulse.Syntax.Base.Mkppname_name", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_res", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_u", + "projection_inverse_Pulse.Syntax.Base.Mkterm_range", + "projection_inverse_Pulse.Syntax.Base.Mkterm_t", + "projection_inverse_Pulse.Syntax.Base.Tm_Star_l", + "projection_inverse_Pulse.Syntax.Base.Tm_Star_r", + "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", + "refinement_interpretation_Tm_refine_26467d3023c1ec77075ea1aae5d71563", + "refinement_interpretation_Tm_refine_2e7859babf6dc4b57292f015e044869d", + "refinement_interpretation_Tm_refine_385f59c31213d29cc308b93df5d99dc9", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_42683f02c4ca4e60fa6e6c8a4bb2b246", + "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", + "refinement_interpretation_Tm_refine_4d5241eb6fe198666a8101195bbd4a2a", + "refinement_interpretation_Tm_refine_507cff99cfaf1de8769ad73117f794c9", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "refinement_interpretation_Tm_refine_91f4f5b5584335b3faf6de950032f9c5", + "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", + "refinement_interpretation_Tm_refine_c985d9b653dbe863d90ae1101a9c9392", + "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "string_typing", "typing_FStar.Map.contains", + "typing_FStar.Pervasives.Native.__proj__Mktuple2__item___2", + "typing_FStar.Pervasives.Native.__proj__Some__item__v", + "typing_FStar.Pervasives.Native.fst", + "typing_FStar.Pervasives.Native.snd", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", + "typing_Pulse.Syntax.Base.__proj__Mkppname__item__name", + "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__post", + "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", + "typing_Pulse.Syntax.Base.comp_post", + "typing_Pulse.Syntax.Base.comp_pre", + "typing_Pulse.Syntax.Base.comp_res", + "typing_Pulse.Syntax.Base.ppname_default", + "typing_Pulse.Syntax.Base.stateful_comp", + "typing_Pulse.Syntax.Base.tm_star", + "typing_Pulse.Syntax.Base.v_as_nv", + "typing_Pulse.Syntax.Naming.freevars", + "typing_Pulse.Syntax.Naming.open_term", + "typing_Pulse.Syntax.Naming.open_term_nv", + "typing_Pulse.Syntax.Pure.term_of_nvar", + "typing_Pulse.Typing.Combinators.apply_frame", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g" + ], + 0, + "680318e29139e19bb3d75e4079a92233" + ], + [ + "Pulse.Checker.Base.continuation_elaborator_with_tot_bind", + 1, + 1, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "disc_equation_FStar.Pervasives.Native.None", + "equation_FStar.Pervasives.Native.snd", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.nvar", "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.var", "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.lookup", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "kinding_Pulse.Syntax.Base.ppname@tok", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_Pulse.Typing.Env.env_extends_push", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_42683f02c4ca4e60fa6e6c8a4bb2b246", + "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "typing_FStar.Map.contains", + "typing_FStar.Pervasives.Native.__proj__Mktuple2__item___2", + "typing_FStar.Reflection.V2.Data.var", + "typing_Pulse.Syntax.Base.ppname_default", + "typing_Pulse.Typing.Env.as_map" + ], + 0, + "726b218140b6ee9b91c33bdc15b5e562" + ], + [ + "Pulse.Checker.Base.continuation_elaborator_with_tot_bind", + 2, + 1, + 1, + [ + "@MaxIFuel_assumption", "@query", + "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.None", + "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_Pulse.Syntax.Base.C_ST", + "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", + "constructor_distinct_Pulse.Syntax.Base.C_STGhost", + "data_elim_FStar.Pervasives.Native.Mktuple2", + "data_elim_Pulse.Syntax.Base.Mkppname", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_FStar.Pervasives.Native.fst", + "equation_FStar.Pervasives.Native.snd", "equation_FStar.Range.range", + "equation_FStar.Reflection.Typing.pp_name_t", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Sealed.Inhabited.sealed", + "equation_FStar.Sealed.Inhabited.sealed_", + "equation_FStar.Set.subset", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.comp_pre", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.nvar", + "equation_Pulse.Syntax.Base.ppname_default", + "equation_Pulse.Syntax.Base.range", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.v_as_nv", + "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Syntax.Naming.close_comp", + "equation_Pulse.Syntax.Naming.close_comp_", + "equation_Pulse.Syntax.Naming.close_term_", + "equation_Pulse.Syntax.Naming.ln", + "equation_Pulse.Syntax.Naming.open_comp_", + "equation_Pulse.Syntax.Naming.open_comp_with", + "equation_Pulse.Syntax.Naming.open_st_term", + "equation_Pulse.Syntax.Naming.open_term_", + "equation_Pulse.Syntax.Naming.subst_comp", + "equation_Pulse.Syntax.Naming.subst_st_comp", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.FV.vars_of_env", + "equation_Pulse.Typing.comp_post_matches_hint", + "equation_Pulse.Typing.post_hint_for_env_p", + "equation_Pulse.Typing.post_hint_opt", + "fuel_guarded_inversion_FStar.Pervasives.Native.tuple2", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.ppname", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "function_token_typing_Prims.int", + "function_token_typing_Prims.string", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", + "kinding_Pulse.Syntax.Base.ppname@tok", + "kinding_Pulse.Syntax.Base.term@tok", + "kinding_Pulse.Typing.post_hint_t@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Pervasives.invertOption", + "lemma_FStar.Sealed.Inhabited.sealed_singleton", + "lemma_Pulse.Syntax.Base.range_singleton", + "lemma_Pulse.Typing.Env.env_extends_push", + "lemma_Pulse.Typing.Env.env_extends_trans", + "primitive_Prims.op_BarBar", + "proj_equation_FStar.Pervasives.Native.Mktuple2__1", + "proj_equation_FStar.Pervasives.Native.Mktuple2__2", + "proj_equation_FStar.Pervasives.Native.Some_v", + "proj_equation_Pulse.Syntax.Base.Mknm_nm_ppname", + "proj_equation_Pulse.Syntax.Base.Mkppname_name", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_FStar.Pervasives.Native.None_a", + "projection_inverse_FStar.Pervasives.Native.Some_a", + "projection_inverse_FStar.Pervasives.Native.Some_v", + "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", + "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", + "projection_inverse_Pulse.Syntax.Base.C_ST__0", + "projection_inverse_Pulse.Syntax.Base.Mknm_nm_ppname", + "projection_inverse_Pulse.Syntax.Base.Mkppname_name", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", + "refinement_interpretation_Tm_refine_25fe9861b42cf97d961ff4c8f44eb399", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_42683f02c4ca4e60fa6e6c8a4bb2b246", + "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", + "refinement_interpretation_Tm_refine_4d5241eb6fe198666a8101195bbd4a2a", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", + "refinement_interpretation_Tm_refine_e077dd511289100be3832fc884204872", + "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "string_typing", "typing_FStar.Map.contains", + "typing_FStar.Pervasives.Native.__proj__Mktuple2__item___2", + "typing_FStar.Pervasives.Native.__proj__Some__item__v", + "typing_FStar.Pervasives.Native.fst", + "typing_FStar.Pervasives.Native.snd", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Sealed.seal", + "typing_Pulse.Syntax.Base.__proj__Mkppname__item__name", + "typing_Pulse.Syntax.Base.ppname_default", + "typing_Pulse.Syntax.Base.v_as_nv", + "typing_Pulse.Syntax.Naming.close_comp", + "typing_Pulse.Syntax.Naming.open_comp_with", + "typing_Pulse.Typing.Env.as_map", + "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g" + ], + 0, + "94f5f77273650d1652df58bedbe07246" + ], + [ + "Pulse.Checker.Base.check_equiv_emp", + 1, + 1, + 1, + [ + "@MaxIFuel_assumption", "@query", + "binder_x_40f47b036cc24e11c7ed578f0b141555_1", + "data_elim_Pulse.Syntax.Base.Mkterm", + "equality_tok_Pulse.Syntax.Base.Tm_Emp@tok", + "equation_FStar.Range.range", + "equation_Prims.op_Equals_Equals_Equals", + "equation_Pulse.Syntax.Base.range", + "equation_Pulse.Syntax.Base.tm_emp", + "equation_Pulse.Syntax.Base.tm_star", + "equation_Pulse.Syntax.Base.with_range", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "lemma_Pulse.Syntax.Base.range_singleton", + "proj_equation_Pulse.Syntax.Base.Mkterm_range", + "proj_equation_Pulse.Syntax.Base.Mkterm_t", + "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "subterm_ordering_Pulse.Syntax.Base.Mkterm", + "subterm_ordering_Pulse.Syntax.Base.Tm_Star", + "typing_Pulse.RuntimeUtils.union_ranges", + "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", + "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t" + ], + 0, + "9f7c0e128a146e080228cefcc10a0952" + ], + [ + "Pulse.Checker.Base.checker_res_matches_post_hint", + 1, + 1, + 1, + [ + "@MaxIFuel_assumption", "@query", + "equation_Pulse.Typing.post_hint_opt", + "kinding_Pulse.Typing.post_hint_t@tok", + "lemma_FStar.Pervasives.invertOption", + "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff" + ], + 0, + "7984897218078f268849ee492a78bcbf" + ], + [ + "Pulse.Checker.Base.intro_comp_typing", + 1, + 1, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.fresh_wrt", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", "primitive_Prims.op_BarBar", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_fbeb4eb12902ab763889d17cad7e9920", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "1bac41546c65dffc2796fa5dc43ec89b" + ], + [ + "Pulse.Checker.Base.intro_comp_typing", + 2, + 1, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.fresh_wrt", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", "primitive_Prims.op_BarBar", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_fbeb4eb12902ab763889d17cad7e9920", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "df35fd140cb33f666fd47e8b88830010" + ], + [ + "Pulse.Checker.Base.intro_comp_typing", + 3, + 1, + 1, + [ + "@MaxIFuel_assumption", "@query", + "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_FStar.Tactics.Result.Success", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_Pulse.Syntax.Base.comp_post", + "equation_Pulse.Syntax.Base.comp_pre", + "equation_Pulse.Syntax.Base.comp_res", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.comp_u", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.tm_inames", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.fresh_wrt", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "primitive_Prims.op_BarBar", "primitive_Prims.op_Negation", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Tactics.Result.Success_a", + "projection_inverse_FStar.Tactics.Result.Success_ps", + "projection_inverse_FStar.Tactics.Result.Success_v", + "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", + "projection_inverse_Pulse.Syntax.Base.C_ST__0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_b1a323d97082b88bad74885f3f1e4f57", + "refinement_interpretation_Tm_refine_f0ac051651fa0e095f1b2c1241fd6a3f", + "refinement_interpretation_Tm_refine_fbeb4eb12902ab763889d17cad7e9920", + "string_typing", "typing_Pulse.Syntax.Base.eq_tm", + "typing_Pulse.Syntax.Base.tm_inames" + ], + 0, + "e2094c2a468197b903561baa80639558" + ], + [ + "Pulse.Checker.Base.return_in_ctxt", + 1, + 1, + 1, + [ + "@MaxIFuel_assumption", "@query", + "Pulse.Syntax.Base_pretyping_adc52787535d21bdc2731720d86e99a8", + "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.None", + "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_Pulse.Syntax.Base.C_ST", + "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", + "constructor_distinct_Pulse.Syntax.Base.C_STGhost", + "constructor_distinct_Pulse.Syntax.Base.STT", + "data_typing_intro_Pulse.Syntax.Base.STT_Atomic@tok", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_FStar.Pervasives.Native.Some", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equality_tok_Pulse.Syntax.Base.STT@tok", + "equation_FStar.Pervasives.Native.fst", + "equation_FStar.Pervasives.Native.snd", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", + "equation_Prims.nat", + "equation_Pulse.Checker.Base.checker_res_matches_post_hint", + "equation_Pulse.Syntax.Base.comp_post", + "equation_Pulse.Syntax.Base.comp_pre", + "equation_Pulse.Syntax.Base.comp_res", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.v_as_nv", + "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", + "equation_Pulse.Syntax.Naming.open_term", + "equation_Pulse.Syntax.Naming.open_term_nv", + "equation_Pulse.Syntax.Pure.null_var", + "equation_Pulse.Syntax.Pure.term_of_nvar", + "equation_Pulse.Typing.Combinators.st_typing_in_ctxt", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.extends_with", + "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.comp_post_matches_hint", + "equation_Pulse.Typing.comp_return", + "equation_Pulse.Typing.post_hint_for_env_p", + "equation_Pulse.Typing.post_hint_opt", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.ctag", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", + "kinding_Pulse.Syntax.Base.ctag@tok", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Pervasives.invertOption", "primitive_Prims.op_BarBar", + "proj_equation_FStar.Pervasives.Native.Mktuple2__1", + "proj_equation_FStar.Pervasives.Native.Mktuple2__2", + "proj_equation_FStar.Pervasives.Native.Some_v", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", + "proj_equation_Pulse.Typing.Mkpost_hint_t_g", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_FStar.Pervasives.Native.None_a", + "projection_inverse_FStar.Pervasives.Native.Some_a", + "projection_inverse_FStar.Pervasives.Native.Some_v", + "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", + "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", + "projection_inverse_Pulse.Syntax.Base.C_ST__0", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_res", + "refinement_interpretation_Tm_refine_0b3483a1c8c65b3c755a28700edf39ca", + "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", + "typing_Pulse.Syntax.Pure.null_var", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__ctag_hint", + "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__post", + "typing_Pulse.Typing.comp_return" + ], + 0, + "005e2c984bb87a81e4c0e5c88c2f384e" + ], + [ + "Pulse.Checker.Base.apply_checker_result_k", + 1, + 1, + 1, + [ + "@MaxIFuel_assumption", "@query", + "equation_Pulse.Typing.post_hint_for_env", + "proj_equation_FStar.Pervasives.Native.Some_v", + "projection_inverse_FStar.Pervasives.Native.Some_v", + "refinement_interpretation_Tm_refine_6e8e5238aadfc712ef5fa6bc6310c384" + ], + 0, + "4f890e4da8e7ff162d6d2086d5ee1a4f" + ], + [ + "Pulse.Checker.Base.apply_checker_result_k", + 2, + 1, + 1, + [ + "@MaxIFuel_assumption", "@query", + "equation_Pulse.Typing.post_hint_for_env", + "proj_equation_FStar.Pervasives.Native.Some_v", + "projection_inverse_FStar.Pervasives.Native.Some_v", + "refinement_interpretation_Tm_refine_6e8e5238aadfc712ef5fa6bc6310c384" + ], + 0, + "e01233b54b9b505ab3f625ce2f317fa6" + ], + [ + "Pulse.Checker.Base.apply_checker_result_k", + 3, + 1, + 1, + [ + "@MaxIFuel_assumption", "@query", + "constructor_distinct_FStar.Pervasives.Native.Some", + "data_elim_FStar.Pervasives.Mkdtuple5", + "disc_equation_FStar.Pervasives.Native.Some", "equation_Prims.nat", + "equation_Pulse.Checker.Base.checker_res_matches_post_hint", + "equation_Pulse.Checker.Base.checker_result_inv", + "equation_Pulse.Checker.Base.checker_result_t", + "equation_Pulse.Syntax.Base.universe", + "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.extends_with", + "equation_Pulse.Typing.post_hint_for_env", + "equation_Pulse.Typing.post_hint_for_env_p", + "fuel_guarded_inversion_FStar.Pervasives.dtuple3", + "fuel_guarded_inversion_FStar.Pervasives.dtuple5", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Prims.dtuple2", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", "int_inversion", + "interpretation_Tm_abs_3c40274298c18b3c60fac0d11fae8431", + "interpretation_Tm_abs_5adeb3a78b1b342e9d9bdc8b1e2ca123", + "interpretation_Tm_abs_e21586ea0dcb2b831fcc0617ea281b2d", + "interpretation_Tm_abs_f9ba06e91f9754038708331844af2d35", + "lemma_Pulse.Typing.Env.env_extends_trans", + "proj_equation_FStar.Pervasives.Native.Some_v", + "proj_equation_Prims.Mkdtuple2__1", + "proj_equation_Pulse.Typing.Mkpost_hint_t_g", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Mkdtuple3__2", + "projection_inverse_FStar.Pervasives.Mkdtuple5__1", + "projection_inverse_FStar.Pervasives.Mkdtuple5__2", + "projection_inverse_FStar.Pervasives.Mkdtuple5__3", + "projection_inverse_FStar.Pervasives.Mkdtuple5__4", + "projection_inverse_FStar.Pervasives.Native.Some_a", + "projection_inverse_FStar.Pervasives.Native.Some_v", + "projection_inverse_Prims.Mkdtuple2__1", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_6e8e5238aadfc712ef5fa6bc6310c384", + "refinement_interpretation_Tm_refine_7ad5682d990eaec6510764d663af54de", + "refinement_interpretation_Tm_refine_b0ea3495ff282f69439c9d1354d6b870", + "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g" + ], + 0, + "a915427c40bd90277ba3044cd71d2d00" + ], + [ + "Pulse.Checker.Base.checker_result_for_st_typing", + 1, + 0, + 1, + [ + "@MaxIFuel_assumption", "@query", + "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "Pulse.Syntax.Base_pretyping_fe09dc1e796799f4bac0760e63f30d40", + "bool_inversion", "bool_typing", + "constructor_distinct_FStar.Pervasives.Native.None", + "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_Pulse.Syntax.Base.C_ST", + "constructor_distinct_Pulse.Syntax.Base.C_STGhost", + "constructor_distinct_Pulse.Syntax.Base.C_Tot", + "data_elim_FStar.Pervasives.Mkdtuple3", + "data_elim_Pulse.Syntax.Base.Mkst_comp", + "data_elim_Pulse.Typing.T_WithLocal", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_FStar.Pervasives.Native.Some", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_FStar.Pervasives.Native.fst", + "equation_FStar.Pervasives.Native.snd", + "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_FStar.Reflection.Typing.pp_name_t", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", + "equation_Prims.nat", + "equation_Pulse.Checker.Base.checker_res_matches_post_hint", + "equation_Pulse.Checker.Base.checker_result_inv", + "equation_Pulse.Syntax.Base.comp_post", + "equation_Pulse.Syntax.Base.comp_res", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.comp_u", + "equation_Pulse.Syntax.Base.nvar", + "equation_Pulse.Syntax.Base.ppname_default", + "equation_Pulse.Syntax.Base.range", + "equation_Pulse.Syntax.Base.st_comp_of_comp", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.universe", + "equation_Pulse.Syntax.Base.v_as_nv", + "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", + "equation_Pulse.Syntax.Naming.open_term", + "equation_Pulse.Typing.Combinators.st_typing_in_ctxt", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.extends_with", + "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.comp_elim_exists", + "equation_Pulse.Typing.comp_intro_exists", + "equation_Pulse.Typing.comp_intro_exists_erased", + "equation_Pulse.Typing.comp_intro_pure", + "equation_Pulse.Typing.comp_par", + "equation_Pulse.Typing.comp_post_matches_hint", + "equation_Pulse.Typing.comp_rewrite", + "equation_Pulse.Typing.comp_while", + "equation_Pulse.Typing.fresh_wrt", + "equation_Pulse.Typing.post_hint_for_env_p", + "equation_Pulse.Typing.post_hint_opt", + "fuel_guarded_inversion_FStar.Pervasives.Native.option", + "fuel_guarded_inversion_FStar.Pervasives.dtuple3", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.ppname", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "fuel_guarded_inversion_Pulse.Typing.st_typing", + "function_token_typing_Prims.int", + "function_token_typing_Prims.string", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_typing", + "interpretation_Tm_abs_65bc593251765a404ad0a92141178dc4", + "kinding_Pulse.Syntax.Base.ppname@tok", + "kinding_Pulse.Syntax.Base.term@tok", + "kinding_Pulse.Typing.post_hint_t@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomUpd1", "lemma_FStar.Map.lemma_SelUpd1", + "lemma_FStar.Pervasives.invertOption", + "lemma_FStar.Sealed.Inhabited.sealed_singleton", + "lemma_Pulse.Syntax.Base.range_singleton", + "lemma_Pulse.Typing.Env.env_extends_push", + "lemma_Pulse.Typing.Env.push_binding_as_map", + "primitive_Prims.op_BarBar", "primitive_Prims.op_Equality", + "proj_equation_FStar.Pervasives.Native.Mktuple2__1", + "proj_equation_FStar.Pervasives.Native.Mktuple2__2", + "proj_equation_FStar.Pervasives.Native.Some_v", + "proj_equation_Pulse.Syntax.Base.Mknm_nm_ppname", + "proj_equation_Pulse.Syntax.Base.Mkppname_name", + "proj_equation_Pulse.Syntax.Base.Mkppname_range", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_u", + "proj_equation_Pulse.Typing.Mkpost_hint_t_g", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Mkdtuple3__1", + "projection_inverse_FStar.Pervasives.Mkdtuple3__2", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_FStar.Pervasives.Native.None_a", + "projection_inverse_Prims.Mkdtuple2__1", + "projection_inverse_Pulse.Syntax.Base.C_Tot__0", + "projection_inverse_Pulse.Syntax.Base.Mknm_nm_ppname", + "projection_inverse_Pulse.Syntax.Base.Mkppname_name", + "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_2e7859babf6dc4b57292f015e044869d", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", + "refinement_interpretation_Tm_refine_d79470205dca7f56c9b5a5da9d23b961", + "refinement_interpretation_Tm_refine_e077dd511289100be3832fc884204872", + "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "string_typing", "typing_FStar.Pervasives.Native.fst", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", + "typing_Pulse.Syntax.Base.__proj__Mkppname__item__name", + "typing_Pulse.Syntax.Base.__proj__Mkppname__item__range", + "typing_Pulse.Syntax.Base.comp_res", + "typing_Pulse.Syntax.Base.ppname_default", + "typing_Pulse.Syntax.Base.stateful_comp", + "typing_Pulse.Syntax.Base.v_as_nv", "typing_Pulse.Typing.Env.as_map", + "typing_Pulse.Typing.Env.dom", "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.lookup" + ], + 0, + "7e5740e6bd2c194133babfa0fa9f247b" + ] + ] +] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Base.fsti b/lib/steel/pulse/Pulse.Checker.Base.fsti new file mode 100644 index 000000000..151c49e8d --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Base.fsti @@ -0,0 +1,135 @@ +module Pulse.Checker.Base + +module RT = FStar.Reflection.Typing +module R = FStar.Reflection.V2 +module L = FStar.List.Tot +module T = FStar.Tactics.V2 +open FStar.List.Tot +open Pulse.Syntax +open Pulse.Typing +open Pulse.Typing.Combinators +module FV = Pulse.Typing.FV +module RU = Pulse.RuntimeUtils +module Metatheory = Pulse.Typing.Metatheory + +val format_failed_goal (g:env) (ctxt:list term) (goal:list term) : T.Tac string + +val intro_post_hint (g:env) (ctag_opt:option ctag) (ret_ty:option term) (post:term) + : T.Tac (post_hint_for_env g) + +val post_hint_from_comp_typing (#g:env) (#c:comp_st) (ct:Metatheory.comp_typing_u g c) + : post_hint_for_env g + +type continuation_elaborator + (g:env) (ctxt:vprop) + (g':env { g' `env_extends` g }) (ctxt':vprop) = + + post_hint:post_hint_opt g -> + st_typing_in_ctxt g' ctxt' post_hint -> + T.Tac (st_typing_in_ctxt g ctxt post_hint) + +val k_elab_unit (g:env) (ctxt:term) + : continuation_elaborator g ctxt g ctxt + +val k_elab_trans + (#g0:env) (#g1:env { g1 `env_extends` g0 }) (#g2:env { g2 `env_extends` g1 }) (#ctxt0 #ctxt1 #ctxt2:term) + (k0:continuation_elaborator g0 ctxt0 g1 ctxt1) + (k1:continuation_elaborator g1 ctxt1 g2 ctxt2 { g1 `env_extends` g0}) + : continuation_elaborator g0 ctxt0 g2 ctxt2 + +val k_elab_equiv + (#g1:env) (#g2:env { g2 `env_extends` g1 }) (#ctxt1 #ctxt1' #ctxt2 #ctxt2':term) + (k:continuation_elaborator g1 ctxt1 g2 ctxt2) + (d1:vprop_equiv g1 ctxt1 ctxt1') + (d2:vprop_equiv g2 ctxt2 ctxt2') + : continuation_elaborator g1 ctxt1' g2 ctxt2' + +// +// A canonical continuation elaborator for Bind +// +val continuation_elaborator_with_bind (#g:env) (ctxt:term) + (#c1:comp{stateful_comp c1}) + (#e1:st_term) + (e1_typing:st_typing g e1 c1) + (ctxt_pre1_typing:tot_typing g (tm_star ctxt (comp_pre c1)) tm_vprop) + (x:nvar { None? (lookup g (snd x)) }) + : T.Tac (continuation_elaborator + g + (tm_star ctxt (comp_pre c1)) + (push_binding g (snd x) (fst x) (comp_res c1)) + (tm_star (open_term (comp_post c1) (snd x)) ctxt)) + +val continuation_elaborator_with_tot_bind (#g:env) (#ctxt:term) + (ctxt_typing:tot_typing g ctxt tm_vprop) + (#e1:term) + (#t1:term) + (e1_typing:tot_typing g e1 t1) + (x:nvar { None? (lookup g (snd x)) }) + : T.Tac (continuation_elaborator + g ctxt + (push_binding g (snd x) ppname_default t1) ctxt) + +val check_equiv_emp (g:env) (vp:term) + : option (vprop_equiv g vp tm_emp) + +let checker_res_matches_post_hint + (g:env) + (post_hint:post_hint_opt g) + (x:var) (t:term) (ctxt':vprop) = + + match post_hint with + | None -> True + | Some post_hint -> + t == post_hint.ret_ty /\ + ctxt' == open_term post_hint.post x + +let checker_result_inv (g:env) (post_hint:post_hint_opt g) + (x:var) + (g1:env) + (t:(u:universe & t:term & universe_of g1 t u)) + (ctxt':(ctxt':vprop & tot_typing g1 ctxt' tm_vprop)) = + + let (| _, t, _ |) = t in + let (| ctxt', _ |) = ctxt' in + checker_res_matches_post_hint g post_hint x t ctxt' /\ + lookup g1 x == Some t + +// +// x is the variable in which the result of the checked computation is bound +// t is the type of the checked computation +// +type checker_result_t (g:env) (ctxt:vprop) (post_hint:post_hint_opt g) = + x:var & + g1:env { g1 `env_extends` g } & + t:(u:universe & t:typ & universe_of g1 t u) & + ctxt':(ctxt':vprop & tot_typing g1 ctxt' tm_vprop) & + k:continuation_elaborator g ctxt g1 (dfst ctxt') { + checker_result_inv g post_hint x g1 t ctxt' + } + +type check_t = + g:env -> + ctxt:vprop -> + ctxt_typing:tot_typing g ctxt tm_vprop -> + post_hint:post_hint_opt g -> + res_ppname:ppname -> + t:st_term -> + T.Tac (checker_result_t g ctxt post_hint) + +val intro_comp_typing (g:env) + (c:comp_st) + (pre_typing:tot_typing g (comp_pre c) tm_vprop) + (res_typing:universe_of g (comp_res c) (comp_u c)) + (x:var { fresh_wrt x g (freevars (comp_post c)) }) + (post_typing:tot_typing (push_binding g x ppname_default (comp_res c)) (open_term (comp_post c) x) tm_vprop) + : T.Tac (comp_typing g c (comp_u c)) + +val apply_checker_result_k (#g:env) (#ctxt:vprop) (#post_hint:post_hint_for_env g) + (r:checker_result_t g ctxt (Some post_hint)) + (res_ppname:ppname) + : T.Tac (st_typing_in_ctxt g ctxt (Some post_hint)) + +val checker_result_for_st_typing (#g:env) (#ctxt:vprop) (#post_hint:post_hint_opt g) + (d:st_typing_in_ctxt g ctxt post_hint) + (ppname:ppname) + : T.Tac (checker_result_t g ctxt post_hint) diff --git a/lib/steel/pulse/Pulse.Checker.Base.fsti.hints b/lib/steel/pulse/Pulse.Checker.Base.fsti.hints new file mode 100644 index 000000000..2f4853511 --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Base.fsti.hints @@ -0,0 +1,175 @@ +[ + "_ڇY}l*6h\"\u0015", + [ + [ + "Pulse.Checker.Base.continuation_elaborator", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "equation_Pulse.Typing.post_hint_for_env_p", + "equation_Pulse.Typing.post_hint_opt", + "kinding_Pulse.Typing.post_hint_t@tok", + "lemma_FStar.Pervasives.invertOption", + "lemma_Pulse.Typing.Env.env_extends_trans", + "proj_equation_FStar.Pervasives.Native.Some_v", + "proj_equation_Pulse.Typing.Mkpost_hint_t_g", + "refinement_interpretation_Tm_refine_4d5241eb6fe198666a8101195bbd4a2a", + "refinement_interpretation_Tm_refine_7ad5682d990eaec6510764d663af54de", + "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", + "typing_FStar.Pervasives.Native.__proj__Some__item__v", + "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g" + ], + 0, + "fe99e051b8a332d1e9689d64b80f7114" + ], + [ + "Pulse.Checker.Base.k_elab_unit", + 1, + 2, + 1, + [ "@query", "lemma_Pulse.Typing.Env.env_extends_refl" ], + 0, + "7e18bf6d5420efa597b521b190050905" + ], + [ + "Pulse.Checker.Base.k_elab_trans", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "lemma_Pulse.Typing.Env.env_extends_trans", + "refinement_interpretation_Tm_refine_7ad5682d990eaec6510764d663af54de", + "refinement_interpretation_Tm_refine_f7041caef014e9018ca78d8e35b3e1ad" + ], + 0, + "51ccc4d09d5ef75cb2a7ba59527898f2" + ], + [ + "Pulse.Checker.Base.continuation_elaborator_with_bind", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "disc_equation_FStar.Pervasives.Native.None", + "equation_FStar.Pervasives.Native.snd", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.nvar", "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.var", "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.lookup", + "fuel_guarded_inversion_FStar.Pervasives.Native.tuple2", + "kinding_Pulse.Syntax.Base.ppname@tok", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_Pulse.Typing.Env.env_extends_push", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_385f59c31213d29cc308b93df5d99dc9", + "refinement_interpretation_Tm_refine_42683f02c4ca4e60fa6e6c8a4bb2b246", + "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "typing_FStar.Map.contains", + "typing_FStar.Pervasives.Native.__proj__Mktuple2__item___2", + "typing_FStar.Pervasives.Native.fst", + "typing_FStar.Reflection.V2.Data.var", + "typing_Pulse.Syntax.Base.comp_res", "typing_Pulse.Typing.Env.as_map" + ], + 0, + "4b236f77c50f6ce21d05b9a5365a5186" + ], + [ + "Pulse.Checker.Base.continuation_elaborator_with_tot_bind", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "disc_equation_FStar.Pervasives.Native.None", + "equation_FStar.Pervasives.Native.snd", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.nvar", "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.var", "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.lookup", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "kinding_Pulse.Syntax.Base.ppname@tok", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_Pulse.Typing.Env.env_extends_push", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_42683f02c4ca4e60fa6e6c8a4bb2b246", + "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "typing_FStar.Map.contains", + "typing_FStar.Pervasives.Native.__proj__Mktuple2__item___2", + "typing_FStar.Reflection.V2.Data.var", + "typing_Pulse.Syntax.Base.ppname_default", + "typing_Pulse.Typing.Env.as_map" + ], + 0, + "db039ad4d873e638eb7fc05eccd3fe2c" + ], + [ + "Pulse.Checker.Base.checker_res_matches_post_hint", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "equation_Pulse.Typing.post_hint_opt", + "kinding_Pulse.Typing.post_hint_t@tok", + "lemma_FStar.Pervasives.invertOption", + "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff" + ], + 0, + "fb2a53c36a7166939ec9762275ea5c33" + ], + [ + "Pulse.Checker.Base.intro_comp_typing", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.fresh_wrt", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", "primitive_Prims.op_BarBar", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_fbeb4eb12902ab763889d17cad7e9920", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "bc5373096a67ec6668bbc60d179d9fc9" + ], + [ + "Pulse.Checker.Base.apply_checker_result_k", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "equation_Pulse.Typing.post_hint_for_env", + "proj_equation_FStar.Pervasives.Native.Some_v", + "projection_inverse_FStar.Pervasives.Native.Some_v", + "refinement_interpretation_Tm_refine_6e8e5238aadfc712ef5fa6bc6310c384" + ], + 0, + "806c8538bf1944eb4f9b5e4448b2fc26" + ] + ] +] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Bind.fst b/lib/steel/pulse/Pulse.Checker.Bind.fst index dbb1abbbe..e76d1ba47 100644 --- a/lib/steel/pulse/Pulse.Checker.Bind.fst +++ b/lib/steel/pulse/Pulse.Checker.Bind.fst @@ -1,187 +1,88 @@ module Pulse.Checker.Bind -module RT = FStar.Reflection.Typing -module R = FStar.Reflection.V2 -module L = FStar.List.Tot -module T = FStar.Tactics.V2 -module P = Pulse.Syntax.Printer -open FStar.List.Tot + open Pulse.Syntax open Pulse.Typing open Pulse.Typing.Combinators -open Pulse.Checker.Common +open Pulse.Checker.Base open Pulse.Checker.Pure -module FV = Pulse.Typing.FV -module LN = Pulse.Typing.LN +open Pulse.Checker.Prover + +module T = FStar.Tactics.V2 +module P = Pulse.Syntax.Printer module Metatheory = Pulse.Typing.Metatheory +module PS = Pulse.Checker.Prover.Substs + +let coerce_eq (#a #b:Type) (x:a) (_:squash (a == b)) : y:b{y == x} = x -#push-options "--query_stats --ifuel 2 --z3rlimit_factor 4" -let mk_bind' (g:env) - (pre:term) - (e1:st_term) - (e2:st_term) - (c1:comp_st) - (c2:comp_st) - (px:nvar { ~ (Set.mem (snd px) (dom g)) }) - (d_e1:st_typing g e1 c1) - (d_c1res:tot_typing g (comp_res c1) (tm_type (comp_u c1))) - (d_e2:st_typing (push_binding g (snd px) (fst px) (comp_res c1)) (open_st_term_nv e2 px) c2) - (post_hint:post_hint_opt g { comp_post_matches_hint c2 post_hint }) - (_:squash ( - let _, x = px in - comp_pre c1 == pre /\ - None? (lookup g x) /\ - (~(x `Set.mem` freevars_st e2)) /\ - open_term (comp_post c1) x == comp_pre c2)) - : T.Tac (checker_result_t g pre post_hint) - = let _,x = px in - let s2 = st_comp_of_comp c2 in - if x `Set.mem` freevars s2.post - then fail g None (Printf.sprintf "Bound variable %d escapes scope in postcondition %s" x (P.term_to_string s2.post)) - else ( - let res_typing, post_typing = bind_res_and_post_typing g s2 x post_hint in - let (| t, c, d |) = mk_bind g pre e1 e2 c1 c2 px d_e1 d_c1res d_e2 res_typing post_typing in - (| t, c, d |) - ) - -#push-options "--z3rlimit_factor 4 --fuel 0 --ifuel 1" +#push-options "--z3rlimit_factor 4 --fuel 1 --ifuel 1" let check_bind (g:env) - (t:st_term{Tm_Bind? t.term}) + (ctxt:vprop) + (ctxt_typing:tot_typing g ctxt tm_vprop) + (post_hint:post_hint_opt g) + (res_ppname:ppname) + (t:st_term {Tm_Bind? t.term}) + (check:check_t) + : T.Tac (checker_result_t g ctxt post_hint) = + + let g = Pulse.Typing.Env.push_context g "check_bind" t.range in + + debug_prover g (fun _ -> + Printf.sprintf "checking bind:\n%s\n" (P.st_term_to_string t)); + + if None? post_hint + then fail g (Some t.range) "check_bind: post hint is not set, please add an annotation"; + + let Tm_Bind { binder; head=e1; body=e2} = t.term in + + let (| x, g1, _, (| ctxt', ctxt'_typing |), k1 |) = + check g ctxt ctxt_typing None binder.binder_ppname e1 in + let d : st_typing_in_ctxt g1 ctxt' post_hint = + let ppname = mk_ppname_no_range "_bind_c" in + let r = + check g1 ctxt' ctxt'_typing post_hint ppname (open_st_term_nv e2 (binder.binder_ppname, x)) in + apply_checker_result_k #_ #_ #(Some?.v post_hint) r ppname in + let d : st_typing_in_ctxt g ctxt post_hint = k1 post_hint d in + + checker_result_for_st_typing d res_ppname + +let check_tot_bind + (g:env) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) + (res_ppname:ppname) + (t:st_term { Tm_TotBind? t.term }) (check:check_t) : T.Tac (checker_result_t g pre post_hint) = - let Tm_Bind { binder=b; head=e1; body=e2 } = t.term in - let (| e1, c1, d1 |) = check g e1 pre pre_typing None in - if not (stateful_comp c1) - then fail g None "Bind: c1 is not st" - else - let s1 = st_comp_of_comp c1 in - let t = s1.res in - let (| t_typing, _, x, next_pre_typing |) = - Metatheory.(st_comp_typing_inversion (comp_typing_inversion (st_typing_correctness d1))) in - let px = b.binder_ppname, x in - let next_pre = open_term_nv s1.post px in - let g' = push_binding g x b.binder_ppname s1.res in - let (| e2', c2, d2 |) = check g' (open_st_term_nv e2 px) next_pre next_pre_typing post_hint in - FV.st_typing_freevars d2; - if not (stateful_comp c2) - then fail g None "Bind: c2 is not st" - else ( - let e2_closed = close_st_term e2' x in - assume (open_st_term e2_closed x == e2'); - mk_bind' g pre e1 e2_closed c1 c2 px d1 t_typing d2 post_hint () - ) -//inlining mk_bind' causes memory to blow up. F* takes a long time to compute a VC for the definition above^. Z3 finishes the proof quickly -#pop-options - - -let check_tot_bind g t pre pre_typing post_hint check = + + let g = Pulse.Typing.Env.push_context g "check_bind" t.range in + + if None? post_hint + then fail g (Some t.range) "check_tot_bind: post hint is not set, please add an annotation"; + let Tm_TotBind { head=e1; body=e2 } = t.term in let (| e1, u1, t1, _t1_typing, e1_typing |) = check_term_and_type g e1 in let t1 = let b = {binder_ty=t1;binder_ppname=ppname_default} in let eq_tm = mk_eq2 u1 t1 (null_bvar 0) e1 in tm_refine b eq_tm in + + // THIS IS WASTEFUL, CHECKING e1 MULTIPLE TIMES let (| e1, e1_typing |) = check_term_with_expected_type g e1 t1 in + let x = fresh g in + + let k = continuation_elaborator_with_tot_bind pre_typing (E e1_typing) (ppname_default, x) in + let px = v_as_nv x in let g' = push_binding g x (fst px) t1 in - // This is just weakening, - // we have g |- pre : vprop - // g' should follow by some weakening lemma let pre_typing' : tot_typing g' pre tm_vprop = - check_vprop_with_core g' pre in - let (| e2, c2, e2_typing |) = - check g' (open_st_term_nv e2 px) pre pre_typing' post_hint in - if not (stateful_comp c2) - then fail g (Some e2.range) "Tm_TotBind: e2 is not a stateful computation" - else - let e2_closed = close_st_term e2 x in - assume (open_st_term_nv e2_closed (v_as_nv x) == e2); - assert (comp_pre c2 == pre); - // T.print (Printf.sprintf "c2 is %s\n\n" (P.comp_to_string c2)); - FV.tot_typing_freevars pre_typing; - close_with_non_freevar pre x 0; - let c = open_comp_with (close_comp c2 x) e1 in - let _ = - match post_hint with - | None -> () - | Some post -> - assume (comp_post c == comp_post c2 /\ - comp_res c == comp_res c2 /\ - comp_u c == comp_u c2) - in - // T.print (Printf.sprintf "c is %s\n\n" (P.comp_to_string c)); - LN.tot_typing_ln pre_typing'; - open_with_gt_ln pre (-1) e1 0; - (| _, - c, - T_TotBind _ _ e2_closed _ _ x (E e1_typing) e2_typing |) - -let coerce_eq (#a #b:Type) (x:a) (_:squash (a == b)) : y:b{y == x} = x - -let check_stapp_no_ctxt (g:env) (t:st_term { Tm_STApp? t.term }) - : T.Tac (uvs : env { disjoint uvs g } & - t:st_term & - c:comp_st & - st_typing (push_env g uvs) t c) = magic () - -module PS = Pulse.Prover.Substs -open Pulse.Prover.Common -open Pulse.Prover -#push-options "--z3rlimit_factor 4 --fuel 1 --ifuel 1" -let check_bindv2 - (g:env) - (t:st_term {Tm_Bind? t.term}) - (pre:term) - (pre_typing:tot_typing g pre tm_vprop) - (post_hint:post_hint_opt g) - (check:check_t) - : T.Tac (checker_result_t g pre post_hint) = - - let Tm_Bind { binder=b; head=e1; body=e2 } = t.term in - - match e1.term with - | Tm_STApp _ -> - let (| uvs, e1, c1, d1 |) = check_stapp_no_ctxt g e1 in - let c10 = c1 in - // magic is comp_pre c1 typing, get from inversion of d1 - let (| g1, uvs1, ss1, remaining_pre, k |) = - prove pre_typing uvs #(comp_pre c1) (magic ()) in - let x = fresh g1 in - let px = b.binder_ppname, x in - // TODO: if the binder is annotated, check subtyping - let g2 = push_binding g1 x b.binder_ppname (PS.nt_subst_term (comp_res c1) ss1) in - let pre_e2 = open_term_nv (PS.nt_subst_term (comp_post c1) ss1) px * remaining_pre in - assert (g2 `env_extends` g1); - assert (g2 `env_extends` g); - // magic is the typing of pre_e2 in g2 - // remaining_pre is well-typed, may be prove function can return it? - // well-typedness of open_term? - let (| e2, c2, d2 |) = - check g2 (open_st_term_nv e2 px) pre_e2 (magic ()) (extend_post_hint_opt_g g post_hint g2) in - - if not (stateful_comp c2) - then fail g None "Bind: c2 is not st" - else - let d1 = st_typing_weakening g uvs e1 c1 d1 g1 in - let d1 = st_typing_weakening_end g1 uvs e1 c1 d1 uvs1 in - let d1 = PS.st_typing_nt_substs_derived g1 uvs1 #e1 #c1 d1 ss1 in - let (| e1, c1, d1 |) = add_frame d1 #remaining_pre (magic ()) in - assert (comp_pre c1 == PS.nt_subst_term (comp_pre c10) ss1 * remaining_pre); - assert (comp_res c1 == PS.nt_subst_term (comp_res c10) ss1); - assert (None? (lookup g1 x)); - assert (comp_post c1 == PS.nt_subst_term (comp_post c10) ss1 * remaining_pre); - assume (open_term remaining_pre x == remaining_pre); - assert (open_term (comp_post c1) x == comp_pre c2); - - let e2_closed = close_st_term e2 x in - assume (open_st_term e2_closed x == e2); - let r = mk_bind' g1 (comp_pre c1) e1 e2_closed c1 c2 px (coerce_eq d1 ()) (magic ()) (coerce_eq d2 ()) post_hint () in - - k post_hint r - | _ -> fail g None "Bind: e1 is not an stapp" -#pop-options + Metatheory.tot_typing_weakening_single pre_typing x t1 in + let d = + let ppname = mk_ppname_no_range "_tbind_c" in + let r = check g' pre pre_typing' post_hint ppname (open_st_term_nv e2 px) in + apply_checker_result_k #_ #_ #(Some?.v post_hint) r ppname in + let d = k post_hint d in + checker_result_for_st_typing d res_ppname diff --git a/lib/steel/pulse/Pulse.Checker.Bind.fst.hints b/lib/steel/pulse/Pulse.Checker.Bind.fst.hints index 241b16047..0226f3e5d 100644 --- a/lib/steel/pulse/Pulse.Checker.Bind.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.Bind.fst.hints @@ -1,672 +1,158 @@ [ - "&H$<\u0001S\u00061A\u0018-9", + "\u000b4\u0018K^YC\u007fwD]", [ [ - "Pulse.Checker.Bind.mk_bind'", + "Pulse.Checker.Bind.coerce_eq", 1, 2, - 2, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.var", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "refinement_interpretation_Tm_refine_c3db93a75dbfff93223215a880c044ae" - ], - 0, - "b479f7d3a7b33c7f28211efd79ba0b29" - ], - [ - "Pulse.Checker.Bind.mk_bind'", - 2, - 2, - 2, + 1, [ "@MaxIFuel_assumption", "@query", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", "b2t_def", - "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "data_elim_Pulse.Syntax.Base.Mkst_comp", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", "eq2-interp", - "equation_FStar.Pervasives.Native.fst", - "equation_FStar.Pervasives.Native.snd", - "equation_FStar.Reflection.Typing.pp_name_t", - "equation_Prims.eqtype", "equation_Prims.l_and", - "equation_Prims.nat", "equation_Prims.squash", - "equation_Pulse.Syntax.Base.comp_post", - "equation_Pulse.Syntax.Base.comp_pre", - "equation_Pulse.Syntax.Base.comp_res", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.comp_u", - "equation_Pulse.Syntax.Base.nvar", - "equation_Pulse.Syntax.Base.ppname_default", - "equation_Pulse.Syntax.Base.range", - "equation_Pulse.Syntax.Base.st_comp_of_comp", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.typ", - "equation_Pulse.Syntax.Base.v_as_nv", - "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Syntax.Pure.tm_type", - "equation_Pulse.Typing.Combinators.st_comp_with_pre", - "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.comp_post_matches_hint", - "equation_Pulse.Typing.fresh_wrt", - "fuel_guarded_inversion_FStar.Pervasives.Native.tuple2", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.ppname", - "fuel_guarded_inversion_Pulse.Syntax.Base.st_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "function_token_typing_Prims.int", - "function_token_typing_Prims.string", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", - "kinding_Pulse.Syntax.Base.ppname@tok", "l_and-interp", - "l_not-interp", "lemma_FStar.Sealed.Inhabited.sealed_singleton", - "lemma_Pulse.Syntax.Base.range_singleton", - "primitive_Prims.op_BarBar", - "proj_equation_FStar.Pervasives.Native.Mktuple2__1", - "proj_equation_FStar.Pervasives.Native.Mktuple2__2", - "proj_equation_Pulse.Syntax.Base.Mknm_nm_ppname", - "proj_equation_Pulse.Syntax.Base.Mkppname_name", - "proj_equation_Pulse.Syntax.Base.Mkppname_range", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_u", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", - "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "projection_inverse_Pulse.Syntax.Base.Mknm_nm_ppname", - "projection_inverse_Pulse.Syntax.Base.Mkppname_name", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_res", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_u", - "refinement_interpretation_Tm_refine_285c544248c0ad95890609c6fe7d1daf", - "refinement_interpretation_Tm_refine_2de20c066034c13bf76e9c0b94f4806c", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", - "refinement_interpretation_Tm_refine_b29a55f5e5e02e5d33d2962d64391bf4", - "refinement_interpretation_Tm_refine_c3db93a75dbfff93223215a880c044ae", - "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "string_typing", "typing_FStar.Pervasives.Native.fst", - "typing_FStar.Pervasives.Native.snd", - "typing_Pulse.Syntax.Base.__proj__Mkppname__item__name", - "typing_Pulse.Syntax.Base.__proj__Mkppname__item__range", - "typing_Pulse.Syntax.Base.uu___is_C_Tot", - "typing_Pulse.Syntax.Base.v_as_nv" + "refinement_interpretation_Tm_refine_0dee8cb03258a67c2f7ec66427696212" ], 0, - "c192e487e86cec8a695bce7afd2d77e8" + "74e8ddbb581ec7cbe46659b7ec14cd9e" ], [ "Pulse.Checker.Bind.check_bind", 1, - 0, + 1, 1, [ - "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_Pulse.Syntax.Naming.freevars_st.fuel_instrumented", - "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "Pulse.Syntax.Base_pretyping_23132a72b4b9dcc36ddc94829774f176", - "Pulse.Syntax.Base_pretyping_fe09dc1e796799f4bac0760e63f30d40", + "@MaxIFuel_assumption", "@query", + "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "Pulse.Typing_pretyping_85b09ae4ef91823fbf549acd09fde244", "bool_inversion", "constructor_distinct_FStar.Pervasives.Native.None", "constructor_distinct_FStar.Pervasives.Native.Some", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", - "constructor_distinct_Pulse.Syntax.Base.C_STGhost", - "constructor_distinct_Pulse.Syntax.Base.C_Tot", - "constructor_distinct_Pulse.Syntax.Base.Tm_Bind", - "constructor_distinct_Tm_unit", - "data_elim_FStar.Pervasives.Mkdtuple4", + "constructor_distinct_FStar.Tactics.Result.Failed", + "constructor_distinct_FStar.Tactics.Result.Success", "data_elim_FStar.Pervasives.Native.Some", - "data_elim_Pulse.Syntax.Base.Mkbinder", - "data_elim_Pulse.Syntax.Base.Mkppname", - "data_elim_Pulse.Syntax.Base.Mkst_comp", - "data_elim_Pulse.Typing.STC", "data_elim_Pulse.Typing.T_Bind", - "data_elim_Pulse.Typing.T_Par", "data_elim_Pulse.Typing.T_Return", - "data_elim_Pulse.Typing.T_STApp", - "data_elim_Pulse.Typing.T_WithLocal", - "data_typing_intro_FStar.Pervasives.Native.Mktuple2@tok", + "data_elim_Pulse.Syntax.Base.Mkst_term", + "data_elim_Pulse.Syntax.Base.Mkterm", "disc_equation_FStar.Pervasives.Native.None", "disc_equation_FStar.Pervasives.Native.Some", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "disc_equation_Pulse.Syntax.Base.Tm_Bind", - "equation_FStar.Pervasives.Native.fst", - "equation_FStar.Pervasives.Native.snd", "equation_FStar.Range.range", + "equality_tok_Pulse.Syntax.Base.Tm_VProp@tok", + "equation_FStar.Range.range", "equation_FStar.Reflection.Typing.fstar_top_env", - "equation_FStar.Reflection.Typing.pp_name_t", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Sealed.Inhabited.sealed", - "equation_FStar.Sealed.Inhabited.sealed_", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Syntax.Base.comp_post", - "equation_Pulse.Syntax.Base.comp_pre", - "equation_Pulse.Syntax.Base.comp_res", - "equation_Pulse.Syntax.Base.comp_u", - "equation_Pulse.Syntax.Base.index", - "equation_Pulse.Syntax.Base.ppname_default", "equation_Pulse.Syntax.Base.range", - "equation_Pulse.Syntax.Base.st_comp_of_comp", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.typ", - "equation_Pulse.Syntax.Base.v_as_nv", - "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", - "equation_Pulse.Syntax.Naming.close_st_term", - "equation_Pulse.Syntax.Naming.open_st_term", - "equation_Pulse.Syntax.Naming.open_term", - "equation_Pulse.Syntax.Naming.open_term_nv", - "equation_Pulse.Syntax.Pure.term_of_nvar", - "equation_Pulse.Syntax.Pure.tm_type", - "equation_Pulse.Syntax.Pure.tm_var", "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Syntax.Base.tm_vprop", + "equation_Pulse.Syntax.Base.with_range", "equation_Pulse.Typing.Env.env_extends", "equation_Pulse.Typing.Env.extends_with", - "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.FV.set_minus", - "equation_Pulse.Typing.Metatheory.comp_typing_u", - "equation_Pulse.Typing.as_binder", - "equation_Pulse.Typing.comp_elim_exists", - "equation_Pulse.Typing.comp_intro_exists", - "equation_Pulse.Typing.comp_intro_exists_erased", - "equation_Pulse.Typing.comp_intro_pure", - "equation_Pulse.Typing.comp_par", - "equation_Pulse.Typing.comp_rewrite", - "equation_Pulse.Typing.comp_while", "equation_Pulse.Typing.elab_env", - "equation_Pulse.Typing.fresh_wrt", "equation_Pulse.Typing.post_hint_for_env_p", "equation_Pulse.Typing.post_hint_opt", - "equation_Pulse.Typing.universe_of", "fuel_guarded_inversion_FStar.Pervasives.Native.option", - "fuel_guarded_inversion_FStar.Pervasives.dtuple4", "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.binder", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.ppname", - "fuel_guarded_inversion_Pulse.Syntax.Base.st_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "fuel_guarded_inversion_Pulse.Typing.comp_typing", - "fuel_guarded_inversion_Pulse.Typing.st_comp_typing", - "fuel_guarded_inversion_Pulse.Typing.st_typing", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "function_token_typing_Prims.__cache_version_number__", - "function_token_typing_Prims.string", "int_inversion", "int_typing", - "interpretation_Tm_abs_c8631188b49e797b2c9232f71b480642", - "kinding_Pulse.Syntax.Base.ppname@tok", - "kinding_Pulse.Syntax.Base.term@tok", - "kinding_Pulse.Typing.post_hint_t@tok", - "lemma_FStar.Map.lemma_ContainsDom", + "int_inversion", "kinding_Pulse.Typing.post_hint_t@tok", "lemma_FStar.Pervasives.invertOption", - "lemma_FStar.Sealed.Inhabited.sealed_singleton", - "lemma_FStar.Set.mem_complement", "lemma_FStar.Set.mem_intersect", - "lemma_FStar.Set.mem_singleton", "lemma_Pulse.Syntax.Base.range_singleton", - "lemma_Pulse.Typing.Env.push_binding_bs", - "lemma_Pulse.Typing.Env.push_env_as_map", - "lemma_Pulse.Typing.FV.freevars_close_st_term", - "lemma_Pulse.Typing.post_hint_for_env_extends", - "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", - "primitive_Prims.op_Equality", "primitive_Prims.op_Negation", - "proj_equation_FStar.Pervasives.Native.Mktuple2__1", - "proj_equation_FStar.Pervasives.Native.Mktuple2__2", + "lemma_Pulse.Typing.Env.env_extends_trans", "proj_equation_FStar.Pervasives.Native.Some_v", - "proj_equation_Pulse.Syntax.Base.Mkbinder_binder_ppname", - "proj_equation_Pulse.Syntax.Base.Mknm_nm_index", - "proj_equation_Pulse.Syntax.Base.Mknm_nm_ppname", - "proj_equation_Pulse.Syntax.Base.Mkppname_name", - "proj_equation_Pulse.Syntax.Base.Mkppname_range", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_u", + "proj_equation_Pulse.Syntax.Base.Mkst_term_range", "proj_equation_Pulse.Typing.Mkpost_hint_t_g", "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Mkdtuple4__1", - "projection_inverse_FStar.Pervasives.Mkdtuple4__2", - "projection_inverse_FStar.Pervasives.Mkdtuple4__3", - "projection_inverse_FStar.Pervasives.Mkdtuple4__4", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", "projection_inverse_FStar.Pervasives.Native.None_a", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", - "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "projection_inverse_Pulse.Syntax.Base.Mkbinder_binder_ppname", - "projection_inverse_Pulse.Syntax.Base.Mknm_nm_index", - "projection_inverse_Pulse.Syntax.Base.Mknm_nm_ppname", - "projection_inverse_Pulse.Syntax.Base.Mkppname_name", - "projection_inverse_Pulse.Syntax.Base.Mkppname_range", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_u", - "projection_inverse_Pulse.Syntax.Base.Tm_Bind__0", - "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", - "refinement_interpretation_Tm_refine_17bcd2e615041228c68006305891a3bb", - "refinement_interpretation_Tm_refine_1e3b46ef574b7c7b56e6f48d45a4bd20", - "refinement_interpretation_Tm_refine_25fe9861b42cf97d961ff4c8f44eb399", + "projection_inverse_FStar.Tactics.Result.Failed_a", + "projection_inverse_FStar.Tactics.Result.Failed_exn", + "projection_inverse_FStar.Tactics.Result.Failed_ps", + "projection_inverse_FStar.Tactics.Result.Success_a", + "projection_inverse_FStar.Tactics.Result.Success_ps", + "projection_inverse_FStar.Tactics.Result.Success_v", "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", - "refinement_interpretation_Tm_refine_2e7859babf6dc4b57292f015e044869d", - "refinement_interpretation_Tm_refine_2ee1d1f639c54669fffde14441581c40", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_6067909eb7e26441b043722acc4cd3cf", "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", - "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", - "refinement_interpretation_Tm_refine_d79470205dca7f56c9b5a5da9d23b961", + "refinement_interpretation_Tm_refine_cae545c65785ca4f8e3707a9a089ca19", "refinement_interpretation_Tm_refine_da369f128845038617bacd99a355825a", - "refinement_interpretation_Tm_refine_ef7555858a8f645ba3c9fad8dba2219b", - "refinement_interpretation_Tm_refine_f2631f1e9df7e7fe731df0b4c6310657", - "refinement_interpretation_Tm_refine_f327b3b66854e57c59289f8c259581e7", - "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "string_typing", - "token_correspondence_Pulse.Syntax.Naming.freevars_st.fuel_instrumented", - "typing_FStar.Map.contains", "typing_FStar.Map.domain", - "typing_FStar.Pervasives.Native.snd", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Sealed.seal", - "typing_FStar.Set.complement", "typing_FStar.Set.mem", - "typing_FStar.Set.singleton", - "typing_Pulse.Syntax.Base.__proj__Mkbinder__item__binder_ppname", - "typing_Pulse.Syntax.Base.__proj__Mkppname__item__name", - "typing_Pulse.Syntax.Base.__proj__Mkppname__item__range", - "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__res", - "typing_Pulse.Syntax.Base.ppname_default", - "typing_Pulse.Syntax.Naming.close_st_term", - "typing_Pulse.Syntax.Naming.close_st_term_", - "typing_Pulse.Syntax.Naming.freevars_st", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "refinement_interpretation_Tm_refine_eed994d15518279ab75d745192d0d368", + "string_typing", "typing_Pulse.Syntax.Base.tm_vprop", "typing_Pulse.Typing.Env.fstar_env", - "typing_Pulse.Typing.Env.lookup", - "typing_Pulse.Typing.Env.push_binding", - "typing_Pulse.Typing.Metatheory.st_comp_typing_inversion", + "typing_Pulse.Typing.Env.push_context", "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g" ], 0, - "3aa3c0aa687ede4bb96007a867d2b596" + "7a4c9aed703e264c15583b4acb45003c" ], [ "Pulse.Checker.Bind.check_tot_bind", 1, - 2, - 2, - [ - "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_Pulse.Syntax.Naming.freevars_st.fuel_instrumented", - "@fuel_correspondence_Pulse.Syntax.Naming.subst_term.fuel_instrumented", - "@fuel_irrelevance_Pulse.Syntax.Naming.freevars_st.fuel_instrumented", - "@query", - "FStar.Map_interpretation_Tm_arrow_6980332764c4493a7b0df5c02f7aefbe", - "Pulse.Syntax.Base_pretyping_0b425ab385a56835d52cd71c18622a32", - "Pulse.Syntax.Naming_interpretation_Tm_arrow_c0d5e1c4dd22f0fc7f6b9bbecbfa2056", - "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.None", - "constructor_distinct_FStar.Pervasives.Native.Some", - "constructor_distinct_Prims.Nil", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", - "constructor_distinct_Pulse.Syntax.Base.C_STGhost", - "data_elim_FStar.Pervasives.Native.Some", - "data_elim_Pulse.Syntax.Base.C_STAtomic", - "data_elim_Pulse.Syntax.Base.C_STGhost", - "data_typing_intro_Prims.Cons@tok", - "data_typing_intro_Prims.Nil@tok", - "data_typing_intro_Pulse.Syntax.Base.Mkbinder@tok", - "data_typing_intro_Pulse.Syntax.Naming.DT@tok", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_FStar.Pervasives.Native.Some", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equality_tok_Pulse.Syntax.Base.Implicit@tok", - "equation_FStar.Pervasives.Native.fst", - "equation_FStar.Reflection.Typing.fstar_top_env", - "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.subset", - "equation_Prims.eqtype", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.comp_post", - "equation_Pulse.Syntax.Base.comp_pre", - "equation_Pulse.Syntax.Base.comp_res", - "equation_Pulse.Syntax.Base.comp_u", - "equation_Pulse.Syntax.Base.index", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.typ", - "equation_Pulse.Syntax.Base.v_as_nv", - "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", - "equation_Pulse.Syntax.Naming.close_comp", - "equation_Pulse.Syntax.Naming.close_comp_", - "equation_Pulse.Syntax.Naming.close_st_term", - "equation_Pulse.Syntax.Naming.close_term_", - "equation_Pulse.Syntax.Naming.ln", - "equation_Pulse.Syntax.Naming.open_comp_", - "equation_Pulse.Syntax.Naming.open_comp_with", - "equation_Pulse.Syntax.Naming.open_term_", - "equation_Pulse.Syntax.Naming.subst", - "equation_Pulse.Syntax.Naming.subst_comp", - "equation_Pulse.Syntax.Naming.subst_st_comp", - "equation_Pulse.Syntax.Pure.tm_refine", - "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.env_extends", - "equation_Pulse.Typing.Env.extends_with", - "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.FV.set_minus", - "equation_Pulse.Typing.FV.vars_of_env", - "equation_Pulse.Typing.comp_post_matches_hint", - "equation_Pulse.Typing.post_hint_for_env_p", - "equation_Pulse.Typing.post_hint_opt", - "equation_with_fuel_FStar.List.Tot.Base.map.fuel_instrumented", - "equation_with_fuel_Pulse.Syntax.Naming.subst_term.fuel_instrumented", - "fuel_guarded_inversion_FStar.Pervasives.Native.option", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.st_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "function_token_typing_Prims.__cache_version_number__", - "function_token_typing_Prims.int", - "function_token_typing_Pulse.Syntax.Naming.shift_subst_elt", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", - "int_typing", "kinding_Pulse.Syntax.Base.term@tok", - "kinding_Pulse.Syntax.Naming.subst_elt@tok", - "kinding_Pulse.Typing.post_hint_t@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "lemma_FStar.Pervasives.invertOption", - "lemma_FStar.Set.mem_complement", "lemma_FStar.Set.mem_intersect", - "lemma_FStar.Set.mem_singleton", - "lemma_Pulse.Typing.FV.freevars_close_st_term", - "lemma_Pulse.Typing.post_hint_for_env_extends", - "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", - "primitive_Prims.op_Equality", "primitive_Prims.op_Negation", - "proj_equation_FStar.Pervasives.Native.Mktuple2__1", - "proj_equation_FStar.Pervasives.Native.Some_v", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_u", - "proj_equation_Pulse.Typing.Mkpost_hint_t_g", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_BoxInt_proj_0", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", - "projection_inverse_FStar.Pervasives.Native.None_a", - "projection_inverse_Prims.Nil_a", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", - "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_res", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_u", - "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", - "refinement_interpretation_Tm_refine_1c5e7105979a7231f04ad65b46c30b69", - "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_594c2e7ce8a09f39c084a6d39b86d7e6", - "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", - "token_correspondence_FStar.List.Tot.Base.map.fuel_instrumented", - "token_correspondence_Pulse.Syntax.Naming.freevars_st.fuel_instrumented", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.complement", - "typing_FStar.Set.mem", "typing_FStar.Set.singleton", - "typing_Pulse.Syntax.Base.ppname_default", - "typing_Pulse.Syntax.Naming.close_comp", - "typing_Pulse.Syntax.Naming.close_st_term", - "typing_Pulse.Syntax.Naming.freevars_st", - "typing_Pulse.Syntax.Pure.null_bvar", - "typing_Pulse.Syntax.Pure.tm_refine", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", - "typing_Pulse.Typing.Env.fstar_env", "typing_Pulse.Typing.mk_eq2", - "typing_tok_Pulse.Syntax.Base.Implicit@tok" - ], - 0, - "ec0e7c6eae5e8e2f99500992bea53332" - ], - [ - "Pulse.Checker.Bind.coerce_eq", - 1, - 2, - 2, - [ - "@MaxIFuel_assumption", "@query", - "refinement_interpretation_Tm_refine_0dee8cb03258a67c2f7ec66427696212" - ], - 0, - "b7940aec6b253565b3099a7115e1e011" - ], - [ - "Pulse.Checker.Bind.check_stapp_no_ctxt", - 1, - 2, - 2, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.dom" - ], - 0, - "400893fe43d421babfc92c126a5323ae" - ], - [ - "Pulse.Checker.Bind.check_bindv2", - 1, 1, 1, [ - "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_Pulse.Syntax.Naming.freevars_st.fuel_instrumented", - "@fuel_correspondence_Pulse.Syntax.Naming.subst_term.fuel_instrumented", - "@fuel_irrelevance_Pulse.Syntax.Naming.freevars_st.fuel_instrumented", - "@fuel_irrelevance_Pulse.Syntax.Naming.subst_term.fuel_instrumented", - "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "@MaxIFuel_assumption", "@query", "Pulse.Syntax.Base_pretyping_fe09dc1e796799f4bac0760e63f30d40", + "Pulse.Typing_pretyping_85b09ae4ef91823fbf549acd09fde244", "bool_inversion", "constructor_distinct_FStar.Pervasives.Native.None", - "constructor_distinct_FStar.Pervasives.Native.Some", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", - "constructor_distinct_Pulse.Syntax.Base.C_STGhost", - "constructor_distinct_Pulse.Syntax.Base.Tm_STApp", - "constructor_distinct_Pulse.Syntax.Base.Tm_Star", - "constructor_distinct_Pulse.Syntax.Base.Tm_VProp", - "constructor_distinct_Tm_unit", + "constructor_distinct_FStar.Tactics.Result.Failed", + "constructor_distinct_FStar.Tactics.Result.Success", "data_elim_FStar.Pervasives.Native.Some", - "data_elim_Pulse.Syntax.Base.Mkbinder", - "data_elim_Pulse.Syntax.Base.Mkppname", - "data_elim_Pulse.Syntax.Base.Mkterm", - "data_typing_intro_FStar.Pervasives.Native.Mktuple2@tok", - "data_typing_intro_Prims.Cons@tok", - "data_typing_intro_Prims.Nil@tok", - "data_typing_intro_Pulse.Syntax.Naming.DT@tok", + "data_elim_Pulse.Syntax.Base.Mkst_term", + "data_typing_intro_Pulse.Syntax.Base.Mkbinder@tok", "disc_equation_FStar.Pervasives.Native.None", "disc_equation_FStar.Pervasives.Native.Some", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "disc_equation_Pulse.Syntax.Base.Tm_STApp", "equation_FStar.Pervasives.Native.fst", "equation_FStar.Pervasives.Native.snd", "equation_FStar.Range.range", - "equation_FStar.Reflection.Typing.fstar_top_env", - "equation_FStar.Reflection.Typing.pp_name_t", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Sealed.Inhabited.sealed", - "equation_FStar.Sealed.Inhabited.sealed_", - "equation_FStar.Set.disjoint", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Prover.Common.op_Star", - "equation_Pulse.Prover.Substs.nt_subst_comp", - "equation_Pulse.Prover.Substs.nt_subst_term", - "equation_Pulse.Syntax.Base.comp_post", - "equation_Pulse.Syntax.Base.comp_pre", - "equation_Pulse.Syntax.Base.comp_res", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.index", - "equation_Pulse.Syntax.Base.nvar", - "equation_Pulse.Syntax.Base.ppname_default", - "equation_Pulse.Syntax.Base.range", - "equation_Pulse.Syntax.Base.st_comp_of_comp", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.tm_star", - "equation_Pulse.Syntax.Base.typ", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.index", + "equation_Pulse.Syntax.Base.range", "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.v_as_nv", - "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", - "equation_Pulse.Syntax.Base.with_range", - "equation_Pulse.Syntax.Naming.close_st_term", - "equation_Pulse.Syntax.Naming.open_st_term", - "equation_Pulse.Syntax.Naming.open_term", - "equation_Pulse.Syntax.Naming.open_term_", - "equation_Pulse.Syntax.Naming.open_term_nv", - "equation_Pulse.Syntax.Naming.subst", - "equation_Pulse.Syntax.Pure.term_of_nvar", - "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Syntax.Pure.tm_refine", "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.env_extends", "equation_Pulse.Typing.Env.extends_with", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.FV.set_minus", - "equation_Pulse.Typing.add_frame", "equation_Pulse.Typing.post_hint_for_env_p", "equation_Pulse.Typing.post_hint_opt", - "equation_with_fuel_Pulse.Syntax.Naming.subst_term.fuel_instrumented", "fuel_guarded_inversion_FStar.Pervasives.Native.option", "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.binder", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.ppname", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "function_token_typing_Prims.__cache_version_number__", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "function_token_typing_Prims.int", - "function_token_typing_Prims.string", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", - "int_typing", "kinding_Pulse.Syntax.Base.ppname@tok", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_typing", "kinding_Pulse.Syntax.Base.term@tok", - "kinding_Pulse.Syntax.Naming.subst_elt@tok", "kinding_Pulse.Typing.post_hint_t@tok", "lemma_FStar.Map.lemma_ContainsDom", - "lemma_FStar.Map.lemma_InDomConcat", "lemma_FStar.Pervasives.invertOption", - "lemma_FStar.Sealed.Inhabited.sealed_singleton", - "lemma_FStar.Set.disjoint_not_in_both", - "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", - "lemma_FStar.Set.mem_complement", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", "lemma_FStar.Set.mem_singleton", - "lemma_Pulse.Prover.Substs.nt_subst_comp_commutes", - "lemma_Pulse.Prover.Substs.nt_substs_st_comp_commutes", "lemma_Pulse.Syntax.Base.range_singleton", "lemma_Pulse.Typing.Env.env_extends_push", - "lemma_Pulse.Typing.Env.env_extends_trans", - "lemma_Pulse.Typing.Env.push_env_as_map", - "lemma_Pulse.Typing.Env.push_env_fstar_env", - "lemma_Pulse.Typing.FV.freevars_close_st_term", - "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", - "primitive_Prims.op_Equality", "primitive_Prims.op_Negation", + "lemma_Pulse.Typing.post_hint_for_env_extends", "proj_equation_FStar.Pervasives.Native.Mktuple2__1", "proj_equation_FStar.Pervasives.Native.Mktuple2__2", "proj_equation_FStar.Pervasives.Native.Some_v", - "proj_equation_Pulse.Syntax.Base.Mkbinder_binder_ppname", - "proj_equation_Pulse.Syntax.Base.Mknm_nm_ppname", - "proj_equation_Pulse.Syntax.Base.Mkppname_name", - "proj_equation_Pulse.Syntax.Base.Mkppname_range", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", - "proj_equation_Pulse.Syntax.Base.Mkterm_range", - "proj_equation_Pulse.Syntax.Base.Mkterm_t", + "proj_equation_Pulse.Syntax.Base.Mkst_term_range", "proj_equation_Pulse.Typing.Mkpost_hint_t_g", "projection_inverse_BoxBool_proj_0", "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", "projection_inverse_FStar.Pervasives.Native.None_a", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", - "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "projection_inverse_Pulse.Syntax.Base.Mknm_nm_ppname", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_res", - "projection_inverse_Pulse.Syntax.Base.Mkterm_range", - "projection_inverse_Pulse.Syntax.Base.Mkterm_t", - "projection_inverse_Pulse.Syntax.Base.Tm_STApp__0", - "projection_inverse_Pulse.Syntax.Base.Tm_Star_l", - "projection_inverse_Pulse.Syntax.Base.Tm_Star_r", - "refinement_interpretation_Tm_refine_022cb78a6ee11203777bc45bda05fa87", - "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", - "refinement_interpretation_Tm_refine_11adb7073077660f60fc8ed18a811d6a", - "refinement_interpretation_Tm_refine_25fe9861b42cf97d961ff4c8f44eb399", - "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", - "refinement_interpretation_Tm_refine_385f59c31213d29cc308b93df5d99dc9", + "projection_inverse_FStar.Tactics.Result.Failed_a", + "projection_inverse_FStar.Tactics.Result.Failed_exn", + "projection_inverse_FStar.Tactics.Result.Failed_ps", + "projection_inverse_FStar.Tactics.Result.Success_a", + "projection_inverse_FStar.Tactics.Result.Success_ps", + "projection_inverse_FStar.Tactics.Result.Success_v", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", - "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_70230ddc7d3969dfa444d2fd1b97e8a2", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "refinement_interpretation_Tm_refine_7ad5682d990eaec6510764d663af54de", + "refinement_interpretation_Tm_refine_594c2e7ce8a09f39c084a6d39b86d7e6", + "refinement_interpretation_Tm_refine_63dbd67f17741239afac25c89ad1839d", "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", - "refinement_interpretation_Tm_refine_b987068d3df72faa9662e383a7f51b75", "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", - "refinement_interpretation_Tm_refine_da369f128845038617bacd99a355825a", - "refinement_interpretation_Tm_refine_dd3396f06b5a01f3df9ed905e57d2aab", - "refinement_interpretation_Tm_refine_dd85081c02df7bec0c9b9cb99c6365d5", - "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", - "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "string_typing", - "token_correspondence_Pulse.Syntax.Naming.freevars_st.fuel_instrumented", - "typing_FStar.Map.contains", "typing_FStar.Reflection.V2.Data.var", - "typing_FStar.Sealed.seal", "typing_FStar.Set.complement", - "typing_FStar.Set.empty", "typing_FStar.Set.intersect", - "typing_FStar.Set.mem", "typing_FStar.Set.singleton", - "typing_Pulse.Prover.Common.extend_post_hint_opt_g", - "typing_Pulse.Prover.Substs.nt_subst_st_comp", - "typing_Pulse.Prover.Substs.nt_subst_term", - "typing_Pulse.Syntax.Base.__proj__Mkbinder__item__binder_ppname", - "typing_Pulse.Syntax.Base.__proj__Mkppname__item__name", - "typing_Pulse.Syntax.Base.__proj__Mkppname__item__range", - "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__post", - "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", - "typing_Pulse.Syntax.Base.comp_res", + "refinement_interpretation_Tm_refine_eed994d15518279ab75d745192d0d368", + "string_typing", "typing_FStar.Reflection.V2.Data.var", + "typing_FStar.Set.mem", + "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__range", "typing_Pulse.Syntax.Base.ppname_default", - "typing_Pulse.Syntax.Base.st_comp_of_comp", - "typing_Pulse.Syntax.Base.stateful_comp", - "typing_Pulse.Syntax.Base.tm_star", - "typing_Pulse.Syntax.Naming.close_st_term", - "typing_Pulse.Syntax.Naming.freevars_st", - "typing_Pulse.Syntax.Pure.term_of_nvar", + "typing_Pulse.Syntax.Pure.null_bvar", + "typing_Pulse.Syntax.Pure.tm_refine", "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", - "typing_Pulse.Typing.Env.fstar_env", - "typing_Pulse.Typing.Env.push_binding", - "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g" + "typing_Pulse.Typing.Env.fresh", + "typing_Pulse.Typing.Env.push_context", "typing_Pulse.Typing.mk_eq2" ], 0, - "839053cf9bb412e94ed75e05cc958830" + "c9928bb5771003a81e5ac7ea4fa9b82a" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Bind.fsti b/lib/steel/pulse/Pulse.Checker.Bind.fsti index 212d8d598..e0247b34b 100644 --- a/lib/steel/pulse/Pulse.Checker.Bind.fsti +++ b/lib/steel/pulse/Pulse.Checker.Bind.fsti @@ -1,27 +1,27 @@ module Pulse.Checker.Bind -module RT = FStar.Reflection.Typing -module R = FStar.Reflection.V2 -module L = FStar.List.Tot + module T = FStar.Tactics.V2 -open FStar.List.Tot + open Pulse.Syntax -open Pulse.Elaborate.Pure open Pulse.Typing -open Pulse.Checker.Common +open Pulse.Checker.Base -val check_bind (g:env) - (t:st_term{Tm_Bind? t.term}) - (pre:term) - (pre_typing:tot_typing g pre tm_vprop) - (post_hint:post_hint_opt g) - (check:check_t) +val check_bind + (g:env) + (pre:term) + (pre_typing:tot_typing g pre tm_vprop) + (post_hint:post_hint_opt g) + (res_ppname:ppname) + (t:st_term{Tm_Bind? t.term}) + (check:check_t) : T.Tac (checker_result_t g pre post_hint) val check_tot_bind (g:env) - (t:st_term{Tm_TotBind? t.term}) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) + (res_ppname:ppname) + (t:st_term { Tm_TotBind? t.term }) (check:check_t) : T.Tac (checker_result_t g pre post_hint) diff --git a/lib/steel/pulse/Pulse.Checker.Bind.fsti.hints b/lib/steel/pulse/Pulse.Checker.Bind.fsti.hints index 97c04f5d7..843a053de 100644 --- a/lib/steel/pulse/Pulse.Checker.Bind.fsti.hints +++ b/lib/steel/pulse/Pulse.Checker.Bind.fsti.hints @@ -1 +1 @@ -[ "\u0017U\u0015k90", [] ] \ No newline at end of file +[ "^nԢ`\u001e!#h", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Common.fst b/lib/steel/pulse/Pulse.Checker.Common.fst deleted file mode 100644 index 9093d4c90..000000000 --- a/lib/steel/pulse/Pulse.Checker.Common.fst +++ /dev/null @@ -1,186 +0,0 @@ -module Pulse.Checker.Common -module T = FStar.Tactics.V2 -module RT = FStar.Reflection.Typing -module Metatheory = Pulse.Typing.Metatheory -module CP = Pulse.Checker.Pure -module RU = Pulse.RuntimeUtils -module FV = Pulse.Typing.FV -module P = Pulse.Syntax.Printer - -let format_failed_goal (g:env) (ctxt:list term) (goal:list term) = - let terms_to_strings (ts:list term)= T.map Pulse.Syntax.Printer.term_to_string ts in - let numbered_list ss = - let _, s = T.fold_left (fun (i, acc) s -> (i+1, Printf.sprintf "%d. %s" i s :: acc)) (1, []) ss in - String.concat "\n " (List.rev s) - in - let format_terms (ts:list term) = numbered_list (terms_to_strings ts) in - Printf.sprintf - "Failed to prove the following goals:\n \ - %s\n\ - The remaining conjuncts in the separation logic context available for use are:\n \ - %s\n\ - The typing context is:\n \ - %s\n" - (format_terms goal) - (format_terms ctxt) - (env_to_string g) - - -let mk_arrow ty t = RT.mk_arrow (elab_term ty) T.Q_Explicit (elab_term t) -let mk_abs ty t = RT.(mk_abs (elab_term ty) T.Q_Explicit (elab_term t)) - -let post_typing_as_abstraction (#g:env) (#x:var) (#ty:term) (#t:term { fresh_wrt x g (freevars t) }) - (_:tot_typing (push_binding g x ppname_default ty) (open_term t x) tm_vprop) - : FStar.Ghost.erased (RT.tot_typing (elab_env g) (mk_abs ty t) (mk_arrow ty tm_vprop)) - = admit() - -let intro_post_hint g ret_ty_opt post = - let x = fresh g in - let ret_ty = - match ret_ty_opt with - | None -> tm_fstar RT.unit_ty FStar.Range.range_0 - | Some t -> t - in - let ret_ty, _ = CP.instantiate_term_implicits g ret_ty in - let (| u, ty_typing |) = CP.check_universe g ret_ty in - let (| post, post_typing |) = CP.check_vprop (push_binding g x ppname_default ret_ty) (open_term_nv post (v_as_nv x)) in - let post' = close_term post x in - Pulse.Typing.FV.freevars_close_term post x 0; - assume (open_term post' x == post); - { g; ret_ty; u; ty_typing; post=post'; post_typing=post_typing_as_abstraction #_ #_ #_ #post' post_typing } - -let post_hint_from_comp_typing #g #c ct = - let st_comp_typing = Metatheory.comp_typing_inversion ct in - let (| ty_typing, pre_typing, x, post_typing |) = Metatheory.st_comp_typing_inversion st_comp_typing in - let p : post_hint_t = - { g; ret_ty = comp_res c; u=comp_u c; - ty_typing=ty_typing; - post=comp_post c; - post_typing=post_typing_as_abstraction post_typing } - in - p - -let try_frame_pre (#g:env) - (#t:st_term) - (#pre:term) - (pre_typing: tot_typing g pre tm_vprop) - (#c:comp_st) - (t_typing: st_typing g t c) - : T.Tac (c':comp_st { comp_pre c' == pre } & - st_typing g t c') - = let g = CP.push_context "try_frame_pre" t.range g in - if RU.debug_at_level (fstar_env g) "try_frame" - then T.print (Printf.sprintf "(Try frame@%s) with %s\n\tcomp=%s,\n\tpre=%s\n" - (T.range_to_string t.range) - (print_context g) - (P.comp_to_string c) - (P.term_to_string pre)); - match Pulse.Checker.Framing.try_frame_pre #g pre_typing t_typing with - | Inl ok -> ok - | Inr fail -> T.raise (Framing_failure fail) - -#push-options "--z3rlimit_factor 2" -let replace_equiv_post - (r:range) - (g:env) - (c:comp{stateful_comp c /\ freevars_comp c `Set.subset` FV.vars_of_env g}) - (ct:Metatheory.comp_typing_u g c) - (post_hint:post_hint_opt g) - : T.Tac (c1:comp { stateful_comp c1 /\ comp_pre c1 == comp_pre c /\ comp_post_matches_hint c1 post_hint } & - st_equiv g c c1) - = let g = CP.push_context "replace_equiv_post" r g in - let {u=u_c;res=res_c;pre=pre_c;post=post_c} = st_comp_of_comp c in - let st_typing = Metatheory.comp_typing_inversion ct in - let (| res_c_typing, pre_c_typing, x, post_c_typing |) = Metatheory.st_comp_typing_inversion st_typing in - let px = v_as_nv x in - let g_post = push_binding g x (fst px) res_c in - let post_c_opened = open_term_nv post_c px in - match post_hint with - | None -> - (| c, - ST_VPropEquiv - g c c x pre_c_typing res_c_typing post_c_typing - (VE_Refl _ _) - (VE_Refl _ _) |) - | Some post -> - if not (eq_univ u_c post.u && - eq_tm res_c post.ret_ty) - then fail g None - (Printf.sprintf "(%s) Inferred result type does not match annotation.\n\ - Expected type %s\n\ - Got type %s\n" - (T.range_to_string r) - (P.term_to_string post.ret_ty) - (P.term_to_string res_c)) - else if (x `Set.mem` freevars post.post) - then fail g None "Unexpected variable clash with annotated postcondition" - else ( - let post_opened = open_term_nv post.post px in - let post_c_post_eq - : vprop_equiv g_post post_c_opened post_opened - = Pulse.Checker.Framing.check_vprop_equiv - (CP.push_context "check_vprop_equiv" r g_post) - post_c_opened - post_opened - post_c_typing - in - let st_comp_with_post : st_comp = { - u=u_c; - res=res_c; - pre=pre_c; - post=close_term post_opened x - } in - let c_with_post = c `with_st_comp` st_comp_with_post in - assume (close_term post_opened x == post.post); - assume (open_term (close_term post_opened x) x == post_opened); - (| c_with_post, - ST_VPropEquiv - g c c_with_post x pre_c_typing res_c_typing post_c_typing - (VE_Refl _ _) - post_c_post_eq |) - ) -#pop-options - -let repack (#g:env) (#pre:term) (#t:st_term) - (x:(c:comp_st { comp_pre c == pre } & st_typing g t c)) - (post_hint:post_hint_opt g) - : T.Tac (checker_result_t g pre post_hint) - = let (| c, d_c |) = x in - if stateful_comp c - then ( - FV.st_typing_freevars d_c; - let (| c1, c_c1_eq |) = replace_equiv_post t.range g c (Metatheory.st_typing_correctness d_c) post_hint in - (| t, c1, T_Equiv _ _ _ _ d_c c_c1_eq |) - ) - else (| t, c, d_c |) - -let intro_comp_typing (g:env) - (c:comp_st) - (pre_typing:tot_typing g (comp_pre c) tm_vprop) - (res_typing:universe_of g (comp_res c) (comp_u c)) - (x:var { fresh_wrt x g (freevars (comp_post c)) }) - (post_typing:tot_typing (push_binding g x ppname_default (comp_res c)) (open_term (comp_post c) x) tm_vprop) - : T.Tac (comp_typing g c (comp_u c)) - = let intro_st_comp_typing (st:st_comp { comp_u c == st.u /\ - comp_pre c == st.pre /\ - comp_res c == st.res /\ - comp_post c == st.post } ) - : T.Tac (st_comp_typing g st) - = STC g st x res_typing pre_typing post_typing - in - match c with - | C_ST st -> - let stc = intro_st_comp_typing st in - CT_ST _ _ stc - | C_STAtomic i st -> - let stc = intro_st_comp_typing st in - let (| ty, i_typing |) = CP.core_check_term g i in - if not (eq_tm ty tm_inames) - then fail g None "Ill-typed inames" - else CT_STAtomic _ _ _ (E i_typing) stc - | C_STGhost i st -> - let stc = intro_st_comp_typing st in - let (| ty, i_typing |) = CP.core_check_term g i in - if not (eq_tm ty tm_inames) - then fail g None "Ill-typed inames" - else CT_STGhost _ _ _ (E i_typing) stc diff --git a/lib/steel/pulse/Pulse.Checker.Common.fst.hints b/lib/steel/pulse/Pulse.Checker.Common.fst.hints deleted file mode 100644 index 3be2c553b..000000000 --- a/lib/steel/pulse/Pulse.Checker.Common.fst.hints +++ /dev/null @@ -1,598 +0,0 @@ -[ - "ᘩ*<\u000eNx\u0013", - [ - [ - "Pulse.Checker.Common.format_failed_goal", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "string_typing" - ], - 0, - "96133ed9ca62519d6c682f3c3533bb0f" - ], - [ - "Pulse.Checker.Common.post_typing_as_abstraction", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "disc_equation_FStar.Pervasives.Native.None", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", "int_inversion", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_d3a18586d45f1194501142180a9c9338", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "c32d07ba71619b9ff419f41d16717ddb" - ], - [ - "Pulse.Checker.Common.intro_post_hint", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "constructor_distinct_FStar.Pervasives.Native.None", - "constructor_distinct_FStar.Pervasives.Native.Some", - "constructor_distinct_FStar.Reflection.V2.Data.Tv_FVar", - "constructor_distinct_FStar.Reflection.V2.Data.Tv_Unknown", - "data_elim_Pulse.Syntax.Base.Mkterm", - "data_typing_intro_FStar.Reflection.V2.Data.Tv_FVar@tok", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_FStar.Pervasives.Native.Some", - "equality_tok_FStar.Reflection.V2.Data.Tv_Unknown@tok", - "equation_FStar.Range.range", - "equation_FStar.Reflection.Typing.fstar_top_env", - "equation_FStar.Reflection.Typing.unit_ty", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Syntax.Base.not_tv_unknown", - "equation_Pulse.Syntax.Base.range", "equation_Pulse.Syntax.Base.typ", - "equation_Pulse.Syntax.Base.universe", - "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Syntax.Naming.close_term", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.FV.set_minus", - "equation_Pulse.Typing.fresh_wrt", - "equation_Pulse.Typing.post_hint_for_env_p", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_typing", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "lemma_FStar.Pervasives.invertOption", - "lemma_FStar.Reflection.Typing.inspect_pack", - "lemma_FStar.Set.mem_complement", "lemma_FStar.Set.mem_intersect", - "lemma_FStar.Set.mem_singleton", - "lemma_Pulse.Syntax.Base.range_singleton", - "lemma_Pulse.Typing.Env.env_extends_refl", - "primitive_Prims.op_AmpAmp", "primitive_Prims.op_Equality", - "primitive_Prims.op_Negation", - "proj_equation_Pulse.Typing.Mkpost_hint_t_g", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Native.None_a", - "projection_inverse_FStar.Pervasives.Native.Some_a", - "projection_inverse_FStar.Pervasives.Native.Some_v", - "projection_inverse_Pulse.Typing.Mkpost_hint_t_g", - "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", - "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", - "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", - "typing_FStar.Reflection.Typing.unit_fv", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.complement", - "typing_FStar.Set.singleton", - "typing_Pulse.Syntax.Base.ppname_default", - "typing_Pulse.Syntax.Naming.freevars", - "typing_Pulse.Typing.Env.as_map", - "typing_Pulse.Typing.Env.fstar_env", - "typing_Pulse.Typing.Env.push_binding" - ], - 0, - "b751e789d7c82d6ae4c1ce6e75925984" - ], - [ - "Pulse.Checker.Common.post_hint_from_comp_typing", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", - "constructor_distinct_Pulse.Syntax.Base.C_STGhost", - "constructor_distinct_Pulse.Syntax.Base.C_Tot", - "data_elim_FStar.Pervasives.Mkdtuple4", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.comp_post", - "equation_Pulse.Syntax.Base.comp_res", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.comp_u", - "equation_Pulse.Syntax.Base.st_comp_of_comp", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Syntax.Pure.tm_type", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.Metatheory.comp_typing_u", - "equation_Pulse.Typing.fresh_wrt", - "equation_Pulse.Typing.post_hint_for_env_p", - "equation_Pulse.Typing.tot_typing", "equation_Pulse.Typing.typing", - "equation_Pulse.Typing.universe_of", - "fuel_guarded_inversion_FStar.Pervasives.dtuple4", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Typing.comp_typing", - "fuel_guarded_inversion_Pulse.Typing.my_erased", - "fuel_guarded_inversion_Pulse.Typing.st_comp_typing", - "interpretation_Tm_abs_9627aa63c90056f8b614da4dfb4d20bf", - "interpretation_Tm_abs_c8631188b49e797b2c9232f71b480642", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "lemma_Pulse.Typing.Env.env_extends_refl", - "primitive_Prims.op_BarBar", - "proj_equation_Pulse.Typing.Mkpost_hint_t_g", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Mkdtuple4__1", - "projection_inverse_FStar.Pervasives.Mkdtuple4__3", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", - "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "projection_inverse_Pulse.Syntax.Base.C_Tot__0", - "projection_inverse_Pulse.Typing.Mkpost_hint_t_g", - "refinement_interpretation_Tm_refine_2e7859babf6dc4b57292f015e044869d", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", - "typing_Pulse.Typing.Metatheory.st_comp_typing_inversion" - ], - 0, - "ff054e619c31fd1dcb33db601a043ce2" - ], - [ - "Pulse.Checker.Common.__proj__Framing_failure__item__uu___", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "refinement_interpretation_Tm_refine_cb9415d59c3dfafcf5b6b01ae402ee00" - ], - 0, - "2139fd61b189394ae982cf6c2d97b8c9" - ], - [ - "Pulse.Checker.Common.try_frame_pre", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "92df784a78ffba71db9f50d512d40493" - ], - [ - "Pulse.Checker.Common.try_frame_pre", - 2, - 2, - 2, - [ - "@MaxIFuel_assumption", "@query", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "constructor_distinct_FStar.Pervasives.Native.Some", - "constructor_distinct_FStar.Tactics.Result.Failed", - "constructor_distinct_FStar.Tactics.Result.Success", - "data_elim_FStar.Tactics.Result.Success", - "disc_equation_FStar.Pervasives.Inl", - "disc_equation_FStar.Pervasives.Inr", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_FStar.Reflection.Typing.fstar_top_env", - "equation_Pulse.Checker.Pure.push_context", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_FStar.Pervasives.either", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", - "function_token_typing_Prims.__cache_version_number__", - "int_inversion", "primitive_Prims.op_BarBar", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Tactics.Result.Failed_a", - "projection_inverse_FStar.Tactics.Result.Failed_exn", - "projection_inverse_FStar.Tactics.Result.Failed_ps", - "projection_inverse_FStar.Tactics.Result.Success_a", - "projection_inverse_FStar.Tactics.Result.Success_ps", - "projection_inverse_FStar.Tactics.Result.Success_v", - "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "refinement_interpretation_Tm_refine_7f3ad0958305f2921bfac06f466396ae", - "string_typing", "typing_Pulse.Checker.Pure.push_context", - "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__range", - "typing_Pulse.Typing.Env.fstar_env" - ], - 0, - "990dc63d87429f5072c7ad0ac2fe80f4" - ], - [ - "Pulse.Checker.Common.checker_result_t", - 1, - 2, - 1, - [ - "@query", "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.stateful_comp", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0" - ], - 0, - "cbc932653ea96d77e387bee7ba00118e" - ], - [ - "Pulse.Checker.Common.replace_equiv_post", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.var", "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" - ], - 0, - "a53f61b606721f00014c12c7b2507ca2" - ], - [ - "Pulse.Checker.Common.replace_equiv_post", - 2, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "Pulse.Syntax.Base_pretyping_b015b044c5bf00a3dd3df9fa711c87dd", - "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.None", - "constructor_distinct_FStar.Pervasives.Native.Some", - "constructor_distinct_FStar.Tactics.Result.Failed", - "constructor_distinct_FStar.Tactics.Result.Success", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", - "constructor_distinct_Pulse.Syntax.Base.C_STGhost", - "constructor_distinct_Pulse.Syntax.Base.C_Tot", - "constructor_distinct_Tm_unit", - "data_elim_FStar.Pervasives.Mkdtuple4", - "data_elim_Pulse.Syntax.Base.Mkst_comp", - "data_elim_Pulse.Typing.Mkpost_hint_t", "data_elim_Pulse.Typing.STC", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_FStar.Pervasives.Native.fst", - "equation_FStar.Pervasives.Native.snd", - "equation_FStar.Reflection.Typing.fstar_top_env", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Checker.Pure.push_context", - "equation_Pulse.Syntax.Base.comp_post", - "equation_Pulse.Syntax.Base.comp_pre", - "equation_Pulse.Syntax.Base.comp_res", - "equation_Pulse.Syntax.Base.comp_u", - "equation_Pulse.Syntax.Base.ppname_default", - "equation_Pulse.Syntax.Base.range", - "equation_Pulse.Syntax.Base.st_comp_of_comp", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.typ", - "equation_Pulse.Syntax.Base.universe", - "equation_Pulse.Syntax.Base.v_as_nv", - "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", - "equation_Pulse.Syntax.Base.with_st_comp", - "equation_Pulse.Syntax.Naming.open_term", - "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.env_extends", - "equation_Pulse.Typing.Env.extends_with", - "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.FV.vars_of_env", - "equation_Pulse.Typing.Metatheory.comp_typing_u", - "equation_Pulse.Typing.comp_post_matches_hint", - "equation_Pulse.Typing.fresh_wrt", - "equation_Pulse.Typing.post_hint_for_env_p", - "equation_Pulse.Typing.post_hint_opt", - "equation_Pulse.Typing.st_equiv_pre", - "fuel_guarded_inversion_FStar.Pervasives.Native.option", - "fuel_guarded_inversion_FStar.Pervasives.dtuple4", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.st_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "fuel_guarded_inversion_Pulse.Typing.comp_typing", - "fuel_guarded_inversion_Pulse.Typing.post_hint_t", - "fuel_guarded_inversion_Pulse.Typing.st_comp_typing", - "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_typing", - "interpretation_Tm_abs_9627aa63c90056f8b614da4dfb4d20bf", - "interpretation_Tm_abs_c8631188b49e797b2c9232f71b480642", - "kinding_Pulse.Syntax.Base.term@tok", - "kinding_Pulse.Typing.post_hint_t@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "lemma_FStar.Map.lemma_InDomConcat", - "lemma_FStar.Pervasives.invertOption", - "lemma_Pulse.Syntax.Base.range_singleton", - "lemma_Pulse.Typing.Env.push_env_as_map", - "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", - "primitive_Prims.op_Negation", - "proj_equation_FStar.Pervasives.Native.Mktuple2__1", - "proj_equation_FStar.Pervasives.Native.Mktuple2__2", - "proj_equation_FStar.Pervasives.Native.Some_v", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_u", - "proj_equation_Pulse.Typing.Mkpost_hint_t_g", - "proj_equation_Pulse.Typing.Mkpost_hint_t_post", - "proj_equation_Pulse.Typing.Mkpost_hint_t_ret_ty", - "proj_equation_Pulse.Typing.Mkpost_hint_t_u", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Mkdtuple4__3", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", - "projection_inverse_FStar.Pervasives.Native.None_a", - "projection_inverse_FStar.Pervasives.Native.Some_a", - "projection_inverse_FStar.Pervasives.Native.Some_v", - "projection_inverse_FStar.Tactics.Result.Failed_a", - "projection_inverse_FStar.Tactics.Result.Failed_exn", - "projection_inverse_FStar.Tactics.Result.Failed_ps", - "projection_inverse_FStar.Tactics.Result.Success_a", - "projection_inverse_FStar.Tactics.Result.Success_ps", - "projection_inverse_FStar.Tactics.Result.Success_v", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", - "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_res", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_u", - "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", - "refinement_interpretation_Tm_refine_1ebc14846ea58b0c42f9adb9ef1a7020", - "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", - "refinement_interpretation_Tm_refine_2e7859babf6dc4b57292f015e044869d", - "refinement_interpretation_Tm_refine_385f59c31213d29cc308b93df5d99dc9", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", - "refinement_interpretation_Tm_refine_6067909eb7e26441b043722acc4cd3cf", - "refinement_interpretation_Tm_refine_7f3ad0958305f2921bfac06f466396ae", - "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", - "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", - "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", - "refinement_interpretation_Tm_refine_eed994d15518279ab75d745192d0d368", - "refinement_interpretation_Tm_refine_f0ac051651fa0e095f1b2c1241fd6a3f", - "string_typing", "typing_FStar.Map.contains", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Checker.Pure.push_context", - "typing_Pulse.Syntax.Base.comp_post", - "typing_Pulse.Syntax.Base.comp_pre", - "typing_Pulse.Syntax.Base.eq_tm", "typing_Pulse.Syntax.Base.eq_univ", - "typing_Pulse.Syntax.Base.ppname_default", - "typing_Pulse.Syntax.Base.stateful_comp", - "typing_Pulse.Syntax.Naming.freevars", - "typing_Pulse.Typing.Env.as_map", - "typing_Pulse.Typing.Env.fstar_env", - "typing_Pulse.Typing.Env.lookup", - "typing_Pulse.Typing.Env.push_binding", - "typing_Pulse.Typing.Env.push_context", - "typing_Pulse.Typing.FV.vars_of_env", - "typing_Pulse.Typing.Metatheory.st_comp_typing_inversion", - "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g" - ], - 0, - "835169538c1b8c97ac67ddf2dec42c96" - ], - [ - "Pulse.Checker.Common.repack", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "5cad6c3661305298edb04cc609133b1c" - ], - [ - "Pulse.Checker.Common.repack", - 2, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "20ff140d35cb2c009e9aaa33f637cbde" - ], - [ - "Pulse.Checker.Common.repack", - 3, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "data_elim_Prims.Mkdtuple2", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Prims.dtuple2", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "projection_inverse_Prims.Mkdtuple2__1", - "refinement_interpretation_Tm_refine_0a5678adec44ccf7c0512ea4c204c388", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "98c3accd66426e95e3aa009b2ab359c4" - ], - [ - "Pulse.Checker.Common.intro_comp_typing", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", "primitive_Prims.op_BarBar", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "refinement_interpretation_Tm_refine_fbeb4eb12902ab763889d17cad7e9920", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "9eb1befed2bab416ae3126362c4678b1" - ], - [ - "Pulse.Checker.Common.intro_comp_typing", - 2, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", "primitive_Prims.op_BarBar", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "refinement_interpretation_Tm_refine_fbeb4eb12902ab763889d17cad7e9920", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "5bedecc1a772fb96f6623ec0bebc2ec2" - ], - [ - "Pulse.Checker.Common.intro_comp_typing", - 3, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_post", - "equation_Pulse.Syntax.Base.comp_pre", - "equation_Pulse.Syntax.Base.comp_res", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.comp_u", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.tm_inames", - "equation_Pulse.Typing.fresh_wrt", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "primitive_Prims.op_BarBar", "primitive_Prims.op_Negation", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", - "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "refinement_interpretation_Tm_refine_b1a323d97082b88bad74885f3f1e4f57", - "refinement_interpretation_Tm_refine_f0ac051651fa0e095f1b2c1241fd6a3f", - "refinement_interpretation_Tm_refine_fbeb4eb12902ab763889d17cad7e9920", - "typing_Pulse.Syntax.Base.eq_tm", - "typing_Pulse.Syntax.Base.tm_inames" - ], - 0, - "4dca99fdbd77a1cc646c8f558499af6c" - ] - ] -] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Common.fsti b/lib/steel/pulse/Pulse.Checker.Common.fsti deleted file mode 100644 index b902951f8..000000000 --- a/lib/steel/pulse/Pulse.Checker.Common.fsti +++ /dev/null @@ -1,59 +0,0 @@ -module Pulse.Checker.Common -module RT = FStar.Reflection.Typing -module R = FStar.Reflection.V2 -module L = FStar.List.Tot -module T = FStar.Tactics.V2 -open FStar.List.Tot -open Pulse.Syntax -open Pulse.Typing -module FV = Pulse.Typing.FV -module RU = Pulse.RuntimeUtils -module Metatheory = Pulse.Typing.Metatheory - -val format_failed_goal (g:env) (ctxt:list term) (goal:list term) : T.Tac string - -// let mk_abs ty t = RT.(mk_abs (elab_term ty) T.Q_Explicit (elab_term t)) -// let mk_arrow ty t = RT.mk_arrow (elab_term ty) T.Q_Explicit (elab_term t) - -val intro_post_hint (g:env) (ret_ty:option term) (post:term) - : T.Tac (post_hint_for_env g) - -val post_hint_from_comp_typing (#g:env) (#c:comp_st) (ct:Metatheory.comp_typing_u g c) - : post_hint_for_env g - -exception Framing_failure of Pulse.Checker.Framing.framing_failure - -val try_frame_pre (#g:env) - (#t:st_term) - (#pre:term) - (pre_typing: tot_typing g pre tm_vprop) - (#c:comp_st) - (t_typing: st_typing g t c) - : T.Tac (c':comp_st { comp_pre c' == pre } & - st_typing g t c') - -type checker_result_t (g:env) (ctxt:term) (post_hint:option post_hint_t) = - t:st_term & - c:comp{stateful_comp c ==> (comp_pre c == ctxt /\ comp_post_matches_hint c post_hint) } & - st_typing g t c - -type check_t = - g:env -> - t:st_term -> - pre:term -> - pre_typing:tot_typing g pre tm_vprop -> - post_hint:post_hint_opt g -> - T.Tac (checker_result_t g pre post_hint) - -val repack (#g:env) (#pre:term) (#t:st_term) - (x:(c:comp_st { comp_pre c == pre } & st_typing g t c)) - (post_hint:post_hint_opt g) - : T.Tac (checker_result_t g pre post_hint) - -val intro_comp_typing (g:env) - (c:comp_st) - (pre_typing:tot_typing g (comp_pre c) tm_vprop) - (res_typing:universe_of g (comp_res c) (comp_u c)) - (x:var { fresh_wrt x g (freevars (comp_post c)) }) - (post_typing:tot_typing (push_binding g x ppname_default (comp_res c)) (open_term (comp_post c) x) tm_vprop) - : T.Tac (comp_typing g c (comp_u c)) diff --git a/lib/steel/pulse/Pulse.Checker.Common.fsti.hints b/lib/steel/pulse/Pulse.Checker.Common.fsti.hints deleted file mode 100644 index 8d346bb16..000000000 --- a/lib/steel/pulse/Pulse.Checker.Common.fsti.hints +++ /dev/null @@ -1,104 +0,0 @@ -[ - "\t^F K\b", - [ - [ - "Pulse.Checker.Common.__proj__Framing_failure__item__uu___", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "refinement_interpretation_Tm_refine_cb9415d59c3dfafcf5b6b01ae402ee00" - ], - 0, - "173cf26fa06b3234ea511c3ac2902a11" - ], - [ - "Pulse.Checker.Common.try_frame_pre", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "92df784a78ffba71db9f50d512d40493" - ], - [ - "Pulse.Checker.Common.checker_result_t", - 1, - 2, - 1, - [ - "@query", "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.stateful_comp", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0" - ], - 0, - "cbc932653ea96d77e387bee7ba00118e" - ], - [ - "Pulse.Checker.Common.repack", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "6580b1b2b259ef54cb3fe2237e2f072e" - ], - [ - "Pulse.Checker.Common.intro_comp_typing", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", "primitive_Prims.op_BarBar", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "refinement_interpretation_Tm_refine_fbeb4eb12902ab763889d17cad7e9920", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "9eb1befed2bab416ae3126362c4678b1" - ] - ] -] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Comp.fst b/lib/steel/pulse/Pulse.Checker.Comp.fst index 3504418e5..43e022f81 100644 --- a/lib/steel/pulse/Pulse.Checker.Comp.fst +++ b/lib/steel/pulse/Pulse.Checker.Comp.fst @@ -1,27 +1,31 @@ module Pulse.Checker.Comp -module T = FStar.Tactics.V2 -module RT = FStar.Reflection.Typing - open Pulse.Syntax open Pulse.Typing open Pulse.Checker.Pure -open Pulse.Checker.Common -module FV = Pulse.Typing.FV +module T = FStar.Tactics.V2 +module P = Pulse.Syntax.Printer -let check_comp (g:env) - (c:comp_st) - (pre_typing:tot_typing g (comp_pre c) tm_vprop) +let check (g:env) + (c:comp_st) + (pre_typing:tot_typing g (comp_pre c) tm_vprop) : T.Tac (comp_typing g c (comp_u c)) - = let check_st_comp (st:st_comp { comp_u c == st.u /\ + = let g = Pulse.Typing.Env.push_context_no_range g "check_comp" in + + let check_st_comp (st:st_comp { comp_u c == st.u /\ comp_pre c == st.pre /\ comp_res c == st.res /\ comp_post c == st.post } ) : T.Tac (st_comp_typing g st) = let (| u, t_u |) = check_universe g st.res in if not (eq_univ u (comp_u c)) - then fail g None "Unexpected universe" + then fail g None + (Printf.sprintf "check_comp: computed universe of %s as %s, whereas annotated as %s" + (P.term_to_string st.res) + (P.univ_to_string u) + (P.univ_to_string (comp_u c))) + else ( let x = fresh g in let px = v_as_nv x in @@ -29,7 +33,8 @@ let check_comp (g:env) let gx = push_binding g x (fst px) st.res in let (| ty, post_typing |) = core_check_term gx (open_term_nv (comp_post c) px) in if not (eq_tm ty tm_vprop) - then fail g None "Ill-typed postcondition" + then fail g None + (Printf.sprintf "check_comp: ill-typed postcondition %s" (P.term_to_string (comp_post c))) else ( assert (ty == tm_vprop); STC g st x t_u pre_typing (E post_typing) @@ -44,11 +49,15 @@ let check_comp (g:env) let stc = check_st_comp st in let (| ty, i_typing |) = core_check_term g i in if not (eq_tm ty tm_inames) - then fail g None "Ill-typed inames" + then fail g None + (Printf.sprintf "check_comp: type of inames term %s is %s, expected %s" + (P.term_to_string i) (P.term_to_string ty) (P.term_to_string tm_inames)) else CT_STAtomic _ _ _ (E i_typing) stc | C_STGhost i st -> let stc = check_st_comp st in let (| ty, i_typing |) = core_check_term g i in if not (eq_tm ty tm_inames) - then fail g None "Ill-typed inames" - else CT_STGhost _ _ _ (E i_typing) stc \ No newline at end of file + then fail g None + (Printf.sprintf "check_comp: type of inames term %s is %s, expected %s" + (P.term_to_string i) (P.term_to_string ty) (P.term_to_string tm_inames)) + else CT_STGhost _ _ _ (E i_typing) stc diff --git a/lib/steel/pulse/Pulse.Checker.Comp.fst.hints b/lib/steel/pulse/Pulse.Checker.Comp.fst.hints index 7110dd26d..f4ef9eef8 100644 --- a/lib/steel/pulse/Pulse.Checker.Comp.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.Comp.fst.hints @@ -1,8 +1,8 @@ [ - "woQ2ԥ:2", + "᷋CC`$t:", [ [ - "Pulse.Checker.Comp.check_comp", + "Pulse.Checker.Comp.check", 1, 2, 1, @@ -19,10 +19,10 @@ "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" ], 0, - "94277e5de486e56e87d18310b9fe2fdd" + "24666984abe0e119f1746676b60418e1" ], [ - "Pulse.Checker.Comp.check_comp", + "Pulse.Checker.Comp.check", 2, 2, 1, @@ -42,13 +42,17 @@ "72eb7644b062dd39bfba5c49fe07b153" ], [ - "Pulse.Checker.Comp.check_comp", + "Pulse.Checker.Comp.check", 3, 2, 1, [ - "@MaxIFuel_assumption", "@query", "bool_inversion", + "@MaxIFuel_assumption", "@query", + "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", "bool_inversion", "constructor_distinct_FStar.Pervasives.Native.None", + "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_FStar.Tactics.Result.Failed", + "constructor_distinct_FStar.Tactics.Result.Success", "constructor_distinct_Pulse.Syntax.Base.C_ST", "disc_equation_FStar.Pervasives.Native.None", "disc_equation_Pulse.Syntax.Base.C_ST", @@ -57,6 +61,7 @@ "disc_equation_Pulse.Syntax.Base.C_Tot", "equation_FStar.Pervasives.Native.fst", "equation_FStar.Pervasives.Native.snd", + "equation_FStar.Reflection.Typing.fstar_top_env", "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", "equation_Prims.nat", "equation_Pulse.Syntax.Base.comp_post", "equation_Pulse.Syntax.Base.comp_pre", @@ -73,8 +78,9 @@ "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", "fuel_guarded_inversion_FStar.Tactics.Result.__result", "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "function_token_typing_Prims.__cache_version_number__", "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", "lemma_FStar.Map.lemma_ContainsDom", "primitive_Prims.op_BarBar", "primitive_Prims.op_Negation", @@ -84,23 +90,34 @@ "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", "projection_inverse_FStar.Pervasives.Native.None_a", + "projection_inverse_FStar.Tactics.Result.Failed_a", + "projection_inverse_FStar.Tactics.Result.Failed_exn", + "projection_inverse_FStar.Tactics.Result.Failed_ps", + "projection_inverse_FStar.Tactics.Result.Success_a", + "projection_inverse_FStar.Tactics.Result.Success_ps", + "projection_inverse_FStar.Tactics.Result.Success_v", "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_76d7c7ff95222e5f6fb2057459f0bce4", "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", "refinement_interpretation_Tm_refine_b1a323d97082b88bad74885f3f1e4f57", + "refinement_interpretation_Tm_refine_c556d8c6ca97b6a4ca0a5af8ca937017", + "refinement_interpretation_Tm_refine_eed994d15518279ab75d745192d0d368", "refinement_interpretation_Tm_refine_f0ac051651fa0e095f1b2c1241fd6a3f", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Syntax.Base.eq_tm", + "string_typing", "typing_FStar.Reflection.V2.Data.var", + "typing_FStar.Set.mem", + "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__u", + "typing_Pulse.Syntax.Base.eq_tm", "typing_Pulse.Syntax.Base.eq_univ", "typing_Pulse.Syntax.Base.tm_inames", "typing_Pulse.Syntax.Base.tm_vprop", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.push_context_no_range" ], 0, - "da166921062fafdc5de1819973728c0d" + "b21c779da87247a74b3c6b560772d124" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Comp.fsti b/lib/steel/pulse/Pulse.Checker.Comp.fsti index 401c3dfda..aed156ae9 100644 --- a/lib/steel/pulse/Pulse.Checker.Comp.fsti +++ b/lib/steel/pulse/Pulse.Checker.Comp.fsti @@ -4,9 +4,8 @@ module T = FStar.Tactics.V2 open Pulse.Syntax open Pulse.Typing -open Pulse.Checker.Common -val check_comp (g:env) - (c:comp_st) - (pre_typing:tot_typing g (comp_pre c) tm_vprop) +val check (g:env) + (c:comp_st) + (pre_typing:tot_typing g (comp_pre c) tm_vprop) : T.Tac (comp_typing g c (comp_u c)) diff --git a/lib/steel/pulse/Pulse.Checker.Comp.fsti.hints b/lib/steel/pulse/Pulse.Checker.Comp.fsti.hints index 69abef8e8..ca2242489 100644 --- a/lib/steel/pulse/Pulse.Checker.Comp.fsti.hints +++ b/lib/steel/pulse/Pulse.Checker.Comp.fsti.hints @@ -1,8 +1,8 @@ [ - "h+twLS\u000ftJU)", + "\u0011\u0004hc\u0017\bKoB", [ [ - "Pulse.Checker.Comp.check_comp", + "Pulse.Checker.Comp.check", 1, 2, 1, @@ -19,7 +19,7 @@ "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" ], 0, - "d19debdb15a2b0c1b7e43032acc44816" + "622c8269dfeca6ced45126b249662c3a" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Exists.fst b/lib/steel/pulse/Pulse.Checker.Exists.fst index 64f66ec11..ffb0c2b05 100644 --- a/lib/steel/pulse/Pulse.Checker.Exists.fst +++ b/lib/steel/pulse/Pulse.Checker.Exists.fst @@ -1,14 +1,14 @@ module Pulse.Checker.Exists -module T = FStar.Tactics.V2 -module RT = FStar.Reflection.Typing - open Pulse.Syntax open Pulse.Typing +open Pulse.Typing.Combinators open Pulse.Checker.Pure -open Pulse.Checker.Common -open Pulse.Checker.VPropEquiv +open Pulse.Checker.Base +open Pulse.Checker.Prover + +module T = FStar.Tactics.V2 module P = Pulse.Syntax.Printer module FV = Pulse.Typing.FV @@ -26,48 +26,51 @@ let terms_to_string (t:list term) let check_elim_exists (g:env) - (t:st_term{Tm_ElimExists? t.term}) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) + (res_ppname:ppname) + (t:st_term{Tm_ElimExists? t.term}) : T.Tac (checker_result_t g pre post_hint) = + + let g = Pulse.Typing.Env.push_context g "check_elim_exists" t.range in + let Tm_ElimExists { p = t } = t.term in - let t_t_typing : (t:term & tot_typing g t tm_vprop ) = - match t.t with - | Tm_Unknown -> ( - //There should be exactly one exists_ vprop in the context and we eliminate it - let ts = vprop_as_list pre in - let exist_tms = List.Tot.Base.filter #term (function | {t = Tm_ExistsSL _ _ _ } -> true | _ -> false) ts in - match exist_tms with - | [one] -> - assume (one `List.Tot.memP` ts); - (| one, vprop_as_list_typing pre_typing one |) //shouldn't need to check this again - | _ -> - fail g None - (Printf.sprintf "Could not decide which exists term to eliminate: choices are\n%s" - (terms_to_string exist_tms)) - ) - | _ -> - let t, _ = instantiate_term_implicits g t in - assume false; - (| t, pre_typing |) -// check_vprop g t + let (| t, t_typing |) : (t:term & tot_typing g t tm_vprop ) = + match t.t with + | Tm_Unknown -> ( + //There should be exactly one exists_ vprop in the context and we eliminate it + let ts = vprop_as_list pre in + let exist_tms = List.Tot.Base.filter #term (function | {t = Tm_ExistsSL _ _ _ } -> true | _ -> false) ts in + match exist_tms with + | [one] -> + assume (one `List.Tot.memP` ts); + (| one, vprop_as_list_typing pre_typing one |) //shouldn't need to check this again + | _ -> + fail g (Some t.range) + (Printf.sprintf "Could not decide which exists term to eliminate: choices are\n%s" + (terms_to_string exist_tms)) + ) + | _ -> + let t, _ = instantiate_term_implicits g t in + check_vprop g t in - let (| t, t_typing |) = t_t_typing in -// let (| t, t_typing |) = check_vprop g t in - match t.t with - | Tm_ExistsSL u { binder_ty=ty } p -> - // T.print (Printf.sprintf "LOG ELIM EXISTS: %s\n" - // (P.term_to_string t)); - - // Could this come from inversion of t_typing? - let (| u', ty_typing |) = check_universe g ty in - if eq_univ u u' - then let x = fresh g in - let d = T_ElimExists g u ty p x ty_typing t_typing in - repack (try_frame_pre pre_typing d) post_hint - else fail g None "Universe checking failed in elim_exists" - | _ -> fail g None "elim_exists argument not a Tm_ExistsSL" + + if not (Tm_ExistsSL? t.t) + then fail g (Some t.range) + (Printf.sprintf "check_elim_exists: elim_exists argument %s not an existential" + (P.term_to_string t)); + + let Tm_ExistsSL u { binder_ty=ty } p = t.t in + + let (| u', ty_typing |) = check_universe g ty in + if eq_univ u u' + then let x = fresh g in + let d = T_ElimExists g u ty p x ty_typing t_typing in + prove_post_hint (try_frame_pre pre_typing d res_ppname) post_hint t.range + else fail g (Some t.range) + (Printf.sprintf "check_elim_exists: universe checking failed, computed %s, expected %s" + (P.univ_to_string u') (P.univ_to_string u)) let is_intro_exists_erased (st:st_term) = match st.term with @@ -76,75 +79,84 @@ let is_intro_exists_erased (st:st_term) = let check_intro_exists_erased (g:env) - (st:st_term{intro_exists_witness_singleton st /\ - is_intro_exists_erased st}) - (vprop_typing: option (tot_typing g (intro_exists_vprop st) tm_vprop)) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) + (res_ppname:ppname) + (st:st_term { intro_exists_witness_singleton st /\ + is_intro_exists_erased st }) + (vprop_typing: option (tot_typing g (intro_exists_vprop st) tm_vprop)) : T.Tac (checker_result_t g pre post_hint) = - let Tm_IntroExists { p=t; witnesses=[e]; should_check } = st.term in + let g = Pulse.Typing.Env.push_context g "check_intro_exists_erased" st.range in + + let Tm_IntroExists { p=t; witnesses=[e] } = st.term in let (| t, t_typing |) = match vprop_typing with | Some typing -> (| t, typing |) - | _ -> - if T.unseal should_check - then check_vprop g t - else let t, _ = Pulse.Checker.Pure.instantiate_term_implicits g t in - (| t, magic () |) + | _ -> check_vprop g t in - match (t <: term).t with - | Tm_ExistsSL u b p -> - Pulse.Typing.FV.tot_typing_freevars t_typing; - let ty_typing, _ = Metatheory.tm_exists_inversion #g #u #b.binder_ty #p t_typing (fresh g) in - let (| e, e_typing |) = - check_term_with_expected_type g e (mk_erased u b.binder_ty) in - let d = T_IntroExistsErased g u b p e ty_typing t_typing (E e_typing) in - repack (try_frame_pre pre_typing d) post_hint - | _ -> fail g None "elim_exists argument not a Tm_ExistsSL" + if not (Tm_ExistsSL? (t <: term).t) // why this ascription? + then fail g (Some st.range) + (Printf.sprintf "check_intro_exists_erased: vprop %s is not an existential" + (P.term_to_string t)); -let check_intro_exists + let Tm_ExistsSL u b p = (t <: term).t in + + Pulse.Typing.FV.tot_typing_freevars t_typing; + let ty_typing, _ = Metatheory.tm_exists_inversion #g #u #b.binder_ty #p t_typing (fresh g) in + let (| e, e_typing |) = + check_term_with_expected_type g e (mk_erased u b.binder_ty) in + let d = T_IntroExistsErased g u b p e ty_typing t_typing (E e_typing) in + prove_post_hint (try_frame_pre pre_typing d res_ppname) post_hint (t <: term).range + +let check_intro_exists_non_erased (g:env) - (st:st_term{intro_exists_witness_singleton st /\ not (is_intro_exists_erased st)}) - (vprop_typing: option (tot_typing g (intro_exists_vprop st) tm_vprop)) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) + (res_ppname:ppname) + (st:st_term { intro_exists_witness_singleton st /\ + not (is_intro_exists_erased st) }) + (vprop_typing: option (tot_typing g (intro_exists_vprop st) tm_vprop)) : T.Tac (checker_result_t g pre post_hint) = - let Tm_IntroExists { p=t; witnesses=[witness]; should_check } = st.term in + let g = Pulse.Typing.Env.push_context g "check_intro_exists_non_erased" st.range in + + let Tm_IntroExists { p=t; witnesses=[witness] } = st.term in let (| t, t_typing |) = match vprop_typing with | Some typing -> (| t, typing |) - | _ -> - if T.unseal should_check - then check_vprop g t - else let t, _ = Pulse.Checker.Pure.instantiate_term_implicits g t in - (| t, magic () |) + | _ -> check_vprop g t in - match (t <: term).t with - | Tm_ExistsSL u b p -> - Pulse.Typing.FV.tot_typing_freevars t_typing; - let ty_typing, _ = Metatheory.tm_exists_inversion #g #u #b.binder_ty #p t_typing (fresh g) in - let (| witness, witness_typing |) = - check_term_with_expected_type g witness b.binder_ty in - let d = T_IntroExists g u b p witness ty_typing t_typing (E witness_typing) in - let (| c, d |) : (c:_ & st_typing g _ c) = (| _, d |) in - repack (try_frame_pre pre_typing d) post_hint - | _ -> fail g None "elim_exists argument not a Tm_ExistsSL" - -let check_intro_exists_either + + if not (Tm_ExistsSL? (t <: term).t) + then fail g (Some st.range) + (Printf.sprintf "check_intro_exists_non_erased: vprop %s is not an existential" + (P.term_to_string t)); + + let Tm_ExistsSL u b p = (t <: term).t in + + Pulse.Typing.FV.tot_typing_freevars t_typing; + let ty_typing, _ = Metatheory.tm_exists_inversion #g #u #b.binder_ty #p t_typing (fresh g) in + let (| witness, witness_typing |) = + check_term_with_expected_type g witness b.binder_ty in + let d = T_IntroExists g u b p witness ty_typing t_typing (E witness_typing) in + let (| c, d |) : (c:_ & st_typing g _ c) = (| _, d |) in + prove_post_hint (try_frame_pre pre_typing d res_ppname) post_hint (t <: term).range + +let check_intro_exists (g:env) - (st:st_term{intro_exists_witness_singleton st}) - (vprop_typing: option (tot_typing g (intro_exists_vprop st) tm_vprop)) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) + (res_ppname:ppname) + (st:st_term { intro_exists_witness_singleton st }) + (vprop_typing: option (tot_typing g (intro_exists_vprop st) tm_vprop)) + : T.Tac (checker_result_t g pre post_hint) = - // T.print (Printf.sprintf "LOG INTRO EXISTS: %s" - // (P.term_to_string (intro_exists_vprop st))); - if is_intro_exists_erased st - then check_intro_exists_erased g st vprop_typing pre pre_typing post_hint - else check_intro_exists g st vprop_typing pre pre_typing post_hint + + if is_intro_exists_erased st + then check_intro_exists_erased g pre pre_typing post_hint res_ppname st vprop_typing + else check_intro_exists_non_erased g pre pre_typing post_hint res_ppname st vprop_typing diff --git a/lib/steel/pulse/Pulse.Checker.Exists.fst.hints b/lib/steel/pulse/Pulse.Checker.Exists.fst.hints index 49cc6f3d6..4108976b3 100644 --- a/lib/steel/pulse/Pulse.Checker.Exists.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.Exists.fst.hints @@ -1,5 +1,5 @@ [ - "{G&3\u0006x|ӊi", + "`WOKT}5(gs3r", [ [ "Pulse.Checker.Exists.check_elim_exists", @@ -10,11 +10,13 @@ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.filter.fuel_instrumented", "@fuel_correspondence_Pulse.Elaborate.Pure.elab_term.fuel_instrumented", + "@fuel_correspondence_Pulse.Typing.Combinators.vprop_as_list.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.filter.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.memP.fuel_instrumented", "@query", "FStar.List.Tot.Base_interpretation_Tm_arrow_84543425b818e2d10a976186b8e8c250", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "Pulse.Syntax.Base_pretyping_fe09dc1e796799f4bac0760e63f30d40", "Pulse.Syntax.Naming_interpretation_Tm_arrow_12fa1b3ed1cc1655dcad602c3f14587a", "bool_inversion", "constructor_distinct_FStar.Pervasives.Native.None", @@ -26,55 +28,52 @@ "constructor_distinct_Pulse.Syntax.Base.Tm_ElimExists", "constructor_distinct_Pulse.Syntax.Base.Tm_ExistsSL", "constructor_distinct_Pulse.Syntax.Base.Tm_VProp", - "data_elim_Pulse.Syntax.Base.Mkppname", "data_elim_Pulse.Syntax.Base.Mkterm", + "data_elim_Pulse.Syntax.Base.Tm_ExistsSL", "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_FStar.Pervasives.Native.Some", "disc_equation_Pulse.Syntax.Base.C_Tot", "disc_equation_Pulse.Syntax.Base.Tm_ElimExists", "disc_equation_Pulse.Syntax.Base.Tm_ExistsSL", "eq2-interp", - "equality_tok_Pulse.Syntax.Base.Tm_VProp@tok", "equation_FStar.Pervasives.Native.snd", "equation_FStar.Range.range", "equation_FStar.Reflection.Typing.fstar_top_env", "equation_FStar.Reflection.Typing.pp_name_t", "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Syntax.Base.as_binder", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.ppname_default", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.ppname_default", "equation_Pulse.Syntax.Base.range", - "equation_Pulse.Syntax.Base.stateful_comp", "equation_Pulse.Syntax.Base.tm_exists_sl", "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.universe", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", - "equation_Pulse.Syntax.Base.with_range", "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", "equation_Pulse.Typing.as_binder", "equation_Pulse.Typing.comp_elim_exists", + "equation_Pulse.Typing.post_hint_opt", "equation_with_fuel_FStar.List.Tot.Base.memP.fuel_instrumented", "equation_with_fuel_Pulse.Elaborate.Pure.elab_term.fuel_instrumented", + "fuel_guarded_inversion_FStar.Pervasives.Native.option", "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.ppname", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "fuel_guarded_inversion_Pulse.Syntax.Base.term", "function_token_typing_Prims.__cache_version_number__", "function_token_typing_Prims.int", "function_token_typing_Prims.string", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", "interpretation_Tm_abs_ece6ee511cdff34d3d8f34a2f54bda3e", - "kinding_Pulse.Syntax.Base.term@tok", "l_or-interp", + "kinding_Pulse.Syntax.Base.term@tok", + "kinding_Pulse.Typing.post_hint_t@tok", "l_or-interp", "lemma_FStar.List.Tot.Base.mem_filter_forall", "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Pervasives.invertOption", "lemma_FStar.Sealed.Inhabited.sealed_singleton", "lemma_Pulse.Syntax.Base.range_singleton", - "primitive_Prims.op_BarBar", + "primitive_Prims.op_Negation", "proj_equation_FStar.Pervasives.Native.Mktuple2__2", "proj_equation_Pulse.Syntax.Base.Mkbinder_binder_ppname", "proj_equation_Pulse.Syntax.Base.Mkbinder_binder_ty", "proj_equation_Pulse.Syntax.Base.Mkppname_name", "proj_equation_Pulse.Syntax.Base.Mkppname_range", + "proj_equation_Pulse.Syntax.Base.Mkst_term_range", "proj_equation_Pulse.Syntax.Base.Mkterm_range", "proj_equation_Pulse.Syntax.Base.Mkterm_t", "projection_inverse_BoxBool_proj_0", @@ -105,26 +104,30 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_5a00527e4107015a0b877b7f48d80006", "refinement_interpretation_Tm_refine_5c77e54d118aa26696ff018c647e0d2c", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "refinement_interpretation_Tm_refine_aba97c1b97d7339b3a9a18ebda5655ae", + "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", + "refinement_interpretation_Tm_refine_eed994d15518279ab75d745192d0d368", "refinement_interpretation_Tm_refine_f0ac051651fa0e095f1b2c1241fd6a3f", "string_typing", "typing_FStar.List.Tot.Base.filter", - "typing_FStar.Range.range_0", "typing_FStar.Reflection.V2.Data.var", - "typing_FStar.Set.mem", - "typing_Pulse.Checker.VPropEquiv.vprop_as_list", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", "typing_Pulse.RuntimeUtils.union_ranges", "typing_Pulse.Syntax.Base.__proj__Mkppname__item__name", - "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", + "typing_Pulse.Syntax.Base.__proj__Mkppname__item__range", + "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__range", + "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t", "typing_Pulse.Syntax.Base.eq_univ", "typing_Pulse.Syntax.Base.ppname_default", "typing_Pulse.Syntax.Base.tm_exists_sl", + "typing_Pulse.Typing.Combinators.vprop_as_list", "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", "typing_Pulse.Typing.Env.fresh", "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.push_context", "typing_Pulse.Typing.as_binder", "typing_Tm_abs_ece6ee511cdff34d3d8f34a2f54bda3e" ], 0, - "7f31b4a4636e6239180e67e8cf155305" + "d96131047ebbe8463fd4b03aa0370570" ], [ "Pulse.Checker.Exists.intro_exists_vprop", @@ -136,7 +139,7 @@ "refinement_interpretation_Tm_refine_2e3881200c03c5d6a5e08c8400580303" ], 0, - "356a063c9ad93b896ca27eb256d031e0" + "f507dd4d5ebcc0d7806b5604697dce06" ], [ "Pulse.Checker.Exists.check_intro_exists_erased", @@ -149,7 +152,7 @@ "projection_inverse_BoxBool_proj_0" ], 0, - "6d529cc1d82616edb71f38680b9eef4f" + "3fc795007d36017eb6c8ded4e94354d4" ], [ "Pulse.Checker.Exists.check_intro_exists_erased", @@ -162,8 +165,8 @@ "@fuel_correspondence_Pulse.Syntax.Naming.freevars.fuel_instrumented", "@fuel_irrelevance_Pulse.Syntax.Naming.freevars.fuel_instrumented", "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "Prims_pretyping_f537159ed795b314b4e58c260361ae86", "bool_inversion", - "bool_typing", "constructor_distinct_FStar.Pervasives.Native.None", + "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.None", "constructor_distinct_FStar.Pervasives.Native.Some", "constructor_distinct_FStar.Tactics.Result.Failed", "constructor_distinct_FStar.Tactics.Result.Success", @@ -171,34 +174,28 @@ "constructor_distinct_Pulse.Syntax.Base.Tm_ExistsSL", "constructor_distinct_Pulse.Syntax.Base.Tm_VProp", "data_elim_Pulse.Syntax.Base.Mkbinder", + "data_elim_Pulse.Syntax.Base.Mkppname", "data_elim_Pulse.Syntax.Base.Mkterm", "disc_equation_FStar.Pervasives.Native.None", "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", "disc_equation_Pulse.Syntax.Base.C_Tot", "disc_equation_Pulse.Syntax.Base.Tm_ExistsSL", "disc_equation_Pulse.Syntax.Base.Tm_IntroExists", "equation_FStar.Range.range", "equation_FStar.Reflection.Typing.fstar_top_env", "equation_FStar.Reflection.Typing.pp_name_t", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Sealed.Inhabited.is_sealed", - "equation_FStar.Sealed.Inhabited.sealed", - "equation_FStar.Sealed.Inhabited.sealed_", "equation_Prims.eqtype", - "equation_Prims.nat", + "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.subset", + "equation_Prims.eqtype", "equation_Prims.nat", "equation_Pulse.Checker.Exists.intro_exists_vprop", "equation_Pulse.Checker.Exists.intro_exists_witness_singleton", "equation_Pulse.Checker.Exists.is_intro_exists_erased", - "equation_Pulse.Syntax.Base.comp_st", "equation_Pulse.Syntax.Base.ppname_default", "equation_Pulse.Syntax.Base.range", - "equation_Pulse.Syntax.Base.stateful_comp", "equation_Pulse.Syntax.Base.tm_exists_sl", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Syntax.Base.vprop", "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.universe", + "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", "equation_Pulse.Typing.FV.vars_of_env", "equation_Pulse.Typing.as_binder", "equation_Pulse.Typing.comp_intro_exists_erased", @@ -207,8 +204,8 @@ "equation_with_fuel_Pulse.Syntax.Naming.freevars.fuel_instrumented", "fuel_guarded_inversion_FStar.Tactics.Result.__result", "fuel_guarded_inversion_Pulse.Syntax.Base.binder", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", "fuel_guarded_inversion_Pulse.Syntax.Base.ppname", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "fuel_guarded_inversion_Pulse.Syntax.Base.term", "function_token_typing_Prims.__cache_version_number__", "function_token_typing_Prims.string", "int_inversion", @@ -218,17 +215,17 @@ "lemma_FStar.Set.mem_union", "lemma_FStar.Set.subset_mem", "lemma_Pulse.Syntax.Base.range_singleton", "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", - "proj_equation_Prims.Cons_tl", + "primitive_Prims.op_Negation", "proj_equation_Prims.Cons_tl", "proj_equation_Pulse.Syntax.Base.Mkbinder_binder_ppname", "proj_equation_Pulse.Syntax.Base.Mkbinder_binder_ty", "proj_equation_Pulse.Syntax.Base.Mkppname_name", "proj_equation_Pulse.Syntax.Base.Mkppname_range", "proj_equation_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload_witnesses", + "proj_equation_Pulse.Syntax.Base.Mkst_term_range", "proj_equation_Pulse.Syntax.Base.Mkterm_range", "proj_equation_Pulse.Syntax.Base.Mkterm_t", "proj_equation_Pulse.Syntax.Base.Tm_IntroExists__0", "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", "projection_inverse_FStar.Pervasives.Native.None_a", "projection_inverse_FStar.Tactics.Result.Failed_a", "projection_inverse_FStar.Tactics.Result.Failed_exn", @@ -249,18 +246,16 @@ "projection_inverse_Pulse.Syntax.Base.Tm_ExistsSL_u", "projection_inverse_Pulse.Syntax.Base.Tm_IntroExists__0", "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", - "refinement_interpretation_Tm_refine_25fe9861b42cf97d961ff4c8f44eb399", "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_2e3881200c03c5d6a5e08c8400580303", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", "refinement_interpretation_Tm_refine_c8d0a5d597a570501a950894cb4195e7", + "refinement_interpretation_Tm_refine_eed994d15518279ab75d745192d0d368", "string_typing", "token_correspondence_Pulse.Syntax.Naming.freevars.fuel_instrumented", - "true_interp", "typing_FStar.Range.range_0", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Sealed.seal", - "typing_FStar.Set.mem", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", + "typing_Pulse.Checker.Exists.intro_exists_vprop", "typing_Pulse.Checker.Exists.intro_exists_witness_singleton", "typing_Pulse.Checker.Exists.is_intro_exists_erased", "typing_Pulse.RuntimeUtils.union_ranges", @@ -268,19 +263,23 @@ "typing_Pulse.Syntax.Base.__proj__Mkbinder__item__binder_ty", "typing_Pulse.Syntax.Base.__proj__Mkppname__item__name", "typing_Pulse.Syntax.Base.__proj__Mkppname__item__range", + "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__range", "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", + "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t", "typing_Pulse.Syntax.Base.ppname_default", "typing_Pulse.Syntax.Base.tm_exists_sl", + "typing_Pulse.Syntax.Base.uu___is_Tm_ExistsSL", "typing_Pulse.Syntax.Naming.freevars", "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.fresh", "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.push_context", "typing_Pulse.Typing.FV.vars_of_env", "typing_Pulse.Typing.as_binder" ], 0, - "80d5e3b715d32c44c1661835fcf37eda" + "d5961e5d8881e6a1af143f9be2dd465f" ], [ - "Pulse.Checker.Exists.check_intro_exists", + "Pulse.Checker.Exists.check_intro_exists_non_erased", 1, 2, 1, @@ -291,10 +290,10 @@ "projection_inverse_BoxBool_proj_0" ], 0, - "272da894ae972906b3955965a437d2d7" + "c012fd73feba49164f0d8db0dfb0de61" ], [ - "Pulse.Checker.Exists.check_intro_exists", + "Pulse.Checker.Exists.check_intro_exists_non_erased", 2, 2, 1, @@ -304,8 +303,8 @@ "@fuel_correspondence_Pulse.Syntax.Naming.freevars.fuel_instrumented", "@fuel_irrelevance_Pulse.Syntax.Naming.freevars.fuel_instrumented", "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "Prims_pretyping_f537159ed795b314b4e58c260361ae86", "bool_inversion", - "bool_typing", "constructor_distinct_FStar.Pervasives.Native.None", + "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.None", "constructor_distinct_FStar.Pervasives.Native.Some", "constructor_distinct_FStar.Tactics.Result.Failed", "constructor_distinct_FStar.Tactics.Result.Success", @@ -313,34 +312,28 @@ "constructor_distinct_Pulse.Syntax.Base.Tm_ExistsSL", "constructor_distinct_Pulse.Syntax.Base.Tm_VProp", "data_elim_Pulse.Syntax.Base.Mkbinder", + "data_elim_Pulse.Syntax.Base.Mkppname", "data_elim_Pulse.Syntax.Base.Mkterm", "disc_equation_FStar.Pervasives.Native.None", "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", "disc_equation_Pulse.Syntax.Base.C_Tot", "disc_equation_Pulse.Syntax.Base.Tm_ExistsSL", "disc_equation_Pulse.Syntax.Base.Tm_IntroExists", "equation_FStar.Range.range", "equation_FStar.Reflection.Typing.fstar_top_env", "equation_FStar.Reflection.Typing.pp_name_t", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Sealed.Inhabited.is_sealed", - "equation_FStar.Sealed.Inhabited.sealed", - "equation_FStar.Sealed.Inhabited.sealed_", "equation_Prims.eqtype", - "equation_Prims.nat", + "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.subset", + "equation_Prims.eqtype", "equation_Prims.nat", "equation_Pulse.Checker.Exists.intro_exists_vprop", "equation_Pulse.Checker.Exists.intro_exists_witness_singleton", "equation_Pulse.Checker.Exists.is_intro_exists_erased", - "equation_Pulse.Syntax.Base.comp_st", "equation_Pulse.Syntax.Base.ppname_default", "equation_Pulse.Syntax.Base.range", - "equation_Pulse.Syntax.Base.stateful_comp", "equation_Pulse.Syntax.Base.tm_exists_sl", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Syntax.Base.vprop", "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.universe", + "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", "equation_Pulse.Typing.FV.vars_of_env", "equation_Pulse.Typing.as_binder", "equation_Pulse.Typing.comp_intro_exists", @@ -349,8 +342,8 @@ "equation_with_fuel_Pulse.Syntax.Naming.freevars.fuel_instrumented", "fuel_guarded_inversion_FStar.Tactics.Result.__result", "fuel_guarded_inversion_Pulse.Syntax.Base.binder", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", "fuel_guarded_inversion_Pulse.Syntax.Base.ppname", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "fuel_guarded_inversion_Pulse.Syntax.Base.term", "function_token_typing_Prims.__cache_version_number__", "function_token_typing_Prims.string", "int_inversion", @@ -360,17 +353,17 @@ "lemma_FStar.Set.mem_union", "lemma_FStar.Set.subset_mem", "lemma_Pulse.Syntax.Base.range_singleton", "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", - "proj_equation_Prims.Cons_tl", + "primitive_Prims.op_Negation", "proj_equation_Prims.Cons_tl", "proj_equation_Pulse.Syntax.Base.Mkbinder_binder_ppname", "proj_equation_Pulse.Syntax.Base.Mkbinder_binder_ty", "proj_equation_Pulse.Syntax.Base.Mkppname_name", "proj_equation_Pulse.Syntax.Base.Mkppname_range", "proj_equation_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload_witnesses", + "proj_equation_Pulse.Syntax.Base.Mkst_term_range", "proj_equation_Pulse.Syntax.Base.Mkterm_range", "proj_equation_Pulse.Syntax.Base.Mkterm_t", "proj_equation_Pulse.Syntax.Base.Tm_IntroExists__0", "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", "projection_inverse_FStar.Pervasives.Native.None_a", "projection_inverse_FStar.Tactics.Result.Failed_a", "projection_inverse_FStar.Tactics.Result.Failed_exn", @@ -391,18 +384,14 @@ "projection_inverse_Pulse.Syntax.Base.Tm_ExistsSL_u", "projection_inverse_Pulse.Syntax.Base.Tm_IntroExists__0", "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", - "refinement_interpretation_Tm_refine_25fe9861b42cf97d961ff4c8f44eb399", "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", "refinement_interpretation_Tm_refine_86ec3569a622cbebb6ace78c4d3bd30b", "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "refinement_interpretation_Tm_refine_eed994d15518279ab75d745192d0d368", "string_typing", "token_correspondence_Pulse.Syntax.Naming.freevars.fuel_instrumented", - "true_interp", "typing_FStar.Range.range_0", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Sealed.seal", - "typing_FStar.Set.mem", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", "typing_Pulse.Checker.Exists.intro_exists_witness_singleton", "typing_Pulse.Checker.Exists.is_intro_exists_erased", "typing_Pulse.RuntimeUtils.union_ranges", @@ -410,19 +399,23 @@ "typing_Pulse.Syntax.Base.__proj__Mkbinder__item__binder_ty", "typing_Pulse.Syntax.Base.__proj__Mkppname__item__name", "typing_Pulse.Syntax.Base.__proj__Mkppname__item__range", + "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__range", "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", + "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t", "typing_Pulse.Syntax.Base.ppname_default", "typing_Pulse.Syntax.Base.tm_exists_sl", + "typing_Pulse.Syntax.Base.uu___is_Tm_ExistsSL", "typing_Pulse.Syntax.Naming.freevars", "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.fresh", "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.push_context", "typing_Pulse.Typing.FV.vars_of_env", "typing_Pulse.Typing.as_binder" ], 0, - "57c48bac76854ec27406dd687a625fca" + "276878c27e079662dad1a15f73c04e70" ], [ - "Pulse.Checker.Exists.check_intro_exists_either", + "Pulse.Checker.Exists.check_intro_exists", 1, 2, 1, @@ -432,10 +425,10 @@ "projection_inverse_BoxBool_proj_0" ], 0, - "3d6385fc6e1a0ef61112915a725db3bd" + "2261df3af87ee4d135e32ec21a3f5f9b" ], [ - "Pulse.Checker.Exists.check_intro_exists_either", + "Pulse.Checker.Exists.check_intro_exists", 2, 2, 1, @@ -445,10 +438,10 @@ "projection_inverse_BoxBool_proj_0" ], 0, - "a830eca7c37a73749ba10bd1db24b881" + "3da1eadf8d9dfeeef190d616408a6bd0" ], [ - "Pulse.Checker.Exists.check_intro_exists_either", + "Pulse.Checker.Exists.check_intro_exists", 3, 2, 1, @@ -459,7 +452,7 @@ "typing_Pulse.Checker.Exists.intro_exists_witness_singleton" ], 0, - "a86d0ed895d1ce09b07162adf4720c0c" + "15be4188968a52180a082de11d6ace23" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Exists.fsti b/lib/steel/pulse/Pulse.Checker.Exists.fsti index fd607d781..4f49c27d1 100644 --- a/lib/steel/pulse/Pulse.Checker.Exists.fsti +++ b/lib/steel/pulse/Pulse.Checker.Exists.fsti @@ -4,14 +4,15 @@ module T = FStar.Tactics.V2 open Pulse.Syntax open Pulse.Typing -open Pulse.Checker.Common +open Pulse.Checker.Base val check_elim_exists (g:env) - (t:st_term{Tm_ElimExists? t.term}) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) + (res_ppname:ppname) + (t:st_term{Tm_ElimExists? t.term}) : T.Tac (checker_result_t g pre post_hint) let intro_exists_witness_singleton (st:st_term) = @@ -23,11 +24,12 @@ let intro_exists_vprop (st:st_term { Tm_IntroExists? st.term }) = match st.term with | Tm_IntroExists { p } -> p -val check_intro_exists_either +val check_intro_exists (g:env) - (st:st_term{intro_exists_witness_singleton st}) - (vprop_typing: option (tot_typing g (intro_exists_vprop st) tm_vprop)) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) - : T.Tac (checker_result_t g pre post_hint) \ No newline at end of file + (res_ppname:ppname) + (st:st_term { intro_exists_witness_singleton st }) + (vprop_typing: option (tot_typing g (intro_exists_vprop st) tm_vprop)) + : T.Tac (checker_result_t g pre post_hint) diff --git a/lib/steel/pulse/Pulse.Checker.Exists.fsti.hints b/lib/steel/pulse/Pulse.Checker.Exists.fsti.hints index 8694c5e3b..1f8357a3f 100644 --- a/lib/steel/pulse/Pulse.Checker.Exists.fsti.hints +++ b/lib/steel/pulse/Pulse.Checker.Exists.fsti.hints @@ -1,5 +1,5 @@ [ - "\r\u0010Oi0\"1dL\r", + "^4\u000eE\u000e\u000bS\u001d", [ [ "Pulse.Checker.Exists.intro_exists_vprop", @@ -11,10 +11,10 @@ "refinement_interpretation_Tm_refine_2e3881200c03c5d6a5e08c8400580303" ], 0, - "2ad51accd0f5e06f11426e1ffd3f1af8" + "de38a09faf676e5941b59665595d1a6c" ], [ - "Pulse.Checker.Exists.check_intro_exists_either", + "Pulse.Checker.Exists.check_intro_exists", 1, 2, 1, @@ -24,7 +24,7 @@ "projection_inverse_BoxBool_proj_0" ], 0, - "8d938c4e173c0a057a3b54473862d9e8" + "2decdaee2797e4b69f8123f2a92099a8" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Framing.fst b/lib/steel/pulse/Pulse.Checker.Framing.fst deleted file mode 100644 index bae3d4e51..000000000 --- a/lib/steel/pulse/Pulse.Checker.Framing.fst +++ /dev/null @@ -1,459 +0,0 @@ -module Pulse.Checker.Framing -module RT = FStar.Reflection.Typing -module R = FStar.Reflection.V2 -module L = FStar.List.Tot -module T = FStar.Tactics.V2 -open FStar.List.Tot -open Pulse.Syntax -open Pulse.Reflection.Util -open Pulse.Typing -open Pulse.Checker.Pure -open Pulse.Checker.VPropEquiv -module P = Pulse.Syntax.Printer -module RTB = FStar.Tactics.V2.Builtins -module FV = Pulse.Typing.FV -module Metatheory = Pulse.Typing.Metatheory -module VP = Pulse.Checker.VPropEquiv -module R = FStar.Reflection.V2 - -let debug_log = Pulse.Typing.debug_log "framing" - -let print_vprop_l (vps:list term) : T.Tac string = - Printf.sprintf "[%s]" - (String.concat ";\n " (T.map P.term_to_string vps)) - -let print_framing_failure ff = - Printf.sprintf " { unmatched_preconditions = %s;\n remaining_context = %s\n}" - (print_vprop_l ff.unmatched_preconditions) - (print_vprop_l ff.remaining_context) - - -let equational (t:term) : bool = - match t.t with - | Tm_FStar host_term -> - (match R.inspect_ln host_term with - | R.Tv_Match _ _ _ -> true - | _ -> false) - | _ -> false - -let type_of_fv (g:env) (fv:R.fv) - : T.Tac (option R.term) - = let n = R.inspect_fv fv in - match R.lookup_typ (fstar_env g) n with - | None -> None - | Some se -> - match R.inspect_sigelt se with - | R.Unk -> None - | R.Sg_Let _ lbs -> ( - L.tryPick - (fun lb -> - let lbv = R.inspect_lb lb in - if R.inspect_fv lbv.lb_fv = n - then Some lbv.lb_typ - else None) - lbs - ) - | R.Sg_Val _ _ t -> Some t - | R.Sg_Inductive _nm _univs params typ _ -> None - -let is_smt_fallback (t:R.term) : bool = - match R.inspect_ln t with - | R.Tv_FVar fv -> - let name = R.inspect_fv fv in - name = ["Steel";"Effect";"Common";"smt_fallback"] - | _ -> false - -module TermEq = FStar.Reflection.V2.TermEq - -(* - When comparing t0 =?= t1, if they are not syntactically equal, we - have to decide whether or not we should fire an SMT query to compare - them for provable equality. - - The criterion is as follows: - - 1. We allow an SMT query if either t0 or t1 is "equational". For now, that means - that either is a match expression. - - 2. Otherwise, if they are both applications of `f v0...vn` and `f u0...un` - of the same head symbol `f`, a top-level constant, then we check if the - type of `f` decorates any of its binders with the `smt_fallback` attribute. - - - If none of them are marked as such, - then we check if `f v0...` is syntactically equal to `f u0...` - and allow an SMT query to check if vn = vm. That is, the default behavior - for predicates is that they *last* argument is eligible for SMT equality. - - - Otherwise, for each binder that is NOT marked as `smt_fallback`, we check - if the corresponding argument is syntactically equal. If so, we allow - t0 and t1 to be compared for SMT equality. - - For example, Steel.ST.Reference.pts_to is defined like so: - - /// For instance, [pts_to r (sum_perm (half_perm p) (half_perm p)) (v + 1)] - /// is unifiable with [pts_to r p (1 + v)] - val pts_to (#a:Type0) - (r:ref a) - ([@@@smt_fallback] p:perm) - ([@@@smt_fallback] v:a) - : vprop -*) -let eligible_for_smt_equality (g:env) (t0 t1:term) - : T.Tac bool - = let either_equational () = equational t0 || equational t1 in - let head_eq (t0 t1:R.term) = - match R.inspect_ln t0, R.inspect_ln t1 with - | R.Tv_App h0 _, R.Tv_App h1 _ -> - TermEq.term_eq h0 h1 - | _ -> false - in - match t0.t, t1.t with - | Tm_FStar t0, Tm_FStar t1 -> ( - let h0, args0 = R.collect_app_ln t0 in - let h1, args1 = R.collect_app_ln t1 in - if TermEq.term_eq h0 h1 && L.length args0 = L.length args1 - then ( - match R.inspect_ln h0 with - | R.Tv_FVar fv - | R.Tv_UInst fv _ -> ( - match type_of_fv g fv with - | None -> either_equational() - | Some t -> - let bs, _ = R.collect_arr_ln_bs t in - let is_smt_fallback (b:R.binder) = - let bview = R.inspect_binder b in - L.existsb is_smt_fallback bview.attrs - in - let some_fallbacks, fallbacks = - L.fold_right - (fun b (some_fallbacks, bs) -> - if is_smt_fallback b - then true, true::bs - else some_fallbacks, false::bs) - bs (false, []) - in - if not some_fallbacks - then ( - //if none of the binders are marked fallback - //then, by default, consider only the last argument as - //fallback - head_eq t0 t1 - ) - else ( - let rec aux args0 args1 fallbacks = - match args0, args1, fallbacks with - | (a0, _)::args0, (a1, _)::args1, b::fallbacks -> - if b - then aux args0 args1 fallbacks - else if not (TermEq.term_eq a0 a1) - then false - else aux args0 args1 fallbacks - | [], [], [] -> true - | _ -> either_equational() //unequal lengths - in - aux args0 args1 fallbacks - ) - ) - | _ -> either_equational () - ) - else either_equational () - ) - | _ -> either_equational () - -#push-options "--z3rlimit_factor 4" -let check_one_vprop g (p q:term) : T.Tac (option (vprop_equiv g p q)) = - if eq_tm p q - then Some (VE_Refl _ _) - else - if eligible_for_smt_equality g p q - then - let v0 = elab_term p in - let v1 = elab_term q in - match T.check_equiv (elab_env g) v0 v1 with - | Some token, _ -> Some (VE_Ext g p q token) - | None, _ -> None - else None -#pop-options - -type split_one_vprop_res g (p:term) (qs:list term) = - r:option (l:list term & q:term & vprop_equiv g p q & list term){ - Some? r ==> - (let Some (| l, q, _, r |) = r in - qs == (l @ [q]) @ r) - } - -let rec maybe_split_one_vprop g (p:term) (qs:list term) - : T.Tac (split_one_vprop_res g p qs) - = match qs with - | [] -> None - | q::qs -> - let d_opt = check_one_vprop g p q in - if Some? d_opt - then Some (| [], q, Some?.v d_opt, qs |) - else match maybe_split_one_vprop g p qs with - | None -> None - | Some (| l, q', d, r |) -> Some (| q::l, q', d, r |) - -let framing_success g req ctxt = - (frame:list term & - vprop_equiv g (VP.list_as_vprop (req @ frame)) (VP.list_as_vprop ctxt)) - -let try_frame_result g req ctxt = either (framing_success g req ctxt) framing_failure - -let mk_framing_failure #g #req #req' #ctxt #ctxt' - (unmatched_pre:term) - (res:try_frame_result g req ctxt) - : try_frame_result g req' ctxt' - = match res with - | Inr failure -> - Inr { failure with - unmatched_preconditions= - unmatched_pre::failure.unmatched_preconditions - } - | Inl (| frame, _ |) -> - Inr { unmatched_preconditions = [unmatched_pre]; - remaining_context = frame } - -let rec try_split_vprop g (req:list term) (ctxt:list term) - : T.Tac - (either (frame:list term & - vprop_equiv g (VP.list_as_vprop (req @ frame)) (VP.list_as_vprop ctxt)) - framing_failure) - = match req with - | [] -> Inl (| ctxt, VE_Refl g _ |) - | hd::tl -> - match maybe_split_one_vprop g hd ctxt with - | None -> - mk_framing_failure hd (try_split_vprop g tl ctxt) - - | Some (| l, q, d, r |) -> - let d1 - : vprop_equiv g (VP.list_as_vprop ctxt) - (VP.list_as_vprop (hd :: (l@r))) - = VP.vprop_equiv_swap_equiv g l r hd q d - in - match try_split_vprop g tl (l @ r) with - | Inr failure -> Inr failure - | Inl (| frame, d |) -> - let d - : vprop_equiv g (VP.list_as_vprop (tl @ frame)) - (VP.list_as_vprop (l @ r)) - = d - in - let dd - : vprop_equiv g (VP.list_as_vprop ((hd::tl) @ frame)) - (VP.list_as_vprop (hd :: (l @ r))) - = VP.list_as_vprop_ctx g [hd] [hd] _ _ (VE_Refl _ _) d - in - let ddd = VE_Trans _ _ _ _ dd (VE_Sym _ _ _ d1) in - Inl (| frame, ddd |) - - -let split_vprop (g:env) - (ctxt:term) - (ctxt_typing: tot_typing g ctxt tm_vprop) - (req:term) - : T.Tac (either (frame:term & - tot_typing g frame tm_vprop & - vprop_equiv g (tm_star req frame) ctxt) - framing_failure) - = let ctxt_l = VP.vprop_as_list ctxt in - let req_l = VP.vprop_as_list req in - match try_split_vprop g req_l ctxt_l with - | Inr failure -> - Inr failure - | Inl (| frame, veq |) -> - let d = VP.vprop_equiv_split_frame g ctxt req frame veq in - let typing : tot_typing g (VP.list_as_vprop frame) tm_vprop = - let fwd, bk = VP.vprop_equiv_typing d in - let star_typing = bk ctxt_typing in - star_typing_inversion_r star_typing - in - Inl (| VP.list_as_vprop frame, typing, d |) - - - -let rec all_matches g p q - : T.Tac (match_result g p q) - = match p with - | [] -> - { matched = []; unmatched_p = p; unmatched_q = q; p_eq = VE_Refl _ _; q_eq = VE_Refl _ _ } - - | hd::tl -> - match maybe_split_one_vprop g hd q with - | None -> //hd is in unmatched_p - let res = all_matches g tl q in - let p_eq : vprop_equiv g (list_as_vprop p) (list_as_vprop (hd::res.unmatched_p @ res.matched)) = - VP.list_as_vprop_ctx _ [hd] [hd] _ _ (VE_Refl _ _) res.p_eq in - { res with unmatched_p = hd::res.unmatched_p; p_eq} - - | Some res -> - let (| l, found, v, r |) = res in - assert (q == (l @ [found]) @ r); - let v : vprop_equiv g hd found = v in - let res = all_matches g tl (l @ r) in - let aux hd tl l r (v:vprop_equiv g (list_as_vprop tl) (list_as_vprop (l @ r))) - : vprop_equiv g (list_as_vprop (hd::tl)) (list_as_vprop (l @ (hd::r))) - = let v = - VE_Trans _ _ _ _ (VP.list_as_vprop_ctx _ [hd] [hd] _ _ (VE_Refl _ _) v) - (VE_Sym _ _ _ (VP.vprop_equiv_swap_equiv _ _ _ hd hd (VE_Refl _ _))) - in - (VE_Trans _ _ _ _ v (VE_Sym _ _ _ (VP.list_as_vprop_assoc _ _ _ _))) - in - let q_eq : vprop_equiv g (list_as_vprop q) (list_as_vprop (res.unmatched_q @ (hd::res.matched))) = - let q_eq' : vprop_equiv g (list_as_vprop q) (list_as_vprop (hd::(l@r))) = - (VP.vprop_equiv_swap_equiv _ l r hd found v) - in - VE_Trans _ _ _ _ q_eq' (aux hd (l@r) _ _ res.q_eq) - in - { res with matched = hd::res.matched; - p_eq = aux hd tl _ _ res.p_eq; - q_eq } - - -let rec check_equiv_emp (g:env) (vp:term) - : option (vprop_equiv g vp tm_emp) - = match vp.t with - | Tm_Emp -> Some (VE_Refl _ _) - | Tm_Star vp1 vp2 -> - (match check_equiv_emp g vp1, check_equiv_emp g vp2 with - | Some d1, Some d2 -> - let d3 : vprop_equiv g (tm_star vp1 vp2) (tm_star tm_emp tm_emp) - = VE_Ctxt _ _ _ _ _ d1 d2 in - let d4 : vprop_equiv g (tm_star tm_emp tm_emp) tm_emp = - VE_Unit _ _ in - Some (VE_Trans _ _ _ _ d3 d4) - | _, _ -> None) - | _ -> None - -#push-options "--z3rlimit_factor 2" -let check_vprop_equiv - (g:env) - (vp1 vp2:term) - (vp1_typing:tot_typing g vp1 tm_vprop) - - : T.Tac (vprop_equiv g vp1 vp2) = - - match split_vprop g vp1 vp1_typing vp2 with - | Inr failure -> - fail g None (Printf.sprintf - "check_vprop_equiv: %s and %s are not equivalent; missing preconditions:\n%s\n" - (P.term_to_string vp1) - (P.term_to_string vp2) - (String.concat "\n" (T.map P.term_to_string failure.unmatched_preconditions))) - - | Inl (| frame, _, d |) -> - match check_equiv_emp g frame with - | Some d_frame_equiv_emp -> - let d : vprop_equiv g (tm_star vp2 frame) vp1 = d in - let d : vprop_equiv g vp1 (tm_star vp2 frame) = - VE_Sym _ _ _ d in - let d' : vprop_equiv g (tm_star vp2 frame) (tm_star vp2 tm_emp) = - VE_Ctxt _ _ _ _ _ (VE_Refl _ vp2) d_frame_equiv_emp in - let d : vprop_equiv g vp1 (tm_star vp2 tm_emp) = - VE_Trans _ _ _ _ d d' in - let d' : vprop_equiv g (tm_star vp2 tm_emp) (tm_star tm_emp vp2) = VE_Comm _ _ _ in - let d : vprop_equiv g vp1 (tm_star tm_emp vp2) = VE_Trans _ _ _ _ d d' in - let d' : vprop_equiv g (tm_star tm_emp vp2) vp2 = VE_Unit _ _ in - VE_Trans _ _ _ _ d d' - | None -> - fail g None (Printf.sprintf "check_vprop_equiv: %s and %s are not equivalent, frame: %s\n" - (P.term_to_string vp1) - (P.term_to_string vp2) - (P.term_to_string frame)) -#pop-options - -let freevars_comp_post (c:comp { stateful_comp c }) - : Lemma (freevars (comp_post c) `Set.subset` freevars_comp c) - = () - -#push-options "--z3rlimit_factor 20 --query_stats --fuel 4 --ifuel 2 --query_stats" - - -let check_frameable (#g:env) - (#ctxt:term) - (ctxt_typing: tot_typing g ctxt tm_vprop) - (req:term) - : T.Tac (either (frame_for_req_in_ctxt g ctxt req) - framing_failure) - = split_vprop g ctxt ctxt_typing req - -let apply_frame (#g:env) - (#t:st_term) - (#ctxt:term) - (ctxt_typing: tot_typing g ctxt tm_vprop) - (#c:comp { stateful_comp c }) - (t_typing: st_typing g t c) - (frame_t:frame_for_req_in_ctxt g ctxt (comp_pre c)) - : Tot (c':comp_st { comp_pre c' == ctxt /\ - comp_res c' == comp_res c /\ - comp_u c' == comp_u c /\ - comp_post c' == tm_star (comp_post c) (frame_of frame_t) } & - st_typing g t c') - = let s = st_comp_of_comp c in - let (| frame, frame_typing, ve |) = frame_t in - let t_typing - : st_typing g t (add_frame c frame) - = T_Frame g t c frame frame_typing t_typing in - let c' = add_frame c frame in - let c'_typing = Metatheory.st_typing_correctness t_typing in - let s' = st_comp_of_comp c' in - let ve: vprop_equiv g s'.pre ctxt = ve in - let s'' = { s' with pre = ctxt } in - let c'' = c' `with_st_comp` s'' in - assert (comp_post c' == comp_post c''); - let ve: vprop_equiv g (comp_pre c') (comp_pre c'') = ve in - let st_typing = Metatheory.comp_typing_inversion c'_typing in - let (| res_typing, pre_typing, x, post_typing |) = Metatheory.st_comp_typing_inversion st_typing in - let st_equiv = ST_VPropEquiv g c' c'' x pre_typing res_typing post_typing ve (VE_Refl _ _) in - let t_typing = T_Equiv _ _ _ _ t_typing st_equiv in - (| c'', t_typing |) - - -let try_frame_pre (#g:env) - (#t:st_term) - (#pre:term) - (pre_typing: tot_typing g pre tm_vprop) - (#c:comp { stateful_comp c }) - (t_typing: st_typing g t c) - : T.Tac (either (c':comp_st { comp_pre c' == pre } & - st_typing g t c') - framing_failure) - = match check_frameable pre_typing (comp_pre c) with - | Inr failure -> Inr failure - | Inl frame_t -> - let (| c', st_d |) = apply_frame pre_typing t_typing frame_t in - Inl (| c', st_d |) - -let frame_empty (#g:env) - (#pre:term) - (pre_typing: tot_typing g pre tm_vprop) - (#u:universe) - (#ty:term) - (ut:universe_of g ty u) - (t:st_term) - (c0:comp_st{ comp_pre c0 == tm_emp }) - (d:st_typing g t c0) - : T.Tac (c:comp_st { comp_pre c == pre} & - st_typing g t c) - = let d = T_Frame g t c0 pre pre_typing d in - let c = add_frame c0 pre in - let s = st_comp_of_comp c in - let d : st_typing g t c = d in - let s' = { s with pre = pre } in - let c' = c `with_st_comp` s' in - assert (stateful_comp c'); - let c_typing = Metatheory.st_typing_correctness d in - let st_typing = Metatheory.comp_typing_inversion c_typing in - let (| res_typing, pre_typing, x, post_typing |) = Metatheory.st_comp_typing_inversion st_typing in - let eq - : st_equiv g c c' - = ST_VPropEquiv g c c' x - pre_typing - res_typing - post_typing - (VE_Unit g pre) - (VE_Refl _ _) - in - (| c', T_Equiv _ _ _ _ d eq |) -#pop-options diff --git a/lib/steel/pulse/Pulse.Checker.Framing.fst.hints b/lib/steel/pulse/Pulse.Checker.Framing.fst.hints deleted file mode 100644 index c47be4a28..000000000 --- a/lib/steel/pulse/Pulse.Checker.Framing.fst.hints +++ /dev/null @@ -1,761 +0,0 @@ -[ - "8\n\u0013GXU![", - [ - [ - "Pulse.Checker.Framing.print_vprop_l", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "constructor_distinct_FStar.Tactics.Result.Failed", - "constructor_distinct_FStar.Tactics.Result.Success", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "projection_inverse_FStar.Tactics.Result.Failed_a", - "projection_inverse_FStar.Tactics.Result.Failed_exn", - "projection_inverse_FStar.Tactics.Result.Failed_ps", - "projection_inverse_FStar.Tactics.Result.Success_a", - "projection_inverse_FStar.Tactics.Result.Success_ps", - "projection_inverse_FStar.Tactics.Result.Success_v", "string_typing" - ], - 0, - "cc4a736a7f5805c022acc26f465dddba" - ], - [ - "Pulse.Checker.Framing.print_framing_failure", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "string_typing" - ], - 0, - "937fc81ff5e7e71d4d3968b2a39c9f13" - ], - [ - "Pulse.Checker.Framing.__proj__Mkmatch_result__item__p_eq", - 1, - 2, - 1, - [ - "@query", - "proj_equation_Pulse.Checker.Framing.Mkmatch_result_matched", - "proj_equation_Pulse.Checker.Framing.Mkmatch_result_unmatched_p", - "projection_inverse_Pulse.Checker.Framing.Mkmatch_result_matched", - "projection_inverse_Pulse.Checker.Framing.Mkmatch_result_unmatched_p" - ], - 0, - "3b29f89bc3ba39c52df143317e44f168" - ], - [ - "Pulse.Checker.Framing.__proj__Mkmatch_result__item__q_eq", - 1, - 2, - 1, - [ - "@query", - "proj_equation_Pulse.Checker.Framing.Mkmatch_result_matched", - "proj_equation_Pulse.Checker.Framing.Mkmatch_result_unmatched_q", - "projection_inverse_Pulse.Checker.Framing.Mkmatch_result_matched", - "projection_inverse_Pulse.Checker.Framing.Mkmatch_result_unmatched_q" - ], - 0, - "8066a3a6b428486ef98a823c0c2245a2" - ], - [ - "Pulse.Checker.Framing.type_of_fv", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_FStar.Reflection.V2.Data.Sg_Inductive", - "disc_equation_FStar.Reflection.V2.Data.Sg_Let", - "disc_equation_FStar.Reflection.V2.Data.Sg_Val", - "disc_equation_FStar.Reflection.V2.Data.Unk", - "equation_FStar.Reflection.Typing.fstar_env", - "equation_FStar.Reflection.Typing.fstar_top_env", - "fuel_guarded_inversion_FStar.Reflection.V2.Data.sigelt_view", - "function_token_typing_FStar.Reflection.Types.sigelt", - "lemma_FStar.Pervasives.invertOption", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", - "refinement_interpretation_Tm_refine_b9943bf670d3eeece9d9f2e3e534ed66", - "typing_FStar.Reflection.V2.Builtins.inspect_fv", - "typing_FStar.Reflection.V2.Builtins.inspect_sigelt", - "typing_FStar.Reflection.V2.Builtins.lookup_typ", - "typing_Pulse.Typing.Env.fstar_env" - ], - 0, - "6c366e1702cd6c941e38ef0b7e3ac45f" - ], - [ - "Pulse.Checker.Framing.is_smt_fallback", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "assumption_Prims.list__uu___haseq", "equation_Prims.eqtype", - "function_token_typing_Prims.string", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" - ], - 0, - "de3b1587fbab5ae98548961a620b3698" - ], - [ - "Pulse.Checker.Framing.eligible_for_smt_equality", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "data_elim_FStar.Tactics.Result.Success", "equation_Prims.eqtype", - "equation_Prims.nat", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "function_token_typing_FStar.Reflection.Types.term", - "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", - "lemma_FStar.Pervasives.invertOption", - "projection_inverse_FStar.Pervasives.Native.Mktuple3__1", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "subterm_ordering_Prims.Cons" - ], - 0, - "4125a717403800646e7a415e90143d7d" - ], - [ - "Pulse.Checker.Framing.check_one_vprop", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "Prims_pretyping_f537159ed795b314b4e58c260361ae86", "bool_typing", - "data_elim_FStar.Tactics.Result.Success", - "equation_FStar.Reflection.Types.typ", - "equation_FStar.Tactics.Types.issues", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "function_token_typing_FStar.Tactics.Types.issues", - "kinding_FStar.Pervasives.Native.option@tok", - "lemma_FStar.Pervasives.invertOption", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_f0ac051651fa0e095f1b2c1241fd6a3f", - "typing_FStar.Pervasives.Native.__proj__Mktuple2__item___1", - "typing_FStar.Tactics.Types.equiv_token", - "typing_Pulse.Elaborate.Pure.elab_term", - "typing_Pulse.Syntax.Base.eq_tm", "typing_Pulse.Typing.elab_env" - ], - 0, - "7b230359fc2ab6c01fb4b9b415416cc1" - ], - [ - "Pulse.Checker.Framing.split_one_vprop_res", - 1, - 2, - 1, - [ "@query" ], - 0, - "b049b7feb0517eca9a8a8372e04a501b" - ], - [ - "Pulse.Checker.Framing.maybe_split_one_vprop", - 1, - 2, - 1, - [ - "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_FStar.List.Tot.Base.append.fuel_instrumented", - "@fuel_irrelevance_FStar.List.Tot.Base.append.fuel_instrumented", - "@query", - "FStar.Pervasives_interpretation_Tm_arrow_0b6559e6ff3addf84b0c2880affbb335", - "FStar.Pervasives_interpretation_Tm_arrow_af8eda99ba3685403be22a88669dcb35", - "Prims_interpretation_Tm_arrow_2eaa01e78f73e9bab5d0955fc1a662da", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "Pulse.Checker.Framing_interpretation_Tm_arrow_13a6914f12fae8d620134edde28f05ca", - "Pulse.Checker.Framing_interpretation_Tm_arrow_4409676a58ba4265ffbaf83b09dc4ebb", - "Pulse.Checker.Framing_interpretation_Tm_arrow_51c02f6c9a26fa47258b5c8f84225e10", - "constructor_distinct_FStar.Pervasives.Native.None", - "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", - "data_elim_FStar.Tactics.Result.Success", - "data_typing_intro_Prims.Cons@tok", - "data_typing_intro_Prims.Nil@tok", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_FStar.Pervasives.Native.Some", - "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", - "equation_FStar.List.Tot.Base.op_At", - "equation_Pulse.Checker.Framing.split_one_vprop_res", - "equation_with_fuel_FStar.List.Tot.Base.append.fuel_instrumented", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Prims.list", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "interpretation_Tm_abs_9ad7a6d708d0f6f4f04a343130674cda", - "interpretation_Tm_abs_a7331e541c9cd73b457cf1c7aa930fd7", - "kinding_FStar.Pervasives.dtuple4@tok", "kinding_Prims.list@tok", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Pervasives.invertOption", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Mkdtuple4__1", - "projection_inverse_FStar.Pervasives.Mkdtuple4__2", - "projection_inverse_FStar.Pervasives.Mkdtuple4__4", - "projection_inverse_FStar.Pervasives.Native.None_a", - "projection_inverse_FStar.Pervasives.Native.Some_v", - "projection_inverse_Prims.Cons_a", - "projection_inverse_Prims.Cons_hd", - "projection_inverse_Prims.Cons_tl", "projection_inverse_Prims.Nil_a", - "refinement_interpretation_Tm_refine_1d1218c853dffcbf00c397c64c6e4b0d", - "string_typing", "typing_FStar.List.Tot.Base.op_At", - "typing_Tm_abs_8ac113bab6448bd7e8efd377fd2773b5", - "typing_Tm_abs_9ad7a6d708d0f6f4f04a343130674cda", - "typing_Tm_abs_a7331e541c9cd73b457cf1c7aa930fd7" - ], - 0, - "cea56399429dd66d03c6cb9a9fd60060" - ], - [ - "Pulse.Checker.Framing.mk_framing_failure", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_FStar.Pervasives.Inl", - "disc_equation_FStar.Pervasives.Inr", - "equation_Pulse.Checker.Framing.framing_success", - "equation_Pulse.Checker.Framing.try_frame_result", - "fuel_guarded_inversion_FStar.Pervasives.either", - "projection_inverse_BoxBool_proj_0" - ], - 0, - "cb40f735a4c635a458258e8ff7cd8bdd" - ], - [ - "Pulse.Checker.Framing.try_split_vprop", - 1, - 2, - 2, - [ - "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_FStar.List.Tot.Base.append.fuel_instrumented", - "@query", "constructor_distinct_Prims.Nil", - "data_elim_FStar.Pervasives.Native.Some", - "data_elim_FStar.Tactics.Result.Success", - "disc_equation_FStar.Pervasives.Inl", - "disc_equation_FStar.Pervasives.Inr", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_FStar.Pervasives.Native.Some", - "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", - "equation_FStar.List.Tot.Base.op_At", - "equation_Pulse.Checker.Framing.split_one_vprop_res", - "equation_with_fuel_FStar.List.Tot.Base.append.fuel_instrumented", - "fuel_guarded_inversion_FStar.Pervasives.Native.option", - "fuel_guarded_inversion_FStar.Pervasives.either", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Prims.list", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Pervasives.invertOption", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Mkdtuple4__1", - "projection_inverse_FStar.Pervasives.Mkdtuple4__2", - "projection_inverse_FStar.Pervasives.Mkdtuple4__4", - "projection_inverse_FStar.Pervasives.Native.Some_v", - "projection_inverse_Prims.Nil_a", - "refinement_interpretation_Tm_refine_1d1218c853dffcbf00c397c64c6e4b0d" - ], - 0, - "cbf3b803558371222dac86b737debb0e" - ], - [ - "Pulse.Checker.Framing.split_vprop", - 1, - 2, - 2, - [ - "@MaxIFuel_assumption", "@query", - "data_elim_FStar.Tactics.Result.Success", - "disc_equation_FStar.Pervasives.Inl", - "disc_equation_FStar.Pervasives.Inr", - "fuel_guarded_inversion_FStar.Pervasives.either", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "projection_inverse_BoxBool_proj_0" - ], - 0, - "c1e9ebce4659b8dfc2e1b677ef1fe7a8" - ], - [ - "Pulse.Checker.Framing.all_matches", - 1, - 2, - 1, - [ - "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_FStar.List.Tot.Base.append.fuel_instrumented", - "@fuel_irrelevance_FStar.List.Tot.Base.append.fuel_instrumented", - "@query", - "FStar.Pervasives.Native_pretyping_b53dbd183c526bc5d0f20d7b966ae125", - "FStar.Pervasives_interpretation_Tm_arrow_0b6559e6ff3addf84b0c2880affbb335", - "FStar.Pervasives_interpretation_Tm_arrow_af8eda99ba3685403be22a88669dcb35", - "Prims_interpretation_Tm_arrow_2eaa01e78f73e9bab5d0955fc1a662da", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "Pulse.Checker.Framing_interpretation_Tm_arrow_13a6914f12fae8d620134edde28f05ca", - "Pulse.Checker.Framing_interpretation_Tm_arrow_4409676a58ba4265ffbaf83b09dc4ebb", - "Pulse.Checker.Framing_interpretation_Tm_arrow_51c02f6c9a26fa47258b5c8f84225e10", - "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", - "data_elim_FStar.Tactics.Result.Success", - "data_typing_intro_Prims.Cons@tok", - "data_typing_intro_Prims.Nil@tok", "disc_equation_Prims.Cons", - "disc_equation_Prims.Nil", "equation_FStar.List.Tot.Base.op_At", - "equation_Pulse.Checker.Framing.split_one_vprop_res", - "equation_Pulse.Syntax.Base.vprop", - "equation_with_fuel_FStar.List.Tot.Base.append.fuel_instrumented", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Prims.list", - "fuel_guarded_inversion_Pulse.Checker.Framing.match_result", - "interpretation_Tm_abs_9ad7a6d708d0f6f4f04a343130674cda", - "interpretation_Tm_abs_a7331e541c9cd73b457cf1c7aa930fd7", - "kinding_FStar.Pervasives.dtuple4@tok", "kinding_Prims.list@tok", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.List.Tot.Properties.append_l_nil", - "lemma_FStar.Pervasives.invertOption", - "proj_equation_Pulse.Checker.Framing.Mkmatch_result_matched", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Mkdtuple4__1", - "projection_inverse_FStar.Pervasives.Mkdtuple4__2", - "projection_inverse_FStar.Pervasives.Mkdtuple4__4", - "projection_inverse_FStar.Pervasives.Native.Some_v", - "projection_inverse_Prims.Cons_a", - "projection_inverse_Prims.Cons_hd", - "projection_inverse_Prims.Cons_tl", "projection_inverse_Prims.Nil_a", - "refinement_interpretation_Tm_refine_1d1218c853dffcbf00c397c64c6e4b0d", - "string_typing", - "token_correspondence_FStar.List.Tot.Base.append.fuel_instrumented", - "typing_FStar.List.Tot.Base.op_At", - "typing_Pulse.Checker.Framing.__proj__Mkmatch_result__item__matched", - "typing_Pulse.Checker.Framing.__proj__Mkmatch_result__item__unmatched_p", - "typing_Tm_abs_8ac113bab6448bd7e8efd377fd2773b5", - "typing_Tm_abs_9ad7a6d708d0f6f4f04a343130674cda", - "typing_Tm_abs_a7331e541c9cd73b457cf1c7aa930fd7" - ], - 0, - "2aa340c95756740dbd4d5755127f5d1a" - ], - [ - "Pulse.Checker.Framing.check_equiv_emp", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "binder_x_40f47b036cc24e11c7ed578f0b141555_1", - "data_elim_Pulse.Syntax.Base.Mkterm", - "equality_tok_Pulse.Syntax.Base.Tm_Emp@tok", - "equation_FStar.Range.range", - "equation_Prims.op_Equals_Equals_Equals", - "equation_Pulse.Syntax.Base.range", - "equation_Pulse.Syntax.Base.tm_emp", - "equation_Pulse.Syntax.Base.tm_star", - "equation_Pulse.Syntax.Base.with_range", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "lemma_Pulse.Syntax.Base.range_singleton", - "proj_equation_Pulse.Syntax.Base.Mkterm_range", - "proj_equation_Pulse.Syntax.Base.Mkterm_t", - "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", - "subterm_ordering_Pulse.Syntax.Base.Mkterm", - "subterm_ordering_Pulse.Syntax.Base.Tm_Star", - "typing_Pulse.RuntimeUtils.union_ranges", - "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", - "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t" - ], - 0, - "028143f9155f6868da2732ddfb5fc8fe" - ], - [ - "Pulse.Checker.Framing.check_vprop_equiv", - 1, - 2, - 2, - [ - "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_Pulse.Checker.Framing.check_equiv_emp.fuel_instrumented", - "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "constructor_distinct_FStar.Pervasives.Native.Some", - "constructor_distinct_FStar.Tactics.Result.Failed", - "constructor_distinct_FStar.Tactics.Result.Success", - "data_elim_FStar.Tactics.Result.Success", - "disc_equation_FStar.Pervasives.Inl", - "disc_equation_FStar.Pervasives.Inr", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_FStar.Pervasives.Native.Some", - "equation_FStar.Reflection.Typing.fstar_top_env", - "equation_with_fuel_Pulse.Checker.Framing.check_equiv_emp.fuel_instrumented", - "fuel_guarded_inversion_FStar.Pervasives.either", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "function_token_typing_Prims.__cache_version_number__", - "int_inversion", "kinding_Pulse.Typing.vprop_equiv@tok", - "lemma_FStar.Pervasives.invertOption", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Tactics.Result.Failed_a", - "projection_inverse_FStar.Tactics.Result.Failed_exn", - "projection_inverse_FStar.Tactics.Result.Failed_ps", - "projection_inverse_FStar.Tactics.Result.Success_a", - "projection_inverse_FStar.Tactics.Result.Success_ps", - "projection_inverse_FStar.Tactics.Result.Success_v", - "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", - "string_typing", "typing_Pulse.Checker.Framing.check_equiv_emp", - "typing_Pulse.Syntax.Base.tm_emp", - "typing_Pulse.Typing.Env.fstar_env" - ], - 0, - "84db6bfa9052cf381cf55f2229c3acd1" - ], - [ - "Pulse.Checker.Framing.freevars_comp_post", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "Pulse.Syntax.Base_pretyping_782a0dad287a00f5de8c110e3ddaeab3", - "bool_inversion", "data_elim_Pulse.Syntax.Base.C_ST", - "data_elim_Pulse.Syntax.Base.C_STAtomic", - "data_elim_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.subset", - "equation_Prims.eqtype", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.comp_post", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", - "equation_Pulse.Syntax.Naming.freevars_comp", - "equation_Pulse.Syntax.Naming.freevars_st_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.st_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", - "lemma_FStar.Set.mem_union", "primitive_Prims.op_BarBar", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_385f59c31213d29cc308b93df5d99dc9", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_FStar.Set.union", - "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__pre", - "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__res", - "typing_Pulse.Syntax.Base.comp_post", - "typing_Pulse.Syntax.Base.stateful_comp", - "typing_Pulse.Syntax.Naming.freevars", - "typing_Pulse.Syntax.Naming.freevars_comp", - "typing_Pulse.Syntax.Naming.freevars_st_comp" - ], - 0, - "fc89b4f1b4c75d9f3d736aeba1d04a66" - ], - [ - "Pulse.Checker.Framing.apply_frame", - 1, - 4, - 2, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "58378c8f6c447564ea3003aad4015f67" - ], - [ - "Pulse.Checker.Framing.apply_frame", - 2, - 4, - 2, - [ - "@MaxIFuel_assumption", "@query", - "Pulse.Syntax.Base_pretyping_b015b044c5bf00a3dd3df9fa711c87dd", - "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", - "constructor_distinct_Pulse.Syntax.Base.C_STGhost", - "data_elim_FStar.Pervasives.Mkdtuple3", - "data_elim_FStar.Pervasives.Mkdtuple4", - "data_elim_Pulse.Syntax.Base.Mkst_comp", - "data_elim_Pulse.Typing.STC", "data_elim_Pulse.Typing.T_Frame", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_FStar.Pervasives.Native.fst", - "equation_FStar.Pervasives.Native.snd", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Checker.Framing.frame_for_req_in_ctxt", - "equation_Pulse.Checker.Framing.frame_of", - "equation_Pulse.Syntax.Base.comp_post", - "equation_Pulse.Syntax.Base.comp_pre", - "equation_Pulse.Syntax.Base.comp_res", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.comp_u", - "equation_Pulse.Syntax.Base.ppname_default", - "equation_Pulse.Syntax.Base.st_comp_of_comp", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.tm_star", - "equation_Pulse.Syntax.Base.tm_vprop", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Syntax.Base.vprop", - "equation_Pulse.Syntax.Base.with_st_comp", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.add_frame", "equation_Pulse.Typing.fresh_wrt", - "equation_Pulse.Typing.st_equiv_pre", - "equation_Pulse.Typing.tot_typing", - "fuel_guarded_inversion_FStar.Pervasives.dtuple3", - "fuel_guarded_inversion_FStar.Pervasives.dtuple4", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.st_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "fuel_guarded_inversion_Pulse.Typing.my_erased", - "fuel_guarded_inversion_Pulse.Typing.st_comp_typing", - "interpretation_Tm_abs_721820113e572d77dcb3e18038febf41", - "interpretation_Tm_abs_c8631188b49e797b2c9232f71b480642", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", "primitive_Prims.op_BarBar", - "proj_equation_FStar.Pervasives.Native.Mktuple2__1", - "proj_equation_FStar.Pervasives.Native.Mktuple2__2", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_u", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Mkdtuple3__1", - "projection_inverse_FStar.Pervasives.Mkdtuple3__2", - "projection_inverse_FStar.Pervasives.Mkdtuple4__3", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", - "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_res", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_u", - "refinement_interpretation_Tm_refine_385f59c31213d29cc308b93df5d99dc9", - "refinement_interpretation_Tm_refine_51ce27dbef61de85828cfe7017f500b6", - "refinement_interpretation_Tm_refine_6067909eb7e26441b043722acc4cd3cf", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", - "typing_FStar.Map.contains", "typing_FStar.Reflection.V2.Data.var", - "typing_FStar.Set.mem", - "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__post", - "typing_Pulse.Syntax.Base.stateful_comp", - "typing_Pulse.Syntax.Naming.freevars", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", - "typing_Pulse.Typing.Metatheory.st_comp_typing_inversion" - ], - 0, - "aac5bc7ade9bd228659a6b99342fa88c" - ], - [ - "Pulse.Checker.Framing.try_frame_pre", - 1, - 4, - 2, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "4ecb6113ea5765ececfc4a9d77fda7fd" - ], - [ - "Pulse.Checker.Framing.try_frame_pre", - 2, - 4, - 2, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "64198a5582c22f3764f5851cf9620207" - ], - [ - "Pulse.Checker.Framing.try_frame_pre", - 3, - 4, - 2, - [ - "@MaxIFuel_assumption", "@query", - "data_elim_FStar.Tactics.Result.Success", - "disc_equation_FStar.Pervasives.Inl", - "disc_equation_FStar.Pervasives.Inr", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Checker.Framing.frame_for_req_in_ctxt", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_FStar.Pervasives.either", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "1f955fd92e4b053f9e2f1f568c623cb3" - ], - [ - "Pulse.Checker.Framing.frame_empty", - 1, - 4, - 2, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "1fd05150e9d16badcfb300ec10221382" - ], - [ - "Pulse.Checker.Framing.frame_empty", - 2, - 4, - 2, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "3a4f748026ba704b4b7893850d2afe6d" - ], - [ - "Pulse.Checker.Framing.frame_empty", - 3, - 4, - 2, - [ - "@MaxIFuel_assumption", "@query", - "Pulse.Syntax.Base_pretyping_b015b044c5bf00a3dd3df9fa711c87dd", - "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", - "constructor_distinct_Pulse.Syntax.Base.C_STGhost", - "data_elim_FStar.Pervasives.Mkdtuple4", - "data_elim_Pulse.Syntax.Base.Mkst_comp", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_FStar.Pervasives.Native.fst", - "equation_FStar.Pervasives.Native.snd", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.comp_post", - "equation_Pulse.Syntax.Base.comp_pre", - "equation_Pulse.Syntax.Base.comp_res", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.comp_u", - "equation_Pulse.Syntax.Base.ppname_default", - "equation_Pulse.Syntax.Base.st_comp_of_comp", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Syntax.Base.vprop", - "equation_Pulse.Syntax.Base.with_st_comp", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.add_frame", "equation_Pulse.Typing.fresh_wrt", - "equation_Pulse.Typing.st_equiv_pre", - "fuel_guarded_inversion_FStar.Pervasives.dtuple4", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.st_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "interpretation_Tm_abs_c8631188b49e797b2c9232f71b480642", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", "primitive_Prims.op_BarBar", - "proj_equation_FStar.Pervasives.Native.Mktuple2__1", - "proj_equation_FStar.Pervasives.Native.Mktuple2__2", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_u", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Mkdtuple4__3", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", - "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_res", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_u", - "refinement_interpretation_Tm_refine_272cb5ba1cd60f25f1eb0d946a496fe5", - "refinement_interpretation_Tm_refine_51ce27dbef61de85828cfe7017f500b6", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", - "typing_FStar.Map.contains", "typing_FStar.Reflection.V2.Data.var", - "typing_FStar.Set.mem", - "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__post", - "typing_Pulse.Syntax.Base.stateful_comp", - "typing_Pulse.Syntax.Base.uu___is_C_Tot", - "typing_Pulse.Syntax.Naming.freevars", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", - "typing_Pulse.Typing.Metatheory.st_comp_typing_inversion", - "typing_Pulse.Typing.add_frame" - ], - 0, - "987cac609b47950af9598196070b09c9" - ] - ] -] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Framing.fsti b/lib/steel/pulse/Pulse.Checker.Framing.fsti deleted file mode 100644 index b23a58ec0..000000000 --- a/lib/steel/pulse/Pulse.Checker.Framing.fsti +++ /dev/null @@ -1,92 +0,0 @@ -module Pulse.Checker.Framing -module RT = FStar.Reflection.Typing -module R = FStar.Reflection.V2 -module L = FStar.List.Tot -module T = FStar.Tactics.V2 -open FStar.List.Tot -open Pulse.Syntax -open Pulse.Elaborate.Pure -open Pulse.Typing -module P = Pulse.Syntax.Printer -open Pulse.Checker.VPropEquiv - -noeq -type framing_failure = { - unmatched_preconditions : list term; - remaining_context : list term; -} - -val print_framing_failure (f:framing_failure) : T.Tac string - -noeq -type match_result g p q = { - matched:list vprop; - unmatched_p:list vprop; - unmatched_q:list vprop; - p_eq: vprop_equiv g (list_as_vprop p) (list_as_vprop (unmatched_p @ matched)); - q_eq: vprop_equiv g (list_as_vprop q) (list_as_vprop (unmatched_q @ matched)) -} - -val all_matches (g:env) (p q:list vprop) - : T.Tac (match_result g p q) - -val check_vprop_equiv - (g:env) - (vp1 vp2:term) - (vp1_typing:tot_typing g vp1 tm_vprop) - : T.Tac (vprop_equiv g vp1 vp2) - - -let frame_for_req_in_ctxt (g:env) (ctxt:term) (req:term) - = (frame:term & - tot_typing g frame tm_vprop & - vprop_equiv g (tm_star req frame) ctxt) - -let frame_of #g #ctxt #req (f:frame_for_req_in_ctxt g ctxt req) = - let (| frame, _, _ |) = f in frame - - -val check_frameable (#g:env) - (#ctxt:term) - (ctxt_typing: tot_typing g ctxt tm_vprop) - (req:term) - : T.Tac (either (frame_for_req_in_ctxt g ctxt req) - framing_failure) - -val apply_frame (#g:env) - (#t:st_term) - (#ctxt:term) - (ctxt_typing: tot_typing g ctxt tm_vprop) - (#c:comp { stateful_comp c }) - (t_typing: st_typing g t c) - (frame_t:frame_for_req_in_ctxt g ctxt (comp_pre c)) - : Tot (c':comp_st { comp_pre c' == ctxt /\ - comp_res c' == comp_res c /\ - comp_u c' == comp_u c /\ - comp_post c' == tm_star (comp_post c) (frame_of frame_t) } & - st_typing g t c') - - -(* this just composes check_frameable and apply_frame *) -val try_frame_pre (#g:env) - (#t:st_term) - (#pre:term) - (pre_typing: tot_typing g pre tm_vprop) - (#c:comp_st) - (t_typing: st_typing g t c) - : T.Tac (either (c':comp_st { comp_pre c' == pre } & - st_typing g t c') - framing_failure) - -val frame_empty (#g:env) - (#pre:term) - (pre_typing: tot_typing g pre tm_vprop) - (#u:universe) - (#ty:term) - (ut:universe_of g ty u) - (t:st_term) - (c0:comp_st{ comp_pre c0 == tm_emp }) - (d:st_typing g t c0) - : T.Tac (c:comp_st { comp_pre c == pre} & - st_typing g t c) - diff --git a/lib/steel/pulse/Pulse.Checker.Framing.fsti.hints b/lib/steel/pulse/Pulse.Checker.Framing.fsti.hints deleted file mode 100644 index 223ba2945..000000000 --- a/lib/steel/pulse/Pulse.Checker.Framing.fsti.hints +++ /dev/null @@ -1,95 +0,0 @@ -[ - "e(\fG\u0012V;\u001a", - [ - [ - "Pulse.Checker.Framing.__proj__Mkmatch_result__item__p_eq", - 1, - 2, - 1, - [ - "@query", - "proj_equation_Pulse.Checker.Framing.Mkmatch_result_matched", - "proj_equation_Pulse.Checker.Framing.Mkmatch_result_unmatched_p", - "projection_inverse_Pulse.Checker.Framing.Mkmatch_result_matched", - "projection_inverse_Pulse.Checker.Framing.Mkmatch_result_unmatched_p" - ], - 0, - "7f4d3a3a9631ea413f6b3ecc3c4fbffb" - ], - [ - "Pulse.Checker.Framing.__proj__Mkmatch_result__item__q_eq", - 1, - 2, - 1, - [ - "@query", - "proj_equation_Pulse.Checker.Framing.Mkmatch_result_matched", - "proj_equation_Pulse.Checker.Framing.Mkmatch_result_unmatched_q", - "projection_inverse_Pulse.Checker.Framing.Mkmatch_result_matched", - "projection_inverse_Pulse.Checker.Framing.Mkmatch_result_unmatched_q" - ], - 0, - "8066a3a6b428486ef98a823c0c2245a2" - ], - [ - "Pulse.Checker.Framing.apply_frame", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "3a0d541a8539bd3581e3b26cd6e519d8" - ], - [ - "Pulse.Checker.Framing.try_frame_pre", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "69a3ae3725627ac7ca1001342e96d20b" - ], - [ - "Pulse.Checker.Framing.frame_empty", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "213c74542d27de79330a5c1cabbfe98a" - ] - ] -] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.If.fst b/lib/steel/pulse/Pulse.Checker.If.fst index e163fdc60..62ddfc924 100644 --- a/lib/steel/pulse/Pulse.Checker.If.fst +++ b/lib/steel/pulse/Pulse.Checker.If.fst @@ -1,17 +1,17 @@ module Pulse.Checker.If -module T = FStar.Tactics.V2 -module RT = FStar.Reflection.Typing - open Pulse.Syntax open Pulse.Typing +open Pulse.Typing.Combinators open Pulse.Checker.Pure -open Pulse.Checker.Common +open Pulse.Checker.Base +open Pulse.Checker.Prover +module T = FStar.Tactics.V2 +module P = Pulse.Syntax.Printer module Metatheory = Pulse.Typing.Metatheory -module FV = Pulse.Typing.FV -#push-options "--z3rlimit_factor 40" +#push-options "--z3rlimit_factor 10 --fuel 0 --ifuel 1" let rec combine_if_branches (g_then:env) (e_then:st_term) @@ -36,7 +36,10 @@ let rec combine_if_branches | C_STGhost inames1 _, C_STGhost inames2 _ -> if eq_tm inames1 inames2 then (| c_then, e_then_typing, e_else_typing |) - else fail g None "Cannot combine then and else branches (different inames)" + else fail g None + (Printf.sprintf "Cannot combine then and else branches (different inames %s and %s)" + (P.term_to_string inames1) + (P.term_to_string inames2)) | C_ST _, C_STAtomic inames _ -> if eq_tm inames tm_emp_inames then begin @@ -45,7 +48,9 @@ let rec combine_if_branches (Lift_STAtomic_ST g_else c_else) in (| c_then, e_then_typing, e_else_typing |) end - else fail g None "Cannot lift STAtomic else branch to match then" + else fail g None + (Printf.sprintf "Cannot lift STAtomic else branch to match ST then branch, inames %s not empty" + (P.term_to_string inames)) | C_STAtomic inames _, C_ST _ -> if eq_tm inames tm_emp_inames then begin @@ -54,7 +59,9 @@ let rec combine_if_branches (Lift_STAtomic_ST g_then c_then) in (| c_else, e_then_typing, e_else_typing |) end - else fail g None "Cannot lift STAtomic else branch to match then" + else fail g None + (Printf.sprintf "Cannot lift STAtomic then branch to match ST else branch, inames %s not empty" + (P.term_to_string inames)) | C_STGhost _ _, _ -> let w = get_non_informative_witness g_then (comp_u c_then) (comp_res c_then) in let e_then_typing = @@ -67,65 +74,87 @@ let rec combine_if_branches let e_else_typing = T_Lift _ _ _ _ e_else_typing (Lift_STGhost_STAtomic _ _ w) in combine_if_branches _ _ _ e_then_typing _ _ _ e_else_typing - | _, _ -> fail g None "Cannot combine then and else branches (incompatible effects)" + | _, _ -> + fail g None + (Printf.sprintf "Cannot combine then and else branches (incompatible effects %s and %s resp.)" + (P.ctag_to_string (ctag_of_comp_st c_then)) + (P.ctag_to_string (ctag_of_comp_st c_else))) end else fail g None "Cannot combine then and else branches (different st_comp)" #pop-options #push-options "--z3rlimit_factor 4 --fuel 0 --ifuel 1" -let check_if (g:env) - (b:term) - (e1 e2:st_term) - (pre:term) - (pre_typing: tot_typing g pre tm_vprop) - (post_hint:post_hint_for_env g) - (check:check_t) - : T.Tac (checker_result_t g pre (Some post_hint)) - = let (| b, b_typing |) = - check_term_with_expected_type g b tm_bool in - let post = post_hint.post in - let hyp = fresh g in - let g_with_eq (eq_v:term) = - push_binding g hyp ppname_default (mk_eq2 u0 tm_bool b eq_v) +let check + (g:env) + (pre:term) + (pre_typing: tot_typing g pre tm_vprop) + (post_hint:post_hint_for_env g) + (res_ppname:ppname) + (b:term) + (e1 e2:st_term) + (check:check_t) + : T.Tac (checker_result_t g pre (Some post_hint)) = + + let g = Pulse.Typing.Env.push_context g "check_if" e1.range in + + let (| b, b_typing |) = + check_term_with_expected_type g b tm_bool in + + let post = post_hint.post in + let hyp = fresh g in + let g_with_eq (eq_v:term) = + push_binding g hyp (mk_ppname_no_range "_if_hyp") (mk_eq2 u0 tm_bool b eq_v) + in + + let check_branch (eq_v:term) (br:st_term) (is_then:bool) + : T.Tac (br:st_term { ~(hyp `Set.mem` freevars_st br) } & + c:comp_st { comp_pre c == pre /\ comp_post_matches_hint c (Some post_hint)} & + st_typing (g_with_eq eq_v) br c) = + let g_with_eq = g_with_eq eq_v in + let pre_typing = + Metatheory.tot_typing_weakening_single + pre_typing + hyp + (mk_eq2 u0 tm_bool b eq_v) in - let check_branch (eq_v:term) (br:st_term) - : T.Tac (br:st_term { ~(hyp `Set.mem` freevars_st br) } & - c:comp { stateful_comp c /\ comp_pre c == pre /\ comp_post_matches_hint c (Some post_hint)} & - st_typing (g_with_eq eq_v) br c) - = let g_with_eq = g_with_eq eq_v in - let pre_typing = - Metatheory.tot_typing_weakening hyp - (mk_eq2 u0 tm_bool b eq_v) - pre_typing - in - let (| br, c, br_typing |) = - check g_with_eq br pre pre_typing (Some post_hint) - in - if hyp `Set.mem` freevars_st br - then fail g (Some br.range) "Illegal use of control-flow hypothesis in branch" - else if not (stateful_comp c) - then fail g (Some br.range) "Branch computation type not st" - else (| br, c, br_typing |) - in - let (| e1, c1, e1_typing |) = check_branch tm_true e1 in - let (| e2, c2, e2_typing |) = check_branch tm_false e2 in - let (| c, e1_typing, e2_typing |) = - combine_if_branches _ _ _ e1_typing _ _ _ e2_typing in - let c_typing = - let x = fresh g in - if x `Set.mem` freevars post //exclude this - then fail g None "Unexpected name clash" - else if not (eq_tm (comp_res c) post_hint.ret_ty && - eq_univ (comp_u c) post_hint.u && - eq_tm (comp_post c) post_hint.post) //exclude by check' strengthening - then ( - fail g None "Unexpected result type in branches" - ) - else ( + + let (| br, c, d |) = + let ppname = mk_ppname_no_range "_if_br" in + let r = + check g_with_eq pre pre_typing (Some post_hint) ppname br in + apply_checker_result_k r ppname in + + let br_name = if is_then then "then" else "else" in + + if hyp `Set.mem` freevars_st br + then fail g (Some br.range) + (Printf.sprintf "check_if: branch hypothesis is in freevars of checked %s branch" br_name) + else (| br, c, d |) + in + + let (| e1, c1, e1_typing |) = check_branch tm_true e1 true in + let (| e2, c2, e2_typing |) = check_branch tm_false e2 false in + let (| c, e1_typing, e2_typing |) = + combine_if_branches _ _ _ e1_typing _ _ _ e2_typing in + + let c_typing = + let x = fresh g in + if x `Set.mem` freevars post //exclude this + then fail g None "Impossible: check_if: unexpected freevar in post, please file a bug-report" + else if not (eq_tm (comp_res c) post_hint.ret_ty && + eq_univ (comp_u c) post_hint.u && + eq_tm (comp_post c) post_hint.post) //exclude by check' strengthening + then fail g None + (Printf.sprintf "check_if: computation type after combining branches does not match post hint,\ + computed: (%s, %s, %s), expected (%s, %s, %s)" + (P.univ_to_string (comp_u c)) (P.term_to_string (comp_res c)) (P.term_to_string (comp_post c)) + (P.univ_to_string post_hint.u) (P.term_to_string post_hint.ret_ty) (P.term_to_string post_hint.post)) + else let post_typing = post_hint_typing g post_hint x in intro_comp_typing g c pre_typing post_typing.ty_typing x post_typing.post_typing - ) - in - (| _, //Tm_If b e1 e2 None, - c, - T_If g b e1 e2 c _ hyp (E b_typing) e1_typing e2_typing (E c_typing) |) + in + + let d : st_typing_in_ctxt g pre (Some post_hint) = + (| _, c, T_If g b e1 e2 c _ hyp (E b_typing) e1_typing e2_typing (E c_typing) |) in + + checker_result_for_st_typing d res_ppname diff --git a/lib/steel/pulse/Pulse.Checker.If.fst.hints b/lib/steel/pulse/Pulse.Checker.If.fst.hints index 92f3247d7..f5efca85b 100644 --- a/lib/steel/pulse/Pulse.Checker.If.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.If.fst.hints @@ -1,21 +1,24 @@ [ - "\r*\u00105yrȑބ", + ")lZ#]Ո_\u000e\u001f;F", [ [ "Pulse.Checker.If.combine_if_branches", 1, - 2, + 0, 1, [ "@MaxIFuel_assumption", "@query", "FStar.Pervasives_interpretation_Tm_arrow_0b6559e6ff3addf84b0c2880affbb335", "Prims_interpretation_Tm_arrow_2eaa01e78f73e9bab5d0955fc1a662da", + "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", "Pulse.Checker.If_interpretation_Tm_arrow_28de09fbc328645c535d32b82f5c72f3", "Pulse.Checker.If_interpretation_Tm_arrow_7d6bcd2fcb58c4c962825c1408309012", "Pulse.Syntax.Base_pretyping_0b425ab385a56835d52cd71c18622a32", "Pulse.Syntax.Base_pretyping_b015b044c5bf00a3dd3df9fa711c87dd", "bool_inversion", "bool_typing", "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_FStar.Tactics.Result.Failed", + "constructor_distinct_FStar.Tactics.Result.Success", "constructor_distinct_Pulse.Syntax.Base.C_ST", "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", "constructor_distinct_Pulse.Syntax.Base.C_STGhost", @@ -53,7 +56,6 @@ "equation_Pulse.Syntax.Base.tm_exists_sl", "equation_Pulse.Syntax.Base.tm_pure", "equation_Pulse.Syntax.Base.tm_star", - "equation_Pulse.Syntax.Base.v_as_nv", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.with_range", "equation_Pulse.Syntax.Pure.u_zero", @@ -86,6 +88,12 @@ "projection_inverse_FStar.Pervasives.Mkdtuple3__3", "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_FStar.Tactics.Result.Failed_a", + "projection_inverse_FStar.Tactics.Result.Failed_exn", + "projection_inverse_FStar.Tactics.Result.Failed_ps", + "projection_inverse_FStar.Tactics.Result.Success_a", + "projection_inverse_FStar.Tactics.Result.Success_ps", + "projection_inverse_FStar.Tactics.Result.Success_v", "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", @@ -103,7 +111,7 @@ "refinement_interpretation_Tm_refine_f0ac051651fa0e095f1b2c1241fd6a3f", "refinement_interpretation_Tm_refine_fcab9cead87b773559d4e1b8bdfab842", "refinement_kinding_Tm_refine_f14e2afd7a235f4fca1d56ac00cdff1a", - "typing_Pulse.Syntax.Base.eq_tm", + "string_typing", "typing_Pulse.Syntax.Base.eq_tm", "typing_Pulse.Syntax.Base.stateful_comp", "typing_Pulse.Syntax.Base.tm_emp_inames", "typing_Pulse.Syntax.Base.uu___is_C_ST", @@ -115,65 +123,100 @@ "typing_tok_Pulse.Syntax.Base.Implicit@tok" ], 0, - "79e3d7174c431c85c063b00304cd1ca1" + "11729c0c0a9fcd177f45150622d7079f" ], [ - "Pulse.Checker.If.check_if", + "Pulse.Checker.If.check", 1, 0, 1, + [ + "@MaxIFuel_assumption", "@query", + "equation_Pulse.Typing.post_hint_for_env", + "proj_equation_FStar.Pervasives.Native.Some_v", + "projection_inverse_FStar.Pervasives.Native.Some_v", + "refinement_interpretation_Tm_refine_6e8e5238aadfc712ef5fa6bc6310c384" + ], + 0, + "3ac0d9a4505c285458801b34fbbae11a" + ], + [ + "Pulse.Checker.If.check", + 2, + 0, + 1, [ "@MaxIFuel_assumption", "@fuel_correspondence_Pulse.Syntax.Naming.freevars_st.fuel_instrumented", - "@query", "Pulse.Typing_pretyping_85b09ae4ef91823fbf549acd09fde244", - "bool_inversion", "bool_typing", + "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "Pulse.Syntax.Base_pretyping_0b425ab385a56835d52cd71c18622a32", + "Pulse.Typing_pretyping_85b09ae4ef91823fbf549acd09fde244", + "bool_inversion", "constructor_distinct_FStar.Pervasives.Native.None", "constructor_distinct_FStar.Pervasives.Native.Some", "constructor_distinct_FStar.Tactics.Result.Failed", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", + "data_elim_Pulse.Syntax.Base.Mkppname", + "data_elim_Pulse.Typing.Mkpost_hint_t", "disc_equation_FStar.Pervasives.Native.None", "disc_equation_Pulse.Syntax.Base.C_ST", "disc_equation_Pulse.Syntax.Base.C_STAtomic", "disc_equation_Pulse.Syntax.Base.C_STGhost", "disc_equation_Pulse.Syntax.Base.C_Tot", + "equality_tok_Pulse.Syntax.Base.Implicit@tok", + "equation_FStar.Range.range", "equation_FStar.Reflection.Typing.fstar_top_env", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", + "equation_FStar.Reflection.Typing.pp_name_t", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Sealed.Inhabited.sealed", + "equation_FStar.Sealed.Inhabited.sealed_", "equation_Prims.eqtype", "equation_Prims.nat", "equation_Pulse.Syntax.Base.comp_post", "equation_Pulse.Syntax.Base.comp_pre", "equation_Pulse.Syntax.Base.comp_res", "equation_Pulse.Syntax.Base.comp_st", "equation_Pulse.Syntax.Base.comp_u", + "equation_Pulse.Syntax.Base.mk_ppname_no_range", + "equation_Pulse.Syntax.Base.ppname_default", + "equation_Pulse.Syntax.Base.range", "equation_Pulse.Syntax.Base.st_comp_of_comp", "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Syntax.Base.vprop", + "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.universe", + "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", "equation_Pulse.Syntax.Pure.tm_type", "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.env_extends", "equation_Pulse.Typing.Env.extends_with", "equation_Pulse.Typing.Env.lookup", "equation_Pulse.Typing.comp_post_matches_hint", - "equation_Pulse.Typing.fresh_wrt", "equation_Pulse.Typing.mk_eq2", + "equation_Pulse.Typing.elab_env", "equation_Pulse.Typing.fresh_wrt", + "equation_Pulse.Typing.mk_eq2", "equation_Pulse.Typing.post_hint_for_env", "equation_Pulse.Typing.post_hint_for_env_p", "equation_Pulse.Typing.tm_bool", "fuel_guarded_inversion_FStar.Tactics.Result.__result", "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.ppname", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "fuel_guarded_inversion_Pulse.Syntax.Base.term", "fuel_guarded_inversion_Pulse.Typing.post_hint_t", "function_token_typing_Prims.__cache_version_number__", "function_token_typing_Prims.int", + "function_token_typing_Prims.string", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Sealed.Inhabited.sealed_singleton", "lemma_FStar.Set.mem_union", + "lemma_Pulse.Syntax.Base.range_singleton", + "lemma_Pulse.Typing.Env.push_binding_bs", "lemma_Pulse.Typing.Env.push_env_as_map", "lemma_Pulse.Typing.post_hint_for_env_extends", "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", "primitive_Prims.op_Negation", "proj_equation_FStar.Pervasives.Native.Some_v", "proj_equation_Pulse.Typing.Mkpost_hint_t_g", + "proj_equation_Pulse.Typing.Mkpost_hint_t_post", "proj_equation_Pulse.Typing.Mkpost_hint_t_ret_ty", "proj_equation_Pulse.Typing.Mkpost_hint_t_u", "projection_inverse_BoxBool_proj_0", @@ -183,31 +226,39 @@ "projection_inverse_FStar.Tactics.Result.Failed_a", "projection_inverse_FStar.Tactics.Result.Failed_exn", "projection_inverse_FStar.Tactics.Result.Failed_ps", - "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", + "refinement_interpretation_Tm_refine_1d91d84778b7937886ecec3dcb0444cd", + "refinement_interpretation_Tm_refine_25fe9861b42cf97d961ff4c8f44eb399", "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", - "refinement_interpretation_Tm_refine_385f59c31213d29cc308b93df5d99dc9", + "refinement_interpretation_Tm_refine_33d567938eec4cdca133070454c31653", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", "refinement_interpretation_Tm_refine_6e8e5238aadfc712ef5fa6bc6310c384", "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "refinement_interpretation_Tm_refine_853b1e0a397dce148f10bb8160c83223", - "refinement_interpretation_Tm_refine_c3cdd79757da4541443d51d9701d4eac", + "refinement_interpretation_Tm_refine_7c5ff3961efc14619e61d19ec2166b01", + "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "refinement_interpretation_Tm_refine_eed994d15518279ab75d745192d0d368", "refinement_interpretation_Tm_refine_f0ac051651fa0e095f1b2c1241fd6a3f", "refinement_interpretation_Tm_refine_f14e2afd7a235f4fca1d56ac00cdff1a", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Syntax.Base.comp_post", + "string_typing", "typing_FStar.Map.contains", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Sealed.seal", + "typing_FStar.Set.mem", + "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__range", "typing_Pulse.Syntax.Base.comp_res", - "typing_Pulse.Syntax.Base.comp_u", "typing_Pulse.Syntax.Base.eq_tm", - "typing_Pulse.Syntax.Base.eq_univ", + "typing_Pulse.Syntax.Base.eq_tm", "typing_Pulse.Syntax.Base.eq_univ", + "typing_Pulse.Syntax.Base.mk_ppname_no_range", + "typing_Pulse.Syntax.Base.ppname_default", "typing_Pulse.Syntax.Naming.freevars_st", "typing_Pulse.Syntax.Pure.u0", "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", "typing_Pulse.Typing.Env.fresh", "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.push_binding", + "typing_Pulse.Typing.Env.push_context", "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g", - "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__ret_ty", - "typing_Pulse.Typing.mk_eq2", "typing_Pulse.Typing.tm_bool" + "typing_Pulse.Typing.mk_eq2", "typing_Pulse.Typing.tm_bool", + "typing_tok_Pulse.Syntax.Base.Implicit@tok" ], 0, - "df35d6e8e90e02f8baa1db8729f05e87" + "32dc683d002fea1a4513197331c77d0f" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.If.fsti b/lib/steel/pulse/Pulse.Checker.If.fsti index 786e2ebb0..44aef749f 100644 --- a/lib/steel/pulse/Pulse.Checker.If.fsti +++ b/lib/steel/pulse/Pulse.Checker.If.fsti @@ -4,13 +4,15 @@ module T = FStar.Tactics.V2 open Pulse.Syntax open Pulse.Typing -open Pulse.Checker.Common +open Pulse.Checker.Base -val check_if (g:env) - (b:term) - (e1 e2:st_term) - (pre:term) - (pre_typing: tot_typing g pre tm_vprop) - (post_hint:post_hint_for_env g) - (check:check_t) +val check + (g:env) + (pre:term) + (pre_typing: tot_typing g pre tm_vprop) + (post_hint:post_hint_for_env g) + (res_ppname:ppname) + (b:term) + (e1 e2:st_term) + (check:check_t) : T.Tac (checker_result_t g pre (Some post_hint)) diff --git a/lib/steel/pulse/Pulse.Checker.If.fsti.hints b/lib/steel/pulse/Pulse.Checker.If.fsti.hints index f2ebce9c4..b8138a94e 100644 --- a/lib/steel/pulse/Pulse.Checker.If.fsti.hints +++ b/lib/steel/pulse/Pulse.Checker.If.fsti.hints @@ -1 +1,20 @@ -[ "h.2oXAURGiPB", [] ] \ No newline at end of file +[ + "\u0006=eCp\u000b:dڛ\u00071", + [ + [ + "Pulse.Checker.If.check", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "equation_Pulse.Typing.post_hint_for_env", + "proj_equation_FStar.Pervasives.Native.Some_v", + "projection_inverse_FStar.Pervasives.Native.Some_v", + "refinement_interpretation_Tm_refine_6e8e5238aadfc712ef5fa6bc6310c384" + ], + 0, + "eaddd3d566a9c5e55c916b61233cf651" + ] + ] +] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Inference.fst b/lib/steel/pulse/Pulse.Checker.Inference.fst deleted file mode 100644 index 2948d835a..000000000 --- a/lib/steel/pulse/Pulse.Checker.Inference.fst +++ /dev/null @@ -1,448 +0,0 @@ -module Pulse.Checker.Inference - -module L = FStar.List.Tot -module T = FStar.Tactics.V2 -open FStar.List.Tot -open Pulse.Syntax -open Pulse.Typing -open Pulse.Checker.Framing -open Pulse.Checker.VPropEquiv -module P = Pulse.Syntax.Printer -module Common = Pulse.Checker.Common -module RT = FStar.Reflection.Typing -module RUtil = Pulse.Reflection.Util -module RU = Pulse.RuntimeUtils - -let debug_log = Pulse.Typing.debug_log "inference" - -let uvar_id = nat -let uvar = uvar_id & ppname - -let uvar_eq (u1 u2:uvar) : b:bool { b <==> (u1 == u2)} = - fst u1 = fst u2 - -let uvar_to_string (num, pp) = - if RU.debug_at_level_no_module "Pulse" - then FStar.Printf.sprintf "?.%s_%d" (T.unseal pp.name) num - else FStar.Printf.sprintf "?.%s" (T.unseal pp.name) - -let range_of_uvar (u:uvar) : range = (snd u).range - -let embedded_uvar_prefix = "?" - -let is_uvar_r (t:R.term) : option uvar = - match R.inspect_ln t with - | R.Tv_UInst fv [u] -> ( - match R.inspect_fv fv with - | [prefix; name] -> - if prefix = embedded_uvar_prefix - then match R.inspect_universe u with - | R.Uv_BVar n -> Some (n, mk_ppname (T.seal name) (T.range_of_term t)) - | _ -> None - else None - | _ -> None - ) - | _ -> None - -let is_uvar (t:term) : option uvar = - match t.t with - | Tm_FStar r -> is_uvar_r r - | _ -> None - -let wrap_nat_to_uvar (name:string) (r:range) (n:nat) : term = - let tm = R.pack_ln (R.Tv_UInst (R.pack_fv [embedded_uvar_prefix; name]) [R.pack_universe (R.Uv_BVar n)]) in - tm_fstar tm r - -let gen_uvar (name:ppname) = - let n = T.fresh () in - assume (n >= 0); // TODO: relying on the implementation of fresh in the typechecker - let nm = T.unseal name.name in - (n, name), wrap_nat_to_uvar nm name.range n - -let rec gen_uvars (g:env) (t_head:term) : T.Tac (list uvar & comp) = - let ropt = is_arrow t_head in - match ropt with - | Some (b, Some Implicit, c_rest) -> ( - let n, tm = gen_uvar b.binder_ppname in - let c_rest = open_comp_with c_rest tm in - match c_rest with - | C_ST c - | C_STAtomic _ c - | C_STGhost _ c -> - [n], c_rest - | C_Tot t -> - let n_rest, comp_typ = gen_uvars g t in - n::n_rest, comp_typ - ) - | _ -> - fail g None (FStar.Printf.sprintf "gen_uvars: unexpected t_head: %s" - (P.term_to_string t_head)) - -let rec check_valid_solution (g:env) (n:uvar) (t:term) (uv_sols:solution) - : T.Tac solution = - - match uv_sols with - | [] -> [n, t] - | (n', t')::tl -> - if uvar_eq n n' - then if eq_tm t t' then uv_sols - else fail g None "check_valid_solution failed" - else (n', t')::(check_valid_solution g n t tl) - -let uvar_index (t:term{Some? (is_uvar t)}) : uvar = - Some?.v (is_uvar t) - -let is_reveal_uvar (t:term) : option (universe & term & term) = - match is_pure_app t with - | Some (hd, None, arg) -> - (match is_pure_app hd with - | Some (hd, Some Implicit, ty) -> - if Some? (is_uvar arg) - then match is_fvar hd with - | Some (l, [u]) -> - if l = RUtil.reveal_lid - then Some (u, ty, arg) - else None - | _ -> None - else None - | _ -> None) - | _ -> None - -let is_reveal (t:term) : bool = - match leftmost_head t with - | Some hd -> - (match is_fvar hd with - | Some (l, [_]) -> l = RUtil.reveal_lid - | _ -> false) - | _ -> false - -let rec match_typ (g:env) (t1 t2:term) (uv_sols:solution) - : T.Tac solution = - - match is_reveal_uvar t1, is_reveal t2 with - | Some (u, ty, t), false -> - check_valid_solution g (uvar_index t) (mk_hide u ty t2) uv_sols - | _ -> - if Some? (is_uvar t1) - then check_valid_solution g (uvar_index t1) t2 uv_sols - else if Some? (is_uvar t2) - then fail g (Some t2.range) - (Printf.sprintf - "Could not match the term %s with %s, since the former contains a unification variable" - (P.term_to_string t2) - (P.term_to_string t1)) - else match t1.t, t2.t with - | Tm_Pure t1, Tm_Pure t2 -> - match_typ g t1 t2 uv_sols - - | _, _ -> - match is_pure_app t1, is_pure_app t2 with - | Some (head1, arg_qual1, arg1), Some (head2, arg_qual2, arg2) -> - if arg_qual1 = arg_qual2 - then let uv_sols = match_typ g head1 head2 uv_sols in - match_typ g arg1 arg2 uv_sols - else uv_sols - - | _, _ -> uv_sols - -let rec atomic_vprop_has_uvar (t:term) : bool = - if Some? (is_uvar t) then true - else match t.t with - | Tm_Pure arg -> atomic_vprop_has_uvar arg - | Tm_Emp -> false - | _ -> - match is_pure_app t with - | Some (head, _, arg) -> - assume (head << t /\ arg << t); - atomic_vprop_has_uvar head || atomic_vprop_has_uvar arg - | _ -> false - -let rec atomic_vprops_may_match (t1:term) (t2:term) : bool = - if Some? (is_reveal_uvar t1) && not (is_reveal t2) - then true - else if Some? (is_uvar t1) then true - else match t1.t, t2.t with - | Tm_Pure x, Tm_Pure y -> - atomic_vprops_may_match x y - | _, _ -> - match is_pure_app t1, is_pure_app t2 with - | Some (head1, q1, arg1), Some (head2, q2, arg2) -> - assume (head1 << t1 /\ arg1 << t1); - assume (head2 << t2 /\ arg2 << t2); - atomic_vprops_may_match head1 head2 && - q1 = q2 && - atomic_vprops_may_match arg1 arg2 - | _, _ -> eq_tm t1 t2 - -let infer_one_atomic_vprop (g:env) (t:term) (ctxt:list term) (uv_sols:solution) - : T.Tac solution = - - if atomic_vprop_has_uvar t - then - let matching_ctxt = List.Tot.filter (fun ctxt_vp -> atomic_vprops_may_match t ctxt_vp) ctxt in - debug_log g (fun _ -> Printf.sprintf "infer_one_atomic_vprop %s, found %d matching candidates\n" - (P.term_to_string t) - (List.Tot.length matching_ctxt)); - if List.Tot.length matching_ctxt = 1 - then ( - debug_log g (fun _ -> Printf.sprintf "infer_one_atomic_vprop: matching %s and %s with %d exisiting solutions\n" - (P.term_to_string t) - (P.term_to_string (List.Tot.hd matching_ctxt)) - (List.Tot.length uv_sols)); - let uv_sols = match_typ g t (List.Tot.hd matching_ctxt) uv_sols in - debug_log g (fun _ -> Printf.sprintf "post matching, uv_sols has %d solutions\n" - (List.Tot.length uv_sols)); - uv_sols - ) - else uv_sols - else uv_sols - -let union_ranges (r0 r1:range) : T.Tac range = r0 -let with_range (t:st_term') (r:range) : st_term = { term = t; range = r} - -let rec rebuild_head (g:env) (head:term) (uvs:list uvar) (uv_sols:solution) (r:range) - : T.TacH st_term (requires fun _ -> List.Tot.length uvs > 0) - (ensures fun _ _ -> True) = - let hd::tl = uvs in - let ropt = List.Tot.find (fun (n1, _) -> uvar_eq hd n1) uv_sols in - match ropt with - | None -> - fail g (Some r) - (FStar.Printf.sprintf - "inference failed in building head, no solution for %s\n" - (uvar_to_string hd)) - | Some (_, t2) -> - match tl with - | [] -> with_range (Tm_STApp { head; arg_qual= Some Implicit; arg=t2 }) - r - | _ -> - let app_node = tm_pureapp head (Some Implicit) t2 in - rebuild_head g app_node tl uv_sols r - - -let print_solutions (l:solution) - : T.Tac string - = String.concat "\n" - (T.map #(uvar & term) #string - (fun (u, t) -> - Printf.sprintf "%s := %s" - (uvar_to_string u) - (P.term_to_string t)) - l) - - -let find_solution (sol:solution) (t:uvar) - : option term - = let r = List.Tot.find (fun (u, _) -> uvar_eq u t) sol in - match r with - | None -> None - | Some (_, t) -> Some t - -let unsolved_uvs (sol:solution) (uvs:list uvar) - : option (list uvar) - = let unsolved = List.Tot.filter (fun uv-> None? (find_solution sol uv)) uvs in - match unsolved with - | [] -> None - | _ -> Some unsolved - -let unsolved (sol:solution) (uvs:list (uvar & term)) - : option (list (uvar & term)) - = let unsolved = List.Tot.filter (fun (uv, _) -> None? (find_solution sol uv)) uvs in - match unsolved with - | [] -> None - | _ -> Some unsolved - -let try_inst_uvs_in_goal (g:env) (ctxt:term) - (goal:vprop) - : T.Tac solution - = let uv_sols = [] in - let goal_list = vprop_as_list goal in - let ctxt_list = vprop_as_list ctxt in - let uv_sols = - T.fold_left - (fun uv_sols goal_vprop -> - infer_one_atomic_vprop g goal_vprop ctxt_list uv_sols) - uv_sols - goal_list - in - let sols = uv_sols in - sols - - - -let solutions_to_string sol = print_solutions sol - -let apply_sol (sol:solution) (t:R.term) = - let solve_uvar (t:R.term) : T.Tac R.term = - match is_uvar_r t with - | None -> t - | Some n -> - match find_solution sol n with - | None -> t - | Some ({t=Tm_FStar t}) -> t - | Some t -> Pulse.Elaborate.Pure.elab_term t - in - FStar.Tactics.Visit.visit_tm solve_uvar t - -let rec apply_solution (sol:solution) (t:term) - : T.Tac term - = let w (t':term') : term = Pulse.Syntax.Base.with_range t' t.range in - match t.t with - | Tm_Emp - | Tm_VProp - | Tm_Inames - | Tm_EmpInames - | Tm_Unknown -> t - - | Tm_FStar t -> - let t = apply_sol sol t in - assume (not_tv_unknown t); - w (Tm_FStar t) - - | Tm_Pure p -> - w (Tm_Pure (apply_solution sol p)) - - | Tm_Star l r -> - w (Tm_Star (apply_solution sol l) - (apply_solution sol r)) - - | Tm_ExistsSL u b body -> - w (Tm_ExistsSL u { b with binder_ty = apply_solution sol b.binder_ty } - (apply_solution sol body)) - - | Tm_ForallSL u b body -> - w (Tm_ForallSL u { b with binder_ty = apply_solution sol b.binder_ty } - (apply_solution sol body)) - -let filter_common_terms (goal ctxt:list term) : list term * list term = - let matched, unsolved_goals = L.partition (fun g -> L.existsb (eq_tm g) ctxt) goal in - let remaining_ctxt = L.filter (fun g -> not (L.existsb (eq_tm g) matched)) ctxt in - unsolved_goals, remaining_ctxt - -let infer - (g:env) - (head:term) - (t_head:term) - (ctxt_pre:term) - (r:range) - : T.Tac st_term = - let g = push_context g "infer" r in - let uvs, pre = - let uvs, comp = gen_uvars g t_head in - match comp with - | C_ST st_comp - | C_STAtomic _ st_comp - | C_STGhost _ st_comp -> uvs, st_comp.pre - | _ -> fail g (Some r) "infer:unexpected comp type" - in - - if List.Tot.length uvs = 0 - then fail g (Some r) "Inference did not find anything to infer" - else begin - debug_log g (fun _ -> - Printf.sprintf "Generated %d uvars,\n\ - ctx: {\n%s\n}\n\ - st_comp.pre:{\n%s\n}" - (List.Tot.length uvs) - (P.term_list_to_string "\n" (vprop_as_list ctxt_pre)) - (P.term_list_to_string "\n" (vprop_as_list pre))); - let uv_sols = try_inst_uvs_in_goal g ctxt_pre pre in - match unsolved_uvs uv_sols uvs with - | None -> - debug_log g (fun _ -> Printf.sprintf "Got solutions: {\n%s\}" (print_solutions uv_sols)); - let head = rebuild_head g head uvs uv_sols r in - debug_log g (fun _ -> Printf.sprintf "Rebuilt head= %s" (P.st_term_to_string head)); - head - | Some uvs -> - let goals = vprop_as_list (apply_solution uv_sols pre) in - let ctxt = vprop_as_list ctxt_pre in - let goals, ctxt = filter_common_terms goals ctxt in - fail g (Some r) - (Printf.sprintf "Could not infer some implicit arguments: %s;\n%s" - (String.concat ", " (T.map uvar_to_string uvs)) - (Pulse.Checker.Common.format_failed_goal g ctxt goals)) - end - -let contains_uvar_r (t:R.term) = - let is_uvar (t:R.term) : T.Tac R.term = - if Some? (is_uvar_r t) - then T.fail "found uvar" - else t - in - T.or_else - (fun _ -> - let _ = T.visit_tm is_uvar t in - false) - (fun _ -> true) - - -let rec contains_uvar (t:term) - : T.Tac bool - = match t.t with - | Tm_Emp - | Tm_VProp - | Tm_Inames - | Tm_EmpInames - | Tm_Unknown -> false - - | Tm_Pure p -> - (contains_uvar p) - - | Tm_Star l r -> - if contains_uvar l then true - else contains_uvar r - - | Tm_ExistsSL u t body -> - if contains_uvar t.binder_ty then true - else contains_uvar body - - | Tm_ForallSL u t body -> - if contains_uvar t.binder_ty then true - else contains_uvar body - - | Tm_FStar t -> - contains_uvar_r t - -let try_unify (g:env) (l r:term) = match_typ g l r [] - -module RF = FStar.Reflection.V2.Formula - -let is_eq2 (t:R.term) : option (R.term & R.term) = - let head, args = R.collect_app_ln t in - match R.inspect_ln head, args with - | R.Tv_FVar fv, [_; (a1, _); (a2, _)] - | R.Tv_UInst fv _, [_; (a1, _); (a2, _)] -> - let l = R.inspect_fv fv in - if l = ["Pulse"; "Steel"; "Wrapper"; "eq2_prop"] || - l = ["Prims"; "eq2"] - then Some (a1, a2) - else None - | _ -> None - -let try_solve_pure_equalities (g:env) (p:term) : T.Tac solution = - let rec aux (sol:solution) (t:R.term) : T.Tac solution = - let open RF in - let t = apply_sol sol t in - let f = RF.term_as_formula' t in - let handle_eq (t0 t1:R.term) = - let contains0 = contains_uvar_r t0 in - let contains1 = contains_uvar_r t1 in - if contains0 || contains1 - then ( - assume (not_tv_unknown t0 /\ not_tv_unknown t1); - try_unify g (tm_fstar t0 FStar.Range.range_0) - (tm_fstar t1 FStar.Range.range_0) @ sol - ) - else sol - in - match f with - | Comp (Eq _) t0 t1 -> handle_eq t0 t1 - | And t0 t1 -> aux (aux sol t0) t1 - | _ -> - match is_eq2 t with - | Some (t0, t1) -> handle_eq t0 t1 - | _ -> sol - in - match p.t with - | Tm_FStar t -> aux [] t - | _ -> [] diff --git a/lib/steel/pulse/Pulse.Checker.Inference.fst.hints b/lib/steel/pulse/Pulse.Checker.Inference.fst.hints deleted file mode 100644 index 1fb768712..000000000 --- a/lib/steel/pulse/Pulse.Checker.Inference.fst.hints +++ /dev/null @@ -1,620 +0,0 @@ -[ - "v>1O%pj\u001dA", - [ - [ - "Pulse.Checker.Inference.uvar_eq", - 1, - 2, - 2, - [ - "@MaxIFuel_assumption", "@query", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "data_elim_FStar.Pervasives.Native.Mktuple2", - "data_elim_Pulse.Syntax.Base.Mkppname", - "equation_FStar.Pervasives.Native.fst", "equation_FStar.Range.range", - "equation_FStar.Reflection.Typing.pp_name_t", - "equation_Prims.eqtype", "equation_Prims.nat", - "equation_Pulse.Checker.Inference.uvar", - "equation_Pulse.Checker.Inference.uvar_id", - "equation_Pulse.Syntax.Base.range", - "fuel_guarded_inversion_FStar.Pervasives.Native.tuple2", - "fuel_guarded_inversion_Pulse.Syntax.Base.ppname", - "function_token_typing_Prims.int", - "function_token_typing_Prims.string", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", - "lemma_FStar.Sealed.Inhabited.sealed_singleton", - "lemma_Pulse.Syntax.Base.range_singleton", - "proj_equation_FStar.Pervasives.Native.Mktuple2__1", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", - "string_typing" - ], - 0, - "f4c19e651b45d5010d0eef5b31280677" - ], - [ - "Pulse.Checker.Inference.uvar_to_string", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "string_typing" - ], - 0, - "f3657921d20cb92e19920613855bcdcf" - ], - [ - "Pulse.Checker.Inference.is_uvar_r", - 1, - 2, - 1, - [ - "@query", "equation_FStar.Sealed.Inhabited.is_sealed", "true_interp" - ], - 0, - "ec8f547e4b70534b4b000485ad19e425" - ], - [ - "Pulse.Checker.Inference.wrap_nat_to_uvar", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "FStar.Reflection.Types_pretyping_2e55a80de3ea7e6dff8c6be83b8dd816", - "FStar.Reflection.V2.Data_pretyping_9a2be86692da5fc1b335167d5a2d5432", - "constructor_distinct_FStar.Reflection.V2.Data.Tv_UInst", - "constructor_distinct_FStar.Reflection.V2.Data.Tv_Unknown", - "data_typing_intro_FStar.Reflection.V2.Data.Tv_UInst@tok", - "data_typing_intro_FStar.Reflection.V2.Data.Tv_Unknown@tok", - "data_typing_intro_FStar.Reflection.V2.Data.Uv_BVar@tok", - "data_typing_intro_Prims.Cons@tok", - "data_typing_intro_Prims.Nil@tok", - "equality_tok_FStar.Reflection.V2.Data.Tv_Unknown@tok", - "equation_FStar.Reflection.Types.name", - "equation_FStar.Reflection.V2.Data.universes", - "equation_Prims.eqtype", "equation_Pulse.Syntax.Base.not_tv_unknown", - "function_token_typing_FStar.Reflection.Types.universe", - "function_token_typing_Prims.string", - "lemma_FStar.Reflection.Typing.inspect_pack", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "typing_FStar.Reflection.Typing.unit_fv", - "typing_FStar.Reflection.V2.Builtins.pack_fv", - "typing_FStar.Reflection.V2.Builtins.pack_universe", - "typing_Pulse.Checker.Inference.embedded_uvar_prefix" - ], - 0, - "1d6f188dea165ea0b33e93af81013e7c" - ], - [ - "Pulse.Checker.Inference.gen_uvar", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "FStar.Reflection.Types_pretyping_2e55a80de3ea7e6dff8c6be83b8dd816", - "FStar.Reflection.V2.Data_pretyping_9a2be86692da5fc1b335167d5a2d5432", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "constructor_distinct_FStar.Reflection.V2.Data.Tv_UInst", - "constructor_distinct_FStar.Reflection.V2.Data.Uv_BVar", - "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", - "constructor_distinct_Pulse.Syntax.Base.Tm_FStar", - "data_elim_FStar.Tactics.Result.Success", - "data_elim_Pulse.Syntax.Base.Mkppname", - "data_typing_intro_FStar.Reflection.V2.Data.Tv_UInst@tok", - "data_typing_intro_FStar.Reflection.V2.Data.Tv_Unknown@tok", - "data_typing_intro_FStar.Reflection.V2.Data.Uv_BVar@tok", - "data_typing_intro_Prims.Cons@tok", - "data_typing_intro_Prims.Nil@tok", - "equation_FStar.Pervasives.Native.fst", - "equation_FStar.Pervasives.Native.snd", - "equation_FStar.Reflection.Types.name", - "equation_FStar.Reflection.Typing.pp_name_t", - "equation_FStar.Reflection.V2.Data.universes", - "equation_FStar.Sealed.Inhabited.is_sealed", - "equation_FStar.Sealed.Inhabited.sealed", - "equation_FStar.Sealed.Inhabited.sealed_", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Checker.Inference.is_uvar", - "equation_Pulse.Checker.Inference.is_uvar_r", - "equation_Pulse.Checker.Inference.uvar", - "equation_Pulse.Checker.Inference.wrap_nat_to_uvar", - "equation_Pulse.Syntax.Base.mk_ppname", - "equation_Pulse.Syntax.Base.range", - "equation_Pulse.Syntax.Base.tm_fstar", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.ppname", - "function_token_typing_FStar.Reflection.Types.universe", - "function_token_typing_Prims.string", "int_inversion", - "lemma_FStar.Reflection.Typing.inspect_pack", - "lemma_FStar.Reflection.Typing.inspect_pack_fv", - "lemma_FStar.Reflection.Typing.inspect_pack_universe", - "lemma_FStar.Sealed.Inhabited.sealed_singleton", - "lemma_Pulse.Syntax.Base.range_singleton", - "primitive_Prims.op_Equality", - "proj_equation_FStar.Pervasives.Native.Mktuple2__1", - "proj_equation_FStar.Pervasives.Native.Mktuple2__2", - "proj_equation_Pulse.Syntax.Base.Mkppname_range", - "proj_equation_Pulse.Syntax.Base.Mkterm_t", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", - "projection_inverse_FStar.Reflection.V2.Data.Tv_UInst_us", - "projection_inverse_FStar.Reflection.V2.Data.Tv_UInst_v", - "projection_inverse_FStar.Reflection.V2.Data.Uv_BVar__0", - "projection_inverse_Prims.Cons_a", - "projection_inverse_Prims.Cons_hd", - "projection_inverse_Prims.Cons_tl", "projection_inverse_Prims.Nil_a", - "projection_inverse_Pulse.Syntax.Base.Mkterm_t", - "projection_inverse_Pulse.Syntax.Base.Tm_FStar__0", - "refinement_interpretation_Tm_refine_25fe9861b42cf97d961ff4c8f44eb399", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", - "string_inversion", "string_typing", "true_interp", - "typing_FStar.Reflection.Typing.unit_fv", - "typing_FStar.Reflection.V2.Builtins.pack_fv", - "typing_FStar.Reflection.V2.Builtins.pack_ln", - "typing_FStar.Reflection.V2.Builtins.pack_universe", - "typing_FStar.Reflection.V2.Builtins.range_of_term", - "typing_FStar.Sealed.seal", - "typing_Pulse.Checker.Inference.embedded_uvar_prefix", - "typing_Pulse.Syntax.Base.__proj__Mkppname__item__range" - ], - 0, - "d74f9fbd14e2463b412f8de5c94653d3" - ], - [ - "Pulse.Checker.Inference.gen_uvars", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", - "constructor_distinct_Pulse.Syntax.Base.C_STGhost", - "constructor_distinct_Pulse.Syntax.Base.C_Tot", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Naming.open_comp_", - "equation_Pulse.Syntax.Naming.open_comp_with", - "equation_Pulse.Syntax.Naming.subst_comp", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", - "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "projection_inverse_Pulse.Syntax.Base.C_Tot__0", "string_typing" - ], - 0, - "56a0b1cb236a00211ee13beb5457d49f" - ], - [ - "Pulse.Checker.Inference.check_valid_solution", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "disc_equation_Prims.Cons", - "disc_equation_Prims.Nil", - "equation_Pulse.Checker.Inference.solution", - "fuel_guarded_inversion_Prims.list", - "projection_inverse_BoxBool_proj_0" - ], - 0, - "4f5e8e515ac99785119186f537899cb4" - ], - [ - "Pulse.Checker.Inference.uvar_index", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "refinement_interpretation_Tm_refine_28c06937355ee21667a4605a29eedb5a" - ], - 0, - "44fd07899f802a8dee38f7d86b3cb695" - ], - [ - "Pulse.Checker.Inference.is_reveal_uvar", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "assumption_Prims.list__uu___haseq", "equation_Prims.eqtype", - "function_token_typing_Prims.string", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" - ], - 0, - "4dfd53158151c0661489b5930c718a0e" - ], - [ - "Pulse.Checker.Inference.is_reveal", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "assumption_Prims.list__uu___haseq", "equation_Prims.eqtype", - "function_token_typing_Prims.string", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" - ], - 0, - "b63f3301eb13769e165fe921e34367f8" - ], - [ - "Pulse.Checker.Inference.match_typ", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "Prims_pretyping_f537159ed795b314b4e58c260361ae86", - "Pulse.Syntax.Base_pretyping_0b425ab385a56835d52cd71c18622a32", - "assumption_FStar.Pervasives.Native.option__uu___haseq", - "assumption_Pulse.Syntax.Base.qualifier__uu___haseq", "bool_typing", - "constructor_distinct_FStar.Pervasives.Native.None", - "constructor_distinct_FStar.Pervasives.Native.Some", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_FStar.Pervasives.Native.Some", - "equality_tok_Pulse.Syntax.Base.Implicit@tok", - "equation_Pulse.Checker.Inference.is_reveal_uvar", - "equation_Pulse.Checker.Inference.is_uvar", - "equation_Pulse.Checker.Inference.uvar", - "equation_Pulse.Syntax.Base.universe", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "function_token_typing_Pulse.Checker.Inference.uvar", - "kinding_Pulse.Syntax.Base.qualifier@tok", - "lemma_FStar.Pervasives.invertOption", "primitive_Prims.op_Equality", - "proj_equation_FStar.Pervasives.Native.Mktuple2__1", - "proj_equation_FStar.Pervasives.Native.Mktuple2__2", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", - "projection_inverse_FStar.Pervasives.Native.Mktuple3__3", - "projection_inverse_FStar.Pervasives.Native.Some_v", "string_typing", - "typing_Pulse.Checker.Inference.is_uvar", - "typing_tok_Pulse.Syntax.Base.Implicit@tok" - ], - 0, - "2327db370450c1eb3e864bfb46c30908" - ], - [ - "Pulse.Checker.Inference.atomic_vprop_has_uvar", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "binder_x_40f47b036cc24e11c7ed578f0b141555_0", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "proj_equation_Pulse.Syntax.Base.Mkterm_t", - "subterm_ordering_Pulse.Syntax.Base.Mkterm", - "subterm_ordering_Pulse.Syntax.Base.Tm_Pure", - "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t" - ], - 0, - "2f8c4fe78c3850ddb308b9961222a8b6" - ], - [ - "Pulse.Checker.Inference.atomic_vprops_may_match", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "Pulse.Syntax.Base_pretyping_0b425ab385a56835d52cd71c18622a32", - "Pulse.Syntax.Base_pretyping_5ef675e67e1523ed8824953186d0262c", - "assumption_FStar.Pervasives.Native.option__uu___haseq", - "assumption_Pulse.Syntax.Base.qualifier__uu___haseq", - "binder_x_40f47b036cc24e11c7ed578f0b141555_0", - "data_typing_intro_Pulse.Syntax.Base.Tm_VProp@tok", - "equality_tok_Pulse.Syntax.Base.Implicit@tok", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "kinding_Pulse.Syntax.Base.qualifier@tok", - "proj_equation_Pulse.Syntax.Base.Mkterm_t", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", - "subterm_ordering_Pulse.Syntax.Base.Mkterm", - "subterm_ordering_Pulse.Syntax.Base.Tm_Pure", - "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t", - "typing_tok_Pulse.Syntax.Base.Implicit@tok" - ], - 0, - "ee6220212cd9b5ec5af43a2e2058c325" - ], - [ - "Pulse.Checker.Inference.infer_one_atomic_vprop", - 1, - 2, - 1, - [ - "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_FStar.List.Tot.Base.filter.fuel_instrumented", - "@fuel_correspondence_FStar.List.Tot.Base.length.fuel_instrumented", - "@query", - "FStar.List.Tot.Base_interpretation_Tm_arrow_84543425b818e2d10a976186b8e8c250", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "Pulse.Syntax.Naming_interpretation_Tm_arrow_12fa1b3ed1cc1655dcad602c3f14587a", - "constructor_distinct_FStar.Integers.Signed", - "constructor_distinct_FStar.Integers.Winfinite", - "disc_equation_Prims.Cons", - "equality_tok_FStar.Integers.Winfinite@tok", - "equation_FStar.Integers.int_t", - "equation_Pulse.Checker.Inference.solution", - "equation_with_fuel_FStar.List.Tot.Base.length.fuel_instrumented", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Prims.list", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "kinding_Pulse.Syntax.Base.term@tok", "primitive_Prims.op_Equality", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_BoxInt_proj_0", - "projection_inverse_FStar.Integers.Signed__0", - "refinement_interpretation_Tm_refine_5c77e54d118aa26696ff018c647e0d2c", - "string_typing", "typing_FStar.List.Tot.Base.filter", - "typing_Tm_abs_a50df50776e7513dd631c9344c84f8ba" - ], - 0, - "0edf761b1a2a8c60262ac68e3efab34d" - ], - [ - "Pulse.Checker.Inference.rebuild_head", - 1, - 2, - 1, - [ - "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_FStar.List.Tot.Base.find.fuel_instrumented", - "@fuel_correspondence_FStar.List.Tot.Base.length.fuel_instrumented", - "@fuel_irrelevance_FStar.List.Tot.Base.length.fuel_instrumented", - "@query", - "FStar.List.Tot.Base_interpretation_Tm_arrow_84543425b818e2d10a976186b8e8c250", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "Pulse.Checker.Inference_interpretation_Tm_arrow_9cdba1df59dc8ce2c635c5d32aff32d8", - "constructor_distinct_FStar.Pervasives.Native.None", - "constructor_distinct_FStar.Tactics.Result.Success", - "constructor_distinct_Tm_unit", - "data_elim_FStar.Tactics.Result.Failed", "data_elim_Prims.Cons", - "data_typing_intro_FStar.Tactics.Result.Failed@tok", - "data_typing_intro_FStar.Tactics.Result.Success@tok", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_FStar.Pervasives.Native.Some", - "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", - "equation_Prims.nat", "equation_Pulse.Checker.Inference.solution", - "equation_Pulse.Checker.Inference.uvar", - "equation_Pulse.Checker.Inference.uvar_id", - "equation_with_fuel_FStar.List.Tot.Base.find.fuel_instrumented", - "equation_with_fuel_FStar.List.Tot.Base.length.fuel_instrumented", - "fuel_guarded_inversion_FStar.Pervasives.Native.option", - "fuel_guarded_inversion_FStar.Pervasives.Native.tuple2", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Prims.list", - "function_token_typing_Pulse.Checker.Inference.uvar", - "int_inversion", "kinding_FStar.Pervasives.Native.tuple2@tok", - "kinding_Pulse.Syntax.Base.st_term@tok", - "kinding_Pulse.Syntax.Base.term@tok", "primitive_Prims.op_Addition", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_BoxInt_proj_0", - "projection_inverse_FStar.Pervasives.Native.None_a", - "projection_inverse_FStar.Tactics.Result.Success_a", - "projection_inverse_FStar.Tactics.Result.Success_ps", - "projection_inverse_FStar.Tactics.Result.Success_v", - "projection_inverse_Prims.Cons_hd", - "projection_inverse_Prims.Cons_tl", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "string_typing", - "token_correspondence_FStar.List.Tot.Base.length.fuel_instrumented", - "typing_FStar.List.Tot.Base.find", - "typing_FStar.List.Tot.Base.length", - "typing_Tm_abs_1583e66041c1d967451ef8a185bc2eb2" - ], - 0, - "48cd50c2d74cf54214bd902f1c70a0e6" - ], - [ - "Pulse.Checker.Inference.print_solutions", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "string_typing" - ], - 0, - "8715a6139d20a987112c40215041b8d5" - ], - [ - "Pulse.Checker.Inference.find_solution", - 1, - 2, - 1, - [ - "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_FStar.List.Tot.Base.find.fuel_instrumented", - "@query", - "FStar.List.Tot.Base_interpretation_Tm_arrow_84543425b818e2d10a976186b8e8c250", - "Pulse.Checker.Inference_interpretation_Tm_arrow_9cdba1df59dc8ce2c635c5d32aff32d8", - "constructor_distinct_FStar.Pervasives.Native.None", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_FStar.Pervasives.Native.Some", - "equation_Pulse.Checker.Inference.solution", - "equation_Pulse.Checker.Inference.uvar", - "equation_with_fuel_FStar.List.Tot.Base.find.fuel_instrumented", - "fuel_guarded_inversion_FStar.Pervasives.Native.option", - "function_token_typing_Pulse.Checker.Inference.uvar", - "kinding_FStar.Pervasives.Native.tuple2@tok", - "kinding_Pulse.Syntax.Base.term@tok", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Native.None_a", - "typing_FStar.List.Tot.Base.find", - "typing_Tm_abs_a95fc995fc65154c93f16aa142ec453d" - ], - 0, - "9bcc11786c015cbb34331ff66ef2e1e1" - ], - [ - "Pulse.Checker.Inference.apply_sol", - 1, - 2, - 1, - [ - "@query", "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_FStar.Pervasives.Native.Some", - "equation_Pulse.Checker.Inference.find_solution", - "equation_Pulse.Checker.Inference.is_uvar_r", - "equation_Pulse.Checker.Inference.uvar", - "function_token_typing_Pulse.Checker.Inference.uvar", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Pervasives.invertOption", - "typing_Pulse.Checker.Inference.find_solution", - "typing_Pulse.Checker.Inference.is_uvar_r" - ], - 0, - "eb9af06216c1eb30f6110ea6c113233e" - ], - [ - "Pulse.Checker.Inference.apply_solution", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.Tm_Emp", - "disc_equation_Pulse.Syntax.Base.Tm_EmpInames", - "disc_equation_Pulse.Syntax.Base.Tm_ExistsSL", - "disc_equation_Pulse.Syntax.Base.Tm_FStar", - "disc_equation_Pulse.Syntax.Base.Tm_ForallSL", - "disc_equation_Pulse.Syntax.Base.Tm_Inames", - "disc_equation_Pulse.Syntax.Base.Tm_Pure", - "disc_equation_Pulse.Syntax.Base.Tm_Star", - "disc_equation_Pulse.Syntax.Base.Tm_Unknown", - "disc_equation_Pulse.Syntax.Base.Tm_VProp", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "fuel_guarded_inversion_Pulse.Syntax.Base.term_", - "proj_equation_Pulse.Syntax.Base.Mkterm_t", - "projection_inverse_BoxBool_proj_0", - "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t" - ], - 0, - "396b4af258d1917fc149a2b8b84ee222" - ], - [ - "Pulse.Checker.Inference.infer", - 1, - 2, - 1, - [ - "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_FStar.List.Tot.Base.length.fuel_instrumented", - "@fuel_irrelevance_FStar.List.Tot.Base.length.fuel_instrumented", - "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "constructor_distinct_FStar.Integers.Signed", - "constructor_distinct_FStar.Integers.Winfinite", - "constructor_distinct_FStar.Tactics.Result.Failed", - "constructor_distinct_FStar.Tactics.Result.Success", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "data_elim_FStar.Tactics.Result.Success", "data_elim_Prims.Cons", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_FStar.Pervasives.Native.Some", - "equality_tok_FStar.Integers.Winfinite@tok", - "equation_FStar.Integers.int_t", "equation_Prims.nat", - "equation_Pulse.Checker.Inference.solution", - "equation_Pulse.Checker.Inference.unsolved_uvs", - "equation_Pulse.Checker.Inference.uvar", - "equation_Pulse.Syntax.Base.vprop", - "equation_with_fuel_FStar.List.Tot.Base.length.fuel_instrumented", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Prims.list", - "function_token_typing_Pulse.Checker.Inference.uvar", - "kinding_Prims.list@tok", "lemma_FStar.Pervasives.invertOption", - "primitive_Prims.op_Addition", "primitive_Prims.op_Equality", - "projection_inverse_BoxInt_proj_0", - "projection_inverse_FStar.Integers.Signed__0", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", - "projection_inverse_FStar.Tactics.Result.Failed_a", - "projection_inverse_FStar.Tactics.Result.Failed_exn", - "projection_inverse_FStar.Tactics.Result.Failed_ps", - "projection_inverse_FStar.Tactics.Result.Success_a", - "projection_inverse_FStar.Tactics.Result.Success_ps", - "projection_inverse_FStar.Tactics.Result.Success_v", - "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "string_typing", - "token_correspondence_FStar.List.Tot.Base.length.fuel_instrumented", - "typing_Pulse.Checker.Inference.unsolved_uvs" - ], - 0, - "3153a99dc4b8aa1198d94fde0da2fac4" - ], - [ - "Pulse.Checker.Inference.contains_uvar", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.Tm_Emp", - "disc_equation_Pulse.Syntax.Base.Tm_EmpInames", - "disc_equation_Pulse.Syntax.Base.Tm_ExistsSL", - "disc_equation_Pulse.Syntax.Base.Tm_FStar", - "disc_equation_Pulse.Syntax.Base.Tm_ForallSL", - "disc_equation_Pulse.Syntax.Base.Tm_Inames", - "disc_equation_Pulse.Syntax.Base.Tm_Pure", - "disc_equation_Pulse.Syntax.Base.Tm_Star", - "disc_equation_Pulse.Syntax.Base.Tm_Unknown", - "disc_equation_Pulse.Syntax.Base.Tm_VProp", - "fuel_guarded_inversion_Pulse.Syntax.Base.term_", - "proj_equation_Pulse.Syntax.Base.Mkterm_t", - "projection_inverse_BoxBool_proj_0", - "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t" - ], - 0, - "b65ed7148f43a55c6063f328e5ab7b32" - ], - [ - "Pulse.Checker.Inference.is_eq2", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "equation_FStar.Reflection.Types.name", "equation_Prims.eqtype", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "typing_FStar.Reflection.Types.name" - ], - 0, - "533742479d2230de5dbc50a55a2100b4" - ], - [ - "Pulse.Checker.Inference.try_solve_pure_equalities", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "FStar.Reflection.V2.Formula_pretyping_a139a58227e3de46f2dffe5b09a40575", - "Prims_pretyping_f537159ed795b314b4e58c260361ae86", "bool_typing", - "data_typing_intro_FStar.Reflection.V2.Formula.False_@tok", - "equation_Pulse.Syntax.Base.range_singleton_trigger", - "fuel_guarded_inversion_FStar.Tactics.Result.__result" - ], - 0, - "66510e82539a5cb4af0505d7f0e7c234" - ] - ] -] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Inference.fsti b/lib/steel/pulse/Pulse.Checker.Inference.fsti deleted file mode 100644 index 500895f3d..000000000 --- a/lib/steel/pulse/Pulse.Checker.Inference.fsti +++ /dev/null @@ -1,51 +0,0 @@ -module Pulse.Checker.Inference - -open Pulse.Syntax -open Pulse.Typing - -module T = FStar.Tactics.V2 -module R = FStar.Reflection.V2 -module RT = FStar.Reflection.Typing - -val uvar : Type0 - -val uvar_eq (u1 u2:uvar) : b:bool { b <==> (u1 == u2) } - -let solution = list (uvar & term) - -val uvar_to_string (_:uvar) : T.Tac string - -val range_of_uvar (_:uvar) : range - -val is_uvar (t:term) : option uvar - -val gen_uvar (name:ppname) - : T.Tac (r:(uvar & term){ - is_uvar (snd r) == Some (fst r) - }) - -val find_solution (sol:solution) (u:uvar) : option term - -val unsolved (sol:solution) (uvars:list (uvar & term)) : option (list (uvar & term)) - -val try_inst_uvs_in_goal (g:env) (ctxt:term) - (goal:vprop) - : T.Tac solution - -val solutions_to_string (sol:solution) - : T.Tac string - -val apply_solution (sol:solution) (t:term) - : T.Tac term - -val infer (g:env) (head:term) (t_head:term) (ctxt_pre:term) (r:range) - : T.Tac st_term - -val contains_uvar (t:term) - : T.Tac bool - -val try_unify (g:env) (l r:term) - : T.Tac solution - -val try_solve_pure_equalities (g:env) (p:term) - : T.Tac solution \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Inference.fsti.hints b/lib/steel/pulse/Pulse.Checker.Inference.fsti.hints deleted file mode 100644 index edaa6b0ab..000000000 --- a/lib/steel/pulse/Pulse.Checker.Inference.fsti.hints +++ /dev/null @@ -1 +0,0 @@ -[ "xs\u0015$xxL2U6", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.IntroPure.fst b/lib/steel/pulse/Pulse.Checker.IntroPure.fst index b39627c5b..77d91a12e 100644 --- a/lib/steel/pulse/Pulse.Checker.IntroPure.fst +++ b/lib/steel/pulse/Pulse.Checker.IntroPure.fst @@ -1,39 +1,46 @@ module Pulse.Checker.IntroPure -module T = FStar.Tactics.V2 - open Pulse.Syntax open Pulse.Typing -open Pulse.Checker.Common -module FTB = FStar.Tactics.Builtins +open Pulse.Checker.Base +open Pulse.Checker.Prover +module T = FStar.Tactics.V2 +module P = Pulse.Syntax.Printer let check_prop (g:env) (p:term) - : T.Tac (p:term & tot_typing g p tm_prop) - = let (| p, p_typing |) = Pulse.Checker.Pure.check_vprop g (tm_pure p) in - match p.t with - | Tm_Pure pp -> - let prop_typing = Pulse.Typing.Metatheory.pure_typing_inversion #_ #pp p_typing in - (| pp, prop_typing |) - | _ -> fail g None "Unexpected prop" + : T.Tac (p:term & tot_typing g p tm_prop) = + + let p0 = p in + let (| p, p_typing |) = Pulse.Checker.Pure.check_vprop g (tm_pure p) in + match p.t with + | Tm_Pure pp -> + let prop_typing = Pulse.Typing.Metatheory.pure_typing_inversion #_ #pp p_typing in + (| pp, prop_typing |) + | _ -> + fail g None + (Printf.sprintf "Impossible: check_intro_pure: checking a pure vprop %s returned a non-pure vprop %s,\ + please file a bug-report" + (P.term_to_string (tm_pure p0)) + (P.term_to_string p)) let check_prop_validity (g:env) (p:term) (typing:tot_typing g p tm_prop): T.Tac (prop_validity g p) = Pulse.Checker.Pure.check_prop_validity g p typing -let check_intro_pure +let check (g:env) - (t:st_term{Tm_IntroPure? t.term}) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) - : T.Tac (checker_result_t g pre post_hint) - = let Tm_IntroPure { p; should_check } = t.term in - let (| p, p_typing |) = - if T.unseal should_check - then check_prop g p - else let p, _ = Pulse.Checker.Pure.instantiate_term_implicits g p in - (| p, magic () |) - in - let pv = check_prop_validity g p p_typing in - let st_typing = T_IntroPure _ _ p_typing pv in - repack (try_frame_pre pre_typing st_typing) post_hint \ No newline at end of file + (res_ppname:ppname) + (t:st_term { Tm_IntroPure? t.term }) + + : T.Tac (checker_result_t g pre post_hint) = + + let g = Pulse.Typing.Env.push_context g "check_intro_pure" t.range in + + let Tm_IntroPure { p } = t.term in + let (| p, p_typing |) = check_prop g p in + let pv = check_prop_validity g p p_typing in + let st_typing = T_IntroPure _ _ p_typing pv in + prove_post_hint (try_frame_pre pre_typing st_typing res_ppname) post_hint t.range diff --git a/lib/steel/pulse/Pulse.Checker.IntroPure.fst.hints b/lib/steel/pulse/Pulse.Checker.IntroPure.fst.hints index 04b7dd828..c0744f6ca 100644 --- a/lib/steel/pulse/Pulse.Checker.IntroPure.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.IntroPure.fst.hints @@ -1,5 +1,5 @@ [ - "9Hhn\"'6", + ">(]Px", [ [ "Pulse.Checker.IntroPure.check_prop", @@ -8,6 +8,7 @@ 1, [ "@MaxIFuel_assumption", "@query", + "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", "constructor_distinct_FStar.Reflection.V2.Data.Tv_FVar", "constructor_distinct_FStar.Reflection.V2.Data.Tv_Unknown", "data_elim_Pulse.Syntax.Base.Mkterm", @@ -26,52 +27,37 @@ "proj_equation_Pulse.Syntax.Base.Mkterm_t", "projection_inverse_Pulse.Syntax.Base.Tm_Pure_p", "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", - "typing_FStar.Reflection.Const.prop_qn", + "string_typing", "typing_FStar.Reflection.Const.prop_qn", "typing_FStar.Reflection.V2.Builtins.pack_fv", "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range" ], 0, - "a1709c140c674fc9b0c87acfdf201513" + "2d055a21eedcb29b12b7c68cb9d5b1a0" ], [ - "Pulse.Checker.IntroPure.check_intro_pure", + "Pulse.Checker.IntroPure.check", 1, 2, 1, [ "@MaxIFuel_assumption", "@query", - "constructor_distinct_FStar.Pervasives.Native.Some", - "constructor_distinct_FStar.Tactics.Result.Failed", - "constructor_distinct_FStar.Tactics.Result.Success", + "constructor_distinct_FStar.Pervasives.Native.None", "constructor_distinct_Pulse.Syntax.Base.C_STGhost", "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_FStar.Reflection.Typing.fstar_top_env", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", "equation_Pulse.Typing.comp_intro_pure", "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "function_token_typing_Prims.__cache_version_number__", - "int_inversion", "primitive_Prims.op_BarBar", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Tactics.Result.Failed_a", - "projection_inverse_FStar.Tactics.Result.Failed_exn", - "projection_inverse_FStar.Tactics.Result.Failed_ps", - "projection_inverse_FStar.Tactics.Result.Success_a", - "projection_inverse_FStar.Tactics.Result.Success_ps", - "projection_inverse_FStar.Tactics.Result.Success_v", - "projection_inverse_Prims.Mkdtuple2__1", - "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "projection_inverse_FStar.Pervasives.Native.None_a", "refinement_interpretation_Tm_refine_8cde4c154bce2e51e85181a96461d048", - "typing_Pulse.Typing.Env.fstar_env" + "refinement_interpretation_Tm_refine_eed994d15518279ab75d745192d0d368", + "string_typing", + "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__range", + "typing_Pulse.Typing.Env.push_context" ], 0, - "c196524933b3964597c441668fad7951" + "266ab8203d2452ee1e8f73118d478bab" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.IntroPure.fsti b/lib/steel/pulse/Pulse.Checker.IntroPure.fsti index 8d2c68a1d..a9af5481d 100644 --- a/lib/steel/pulse/Pulse.Checker.IntroPure.fsti +++ b/lib/steel/pulse/Pulse.Checker.IntroPure.fsti @@ -1,15 +1,16 @@ module Pulse.Checker.IntroPure -module T = FStar.Tactics.V2 - open Pulse.Syntax open Pulse.Typing -open Pulse.Checker.Common +open Pulse.Checker.Base + +module T = FStar.Tactics.V2 -val check_intro_pure +val check (g:env) - (t:st_term{Tm_IntroPure? t.term}) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) - : T.Tac (checker_result_t g pre post_hint) \ No newline at end of file + (res_ppname:ppname) + (t:st_term { Tm_IntroPure? t.term }) + : T.Tac (checker_result_t g pre post_hint) diff --git a/lib/steel/pulse/Pulse.Checker.IntroPure.fsti.hints b/lib/steel/pulse/Pulse.Checker.IntroPure.fsti.hints index b42b22985..fdf480bf3 100644 --- a/lib/steel/pulse/Pulse.Checker.IntroPure.fsti.hints +++ b/lib/steel/pulse/Pulse.Checker.IntroPure.fsti.hints @@ -1 +1 @@ -[ "[K$*`0a#t\u0000", [] ] \ No newline at end of file +[ "IL\tC\u0014", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Match.fst b/lib/steel/pulse/Pulse.Checker.Match.fst index b9d914d28..c33f5ff74 100644 --- a/lib/steel/pulse/Pulse.Checker.Match.fst +++ b/lib/steel/pulse/Pulse.Checker.Match.fst @@ -1,15 +1,16 @@ module Pulse.Checker.Match -module T = FStar.Tactics.V2 -module L = FStar.List.Tot.Base -module R = FStar.Reflection.V2 -module RT = FStar.Reflection.Typing - open Pulse.Common open Pulse.Syntax open Pulse.Typing open Pulse.Checker.Pure -open Pulse.Checker.Common +open Pulse.Checker.Base +open Pulse.Checker.Prover + +module T = FStar.Tactics.V2 +module L = FStar.List.Tot.Base +module R = FStar.Reflection.V2 +module RT = FStar.Reflection.Typing let rec readback_pat (p : R.pattern) : option pattern = match p with @@ -164,7 +165,7 @@ let rec tot_typing_weakening_n bs d = match bs with | [] -> d | (x,t)::bs -> - let d = Pulse.Typing.Metatheory.tot_typing_weakening x t d in + let d = Pulse.Typing.Metatheory.tot_typing_weakening_single d x t in tot_typing_weakening_n bs d let samepat (b1 b2 : branch) : prop = fst b1 == fst b2 @@ -225,15 +226,17 @@ let check_branch fail g (Some e.range) "Failed to elab pattern into term"; if (R.Tv_Unknown? (R.inspect_ln (fst (Some?.v elab_p)))) then fail g (Some e.range) "should not happen: pattern elaborated to Tv_Unknown"; - T.print ("Elaborated pattern = " ^ T.term_to_string (fst (Some?.v elab_p))); + // T.print ("Elaborated pattern = " ^ T.term_to_string (fst (Some?.v elab_p))); let eq_typ = mk_sq_eq2 sc_u sc_ty sc (tm_fstar (fst (Some?.v elab_p)) Range.range_0) in let g' = push_binding g' hyp_var ({name = Sealed.seal "branch equality"; range = Range.range_0 }) eq_typ in let e = open_st_term_bs e pulse_bs in let pre_typing = tot_typing_weakening_n pulse_bs pre_typing in // weaken w/ binders - let pre_typing = Pulse.Typing.Metatheory.tot_typing_weakening hyp_var eq_typ pre_typing in // weaken w/ branch eq - let (| e, c, e_d |) = check g' e pre pre_typing (Some post_hint) in - if not (stateful_comp c) then - fail g (Some e.range) "Branch computation is not stateful"; + let pre_typing = Pulse.Typing.Metatheory.tot_typing_weakening_single pre_typing hyp_var eq_typ in // weaken w/ branch eq + + let (| e, c, e_d |) = + let ppname = mk_ppname_no_range "_br" in + let r = check g' pre pre_typing (Some post_hint) ppname e in + apply_checker_result_k r ppname in let br_d : br_typing g sc_u sc_ty sc p (close_st_term_n e (L.map fst pulse_bs)) c = TBR g sc_u sc_ty sc c p e bs () () () hyp_var e_d in (| p, close_st_term_n e (L.map fst pulse_bs), c, br_d |) @@ -286,16 +289,20 @@ let check_branches in (| brs, c0, d |) -let check_match +let check (g:env) - (sc:term) - (brs:list branch) (pre:term) (pre_typing: tot_typing g pre tm_vprop) (post_hint:post_hint_for_env g) + (res_ppname:ppname) + (sc:term) + (brs:list branch) (check:check_t) : T.Tac (checker_result_t g pre (Some post_hint)) = + + let g = Pulse.Typing.Env.push_context_no_range g "check_match" in + let sc_range = sc.range in // save range, it gets lost otherwise let orig_brs = brs in let nbr = L.length brs in @@ -341,6 +348,5 @@ let check_match (* Provable *) assume (L.map (fun (p, _) -> elab_pat p) brs == elab_pats'); - (| _, - c, - T_Match g sc_u sc_ty sc sc_ty_typing (E sc_typing) c brs brs_d complete_d |) + let d = T_Match g sc_u sc_ty sc sc_ty_typing (E sc_typing) c brs brs_d complete_d in + checker_result_for_st_typing (| _, _, d |) res_ppname diff --git a/lib/steel/pulse/Pulse.Checker.Match.fst.hints b/lib/steel/pulse/Pulse.Checker.Match.fst.hints index 0a3c0d2bd..fa20fa5f8 100644 --- a/lib/steel/pulse/Pulse.Checker.Match.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.Match.fst.hints @@ -1,5 +1,5 @@ [ - ">\to6nEt%T", + "\u0003R(y\b&5˝\u0005S", [ [ "Pulse.Checker.Match.readback_pat", @@ -21,7 +21,7 @@ "subterm_ordering_FStar.Reflection.V2.Data.Pat_Cons", "true_interp" ], 0, - "0ba6d153dd09d9781b93506c7ca334d0" + "5bb9a6890350917cbfd83c6aacd9e840" ], [ "Pulse.Checker.Match.readback_pat", @@ -34,7 +34,7 @@ "subterm_ordering_FStar.Pervasives.Native.Mktuple2" ], 0, - "e72ff67f56d85d569cac70beddef8707" + "0d17a2a5f68a61fec94ab62c69f4700d" ], [ "Pulse.Checker.Match.lemma_map_len", @@ -76,7 +76,7 @@ "@query", "lemma_Pulse.Checker.Match.lemma_map_len" ], 0, - "ad29cf157d3c668d9e960713413819a3" + "db0447c1f3f2116fe80e582a45100e9e" ], [ "Pulse.Checker.Match.lemma_map_index", @@ -129,7 +129,7 @@ "subterm_ordering_Prims.Cons", "typing_FStar.List.Tot.Base.map" ], 0, - "dd06fbecd1dd0269a4136a694086722a" + "f384b4e591f77c1ea82c6f57cc8d622d" ], [ "Pulse.Checker.Match.__lemma_map_opt_lenx", @@ -164,7 +164,7 @@ "fuel_guarded_inversion_Prims.list", "interpretation_Tm_abs_d43cb1c29fb4751a058c344bdc0417a5", "interpretation_Tm_abs_f4ac1bb6b4a44350828702f0e924d9aa", - "lemma_FStar.Pervasives.invertOption", + "kinding_Prims.list@tok", "lemma_FStar.Pervasives.invertOption", "proj_equation_FStar.Pervasives.Native.Mktuple2__1", "proj_equation_FStar.Pervasives.Native.Mktuple2__2", "projection_inverse_BoxBool_proj_0", @@ -219,7 +219,7 @@ "constructor_distinct_FStar.Pervasives.Native.None", "constructor_distinct_FStar.Pervasives.Native.Some", "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", - "data_elim_Prims.Cons", "disc_equation_FStar.Pervasives.Native.None", + "constructor_distinct_Tm_unit", "data_elim_Prims.Cons", "disc_equation_FStar.Pervasives.Native.Some", "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", "equation_Prims.nat", "equation_Prims.op_Equals_Equals_Equals", @@ -230,7 +230,6 @@ "fuel_guarded_inversion_Prims.list", "interpretation_Tm_abs_a4ae852c8e9090e7a19d6cf9f209d120", "interpretation_Tm_abs_f4ac1bb6b4a44350828702f0e924d9aa", - "lemma_FStar.Pervasives.invertOption", "lemma_Pulse.Common.lemma_map_opt_dec_len", "primitive_Prims.op_Addition", "proj_equation_FStar.Pervasives.Native.Mktuple2__1", @@ -242,7 +241,6 @@ "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", "projection_inverse_FStar.Pervasives.Native.Some_a", "projection_inverse_FStar.Pervasives.Native.Some_v", - "projection_inverse_Prims.Cons_hd", "projection_inverse_Prims.Cons_tl", "projection_inverse_Prims.Nil_a", "refinement_interpretation_Tm_refine_012d84ab711a5da18390cc5d5e8f4433", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", @@ -291,12 +289,12 @@ "projection_inverse_BoxBool_proj_0", "projection_inverse_FStar.Pervasives.Native.Some_a", "projection_inverse_FStar.Pervasives.Native.Some_v", - "refinement_interpretation_Tm_refine_978a3a4cff23bdbedd1feecc2512edfc", + "refinement_interpretation_Tm_refine_84e74f3eb309a4a603bb541982f53163", "refinement_interpretation_Tm_refine_a0ed565d65da00445f8b6df1c0241b82", "refinement_interpretation_Tm_refine_bf2fa1226f2c9a0f6671df3e80ddcb8e" ], 0, - "e6aa8a53614fa7b8414fdc3bbed281b5" + "86f4d3b8d40a8a4a3d50249ada06efc1" ], [ "Pulse.Checker.Match.__lemma_map_opt_dec_index", @@ -375,7 +373,7 @@ "token_correspondence_Pulse.Common.map_opt_dec.fuel_instrumented" ], 0, - "53ebcc0632d144432b7c6f257e38085c" + "e94797874a0757ea08fe7c1600a874fb" ], [ "Pulse.Checker.Match.lemma_map_opt_dec_index", @@ -416,7 +414,7 @@ "refinement_interpretation_Tm_refine_2de20c066034c13bf76e9c0b94f4806c" ], 0, - "3c3072d77a82c96d44690c5501cca2e8" + "80a072b0a3307148722d894004da07e6" ], [ "Pulse.Checker.Match.elab_readback_pat_x", @@ -530,14 +528,13 @@ "subterm_ordering_FStar.Reflection.V2.Data.Pat_Cons", "subterm_ordering_Pulse.Syntax.Base.Pat_Cons", "token_correspondence_Pulse.Checker.Match.readback_sub_pat.fuel_instrumented", - "true_interp", "typing_FStar.List.Tot.Base.length", - "typing_FStar.Range.range_0", + "true_interp", "typing_FStar.Range.range_0", "typing_Pulse.Checker.Match.readback_pat", "typing_Pulse.Common.map_opt_dec", "typing_Pulse.RuntimeUtils.set_range" ], 0, - "187e11e484caa5dfab17d57d90f4fb72" + "c26189b03d3dfbb7115d811407cc342d" ], [ "Pulse.Checker.Match.elab_readback_pat_x", @@ -667,7 +664,7 @@ "refinement_interpretation_Tm_refine_2de20c066034c13bf76e9c0b94f4806c" ], 0, - "22f221ab06b536e2cabfcb9746c02be7" + "40fad25233d5fac86b40aabc6c84b349" ], [ "Pulse.Checker.Match.elab_readback_pat_x", @@ -709,7 +706,7 @@ "typing_Pulse.Checker.Match.readback_sub_pat" ], 0, - "e4cc6ee1c5bd8c50d59884af24a091f8" + "8ecbcf3bbb17f60f7e3bdfb25153a546" ], [ "Pulse.Checker.Match.tot_typing_weakening_n", @@ -730,19 +727,15 @@ "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", "equation_FStar.Pervasives.Native.fst", "equation_FStar.Pervasives.Native.snd", - "equation_FStar.Reflection.Typing.fstar_top_env", "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Typing.Env.binding", "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", "equation_Pulse.Typing.freshv", + "equation_Pulse.Typing.Env.lookup", "equation_Pulse.Typing.freshv", "equation_with_fuel_Pulse.Typing.all_fresh.fuel_instrumented", "equation_with_fuel_Pulse.Typing.push_bindings.fuel_instrumented", "fuel_guarded_inversion_Prims.list", - "function_token_typing_Prims.__cache_version_number__", - "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", - "l_and-interp", "lemma_FStar.Map.lemma_ContainsDom", - "lemma_FStar.Set.mem_empty", + "kinding_Pulse.Syntax.Base.term@tok", "l_and-interp", + "lemma_FStar.Map.lemma_ContainsDom", "proj_equation_FStar.Pervasives.Native.Mktuple2__1", "proj_equation_FStar.Pervasives.Native.Mktuple2__2", "projection_inverse_BoxBool_proj_0", @@ -751,15 +744,14 @@ "projection_inverse_Prims.Cons_a", "projection_inverse_Prims.Cons_hd", "projection_inverse_Prims.Cons_tl", "projection_inverse_Prims.Nil_a", - "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", "refinement_interpretation_Tm_refine_8426dd34ef781f8d75c3a9a4565381e8", "refinement_interpretation_Tm_refine_b57b915c7891c820956facefd0d507fb", "subterm_ordering_Prims.Cons", "typing_FStar.Map.contains", "typing_FStar.Reflection.V2.Data.var", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.fstar_env" + "typing_Pulse.Typing.Env.as_map" ], 0, - "9bfb6f9fd9284cd3efa2456a1bb6715f" + "8f0b22be3587920f060c132881c74770" ], [ "Pulse.Checker.Match.open_st_term_bs", @@ -777,7 +769,7 @@ "subterm_ordering_Prims.Cons" ], 0, - "bfc3dc847e45a3da464ee40824a3d166" + "1332080d054c9fb6dabbe0ac9cd165a1" ], [ "Pulse.Checker.Match.r_bindings_to_string", @@ -813,7 +805,6 @@ 1, [ "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_FStar.Reflection.Typing.elaborate_pat.fuel_instrumented", "@fuel_correspondence_Pulse.Checker.Match.readback_pat.fuel_instrumented", "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", "Pulse.Syntax.Base_pretyping_01e6cbbfeab3ba416b144f2c9223a2d4", @@ -840,8 +831,7 @@ "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Sealed.Inhabited.is_sealed", "equation_FStar.Sealed.Inhabited.sealed", - "equation_FStar.Sealed.Inhabited.sealed_", - "equation_FStar.Set.disjoint", "equation_Prims.eqtype", + "equation_FStar.Sealed.Inhabited.sealed_", "equation_Prims.eqtype", "equation_Prims.nat", "equation_Pulse.Syntax.Base.comp_st", "equation_Pulse.Syntax.Base.not_tv_unknown", "equation_Pulse.Syntax.Base.ppname_default", @@ -850,19 +840,15 @@ "equation_Pulse.Syntax.Base.tm_vprop", "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.with_range", - "equation_Pulse.Typing.Env.binding", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.binding", "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.env_extends", "equation_Pulse.Typing.Env.extends_with", - "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", "equation_Pulse.Typing.freshv", + "equation_Pulse.Typing.Env.lookup", "equation_Pulse.Typing.freshv", "equation_Pulse.Typing.post_hint_for_env", "equation_Pulse.Typing.post_hint_for_env_p", "equation_with_fuel_Pulse.Checker.Match.readback_pat.fuel_instrumented", "fuel_guarded_inversion_FStar.Tactics.Result.__result", "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", "fuel_guarded_inversion_Pulse.Typing.post_hint_t", "function_token_typing_Prims.__cache_version_number__", "function_token_typing_Prims.int", @@ -873,7 +859,6 @@ "lemma_FStar.Map.lemma_ContainsDom", "lemma_FStar.Pervasives.invertOption", "lemma_FStar.Sealed.Inhabited.sealed_singleton", - "lemma_FStar.Set.lemma_equal_elim", "lemma_FStar.Set.mem_empty", "lemma_Pulse.Typing.Env.env_extends_trans", "lemma_Pulse.Typing.post_hint_for_env_extends", "primitive_Prims.op_BarBar", "primitive_Prims.op_Negation", @@ -891,7 +876,6 @@ "refinement_interpretation_Tm_refine_25fe9861b42cf97d961ff4c8f44eb399", "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_6ab4588567e3e85899907931d9bf297c", "refinement_interpretation_Tm_refine_6e8e5238aadfc712ef5fa6bc6310c384", "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", "refinement_interpretation_Tm_refine_7ad5682d990eaec6510764d663af54de", @@ -899,7 +883,6 @@ "refinement_interpretation_Tm_refine_8f99687fbb0a2aafb98a0035ee7c48ca", "string_typing", "true_interp", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Sealed.seal", - "typing_FStar.Set.empty", "typing_FStar.Set.intersect", "typing_FStar.Set.mem", "typing_Pulse.Checker.Match.readback_pat", "typing_Pulse.Syntax.Base.ppname_default", "typing_Pulse.Syntax.Base.tm_vprop", @@ -909,7 +892,7 @@ "unit_inversion" ], 0, - "9bbd32ba1e63f52a8724773c1accefe1" + "c9eadc59729fcaf9c5fde735158bb906" ], [ "Pulse.Checker.Match.check_branches", @@ -989,11 +972,26 @@ "typing_Tm_abs_485900c7c36cbc1f920d974711c090fd" ], 0, - "d4eadd32c7f58f4215480b809d252d78" + "17c58d542ff5efb9b78c8c3622f7b8ad" ], [ - "Pulse.Checker.Match.check_match", + "Pulse.Checker.Match.check", + 1, + 2, 1, + [ + "@MaxIFuel_assumption", "@query", + "equation_Pulse.Typing.post_hint_for_env", + "proj_equation_FStar.Pervasives.Native.Some_v", + "projection_inverse_FStar.Pervasives.Native.Some_v", + "refinement_interpretation_Tm_refine_6e8e5238aadfc712ef5fa6bc6310c384" + ], + 0, + "4ed8f26749676901e5ff103e961d7aa7" + ], + [ + "Pulse.Checker.Match.check", + 2, 2, 2, [ @@ -1008,6 +1006,7 @@ "FStar.List.Tot.Base_interpretation_Tm_arrow_4b0c7cc34485afa5854ebe5c95023d4c", "FStar.Pervasives.Native_interpretation_Tm_arrow_b8cce376a4a678a51298a0f3945f25ce", "Pulse.Checker.Match_interpretation_Tm_arrow_6ed9b4ca6cb8fb7569f0bd12f3228df6", + "Pulse.Typing_pretyping_85b09ae4ef91823fbf549acd09fde244", "bool_inversion", "constructor_distinct_FStar.Pervasives.Native.Some", "constructor_distinct_FStar.Tactics.Result.Failed", @@ -1065,20 +1064,23 @@ "projection_inverse_FStar.Tactics.Result.Success_a", "projection_inverse_FStar.Tactics.Result.Success_ps", "projection_inverse_FStar.Tactics.Result.Success_v", - "refinement_interpretation_Tm_refine_17c22d590fab50a4953743842033211e", "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "refinement_interpretation_Tm_refine_58f5570aac197f241bcbabc5b2e5bc47", "refinement_interpretation_Tm_refine_6e8e5238aadfc712ef5fa6bc6310c384", "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", "refinement_interpretation_Tm_refine_8a241246dda1c21254b790029e39c04c", - "refinement_kinding_Tm_refine_17c22d590fab50a4953743842033211e", + "refinement_interpretation_Tm_refine_eed994d15518279ab75d745192d0d368", + "refinement_interpretation_Tm_refine_fa658e1cf17c0e65d4176b9b170d129b", + "refinement_kinding_Tm_refine_fa658e1cf17c0e65d4176b9b170d129b", + "string_typing", "token_correspondence_FStar.List.Tot.Base.length.fuel_instrumented", "typing_Pulse.Common.map_opt", "typing_Pulse.Common.zip", - "typing_Pulse.Typing.Env.fstar_env" + "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.push_context_no_range" ], 0, - "05a2eebc241e8c308458665631c5699d" + "f5590fb59b8141f96077d6061250954e" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Match.fsti b/lib/steel/pulse/Pulse.Checker.Match.fsti index b6c83ea62..efb8bb36e 100644 --- a/lib/steel/pulse/Pulse.Checker.Match.fsti +++ b/lib/steel/pulse/Pulse.Checker.Match.fsti @@ -1,17 +1,18 @@ module Pulse.Checker.Match -module T = FStar.Tactics.V2 - open Pulse.Syntax open Pulse.Typing -open Pulse.Checker.Common +open Pulse.Checker.Base + +module T = FStar.Tactics.V2 -val check_match +val check (g:env) - (sc:term) - (brs:list branch) (pre:term) (pre_typing: tot_typing g pre tm_vprop) (post_hint:post_hint_for_env g) + (res_ppname:ppname) + (sc:term) + (brs:list branch) (check:check_t) : T.Tac (checker_result_t g pre (Some post_hint)) diff --git a/lib/steel/pulse/Pulse.Checker.Match.fsti.hints b/lib/steel/pulse/Pulse.Checker.Match.fsti.hints index cc3baffbf..b3628b464 100644 --- a/lib/steel/pulse/Pulse.Checker.Match.fsti.hints +++ b/lib/steel/pulse/Pulse.Checker.Match.fsti.hints @@ -1 +1,20 @@ -[ "#; 1$b̘o\u0002*", [] ] \ No newline at end of file +[ + "-I(R&0CYWr", + [ + [ + "Pulse.Checker.Match.check", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "equation_Pulse.Typing.post_hint_for_env", + "proj_equation_FStar.Pervasives.Native.Some_v", + "projection_inverse_FStar.Pervasives.Native.Some_v", + "refinement_interpretation_Tm_refine_6e8e5238aadfc712ef5fa6bc6310c384" + ], + 0, + "ef1ca511aa98a304fe0656e34d4a419e" + ] + ] +] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Par.fst b/lib/steel/pulse/Pulse.Checker.Par.fst index 1fbd7fdd0..90bdc7626 100644 --- a/lib/steel/pulse/Pulse.Checker.Par.fst +++ b/lib/steel/pulse/Pulse.Checker.Par.fst @@ -1,26 +1,27 @@ module Pulse.Checker.Par -module T = FStar.Tactics.V2 -module RT = FStar.Reflection.Typing - open Pulse.Syntax open Pulse.Typing open Pulse.Checker.Pure -open Pulse.Checker.Common +open Pulse.Checker.Base +open Pulse.Checker.Prover open Pulse.Checker.Comp -module FV = Pulse.Typing.FV +module T = FStar.Tactics.V2 +module P = Pulse.Syntax.Printer +module RT = FStar.Reflection.Typing module MT = Pulse.Typing.Metatheory -let check_par - (allow_inst:bool) +let check (g:env) - (t:st_term{Tm_Par? t.term}) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) - (check':bool -> check_t) + (res_ppname:ppname) + (t:st_term{Tm_Par? t.term}) + (check:check_t) : T.Tac (checker_result_t g pre post_hint) = + let g = push_context "check_par" t.range g in let Tm_Par {pre1=preL; body1=eL; post1=postL; pre2=preR; body2=eR; post2=postR} = t.term in @@ -29,22 +30,31 @@ let check_par let (| preR, preR_typing |) = check_term_with_expected_type g preR tm_vprop in - let postL_hint = intro_post_hint g None postL in + let postL_hint = intro_post_hint g None None postL in + let (| eL, cL, eL_typing |) = - check' allow_inst g eL preL (E preL_typing) (Some postL_hint) in + let ppname = mk_ppname_no_range "_par_l" in + let r = + check g preL (E preL_typing) (Some postL_hint) ppname eL in + apply_checker_result_k r ppname in if C_ST? cL then let cL_typing = MT.st_typing_correctness eL_typing in - let postR_hint = intro_post_hint g None postR in + let postR_hint = intro_post_hint g None None postR in let (| eR, cR, eR_typing |) = - check' allow_inst g eR preR (E preR_typing) (Some postR_hint) in + let ppname = mk_ppname_no_range "_par_r" in + let r = + check g preR (E preR_typing) (Some postR_hint) ppname eR in + apply_checker_result_k r ppname in if C_ST? cR && eq_univ (comp_u cL) (comp_u cR) then let cR_typing = MT.st_typing_correctness eR_typing in let x = fresh g in let d = T_Par _ _ _ _ _ x cL_typing cR_typing eL_typing eR_typing in - repack (try_frame_pre pre_typing d) post_hint - else fail g (Some eR.range) "par: cR is not stt" - else fail g (Some eL.range) "par: cL is not stt" + prove_post_hint (try_frame_pre pre_typing d res_ppname) post_hint t.range + else fail g (Some eR.range) + (Printf.sprintf "check_par: right computation is not stt (%s)" (P.comp_to_string cR)) + else fail g (Some eL.range) + (Printf.sprintf "check_par: left computation is not stt (%s)" (P.comp_to_string cL)) diff --git a/lib/steel/pulse/Pulse.Checker.Par.fst.hints b/lib/steel/pulse/Pulse.Checker.Par.fst.hints index 1998eee1a..026a62c5b 100644 --- a/lib/steel/pulse/Pulse.Checker.Par.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.Par.fst.hints @@ -1,44 +1,49 @@ [ - "AƏ\u0014\u0014f\u0005t/", + "`\b\u001d{7Zy8\t", [ [ - "Pulse.Checker.Par.check_par", + "Pulse.Checker.Par.check", 1, 2, 1, [ "@MaxIFuel_assumption", "@query", - "Pulse.Syntax.Base_pretyping_782a0dad287a00f5de8c110e3ddaeab3", + "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", "Pulse.Typing_pretyping_85b09ae4ef91823fbf549acd09fde244", "bool_inversion", "constructor_distinct_FStar.Pervasives.Native.None", "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_FStar.Tactics.Result.Failed", "constructor_distinct_Pulse.Syntax.Base.C_ST", "constructor_distinct_Pulse.Syntax.Base.Tm_Par", "data_elim_FStar.Tactics.Result.Success", - "data_elim_Pulse.Syntax.Base.C_ST", + "data_elim_Pulse.Typing.Mkpost_hint_t", "disc_equation_FStar.Pervasives.Native.None", "disc_equation_Pulse.Syntax.Base.C_ST", "disc_equation_Pulse.Syntax.Base.C_STAtomic", "disc_equation_Pulse.Syntax.Base.C_STGhost", "disc_equation_Pulse.Syntax.Base.C_Tot", "disc_equation_Pulse.Syntax.Base.Tm_Par", + "equation_FStar.Reflection.Typing.fstar_top_env", "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", "equation_Prims.nat", "equation_Pulse.Checker.Pure.push_context", "equation_Pulse.Syntax.Base.comp_st", "equation_Pulse.Syntax.Base.comp_u", "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Syntax.Base.vprop", "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.lookup", "equation_Pulse.Typing.comp_par", + "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.universe", + "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.comp_par", "equation_Pulse.Typing.comp_post_matches_hint", "equation_Pulse.Typing.post_hint_for_env", "fuel_guarded_inversion_FStar.Tactics.Result.__result", "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.st_comp", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", + "fuel_guarded_inversion_Pulse.Typing.post_hint_t", + "function_token_typing_Prims.__cache_version_number__", "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", "lemma_FStar.Map.lemma_ContainsDom", "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", @@ -47,25 +52,29 @@ "projection_inverse_BoxBool_proj_0", "projection_inverse_FStar.Pervasives.Native.None_a", "projection_inverse_FStar.Pervasives.Native.Some_v", + "projection_inverse_FStar.Tactics.Result.Failed_a", + "projection_inverse_FStar.Tactics.Result.Failed_exn", + "projection_inverse_FStar.Tactics.Result.Failed_ps", "projection_inverse_Pulse.Syntax.Base.Tm_Par__0", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_385f59c31213d29cc308b93df5d99dc9", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_4778c00f4e85908330c4e5bdc3f06240", - "refinement_interpretation_Tm_refine_5b6c2ff7c20a2b05cf023708098983f8", "refinement_interpretation_Tm_refine_6e8e5238aadfc712ef5fa6bc6310c384", "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", "refinement_interpretation_Tm_refine_7f3ad0958305f2921bfac06f466396ae", + "refinement_interpretation_Tm_refine_afa7832fbd3a1123d055c3f1bada59fb", "refinement_interpretation_Tm_refine_f0ac051651fa0e095f1b2c1241fd6a3f", "refinement_interpretation_Tm_refine_fbb0daf4aae9f7caca56062850f20db7", "string_typing", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", "typing_Pulse.Checker.Pure.push_context", - "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__u", "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__range", + "typing_Pulse.Syntax.Base.comp_u", "typing_Pulse.Syntax.Base.eq_univ", "typing_Pulse.Typing.Env.as_map", - "typing_Pulse.Typing.Env.dom", - "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__u" + "typing_Pulse.Typing.Env.dom", "typing_Pulse.Typing.Env.fstar_env" ], 0, - "e08f001746e403cdc3485e067a7819df" + "9c51ae241fc664c8ba97cac2ec4c0f24" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Par.fsti b/lib/steel/pulse/Pulse.Checker.Par.fsti index c0dca263c..3d307e8d1 100644 --- a/lib/steel/pulse/Pulse.Checker.Par.fsti +++ b/lib/steel/pulse/Pulse.Checker.Par.fsti @@ -1,17 +1,18 @@ module Pulse.Checker.Par -module T = FStar.Tactics.V2 - open Pulse.Syntax open Pulse.Typing -open Pulse.Checker.Common +open Pulse.Checker.Base + +module T = FStar.Tactics.V2 -val check_par - (allow_inst:bool) +val check (g:env) - (t:st_term{Tm_Par? t.term}) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) - (check':bool -> check_t) + (res_ppname:ppname) + (t:st_term{Tm_Par? t.term}) + (check:check_t) + : T.Tac (checker_result_t g pre post_hint) diff --git a/lib/steel/pulse/Pulse.Checker.Par.fsti.hints b/lib/steel/pulse/Pulse.Checker.Par.fsti.hints index 0037e87cc..7374aaadd 100644 --- a/lib/steel/pulse/Pulse.Checker.Par.fsti.hints +++ b/lib/steel/pulse/Pulse.Checker.Par.fsti.hints @@ -1 +1 @@ -[ "ɋ\bV\r\fĞ/\u0010\u0006", [] ] \ No newline at end of file +[ "/I\u000fon\u001a\u000e", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Prover.Base.fst b/lib/steel/pulse/Pulse.Checker.Prover.Base.fst new file mode 100644 index 000000000..648f4957a --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Prover.Base.fst @@ -0,0 +1,173 @@ +module Pulse.Checker.Prover.Base + +open Pulse.Syntax +open Pulse.Typing +open Pulse.Checker.Base +open Pulse.Typing.Combinators + +module T = FStar.Tactics.V2 +module PS = Pulse.Checker.Prover.Substs + +let rec list_as_vprop' (vp:vprop) (fvps:list vprop) + : Tot vprop (decreases fvps) = + match fvps with + | [] -> vp + | hd::tl -> list_as_vprop' (tm_star vp hd) tl + +let rec canon_right_aux (g:env) (vps:list vprop) (f:vprop -> T.Tac bool) + : T.Tac (vps' : list vprop & + fvps : list vprop & + vprop_equiv g (list_as_vprop vps) (list_as_vprop' (list_as_vprop vps') fvps)) = + + match vps with + | [] -> (| [], [], VE_Refl _ _ |) + | hd::rest -> + if f hd + then begin + let (| vps', fvps, _ |) = canon_right_aux g rest f in + let v_eq = magic () in + // let v_eq + // : vprop_equiv g (list_as_vprop vps) + // (list_as_vprop (hd :: (vps' @ fvps))) + // = list_as_vprop_ctx g [hd] _ rest (vps' @ fvps) (VE_Refl _ _) v_eq + // in + // let v_eq + // : vprop_equiv g (list_as_vprop vps) + // (list_as_vprop ((vps'@[hd]) @ fvps)) + // = VE_Trans _ _ _ _ v_eq (VE_Sym _ _ _ (vprop_equiv_swap_equiv _ _ _ hd _ (VE_Refl _ _))) + // in + // let v_eq + // : vprop_equiv g (list_as_vprop vps) + // (list_as_vprop (vps'@(hd::fvps))) + // = VE_Trans _ _ _ _ v_eq (VE_Sym _ _ _ (list_as_vprop_assoc _ _ _ _)) in + (| vps', hd :: fvps, v_eq |) + end + else begin + let (| vps', pures, _ |) = canon_right_aux g rest f in + let v_eq = magic () in //list_as_vprop_ctx g [hd] _ _ _ (VE_Refl _ _) v_eq in + (| hd::vps', pures, v_eq |) + end + +module VP = Pulse.Checker.VPropEquiv + +let canon_right (#g:env) (#ctxt:term) (#frame:term) + (ctxt_frame_typing:tot_typing g (tm_star ctxt frame) tm_vprop) + (f:vprop -> T.Tac bool) + : T.Tac (ctxt':term & + tot_typing g (tm_star ctxt' frame) tm_vprop & + continuation_elaborator g (tm_star ctxt frame) g (tm_star ctxt' frame)) + = let (| vps', pures, veq |) = canon_right_aux g (vprop_as_list ctxt) f in + let veq : vprop_equiv g ctxt (list_as_vprop' (list_as_vprop vps') pures) + = magic () in + let veq : vprop_equiv g (tm_star ctxt frame) (tm_star (list_as_vprop' (list_as_vprop vps') pures) frame) + = VE_Ctxt _ _ _ _ _ veq (VE_Refl _ _) in + (| _, VP.vprop_equiv_typing_fwd ctxt_frame_typing veq, k_elab_equiv (k_elab_unit _ _) (VE_Refl _ _) veq |) + + +let elim_one (#g:env) + (ctxt:term) (frame:vprop) (p:vprop) + (ctxt_frame_p_typing:tot_typing g (tm_star (tm_star ctxt frame) p) tm_vprop) + (nx:ppname) (e1:st_term) (c1:comp { stateful_comp c1 /\ comp_pre c1 == p }) + (e1_typing:st_typing g e1 c1) + (uvs:env { disjoint uvs g }) + : T.Tac (g':env { env_extends g' g /\ disjoint uvs g' } & + ctxt':term & + tot_typing g' (tm_star ctxt' frame) tm_vprop & + continuation_elaborator g (tm_star (tm_star ctxt frame) p) g' (tm_star ctxt' frame)) = + + let ctxt_frame_typing = star_typing_inversion_l ctxt_frame_p_typing in + let x = fresh (push_env g uvs) in + let ppname = mk_ppname_no_range "_pelim" in + let k = + continuation_elaborator_with_bind (tm_star ctxt frame) e1_typing ctxt_frame_p_typing (ppname, x) in + let g' = push_binding g x nx (comp_res c1) in + let ctxt' = tm_star (open_term_nv (comp_post c1) (v_as_nv x)) ctxt in + let veq + : vprop_equiv g' (tm_star (open_term_nv (comp_post c1) (v_as_nv x)) (tm_star ctxt frame)) + (tm_star ctxt' frame) = VE_Assoc _ _ _ _ in + let k + : continuation_elaborator + g (tm_star (tm_star ctxt frame) p) + g' (tm_star ctxt' frame) = + k_elab_equiv + #g #g' + #(tm_star (tm_star ctxt frame) p) + #(tm_star (tm_star ctxt frame) p) + #(tm_star (open_term_nv (comp_post c1) (v_as_nv x)) (tm_star ctxt frame)) + #(tm_star ctxt' frame) + k (VE_Refl g (tm_star (tm_star ctxt frame) p)) veq in + + let ctxt'_frame_typing : tot_typing g' (tm_star ctxt' frame) tm_vprop = magic () in + env_extends_push g x ppname_default (comp_res c1); + (| g', ctxt', ctxt'_frame_typing, k |) + +let rec elim_all (#g:env) + (f:vprop -> T.Tac bool) + (mk:mk_t) + (#ctxt:term) (#frame:term) (ctxt_frame_typing:tot_typing g (tm_star ctxt frame) tm_vprop) + (uvs:env { disjoint uvs g }) + : T.Tac (bool & + (g':env { env_extends g' g /\ disjoint uvs g' } & + ctxt':term & + tot_typing g' (tm_star ctxt' frame) tm_vprop & + continuation_elaborator g (tm_star ctxt frame) g' (tm_star ctxt' frame))) + = match ctxt.t with + | Tm_Star ctxt' p -> + let p_typing = + star_typing_inversion_r #_ #ctxt' #p (star_typing_inversion_l ctxt_frame_typing) in + if f p + then match mk #_ #p p_typing with + | Some (| nx, e1, c1, e1_typing |) -> + let (| g', _, ctxt_typing', k |) = + elim_one ctxt' frame p (magic ()) nx e1 c1 e1_typing uvs in + let k + : continuation_elaborator g (tm_star (tm_star ctxt' frame) p) + g' (tm_star _ frame) = k in + let k + : continuation_elaborator g (tm_star (tm_star ctxt' p) frame) + g' (tm_star _ frame) = + k_elab_equiv k + (magic ()) (VE_Refl _ _) in + let _, (| g'', ctxt'', ctxt_typing'', k' |) = + elim_all #g' f mk ctxt_typing' uvs in + true, (| g'', ctxt'', ctxt_typing'', k_elab_trans k k' |) + | None -> + false, (| g, ctxt, ctxt_frame_typing, k_elab_unit _ _ |) + else begin + false, (| g, ctxt, ctxt_frame_typing, k_elab_unit _ _ |) + end + | _ -> + false, (| g, ctxt, ctxt_frame_typing, k_elab_unit _ _ |) + +let add_elims_aux (#g:env) (#ctxt:term) (#frame:term) + (f:vprop -> T.Tac bool) + (mk:mk_t) + (ctxt_frame_typing:tot_typing g (tm_star ctxt frame) tm_vprop) + (uvs:env { disjoint uvs g }) + : T.Tac (bool & + (g':env { env_extends g' g /\ disjoint uvs g' } & + ctxt':term & + tot_typing g' (tm_star ctxt' frame) tm_vprop & + continuation_elaborator g (tm_star ctxt frame) g' (tm_star ctxt' frame))) + = let (| ctxt', ctxt'_typing, k |) = canon_right ctxt_frame_typing f in + let progress, (| g', ctxt'', ctxt''_typing, k' |) = + elim_all f mk ctxt'_typing uvs in + progress, (| g', ctxt'', ctxt''_typing, k_elab_trans k k' |) + +let rec add_elims (#g:env) (#ctxt:term) (#frame:term) + (f:vprop -> T.Tac bool) + (mk:mk_t) + (ctxt_typing:tot_typing g (tm_star ctxt frame) tm_vprop) + (uvs:env { disjoint uvs g }) + : T.Tac (g':env { env_extends g' g /\ disjoint uvs g' } & + ctxt':term & + tot_typing g' (tm_star ctxt' frame) tm_vprop & + continuation_elaborator g (tm_star ctxt frame) g' (tm_star ctxt' frame)) + = let progress, res = add_elims_aux f mk ctxt_typing uvs in + if not progress + then res + else ( + let (| g', ctxt', ctxt'_typing, k |) = res in + let (| g'', ctxt'', ctxt''_typing, k' |) = add_elims f mk ctxt'_typing uvs in + (| g'', ctxt'', ctxt''_typing, k_elab_trans k k' |) + ) diff --git a/lib/steel/pulse/Pulse.Checker.Prover.Base.fst.hints b/lib/steel/pulse/Pulse.Checker.Prover.Base.fst.hints new file mode 100644 index 000000000..ad0a9fb7f --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Prover.Base.fst.hints @@ -0,0 +1,430 @@ +[ + "\rLS\u00185\u0003^z", + [ + [ + "Pulse.Checker.Prover.Base.list_as_vprop'", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "binder_x_dde2ec1e863a0bcde2ea8594cff3d454_1", + "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", + "equation_Pulse.Syntax.Base.vprop", + "fuel_guarded_inversion_Prims.list", + "projection_inverse_BoxBool_proj_0", "subterm_ordering_Prims.Cons" + ], + 0, + "0f162211ebbef5abb9703d2893ae6e0b" + ], + [ + "Pulse.Checker.Prover.Base.canon_right_aux", + 1, + 2, + 1, + [ + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_Pulse.Checker.Prover.Base.list_as_vprop_.fuel_instrumented", + "@query", "constructor_distinct_Prims.Nil", + "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", + "equation_Pulse.Syntax.Base.vprop", + "equation_with_fuel_Pulse.Checker.Prover.Base.list_as_vprop_.fuel_instrumented", + "fuel_guarded_inversion_Prims.list", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_Prims.Nil_a", + "typing_Pulse.Typing.Combinators.list_as_vprop" + ], + 0, + "da9666011ced18c75341a0e93e8762b6" + ], + [ + "Pulse.Checker.Prover.Base.canon_right", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "lemma_Pulse.Typing.Env.env_extends_refl" + ], + 0, + "d1e933ca5147c7fbecce512dcf2add84" + ], + [ + "Pulse.Checker.Prover.Base.elim_one", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "Pulse.Syntax.Base_pretyping_fe09dc1e796799f4bac0760e63f30d40", + "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.None", + "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_Pulse.Syntax.Base.C_ST", + "constructor_distinct_Pulse.Syntax.Base.C_Tot", + "data_elim_Pulse.Syntax.Base.Mkppname", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "equation_FStar.Pervasives.Native.fst", + "equation_FStar.Pervasives.Native.snd", "equation_FStar.Range.range", + "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_FStar.Reflection.Typing.pp_name_t", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Sealed.Inhabited.sealed", + "equation_FStar.Sealed.Inhabited.sealed_", + "equation_FStar.Set.disjoint", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.comp_res", + "equation_Pulse.Syntax.Base.mk_ppname_no_range", + "equation_Pulse.Syntax.Base.nvar", + "equation_Pulse.Syntax.Base.ppname_default", + "equation_Pulse.Syntax.Base.range", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.tm_star", + "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.v_as_nv", + "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.extends_with", + "equation_Pulse.Typing.Env.lookup", "equation_Pulse.Typing.comp_par", + "equation_Pulse.Typing.comp_while", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Pulse.Syntax.Base.ppname", + "fuel_guarded_inversion_Pulse.Typing.st_typing", + "function_token_typing_Prims.__cache_version_number__", + "function_token_typing_Prims.int", + "function_token_typing_Prims.string", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", + "kinding_Pulse.Syntax.Base.ppname@tok", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Map.lemma_InDomUpd2", + "lemma_FStar.Sealed.Inhabited.sealed_singleton", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Syntax.Base.range_singleton", + "lemma_Pulse.Typing.Env.env_extends_push", + "lemma_Pulse.Typing.Env.push_binding_as_map", + "lemma_Pulse.Typing.Env.push_env_as_map", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "proj_equation_FStar.Pervasives.Native.Mktuple2__1", + "proj_equation_FStar.Pervasives.Native.Mktuple2__2", + "proj_equation_Pulse.Syntax.Base.Mknm_nm_ppname", + "proj_equation_Pulse.Syntax.Base.Mkppname_name", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", + "proj_equation_Pulse.Syntax.Base.Mkterm_range", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_FStar.Pervasives.Native.None_a", + "projection_inverse_Pulse.Syntax.Base.C_ST__0", + "projection_inverse_Pulse.Syntax.Base.Mknm_nm_ppname", + "projection_inverse_Pulse.Syntax.Base.Mkppname_name", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_res", + "projection_inverse_Pulse.Syntax.Base.Mkterm_range", + "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", + "refinement_interpretation_Tm_refine_25fe9861b42cf97d961ff4c8f44eb399", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_26aa72c2bdd0719b051857cb081974bb", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "refinement_interpretation_Tm_refine_d3de001c6427be2e27fcc34006b60e28", + "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", + "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "string_typing", "typing_FStar.Map.contains", + "typing_FStar.Pervasives.Native.fst", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Sealed.seal", + "typing_FStar.Set.empty", "typing_FStar.Set.intersect", + "typing_FStar.Set.mem", + "typing_Pulse.Syntax.Base.__proj__Mkppname__item__name", + "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", + "typing_Pulse.Syntax.Base.comp_res", + "typing_Pulse.Syntax.Base.mk_ppname_no_range", + "typing_Pulse.Syntax.Base.stateful_comp", + "typing_Pulse.Syntax.Base.tm_star", + "typing_Pulse.Syntax.Base.v_as_nv", "typing_Pulse.Typing.Env.as_map", + "typing_Pulse.Typing.Env.dom", "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.tm_unit" + ], + 0, + "990e75905dad07f40b7fdcce6ecf49cf" + ], + [ + "Pulse.Checker.Prover.Base.elim_all", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "FStar.Pervasives_interpretation_Tm_arrow_0b6559e6ff3addf84b0c2880affbb335", + "FStar.Pervasives_interpretation_Tm_arrow_af8eda99ba3685403be22a88669dcb35", + "FStar.Reflection.Types_pretyping_b57262eead998d474939c05a17e1ffab", + "Prims_interpretation_Tm_arrow_2eaa01e78f73e9bab5d0955fc1a662da", + "Prims_pretyping_f537159ed795b314b4e58c260361ae86", + "Pulse.Checker.Prover.Base_interpretation_Tm_arrow_26f4c22230d9f6eb4398f15eb6b19107", + "Pulse.Checker.Prover.Base_interpretation_Tm_arrow_9124c696f71ff74911a7e2710379a493", + "Pulse.Checker.Prover.Base_interpretation_Tm_arrow_b56b2318ef4cfbf8b19082b98e3b0c47", + "Pulse.Syntax.Base_pretyping_fe09dc1e796799f4bac0760e63f30d40", + "data_elim_FStar.Tactics.Result.Success", + "disc_equation_FStar.Pervasives.Native.None", + "equation_FStar.Reflection.Typing.fstar_env", + "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_Pulse.Syntax.Base.range", + "equation_Pulse.Syntax.Base.tm_star", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.extends_with", + "equation_Pulse.Typing.elab_env", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "function_token_typing_FStar.Reflection.Types.term", + "function_token_typing_Prims.__cache_version_number__", + "int_inversion", + "interpretation_Tm_abs_2569042949e68e65b05f1fcb51c2593b", + "interpretation_Tm_abs_35addbe3a9c6ea5c3291e366c0bf151b", + "kinding_FStar.Pervasives.dtuple4@tok", + "kinding_Pulse.Syntax.Base.ppname@tok", + "lemma_FStar.Pervasives.invertOption", + "lemma_Pulse.Syntax.Base.range_singleton", + "lemma_Pulse.Typing.Env.env_extends_refl", + "lemma_Pulse.Typing.Env.env_extends_trans", + "proj_equation_Pulse.Syntax.Base.Mkterm_range", + "proj_equation_Pulse.Syntax.Base.Mkterm_t", + "refinement_interpretation_Tm_refine_1474292636f37e2d80cf2022596f45af", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "refinement_interpretation_Tm_refine_b9943bf670d3eeece9d9f2e3e534ed66", + "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", + "typing_FStar.Pervasives.Native.uu___is_None", + "typing_FStar.Reflection.Typing.lookup_bvar", + "typing_Pulse.RuntimeUtils.union_ranges", + "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", + "typing_Pulse.Syntax.Base.ppname_default", + "typing_Pulse.Typing.Env.fstar_env", "typing_Pulse.Typing.elab_env", + "typing_Tm_abs_2569042949e68e65b05f1fcb51c2593b", + "typing_Tm_abs_35addbe3a9c6ea5c3291e366c0bf151b", + "typing_Tm_abs_385ccdcb80169781e0c76efb7f3eeb56" + ], + 0, + "c20fa64b154cecba8b58d0e01cc225e3" + ], + [ + "Pulse.Checker.Prover.Base.add_elims_aux", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "lemma_Pulse.Typing.Env.env_extends_refl" + ], + 0, + "2362300b31a1bcd6196794cfb9014276" + ], + [ + "Pulse.Checker.Prover.Base.add_elims", + 1, + 2, + 1, + [ "@query" ], + 0, + "fc5c1d88366527d977c64fabdf476445" + ], + [ + "Pulse.Checker.Prover.Base.add_elims", + 2, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "lemma_Pulse.Typing.Env.env_extends_trans", + "refinement_interpretation_Tm_refine_1474292636f37e2d80cf2022596f45af" + ], + 0, + "fb4d3b5c363a33b97232b5b554d45dce" + ], + [ + "Pulse.Checker.Prover.Base.prover_state", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_3201114dc2ece82edbaf3a0633f82db7", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.dom" + ], + 0, + "357455778e7cf2dbddc1a28cb272c01b" + ], + [ + "Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__goals_inv", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_uvs", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_3201114dc2ece82edbaf3a0633f82db7", + "refinement_interpretation_Tm_refine_998f5317571047eba4128227bc054984", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__pg", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__uvs", + "typing_Pulse.Typing.Env.dom" + ], + 0, + "cca4922566adaab67e5fe05dfb5dab35" + ], + [ + "Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__goals_inv", + 2, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "data_elim_Pulse.Checker.Prover.Base.Mkprover_state", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.extends_with", + "fuel_guarded_inversion_Pulse.Checker.Prover.Base.prover_state", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.push_env_as_map", + "primitive_Prims.op_AmpAmp", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_uvs", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_3201114dc2ece82edbaf3a0633f82db7", + "refinement_interpretation_Tm_refine_998f5317571047eba4128227bc054984", + "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", + "typing_FStar.Map.concat", "typing_FStar.Map.domain", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Checker.Prover.Base.__proj__Mkpreamble__item__g0", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__pg", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__uvs", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "3f0277c78fe996f92d5a4278e9ff5905" + ], + [ + "Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__solved_inv", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", + "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" + ], + 0, + "6ee9b23a08a6585afdcb2dbc69ecd311" + ], + [ + "Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__solved_inv", + 2, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", + "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" + ], + 0, + "b59bfd6d5e244f6806683eb38223e0c2" + ], + [ + "Pulse.Checker.Prover.Base.extend_post_hint_opt_g", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "constructor_distinct_FStar.Pervasives.Native.None", + "disc_equation_FStar.Pervasives.Native.None", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.extends_with", + "equation_Pulse.Typing.post_hint_for_env_p", + "equation_Pulse.Typing.post_hint_opt", + "kinding_Pulse.Typing.post_hint_t@tok", + "lemma_FStar.Pervasives.invertOption", + "lemma_Pulse.Typing.Env.env_extends_trans", + "proj_equation_FStar.Pervasives.Native.Some_v", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.None_a", + "projection_inverse_FStar.Pervasives.Native.Some_v", + "refinement_interpretation_Tm_refine_7ad5682d990eaec6510764d663af54de", + "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", + "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g" + ], + 0, + "dd78c18f99201b10abc333dd76e87512" + ], + [ + "Pulse.Checker.Prover.Base.ss_extends", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", + "equation_Prims.nat", + "equation_Pulse.Checker.Prover.Substs.contains", + "equation_Pulse.Checker.Prover.Substs.dom", + "equation_Pulse.Syntax.Base.var", "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", "lemma_FStar.Set.subset_mem", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "typing_FStar.Reflection.V2.Data.var", + "typing_Pulse.Checker.Prover.Substs.as_map", + "typing_Pulse.Checker.Prover.Substs.dom" + ], + 0, + "aa0c951d1c66330513e60e31e5e44655" + ] + ] +] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Prover.Base.fsti b/lib/steel/pulse/Pulse.Checker.Prover.Base.fsti new file mode 100644 index 000000000..ee387fd8b --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Prover.Base.fsti @@ -0,0 +1,107 @@ +module Pulse.Checker.Prover.Base + +open Pulse.Syntax +open Pulse.Typing +open Pulse.Typing.Combinators + +open Pulse.Checker.Base + +module T = FStar.Tactics.V2 +module PS = Pulse.Checker.Prover.Substs + +let vprop_typing (g:env) (t:term) = tot_typing g t tm_vprop + +// +// Scaffolding for adding elims +// +// Given a function f : vprop -> T.Tac bool that decides whether a vprop +// should be elim-ed, +// and an mk function to create the elim term, comp, and typing, +// add_elims will create a continuation_elaborator +// + +type mk_t = + #g:env -> + #v:vprop -> + tot_typing g v tm_vprop -> + T.Tac (option (x:ppname & + t:st_term & + c:comp { stateful_comp c /\ comp_pre c == v } & + st_typing g t c)) + +val add_elims (#g:env) (#ctxt:term) (#frame:term) + (f:vprop -> T.Tac bool) + (mk:mk_t) + (ctxt_typing:tot_typing g (tm_star ctxt frame) tm_vprop) + (uvs:env { disjoint uvs g }) + : T.Tac (g':env { env_extends g' g /\ disjoint uvs g' } & + ctxt':term & + tot_typing g' (tm_star ctxt' frame) tm_vprop & + continuation_elaborator g (tm_star ctxt frame) g' (tm_star ctxt' frame)) + +// +// Prover state +// + +noeq type preamble = { + g0 : env; + + ctxt : vprop; + frame : vprop; + ctxt_frame_typing : vprop_typing g0 (tm_star ctxt frame); + + goals : vprop; +} + +let op_Array_Access (ss:PS.ss_t) (t:term) = + PS.ss_term t ss + +let op_Star = tm_star + +noeq type prover_state (preamble:preamble) = { + pg : g:env { g `env_extends` preamble.g0 }; + + remaining_ctxt : list vprop; + remaining_ctxt_frame_typing : vprop_typing pg (list_as_vprop remaining_ctxt * preamble.frame); + + uvs : uvs:env { disjoint uvs pg }; + ss : PS.ss_t; + + solved : vprop; + unsolved : list vprop; + + k : continuation_elaborator preamble.g0 (preamble.ctxt * preamble.frame) + pg ((list_as_vprop remaining_ctxt * preamble.frame) * ss.(solved)); + + goals_inv : vprop_equiv (push_env pg uvs) preamble.goals (list_as_vprop unsolved * solved); + solved_inv : squash (freevars ss.(solved) `Set.subset` dom pg); +} + +let is_terminal (#preamble:_) (st:prover_state preamble) = + st.unsolved == [] + +irreducible +let extend_post_hint_opt_g (g:env) (post_hint:post_hint_opt g) (g1:env { g1 `env_extends` g }) + : p:post_hint_opt g1 { p == post_hint } = + match post_hint with + | None -> None + | Some post_hint -> + assert (g `env_extends` post_hint.g); + assert (g1 `env_extends` g); + assert (g1 `env_extends` post_hint.g); + Some post_hint + +let ss_extends (ss1 ss2:PS.ss_t) = + Set.subset (PS.dom ss2) (PS.dom ss1) /\ + (forall (x:var). PS.contains ss2 x ==> PS.sel ss1 x == PS.sel ss2 x) + +let pst_extends (#preamble:_) (pst1 pst2:prover_state preamble) = + pst1.pg `env_extends` pst2.pg /\ + pst1.uvs `env_extends` pst2.uvs /\ + pst1.ss `ss_extends` pst2.ss + +type prover_t = + #preamble:_ -> + pst1:prover_state preamble -> + T.Tac (pst2:prover_state preamble { pst2 `pst_extends` pst1 /\ + is_terminal pst2 }) diff --git a/lib/steel/pulse/Pulse.Checker.Prover.Base.fsti.hints b/lib/steel/pulse/Pulse.Checker.Prover.Base.fsti.hints new file mode 100644 index 000000000..d74bab304 --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Prover.Base.fsti.hints @@ -0,0 +1,188 @@ +[ + "ޏ3Rc$q&G\n ", + [ + [ + "Pulse.Checker.Prover.Base.add_elims", + 1, + 2, + 1, + [ "@query" ], + 0, + "ae6417558065dfca413d2a676d470085" + ], + [ + "Pulse.Checker.Prover.Base.prover_state", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_3201114dc2ece82edbaf3a0633f82db7", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.dom" + ], + 0, + "7c696dbe6ab254b20849e49acfb624fa" + ], + [ + "Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__goals_inv", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_uvs", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_3201114dc2ece82edbaf3a0633f82db7", + "refinement_interpretation_Tm_refine_998f5317571047eba4128227bc054984", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__pg", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__uvs", + "typing_Pulse.Typing.Env.dom" + ], + 0, + "cda085937f5c2371a824de038c55e9ad" + ], + [ + "Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__goals_inv", + 2, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "data_elim_Pulse.Checker.Prover.Base.Mkprover_state", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.extends_with", + "fuel_guarded_inversion_Pulse.Checker.Prover.Base.prover_state", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.push_env_as_map", + "primitive_Prims.op_AmpAmp", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_uvs", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_3201114dc2ece82edbaf3a0633f82db7", + "refinement_interpretation_Tm_refine_998f5317571047eba4128227bc054984", + "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", + "typing_FStar.Map.concat", "typing_FStar.Map.domain", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Checker.Prover.Base.__proj__Mkpreamble__item__g0", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__pg", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__uvs", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "3f0277c78fe996f92d5a4278e9ff5905" + ], + [ + "Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__solved_inv", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", + "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" + ], + 0, + "6ee9b23a08a6585afdcb2dbc69ecd311" + ], + [ + "Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__solved_inv", + 2, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", + "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" + ], + 0, + "b59bfd6d5e244f6806683eb38223e0c2" + ], + [ + "Pulse.Checker.Prover.Base.extend_post_hint_opt_g", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "constructor_distinct_FStar.Pervasives.Native.None", + "disc_equation_FStar.Pervasives.Native.None", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.extends_with", + "equation_Pulse.Typing.post_hint_for_env_p", + "equation_Pulse.Typing.post_hint_opt", + "kinding_Pulse.Typing.post_hint_t@tok", + "lemma_FStar.Pervasives.invertOption", + "lemma_Pulse.Typing.Env.env_extends_trans", + "proj_equation_FStar.Pervasives.Native.Some_v", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.None_a", + "projection_inverse_FStar.Pervasives.Native.Some_v", + "refinement_interpretation_Tm_refine_7ad5682d990eaec6510764d663af54de", + "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", + "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g" + ], + 0, + "dd78c18f99201b10abc333dd76e87512" + ], + [ + "Pulse.Checker.Prover.Base.ss_extends", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", + "equation_Prims.nat", + "equation_Pulse.Checker.Prover.Substs.contains", + "equation_Pulse.Checker.Prover.Substs.dom", + "equation_Pulse.Syntax.Base.var", "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", "lemma_FStar.Set.subset_mem", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "typing_FStar.Reflection.V2.Data.var", + "typing_Pulse.Checker.Prover.Substs.as_map", + "typing_Pulse.Checker.Prover.Substs.dom" + ], + 0, + "aa0c951d1c66330513e60e31e5e44655" + ] + ] +] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Prover.ElimExists.fst b/lib/steel/pulse/Pulse.Checker.Prover.ElimExists.fst similarity index 96% rename from lib/steel/pulse/Pulse.Prover.ElimExists.fst rename to lib/steel/pulse/Pulse.Checker.Prover.ElimExists.fst index 09f3f0a26..0726d6211 100644 --- a/lib/steel/pulse/Pulse.Prover.ElimExists.fst +++ b/lib/steel/pulse/Pulse.Checker.Prover.ElimExists.fst @@ -1,13 +1,14 @@ -module Pulse.Prover.ElimExists +module Pulse.Checker.Prover.ElimExists open Pulse.Syntax open Pulse.Typing +open Pulse.Typing.Combinators module T = FStar.Tactics.V2 open Pulse.Checker.VPropEquiv -open Pulse.Prover.Common +open Pulse.Checker.Prover.Base let should_elim_exists (v:vprop) : T.Tac bool = match v.t with diff --git a/lib/steel/pulse/Pulse.Prover.ElimExists.fst.hints b/lib/steel/pulse/Pulse.Checker.Prover.ElimExists.fst.hints similarity index 72% rename from lib/steel/pulse/Pulse.Prover.ElimExists.fst.hints rename to lib/steel/pulse/Pulse.Checker.Prover.ElimExists.fst.hints index d88975d32..5b57b793d 100644 --- a/lib/steel/pulse/Pulse.Prover.ElimExists.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.Prover.ElimExists.fst.hints @@ -1,8 +1,8 @@ [ - "C\u007f\u0012W\nh㉳\b", + "6B\u0002Ra\u0012- bZ{\u000bF", [ [ - "Pulse.Prover.ElimExists.mk", + "Pulse.Checker.Prover.ElimExists.mk", 1, 2, 1, @@ -80,10 +80,19 @@ "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.fstar_env" ], 0, - "aeda4fea86193935cf6966306279a461" + "e8a180715e83f4d8bac3ebc5d8e3f188" ], [ - "Pulse.Prover.ElimExists.elim_exists", + "Pulse.Checker.Prover.ElimExists.elim_exists_frame", + 1, + 2, + 1, + [ "@query" ], + 0, + "6db546c00ec8c877f51657dc6b08a516" + ], + [ + "Pulse.Checker.Prover.ElimExists.elim_exists", 1, 2, 1, @@ -105,34 +114,39 @@ "typing_Pulse.Typing.Env.mk_env" ], 0, - "9ee9064b5c36848073fd2597218759da" + "58d85b7aab0a6667c0c14c75577fa8b8" ], [ - "Pulse.Prover.ElimExists.elim_exists_pst", + "Pulse.Checker.Prover.ElimExists.elim_exists_pst", 1, 2, 1, [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "data_elim_Pulse.Prover.Common.Mkprover_state", + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_Pulse.Typing.Combinators.vprop_as_list.fuel_instrumented", + "@query", "bool_inversion", + "data_elim_Pulse.Checker.Prover.Base.Mkprover_state", + "disc_equation_FStar.Pervasives.Native.None", + "equation_FStar.Reflection.Typing.fstar_top_env", "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.disjoint", "equation_FStar.Set.subset", "equation_Prims.nat", "equation_Prims.squash", - "equation_Pulse.Prover.Common.pst_extends", - "equation_Pulse.Prover.Common.ss_extends", + "equation_Pulse.Checker.Prover.Base.pst_extends", + "equation_Pulse.Checker.Prover.Base.ss_extends", "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", "equation_Pulse.Typing.Env.disjoint", "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.env_extends", "equation_Pulse.Typing.Env.extends_with", + "equation_with_fuel_Pulse.Typing.Combinators.vprop_as_list.fuel_instrumented", "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Prover.Common.prover_state", + "fuel_guarded_inversion_Pulse.Checker.Prover.Base.prover_state", "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "kinding_Pulse.Syntax.Base.term@tok", + "function_token_typing_Prims.__cache_version_number__", + "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", "lemma_FStar.Map.lemma_ContainsDom", "lemma_FStar.Map.lemma_InDomConcat", - "lemma_FStar.Set.disjoint_not_in_both", "lemma_FStar.Set.lemma_equal_elim", "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", "lemma_FStar.Set.mem_intersect", "lemma_FStar.Set.mem_subset", @@ -140,35 +154,37 @@ "lemma_Pulse.Typing.Env.env_extends_trans", "lemma_Pulse.Typing.Env.push_env_as_map", "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", - "proj_equation_Pulse.Prover.Common.Mkprover_state_pg", - "proj_equation_Pulse.Prover.Common.Mkprover_state_solved", - "proj_equation_Pulse.Prover.Common.Mkprover_state_ss", - "proj_equation_Pulse.Prover.Common.Mkprover_state_unsolved", - "proj_equation_Pulse.Prover.Common.Mkprover_state_uvs", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_solved", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_ss", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_unsolved", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_uvs", "projection_inverse_BoxBool_proj_0", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_pg", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_ss", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_unsolved", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_uvs", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_ss", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_unsolved", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_uvs", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", "refinement_interpretation_Tm_refine_2de20c066034c13bf76e9c0b94f4806c", - "refinement_interpretation_Tm_refine_34ce9adf426312b96cc2291b06f4b387", + "refinement_interpretation_Tm_refine_3201114dc2ece82edbaf3a0633f82db7", "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", - "refinement_interpretation_Tm_refine_d75d8936e6500ecc775a054d1682296c", - "refinement_interpretation_Tm_refine_ffb53b91ee7afecaaf420155b35aadbf", + "refinement_interpretation_Tm_refine_998f5317571047eba4128227bc054984", + "refinement_interpretation_Tm_refine_c75ec99d27cfa6ed10ff923e12817a12", "typing_FStar.Map.concat", "typing_FStar.Map.domain", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Prover.Common.__proj__Mkpreamble__item__g0", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__solved", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__ss", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__uvs", - "typing_Pulse.Prover.Common.op_Array_Access", + "typing_Pulse.Checker.Prover.Base.__proj__Mkpreamble__item__g0", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__solved", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__ss", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__uvs", + "typing_Pulse.Checker.Prover.Base.op_Array_Access", "typing_Pulse.Syntax.Naming.freevars", "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fstar_env", "typing_Pulse.Typing.Env.push_env" ], 0, - "090b0e4f97444a4aeaa12a19d520a07d" + "850e0a0a824d86d62b4864ca6561d03f" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Prover.ElimExists.fsti b/lib/steel/pulse/Pulse.Checker.Prover.ElimExists.fsti similarity index 84% rename from lib/steel/pulse/Pulse.Prover.ElimExists.fsti rename to lib/steel/pulse/Pulse.Checker.Prover.ElimExists.fsti index 139b8e091..38e065b77 100644 --- a/lib/steel/pulse/Pulse.Prover.ElimExists.fsti +++ b/lib/steel/pulse/Pulse.Checker.Prover.ElimExists.fsti @@ -1,9 +1,10 @@ -module Pulse.Prover.ElimExists +module Pulse.Checker.Prover.ElimExists open Pulse.Syntax open Pulse.Typing -open Pulse.Prover.Common +open Pulse.Checker.Base +open Pulse.Checker.Prover.Base module T = FStar.Tactics.V2 diff --git a/lib/steel/pulse/Pulse.Checker.Prover.ElimExists.fsti.hints b/lib/steel/pulse/Pulse.Checker.Prover.ElimExists.fsti.hints new file mode 100644 index 000000000..2b5746bac --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Prover.ElimExists.fsti.hints @@ -0,0 +1 @@ +[ "~݈5l~\u0016ӨJ", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Prover.ElimPure.fst b/lib/steel/pulse/Pulse.Checker.Prover.ElimPure.fst similarity index 98% rename from lib/steel/pulse/Pulse.Prover.ElimPure.fst rename to lib/steel/pulse/Pulse.Checker.Prover.ElimPure.fst index db64facd5..cfc567a04 100644 --- a/lib/steel/pulse/Pulse.Prover.ElimPure.fst +++ b/lib/steel/pulse/Pulse.Checker.Prover.ElimPure.fst @@ -1,4 +1,4 @@ -module Pulse.Prover.ElimPure +module Pulse.Checker.Prover.ElimPure module RT = FStar.Reflection.Typing module R = FStar.Reflection.V2 @@ -10,9 +10,10 @@ open Pulse.Checker.Pure open Pulse.Checker.VPropEquiv open Pulse.Typing +open Pulse.Typing.Combinators module Metatheory = Pulse.Typing.Metatheory open Pulse.Reflection.Util -open Pulse.Prover.Common +open Pulse.Checker.Prover.Base let elim_pure_head = let elim_pure_explicit_lid = mk_steel_wrapper_lid "elim_pure_explicit" in diff --git a/lib/steel/pulse/Pulse.Prover.ElimPure.fst.hints b/lib/steel/pulse/Pulse.Checker.Prover.ElimPure.fst.hints similarity index 74% rename from lib/steel/pulse/Pulse.Prover.ElimPure.fst.hints rename to lib/steel/pulse/Pulse.Checker.Prover.ElimPure.fst.hints index 48033f6c1..557b24d7d 100644 --- a/lib/steel/pulse/Pulse.Prover.ElimPure.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.Prover.ElimPure.fst.hints @@ -1,17 +1,17 @@ [ - ">!ƒL>\r\u001f_5", + "\u000e[4J|UH\u000b:", [ [ - "Pulse.Prover.ElimPure.tm_fstar", + "Pulse.Checker.Prover.ElimPure.tm_fstar", 1, 2, 1, [ "@query", "equation_Pulse.Syntax.Base.range_singleton_trigger" ], 0, - "28cd94265175228732b056992cda4b92" + "2843218638d635995129601d8585b1e9" ], [ - "Pulse.Prover.ElimPure.elim_pure_head_typing", + "Pulse.Checker.Prover.ElimPure.elim_pure_head_typing", 1, 2, 1, @@ -27,7 +27,7 @@ "equality_tok_FStar.Reflection.V2.Data.Tv_Unknown@tok", "equation_FStar.Reflection.Types.name", "equation_FStar.Reflection.Types.typ", "equation_Prims.nat", - "equation_Pulse.Prover.ElimPure.elim_pure_head_ty", + "equation_Pulse.Checker.Prover.ElimPure.elim_pure_head_ty", "equation_Pulse.Reflection.Util.mk_arrow", "equation_Pulse.Reflection.Util.mk_stt_ghost_comp", "equation_Pulse.Syntax.Base.not_tv_unknown", @@ -53,10 +53,10 @@ "typing_tok_FStar.Reflection.V2.Data.Q_Explicit@tok" ], 0, - "6234a811a7abc38dbd3a229558bc9014" + "d97727ff31bdc7ddd387aaa6343ad22a" ], [ - "Pulse.Prover.ElimPure.elim_pure_comp", + "Pulse.Checker.Prover.ElimPure.elim_pure_comp", 1, 2, 1, @@ -93,10 +93,10 @@ "typing_tok_FStar.Reflection.V2.Data.Q_Explicit@tok" ], 0, - "4e16d430c3ea1ee1386a9a8b6c3e14c1" + "775cfe4667f4dbd451e662cca7a61edb" ], [ - "Pulse.Prover.ElimPure.mk", + "Pulse.Checker.Prover.ElimPure.mk", 1, 2, 1, @@ -114,8 +114,8 @@ "equality_tok_FStar.Reflection.V2.Data.Tv_Unknown@tok", "equation_FStar.Range.range", "equation_FStar.Reflection.Types.name", "equation_FStar.Reflection.Typing.tm_prop", - "equation_Pulse.Prover.ElimPure.elim_pure_comp", - "equation_Pulse.Prover.ElimPure.tm_fstar", + "equation_Pulse.Checker.Prover.ElimPure.elim_pure_comp", + "equation_Pulse.Checker.Prover.ElimPure.tm_fstar", "equation_Pulse.Syntax.Base.comp_pre", "equation_Pulse.Syntax.Base.host_term", "equation_Pulse.Syntax.Base.not_tv_unknown", @@ -150,10 +150,19 @@ "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t" ], 0, - "72574a52d40f02a2e52ce63d6ebe7d2a" + "47b6d38976aff37efce946472f950bf8" ], [ - "Pulse.Prover.ElimPure.elim_pure", + "Pulse.Checker.Prover.ElimPure.elim_pure_frame", + 1, + 2, + 1, + [ "@query" ], + 0, + "c49dfab892a2e3424abf730528cb1100" + ], + [ + "Pulse.Checker.Prover.ElimPure.elim_pure", 1, 2, 1, @@ -175,31 +184,37 @@ "typing_Pulse.Typing.Env.mk_env" ], 0, - "d9f043ca2829bb7a8fdd8c8e4f793838" + "3b6de0accb46d90ca9f2ee13830898af" ], [ - "Pulse.Prover.ElimPure.elim_pure_pst", + "Pulse.Checker.Prover.ElimPure.elim_pure_pst", 1, 2, 1, [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "data_elim_Pulse.Prover.Common.Mkprover_state", + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_Pulse.Typing.Combinators.vprop_as_list.fuel_instrumented", + "@query", "bool_inversion", + "data_elim_Pulse.Checker.Prover.Base.Mkprover_state", + "disc_equation_FStar.Pervasives.Native.None", + "equation_FStar.Reflection.Typing.fstar_top_env", "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.disjoint", "equation_FStar.Set.subset", "equation_Prims.nat", "equation_Prims.squash", - "equation_Pulse.Prover.Common.pst_extends", - "equation_Pulse.Prover.Common.ss_extends", + "equation_Pulse.Checker.Prover.Base.pst_extends", + "equation_Pulse.Checker.Prover.Base.ss_extends", "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", "equation_Pulse.Typing.Env.disjoint", "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.env_extends", "equation_Pulse.Typing.Env.extends_with", + "equation_with_fuel_Pulse.Typing.Combinators.vprop_as_list.fuel_instrumented", "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Prover.Common.prover_state", + "fuel_guarded_inversion_Pulse.Checker.Prover.Base.prover_state", "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "kinding_Pulse.Syntax.Base.term@tok", + "function_token_typing_Prims.__cache_version_number__", + "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", "lemma_FStar.Map.lemma_ContainsDom", "lemma_FStar.Map.lemma_InDomConcat", "lemma_FStar.Set.lemma_equal_elim", @@ -209,35 +224,37 @@ "lemma_Pulse.Typing.Env.env_extends_trans", "lemma_Pulse.Typing.Env.push_env_as_map", "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", - "proj_equation_Pulse.Prover.Common.Mkprover_state_pg", - "proj_equation_Pulse.Prover.Common.Mkprover_state_solved", - "proj_equation_Pulse.Prover.Common.Mkprover_state_ss", - "proj_equation_Pulse.Prover.Common.Mkprover_state_unsolved", - "proj_equation_Pulse.Prover.Common.Mkprover_state_uvs", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_solved", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_ss", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_unsolved", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_uvs", "projection_inverse_BoxBool_proj_0", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_pg", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_ss", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_unsolved", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_uvs", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_ss", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_unsolved", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_uvs", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", "refinement_interpretation_Tm_refine_2de20c066034c13bf76e9c0b94f4806c", - "refinement_interpretation_Tm_refine_34ce9adf426312b96cc2291b06f4b387", + "refinement_interpretation_Tm_refine_3201114dc2ece82edbaf3a0633f82db7", "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", - "refinement_interpretation_Tm_refine_d75d8936e6500ecc775a054d1682296c", - "refinement_interpretation_Tm_refine_ffb53b91ee7afecaaf420155b35aadbf", + "refinement_interpretation_Tm_refine_998f5317571047eba4128227bc054984", + "refinement_interpretation_Tm_refine_c75ec99d27cfa6ed10ff923e12817a12", "typing_FStar.Map.concat", "typing_FStar.Map.domain", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Prover.Common.__proj__Mkpreamble__item__g0", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__solved", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__ss", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__uvs", - "typing_Pulse.Prover.Common.op_Array_Access", + "typing_Pulse.Checker.Prover.Base.__proj__Mkpreamble__item__g0", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__solved", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__ss", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__uvs", + "typing_Pulse.Checker.Prover.Base.op_Array_Access", "typing_Pulse.Syntax.Naming.freevars", "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fstar_env", "typing_Pulse.Typing.Env.push_env" ], 0, - "ac29a92f92599b182d8a0152864389e4" + "6a75feadff1f0d34886e3cb84b89c96c" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Prover.ElimPure.fsti b/lib/steel/pulse/Pulse.Checker.Prover.ElimPure.fsti similarity index 84% rename from lib/steel/pulse/Pulse.Prover.ElimPure.fsti rename to lib/steel/pulse/Pulse.Checker.Prover.ElimPure.fsti index f7df961a9..c2e62444d 100644 --- a/lib/steel/pulse/Pulse.Prover.ElimPure.fsti +++ b/lib/steel/pulse/Pulse.Checker.Prover.ElimPure.fsti @@ -1,9 +1,10 @@ -module Pulse.Prover.ElimPure +module Pulse.Checker.Prover.ElimPure open Pulse.Syntax open Pulse.Typing -open Pulse.Prover.Common +open Pulse.Checker.Base +open Pulse.Checker.Prover.Base module T = FStar.Tactics.V2 diff --git a/lib/steel/pulse/Pulse.Checker.Prover.ElimPure.fsti.hints b/lib/steel/pulse/Pulse.Checker.Prover.ElimPure.fsti.hints new file mode 100644 index 000000000..01e5697df --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Prover.ElimPure.fsti.hints @@ -0,0 +1 @@ +[ "\t0\u0001\u0013va\u000e\u001d`", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Prover.IntroExists.fst b/lib/steel/pulse/Pulse.Checker.Prover.IntroExists.fst similarity index 90% rename from lib/steel/pulse/Pulse.Prover.IntroExists.fst rename to lib/steel/pulse/Pulse.Checker.Prover.IntroExists.fst index f21135c75..f0c61cf09 100644 --- a/lib/steel/pulse/Pulse.Prover.IntroExists.fst +++ b/lib/steel/pulse/Pulse.Checker.Prover.IntroExists.fst @@ -1,13 +1,16 @@ -module Pulse.Prover.IntroExists +module Pulse.Checker.Prover.IntroExists open Pulse.Syntax open Pulse.Typing +open Pulse.Typing.Combinators open Pulse.Typing.Metatheory open Pulse.Checker.VPropEquiv -open Pulse.Prover.Common +open Pulse.Checker.Prover.Base +open Pulse.Checker.Base module T = FStar.Tactics.V2 -module PS = Pulse.Prover.Substs +module PS = Pulse.Checker.Prover.Substs +module Metatheory = Pulse.Typing.Metatheory let coerce_eq (#a #b:Type) (x:a) (_:squash (a == b)) : y:b{y == x} = x @@ -23,8 +26,7 @@ let k_intro_exists (#g:env) (#u:universe) (#b:binder) (#p:vprop) let t = wr (Tm_IntroExists { erased = false; p = tm_exists_sl u b p; - witnesses = [e]; - should_check = should_check_true }) in + witnesses = [e] }) in let c = comp_intro_exists u b p e in @@ -36,11 +38,12 @@ let k_intro_exists (#g:env) (#u:universe) (#b:binder) (#p:vprop) let x = fresh g in assume (open_term (comp_post c) x == comp_post c); + let ppname = mk_ppname_no_range "_pintroe" in let k : continuation_elaborator g (frame * subst_term p [ DT 0 e ]) (push_binding g x ppname_default (comp_res c)) (tm_exists_sl u b p * frame) = - continuation_elaborator_with_bind frame t_typing (magic ()) x in + continuation_elaborator_with_bind frame t_typing (magic ()) (ppname, x) in let k : continuation_elaborator @@ -56,7 +59,7 @@ let k_intro_exists (#g:env) (#u:universe) (#b:binder) (#p:vprop) assert (equal (push_env (push_binding g x ppname_default (comp_res c)) empty_env) (push_binding g x ppname_default (comp_res c))); let d1 : st_typing (push_binding g x ppname_default (comp_res c)) t1 c1 = - st_typing_weakening + Pulse.Typing.Metatheory.st_typing_weakening g empty_env t1 c1 d1 @@ -64,7 +67,7 @@ let k_intro_exists (#g:env) (#u:universe) (#b:binder) (#p:vprop) k post_hint (| t1, c1, d1 |) -#push-options "--z3rlimit_factor 4 --ifuel 1 --fuel 1" +#push-options "--z3rlimit_factor 8 --ifuel 2 --fuel 1" let intro_exists (#preamble:_) (pst:prover_state preamble) (u:universe) (b:binder) (body:vprop) (unsolved':list vprop) @@ -73,7 +76,7 @@ let intro_exists (#preamble:_) (pst:prover_state preamble) : T.Tac (pst':prover_state preamble { pst' `pst_extends` pst /\ is_terminal pst' }) = - let x = fresh pst.pg in + let x = fresh (push_env pst.pg pst.uvs) in let px = b.binder_ppname, x in let preamble_sub = { g0 = pst.pg; @@ -101,10 +104,10 @@ let intro_exists (#preamble:_) (pst:prover_state preamble) pg = pst.pg; remaining_ctxt = vprop_as_list preamble_sub.ctxt; remaining_ctxt_frame_typing = magic (); - uvs = pst.uvs; + uvs = push_binding pst.uvs x b.binder_ppname b.binder_ty; ss = pst.ss; solved = tm_emp; - unsolved = [open_term_nv body px] @ unsolved'; + unsolved = (vprop_as_list (open_term_nv body px)) @ unsolved'; k = k_sub; goals_inv = magic (); solved_inv = (); @@ -114,11 +117,16 @@ let intro_exists (#preamble:_) (pst:prover_state preamble) : vprop_equiv (push_env pst_sub.pg pst_sub.uvs) preamble_sub.goals (list_as_vprop [] * pst_sub.solved) = pst_sub.goals_inv in - let ropt = PS.ss_to_nt_substs pst_sub.pg pst_sub.uvs pst_sub.ss in - if None? ropt then fail pst_sub.pg None "intro exists ss not well-typed"; - // if not (PS.check_well_typedness pst_sub.pg pst_sub.uvs pst_sub.ss) - // then fail pst_sub.pg None "intro exists ss not well-typed"; - let Some nt = ropt in + let nt : nts:PS.nt_substs { PS.well_typed_nt_substs pst_sub.pg pst_sub.uvs nts /\ + PS.is_permutation nts pst_sub.ss } = + let r = PS.ss_to_nt_substs pst_sub.pg pst_sub.uvs pst_sub.ss in + match r with + | Inr msg -> + fail pst_sub.pg None + (Printf.sprintf + "resulted substitution after intro exists protocol is not well-typed: %s" + msg) + | Inl nt -> nt in assert (PS.well_typed_nt_substs pst_sub.pg pst_sub.uvs nt); let pst_sub_goals_inv : vprop_equiv pst_sub.pg @@ -281,7 +289,10 @@ let intro_exists (#preamble:_) (pst:prover_state preamble) let goals_inv : vprop_equiv (push_env pst_sub.pg pst_sub.uvs) preamble.goals - (pst.solved * list_as_vprop pst.unsolved) = magic () in + (pst.solved * list_as_vprop pst.unsolved) = + let d = Metatheory.veq_weakening pst.pg pst.uvs goals_inv pst_sub.pg in + let d = Metatheory.veq_weakening_end pst_sub.pg pst.uvs d pst_sub.uvs in + VE_Trans _ _ _ _ d (VE_Comm _ _ _) in let goals_inv : vprop_equiv pst_sub.pg diff --git a/lib/steel/pulse/Pulse.Prover.IntroExists.fst.hints b/lib/steel/pulse/Pulse.Checker.Prover.IntroExists.fst.hints similarity index 55% rename from lib/steel/pulse/Pulse.Prover.IntroExists.fst.hints rename to lib/steel/pulse/Pulse.Checker.Prover.IntroExists.fst.hints index b91724ea0..4810570cb 100644 --- a/lib/steel/pulse/Pulse.Prover.IntroExists.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.Prover.IntroExists.fst.hints @@ -1,8 +1,8 @@ [ - "s=\u000e\u0019\u000f2Uҁ~\u0012(", + "Nd\u0017ф8<'", [ [ - "Pulse.Prover.IntroExists.coerce_eq", + "Pulse.Checker.Prover.IntroExists.coerce_eq", 1, 2, 1, @@ -11,31 +11,27 @@ "refinement_interpretation_Tm_refine_0dee8cb03258a67c2f7ec66427696212" ], 0, - "3919b65eeca2f16caf29266027f5cf67" + "dfe23593bac448032508fa4b8a830464" ], [ - "Pulse.Prover.IntroExists.k_intro_exists", + "Pulse.Checker.Prover.IntroExists.k_intro_exists", 1, 2, 1, [ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.append.fuel_instrumented", - "@fuel_correspondence_FStar.List.Tot.Base.fold_right.fuel_instrumented", - "@query", - "FStar.List.Tot.Base_interpretation_Tm_arrow_3c1d21b8f6dcc5e202b4ff1cafbaba81", - "FStar.Reflection.Types_pretyping_b57262eead998d474939c05a17e1ffab", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", "Pulse.Syntax.Base_pretyping_fe09dc1e796799f4bac0760e63f30d40", - "Pulse.Typing_interpretation_Tm_arrow_7025f41b53a92b33286c43a926ef926b", "bool_inversion", "constructor_distinct_FStar.Pervasives.Native.None", "constructor_distinct_FStar.Pervasives.Native.Some", - "constructor_distinct_FStar.Tactics.Result.Failed", - "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", + "constructor_distinct_Prims.Nil", "constructor_distinct_Pulse.Syntax.Base.C_STGhost", "data_elim_Pulse.Syntax.Base.Mkbinder", + "data_elim_Pulse.Syntax.Base.Mkppname", "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_FStar.Pervasives.Native.Some", "disc_equation_Pulse.Syntax.Base.C_ST", "disc_equation_Pulse.Syntax.Base.C_STAtomic", "disc_equation_Pulse.Syntax.Base.C_STGhost", @@ -43,15 +39,20 @@ "equation_FStar.List.Tot.Base.op_At", "equation_FStar.Pervasives.Native.fst", "equation_FStar.Pervasives.Native.snd", - "equation_FStar.Reflection.Typing.fstar_env", "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_FStar.Reflection.Typing.pp_name_t", "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Sealed.Inhabited.sealed", + "equation_FStar.Sealed.Inhabited.sealed_", "equation_FStar.Set.disjoint", "equation_Prims.eqtype", "equation_Prims.nat", - "equation_Pulse.Prover.Common.continuation_elaborator", + "equation_Pulse.Checker.Base.continuation_elaborator", "equation_Pulse.Syntax.Base.comp_post", "equation_Pulse.Syntax.Base.comp_pre", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.mk_ppname_no_range", "equation_Pulse.Syntax.Base.nvar", + "equation_Pulse.Syntax.Base.ppname_default", "equation_Pulse.Syntax.Base.stateful_comp", "equation_Pulse.Syntax.Base.tm_exists_sl", "equation_Pulse.Syntax.Base.typ", @@ -62,107 +63,112 @@ "equation_Pulse.Typing.Env.disjoint", "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.env_bindings", + "equation_Pulse.Typing.Env.env_extends", "equation_Pulse.Typing.Env.equal", + "equation_Pulse.Typing.Env.extends_with", "equation_Pulse.Typing.Env.lookup", "equation_Pulse.Typing.comp_intro_exists", - "equation_Pulse.Typing.elab_env", - "equation_Pulse.Typing.extend_env_l", "equation_with_fuel_FStar.List.Tot.Base.append.fuel_instrumented", - "equation_with_fuel_FStar.List.Tot.Base.fold_right.fuel_instrumented", "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Prims.list", "fuel_guarded_inversion_Pulse.Syntax.Base.binder", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "fuel_guarded_inversion_Pulse.Typing.st_typing", - "function_token_typing_FStar.Reflection.Types.env", "function_token_typing_Prims.__cache_version_number__", "function_token_typing_Prims.int", + "function_token_typing_Prims.string", "function_token_typing_Pulse.Typing.Env.binding", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", "kinding_Pulse.Syntax.Base.ppname@tok", "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.List.Tot.Properties.append_l_nil", "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Pervasives.invertOption", + "lemma_FStar.Sealed.Inhabited.sealed_singleton", + "lemma_FStar.Set.lemma_equal_elim", "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", "lemma_FStar.Set.mem_intersect", "lemma_Pulse.Typing.Env.env_extends_push", + "lemma_Pulse.Typing.Env.env_extends_refl", "lemma_Pulse.Typing.Env.equal_elim", "lemma_Pulse.Typing.Env.mk_env_bs", "lemma_Pulse.Typing.Env.mk_env_dom", - "lemma_Pulse.Typing.Env.push_binding_bs", + "lemma_Pulse.Typing.Env.push_env_as_map", "lemma_Pulse.Typing.Env.push_env_bindings", "lemma_Pulse.Typing.Env.push_env_fstar_env", "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", "proj_equation_FStar.Pervasives.Native.Mktuple2__1", "proj_equation_FStar.Pervasives.Native.Mktuple2__2", + "proj_equation_Pulse.Syntax.Base.Mknm_nm_ppname", + "proj_equation_Pulse.Syntax.Base.Mkppname_name", "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", "projection_inverse_BoxBool_proj_0", "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", - "projection_inverse_FStar.Pervasives.Native.None_a", - "projection_inverse_FStar.Tactics.Result.Failed_a", - "projection_inverse_FStar.Tactics.Result.Failed_exn", - "projection_inverse_FStar.Tactics.Result.Failed_ps", "projection_inverse_Prims.Nil_a", "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", + "projection_inverse_Pulse.Syntax.Base.Mknm_nm_ppname", + "projection_inverse_Pulse.Syntax.Base.Mkppname_name", "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", + "refinement_interpretation_Tm_refine_25fe9861b42cf97d961ff4c8f44eb399", "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_30687c6bbf76a4ea67eae131536eafd7", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", - "refinement_interpretation_Tm_refine_b9943bf670d3eeece9d9f2e3e534ed66", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "string_typing", "typing_FStar.Pervasives.Native.fst", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_FStar.Pervasives.Native.snd", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Sealed.seal", + "typing_FStar.Set.empty", "typing_FStar.Set.intersect", + "typing_FStar.Set.mem", + "typing_Pulse.Syntax.Base.__proj__Mkppname__item__name", "typing_Pulse.Syntax.Base.comp_res", + "typing_Pulse.Syntax.Base.mk_ppname_no_range", "typing_Pulse.Syntax.Base.stateful_comp", "typing_Pulse.Syntax.Base.v_as_nv", "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.bindings", "typing_Pulse.Typing.Env.dom", "typing_Pulse.Typing.Env.fstar_env", - "typing_Pulse.Typing.Env.push_binding", - "typing_Pulse.Typing.elab_env", - "typing_Tm_abs_9de830881eb0b7299cb605b2cfe97562" + "typing_Pulse.Typing.Env.lookup", "typing_Pulse.Typing.Env.mk_env", + "typing_Pulse.Typing.Env.push_binding" ], 0, - "6be8fc274633ba29a16e91c04ed5c71e" + "b927a561ea54b24e76540df7fac2c56f" ], [ - "Pulse.Prover.IntroExists.intro_exists", + "Pulse.Checker.Prover.IntroExists.intro_exists", 1, 1, 1, [ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.append.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.well_typed_nt_substs.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.well_typed_nt_substs.fuel_instrumented", "@fuel_correspondence_Pulse.Syntax.Naming.freevars.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.well_typed_nt_substs.fuel_instrumented", + "@fuel_correspondence_Pulse.Typing.Combinators.list_as_vprop.fuel_instrumented", + "@fuel_correspondence_Pulse.Typing.Combinators.vprop_as_list.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.well_typed_nt_substs.fuel_instrumented", "@query", "Pulse.Syntax.Base_pretyping_fe09dc1e796799f4bac0760e63f30d40", "bool_inversion", "constructor_distinct_FStar.Tactics.Result.Failed", "constructor_distinct_FStar.Tactics.Result.Success", "constructor_distinct_Pulse.Syntax.Base.Tm_Emp", "data_elim_FStar.Tactics.Result.Success", - "data_elim_Pulse.Prover.Common.Mkprover_state", + "data_elim_Pulse.Checker.Prover.Base.Mkprover_state", "data_elim_Pulse.Syntax.Base.Mkbinder", "data_typing_intro_FStar.Pervasives.Native.Mktuple2@tok", - "data_typing_intro_Pulse.Prover.Common.Mkpreamble@tok", + "data_typing_intro_Pulse.Checker.Prover.Base.Mkpreamble@tok", "equality_tok_Pulse.Syntax.Base.Tm_Emp@tok", "equation_FStar.Pervasives.Native.fst", - "equation_FStar.Pervasives.Native.snd", "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.disjoint", "equation_Prims.eqtype", "equation_Prims.nat", - "equation_Pulse.Prover.Common.continuation_elaborator", - "equation_Pulse.Prover.Common.is_terminal", - "equation_Pulse.Prover.Common.op_Array_Access", - "equation_Pulse.Prover.Common.op_Star", - "equation_Pulse.Prover.Common.pst_extends", + "equation_Pulse.Checker.Prover.Base.is_terminal", + "equation_Pulse.Checker.Prover.Base.op_Array_Access", + "equation_Pulse.Checker.Prover.Base.pst_extends", "equation_Pulse.Syntax.Base.nvar", "equation_Pulse.Syntax.Base.range", "equation_Pulse.Syntax.Base.tm_emp", @@ -175,85 +181,90 @@ "equation_Pulse.Typing.Env.extends_with", "equation_with_fuel_Pulse.Syntax.Naming.freevars.fuel_instrumented", "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Prover.Common.prover_state", + "fuel_guarded_inversion_Pulse.Checker.Prover.Base.prover_state", "fuel_guarded_inversion_Pulse.Syntax.Base.binder", "fuel_guarded_inversion_Pulse.Syntax.Base.term", "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", "kinding_Pulse.Syntax.Base.ppname@tok", "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Map.lemma_InDomUpd2", "lemma_FStar.Pervasives.invertOption", "lemma_FStar.Set.lemma_equal_elim", "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", "lemma_FStar.Set.mem_intersect", "lemma_FStar.Set.mem_subset", - "lemma_Pulse.Prover.Substs.ss_nt_subst", + "lemma_Pulse.Checker.Prover.Substs.ss_nt_subst", "lemma_Pulse.Syntax.Base.range_singleton", + "lemma_Pulse.Typing.Env.env_extends_push", "lemma_Pulse.Typing.Env.env_extends_refl", "lemma_Pulse.Typing.Env.env_extends_trans", + "lemma_Pulse.Typing.Env.push_binding_as_map", "lemma_Pulse.Typing.Env.push_env_as_map", - "primitive_Prims.op_AmpAmp", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", "proj_equation_FStar.Pervasives.Native.Mktuple2__1", - "proj_equation_FStar.Pervasives.Native.Mktuple2__2", - "proj_equation_Pulse.Prover.Common.Mkpreamble_ctxt", - "proj_equation_Pulse.Prover.Common.Mkpreamble_frame", - "proj_equation_Pulse.Prover.Common.Mkpreamble_g0", - "proj_equation_Pulse.Prover.Common.Mkpreamble_goals", - "proj_equation_Pulse.Prover.Common.Mkprover_state_pg", - "proj_equation_Pulse.Prover.Common.Mkprover_state_remaining_ctxt", - "proj_equation_Pulse.Prover.Common.Mkprover_state_solved", - "proj_equation_Pulse.Prover.Common.Mkprover_state_ss", - "proj_equation_Pulse.Prover.Common.Mkprover_state_unsolved", - "proj_equation_Pulse.Prover.Common.Mkprover_state_uvs", + "proj_equation_Pulse.Checker.Prover.Base.Mkpreamble_ctxt", + "proj_equation_Pulse.Checker.Prover.Base.Mkpreamble_frame", + "proj_equation_Pulse.Checker.Prover.Base.Mkpreamble_g0", + "proj_equation_Pulse.Checker.Prover.Base.Mkpreamble_goals", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_remaining_ctxt", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_solved", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_ss", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_unsolved", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_uvs", "proj_equation_Pulse.Syntax.Base.Mkterm_range", "proj_equation_Pulse.Syntax.Base.Mkterm_t", "projection_inverse_BoxBool_proj_0", "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", "projection_inverse_FStar.Tactics.Result.Failed_a", "projection_inverse_FStar.Tactics.Result.Failed_exn", "projection_inverse_FStar.Tactics.Result.Failed_ps", "projection_inverse_FStar.Tactics.Result.Success_a", "projection_inverse_FStar.Tactics.Result.Success_ps", "projection_inverse_FStar.Tactics.Result.Success_v", - "projection_inverse_Pulse.Prover.Common.Mkpreamble_ctxt", - "projection_inverse_Pulse.Prover.Common.Mkpreamble_frame", - "projection_inverse_Pulse.Prover.Common.Mkpreamble_g0", - "projection_inverse_Pulse.Prover.Common.Mkpreamble_goals", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_pg", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_remaining_ctxt", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_ss", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_unsolved", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_uvs", + "projection_inverse_Pulse.Checker.Prover.Base.Mkpreamble_ctxt", + "projection_inverse_Pulse.Checker.Prover.Base.Mkpreamble_frame", + "projection_inverse_Pulse.Checker.Prover.Base.Mkpreamble_g0", + "projection_inverse_Pulse.Checker.Prover.Base.Mkpreamble_goals", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_remaining_ctxt", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_ss", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_unsolved", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_uvs", "projection_inverse_Pulse.Syntax.Base.Mkterm_t", - "refinement_interpretation_Tm_refine_2477938212fcc53563c49a7492a8c23e", + "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", + "refinement_interpretation_Tm_refine_23d4c48b624a608bd65d672acaffdc50", + "refinement_interpretation_Tm_refine_3201114dc2ece82edbaf3a0633f82db7", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_4586a853eaf0aaf3e250d623128f7077", - "refinement_interpretation_Tm_refine_80b0f7a527ed1cd44bdbe413386af96c", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_53e333f045f1bd72f8e580fde2856271", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_7420aeac8e03f757602e7db630fec658", "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", - "refinement_interpretation_Tm_refine_b8eafb40bfd3eff96b5c592aaf9bae95", - "refinement_interpretation_Tm_refine_d75d8936e6500ecc775a054d1682296c", + "refinement_interpretation_Tm_refine_998f5317571047eba4128227bc054984", + "refinement_interpretation_Tm_refine_9aba6d22fe6599ed860d1f6f7c293baf", + "refinement_interpretation_Tm_refine_b57dab910ba7f544042049db0abfc3b0", + "refinement_interpretation_Tm_refine_bfc49ae39876986e037f32845aed90da", "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", - "refinement_interpretation_Tm_refine_ebac236eae7020bbb9b446bec2ca2712", - "refinement_interpretation_Tm_refine_ffb53b91ee7afecaaf420155b35aadbf", - "refinement_kinding_Tm_refine_2477938212fcc53563c49a7492a8c23e", + "refinement_kinding_Tm_refine_23d4c48b624a608bd65d672acaffdc50", "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "typing_FStar.Map.concat", "typing_FStar.Map.domain", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Prims.magic", - "typing_Pulse.Checker.VPropEquiv.list_as_vprop", - "typing_Pulse.Prover.Common.__proj__Mkpreamble__item__frame", - "typing_Pulse.Prover.Common.__proj__Mkpreamble__item__g0", - "typing_Pulse.Prover.Common.__proj__Mkpreamble__item__goals", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__pg", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__remaining_ctxt", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__solved", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__ss", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__unsolved", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__uvs", - "typing_Pulse.Prover.Common.op_Array_Access", - "typing_Pulse.Prover.Common.op_Star", - "typing_Pulse.Prover.Common.vprop_typing", + "typing_FStar.Map.concat", "typing_FStar.Map.contains", + "typing_FStar.Map.domain", "typing_FStar.Reflection.V2.Data.var", + "typing_FStar.Set.empty", "typing_FStar.Set.intersect", + "typing_FStar.Set.mem", "typing_Prims.magic", + "typing_Pulse.Checker.Prover.Base.__proj__Mkpreamble__item__frame", + "typing_Pulse.Checker.Prover.Base.__proj__Mkpreamble__item__g0", + "typing_Pulse.Checker.Prover.Base.__proj__Mkpreamble__item__goals", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__pg", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__solved", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__ss", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__unsolved", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__uvs", + "typing_Pulse.Checker.Prover.Base.op_Array_Access", + "typing_Pulse.Checker.Prover.Base.op_Star", + "typing_Pulse.Checker.Prover.Base.vprop_typing", "typing_Pulse.Syntax.Base.__proj__Mkbinder__item__binder_ppname", "typing_Pulse.Syntax.Base.__proj__Mkbinder__item__binder_ty", "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", @@ -261,11 +272,12 @@ "typing_Pulse.Syntax.Base.tm_star", "typing_Pulse.Syntax.Naming.freevars", "typing_Pulse.Syntax.Naming.open_term_nv", + "typing_Pulse.Typing.Combinators.list_as_vprop", "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", - "unit_typing" + "typing_Pulse.Typing.Env.push_env", "unit_typing" ], 0, - "00c4f833c350f67129a62216df9c5ac4" + "637cfb0dbd855f6db15ae1e7e089304c" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Prover.IntroExists.fsti b/lib/steel/pulse/Pulse.Checker.Prover.IntroExists.fsti similarity index 84% rename from lib/steel/pulse/Pulse.Prover.IntroExists.fsti rename to lib/steel/pulse/Pulse.Checker.Prover.IntroExists.fsti index 7516f415a..efc6a0e40 100644 --- a/lib/steel/pulse/Pulse.Prover.IntroExists.fsti +++ b/lib/steel/pulse/Pulse.Checker.Prover.IntroExists.fsti @@ -1,10 +1,10 @@ -module Pulse.Prover.IntroExists +module Pulse.Checker.Prover.IntroExists module T = FStar.Tactics open Pulse.Syntax open Pulse.Typing -open Pulse.Prover.Common +open Pulse.Checker.Prover.Base val intro_exists (#preamble:_) (pst:prover_state preamble) (u:universe) (b:binder) (body:vprop) diff --git a/lib/steel/pulse/Pulse.Checker.Prover.IntroExists.fsti.hints b/lib/steel/pulse/Pulse.Checker.Prover.IntroExists.fsti.hints new file mode 100644 index 000000000..6c576b837 --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Prover.IntroExists.fsti.hints @@ -0,0 +1 @@ +[ "T#D#d_~", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Prover.IntroPure.fst b/lib/steel/pulse/Pulse.Checker.Prover.IntroPure.fst new file mode 100644 index 000000000..2c40cc5ba --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Prover.IntroPure.fst @@ -0,0 +1,263 @@ +module Pulse.Checker.Prover.IntroPure + +open Pulse.Syntax +open Pulse.Typing +open Pulse.Typing.Combinators +open Pulse.Typing.Metatheory +open Pulse.Checker.Pure +open Pulse.Checker.VPropEquiv +open Pulse.Checker.Prover.Base +open Pulse.Checker.Base +open Pulse.Checker.Prover.Util + +module T = FStar.Tactics.V2 +module P = Pulse.Syntax.Printer +module PS = Pulse.Checker.Prover.Substs + +let coerce_eq (#a #b:Type) (x:a) (_:squash (a == b)) : y:b{y == x} = x + +let k_intro_pure (g:env) (p:term) + (d:tot_typing g p tm_prop) + (token:prop_validity g p) (frame:vprop) + + : T.Tac (continuation_elaborator g frame g (frame * tm_pure p)) = + + let t = wr (Tm_IntroPure {p}) in + let c = comp_intro_pure p in + let d : st_typing g t c = T_IntroPure g p d token in + + let x = fresh g in + + // p is well-typed in g, so it does not have x free + assume (open_term p x == p); + + let ppname = mk_ppname_no_range "_pintrop" in + let k : continuation_elaborator + g (frame * tm_emp) + (push_binding g x ppname_default tm_unit) (tm_pure p * frame) = + continuation_elaborator_with_bind frame d (magic ()) (ppname, x) in + + let k : continuation_elaborator + g frame + (push_binding g x ppname_default tm_unit) (frame * tm_pure p) = + k_elab_equiv k (magic ()) (magic ()) in + + fun post_hint r -> + let (| t1, c1, d1 |) = r in + let d1 : st_typing g t1 c1 = d1 in + let empty_env = mk_env (fstar_env g) in + assert (equal g (push_env g empty_env)); + assert (equal (push_env (push_binding g x ppname_default tm_unit) empty_env) + (push_binding g x ppname_default tm_unit)); + let d1 : st_typing (push_binding g x ppname_default tm_unit) t1 c1 = + st_typing_weakening + g + empty_env + t1 c1 d1 + (push_binding g x ppname_default tm_unit) in + + k post_hint (| t1, c1, d1 |) + +module R = FStar.Reflection.V2 + +// let is_eq2 (t:R.term) : option (R.term & R.term) = +// let head, args = R.collect_app_ln t in +// match R.inspect_ln head, args with +// | R.Tv_FVar fv, [_; (a1, _); (a2, _)] +// | R.Tv_UInst fv _, [_; (a1, _); (a2, _)] -> +// let l = R.inspect_fv fv in +// if l = ["Pulse"; "Steel"; "Wrapper"; "eq2_prop"] || +// l = ["Prims"; "eq2"] +// then Some (a1, a2) +// else None +// | _ -> None + +let is_eq2_uvar (uvs:env) (t:term) + : option (uv:var { uv `Set.mem` freevars t } & term) = + + match is_eq2 t with + | None -> None + | Some (l, r) -> + match is_var l with + | Some nm -> + if Set.mem nm.nm_index (dom uvs) + then Some (| nm.nm_index, r |) + else None + | None -> + match is_var r with + | Some nm -> + if Set.mem nm.nm_index (dom uvs) + then Some (| nm.nm_index, l |) + else None + | _ -> None + +module RF = FStar.Reflection.V2.Formula +let rec try_collect_substs (uvs:env) (t:term) + : T.Tac (ss:PS.ss_t { PS.dom ss `Set.subset` freevars t }) = + assume (PS.dom PS.empty == Set.empty); + match t.t with + | Tm_FStar rt -> + let f = RF.term_as_formula' rt in + begin + match f with + | RF.And rt0 rt1 -> + assume (not_tv_unknown rt0 /\ not_tv_unknown rt1); + let ss0 = try_collect_substs uvs (tm_fstar rt0 FStar.Range.range_0) in + let ss1 = try_collect_substs uvs (tm_fstar rt1 FStar.Range.range_0) in + if PS.check_disjoint ss0 ss1 + then let r = PS.push_ss ss0 ss1 in + assume (PS.dom r `Set.subset` freevars t); + r + else PS.empty + | _ -> + match is_eq2_uvar uvs t with + | Some (| uv, e |) -> + assume (~ (uv `Set.mem` (PS.dom PS.empty))); + let r = PS.push PS.empty uv e in + assume (PS.dom r `Set.subset` freevars t); + r + | None -> PS.empty + end + + | _ -> PS.empty + +let intro_pure (#preamble:_) (pst:prover_state preamble) + (t:term) + (unsolved':list vprop) + (_:squash (pst.unsolved == (tm_pure t)::unsolved')) + : T.Tac (option (pst':prover_state preamble { pst' `pst_extends` pst })) = + + let t_ss = pst.ss.(t) in + + debug_prover pst.pg (fun _ -> + Printf.sprintf "Intro pure trying to typecheck prop: %s with uvs: %s\n" + (P.term_to_string t_ss) + (env_to_string pst.uvs)); + + + let ss' = try_collect_substs pst.uvs t_ss in + assume (PS.dom pst.ss `Set.disjoint` PS.dom ss'); + let ss_new = PS.push_ss pst.ss ss' in + assume (ss_new `ss_extends` pst.ss); + + let t_ss = ss_new.(t) in + let d = + let d = core_check_term_with_expected_type pst.pg t_ss tm_prop in + E d in + let d_valid = check_prop_validity pst.pg t_ss d in + + // let (| ss_new, t_ss, d, d_valid |) : ss_new:PS.ss_t { ss_new `ss_extends` pst.ss } & + // t_ss:term { t_ss == ss_new.(t) } & + // tot_typing pst.pg t_ss tm_prop & + // prop_validity pst.pg t_ss = + // match is_eq2_uvar pst.pg pst.uvs t_ss with + // | Some (| uv, e |) -> + // // uv is a freevar in t_ss, + // // which is obtained by applying pst.ss to t + // // so uv can't possibly in the domain of pst.ss + // // or it could be a check? + // assume (~ (uv `Set.mem` (PS.dom pst.ss))); + // assume (~ (PS.contains PS.empty uv)); + // let ss_uv = PS.push PS.empty uv e in + // let t_ss_new = ss_uv.(t_ss) in + // assume (Set.disjoint (PS.dom ss_uv) (PS.dom pst.ss)); + // let ss_new = PS.push_ss pst.ss ss_uv in + // assume (t_ss_new == ss_new.(t)); + // // we know this is refl, can we avoid this call? + // let token = check_prop_validity pst.pg t_ss_new (magic ()) in + // (| ss_new, + // t_ss_new, + // magic (), + // token |) + // | None -> + // // + // // we need to check that t is closed in pst.pg + // // this is one way + // // + // let d = core_check_term_with_expected_type pst.pg t_ss tm_prop in + // (| pst.ss, t_ss, E d, check_prop_validity pst.pg t_ss (E d) |) in + + let x = fresh (push_env pst.pg pst.uvs) in + + let solved_new = (tm_pure t) * pst.solved in + let unsolved_new = unsolved' in + + let k : continuation_elaborator + preamble.g0 (preamble.ctxt * preamble.frame) + pst.pg ((list_as_vprop pst.remaining_ctxt * preamble.frame) * ss_new.(solved_new)) = + let frame = (list_as_vprop pst.remaining_ctxt * preamble.frame) * ss_new.(pst.solved) in + let k_pure + : continuation_elaborator + pst.pg frame + pst.pg (frame * (tm_pure t_ss)) = + k_intro_pure _ _ d d_valid frame in + // some *s + let veq + : vprop_equiv pst.pg + (((list_as_vprop pst.remaining_ctxt * preamble.frame) * ss_new.(pst.solved)) * tm_pure t_ss) + ((list_as_vprop pst.remaining_ctxt * preamble.frame) * (tm_pure t_ss * ss_new.(pst.solved))) = + magic () in + + // need lemmas in Prover.Subst + assume (tm_pure ss_new.(t) * ss_new.(pst.solved) == + ss_new.(tm_pure t * pst.solved)); + + let k_pure : continuation_elaborator + pst.pg ((list_as_vprop pst.remaining_ctxt * preamble.frame) * ss_new.(pst.solved)) + pst.pg ((list_as_vprop pst.remaining_ctxt * preamble.frame) * ss_new.(solved_new)) = + + k_elab_equiv k_pure (VE_Refl _ _) veq in + + + let k_pst : continuation_elaborator + preamble.g0 (preamble.ctxt * preamble.frame) + pst.pg ((list_as_vprop pst.remaining_ctxt * preamble.frame) * pst.ss.(pst.solved)) = pst.k in + + assume (pst.ss.(pst.solved) == ss_new.(pst.solved)); + let k_pst : continuation_elaborator + preamble.g0 (preamble.ctxt * preamble.frame) + pst.pg ((list_as_vprop pst.remaining_ctxt * preamble.frame) * ss_new.(pst.solved)) = coerce_eq k_pst () in + + k_elab_trans k_pst k_pure in + + let goals_inv + : vprop_equiv (push_env pst.pg pst.uvs) + preamble.goals + (list_as_vprop ((tm_pure t)::unsolved_new) * pst.solved) = pst.goals_inv in + + let veq : vprop_equiv (push_env pst.pg pst.uvs) + (list_as_vprop ((tm_pure t)::unsolved_new)) + (list_as_vprop unsolved_new * tm_pure t) = magic () in + + let veq : vprop_equiv (push_env pst.pg pst.uvs) + (list_as_vprop ((tm_pure t)::unsolved_new) * pst.solved) + ((list_as_vprop unsolved_new * tm_pure t) * pst.solved) = + VE_Ctxt _ _ _ _ _ veq (VE_Refl _ _) in + + let goals_inv + : vprop_equiv (push_env pst.pg pst.uvs) + preamble.goals + ((list_as_vprop unsolved_new * tm_pure t) * pst.solved) = + VE_Trans _ _ _ _ goals_inv veq in + + let veq : vprop_equiv (push_env pst.pg pst.uvs) + ((list_as_vprop unsolved_new * tm_pure t) * pst.solved) + (list_as_vprop unsolved_new * (tm_pure t * pst.solved)) = + VE_Sym _ _ _ (VE_Assoc _ _ _ _) in + + let goals_inv + : vprop_equiv (push_env pst.pg pst.uvs) + preamble.goals + (list_as_vprop unsolved_new * solved_new) = + VE_Trans _ _ _ _ goals_inv veq in + + assume (freevars ss_new.(solved_new) `Set.subset` dom pst.pg); + + let pst_new : prover_state preamble = { pst with ss = ss_new; + solved = solved_new; + unsolved = unsolved_new; + k; + goals_inv; + solved_inv = () } in + + Some pst_new diff --git a/lib/steel/pulse/Pulse.Checker.Prover.IntroPure.fst.hints b/lib/steel/pulse/Pulse.Checker.Prover.IntroPure.fst.hints new file mode 100644 index 000000000..4aaabeceb --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Prover.IntroPure.fst.hints @@ -0,0 +1,369 @@ +[ + "IsẐ+]", + [ + [ + "Pulse.Checker.Prover.IntroPure.coerce_eq", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "refinement_interpretation_Tm_refine_0dee8cb03258a67c2f7ec66427696212" + ], + 0, + "4e7034b59da66ea1c870db2c6866cec0" + ], + [ + "Pulse.Checker.Prover.IntroPure.k_intro_pure", + 1, + 2, + 1, + [ + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_FStar.List.Tot.Base.append.fuel_instrumented", + "@fuel_correspondence_Pulse.Syntax.Naming.subst_term.fuel_instrumented", + "@fuel_irrelevance_Pulse.Syntax.Naming.subst_term.fuel_instrumented", + "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.None", + "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_Prims.Nil", + "constructor_distinct_Pulse.Syntax.Base.C_STGhost", + "constructor_distinct_Pulse.Syntax.Base.Tm_Pure", + "constructor_distinct_Pulse.Syntax.Base.Tm_VProp", + "data_elim_Pulse.Syntax.Base.Mkppname", + "data_typing_intro_Prims.Cons@tok", + "data_typing_intro_Prims.Nil@tok", + "data_typing_intro_Pulse.Syntax.Naming.DT@tok", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_FStar.Pervasives.Native.Some", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_FStar.List.Tot.Base.op_At", + "equation_FStar.Pervasives.Native.fst", + "equation_FStar.Pervasives.Native.snd", + "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_FStar.Reflection.Typing.pp_name_t", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Sealed.Inhabited.sealed", + "equation_FStar.Sealed.Inhabited.sealed_", + "equation_FStar.Set.disjoint", "equation_Prims.eqtype", + "equation_Prims.nat", + "equation_Pulse.Checker.Base.continuation_elaborator", + "equation_Pulse.Syntax.Base.comp_post", + "equation_Pulse.Syntax.Base.comp_pre", + "equation_Pulse.Syntax.Base.comp_res", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.index", + "equation_Pulse.Syntax.Base.mk_ppname_no_range", + "equation_Pulse.Syntax.Base.nvar", + "equation_Pulse.Syntax.Base.ppname_default", + "equation_Pulse.Syntax.Base.range", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.tm_pure", + "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.v_as_nv", + "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", + "equation_Pulse.Syntax.Base.with_range", + "equation_Pulse.Syntax.Naming.open_term", + "equation_Pulse.Syntax.Naming.open_term_", + "equation_Pulse.Syntax.Naming.open_term_nv", + "equation_Pulse.Syntax.Naming.subst", + "equation_Pulse.Syntax.Pure.term_of_nvar", + "equation_Pulse.Typing.Env.binding", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.env_bindings", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.equal", + "equation_Pulse.Typing.Env.extends_with", + "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.comp_intro_pure", + "equation_with_fuel_FStar.List.Tot.Base.append.fuel_instrumented", + "equation_with_fuel_Pulse.Syntax.Naming.subst_term.fuel_instrumented", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "function_token_typing_Prims.__cache_version_number__", + "function_token_typing_Prims.int", + "function_token_typing_Prims.string", + "function_token_typing_Pulse.Typing.Env.binding", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", + "int_typing", "kinding_Pulse.Syntax.Base.ppname@tok", + "kinding_Pulse.Syntax.Base.term@tok", + "kinding_Pulse.Syntax.Naming.subst_elt@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Pervasives.invertOption", + "lemma_FStar.Sealed.Inhabited.sealed_singleton", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Syntax.Base.range_singleton", + "lemma_Pulse.Typing.Env.env_extends_push", + "lemma_Pulse.Typing.Env.env_extends_refl", + "lemma_Pulse.Typing.Env.equal_elim", + "lemma_Pulse.Typing.Env.mk_env_bs", + "lemma_Pulse.Typing.Env.mk_env_dom", + "lemma_Pulse.Typing.Env.push_env_bindings", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "proj_equation_FStar.Pervasives.Native.Mktuple2__1", + "proj_equation_FStar.Pervasives.Native.Mktuple2__2", + "proj_equation_Pulse.Syntax.Base.Mknm_nm_ppname", + "proj_equation_Pulse.Syntax.Base.Mkppname_name", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", + "proj_equation_Pulse.Syntax.Base.Mkterm_range", + "proj_equation_Pulse.Syntax.Base.Mkterm_t", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_Prims.Nil_a", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", + "projection_inverse_Pulse.Syntax.Base.Mknm_nm_ppname", + "projection_inverse_Pulse.Syntax.Base.Mkppname_name", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_res", + "projection_inverse_Pulse.Syntax.Base.Mkterm_range", + "projection_inverse_Pulse.Syntax.Base.Mkterm_t", + "projection_inverse_Pulse.Syntax.Base.Tm_Pure_p", + "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", + "refinement_interpretation_Tm_refine_25fe9861b42cf97d961ff4c8f44eb399", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "string_typing", "typing_FStar.Pervasives.Native.fst", + "typing_FStar.Pervasives.Native.snd", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Sealed.seal", + "typing_FStar.Set.empty", "typing_FStar.Set.intersect", + "typing_FStar.Set.mem", + "typing_Pulse.Syntax.Base.__proj__Mkppname__item__name", + "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", + "typing_Pulse.Syntax.Base.mk_ppname_no_range", + "typing_Pulse.Syntax.Base.tm_pure", + "typing_Pulse.Syntax.Base.v_as_nv", + "typing_Pulse.Syntax.Pure.term_of_nvar", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.bindings", + "typing_Pulse.Typing.Env.dom", "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.lookup", + "typing_Pulse.Typing.Env.push_binding", "typing_Pulse.Typing.tm_unit" + ], + 0, + "9fb0ca849079fb10f735b784e87640bd" + ], + [ + "Pulse.Checker.Prover.IntroPure.is_eq2_uvar", + 1, + 4, + 2, + [ + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_FStar.Reflection.Typing.freevars.fuel_instrumented", + "@fuel_correspondence_Pulse.Elaborate.Pure.elab_term.fuel_instrumented", + "@fuel_correspondence_Pulse.Syntax.Naming.freevars.fuel_instrumented", + "@query", + "FStar.Reflection.V2.Data_pretyping_f60681fbcdc25fab56ef0ee7d5de8af8", + "Pulse.Syntax.Base_pretyping_0b425ab385a56835d52cd71c18622a32", + "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.None", + "constructor_distinct_FStar.Pervasives.Native.Some", + "data_elim_FStar.Pervasives.Native.Mktuple2", + "data_elim_FStar.Pervasives.Native.Mktuple3", + "data_elim_FStar.Pervasives.Native.Some", + "data_elim_FStar.Reflection.V2.Data.Tv_App", + "data_elim_Pulse.Syntax.Base.Mkterm", + "data_elim_Pulse.Syntax.Base.Tm_FStar", + "data_typing_intro_FStar.Reflection.V2.Data.Q_Explicit@tok", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_FStar.Pervasives.Native.Some", + "equality_tok_FStar.Reflection.V2.Data.Tv_Unknown@tok", + "equality_tok_Pulse.Syntax.Base.Implicit@tok", + "equation_FStar.Range.range", + "equation_FStar.Reflection.Typing.namedv_uniq", + "equation_FStar.Reflection.V2.Data.argv", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.host_term", + "equation_Pulse.Syntax.Base.not_tv_unknown", + "equation_Pulse.Syntax.Base.range", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Syntax.Pure.is_eq2", + "equation_Pulse.Syntax.Pure.is_pure_app", + "equation_Pulse.Syntax.Pure.is_var", + "equation_Pulse.Syntax.Pure.op_let_Question", + "equation_with_fuel_FStar.Reflection.Typing.freevars.fuel_instrumented", + "equation_with_fuel_Pulse.Elaborate.Pure.elab_term.fuel_instrumented", + "equation_with_fuel_Pulse.Syntax.Naming.freevars.fuel_instrumented", + "fuel_guarded_inversion_FStar.Pervasives.Native.option", + "fuel_guarded_inversion_FStar.Pervasives.Native.tuple2", + "fuel_guarded_inversion_FStar.Pervasives.Native.tuple3", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", + "interpretation_Tm_abs_33a63850c165b4fac2ce3a93e1cb7b74", + "interpretation_Tm_abs_b375c48a164fb3f8f7aa578d06e80e4e", + "kinding_FStar.Pervasives.Native.tuple2@tok", + "kinding_Pulse.Syntax.Base.nm@tok", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Pervasives.invertOption", + "lemma_FStar.Set.mem_complement", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_singleton", "lemma_FStar.Set.mem_union", + "lemma_Pulse.Syntax.Base.range_singleton", + "primitive_Prims.op_BarBar", "primitive_Prims.op_Equality", + "primitive_Prims.op_Negation", + "proj_equation_Pulse.Syntax.Base.Mknm_nm_index", + "proj_equation_Pulse.Syntax.Base.Mkterm_range", + "proj_equation_Pulse.Syntax.Base.Mkterm_t", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_FStar.Pervasives.Native.Mktuple3__1", + "projection_inverse_FStar.Pervasives.Native.Mktuple3__3", + "projection_inverse_FStar.Pervasives.Native.None_a", + "projection_inverse_FStar.Pervasives.Native.Some_a", + "projection_inverse_FStar.Pervasives.Native.Some_v", + "projection_inverse_Pulse.Syntax.Base.Mknm_nm_index", + "refinement_interpretation_Tm_refine_23dfcaa69174c552645c49ff9c2a2ea7", + "refinement_interpretation_Tm_refine_2ec6ce5a1e7a7fbf7c3d0a16c7b15719", + "refinement_interpretation_Tm_refine_4017a0e357291bf7f7b0fd33e180ad38", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "refinement_interpretation_Tm_refine_f39ae41739caa6a3420811af45940127", + "token_correspondence_FStar.Reflection.Typing.freevars.fuel_instrumented", + "typing_FStar.Reflection.V2.Builtins.inspect_ln", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.mem", "typing_Pulse.Readback.readback_ty", + "typing_Pulse.RuntimeUtils.set_range", + "typing_Pulse.Syntax.Base.__proj__Mknm__item__nm_index", + "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t", + "typing_Pulse.Syntax.Naming.freevars", + "typing_Pulse.Syntax.Pure.is_eq2", + "typing_Pulse.Syntax.Pure.is_pure_app", + "typing_Pulse.Syntax.Pure.is_var", + "typing_tok_Pulse.Syntax.Base.Implicit@tok" + ], + 0, + "4e1dc8b71fd139c617a14c9e65a246d7" + ], + [ + "Pulse.Checker.Prover.IntroPure.try_collect_substs", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "FStar.Reflection.V2.Formula_pretyping_a139a58227e3de46f2dffe5b09a40575", + "constructor_distinct_Pulse.Syntax.Base.Tm_FStar", + "data_elim_FStar.Tactics.Result.Success", + "data_typing_intro_FStar.Reflection.V2.Formula.False_@tok", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_FStar.Pervasives.Native.Some", + "disc_equation_Pulse.Syntax.Base.Tm_FStar", + "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.subset", + "equation_Prims.eqtype", "equation_Prims.nat", + "equation_Pulse.Checker.Prover.IntroPure.is_eq2_uvar", + "equation_Pulse.Checker.Prover.Substs.contains", + "equation_Pulse.Checker.Prover.Substs.dom", + "equation_Pulse.Syntax.Base.range_singleton_trigger", + "equation_Pulse.Syntax.Base.var", + "fuel_guarded_inversion_FStar.Pervasives.Native.option", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", "lemma_FStar.Set.mem_empty", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_Pulse.Syntax.Base.Tm_FStar__0", + "refinement_interpretation_Tm_refine_03885b38077044d1f727211c7826ff45", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_538a644e983c7551ecf7e8f4bd1f3aa3", + "refinement_interpretation_Tm_refine_5a3948691a9728292a7282c64c67b85d", + "typing_FStar.Reflection.V2.Data.var", + "typing_Pulse.Checker.Prover.IntroPure.is_eq2_uvar", + "typing_Pulse.Checker.Prover.Substs.as_map", + "typing_Pulse.Checker.Prover.Substs.check_disjoint", + "typing_Pulse.Checker.Prover.Substs.empty" + ], + 0, + "1db9ea636f5756aabf81915c3b69259d" + ], + [ + "Pulse.Checker.Prover.IntroPure.intro_pure", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", "bool_inversion", + "constructor_distinct_FStar.Tactics.Result.Failed", + "constructor_distinct_FStar.Tactics.Result.Success", + "data_elim_Pulse.Checker.Prover.Base.Mkprover_state", + "disc_equation_FStar.Pervasives.Native.None", + "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.eqtype", + "equation_Prims.nat", + "equation_Pulse.Checker.Base.continuation_elaborator", + "equation_Pulse.Checker.Prover.Base.op_Star", + "equation_Pulse.Checker.Prover.Base.pst_extends", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.extends_with", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Pulse.Checker.Prover.Base.prover_state", + "function_token_typing_Prims.__cache_version_number__", + "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.env_extends_refl", + "lemma_Pulse.Typing.Env.push_env_as_map", + "primitive_Prims.op_AmpAmp", + "proj_equation_Pulse.Checker.Prover.Base.Mkpreamble_g0", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_remaining_ctxt", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_solved", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_ss", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_unsolved", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_uvs", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Tactics.Result.Failed_a", + "projection_inverse_FStar.Tactics.Result.Failed_exn", + "projection_inverse_FStar.Tactics.Result.Failed_ps", + "projection_inverse_FStar.Tactics.Result.Success_a", + "projection_inverse_FStar.Tactics.Result.Success_ps", + "projection_inverse_FStar.Tactics.Result.Success_v", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_ss", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_uvs", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_3201114dc2ece82edbaf3a0633f82db7", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_a905ee6fb036f8463bc3860959f7abf6", + "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", + "string_typing", "typing_FStar.Map.concat", + "typing_FStar.Map.domain", "typing_FStar.Reflection.V2.Data.var", + "typing_FStar.Set.empty", "typing_FStar.Set.intersect", + "typing_FStar.Set.mem", + "typing_Pulse.Checker.Prover.Base.__proj__Mkpreamble__item__g0", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fstar_env" + ], + 0, + "ea7328e4ceb8025f8fdcc6c175a437b5" + ] + ] +] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Prover.IntroPure.fsti b/lib/steel/pulse/Pulse.Checker.Prover.IntroPure.fsti new file mode 100644 index 000000000..d800e4611 --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Prover.IntroPure.fsti @@ -0,0 +1,13 @@ +module Pulse.Checker.Prover.IntroPure + +module T = FStar.Tactics + +open Pulse.Syntax +open Pulse.Typing +open Pulse.Checker.Prover.Base + +val intro_pure (#preamble:_) (pst:prover_state preamble) + (t:term) + (unsolved':list vprop) + (_:squash (pst.unsolved == (tm_pure t)::unsolved')) + : T.Tac (option (pst':prover_state preamble { pst' `pst_extends` pst })) diff --git a/lib/steel/pulse/Pulse.Checker.Prover.IntroPure.fsti.hints b/lib/steel/pulse/Pulse.Checker.Prover.IntroPure.fsti.hints new file mode 100644 index 000000000..ae1dda0b3 --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Prover.IntroPure.fsti.hints @@ -0,0 +1 @@ +[ "D}\r\bG0Ĭ罘l\u000e", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Prover.Match.fst b/lib/steel/pulse/Pulse.Checker.Prover.Match.fst similarity index 81% rename from lib/steel/pulse/Pulse.Prover.Match.fst rename to lib/steel/pulse/Pulse.Checker.Prover.Match.fst index 02d2183b0..fccaa7e8e 100644 --- a/lib/steel/pulse/Pulse.Prover.Match.fst +++ b/lib/steel/pulse/Pulse.Checker.Prover.Match.fst @@ -1,10 +1,12 @@ -module Pulse.Prover.Match +module Pulse.Checker.Prover.Match open Pulse.Syntax open Pulse.Typing +open Pulse.Typing.Combinators open Pulse.Typing.Metatheory open Pulse.Checker.VPropEquiv -open Pulse.Prover.Common +open Pulse.Checker.Prover.Base +open Pulse.Checker.Prover.Util module L = FStar.List.Tot module R = FStar.Reflection.V2 @@ -12,7 +14,8 @@ module TermEq = FStar.Reflection.V2.TermEq module T = FStar.Tactics.V2 module RUtil = Pulse.Reflection.Util -module PS = Pulse.Prover.Substs +module P = Pulse.Syntax.Printer +module PS = Pulse.Checker.Prover.Substs let equational (t:term) : bool = match t.t with @@ -153,41 +156,13 @@ let refl_uvar (t:R.term) (uvs:env) : option var = if contains uvs n then Some n else None | _ -> None -let rec refl_contains_uvar (t:R.term) (uvs:env) (g:env) : T.Tac bool = - let open R in - match inspect_ln t with - | Tv_Var _ -> Some? (refl_uvar t uvs) - | Tv_BVar _ - | Tv_FVar _ - | Tv_UInst _ _ - | Tv_Const _ - | Tv_Type _ -> false - | Tv_App hd (arg, _) -> - let b = refl_contains_uvar hd uvs g in - if b then true - else refl_contains_uvar arg uvs g - | _ -> fail g None "refl_contains_uvar: unsupported reflection term" - let is_uvar (t:term) (uvs:env) : option var = match t.t with | Tm_FStar t -> refl_uvar t uvs | _ -> None -let rec contains_uvar (t:term) (uvs:env) (g:env) : T.Tac bool = - match t.t with - | Tm_Emp -> false - | Tm_Pure p -> contains_uvar p uvs g - | Tm_Star t1 t2 - | Tm_ExistsSL _ {binder_ty=t1} t2 - | Tm_ForallSL _ {binder_ty=t1} t2 -> - let b = contains_uvar t1 uvs g in - if b then true - else contains_uvar t2 uvs g - | Tm_VProp - | Tm_Inames - | Tm_EmpInames -> false - | Tm_FStar t -> refl_contains_uvar t uvs g - | Tm_Unknown -> false +let contains_uvar (t:term) (uvs:env) (g:env) : T.Tac bool = + not (check_disjoint uvs (freevars t)) let is_reveal_uvar (t:term) (uvs:env) : option (universe & term & var) = match is_pure_app t with @@ -217,35 +192,54 @@ let is_reveal (t:term) : bool = module RT = FStar.Reflection.Typing let rec unify (g:env) (uvs:env { disjoint uvs g}) - (#p #p_t:term) (p_typing:tot_typing g p p_t) - (#q #q_t:term) (q_typing:tot_typing (push_env g uvs) q q_t) - (ss:PS.ss_t) + (p q:term) (ss:PS.ss_t) : T.Tac (option (ss':PS.ss_t { ss' `ss_extends` ss /\ PS.dom ss' `Set.subset` freevars q } & RT.equiv (elab_env g) (elab_term p) (elab_term ss'.(q)))) = + let rt_equiv g t1 t2 : RT.equiv g t1 t2 = + assume (t1 == t2); + RT.EQ_Refl _ _ + in + let q0 = q in let q = ss.(q) in assume (freevars q `Set.disjoint` PS.dom ss); + debug_prover g (fun _ -> + Printf.sprintf "prover.match trying %s =?= %s" (P.term_to_string p) (P.term_to_string q)); + if eq_tm p q then begin + debug_prover g (fun _ -> + Printf.sprintf "prover.match trying %s =?= %s, eq_tm" (P.term_to_string p) (P.term_to_string q)); + assume (PS.dom ss `Set.subset` freevars q); Some (| ss, RT.EQ_Refl _ _ |) end else if not (contains_uvar q uvs g) then begin if eligible_for_smt_equality g p q - then let _ = assume (PS.dom ss `Set.subset` freevars q) in + then let _ = + debug_prover g (fun _ -> + Printf.sprintf "prover.match trying %s =?= %s, not eq_tm, q has no uvar, eligible for smt" (P.term_to_string p) (P.term_to_string q)) + in + let _ = assume (PS.dom ss `Set.subset` freevars q) in let v0 = elab_term p in let v1 = elab_term q in match T.check_equiv (elab_env g) v0 v1 with | Some token, _ -> Some (| ss, RT.EQ_Token _ _ _ (FStar.Squash.return_squash token) |) | None, _ -> None - else None + else let _ = + debug_prover g (fun _ -> + Printf.sprintf "prover.match trying %s =?= %s, not eq_tm, q has no uvar, not eligible for smt" (P.term_to_string p) (P.term_to_string q)) + in + None end else match is_reveal_uvar q uvs, is_reveal p with | Some (u, ty, n), false -> + debug_prover g (fun _ -> + Printf.sprintf "prover.match trying %s =?= %s, not eq_tm, q is reveal of uvar, p is not reveal" (P.term_to_string p) (P.term_to_string q)); let w = mk_hide u ty p in assume (Set.mem n (dom uvs)); assume (~ (PS.contains PS.empty n)); @@ -260,12 +254,14 @@ let rec unify (g:env) (uvs:env { disjoint uvs g}) assume (PS.dom ss' `Set.subset` freevars q0); // they are actually equal let b, _ = T.check_equiv (elab_env g) (elab_term (mk_reveal u ty w)) (elab_term p) in if Some? b - then let d : RT.equiv (elab_env g) (elab_term p) (elab_term ss'.(q0)) = magic () in + then let d : RT.equiv (elab_env g) (elab_term p) (elab_term ss'.(q0)) = rt_equiv _ _ _ in Some (| ss', d |) else None | _ -> match is_uvar q uvs with | Some n -> + debug_prover g (fun _ -> + Printf.sprintf "prover.match trying %s =?= %s, not eq_tm, q is uvar" (P.term_to_string p) (P.term_to_string q)); assume (Set.mem n (dom uvs)); assume (~ (PS.contains PS.empty n)); assume (Set.disjoint (freevars p) (dom uvs)); @@ -280,51 +276,45 @@ let rec unify (g:env) (uvs:env { disjoint uvs g}) | _ -> match p.t, q.t with | Tm_Pure p1, Tm_Pure q1 -> - let r = unify g uvs - #p1 #(magic ()) (magic ()) - #q1 #(magic ()) (magic ()) - ss in + debug_prover g (fun _ -> + Printf.sprintf "prover.match trying %s =?= %s, both p and q are pure" (P.term_to_string p) (P.term_to_string q)); + let r = unify g uvs p1 q1 ss in (match r with | Some (| ss', _ |) -> assume (Set.subset (PS.dom ss') (freevars q0)); let ss' : ss':PS.ss_t { ss' `ss_extends` ss /\ PS.dom ss' `Set.subset` freevars q0 } = ss' in - Some (| ss', magic () |) + Some (| ss', rt_equiv _ _ _ |) | None -> None) | _, _ -> match is_pure_app p, is_pure_app q with | Some (head_p, qual_p, arg_p), Some (head_q, qual_q, arg_q) -> + debug_prover g (fun _ -> + Printf.sprintf "prover.match trying %s =?= %s, both are pure app" (P.term_to_string p) (P.term_to_string q)); + if not (qual_p = qual_q) then None else begin - let r = unify g uvs - #head_p #(magic ()) (magic ()) - #head_q #(magic ()) (magic ()) - ss in + let r = unify g uvs head_p head_q ss in match r with | Some (| ss', _ |) -> - let r = unify g uvs - #arg_p #(magic ()) (magic ()) - #arg_q #(magic ()) (magic ()) - ss' in + let r = unify g uvs arg_p arg_q ss' in (match r with | Some (| ss', _|) -> admit (); let ss' : ss':PS.ss_t { ss' `ss_extends` ss /\ PS.dom ss' `Set.subset` freevars q0 } = ss' in - Some (| ss', magic () |) + Some (| ss', rt_equiv _ _ _ |) | _ -> None) | _ -> None end | _, _ -> None -let try_match_pq (g:env) (uvs:env { disjoint uvs g}) - (#p:vprop) (p_typing:vprop_typing g p) - (#q:vprop) (q_typing:vprop_typing (push_env g uvs) q) +let try_match_pq (g:env) (uvs:env { disjoint uvs g}) (p q:vprop) : T.Tac (option (ss:PS.ss_t { PS.dom ss `Set.subset` freevars q } & vprop_equiv g p ss.(q))) = - let r = unify g uvs p_typing q_typing PS.empty in + let r = unify g uvs p q PS.empty in match r with | None -> None | Some (| ss, _ |) -> @@ -343,7 +333,12 @@ let match_step (#preamble:preamble) (pst:prover_state preamble) let q_ss = pst.ss.(q) in assume (freevars q_ss `Set.disjoint` PS.dom pst.ss); -let ropt = try_match_pq pst.pg pst.uvs #p (magic ()) #q_ss (magic ()) in +let ropt = try_match_pq pst.pg pst.uvs p q_ss in + +debug_prover pst.pg (fun _ -> + Printf.sprintf "prover matcher: tried to match %s and %s, result: %s" + (P.term_to_string p) (P.term_to_string q_ss) (if None? ropt then "fail" else "success")); + match ropt with | None -> None | Some (| ss_q, veq |) -> @@ -387,6 +382,7 @@ match ropt with pst.pg ((list_as_vprop remaining_ctxt_new * preamble.frame) * (ss_new.(solved_new))) = coerce_eq k () in + assume (freevars ss_new.(solved_new) `Set.subset` dom pst.pg); let pst' : prover_state preamble = { pst with remaining_ctxt=remaining_ctxt_new; remaining_ctxt_frame_typing=magic (); @@ -395,7 +391,7 @@ match ropt with unsolved=unsolved_new; k; goals_inv=magic (); - solved_inv=magic () } in + solved_inv=() } in assume (ss_new `ss_extends` pst.ss); Some pst' diff --git a/lib/steel/pulse/Pulse.Prover.Match.fst.hints b/lib/steel/pulse/Pulse.Checker.Prover.Match.fst.hints similarity index 54% rename from lib/steel/pulse/Pulse.Prover.Match.fst.hints rename to lib/steel/pulse/Pulse.Checker.Prover.Match.fst.hints index 7a3cbb089..015d6a6c0 100644 --- a/lib/steel/pulse/Pulse.Prover.Match.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.Prover.Match.fst.hints @@ -1,8 +1,8 @@ [ - "?\u0000@J\u0005^", + "\u0013\u000e?w\u001a\u0001\u00040N", [ [ - "Pulse.Prover.Match.type_of_fv", + "Pulse.Checker.Prover.Match.type_of_fv", 1, 2, 1, @@ -26,10 +26,10 @@ "typing_Pulse.Typing.Env.fstar_env" ], 0, - "d15623143d0e750faba733b113bf2c3e" + "0db3cde9c709f5c7d67b25e41dec2239" ], [ - "Pulse.Prover.Match.is_smt_fallback", + "Pulse.Checker.Prover.Match.is_smt_fallback", 1, 2, 1, @@ -40,10 +40,10 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "009cdfa6b96ebcdb65dff1d1d775c638" + "83b7a2381e9d55159c1e92b28ddc849d" ], [ - "Pulse.Prover.Match.eligible_for_smt_equality", + "Pulse.Checker.Prover.Match.eligible_for_smt_equality", 1, 2, 1, @@ -61,35 +61,10 @@ "subterm_ordering_Prims.Cons" ], 0, - "d486bdde7c854369a33d7c72c86f1720" + "d4cc2f70ac7f93da87583ad0c35fa074" ], [ - "Pulse.Prover.Match.contains_uvar", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.Tm_Emp", - "disc_equation_Pulse.Syntax.Base.Tm_EmpInames", - "disc_equation_Pulse.Syntax.Base.Tm_ExistsSL", - "disc_equation_Pulse.Syntax.Base.Tm_FStar", - "disc_equation_Pulse.Syntax.Base.Tm_ForallSL", - "disc_equation_Pulse.Syntax.Base.Tm_Inames", - "disc_equation_Pulse.Syntax.Base.Tm_Pure", - "disc_equation_Pulse.Syntax.Base.Tm_Star", - "disc_equation_Pulse.Syntax.Base.Tm_Unknown", - "disc_equation_Pulse.Syntax.Base.Tm_VProp", - "fuel_guarded_inversion_Pulse.Syntax.Base.term_", - "proj_equation_Pulse.Syntax.Base.Mkterm_t", - "projection_inverse_BoxBool_proj_0", - "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t" - ], - 0, - "fa1cebc09be35f520e2ed7ebc24888e5" - ], - [ - "Pulse.Prover.Match.is_reveal_uvar", + "Pulse.Checker.Prover.Match.is_reveal_uvar", 1, 2, 1, @@ -100,10 +75,10 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "5d0d973f896f14354e01a17b7a3e6626" + "c6651e3e1cdbcf6b9a054459993c9ce5" ], [ - "Pulse.Prover.Match.is_reveal", + "Pulse.Checker.Prover.Match.is_reveal", 1, 2, 1, @@ -114,87 +89,69 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "8c0694a594d5dcfb2e54bec8d907ded3" + "e8aa91b8516e945a3c57a910c07a1366" ], [ - "Pulse.Prover.Match.unify", + "Pulse.Checker.Prover.Match.unify", 1, 2, 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.dom" - ], - 0, - "26ab1e96967a7843a4ff5ed1f39956b0" - ], - [ - "Pulse.Prover.Match.unify", - 2, - 2, - 1, [ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.Reflection.Typing.freevars.fuel_instrumented", - "@fuel_correspondence_Pulse.Elaborate.Pure.elab_term.fuel_instrumented", "@fuel_correspondence_Pulse.Syntax.Naming.freevars.fuel_instrumented", "@query", - "FStar.Reflection.Types_pretyping_e2e1d2bff12a2362a0939a53554a60c7", "Prims_interpretation_Tm_arrow_2eaa01e78f73e9bab5d0955fc1a662da", + "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", "Prims_pretyping_f537159ed795b314b4e58c260361ae86", - "Pulse.Prover.Match_interpretation_Tm_arrow_fc171f3783281d7119bae14e449bb16c", + "Pulse.Checker.Prover.Match_interpretation_Tm_arrow_386f9486048fb0b9ad27cd2d9b418ee9", "Pulse.Syntax.Base_pretyping_0b425ab385a56835d52cd71c18622a32", + "Pulse.Syntax.Base_pretyping_5ef675e67e1523ed8824953186d0262c", + "Pulse.Syntax.Naming_interpretation_Tm_arrow_3599716e433ba3f225adaddbec6624af", "assumption_FStar.Pervasives.Native.option__uu___haseq", "assumption_Pulse.Syntax.Base.qualifier__uu___haseq", - "bool_inversion", "bool_typing", + "bool_inversion", "constructor_distinct_FStar.Pervasives.Native.None", "constructor_distinct_FStar.Pervasives.Native.Some", "constructor_distinct_FStar.Tactics.Result.Success", - "data_elim_FStar.Reflection.V2.Data.Tv_Var", + "constructor_distinct_Pulse.Syntax.Base.Tm_Emp", + "constructor_distinct_Pulse.Syntax.Base.Tm_Pure", "data_elim_FStar.Tactics.Result.Success", "data_elim_Pulse.Syntax.Base.Tm_FStar", + "data_typing_intro_Pulse.Syntax.Base.Tm_VProp@tok", "disc_equation_FStar.Pervasives.Native.None", - "equality_tok_FStar.Reflection.V2.Data.Tv_Unknown@tok", + "disc_equation_FStar.Pervasives.Native.Some", "equality_tok_Pulse.Syntax.Base.Implicit@tok", "equation_FStar.Reflection.Types.typ", + "equation_FStar.Reflection.Typing.fstar_env", "equation_FStar.Reflection.Typing.fstar_top_env", "equation_FStar.Reflection.Typing.namedv_uniq", "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.disjoint", "equation_FStar.Set.subset", "equation_FStar.Tactics.Types.issues", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Prover.Common.op_Array_Access", - "equation_Pulse.Prover.Common.ss_extends", - "equation_Pulse.Prover.Match.is_uvar", - "equation_Pulse.Prover.Match.refl_uvar", - "equation_Pulse.Prover.Substs.contains", - "equation_Pulse.Prover.Substs.dom", - "equation_Pulse.Prover.Substs.sel", + "equation_Prims.nat", + "equation_Pulse.Checker.Prover.Base.op_Array_Access", + "equation_Pulse.Checker.Prover.Base.ss_extends", + "equation_Pulse.Checker.Prover.Match.is_reveal_uvar", + "equation_Pulse.Checker.Prover.Match.is_uvar", + "equation_Pulse.Checker.Prover.Match.refl_uvar", + "equation_Pulse.Checker.Prover.Substs.contains", + "equation_Pulse.Checker.Prover.Substs.dom", + "equation_Pulse.Checker.Prover.Substs.sel", "equation_Pulse.Syntax.Base.host_term", - "equation_Pulse.Syntax.Base.not_tv_unknown", "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Pure.is_pure_app", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.elab_env", + "equation_Pulse.Typing.Env.dom", "equation_with_fuel_FStar.Reflection.Typing.freevars.fuel_instrumented", "equation_with_fuel_Pulse.Syntax.Naming.freevars.fuel_instrumented", "fuel_guarded_inversion_FStar.Pervasives.Native.tuple2", - "fuel_guarded_inversion_FStar.Reflection.V2.Data.namedv_view", "fuel_guarded_inversion_FStar.Tactics.Result.__result", "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "function_token_typing_FStar.Reflection.Types.term", "function_token_typing_FStar.Tactics.Types.issues", "function_token_typing_Prims.__cache_version_number__", "function_token_typing_Prims.int", + "function_token_typing_Pulse.Syntax.Naming.freevars", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", "kinding_FStar.Pervasives.Native.option@tok", "kinding_Prims.dtuple2@tok", @@ -209,10 +166,14 @@ "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", "lemma_FStar.Set.mem_intersect", "lemma_FStar.Set.mem_singleton", "lemma_FStar.Set.mem_subset", "lemma_FStar.Set.subset_mem", - "lemma_Pulse.Prover.Substs.push_as_map", "primitive_Prims.op_AmpAmp", - "primitive_Prims.op_BarBar", "primitive_Prims.op_Equality", + "lemma_Pulse.Checker.Prover.Substs.push_as_map", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "primitive_Prims.op_Equality", + "proj_equation_FStar.Pervasives.Native.Mktuple2__1", + "proj_equation_FStar.Pervasives.Native.Mktuple2__2", "proj_equation_FStar.Reflection.V2.Data.Mknamedv_view_uniq", "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", "projection_inverse_FStar.Pervasives.Native.Some_v", "projection_inverse_FStar.Tactics.Result.Success_a", @@ -220,66 +181,43 @@ "projection_inverse_FStar.Tactics.Result.Success_v", "refinement_interpretation_Tm_refine_23dfcaa69174c552645c49ff9c2a2ea7", "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", - "refinement_interpretation_Tm_refine_2ec6ce5a1e7a7fbf7c3d0a16c7b15719", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_b57ff77ab369c4726d7787717ccd613f", + "refinement_interpretation_Tm_refine_b9943bf670d3eeece9d9f2e3e534ed66", "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", "refinement_interpretation_Tm_refine_f0ac051651fa0e095f1b2c1241fd6a3f", - "refinement_kinding_Tm_refine_30add953e08f1797eb81755dc09876ed", + "refinement_kinding_Tm_refine_551025fd7e16c020ee6a2323b5c67156", + "string_typing", "typing_FStar.Pervasives.Native.__proj__Mktuple2__item___1", - "typing_FStar.Reflection.V2.Builtins.inspect_ln", - "typing_FStar.Reflection.V2.Builtins.inspect_namedv", + "typing_FStar.Pervasives.Native.uu___is_None", + "typing_FStar.Reflection.Typing.lookup_bvar", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", "typing_FStar.Set.intersect", "typing_FStar.Set.mem", "typing_FStar.Tactics.Types.equiv_token", + "typing_Pulse.Checker.Prover.Substs.as_map", + "typing_Pulse.Checker.Prover.Substs.dom", + "typing_Pulse.Checker.Prover.Substs.ss_term", "typing_Pulse.Elaborate.Pure.elab_term", - "typing_Pulse.Prover.Common.op_Array_Access", - "typing_Pulse.Prover.Substs.as_map", - "typing_Pulse.Prover.Substs.dom", "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t", "typing_Pulse.Syntax.Base.eq_tm", "typing_Pulse.Syntax.Naming.freevars", "typing_Pulse.Typing.Env.dom", "typing_Pulse.Typing.Env.fstar_env", "typing_Pulse.Typing.elab_env", "typing_Pulse.Typing.mk_hide", - "typing_Tm_abs_1d917dddcd478daf1e77de0ed8b15286", + "typing_Tm_abs_d4578300675035c8dfa0ca883c7824f7", "typing_tok_Pulse.Syntax.Base.Implicit@tok" ], 0, - "b9698ef51f7c39364b5da3df145ae804" + "ef45f256eda308d0d45d18225aa6b88c" ], [ - "Pulse.Prover.Match.try_match_pq", + "Pulse.Checker.Prover.Match.try_match_pq", 1, 2, 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.dom" - ], - 0, - "502493415eec73ab98722f483bb9e3f0" - ], - [ - "Pulse.Prover.Match.try_match_pq", - 2, - 2, - 1, [ "@MaxIFuel_assumption", "@query", "Prims_interpretation_Tm_arrow_2eaa01e78f73e9bab5d0955fc1a662da", - "Pulse.Prover.Match_interpretation_Tm_arrow_15e5de0cf5991cc30de31d27af6161b4", + "Pulse.Checker.Prover.Match_interpretation_Tm_arrow_f8e5d6986230cf15cc4497dcebb07f0c", "data_elim_FStar.Tactics.Result.Success", "equation_Prims.eqtype", "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", @@ -289,14 +227,14 @@ "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "kinding_Prims.dtuple2@tok", "lemma_FStar.Pervasives.invertOption", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_kinding_Tm_refine_88643782c463aed2f51544132efeacda", - "typing_Tm_abs_967bbd3f80a86c1f987a4200d7e2f5ba" + "refinement_kinding_Tm_refine_6031de2966bad0fdd0b20cc27b0fba02", + "typing_Tm_abs_2e4c5318cfbe73519900966c4ffb1cbf" ], 0, - "83fb3fa4160da2a6518f26f84e207d09" + "13cc8ceb815a94996c9bf9e6b1817741" ], [ - "Pulse.Prover.Match.coerce_eq", + "Pulse.Checker.Prover.Match.coerce_eq", 1, 2, 1, @@ -305,33 +243,41 @@ "refinement_interpretation_Tm_refine_0dee8cb03258a67c2f7ec66427696212" ], 0, - "6de6ffed3d70076cb84ed017ac9bd503" + "96775ea176df338f40926aad6ab66451" ], [ - "Pulse.Prover.Match.match_step", + "Pulse.Checker.Prover.Match.match_step", 1, 2, 1, [ "@MaxIFuel_assumption", "@query", "Prims_interpretation_Tm_arrow_2eaa01e78f73e9bab5d0955fc1a662da", - "Pulse.Prover.Match_interpretation_Tm_arrow_1e526726e5536d129dfbc63451e72ee3", - "bool_inversion", "data_elim_FStar.Tactics.Result.Success", - "data_elim_Pulse.Prover.Common.Mkprover_state", + "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "Pulse.Checker.Prover.Match_interpretation_Tm_arrow_5ca359b2c1883b0822277882dca4a065", + "bool_inversion", "constructor_distinct_FStar.Tactics.Result.Failed", + "constructor_distinct_FStar.Tactics.Result.Success", + "data_elim_FStar.Tactics.Result.Success", + "data_elim_Pulse.Checker.Prover.Base.Mkprover_state", + "disc_equation_FStar.Pervasives.Native.None", + "equation_FStar.Reflection.Typing.fstar_top_env", "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.disjoint", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Prover.Common.pst_extends", - "equation_Pulse.Prover.Substs.dom", "equation_Pulse.Syntax.Base.typ", - "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", + "equation_Prims.nat", + "equation_Pulse.Checker.Prover.Base.pst_extends", + "equation_Pulse.Checker.Prover.Substs.dom", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Syntax.Base.vprop", "equation_Pulse.Typing.Env.disjoint", "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.env_extends", "equation_Pulse.Typing.Env.extends_with", "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Prover.Common.prover_state", + "fuel_guarded_inversion_Pulse.Checker.Prover.Base.prover_state", "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "function_token_typing_Prims.__cache_version_number__", "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", "kinding_Prims.dtuple2@tok", "kinding_Pulse.Syntax.Base.term@tok", "lemma_FStar.Pervasives.invertOption", "lemma_FStar.Set.lemma_equal_elim", @@ -340,40 +286,44 @@ "lemma_Pulse.Typing.Env.env_extends_refl", "lemma_Pulse.Typing.Env.push_env_as_map", "primitive_Prims.op_AmpAmp", - "proj_equation_Pulse.Prover.Common.Mkpreamble_g0", - "proj_equation_Pulse.Prover.Common.Mkprover_state_pg", - "proj_equation_Pulse.Prover.Common.Mkprover_state_remaining_ctxt", - "proj_equation_Pulse.Prover.Common.Mkprover_state_solved", - "proj_equation_Pulse.Prover.Common.Mkprover_state_ss", - "proj_equation_Pulse.Prover.Common.Mkprover_state_uvs", + "proj_equation_Pulse.Checker.Prover.Base.Mkpreamble_g0", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_remaining_ctxt", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_solved", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_ss", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_uvs", "projection_inverse_BoxBool_proj_0", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_pg", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_ss", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_uvs", + "projection_inverse_FStar.Tactics.Result.Failed_a", + "projection_inverse_FStar.Tactics.Result.Failed_exn", + "projection_inverse_FStar.Tactics.Result.Failed_ps", + "projection_inverse_FStar.Tactics.Result.Success_a", + "projection_inverse_FStar.Tactics.Result.Success_ps", + "projection_inverse_FStar.Tactics.Result.Success_v", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_ss", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_uvs", + "refinement_interpretation_Tm_refine_1fa00345f78babcf848d9c580a806c33", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_3201114dc2ece82edbaf3a0633f82db7", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_4586a853eaf0aaf3e250d623128f7077", - "refinement_interpretation_Tm_refine_4bf410f4c8f25a44501853a77c032408", - "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", - "refinement_interpretation_Tm_refine_d75d8936e6500ecc775a054d1682296c", "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", - "refinement_interpretation_Tm_refine_df4afb6e8d9a6d2dbedb303f8ae9ad1a", - "refinement_interpretation_Tm_refine_ffb53b91ee7afecaaf420155b35aadbf", - "refinement_kinding_Tm_refine_df4afb6e8d9a6d2dbedb303f8ae9ad1a", - "typing_FStar.Map.concat", "typing_FStar.Map.domain", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Prover.Common.__proj__Mkpreamble__item__g0", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__ss", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__uvs", - "typing_Pulse.Prover.Common.op_Array_Access", - "typing_Pulse.Prover.Substs.dom", + "refinement_interpretation_Tm_refine_ea8cba0cc1bf67eb6fbf2e54cc4cf61e", + "refinement_kinding_Tm_refine_ea8cba0cc1bf67eb6fbf2e54cc4cf61e", + "string_typing", "typing_FStar.Map.concat", + "typing_FStar.Map.domain", "typing_FStar.Reflection.V2.Data.var", + "typing_FStar.Set.empty", "typing_FStar.Set.intersect", + "typing_FStar.Set.mem", + "typing_Pulse.Checker.Prover.Base.__proj__Mkpreamble__item__g0", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__ss", + "typing_Pulse.Checker.Prover.Base.op_Array_Access", + "typing_Pulse.Checker.Prover.Substs.dom", "typing_Pulse.Syntax.Naming.freevars", "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", - "typing_Pulse.Typing.Env.push_env", - "typing_Tm_abs_8f95b9ef10166ded8e3694ccbfbbee17" + "typing_Pulse.Typing.Env.fstar_env", + "typing_Tm_abs_6466be11a12fa395a919e461bd2ab905" ], 0, - "1b5f4498efbdcabad900f6c097c99cb9" + "922fb53d06a83b5e03b233960e0216d5" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Prover.Match.fsti b/lib/steel/pulse/Pulse.Checker.Prover.Match.fsti similarity index 80% rename from lib/steel/pulse/Pulse.Prover.Match.fsti rename to lib/steel/pulse/Pulse.Checker.Prover.Match.fsti index 1969f0881..af54379f5 100644 --- a/lib/steel/pulse/Pulse.Prover.Match.fsti +++ b/lib/steel/pulse/Pulse.Checker.Prover.Match.fsti @@ -1,10 +1,12 @@ -module Pulse.Prover.Match +module Pulse.Checker.Prover.Match module T = FStar.Tactics open Pulse.Syntax open Pulse.Typing -open Pulse.Prover.Common + +open Pulse.Checker.Base +open Pulse.Checker.Prover.Base val match_step (#preamble:preamble) (pst:prover_state preamble) (p:vprop) (remaining_ctxt':list vprop) diff --git a/lib/steel/pulse/Pulse.Checker.Prover.Match.fsti.hints b/lib/steel/pulse/Pulse.Checker.Prover.Match.fsti.hints new file mode 100644 index 000000000..9030ada31 --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Prover.Match.fsti.hints @@ -0,0 +1 @@ +[ "9t-nW27ڍ", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Prover.Substs.fst b/lib/steel/pulse/Pulse.Checker.Prover.Substs.fst similarity index 82% rename from lib/steel/pulse/Pulse.Prover.Substs.fst rename to lib/steel/pulse/Pulse.Checker.Prover.Substs.fst index 0b7becdb6..8769c88e3 100644 --- a/lib/steel/pulse/Pulse.Prover.Substs.fst +++ b/lib/steel/pulse/Pulse.Checker.Prover.Substs.fst @@ -1,15 +1,14 @@ -module Pulse.Prover.Substs +module Pulse.Checker.Prover.Substs open FStar.List.Tot open Pulse.Syntax open Pulse.Typing.Env open Pulse.Typing -open Pulse.Typing.Metatheory module L = FStar.List.Tot - module Env = Pulse.Typing.Env +module Metatheory = Pulse.Typing.Metatheory let coerce_eq (#a #b:Type) (x:a) (_:squash (a == b)) : y:b {y == x} = x @@ -78,6 +77,10 @@ let rec push_ss (ss1:ss_t) (ss2:ss_t { Set.disjoint (dom ss1) (dom ss2) }) | x::tl -> push_ss (push ss1 x (Map.sel ss2.m x)) (tail ss2) +let check_disjoint ss1 ss2 = + admit (); + not (L.existsb (fun v1 -> L.mem v1 ss2.l) ss1.l) + #push-options "--warn_error -271" let push_as_map (ss1 ss2:ss_t) : Lemma (requires Set.disjoint (dom ss1) (dom ss2)) @@ -239,29 +242,55 @@ let rec is_permutation (nts:nt_substs) (ss:ss_t) : Type0 = | _ -> False let rec ss_to_nt_substs (g:env) (uvs:env) (ss:ss_t) - : T.Tac (option (nts:nt_substs { well_typed_nt_substs g uvs nts /\ - is_permutation nts ss })) = - + : T.Tac (either (nts:nt_substs { well_typed_nt_substs g uvs nts /\ + is_permutation nts ss }) + string) = + + let g = push_context g "ss_to_nt_substs" (range_of_env g) in match bindings uvs with | [] -> (match ss.l with - | [] -> Some [] - | _ -> None) + | [] -> Inl [] + | x::_ -> + Inr (Printf.sprintf "extra uvars in the substitutions collected by the prover, e.g._#%d" x)) | _ -> let x, ty, rest_uvs = remove_binding uvs in if Map.contains ss.m x then let t = Map.sel ss.m x in - let d : tot_typing g t ty = magic () in + // + // TODO: WE SHOULD FIX IT SOON + // SOME OF THESE WITNESSED MAY BE GHOST + // WE NEED TO SUPPORT GHOST PROPERLY + // + let d : tot_typing g t ty = admit () in + // let d = Pulse.Checker.Pure.core_check_term_with_expected_type g t ty in + // E d in let _ = FStar.Squash.return_squash d in let nts_opt = ss_to_nt_substs g (subst_env rest_uvs [ NT x t ]) {l=remove_l ss.l x; m=remove_map ss.m x} in match nts_opt with - | None -> None - | Some nts -> + | Inr e -> Inr e + | Inl nts -> let nts : nts:nt_substs { well_typed_nt_substs g uvs nts } = (NT x t)::nts in - Some nts - else None + Inl nts + else Inr (Printf.sprintf "prover could not prove uvar _#%d" x) + +let rec well_typed_nt_substs_prefix (g:env) (uvs:env) (nts:nt_substs) + (uvs1:env) + : Pure nt_substs + (requires well_typed_nt_substs g uvs nts /\ env_extends uvs uvs1) + (ensures fun nts1 -> well_typed_nt_substs g uvs1 nts1) + (decreases L.length nts) = + match bindings uvs1, bindings uvs with + | [], _ -> [] + | _::_, _::_ -> + let x1, ty1, rest_uvs1 = remove_binding uvs1 in + let x, ty, rest_uvs = remove_binding uvs in + assume (x1 == x /\ ty1 == ty); + let (NT y e)::nts_rest = nts in + assume (env_extends (subst_env rest_uvs [ NT y e ]) (subst_env rest_uvs1 [ NT y e ])); + (NT y e)::(well_typed_nt_substs_prefix g (subst_env rest_uvs [ NT y e ]) nts_rest (subst_env rest_uvs1 [ NT y e ])) let ss_nt_subst (g:env) (uvs:env) (ss:ss_t) (nts:nt_substs) : Lemma (requires disjoint uvs g /\ well_typed_nt_substs g uvs nts /\ is_permutation nts ss) @@ -295,7 +324,7 @@ let rec st_typing_nt_substs : st_typing (push_env g (subst_env (push_env uvs_rest g') [ NT x e ])) (subst_st_term t [ NT x e ]) (subst_comp c [ NT x e ]) - = st_typing_subst g x ty (push_env uvs_rest g') e_typing t_typing in + = Metatheory.st_typing_subst g x ty (push_env uvs_rest g') e_typing t_typing in assume (subst_env (push_env uvs_rest g') [ NT x e ] == push_env (subst_env uvs_rest [ NT x e ]) (subst_env g' [ NT x e ])); @@ -305,6 +334,23 @@ let rec st_typing_nt_substs (subst_env g' [ NT x e ]) t_typing nts_rest + +// let st_typing_subst (g:env) (uvs:env { disjoint uvs g }) (t:st_term) (c:comp_st) +// (d:st_typing (push_env g uvs) t c) +// (ss:ss_t) + +// : T.Tac (option (st_typing g (ss_st_term t ss) (ss_comp c ss))) = + +// let nts_opt = ss_to_nt_substs g uvs ss in +// match nts_opt with +// | Inr e -> None +// | Some nts -> +// let g' = mk_env (fstar_env g) in +// assert (equal (push_env uvs g') uvs); +// let d = st_typing_nt_substs g uvs g' d nts in +// assume (equal (push_env g (nt_subst_env g' nts)) g); +// Some d + let st_typing_nt_substs_derived (g:env) (uvs:env { disjoint uvs g }) (#t:st_term) (#c:comp_st) (t_typing:st_typing (push_env g uvs) t c) diff --git a/lib/steel/pulse/Pulse.Prover.Substs.fst.hints b/lib/steel/pulse/Pulse.Checker.Prover.Substs.fst.hints similarity index 63% rename from lib/steel/pulse/Pulse.Prover.Substs.fst.hints rename to lib/steel/pulse/Pulse.Checker.Prover.Substs.fst.hints index dce9ffa74..cdfc86d67 100644 --- a/lib/steel/pulse/Pulse.Prover.Substs.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.Prover.Substs.fst.hints @@ -1,8 +1,8 @@ [ - "G(*l\b1n@\u0003", + "j\u001cwIiҟ\u001d\u0016&", [ [ - "Pulse.Prover.Substs.coerce_eq", + "Pulse.Checker.Prover.Substs.coerce_eq", 1, 2, 1, @@ -11,10 +11,10 @@ "refinement_interpretation_Tm_refine_0dee8cb03258a67c2f7ec66427696212" ], 0, - "157caf291598d88c939203ac0a78ba07" + "549f19b23fce4f76947e815c15575c26" ], [ - "Pulse.Prover.Substs.no_repeats", + "Pulse.Checker.Prover.Substs.no_repeats", 1, 2, 1, @@ -27,10 +27,10 @@ "projection_inverse_BoxBool_proj_0", "subterm_ordering_Prims.Cons" ], 0, - "b096652f42ddd6316a91dbf221186d98" + "3f6671e2536dcc9062a580071c84bd5a" ], [ - "Pulse.Prover.Substs.ss_map", + "Pulse.Checker.Prover.Substs.ss_map", 1, 2, 1, @@ -42,10 +42,10 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "e6795f10f841caf1a092357c59ffb6d6" + "7706158f55d99b3fcbc6df9dce6e3539" ], [ - "Pulse.Prover.Substs.remove_map", + "Pulse.Checker.Prover.Substs.remove_map", 1, 2, 1, @@ -57,28 +57,28 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "e3de2bec811477d787fcdfbc58dd418b" + "b1971635f4b4d4cd71c9a8d2e6dad62f" ], [ - "Pulse.Prover.Substs.is_dom", + "Pulse.Checker.Prover.Substs.is_dom", 1, 2, 1, [ "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_Pulse.Prover.Substs.no_repeats.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.no_repeats.fuel_instrumented", - "@query", "binder_x_29cc5f3e1a79215b26718796d566f6c2_0", - "binder_x_3034404192cb00ec23c00e80ff269ddd_1", "bool_inversion", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", + "@query", "binder_x_08c6b5790dc94a2ea8fd33b0da59bb5e_1", + "binder_x_c47c35481e74724db697dc5dccfb1d57_0", "bool_inversion", "constructor_distinct_Prims.Cons", "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", "equation_Prims.nat", - "equation_Pulse.Prover.Substs.remove_map", - "equation_Pulse.Prover.Substs.ss_dom", - "equation_Pulse.Prover.Substs.ss_map", + "equation_Pulse.Checker.Prover.Substs.remove_map", + "equation_Pulse.Checker.Prover.Substs.ss_dom", + "equation_Pulse.Checker.Prover.Substs.ss_map", "equation_Pulse.Syntax.Base.tm_unknown", "equation_Pulse.Syntax.Base.var", - "equation_with_fuel_Pulse.Prover.Substs.no_repeats.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", "fuel_guarded_inversion_Prims.list", "function_token_typing_Prims.int", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", @@ -93,21 +93,21 @@ "projection_inverse_Prims.Cons_a", "projection_inverse_Prims.Cons_hd", "projection_inverse_Prims.Cons_tl", - "refinement_interpretation_Tm_refine_0fe8979aecfdc367377f2f7bffef3582", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_6c78cd0d452f265d33d4a3b51c7e958e", "refinement_interpretation_Tm_refine_743a26899815015983075ea3d48d9ce0", "subterm_ordering_Prims.Cons", "typing_FStar.Map.contains", "typing_FStar.Map.upd", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.complement", "typing_FStar.Set.singleton", - "typing_Pulse.Prover.Substs.remove_map", + "typing_Pulse.Checker.Prover.Substs.remove_map", "typing_Pulse.Syntax.Base.tm_unknown" ], 0, - "ba4e9ff0d9cf7ed627c4f81d179d2ade" + "84370069cab93e9912d242054efb16bd" ], [ - "Pulse.Prover.Substs.is_dom_mem", + "Pulse.Checker.Prover.Substs.is_dom_mem", 1, 2, 1, @@ -119,34 +119,35 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "f17007f7179f78c394ffe0f40651f169" + "7cf515b2c073335a171b5466d3624a99" ], [ - "Pulse.Prover.Substs.is_dom_mem", + "Pulse.Checker.Prover.Substs.is_dom_mem", 2, 2, 1, [ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.memP.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.no_repeats.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.memP.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.no_repeats.fuel_instrumented", - "@query", "b2t_def", "binder_x_29cc5f3e1a79215b26718796d566f6c2_0", - "binder_x_3034404192cb00ec23c00e80ff269ddd_1", "bool_inversion", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", + "@query", "b2t_def", "binder_x_08c6b5790dc94a2ea8fd33b0da59bb5e_1", + "binder_x_c47c35481e74724db697dc5dccfb1d57_0", "bool_inversion", "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", "eq2-interp", "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Prover.Substs.remove_map", - "equation_Pulse.Prover.Substs.ss_dom", - "equation_Pulse.Prover.Substs.ss_map", + "equation_Prims.nat", + "equation_Pulse.Checker.Prover.Substs.remove_map", + "equation_Pulse.Checker.Prover.Substs.ss_dom", + "equation_Pulse.Checker.Prover.Substs.ss_map", "equation_Pulse.Syntax.Base.tm_unknown", "equation_Pulse.Syntax.Base.var", "equation_with_fuel_FStar.List.Tot.Base.memP.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.no_repeats.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", "false_interp", "fuel_guarded_inversion_Prims.list", "function_token_typing_Prims.int", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", @@ -164,9 +165,9 @@ "projection_inverse_Prims.Cons_a", "projection_inverse_Prims.Cons_hd", "projection_inverse_Prims.Cons_tl", "projection_inverse_Prims.Nil_a", - "refinement_interpretation_Tm_refine_0fe8979aecfdc367377f2f7bffef3582", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_6c78cd0d452f265d33d4a3b51c7e958e", "refinement_interpretation_Tm_refine_743a26899815015983075ea3d48d9ce0", "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "subterm_ordering_Prims.Cons", "typing_FStar.Map.contains", @@ -176,10 +177,10 @@ "typing_FStar.Set.union", "typing_Pulse.Syntax.Base.tm_unknown" ], 0, - "7da2383d2073d281de584c227979936f" + "54ef09b0d2778e052653e3f350f271a0" ], [ - "Pulse.Prover.Substs.as_map", + "Pulse.Checker.Prover.Substs.as_map", 1, 2, 1, @@ -191,10 +192,10 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "cd35f55c6011e9d9035d1236f3aac328" + "1da601ce9e17399fc87719d57087ec6c" ], [ - "Pulse.Prover.Substs.dom", + "Pulse.Checker.Prover.Substs.dom", 1, 2, 1, @@ -206,10 +207,10 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "c00c9879a98c5080fbf6965e1638a3b7" + "a4284e0d5b3128253fc9985c852c22a3" ], [ - "Pulse.Prover.Substs.contains", + "Pulse.Checker.Prover.Substs.contains", 1, 2, 1, @@ -221,10 +222,10 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "63d9372e3bd72ec56a22681aff33c274" + "cb8a8c8871ed9d1108b3c65c95f2643a" ], [ - "Pulse.Prover.Substs.sel", + "Pulse.Checker.Prover.Substs.sel", 1, 2, 1, @@ -236,25 +237,25 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "1ff6b8f0ab859b6535e222c6465ff064" + "474a41ca349ad98ac2e4f26d566ed219" ], [ - "Pulse.Prover.Substs.empty", + "Pulse.Checker.Prover.Substs.empty", 1, 2, 1, [ "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.no_repeats.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", "@query", "bool_inversion", "constructor_distinct_Prims.Nil", "data_typing_intro_Prims.Nil@tok", "equation_FStar.Map.const_on", "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Prover.Substs.ss_map", + "equation_Prims.nat", "equation_Pulse.Checker.Prover.Substs.ss_map", "equation_Pulse.Syntax.Base.tm_unknown", "equation_Pulse.Syntax.Base.var", - "equation_with_fuel_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.no_repeats.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", "function_token_typing_Prims.int", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "kinding_Pulse.Syntax.Base.term@tok", @@ -272,10 +273,10 @@ "typing_Pulse.Syntax.Base.tm_unknown" ], 0, - "95226542fd5b7b8a39db172d95e56e3a" + "7f2e9fc314f7caaae3ddac36f06936c0" ], [ - "Pulse.Prover.Substs.is_dom_push", + "Pulse.Checker.Prover.Substs.is_dom_push", 1, 2, 1, @@ -287,31 +288,32 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "6853eed724a934073cdd4a0d7ddc77e4" + "df09b1c2c305df25476037c1a0759234" ], [ - "Pulse.Prover.Substs.is_dom_push", + "Pulse.Checker.Prover.Substs.is_dom_push", 2, 2, 1, [ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.memP.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.no_repeats.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.memP.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.no_repeats.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", "@query", "b2t_def", "bool_inversion", "constructor_distinct_Prims.Cons", "data_typing_intro_Prims.Cons@tok", "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Prover.Substs.remove_map", - "equation_Pulse.Prover.Substs.ss_dom", - "equation_Pulse.Prover.Substs.ss_map", + "equation_Prims.nat", + "equation_Pulse.Checker.Prover.Substs.remove_map", + "equation_Pulse.Checker.Prover.Substs.ss_dom", + "equation_Pulse.Checker.Prover.Substs.ss_map", "equation_Pulse.Syntax.Base.var", - "equation_with_fuel_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.no_repeats.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", "fuel_guarded_inversion_Prims.list", "fuel_guarded_inversion_Pulse.Syntax.Base.term", "function_token_typing_Prims.int", @@ -326,19 +328,20 @@ "lemma_FStar.Map.lemma_equal_intro", "lemma_FStar.Set.lemma_equal_elim", "lemma_FStar.Set.mem_complement", "lemma_FStar.Set.mem_empty", "lemma_FStar.Set.mem_singleton", - "lemma_FStar.Set.mem_union", "lemma_Pulse.Prover.Substs.is_dom_mem", + "lemma_FStar.Set.mem_union", + "lemma_Pulse.Checker.Prover.Substs.is_dom_mem", "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", "primitive_Prims.op_Equality", "primitive_Prims.op_Negation", "projection_inverse_BoxBool_proj_0", "projection_inverse_Prims.Cons_a", "projection_inverse_Prims.Cons_hd", "projection_inverse_Prims.Cons_tl", - "refinement_interpretation_Tm_refine_0fe8979aecfdc367377f2f7bffef3582", - "refinement_interpretation_Tm_refine_1a8c2398238a88ffd0bf6c5c12a68a91", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_6c78cd0d452f265d33d4a3b51c7e958e", "refinement_interpretation_Tm_refine_743a26899815015983075ea3d48d9ce0", "refinement_interpretation_Tm_refine_ad9093cfb104aeec6cfb11019087537f", + "refinement_interpretation_Tm_refine_be318f37ef272b844b07ed82bd9fff42", "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "typing_FStar.Map.contains", "typing_FStar.Map.domain", "typing_FStar.Map.upd", "typing_FStar.Reflection.V2.Data.var", @@ -347,114 +350,114 @@ "typing_Pulse.Syntax.Base.tm_unknown" ], 0, - "02348247ec167925f7b69a8093b5cbd6" + "8089fbedacf7d2002ecdfc8658bf4be7" ], [ - "Pulse.Prover.Substs.push", + "Pulse.Checker.Prover.Substs.push", 1, 2, 1, [ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.memP.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.no_repeats.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.memP.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.no_repeats.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", "@query", "constructor_distinct_Prims.Cons", - "data_elim_Pulse.Prover.Substs.Mkss_t", + "data_elim_Pulse.Checker.Prover.Substs.Mkss_t", "data_typing_intro_Prims.Cons@tok", "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Prover.Substs.as_map", - "equation_Pulse.Prover.Substs.contains", - "equation_Pulse.Prover.Substs.ss_dom", - "equation_Pulse.Prover.Substs.ss_map", + "equation_Prims.nat", "equation_Pulse.Checker.Prover.Substs.as_map", + "equation_Pulse.Checker.Prover.Substs.contains", + "equation_Pulse.Checker.Prover.Substs.ss_dom", + "equation_Pulse.Checker.Prover.Substs.ss_map", "equation_Pulse.Syntax.Base.var", - "equation_with_fuel_Pulse.Prover.Substs.no_repeats.fuel_instrumented", - "fuel_guarded_inversion_Pulse.Prover.Substs.ss_t", + "equation_with_fuel_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", + "fuel_guarded_inversion_Pulse.Checker.Prover.Substs.ss_t", "fuel_guarded_inversion_Pulse.Syntax.Base.term", "function_token_typing_Prims.int", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", "l_and-interp", "l_not-interp", "lemma_FStar.Map.lemma_InDomUpd1", "lemma_FStar.Map.lemma_SelUpd2", - "lemma_Pulse.Prover.Substs.is_dom_mem", "primitive_Prims.op_BarBar", - "primitive_Prims.op_Equality", - "proj_equation_Pulse.Prover.Substs.Mkss_t_l", - "proj_equation_Pulse.Prover.Substs.Mkss_t_m", + "lemma_Pulse.Checker.Prover.Substs.is_dom_mem", + "primitive_Prims.op_BarBar", "primitive_Prims.op_Equality", + "proj_equation_Pulse.Checker.Prover.Substs.Mkss_t_l", + "proj_equation_Pulse.Checker.Prover.Substs.Mkss_t_m", "projection_inverse_BoxBool_proj_0", "projection_inverse_Prims.Cons_a", "projection_inverse_Prims.Cons_hd", "projection_inverse_Prims.Cons_tl", - "refinement_interpretation_Tm_refine_0fe8979aecfdc367377f2f7bffef3582", - "refinement_interpretation_Tm_refine_1a8c2398238a88ffd0bf6c5c12a68a91", + "refinement_interpretation_Tm_refine_285cecbf48216c6c6f9c751ebdbc36da", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_6c78cd0d452f265d33d4a3b51c7e958e", "refinement_interpretation_Tm_refine_743a26899815015983075ea3d48d9ce0", - "refinement_interpretation_Tm_refine_98d8fa05ba01939c9bc671f85dca5dbd", - "refinement_interpretation_Tm_refine_e1f5d7542df60d25c1cc7704f2707a6f", + "refinement_interpretation_Tm_refine_9020b16f20ea156a2a91986b599db7ea", + "refinement_interpretation_Tm_refine_be318f37ef272b844b07ed82bd9fff42", "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "typing_FStar.Reflection.V2.Data.var", - "typing_Pulse.Prover.Substs.__proj__Mkss_t__item__l", - "typing_Pulse.Prover.Substs.__proj__Mkss_t__item__m", - "typing_Pulse.Prover.Substs.as_map" + "typing_Pulse.Checker.Prover.Substs.__proj__Mkss_t__item__l", + "typing_Pulse.Checker.Prover.Substs.__proj__Mkss_t__item__m", + "typing_Pulse.Checker.Prover.Substs.as_map" ], 0, - "3343adfeebd18e9b0e0e2327180bf977" + "d0085ef9e7ddf32b259046d93253771c" ], [ - "Pulse.Prover.Substs.tail", + "Pulse.Checker.Prover.Substs.tail", 1, 2, 1, [ "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.no_repeats.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.no_repeats.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", "@query", "data_elim_Prims.Cons", - "data_elim_Pulse.Prover.Substs.Mkss_t", "disc_equation_Prims.Cons", - "equation_FStar.List.Tot.Base.hd", + "data_elim_Pulse.Checker.Prover.Substs.Mkss_t", + "disc_equation_Prims.Cons", "equation_FStar.List.Tot.Base.hd", "equation_FStar.List.Tot.Base.tail", "equation_FStar.List.Tot.Base.tl", "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Prover.Substs.remove_map", - "equation_Pulse.Prover.Substs.ss_dom", - "equation_Pulse.Prover.Substs.ss_map", + "equation_Pulse.Checker.Prover.Substs.remove_map", + "equation_Pulse.Checker.Prover.Substs.ss_dom", + "equation_Pulse.Checker.Prover.Substs.ss_map", "equation_Pulse.Syntax.Base.tm_unknown", "equation_Pulse.Syntax.Base.var", - "equation_with_fuel_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.no_repeats.fuel_instrumented", - "fuel_guarded_inversion_Pulse.Prover.Substs.ss_t", "int_inversion", - "kinding_Pulse.Syntax.Base.term@tok", "l_and-interp", - "lemma_FStar.Map.lemma_InDomRestrict", + "equation_with_fuel_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", + "fuel_guarded_inversion_Pulse.Checker.Prover.Substs.ss_t", + "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", + "l_and-interp", "lemma_FStar.Map.lemma_InDomRestrict", "lemma_FStar.Map.lemma_InDomUpd2", "lemma_FStar.Map.lemma_SelRestrict", "lemma_FStar.Map.lemma_SelUpd1", "lemma_FStar.Map.lemma_SelUpd2", "lemma_FStar.Set.mem_complement", "lemma_FStar.Set.mem_singleton", "primitive_Prims.op_AmpAmp", "primitive_Prims.op_Equality", "primitive_Prims.op_Negation", - "proj_equation_Pulse.Prover.Substs.Mkss_t_l", - "proj_equation_Pulse.Prover.Substs.Mkss_t_m", + "proj_equation_Pulse.Checker.Prover.Substs.Mkss_t_l", + "proj_equation_Pulse.Checker.Prover.Substs.Mkss_t_m", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_0fe8979aecfdc367377f2f7bffef3582", - "refinement_interpretation_Tm_refine_1a8c2398238a88ffd0bf6c5c12a68a91", + "refinement_interpretation_Tm_refine_285cecbf48216c6c6f9c751ebdbc36da", "refinement_interpretation_Tm_refine_4d075835ea0a98f9c62e04c41c4bb367", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_6c78cd0d452f265d33d4a3b51c7e958e", "refinement_interpretation_Tm_refine_743a26899815015983075ea3d48d9ce0", - "refinement_interpretation_Tm_refine_e1f5d7542df60d25c1cc7704f2707a6f", - "refinement_interpretation_Tm_refine_fb9b4e441f6381d6305909bb25cce399", + "refinement_interpretation_Tm_refine_be318f37ef272b844b07ed82bd9fff42", + "refinement_interpretation_Tm_refine_e973c52e88b0d0c121f35e3ce8fd517a", "typing_FStar.Map.upd", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.complement", "typing_FStar.Set.singleton", - "typing_Pulse.Prover.Substs.__proj__Mkss_t__item__l", - "typing_Pulse.Prover.Substs.__proj__Mkss_t__item__m", + "typing_Pulse.Checker.Prover.Substs.__proj__Mkss_t__item__l", + "typing_Pulse.Checker.Prover.Substs.__proj__Mkss_t__item__m", "typing_Pulse.Syntax.Base.tm_unknown" ], 0, - "0bfa9bf7b86654e21937bea0a2d327a5" + "d04004a5c8504a89ee2b13837d07ee75" ], [ - "Pulse.Prover.Substs.push_ss", + "Pulse.Checker.Prover.Substs.push_ss", 1, 2, 1, @@ -466,10 +469,10 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "99ccb8dc5e9abeb02a663dc9aa2ade5c" + "f03e61bcdb978bb193558ce84bfe22b0" ], [ - "Pulse.Prover.Substs.push_ss", + "Pulse.Checker.Prover.Substs.push_ss", 2, 2, 1, @@ -481,10 +484,10 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "aef78b10a86430afcfe1782082de2b76" + "132c294e042712d2b7557a970be279c5" ], [ - "Pulse.Prover.Substs.push_ss", + "Pulse.Checker.Prover.Substs.push_ss", 3, 2, 1, @@ -492,34 +495,35 @@ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.length.fuel_instrumented", "@fuel_correspondence_FStar.List.Tot.Base.memP.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.no_repeats.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.length.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.memP.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "@query", "b2t_def", "binder_x_7b56104e02b25078b9aedbda096a2225_1", - "binder_x_f4b00518131d7cc5c1119eb28f4fd1c0_0", "bool_inversion", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "@query", "b2t_def", "binder_x_4327eaaee19bf7052534cb918abcaca5_0", + "binder_x_6cc215db2d23e9e3b2dbad735512f9af_1", "bool_inversion", "constructor_distinct_Prims.Cons", - "data_elim_Pulse.Prover.Substs.Mkss_t", "disc_equation_Prims.Cons", - "disc_equation_Prims.Nil", "equation_FStar.List.Tot.Base.hd", + "data_elim_Pulse.Checker.Prover.Substs.Mkss_t", + "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", + "equation_FStar.List.Tot.Base.hd", "equation_FStar.List.Tot.Base.tail", "equation_FStar.List.Tot.Base.tl", "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.disjoint", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Prover.Substs.as_map", - "equation_Pulse.Prover.Substs.contains", - "equation_Pulse.Prover.Substs.dom", - "equation_Pulse.Prover.Substs.push", - "equation_Pulse.Prover.Substs.remove_map", - "equation_Pulse.Prover.Substs.ss_dom", - "equation_Pulse.Prover.Substs.tail", + "equation_Prims.nat", "equation_Pulse.Checker.Prover.Substs.as_map", + "equation_Pulse.Checker.Prover.Substs.contains", + "equation_Pulse.Checker.Prover.Substs.dom", + "equation_Pulse.Checker.Prover.Substs.push", + "equation_Pulse.Checker.Prover.Substs.remove_map", + "equation_Pulse.Checker.Prover.Substs.ss_dom", + "equation_Pulse.Checker.Prover.Substs.tail", "equation_Pulse.Syntax.Base.tm_unknown", "equation_Pulse.Syntax.Base.var", "equation_with_fuel_FStar.List.Tot.Base.length.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.no_repeats.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", "fuel_guarded_inversion_Prims.list", - "fuel_guarded_inversion_Pulse.Prover.Substs.ss_t", + "fuel_guarded_inversion_Pulse.Checker.Prover.Substs.ss_t", "function_token_typing_Prims.int", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", "l_and-interp", "l_not-interp", @@ -530,40 +534,55 @@ "lemma_FStar.Set.lemma_equal_elim", "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", "lemma_FStar.Set.mem_intersect", - "lemma_Pulse.Prover.Substs.is_dom_mem", + "lemma_Pulse.Checker.Prover.Substs.is_dom_mem", "primitive_Prims.op_Addition", "primitive_Prims.op_AmpAmp", - "proj_equation_Pulse.Prover.Substs.Mkss_t_l", - "proj_equation_Pulse.Prover.Substs.Mkss_t_m", + "proj_equation_Pulse.Checker.Prover.Substs.Mkss_t_l", + "proj_equation_Pulse.Checker.Prover.Substs.Mkss_t_m", "projection_inverse_BoxBool_proj_0", "projection_inverse_BoxInt_proj_0", "projection_inverse_Prims.Cons_a", "projection_inverse_Prims.Cons_hd", "projection_inverse_Prims.Cons_tl", - "projection_inverse_Pulse.Prover.Substs.Mkss_t_l", - "projection_inverse_Pulse.Prover.Substs.Mkss_t_m", - "refinement_interpretation_Tm_refine_0e8dfcfb29968fa6a6322772c9768de7", - "refinement_interpretation_Tm_refine_0fe8979aecfdc367377f2f7bffef3582", + "projection_inverse_Pulse.Checker.Prover.Substs.Mkss_t_l", + "projection_inverse_Pulse.Checker.Prover.Substs.Mkss_t_m", + "refinement_interpretation_Tm_refine_285cecbf48216c6c6f9c751ebdbc36da", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_e1f5d7542df60d25c1cc7704f2707a6f", + "refinement_interpretation_Tm_refine_6c78cd0d452f265d33d4a3b51c7e958e", + "refinement_interpretation_Tm_refine_c386420b14250fb8a509dea3c44676a8", "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "typing_FStar.List.Tot.Base.length", "typing_FStar.Map.contains", "typing_FStar.Map.upd", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.complement", "typing_FStar.Set.empty", "typing_FStar.Set.intersect", "typing_FStar.Set.mem", "typing_FStar.Set.singleton", - "typing_Pulse.Prover.Substs.__proj__Mkss_t__item__l", - "typing_Pulse.Prover.Substs.__proj__Mkss_t__item__m", - "typing_Pulse.Prover.Substs.as_map", - "typing_Pulse.Prover.Substs.dom", - "typing_Pulse.Prover.Substs.remove_map", + "typing_Pulse.Checker.Prover.Substs.__proj__Mkss_t__item__l", + "typing_Pulse.Checker.Prover.Substs.__proj__Mkss_t__item__m", + "typing_Pulse.Checker.Prover.Substs.as_map", + "typing_Pulse.Checker.Prover.Substs.dom", + "typing_Pulse.Checker.Prover.Substs.remove_map", "typing_Pulse.Syntax.Base.tm_unknown", "well-founded-ordering-on-nat" ], 0, - "6306ee95f749dfe04df82ec91cc44092" + "d1652c6f16e9ae0784578d7e3234a045" ], [ - "Pulse.Prover.Substs.push_as_map", + "Pulse.Checker.Prover.Substs.check_disjoint", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", + "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" + ], + 0, + "dfda15b956c5e1c4176cfb5a394685c7" + ], + [ + "Pulse.Checker.Prover.Substs.push_as_map", 1, 2, 1, @@ -576,45 +595,46 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "b9382eaf03984c57ff752f5b07e7772a" + "49685f0263748a04f601d18a8144db67" ], [ - "Pulse.Prover.Substs.push_as_map", + "Pulse.Checker.Prover.Substs.push_as_map", 2, 2, 1, [ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.length.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.push_ss.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.push_ss.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.length.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.push_ss.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.push_ss.fuel_instrumented", "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", "b2t_def", "bool_inversion", "bool_typing", "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", - "data_elim_Pulse.Prover.Substs.Mkss_t", "disc_equation_Prims.Cons", - "disc_equation_Prims.Nil", "equation_FStar.List.Tot.Base.hd", + "data_elim_Pulse.Checker.Prover.Substs.Mkss_t", + "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", + "equation_FStar.List.Tot.Base.hd", "equation_FStar.List.Tot.Base.tail", "equation_FStar.List.Tot.Base.tl", "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.disjoint", "equation_Prims.eqtype", "equation_Prims.nat", "equation_Prims.squash", - "equation_Pulse.Prover.Substs.as_map", - "equation_Pulse.Prover.Substs.contains", - "equation_Pulse.Prover.Substs.dom", - "equation_Pulse.Prover.Substs.push", - "equation_Pulse.Prover.Substs.remove_map", - "equation_Pulse.Prover.Substs.ss_dom", - "equation_Pulse.Prover.Substs.ss_map", - "equation_Pulse.Prover.Substs.tail", + "equation_Pulse.Checker.Prover.Substs.as_map", + "equation_Pulse.Checker.Prover.Substs.contains", + "equation_Pulse.Checker.Prover.Substs.dom", + "equation_Pulse.Checker.Prover.Substs.push", + "equation_Pulse.Checker.Prover.Substs.remove_map", + "equation_Pulse.Checker.Prover.Substs.ss_dom", + "equation_Pulse.Checker.Prover.Substs.ss_map", + "equation_Pulse.Checker.Prover.Substs.tail", "equation_Pulse.Syntax.Base.tm_unknown", "equation_Pulse.Syntax.Base.var", "equation_with_fuel_FStar.List.Tot.Base.length.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.push_ss.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.push_ss.fuel_instrumented", "fuel_guarded_inversion_Prims.list", - "fuel_guarded_inversion_Pulse.Prover.Substs.ss_t", + "fuel_guarded_inversion_Pulse.Checker.Prover.Substs.ss_t", "function_token_typing_Prims.int", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", "l_and-interp", @@ -636,23 +656,23 @@ "lemma_FStar.Set.mem_union", "primitive_Prims.op_Addition", "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", "primitive_Prims.op_Equality", "primitive_Prims.op_Negation", - "proj_equation_Pulse.Prover.Substs.Mkss_t_l", - "proj_equation_Pulse.Prover.Substs.Mkss_t_m", + "proj_equation_Pulse.Checker.Prover.Substs.Mkss_t_l", + "proj_equation_Pulse.Checker.Prover.Substs.Mkss_t_m", "projection_inverse_BoxBool_proj_0", "projection_inverse_BoxInt_proj_0", "projection_inverse_Prims.Cons_a", "projection_inverse_Prims.Cons_hd", "projection_inverse_Prims.Cons_tl", "projection_inverse_Prims.Nil_a", - "projection_inverse_Pulse.Prover.Substs.Mkss_t_l", - "projection_inverse_Pulse.Prover.Substs.Mkss_t_m", - "refinement_interpretation_Tm_refine_0fe8979aecfdc367377f2f7bffef3582", - "refinement_interpretation_Tm_refine_1a8c2398238a88ffd0bf6c5c12a68a91", + "projection_inverse_Pulse.Checker.Prover.Substs.Mkss_t_l", + "projection_inverse_Pulse.Checker.Prover.Substs.Mkss_t_m", + "refinement_interpretation_Tm_refine_285cecbf48216c6c6f9c751ebdbc36da", "refinement_interpretation_Tm_refine_2de20c066034c13bf76e9c0b94f4806c", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_62b28b97e5e24159b067648734d2c51b", + "refinement_interpretation_Tm_refine_6c78cd0d452f265d33d4a3b51c7e958e", "refinement_interpretation_Tm_refine_743a26899815015983075ea3d48d9ce0", - "refinement_interpretation_Tm_refine_8521c154c07765aef4a3bb7aa5af82dd", - "refinement_interpretation_Tm_refine_e1f5d7542df60d25c1cc7704f2707a6f", + "refinement_interpretation_Tm_refine_be318f37ef272b844b07ed82bd9fff42", "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "string_typing", "typing_FStar.List.Tot.Base.length", "typing_FStar.Map.concat", "typing_FStar.Map.contains", @@ -661,38 +681,38 @@ "typing_FStar.Set.empty", "typing_FStar.Set.intersect", "typing_FStar.Set.mem", "typing_FStar.Set.singleton", "typing_FStar.Set.union", - "typing_Pulse.Prover.Substs.__proj__Mkss_t__item__l", - "typing_Pulse.Prover.Substs.__proj__Mkss_t__item__m", - "typing_Pulse.Prover.Substs.as_map", - "typing_Pulse.Prover.Substs.dom", - "typing_Pulse.Prover.Substs.push_ss", - "typing_Pulse.Prover.Substs.remove_map", + "typing_Pulse.Checker.Prover.Substs.__proj__Mkss_t__item__l", + "typing_Pulse.Checker.Prover.Substs.__proj__Mkss_t__item__m", + "typing_Pulse.Checker.Prover.Substs.as_map", + "typing_Pulse.Checker.Prover.Substs.dom", + "typing_Pulse.Checker.Prover.Substs.push_ss", + "typing_Pulse.Checker.Prover.Substs.remove_map", "typing_Pulse.Syntax.Base.tm_unknown", "well-founded-ordering-on-nat" ], 0, - "e482c68ab19085f50377ea4c4aad43f3" + "e71dd1e62a7829538839a56842be2f08" ], [ - "Pulse.Prover.Substs.remove_l", + "Pulse.Checker.Prover.Substs.remove_l", 1, 2, 1, [ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.memP.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.no_repeats.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.memP.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.no_repeats.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "binder_x_29cc5f3e1a79215b26718796d566f6c2_0", - "binder_x_ab6f5000ae41311663b4a49e6a6ba6ab_1", + "binder_x_674fd415bc1317fdc517ee6bd8e8f9df_1", + "binder_x_c47c35481e74724db697dc5dccfb1d57_0", "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", "data_elim_Prims.Cons", "disc_equation_Prims.Cons", "eq2-interp", "equation_Prims.eq2", "equation_Prims.eqtype", "equation_Prims.nat", - "equation_Pulse.Prover.Substs.ss_dom", + "equation_Pulse.Checker.Prover.Substs.ss_dom", "equation_Pulse.Syntax.Base.var", "equation_with_fuel_FStar.List.Tot.Base.memP.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.no_repeats.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", "false_interp", "fuel_guarded_inversion_Prims.list", "function_token_typing_Prims.int", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", @@ -701,32 +721,32 @@ "projection_inverse_Prims.Cons_a", "projection_inverse_Prims.Cons_hd", "projection_inverse_Prims.Cons_tl", - "refinement_interpretation_Tm_refine_0fe8979aecfdc367377f2f7bffef3582", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_739799bb2d608480c1ad5dc144867abb", + "refinement_interpretation_Tm_refine_6c78cd0d452f265d33d4a3b51c7e958e", + "refinement_interpretation_Tm_refine_dbb7bca09308412eb3e9fdd5af3b7533", "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "string_typing", "subterm_ordering_Prims.Cons" ], 0, - "6f062332bd0733cbcce5155ff045ce0e" + "0106e74fa5aa92baf6127228d8b37573" ], [ - "Pulse.Prover.Substs.is_dom_remove", + "Pulse.Checker.Prover.Substs.is_dom_remove", 1, 2, 1, [ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.memP.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.is_dom.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.memP.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.is_dom.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", "@query", "bool_inversion", "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", "equation_Prims.nat", - "equation_Pulse.Prover.Substs.remove_map", - "equation_Pulse.Prover.Substs.ss_dom", - "equation_Pulse.Prover.Substs.ss_map", + "equation_Pulse.Checker.Prover.Substs.remove_map", + "equation_Pulse.Checker.Prover.Substs.ss_dom", + "equation_Pulse.Checker.Prover.Substs.ss_map", "equation_Pulse.Syntax.Base.tm_unknown", "equation_Pulse.Syntax.Base.var", "equation_with_fuel_FStar.List.Tot.Base.memP.fuel_instrumented", @@ -739,15 +759,16 @@ "lemma_FStar.Map.lemma_SelRestrict", "lemma_FStar.Map.lemma_SelUpd1", "lemma_FStar.Map.lemma_SelUpd2", "lemma_FStar.Set.mem_complement", "lemma_FStar.Set.mem_singleton", - "lemma_Pulse.Prover.Substs.is_dom_mem", "primitive_Prims.op_AmpAmp", - "primitive_Prims.op_BarBar", "primitive_Prims.op_Equality", - "primitive_Prims.op_Negation", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_0fe8979aecfdc367377f2f7bffef3582", - "refinement_interpretation_Tm_refine_1a8c2398238a88ffd0bf6c5c12a68a91", + "lemma_Pulse.Checker.Prover.Substs.is_dom_mem", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "primitive_Prims.op_Equality", "primitive_Prims.op_Negation", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_2431b66e19fdfb4c40db2be80082d4ce", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_6c78cd0d452f265d33d4a3b51c7e958e", "refinement_interpretation_Tm_refine_743a26899815015983075ea3d48d9ce0", - "refinement_interpretation_Tm_refine_c5bcf95f1ce55bb888d966633ed92c24", + "refinement_interpretation_Tm_refine_be318f37ef272b844b07ed82bd9fff42", "refinement_interpretation_Tm_refine_e9f0f8d04c3ac842acb94e971295cb21", "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "typing_FStar.Map.contains", "typing_FStar.Map.upd", @@ -755,38 +776,39 @@ "typing_FStar.Set.singleton", "typing_Pulse.Syntax.Base.tm_unknown" ], 0, - "6557f899d1158244b9b8a5dba3d533d5" + "f35ef41f2929647ed9ce2d620291c541" ], [ - "Pulse.Prover.Substs.is_dom_remove", + "Pulse.Checker.Prover.Substs.is_dom_remove", 2, 2, 1, [ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.memP.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.no_repeats.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.remove_l.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.remove_l.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.memP.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.no_repeats.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.remove_l.fuel_instrumented", - "@query", "b2t_def", "binder_x_117e8de76c32156ec889884dcf5265c8_2", - "binder_x_222eda792b561ef3e1f8fcb3781b994d_1", - "binder_x_29cc5f3e1a79215b26718796d566f6c2_0", "bool_inversion", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.remove_l.fuel_instrumented", + "@query", "b2t_def", "binder_x_4e704c5e0fa01b6f55a4286676f89087_1", + "binder_x_c47c35481e74724db697dc5dccfb1d57_0", + "binder_x_c54555e823a6a75ac104c6d0ad8d3e64_2", "bool_inversion", "constructor_distinct_Prims.Nil", "data_elim_Prims.Cons", "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", "eq2-interp", "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Prover.Substs.remove_map", - "equation_Pulse.Prover.Substs.ss_dom", - "equation_Pulse.Prover.Substs.ss_map", + "equation_Prims.nat", + "equation_Pulse.Checker.Prover.Substs.remove_map", + "equation_Pulse.Checker.Prover.Substs.ss_dom", + "equation_Pulse.Checker.Prover.Substs.ss_map", "equation_Pulse.Syntax.Base.tm_unknown", "equation_Pulse.Syntax.Base.var", "equation_with_fuel_FStar.List.Tot.Base.memP.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.no_repeats.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.remove_l.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.remove_l.fuel_instrumented", "false_interp", "fuel_guarded_inversion_Prims.list", "function_token_typing_Prims.int", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", @@ -800,33 +822,34 @@ "lemma_FStar.Map.lemma_equal_intro", "lemma_FStar.Set.lemma_equal_elim", "lemma_FStar.Set.mem_complement", "lemma_FStar.Set.mem_singleton", "lemma_FStar.Set.mem_union", - "lemma_Pulse.Prover.Substs.is_dom_mem", "primitive_Prims.op_AmpAmp", - "primitive_Prims.op_BarBar", "primitive_Prims.op_Equality", - "primitive_Prims.op_Negation", "projection_inverse_BoxBool_proj_0", + "lemma_Pulse.Checker.Prover.Substs.is_dom_mem", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "primitive_Prims.op_Equality", "primitive_Prims.op_Negation", + "projection_inverse_BoxBool_proj_0", "projection_inverse_Prims.Cons_hd", "projection_inverse_Prims.Cons_tl", - "refinement_interpretation_Tm_refine_0fe8979aecfdc367377f2f7bffef3582", + "refinement_interpretation_Tm_refine_0713075354baf5759eacc574961e217e", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "refinement_interpretation_Tm_refine_6900719743abad92316783e7d2253907", + "refinement_interpretation_Tm_refine_6c78cd0d452f265d33d4a3b51c7e958e", "refinement_interpretation_Tm_refine_743a26899815015983075ea3d48d9ce0", - "refinement_interpretation_Tm_refine_c62f625962d118e899b334e08aa3a44c", - "refinement_interpretation_Tm_refine_d5a92c7e2633eb00daa967cb054c6c22", + "refinement_interpretation_Tm_refine_78c95ce962d1bb6f478bed7d1465692d", "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "subterm_ordering_Prims.Cons", "typing_FStar.Map.contains", "typing_FStar.Map.domain", "typing_FStar.Map.restrict", "typing_FStar.Map.upd", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.complement", "typing_FStar.Set.mem", "typing_FStar.Set.singleton", "typing_FStar.Set.union", - "typing_Pulse.Prover.Substs.remove_map", + "typing_Pulse.Checker.Prover.Substs.remove_map", "typing_Pulse.Syntax.Base.tm_unknown", "unit_inversion", "unit_typing" ], 0, - "7022cd68e5ce67b31212e0fd7ef0d609" + "b3afbc7f32424ae236613c7792449901" ], [ - "Pulse.Prover.Substs.ss_term", + "Pulse.Checker.Prover.Substs.ss_term", 1, 2, 1, @@ -834,39 +857,39 @@ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.length.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.length.fuel_instrumented", - "@query", "binder_x_f4b00518131d7cc5c1119eb28f4fd1c0_1", + "@query", "binder_x_4327eaaee19bf7052534cb918abcaca5_1", "constructor_distinct_Prims.Cons", "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", "equation_FStar.List.Tot.Base.tail", "equation_FStar.List.Tot.Base.tl", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Prover.Substs.ss_dom", - "equation_Pulse.Prover.Substs.tail", + "equation_Prims.nat", "equation_Pulse.Checker.Prover.Substs.ss_dom", + "equation_Pulse.Checker.Prover.Substs.tail", "equation_Pulse.Syntax.Base.var", "equation_with_fuel_FStar.List.Tot.Base.length.fuel_instrumented", "fuel_guarded_inversion_Prims.list", - "fuel_guarded_inversion_Pulse.Prover.Substs.ss_t", + "fuel_guarded_inversion_Pulse.Checker.Prover.Substs.ss_t", "function_token_typing_Prims.int", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "primitive_Prims.op_Addition", - "proj_equation_Pulse.Prover.Substs.Mkss_t_l", + "proj_equation_Pulse.Checker.Prover.Substs.Mkss_t_l", "projection_inverse_BoxBool_proj_0", "projection_inverse_BoxInt_proj_0", "projection_inverse_Prims.Cons_a", "projection_inverse_Prims.Cons_hd", "projection_inverse_Prims.Cons_tl", - "projection_inverse_Pulse.Prover.Substs.Mkss_t_l", - "refinement_interpretation_Tm_refine_0fe8979aecfdc367377f2f7bffef3582", + "projection_inverse_Pulse.Checker.Prover.Substs.Mkss_t_l", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_6c78cd0d452f265d33d4a3b51c7e958e", "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "typing_FStar.List.Tot.Base.length", - "typing_Pulse.Prover.Substs.__proj__Mkss_t__item__l", + "typing_Pulse.Checker.Prover.Substs.__proj__Mkss_t__item__l", "well-founded-ordering-on-nat" ], 0, - "8b08fea2a2a59fb347ca7f2d7773ce4c" + "b4357462ccf40cc790f1c4e5a74687eb" ], [ - "Pulse.Prover.Substs.ss_st_term", + "Pulse.Checker.Prover.Substs.ss_st_term", 1, 2, 1, @@ -874,39 +897,39 @@ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.length.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.length.fuel_instrumented", - "@query", "binder_x_f4b00518131d7cc5c1119eb28f4fd1c0_1", + "@query", "binder_x_4327eaaee19bf7052534cb918abcaca5_1", "constructor_distinct_Prims.Cons", "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", "equation_FStar.List.Tot.Base.tail", "equation_FStar.List.Tot.Base.tl", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Prover.Substs.ss_dom", - "equation_Pulse.Prover.Substs.tail", + "equation_Prims.nat", "equation_Pulse.Checker.Prover.Substs.ss_dom", + "equation_Pulse.Checker.Prover.Substs.tail", "equation_Pulse.Syntax.Base.var", "equation_with_fuel_FStar.List.Tot.Base.length.fuel_instrumented", "fuel_guarded_inversion_Prims.list", - "fuel_guarded_inversion_Pulse.Prover.Substs.ss_t", + "fuel_guarded_inversion_Pulse.Checker.Prover.Substs.ss_t", "function_token_typing_Prims.int", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "primitive_Prims.op_Addition", - "proj_equation_Pulse.Prover.Substs.Mkss_t_l", + "proj_equation_Pulse.Checker.Prover.Substs.Mkss_t_l", "projection_inverse_BoxBool_proj_0", "projection_inverse_BoxInt_proj_0", "projection_inverse_Prims.Cons_a", "projection_inverse_Prims.Cons_hd", "projection_inverse_Prims.Cons_tl", - "projection_inverse_Pulse.Prover.Substs.Mkss_t_l", - "refinement_interpretation_Tm_refine_0fe8979aecfdc367377f2f7bffef3582", + "projection_inverse_Pulse.Checker.Prover.Substs.Mkss_t_l", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_6c78cd0d452f265d33d4a3b51c7e958e", "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "typing_FStar.List.Tot.Base.length", - "typing_Pulse.Prover.Substs.__proj__Mkss_t__item__l", + "typing_Pulse.Checker.Prover.Substs.__proj__Mkss_t__item__l", "well-founded-ordering-on-nat" ], 0, - "f4453a2808c4d078d0f296af60853e1f" + "94d0e3196bb95d16e549903e0d944ac5" ], [ - "Pulse.Prover.Substs.ss_st_comp", + "Pulse.Checker.Prover.Substs.ss_st_comp", 1, 2, 1, @@ -914,39 +937,39 @@ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.length.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.length.fuel_instrumented", - "@query", "binder_x_f4b00518131d7cc5c1119eb28f4fd1c0_1", + "@query", "binder_x_4327eaaee19bf7052534cb918abcaca5_1", "constructor_distinct_Prims.Cons", "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", "equation_FStar.List.Tot.Base.tail", "equation_FStar.List.Tot.Base.tl", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Prover.Substs.ss_dom", - "equation_Pulse.Prover.Substs.tail", + "equation_Prims.nat", "equation_Pulse.Checker.Prover.Substs.ss_dom", + "equation_Pulse.Checker.Prover.Substs.tail", "equation_Pulse.Syntax.Base.var", "equation_with_fuel_FStar.List.Tot.Base.length.fuel_instrumented", "fuel_guarded_inversion_Prims.list", - "fuel_guarded_inversion_Pulse.Prover.Substs.ss_t", + "fuel_guarded_inversion_Pulse.Checker.Prover.Substs.ss_t", "function_token_typing_Prims.int", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "primitive_Prims.op_Addition", - "proj_equation_Pulse.Prover.Substs.Mkss_t_l", + "proj_equation_Pulse.Checker.Prover.Substs.Mkss_t_l", "projection_inverse_BoxBool_proj_0", "projection_inverse_BoxInt_proj_0", "projection_inverse_Prims.Cons_a", "projection_inverse_Prims.Cons_hd", "projection_inverse_Prims.Cons_tl", - "projection_inverse_Pulse.Prover.Substs.Mkss_t_l", - "refinement_interpretation_Tm_refine_0fe8979aecfdc367377f2f7bffef3582", + "projection_inverse_Pulse.Checker.Prover.Substs.Mkss_t_l", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_6c78cd0d452f265d33d4a3b51c7e958e", "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "typing_FStar.List.Tot.Base.length", - "typing_Pulse.Prover.Substs.__proj__Mkss_t__item__l", + "typing_Pulse.Checker.Prover.Substs.__proj__Mkss_t__item__l", "well-founded-ordering-on-nat" ], 0, - "fcc55fe0b6ed9f1fad00ae2c6ac21c2e" + "8011c76db83f95ec257c49500cb6a465" ], [ - "Pulse.Prover.Substs.ss_comp", + "Pulse.Checker.Prover.Substs.ss_comp", 1, 2, 1, @@ -954,39 +977,39 @@ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.length.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.length.fuel_instrumented", - "@query", "binder_x_f4b00518131d7cc5c1119eb28f4fd1c0_1", + "@query", "binder_x_4327eaaee19bf7052534cb918abcaca5_1", "constructor_distinct_Prims.Cons", "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", "equation_FStar.List.Tot.Base.tail", "equation_FStar.List.Tot.Base.tl", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Prover.Substs.ss_dom", - "equation_Pulse.Prover.Substs.tail", + "equation_Prims.nat", "equation_Pulse.Checker.Prover.Substs.ss_dom", + "equation_Pulse.Checker.Prover.Substs.tail", "equation_Pulse.Syntax.Base.var", "equation_with_fuel_FStar.List.Tot.Base.length.fuel_instrumented", "fuel_guarded_inversion_Prims.list", - "fuel_guarded_inversion_Pulse.Prover.Substs.ss_t", + "fuel_guarded_inversion_Pulse.Checker.Prover.Substs.ss_t", "function_token_typing_Prims.int", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "primitive_Prims.op_Addition", - "proj_equation_Pulse.Prover.Substs.Mkss_t_l", + "proj_equation_Pulse.Checker.Prover.Substs.Mkss_t_l", "projection_inverse_BoxBool_proj_0", "projection_inverse_BoxInt_proj_0", "projection_inverse_Prims.Cons_a", "projection_inverse_Prims.Cons_hd", "projection_inverse_Prims.Cons_tl", - "projection_inverse_Pulse.Prover.Substs.Mkss_t_l", - "refinement_interpretation_Tm_refine_0fe8979aecfdc367377f2f7bffef3582", + "projection_inverse_Pulse.Checker.Prover.Substs.Mkss_t_l", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_6c78cd0d452f265d33d4a3b51c7e958e", "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "typing_FStar.List.Tot.Base.length", - "typing_Pulse.Prover.Substs.__proj__Mkss_t__item__l", + "typing_Pulse.Checker.Prover.Substs.__proj__Mkss_t__item__l", "well-founded-ordering-on-nat" ], 0, - "cdd5ef15db2df8977d746c65dc2c2c17" + "bd7c24aea9308b84a7c22e8d22207f8b" ], [ - "Pulse.Prover.Substs.ss_binder", + "Pulse.Checker.Prover.Substs.ss_binder", 1, 2, 1, @@ -994,39 +1017,39 @@ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.length.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.length.fuel_instrumented", - "@query", "binder_x_f4b00518131d7cc5c1119eb28f4fd1c0_1", + "@query", "binder_x_4327eaaee19bf7052534cb918abcaca5_1", "constructor_distinct_Prims.Cons", "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", "equation_FStar.List.Tot.Base.tail", "equation_FStar.List.Tot.Base.tl", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Prover.Substs.ss_dom", - "equation_Pulse.Prover.Substs.tail", + "equation_Prims.nat", "equation_Pulse.Checker.Prover.Substs.ss_dom", + "equation_Pulse.Checker.Prover.Substs.tail", "equation_Pulse.Syntax.Base.var", "equation_with_fuel_FStar.List.Tot.Base.length.fuel_instrumented", "fuel_guarded_inversion_Prims.list", - "fuel_guarded_inversion_Pulse.Prover.Substs.ss_t", + "fuel_guarded_inversion_Pulse.Checker.Prover.Substs.ss_t", "function_token_typing_Prims.int", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "primitive_Prims.op_Addition", - "proj_equation_Pulse.Prover.Substs.Mkss_t_l", + "proj_equation_Pulse.Checker.Prover.Substs.Mkss_t_l", "projection_inverse_BoxBool_proj_0", "projection_inverse_BoxInt_proj_0", "projection_inverse_Prims.Cons_a", "projection_inverse_Prims.Cons_hd", "projection_inverse_Prims.Cons_tl", - "projection_inverse_Pulse.Prover.Substs.Mkss_t_l", - "refinement_interpretation_Tm_refine_0fe8979aecfdc367377f2f7bffef3582", + "projection_inverse_Pulse.Checker.Prover.Substs.Mkss_t_l", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_6c78cd0d452f265d33d4a3b51c7e958e", "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "typing_FStar.List.Tot.Base.length", - "typing_Pulse.Prover.Substs.__proj__Mkss_t__item__l", + "typing_Pulse.Checker.Prover.Substs.__proj__Mkss_t__item__l", "well-founded-ordering-on-nat" ], 0, - "be6242b3d7daef206ddd28c7f3e50dc6" + "d213612463bf38db901e6c1abd8621cf" ], [ - "Pulse.Prover.Substs.ss_env", + "Pulse.Checker.Prover.Substs.ss_env", 1, 2, 1, @@ -1038,10 +1061,10 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "03b1e65ee39b70f89a41f7c4879692ce" + "128eea84f2392af2b81ba11a2309e255" ], [ - "Pulse.Prover.Substs.ss_env", + "Pulse.Checker.Prover.Substs.ss_env", 2, 2, 1, @@ -1053,10 +1076,10 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "a88673ca2369c531dbb73f4c23412426" + "5f9e87c408f8d4fe9ebee8192a728765" ], [ - "Pulse.Prover.Substs.ss_env", + "Pulse.Checker.Prover.Substs.ss_env", 3, 2, 1, @@ -1068,10 +1091,10 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "7c0f657802bb9a09f629f29759a4fa46" + "9dc19457ceaf7e01e3be30764efde921" ], [ - "Pulse.Prover.Substs.ss_st_comp_commutes", + "Pulse.Checker.Prover.Substs.ss_st_comp_commutes", 1, 2, 1, @@ -1079,29 +1102,29 @@ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.length.fuel_instrumented", "@fuel_correspondence_FStar.List.Tot.Base.map.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.ss_st_comp.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.ss_term.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.ss_st_comp.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.ss_term.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.length.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.ss_st_comp.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.ss_term.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.ss_st_comp.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.ss_term.fuel_instrumented", "@query", "FStar.Ghost_interpretation_Tm_arrow_6980332764c4493a7b0df5c02f7aefbe", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", "Pulse.Syntax.Naming_interpretation_Tm_arrow_c0d5e1c4dd22f0fc7f6b9bbecbfa2056", - "b2t_def", "binder_x_782a0dad287a00f5de8c110e3ddaeab3_0", - "binder_x_f4b00518131d7cc5c1119eb28f4fd1c0_1", "bool_inversion", + "b2t_def", "binder_x_4327eaaee19bf7052534cb918abcaca5_1", + "binder_x_782a0dad287a00f5de8c110e3ddaeab3_0", "bool_inversion", "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", "constructor_distinct_Pulse.Syntax.Naming.NT", - "data_elim_Pulse.Prover.Substs.Mkss_t", + "data_elim_Pulse.Checker.Prover.Substs.Mkss_t", "data_elim_Pulse.Syntax.Base.Mkst_comp", "data_typing_intro_Prims.Nil@tok", "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", "equation_FStar.List.Tot.Base.tail", "equation_FStar.List.Tot.Base.tl", "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Prover.Substs.ss_dom", - "equation_Pulse.Prover.Substs.ss_map", - "equation_Pulse.Prover.Substs.tail", + "equation_Prims.nat", "equation_Pulse.Checker.Prover.Substs.ss_dom", + "equation_Pulse.Checker.Prover.Substs.ss_map", + "equation_Pulse.Checker.Prover.Substs.tail", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", "equation_Pulse.Syntax.Naming.shift_subst", "equation_Pulse.Syntax.Naming.shift_subst_elt", @@ -1109,11 +1132,11 @@ "equation_Pulse.Syntax.Naming.subst_st_comp", "equation_with_fuel_FStar.List.Tot.Base.length.fuel_instrumented", "equation_with_fuel_FStar.List.Tot.Base.map.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.ss_st_comp.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.ss_term.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.ss_st_comp.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.ss_term.fuel_instrumented", "fuel_guarded_inversion_Prims.list", - "fuel_guarded_inversion_Pulse.Prover.Substs.ss_t", + "fuel_guarded_inversion_Pulse.Checker.Prover.Substs.ss_t", "fuel_guarded_inversion_Pulse.Syntax.Base.st_comp", "fuel_guarded_inversion_Pulse.Syntax.Base.term", "function_token_typing_Prims.int", @@ -1122,7 +1145,7 @@ "kinding_Pulse.Syntax.Base.term@tok", "kinding_Pulse.Syntax.Naming.subst_elt@tok", "l_and-interp", "primitive_Prims.op_Addition", - "proj_equation_Pulse.Prover.Substs.Mkss_t_l", + "proj_equation_Pulse.Checker.Prover.Substs.Mkss_t_l", "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", @@ -1132,35 +1155,35 @@ "projection_inverse_Prims.Cons_a", "projection_inverse_Prims.Cons_hd", "projection_inverse_Prims.Cons_tl", "projection_inverse_Prims.Nil_a", - "projection_inverse_Pulse.Prover.Substs.Mkss_t_l", + "projection_inverse_Pulse.Checker.Prover.Substs.Mkss_t_l", "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", "projection_inverse_Pulse.Syntax.Base.Mkst_comp_res", "projection_inverse_Pulse.Syntax.Base.Mkst_comp_u", "projection_inverse_Pulse.Syntax.Naming.NT__0", "projection_inverse_Pulse.Syntax.Naming.NT__1", - "refinement_interpretation_Tm_refine_0fe8979aecfdc367377f2f7bffef3582", - "refinement_interpretation_Tm_refine_1a8c2398238a88ffd0bf6c5c12a68a91", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_6c78cd0d452f265d33d4a3b51c7e958e", "refinement_interpretation_Tm_refine_743a26899815015983075ea3d48d9ce0", + "refinement_interpretation_Tm_refine_be318f37ef272b844b07ed82bd9fff42", "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "string_typing", "token_correspondence_FStar.List.Tot.Base.map", "token_correspondence_Pulse.Syntax.Naming.shift_subst_elt", "token_correspondence_Pulse.Syntax.Naming.shift_subst_n", "typing_FStar.List.Tot.Base.length", "typing_FStar.Map.contains", "typing_FStar.Reflection.V2.Data.var", - "typing_Pulse.Prover.Substs.__proj__Mkss_t__item__l", + "typing_Pulse.Checker.Prover.Substs.__proj__Mkss_t__item__l", "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__post", "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__pre", "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__res", "well-founded-ordering-on-nat" ], 0, - "3bdda584b1766a2b1e372b64bcbc0704" + "4a128b3ea3bfedcb307d0f9b0608c3f4" ], [ - "Pulse.Prover.Substs.ss_comp_commutes", + "Pulse.Checker.Prover.Substs.ss_comp_commutes", 1, 2, 1, @@ -1172,10 +1195,10 @@ "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0" ], 0, - "ede1af930472dbca5c03d7350a22c271" + "356e132d810efaf936121a2917afad79" ], [ - "Pulse.Prover.Substs.ss_comp_commutes", + "Pulse.Checker.Prover.Substs.ss_comp_commutes", 2, 2, 1, @@ -1187,27 +1210,27 @@ "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0" ], 0, - "bc2f925df570f4df9f933170af674a7d" + "1bd1135d3ba316a2f8e36106a1579168" ], [ - "Pulse.Prover.Substs.ss_comp_commutes", + "Pulse.Checker.Prover.Substs.ss_comp_commutes", 3, 2, 1, [ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.length.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.ss_comp.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.ss_st_comp.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.ss_term.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.ss_comp.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.ss_st_comp.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.ss_term.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.length.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.ss_comp.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.ss_st_comp.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.ss_term.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.ss_comp.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.ss_st_comp.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.ss_term.fuel_instrumented", "@query", "Pulse.Syntax.Base_pretyping_782a0dad287a00f5de8c110e3ddaeab3", - "binder_x_b015b044c5bf00a3dd3df9fa711c87dd_0", - "binder_x_f4b00518131d7cc5c1119eb28f4fd1c0_1", "bool_inversion", + "binder_x_4327eaaee19bf7052534cb918abcaca5_1", + "binder_x_b015b044c5bf00a3dd3df9fa711c87dd_0", "bool_inversion", "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", "constructor_distinct_Pulse.Syntax.Base.C_ST", "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", @@ -1222,8 +1245,8 @@ "disc_equation_Pulse.Syntax.Base.C_Tot", "equation_FStar.List.Tot.Base.tail", "equation_FStar.List.Tot.Base.tl", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Prover.Substs.ss_dom", - "equation_Pulse.Prover.Substs.tail", + "equation_Prims.nat", "equation_Pulse.Checker.Prover.Substs.ss_dom", + "equation_Pulse.Checker.Prover.Substs.tail", "equation_Pulse.Syntax.Base.comp_inames", "equation_Pulse.Syntax.Base.comp_res", "equation_Pulse.Syntax.Base.st_comp_of_comp", @@ -1232,37 +1255,37 @@ "equation_Pulse.Syntax.Naming.subst", "equation_Pulse.Syntax.Naming.subst_comp", "equation_with_fuel_FStar.List.Tot.Base.length.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.ss_comp.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.ss_st_comp.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.ss_term.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.ss_comp.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.ss_st_comp.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.ss_term.fuel_instrumented", "fuel_guarded_inversion_Prims.list", - "fuel_guarded_inversion_Pulse.Prover.Substs.ss_t", + "fuel_guarded_inversion_Pulse.Checker.Prover.Substs.ss_t", "fuel_guarded_inversion_Pulse.Syntax.Base.comp", "fuel_guarded_inversion_Pulse.Syntax.Base.st_comp", "fuel_guarded_inversion_Pulse.Syntax.Base.term", "function_token_typing_Prims.int", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "primitive_Prims.op_Addition", "primitive_Prims.op_BarBar", - "proj_equation_Pulse.Prover.Substs.Mkss_t_l", + "proj_equation_Pulse.Checker.Prover.Substs.Mkss_t_l", "projection_inverse_BoxBool_proj_0", "projection_inverse_BoxInt_proj_0", "projection_inverse_Prims.Cons_a", "projection_inverse_Prims.Cons_hd", "projection_inverse_Prims.Cons_tl", "projection_inverse_Prims.Nil_a", - "projection_inverse_Pulse.Prover.Substs.Mkss_t_l", + "projection_inverse_Pulse.Checker.Prover.Substs.Mkss_t_l", "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", "projection_inverse_Pulse.Syntax.Base.C_ST__0", "projection_inverse_Pulse.Syntax.Base.C_Tot__0", - "refinement_interpretation_Tm_refine_0fe8979aecfdc367377f2f7bffef3582", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_6c78cd0d452f265d33d4a3b51c7e958e", "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "typing_FStar.List.Tot.Base.length", - "typing_Pulse.Prover.Substs.__proj__Mkss_t__item__l", - "typing_Pulse.Prover.Substs.ss_term", + "typing_Pulse.Checker.Prover.Substs.__proj__Mkss_t__item__l", + "typing_Pulse.Checker.Prover.Substs.ss_term", "typing_Pulse.Syntax.Base.comp_res", "typing_Pulse.Syntax.Base.uu___is_C_ST", "typing_Pulse.Syntax.Base.uu___is_C_STAtomic", @@ -1272,10 +1295,10 @@ "well-founded-ordering-on-nat" ], 0, - "9215c7c3cce97d5bde7b66a863b41ed7" + "a0abf09dee8a92345cc05559c5a5affd" ], [ - "Pulse.Prover.Substs.nt_subst_env", + "Pulse.Checker.Prover.Substs.nt_subst_env", 1, 2, 1, @@ -1287,10 +1310,10 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "ba5542647436ba3c6c1a8f99620e48fb" + "2affbd30fde8fb3ac56c74ed6711df52" ], [ - "Pulse.Prover.Substs.nt_substs_st_comp_commutes", + "Pulse.Checker.Prover.Substs.nt_substs_st_comp_commutes", 1, 2, 1, @@ -1305,21 +1328,21 @@ "@query", "FStar.Ghost_interpretation_Tm_arrow_6980332764c4493a7b0df5c02f7aefbe", "FStar.List.Tot.Base_interpretation_Tm_arrow_f0225aaf6b987d44876e7f498390aa39", - "Pulse.Prover.Substs_interpretation_Tm_arrow_44c92d7083e71e4940f9a7025bcacc34", - "Pulse.Prover.Substs_interpretation_Tm_arrow_75e84b37473765c128ff689d744c8fe4", + "Pulse.Checker.Prover.Substs_interpretation_Tm_arrow_44c92d7083e71e4940f9a7025bcacc34", + "Pulse.Checker.Prover.Substs_interpretation_Tm_arrow_75e84b37473765c128ff689d744c8fe4", "Pulse.Syntax.Base_pretyping_782a0dad287a00f5de8c110e3ddaeab3", "Pulse.Syntax.Naming_interpretation_Tm_arrow_c0d5e1c4dd22f0fc7f6b9bbecbfa2056", - "binder_x_64bddace2d9f7b6ebca89cf6106fa8b3_1", "binder_x_782a0dad287a00f5de8c110e3ddaeab3_0", + "binder_x_ad7a992e74bbb15bb2b5bad6dc203499_1", "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", "constructor_distinct_Pulse.Syntax.Naming.NT", "data_elim_Prims.Cons", "data_elim_Pulse.Syntax.Base.Mkst_comp", "data_typing_intro_Prims.Cons@tok", "data_typing_intro_Prims.Nil@tok", "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", "eq2-interp", "equation_Prims.nat", - "equation_Pulse.Prover.Substs.nt_subst_st_comp", - "equation_Pulse.Prover.Substs.nt_subst_term", - "equation_Pulse.Prover.Substs.nt_substs", + "equation_Pulse.Checker.Prover.Substs.nt_subst_st_comp", + "equation_Pulse.Checker.Prover.Substs.nt_subst_term", + "equation_Pulse.Checker.Prover.Substs.nt_substs", "equation_Pulse.Syntax.Base.vprop", "equation_Pulse.Syntax.Naming.shift_subst", "equation_Pulse.Syntax.Naming.shift_subst_elt", @@ -1367,10 +1390,10 @@ "typing_Tm_abs_a710033180f8da1aa5a51a6e77454ded" ], 0, - "cc41e7c65e00af706761169b9802f3bc" + "dc180071413b9b8648cf1eabf319bb9c" ], [ - "Pulse.Prover.Substs.nt_subst_comp_commutes", + "Pulse.Checker.Prover.Substs.nt_subst_comp_commutes", 1, 2, 1, @@ -1382,10 +1405,10 @@ "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0" ], 0, - "eaee1e140f5c623526590fc571330514" + "8b965d6f33e89e7e7dadf2457c8bff56" ], [ - "Pulse.Prover.Substs.nt_subst_comp_commutes", + "Pulse.Checker.Prover.Substs.nt_subst_comp_commutes", 2, 2, 1, @@ -1397,10 +1420,10 @@ "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0" ], 0, - "83ccc23b8e5979104a1ae6e49776f2f0" + "97cadc074dac59d699af0a3bf63df6f1" ], [ - "Pulse.Prover.Substs.nt_subst_comp_commutes", + "Pulse.Checker.Prover.Substs.nt_subst_comp_commutes", 3, 2, 1, @@ -1414,12 +1437,12 @@ "FStar.List.Tot.Base_interpretation_Tm_arrow_f0225aaf6b987d44876e7f498390aa39", "Prims_pretyping_3862c4e8ff39bfc3871b6a47e7ff5b2e", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "Pulse.Prover.Substs_interpretation_Tm_arrow_44c92d7083e71e4940f9a7025bcacc34", - "Pulse.Prover.Substs_interpretation_Tm_arrow_4aff1389c612fb274ef6cf645fe0fa4a", - "Pulse.Prover.Substs_interpretation_Tm_arrow_75e84b37473765c128ff689d744c8fe4", + "Pulse.Checker.Prover.Substs_interpretation_Tm_arrow_44c92d7083e71e4940f9a7025bcacc34", + "Pulse.Checker.Prover.Substs_interpretation_Tm_arrow_4aff1389c612fb274ef6cf645fe0fa4a", + "Pulse.Checker.Prover.Substs_interpretation_Tm_arrow_75e84b37473765c128ff689d744c8fe4", "Pulse.Syntax.Base_pretyping_782a0dad287a00f5de8c110e3ddaeab3", "Pulse.Syntax.Base_pretyping_b015b044c5bf00a3dd3df9fa711c87dd", - "binder_x_64bddace2d9f7b6ebca89cf6106fa8b3_1", + "binder_x_ad7a992e74bbb15bb2b5bad6dc203499_1", "binder_x_b015b044c5bf00a3dd3df9fa711c87dd_0", "bool_inversion", "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", "constructor_distinct_Pulse.Syntax.Base.C_ST", @@ -1437,10 +1460,10 @@ "disc_equation_Pulse.Syntax.Base.C_STGhost", "disc_equation_Pulse.Syntax.Base.C_Tot", "disc_equation_Pulse.Syntax.Naming.NT", "eq2-interp", - "equation_Pulse.Prover.Substs.nt_subst_comp", - "equation_Pulse.Prover.Substs.nt_subst_st_comp", - "equation_Pulse.Prover.Substs.nt_subst_term", - "equation_Pulse.Prover.Substs.nt_substs", + "equation_Pulse.Checker.Prover.Substs.nt_subst_comp", + "equation_Pulse.Checker.Prover.Substs.nt_subst_st_comp", + "equation_Pulse.Checker.Prover.Substs.nt_subst_term", + "equation_Pulse.Checker.Prover.Substs.nt_substs", "equation_Pulse.Syntax.Base.comp_inames", "equation_Pulse.Syntax.Base.comp_res", "equation_Pulse.Syntax.Base.st_comp_of_comp", @@ -1460,7 +1483,7 @@ "kinding_Pulse.Syntax.Base.st_comp@tok", "kinding_Pulse.Syntax.Base.term@tok", "kinding_Pulse.Syntax.Naming.subst_elt@tok", "l_or-interp", - "lemma_Pulse.Prover.Substs.nt_substs_st_comp_commutes", + "lemma_Pulse.Checker.Prover.Substs.nt_substs_st_comp_commutes", "primitive_Prims.op_BarBar", "proj_equation_Prims.Cons_hd", "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", @@ -1480,7 +1503,7 @@ "projection_inverse_Pulse.Syntax.Naming.NT__1", "refinement_interpretation_Tm_refine_98cef3ee6a2061303e53ccf185ee1a01", "string_typing", "subterm_ordering_Prims.Cons", - "typing_Pulse.Prover.Substs.nt_subst_comp", + "typing_Pulse.Checker.Prover.Substs.nt_subst_comp", "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__post", "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__pre", "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__res", @@ -1491,10 +1514,10 @@ "typing_Tm_abs_a710033180f8da1aa5a51a6e77454ded" ], 0, - "600c387d122a0cc72c34dbeaf2f712fa" + "d439e0e16d043634e8a404c05020479f" ], [ - "Pulse.Prover.Substs.well_typed_nt_substs", + "Pulse.Checker.Prover.Substs.well_typed_nt_substs", 1, 2, 1, @@ -1504,9 +1527,10 @@ "@fuel_correspondence_FStar.List.Tot.Base.memP.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.length.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.memP.fuel_instrumented", - "@query", "binder_x_64bddace2d9f7b6ebca89cf6106fa8b3_2", + "@query", "binder_x_ad7a992e74bbb15bb2b5bad6dc203499_2", "constructor_distinct_Prims.Cons", "disc_equation_Prims.Cons", - "equation_Prims.nat", "equation_Pulse.Prover.Substs.nt_substs", + "equation_Prims.nat", + "equation_Pulse.Checker.Prover.Substs.nt_substs", "equation_Pulse.Typing.Env.binding", "equation_with_fuel_FStar.List.Tot.Base.length.fuel_instrumented", "equation_with_fuel_FStar.List.Tot.Base.memP.fuel_instrumented", @@ -1524,34 +1548,35 @@ "typing_FStar.List.Tot.Base.length", "well-founded-ordering-on-nat" ], 0, - "3f0028dddb3fdcedb48dabdde5529be2" + "4a52474a53d7831fade20b2d20df5e37" ], [ - "Pulse.Prover.Substs.is_permutation", + "Pulse.Checker.Prover.Substs.is_permutation", 1, 2, 1, [ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.memP.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.remove_l.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.remove_l.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.memP.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.remove_l.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.remove_l.fuel_instrumented", "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "binder_x_64bddace2d9f7b6ebca89cf6106fa8b3_0", - "binder_x_f4b00518131d7cc5c1119eb28f4fd1c0_1", "bool_inversion", + "binder_x_4327eaaee19bf7052534cb918abcaca5_1", + "binder_x_ad7a992e74bbb15bb2b5bad6dc203499_0", "constructor_distinct_Prims.Cons", - "data_elim_Pulse.Prover.Substs.Mkss_t", + "data_elim_Pulse.Checker.Prover.Substs.Mkss_t", "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Prover.Substs.nt_substs", - "equation_Pulse.Prover.Substs.remove_map", - "equation_Pulse.Prover.Substs.ss_map", + "equation_Prims.nat", + "equation_Pulse.Checker.Prover.Substs.nt_substs", + "equation_Pulse.Checker.Prover.Substs.remove_map", + "equation_Pulse.Checker.Prover.Substs.ss_map", "equation_Pulse.Syntax.Base.tm_unknown", "equation_Pulse.Syntax.Base.var", "equation_with_fuel_FStar.List.Tot.Base.memP.fuel_instrumented", - "fuel_guarded_inversion_Pulse.Prover.Substs.ss_t", + "fuel_guarded_inversion_Pulse.Checker.Prover.Substs.ss_t", "function_token_typing_Prims.int", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", @@ -1561,85 +1586,84 @@ "lemma_FStar.Map.lemma_SelRestrict", "lemma_FStar.Map.lemma_SelUpd1", "lemma_FStar.Map.lemma_SelUpd2", "lemma_FStar.Set.mem_complement", "lemma_FStar.Set.mem_singleton", - "lemma_Pulse.Prover.Substs.is_dom_mem", - "lemma_Pulse.Prover.Substs.is_dom_remove", + "lemma_Pulse.Checker.Prover.Substs.is_dom_mem", + "lemma_Pulse.Checker.Prover.Substs.is_dom_remove", "primitive_Prims.op_AmpAmp", "primitive_Prims.op_Equality", "primitive_Prims.op_Negation", - "proj_equation_Pulse.Prover.Substs.Mkss_t_l", - "proj_equation_Pulse.Prover.Substs.Mkss_t_m", + "proj_equation_Pulse.Checker.Prover.Substs.Mkss_t_l", + "proj_equation_Pulse.Checker.Prover.Substs.Mkss_t_m", "projection_inverse_BoxBool_proj_0", "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", "projection_inverse_Prims.Cons_a", "projection_inverse_Prims.Cons_hd", "projection_inverse_Prims.Cons_tl", - "refinement_interpretation_Tm_refine_1a8c2398238a88ffd0bf6c5c12a68a91", + "refinement_interpretation_Tm_refine_285cecbf48216c6c6f9c751ebdbc36da", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_523fcfdbd5bea7c684ab12a4989dbd42", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "refinement_interpretation_Tm_refine_743a26899815015983075ea3d48d9ce0", - "refinement_interpretation_Tm_refine_75fa5e5396db5e4ef709e18b93c17d66", "refinement_interpretation_Tm_refine_98cef3ee6a2061303e53ccf185ee1a01", - "refinement_interpretation_Tm_refine_e1f5d7542df60d25c1cc7704f2707a6f", + "refinement_interpretation_Tm_refine_be318f37ef272b844b07ed82bd9fff42", "refinement_interpretation_Tm_refine_e9f0f8d04c3ac842acb94e971295cb21", "string_typing", "subterm_ordering_Prims.Cons", - "typing_FStar.Map.contains", "typing_FStar.Map.upd", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.complement", - "typing_FStar.Set.singleton", - "typing_Pulse.Prover.Substs.__proj__Mkss_t__item__l", - "typing_Pulse.Prover.Substs.__proj__Mkss_t__item__m", - "typing_Pulse.Prover.Substs.remove_map", + "typing_FStar.Map.upd", "typing_FStar.Reflection.V2.Data.var", + "typing_FStar.Set.complement", "typing_FStar.Set.singleton", + "typing_Pulse.Checker.Prover.Substs.__proj__Mkss_t__item__l", + "typing_Pulse.Checker.Prover.Substs.__proj__Mkss_t__item__m", "typing_Pulse.Syntax.Base.tm_unknown" ], 0, - "fba7f494193c6496ef78620865416bf1" + "125bf474bd515655f0fe39046275f16d" ], [ - "Pulse.Prover.Substs.ss_to_nt_substs", + "Pulse.Checker.Prover.Substs.ss_to_nt_substs", 1, 2, 1, [ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.memP.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.is_permutation.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.no_repeats.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.remove_l.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.well_typed_nt_substs.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.is_permutation.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.remove_l.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.well_typed_nt_substs.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.memP.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.is_permutation.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.remove_l.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.well_typed_nt_substs.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.is_permutation.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.remove_l.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.well_typed_nt_substs.fuel_instrumented", "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", "b2t_def", "bool_inversion", "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", "constructor_distinct_Pulse.Syntax.Naming.NT", "data_elim_FStar.Tactics.Result.Success", "data_elim_Prims.Cons", - "data_elim_Pulse.Prover.Substs.Mkss_t", + "data_elim_Pulse.Checker.Prover.Substs.Mkss_t", "data_typing_intro_Prims.Cons@tok", "data_typing_intro_Prims.Nil@tok", "data_typing_intro_Pulse.Syntax.Naming.NT@tok", "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", "disc_equation_Pulse.Syntax.Naming.NT", "eq2-interp", "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Prover.Substs.nt_substs", - "equation_Pulse.Prover.Substs.remove_map", - "equation_Pulse.Prover.Substs.ss_dom", - "equation_Pulse.Prover.Substs.ss_map", + "equation_Prims.nat", + "equation_Pulse.Checker.Prover.Substs.nt_substs", + "equation_Pulse.Checker.Prover.Substs.remove_map", + "equation_Pulse.Checker.Prover.Substs.ss_dom", + "equation_Pulse.Checker.Prover.Substs.ss_map", "equation_Pulse.Syntax.Base.tm_unknown", "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Typing.Env.binding", "equation_Pulse.Typing.tot_typing", "equation_with_fuel_FStar.List.Tot.Base.memP.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.is_dom.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.is_permutation.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.no_repeats.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.well_typed_nt_substs.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.is_dom.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.is_permutation.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.no_repeats.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.well_typed_nt_substs.fuel_instrumented", "false_interp", "fuel_guarded_inversion_FStar.Tactics.Result.__result", "fuel_guarded_inversion_Prims.list", - "fuel_guarded_inversion_Pulse.Prover.Substs.ss_t", + "fuel_guarded_inversion_Pulse.Checker.Prover.Substs.ss_t", "function_token_typing_Prims.int", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", @@ -1650,12 +1674,12 @@ "lemma_FStar.Map.lemma_SelUpd2", "lemma_FStar.Pervasives.invertOption", "lemma_FStar.Set.mem_complement", "lemma_FStar.Set.mem_singleton", - "lemma_Pulse.Prover.Substs.is_dom_mem", - "lemma_Pulse.Prover.Substs.is_dom_remove", + "lemma_Pulse.Checker.Prover.Substs.is_dom_mem", + "lemma_Pulse.Checker.Prover.Substs.is_dom_remove", "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", "primitive_Prims.op_Equality", "primitive_Prims.op_Negation", - "proj_equation_Pulse.Prover.Substs.Mkss_t_l", - "proj_equation_Pulse.Prover.Substs.Mkss_t_m", + "proj_equation_Pulse.Checker.Prover.Substs.Mkss_t_l", + "proj_equation_Pulse.Checker.Prover.Substs.Mkss_t_m", "projection_inverse_BoxBool_proj_0", "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", @@ -1667,42 +1691,112 @@ "projection_inverse_Prims.Cons_tl", "projection_inverse_Prims.Nil_a", "projection_inverse_Pulse.Syntax.Naming.NT__0", "projection_inverse_Pulse.Syntax.Naming.NT__1", - "refinement_interpretation_Tm_refine_0fe8979aecfdc367377f2f7bffef3582", - "refinement_interpretation_Tm_refine_1a8c2398238a88ffd0bf6c5c12a68a91", + "refinement_interpretation_Tm_refine_1497917207d3c8a12a5a000e1eba1ba0", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_523fcfdbd5bea7c684ab12a4989dbd42", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_6fde482ad27410431b582b6c26423a41", + "refinement_interpretation_Tm_refine_5d5b629a0cb615e7ec600487bbbc7a10", + "refinement_interpretation_Tm_refine_6c78cd0d452f265d33d4a3b51c7e958e", "refinement_interpretation_Tm_refine_743a26899815015983075ea3d48d9ce0", - "refinement_interpretation_Tm_refine_75fa5e5396db5e4ef709e18b93c17d66", "refinement_interpretation_Tm_refine_98cef3ee6a2061303e53ccf185ee1a01", - "refinement_interpretation_Tm_refine_cab865d7bf4d16d83feddc42e67d8039", + "refinement_interpretation_Tm_refine_be318f37ef272b844b07ed82bd9fff42", "refinement_interpretation_Tm_refine_e9f0f8d04c3ac842acb94e971295cb21", "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_kinding_Tm_refine_cab865d7bf4d16d83feddc42e67d8039", + "refinement_kinding_Tm_refine_5d5b629a0cb615e7ec600487bbbc7a10", "string_typing", "typing_FStar.Map.contains", "typing_FStar.Map.upd", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.complement", "typing_FStar.Set.singleton", - "typing_Pulse.Prover.Substs.__proj__Mkss_t__item__l", - "typing_Pulse.Prover.Substs.remove_map", + "typing_Pulse.Checker.Prover.Substs.__proj__Mkss_t__item__l", + "typing_Pulse.Checker.Prover.Substs.remove_map", "typing_Pulse.Syntax.Base.tm_unknown" ], 0, - "c0421aaa99b49615069e1bc21b165f45" + "9af024349188d79f8a535bab5d0a9c76" ], [ - "Pulse.Prover.Substs.st_typing_nt_substs", + "Pulse.Checker.Prover.Substs.well_typed_nt_substs_prefix", + 1, + 2, + 1, + [ + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_FStar.List.Tot.Base.append.fuel_instrumented", + "@fuel_correspondence_FStar.List.Tot.Base.length.fuel_instrumented", + "@fuel_correspondence_FStar.List.Tot.Base.memP.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.well_typed_nt_substs.fuel_instrumented", + "@fuel_irrelevance_FStar.List.Tot.Base.length.fuel_instrumented", + "@fuel_irrelevance_FStar.List.Tot.Base.memP.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.well_typed_nt_substs.fuel_instrumented", + "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "binder_x_1ad99e5433effa849e32ef9adfa111a0_0", + "binder_x_1ad99e5433effa849e32ef9adfa111a0_1", + "binder_x_1ad99e5433effa849e32ef9adfa111a0_3", + "binder_x_ad7a992e74bbb15bb2b5bad6dc203499_2", + "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", + "constructor_distinct_Pulse.Syntax.Naming.NT", + "data_typing_intro_Prims.Nil@tok", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", + "disc_equation_Pulse.Syntax.Naming.NT", + "equation_FStar.List.Tot.Base.op_At", + "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_Prims.l_and", "equation_Prims.nat", + "equation_Pulse.Checker.Prover.Substs.nt_substs", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.binding", + "equation_Pulse.Typing.Env.env_bindings", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.extends_with", + "equation_with_fuel_FStar.List.Tot.Base.append.fuel_instrumented", + "equation_with_fuel_FStar.List.Tot.Base.length.fuel_instrumented", + "equation_with_fuel_FStar.List.Tot.Base.memP.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.well_typed_nt_substs.fuel_instrumented", + "false_interp", "fuel_guarded_inversion_Prims.list", + "function_token_typing_Prims.__cache_version_number__", + "function_token_typing_Pulse.Typing.Env.binding", "int_inversion", + "kinding_Pulse.Syntax.Naming.subst_elt@tok", "l_and-interp", + "l_or-interp", "lemma_Pulse.Typing.Env.push_env_bindings", + "primitive_Prims.op_Addition", + "proj_equation_FStar.Pervasives.Native.Mktuple2__1", + "proj_equation_FStar.Pervasives.Native.Mktuple2__2", + "proj_equation_Prims.Cons_hd", "projection_inverse_BoxBool_proj_0", + "projection_inverse_BoxInt_proj_0", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_FStar.Pervasives.Native.Mktuple3__1", + "projection_inverse_FStar.Pervasives.Native.Mktuple3__2", + "projection_inverse_FStar.Pervasives.Native.Mktuple3__3", + "projection_inverse_Prims.Cons_a", + "projection_inverse_Prims.Cons_hd", + "projection_inverse_Prims.Cons_tl", "projection_inverse_Prims.Nil_a", + "projection_inverse_Pulse.Syntax.Naming.NT__0", + "projection_inverse_Pulse.Syntax.Naming.NT__1", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_98cef3ee6a2061303e53ccf185ee1a01", + "string_typing", "true_interp", "typing_FStar.List.Tot.Base.length", + "typing_Pulse.Typing.Env.bindings", + "typing_Pulse.Typing.Env.fstar_env", "well-founded-ordering-on-nat" + ], + 0, + "11131307f53182048df763bb317b4765" + ], + [ + "Pulse.Checker.Prover.Substs.st_typing_nt_substs", 1, 2, 1, [ "@MaxIFuel_assumption", "@query", "bool_inversion", + "disc_equation_Pulse.Syntax.Base.C_Tot", "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.comp_st", "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Typing.Env.disjoint", "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", + "equation_Pulse.Typing.Env.pairwise_disjoint", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", "lemma_FStar.Map.lemma_ContainsDom", "lemma_FStar.Map.lemma_InDomConcat", "lemma_FStar.Set.lemma_equal_elim", @@ -1714,28 +1808,31 @@ "projection_inverse_BoxBool_proj_0", "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_a893420d66964b8e290c7368f29b02ca", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_f7156eab60b4d289049a25ba0b1bb195", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", "typing_FStar.Set.intersect", "typing_FStar.Set.mem", "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" ], 0, - "568734d6a60772c4d00f8de5b71cf14c" + "8e46d4ad02ddcf32f08bf559243ae01e" ], [ - "Pulse.Prover.Substs.st_typing_nt_substs", + "Pulse.Checker.Prover.Substs.st_typing_nt_substs", 2, 2, 1, [ "@MaxIFuel_assumption", "@query", "bool_inversion", + "disc_equation_Pulse.Syntax.Base.C_Tot", "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.comp_st", "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Typing.Env.disjoint", "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", + "equation_Pulse.Typing.Env.pairwise_disjoint", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", "lemma_FStar.Map.lemma_ContainsDom", "lemma_FStar.Map.lemma_InDomConcat", "lemma_FStar.Set.lemma_equal_elim", @@ -1747,16 +1844,17 @@ "projection_inverse_BoxBool_proj_0", "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_a893420d66964b8e290c7368f29b02ca", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_f7156eab60b4d289049a25ba0b1bb195", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", "typing_FStar.Set.intersect", "typing_FStar.Set.mem", "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" ], 0, - "ad903b3b9ee938838929ab31411acfdf" + "b9dc5995ce96abacfb633a5eb4aeb90d" ], [ - "Pulse.Prover.Substs.st_typing_nt_substs", + "Pulse.Checker.Prover.Substs.st_typing_nt_substs", 3, 2, 1, @@ -1765,26 +1863,26 @@ "@fuel_correspondence_FStar.List.Tot.Base.fold_left.fuel_instrumented", "@fuel_correspondence_FStar.List.Tot.Base.length.fuel_instrumented", "@fuel_correspondence_FStar.List.Tot.Base.memP.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.well_typed_nt_substs.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.well_typed_nt_substs.fuel_instrumented", "@fuel_correspondence_Pulse.Syntax.Naming.subst_st_term.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.fold_left.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.length.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.memP.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.well_typed_nt_substs.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.well_typed_nt_substs.fuel_instrumented", "@query", "FStar.List.Tot.Base_interpretation_Tm_arrow_f0225aaf6b987d44876e7f498390aa39", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "Pulse.Prover.Substs_interpretation_Tm_arrow_4aff1389c612fb274ef6cf645fe0fa4a", - "Pulse.Prover.Substs_interpretation_Tm_arrow_50030717a59cc69d06870061b1f7deb4", - "Pulse.Prover.Substs_interpretation_Tm_arrow_5b7c01c61427720305b90a2a0d9f76ec", + "Pulse.Checker.Prover.Substs_interpretation_Tm_arrow_4aff1389c612fb274ef6cf645fe0fa4a", + "Pulse.Checker.Prover.Substs_interpretation_Tm_arrow_50030717a59cc69d06870061b1f7deb4", + "Pulse.Checker.Prover.Substs_interpretation_Tm_arrow_5b7c01c61427720305b90a2a0d9f76ec", "Pulse.Syntax.Base_pretyping_01e6cbbfeab3ba416b144f2c9223a2d4", "Pulse.Syntax.Base_pretyping_b015b044c5bf00a3dd3df9fa711c87dd", "binder_x_01e6cbbfeab3ba416b144f2c9223a2d4_3", "binder_x_1ad99e5433effa849e32ef9adfa111a0_0", "binder_x_1ad99e5433effa849e32ef9adfa111a0_1", "binder_x_4491f3e96d1227aab97069fc644036e1_4", - "binder_x_62788b34f757e047b3ca0031dc3c412d_6", - "binder_x_e0ca80c9d2bca29cf41de2ca31df25fd_2", "bool_inversion", + "binder_x_7ab694a87fc93464ac8ad15fb6ee914a_2", + "binder_x_e646d8345e2cc4469a45893d6bf0973b_6", "bool_inversion", "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", "constructor_distinct_Pulse.Syntax.Base.C_ST", "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", @@ -1798,10 +1896,10 @@ "equation_FStar.Reflection.Typing.fstar_top_env", "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Prover.Substs.nt_subst_comp", - "equation_Pulse.Prover.Substs.nt_subst_env", - "equation_Pulse.Prover.Substs.nt_subst_st_term", - "equation_Pulse.Prover.Substs.nt_substs", + "equation_Pulse.Checker.Prover.Substs.nt_subst_comp", + "equation_Pulse.Checker.Prover.Substs.nt_subst_env", + "equation_Pulse.Checker.Prover.Substs.nt_subst_st_term", + "equation_Pulse.Checker.Prover.Substs.nt_substs", "equation_Pulse.Syntax.Base.comp_st", "equation_Pulse.Syntax.Base.ppname_default", "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", @@ -1812,14 +1910,13 @@ "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.env_bindings", "equation_Pulse.Typing.Env.equal", - "equation_Pulse.Typing.Metatheory.nt", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "equation_Pulse.Typing.Metatheory.singleton_env", - "equation_Pulse.Typing.Metatheory.subst_env", + "equation_Pulse.Typing.Env.pairwise_disjoint", + "equation_Pulse.Typing.Env.singleton_env", + "equation_Pulse.Typing.Metatheory.Base.nt", "equation_with_fuel_FStar.List.Tot.Base.fold_left.fuel_instrumented", "equation_with_fuel_FStar.List.Tot.Base.length.fuel_instrumented", "equation_with_fuel_FStar.List.Tot.Base.memP.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.Substs.well_typed_nt_substs.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.well_typed_nt_substs.fuel_instrumented", "false_interp", "fuel_guarded_inversion_FStar.Pervasives.Native.tuple3", "fuel_guarded_inversion_Prims.list", @@ -1828,7 +1925,7 @@ "function_token_typing_Prims.__cache_version_number__", "function_token_typing_Pulse.Typing.Env.binding", "function_token_typing_Pulse.Typing.Env.env", "int_inversion", - "interpretation_Tm_abs_911a4867a8c9f455684310793197d293", + "interpretation_Tm_abs_7cb7d7ad8e9de372eae4aaeb72e37234", "interpretation_Tm_abs_9221b4287e6d2d711da0e1b1af792f1b", "interpretation_Tm_abs_bd6a78e0ce65a0d22871e601c0a470a3", "kinding_Pulse.Syntax.Base.comp@tok", @@ -1861,21 +1958,21 @@ "projection_inverse_Prims.Cons_tl", "projection_inverse_Pulse.Syntax.Naming.NT__1", "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", - "refinement_interpretation_Tm_refine_129395affdd8d026c2be2455be50b7e3", "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", "refinement_interpretation_Tm_refine_30687c6bbf76a4ea67eae131536eafd7", + "refinement_interpretation_Tm_refine_482eebbc99bd7fd6ae7ea0cc8089952d", "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", - "refinement_interpretation_Tm_refine_48ed0fc82d95501c4309f80415b210a3", "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "refinement_interpretation_Tm_refine_55d6ad08bafbd73ce23fa2cb022f3a7f", "refinement_interpretation_Tm_refine_5d038f4dc57ccd0fa38b48276342c675", + "refinement_interpretation_Tm_refine_7433f2bbc29a8b9b229c0c924efea5ac", "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", "refinement_interpretation_Tm_refine_98cef3ee6a2061303e53ccf185ee1a01", "string_typing", "typing_FStar.List.Tot.Base.length", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Prover.Substs.nt_subst_env", + "typing_Pulse.Checker.Prover.Substs.nt_subst_env", "typing_Pulse.Syntax.Base.ppname_default", "typing_Pulse.Syntax.Base.uu___is_C_Tot", "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.bindings", @@ -1883,53 +1980,174 @@ "typing_Pulse.Typing.Env.mk_env", "typing_Pulse.Typing.Env.push_binding", "typing_Pulse.Typing.Env.push_env", - "typing_Pulse.Typing.Metatheory.subst_env", - "typing_Tm_abs_911a4867a8c9f455684310793197d293", + "typing_Pulse.Typing.Env.subst_env", + "typing_Tm_abs_7cb7d7ad8e9de372eae4aaeb72e37234", "typing_Tm_abs_9221b4287e6d2d711da0e1b1af792f1b", "typing_Tm_abs_bd6a78e0ce65a0d22871e601c0a470a3", "well-founded-ordering-on-nat" ], 0, - "b43cb013d8196046d51b7fa2b0dbe137" + "85c4950acdeac5f79ee5123f99ef9b3c" ], [ - "Pulse.Prover.Substs.st_typing_nt_substs_derived", + "Pulse.Checker.Prover.Substs.st_typing_subst", 1, 2, 1, [ "@MaxIFuel_assumption", "@query", "bool_inversion", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.dom" + ], + 0, + "50435fc7f06c73861766225510d5f9e2" + ], + [ + "Pulse.Checker.Prover.Substs.st_typing_subst", + 2, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.dom" + ], + 0, + "ff6a16500550f159bbe212392bd2f2c2" + ], + [ + "Pulse.Checker.Prover.Substs.st_typing_subst", + 3, + 2, + 1, + [ + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_FStar.List.Tot.Base.append.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.is_permutation.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.ss_comp.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.ss_st_term.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.well_typed_nt_substs.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.is_permutation.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.ss_comp.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.ss_st_term.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.well_typed_nt_substs.fuel_instrumented", + "@query", "bool_inversion", "constructor_distinct_Prims.Nil", + "data_elim_FStar.Tactics.Result.Success", + "equation_FStar.List.Tot.Base.op_At", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Checker.Prover.Substs.nt_subst_env", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.binding", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.env_bindings", + "equation_Pulse.Typing.Env.equal", + "equation_Pulse.Typing.Env.pairwise_disjoint", + "equation_with_fuel_FStar.List.Tot.Base.append.fuel_instrumented", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Pulse.Checker.Prover.Substs.ss_t", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", + "function_token_typing_Pulse.Typing.Env.binding", + "lemma_FStar.Pervasives.invertOption", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Checker.Prover.Substs.ss_nt_subst", + "lemma_Pulse.Typing.Env.equal_elim", + "lemma_Pulse.Typing.Env.mk_env_bs", + "lemma_Pulse.Typing.Env.mk_env_dom", + "lemma_Pulse.Typing.Env.push_env_bindings", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "projection_inverse_BoxBool_proj_0", + "projection_inverse_Prims.Nil_a", + "refinement_interpretation_Tm_refine_30687c6bbf76a4ea67eae131536eafd7", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_5d038f4dc57ccd0fa38b48276342c675", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_a6a90d8166007cc6fd95eef0b29e13af", + "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", + "refinement_kinding_Tm_refine_a6a90d8166007cc6fd95eef0b29e13af", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Checker.Prover.Substs.nt_subst_env", + "typing_Pulse.Typing.Env.bindings", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fstar_env", "typing_Pulse.Typing.Env.mk_env" + ], + 0, + "58a50afa9a18213680f8376e896b9ec5" + ], + [ + "Pulse.Checker.Prover.Substs.st_typing_nt_substs_derived", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "disc_equation_Pulse.Syntax.Base.C_Tot", "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.comp_st", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Typing.Env.disjoint", "equation_Pulse.Typing.Env.dom", "lemma_FStar.Set.lemma_equal_elim", "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", "typing_FStar.Set.intersect", "typing_FStar.Set.mem", "typing_Pulse.Typing.Env.dom" ], 0, - "e929b4e80b946b8002fa5a4d7c160079" + "267a94e70f8dfe47178bc3cf9b2e031c" ], [ - "Pulse.Prover.Substs.st_typing_nt_substs_derived", + "Pulse.Checker.Prover.Substs.st_typing_nt_substs_derived", 2, 2, 1, [ "@MaxIFuel_assumption", "@query", "bool_inversion", + "disc_equation_Pulse.Syntax.Base.C_Tot", "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.comp_st", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Typing.Env.disjoint", "equation_Pulse.Typing.Env.dom", "lemma_FStar.Set.lemma_equal_elim", "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", "typing_FStar.Set.intersect", "typing_FStar.Set.mem", @@ -1939,7 +2157,7 @@ "ff6a16500550f159bbe212392bd2f2c2" ], [ - "Pulse.Prover.Substs.st_typing_nt_substs_derived", + "Pulse.Checker.Prover.Substs.st_typing_nt_substs_derived", 3, 2, 1, @@ -1957,7 +2175,7 @@ "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.env_bindings", "equation_Pulse.Typing.Env.equal", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", + "equation_Pulse.Typing.Env.pairwise_disjoint", "equation_with_fuel_FStar.List.Tot.Base.append.fuel_instrumented", "function_token_typing_Prims.int", "function_token_typing_Pulse.Typing.Env.binding", @@ -1989,7 +2207,7 @@ "typing_Pulse.Typing.Env.mk_env" ], 0, - "4f977516d781efdfc7454dc028c8a4c5" + "09ccfa29af4dafadd1b9485de983b152" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Prover.Substs.fsti b/lib/steel/pulse/Pulse.Checker.Prover.Substs.fsti similarity index 89% rename from lib/steel/pulse/Pulse.Prover.Substs.fsti rename to lib/steel/pulse/Pulse.Checker.Prover.Substs.fsti index 9df7d2619..c4e0ac09e 100644 --- a/lib/steel/pulse/Pulse.Prover.Substs.fsti +++ b/lib/steel/pulse/Pulse.Checker.Prover.Substs.fsti @@ -1,11 +1,10 @@ -module Pulse.Prover.Substs +module Pulse.Checker.Prover.Substs open FStar.List.Tot open Pulse.Syntax open Pulse.Typing.Env open Pulse.Typing -open Pulse.Typing.Metatheory module L = FStar.List.Tot module T = FStar.Tactics @@ -26,6 +25,8 @@ val push (ss:ss_t) (x:var { ~ (contains ss x) }) (t:term) : ss_t val push_ss (ss1:ss_t) (ss2:ss_t { Set.disjoint (dom ss1) (dom ss2) }) : ss_t +val check_disjoint (ss1 ss2:ss_t) : b:bool { b ==> Set.disjoint (dom ss1) (dom ss2) } + val push_as_map (ss1 ss2:ss_t) : Lemma (requires Set.disjoint (dom ss1) (dom ss2)) (ensures as_map (push_ss ss1 ss2) == Map.concat (as_map ss1) (as_map ss2)) @@ -101,7 +102,6 @@ val nt_subst_comp_commutes (c:comp) (nts:nt_substs) (nt_subst_st_comp (st_comp_of_comp c) nts)))) [SMTPat (nt_subst_comp c nts)] - let rec well_typed_nt_substs (g:env) (uvs:env) (nts:nt_substs) : Tot Type0 (decreases L.length nts) = @@ -117,8 +117,15 @@ let rec well_typed_nt_substs (g:env) (uvs:env) (nts:nt_substs) val is_permutation (nts:nt_substs) (ss:ss_t) : Type0 val ss_to_nt_substs (g:env) (uvs:env) (ss:ss_t) - : T.Tac (option (nts:nt_substs { well_typed_nt_substs g uvs nts /\ - is_permutation nts ss })) + : T.Tac (either (nts:nt_substs { well_typed_nt_substs g uvs nts /\ + is_permutation nts ss }) + string) + +val well_typed_nt_substs_prefix (g:env) (uvs:env) (nts:nt_substs) + (uvs1:env) + : Pure nt_substs + (requires well_typed_nt_substs g uvs nts /\ env_extends uvs uvs1) + (ensures fun nts1 -> well_typed_nt_substs g uvs1 nts1) val ss_nt_subst (g:env) (uvs:env) (ss:ss_t) (nts:nt_substs) : Lemma (requires disjoint uvs g /\ well_typed_nt_substs g uvs nts /\ is_permutation nts ss) @@ -130,12 +137,19 @@ val ss_nt_subst (g:env) (uvs:env) (ss:ss_t) (nts:nt_substs) (forall (s:st_comp). nt_subst_st_comp s nts == ss_st_comp s ss)) [SMTPat (well_typed_nt_substs g uvs nts); SMTPat (is_permutation nts ss)] + val st_typing_nt_substs (g:env) (uvs:env) (g':env { pairwise_disjoint g uvs g' }) (#t:st_term) (#c:comp_st) (t_typing:st_typing (push_env g (push_env uvs g')) t c) (ss:nt_substs { well_typed_nt_substs g uvs ss }) : st_typing (push_env g (nt_subst_env g' ss)) (nt_subst_st_term t ss) (nt_subst_comp c ss) +// val st_typing_subst (g:env) (uvs:env { disjoint uvs g }) (t:st_term) (c:comp_st) +// (d:st_typing (push_env g uvs) t c) +// (ss:ss_t) + +// : T.Tac (option (st_typing g (ss_st_term t ss) (ss_comp c ss))) + val st_typing_nt_substs_derived (g:env) (uvs:env { disjoint uvs g }) (#t:st_term) (#c:comp_st) (t_typing:st_typing (push_env g uvs) t c) diff --git a/lib/steel/pulse/Pulse.Prover.Substs.fsti.hints b/lib/steel/pulse/Pulse.Checker.Prover.Substs.fsti.hints similarity index 67% rename from lib/steel/pulse/Pulse.Prover.Substs.fsti.hints rename to lib/steel/pulse/Pulse.Checker.Prover.Substs.fsti.hints index d896fbb4d..bb6701395 100644 --- a/lib/steel/pulse/Pulse.Prover.Substs.fsti.hints +++ b/lib/steel/pulse/Pulse.Checker.Prover.Substs.fsti.hints @@ -1,8 +1,8 @@ [ - "c=\u000e{FrM-W", + "RNA\u001fN0", [ [ - "Pulse.Prover.Substs.as_map", + "Pulse.Checker.Prover.Substs.as_map", 1, 2, 1, @@ -14,10 +14,10 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "595d5a2f4ddffd7f6d5f5165d9a4fdb2" + "525c6fe54c20b834137545b2ad5e1370" ], [ - "Pulse.Prover.Substs.dom", + "Pulse.Checker.Prover.Substs.dom", 1, 2, 1, @@ -29,10 +29,10 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "36136118d9ce2895131be92febdaae13" + "d6753a5e357088ca1c0467113f07b382" ], [ - "Pulse.Prover.Substs.contains", + "Pulse.Checker.Prover.Substs.contains", 1, 2, 1, @@ -44,10 +44,10 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "63d9372e3bd72ec56a22681aff33c274" + "cb8a8c8871ed9d1108b3c65c95f2643a" ], [ - "Pulse.Prover.Substs.sel", + "Pulse.Checker.Prover.Substs.sel", 1, 2, 1, @@ -59,10 +59,10 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "1ff6b8f0ab859b6535e222c6465ff064" + "474a41ca349ad98ac2e4f26d566ed219" ], [ - "Pulse.Prover.Substs.push_ss", + "Pulse.Checker.Prover.Substs.push_ss", 1, 2, 1, @@ -74,10 +74,25 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "8be0fa3d7ba1943765b4d4c4ce413ef0" + "8dd0b1dbab36240b91b13577fe64b3da" ], [ - "Pulse.Prover.Substs.push_as_map", + "Pulse.Checker.Prover.Substs.check_disjoint", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", + "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" + ], + 0, + "3dd8d50465b8d4ec10d4ea73ed350274" + ], + [ + "Pulse.Checker.Prover.Substs.push_as_map", 1, 2, 1, @@ -90,10 +105,10 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "38c8f3bf071d438c8d1674a1bb80d3a4" + "3e3e28b6631e1087ae28d9c1ef10cd58" ], [ - "Pulse.Prover.Substs.ss_env", + "Pulse.Checker.Prover.Substs.ss_env", 1, 2, 1, @@ -105,10 +120,10 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "ea877e63c0b72e4c0da56f726ce21fe1" + "d7b5bcfaf0df4bdeb5dfb5e4b29c1090" ], [ - "Pulse.Prover.Substs.ss_comp_commutes", + "Pulse.Checker.Prover.Substs.ss_comp_commutes", 1, 2, 1, @@ -120,10 +135,10 @@ "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0" ], 0, - "7c558bb577d71f5ba2f6a1a5ce8d3e72" + "b4793c516647911552b1cf0789cae7ea" ], [ - "Pulse.Prover.Substs.nt_subst_env", + "Pulse.Checker.Prover.Substs.nt_subst_env", 1, 2, 1, @@ -135,10 +150,10 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "cd781273c5a04569d1cefb8fd2295f13" + "e26c03f7e2fd14adc60f187c2b02bbd8" ], [ - "Pulse.Prover.Substs.nt_subst_comp_commutes", + "Pulse.Checker.Prover.Substs.nt_subst_comp_commutes", 1, 2, 1, @@ -150,10 +165,10 @@ "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0" ], 0, - "d467eeab2a9b4f549ca2316171de55fb" + "3a612a61848757ab4b053997ea4ede71" ], [ - "Pulse.Prover.Substs.well_typed_nt_substs", + "Pulse.Checker.Prover.Substs.well_typed_nt_substs", 1, 2, 1, @@ -163,9 +178,10 @@ "@fuel_correspondence_FStar.List.Tot.Base.memP.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.length.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.memP.fuel_instrumented", - "@query", "binder_x_64bddace2d9f7b6ebca89cf6106fa8b3_2", + "@query", "binder_x_ad7a992e74bbb15bb2b5bad6dc203499_2", "constructor_distinct_Prims.Cons", "disc_equation_Prims.Cons", - "equation_Prims.nat", "equation_Pulse.Prover.Substs.nt_substs", + "equation_Prims.nat", + "equation_Pulse.Checker.Prover.Substs.nt_substs", "equation_Pulse.Typing.Env.binding", "equation_with_fuel_FStar.List.Tot.Base.length.fuel_instrumented", "equation_with_fuel_FStar.List.Tot.Base.memP.fuel_instrumented", @@ -183,22 +199,24 @@ "typing_FStar.List.Tot.Base.length", "well-founded-ordering-on-nat" ], 0, - "3f0028dddb3fdcedb48dabdde5529be2" + "4a52474a53d7831fade20b2d20df5e37" ], [ - "Pulse.Prover.Substs.st_typing_nt_substs", + "Pulse.Checker.Prover.Substs.st_typing_nt_substs", 1, 2, 1, [ "@MaxIFuel_assumption", "@query", "bool_inversion", + "disc_equation_Pulse.Syntax.Base.C_Tot", "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.comp_st", "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Typing.Env.disjoint", "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", + "equation_Pulse.Typing.Env.pairwise_disjoint", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", "lemma_FStar.Map.lemma_ContainsDom", "lemma_FStar.Map.lemma_InDomConcat", "lemma_FStar.Set.lemma_equal_elim", @@ -210,36 +228,66 @@ "projection_inverse_BoxBool_proj_0", "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_a893420d66964b8e290c7368f29b02ca", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_f7156eab60b4d289049a25ba0b1bb195", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", "typing_FStar.Set.intersect", "typing_FStar.Set.mem", "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" ], 0, - "51edf708859e61165d423b6b836e21e7" + "480e14213ed3f275f79dd7883a8780c6" + ], + [ + "Pulse.Checker.Prover.Substs.st_typing_subst", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.dom" + ], + 0, + "1d10966a41102436199052348c20fa24" ], [ - "Pulse.Prover.Substs.st_typing_nt_substs_derived", + "Pulse.Checker.Prover.Substs.st_typing_nt_substs_derived", 1, 2, 1, [ "@MaxIFuel_assumption", "@query", "bool_inversion", + "disc_equation_Pulse.Syntax.Base.C_Tot", "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.comp_st", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Typing.Env.disjoint", "equation_Pulse.Typing.Env.dom", "lemma_FStar.Set.lemma_equal_elim", "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", "typing_FStar.Set.intersect", "typing_FStar.Set.mem", "typing_Pulse.Typing.Env.dom" ], 0, - "d4489f019ed1ccd198d6bb53bb263cbb" + "267a94e70f8dfe47178bc3cf9b2e031c" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Prover.Util.fst b/lib/steel/pulse/Pulse.Checker.Prover.Util.fst new file mode 100644 index 000000000..eb3e423dd --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Prover.Util.fst @@ -0,0 +1,9 @@ +module Pulse.Checker.Prover.Util + +module RU = Pulse.RuntimeUtils + +let debug_prover g s = + if RU.debug_at_level (fstar_env g) "prover" + then T.print (s ()) + else () + \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Prover.Util.fst.hints b/lib/steel/pulse/Pulse.Checker.Prover.Util.fst.hints new file mode 100644 index 000000000..a1717f00b --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Prover.Util.fst.hints @@ -0,0 +1 @@ +[ "d\bjF\u0014{", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Prover.Util.fsti b/lib/steel/pulse/Pulse.Checker.Prover.Util.fsti new file mode 100644 index 000000000..08919da0b --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Prover.Util.fsti @@ -0,0 +1,9 @@ +module Pulse.Checker.Prover.Util + +open Pulse.Syntax +open Pulse.Typing + +module T = FStar.Tactics.V2 +module PS = Pulse.Checker.Prover.Substs + +val debug_prover (g:env) (s:unit -> T.Tac string) : T.Tac unit diff --git a/lib/steel/pulse/Pulse.Checker.Prover.Util.fsti.hints b/lib/steel/pulse/Pulse.Checker.Prover.Util.fsti.hints new file mode 100644 index 000000000..ba787059b --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Prover.Util.fsti.hints @@ -0,0 +1 @@ +[ "޶z`\"b\u0001(\u0003", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Prover.fst b/lib/steel/pulse/Pulse.Checker.Prover.fst new file mode 100644 index 000000000..d5a22fca0 --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Prover.fst @@ -0,0 +1,393 @@ +module Pulse.Checker.Prover + +open FStar.List.Tot + +open Pulse.Syntax +open Pulse.Typing +open Pulse.Typing.Combinators +open Pulse.Checker.Base + + +module L = FStar.List.Tot +module T = FStar.Tactics.V2 +module P = Pulse.Syntax.Printer +module Metatheory = Pulse.Typing.Metatheory +module PS = Pulse.Checker.Prover.Substs +module ElimExists = Pulse.Checker.Prover.ElimExists +module ElimPure = Pulse.Checker.Prover.ElimPure +module Match = Pulse.Checker.Prover.Match +module IntroExists = Pulse.Checker.Prover.IntroExists +module IntroPure = Pulse.Checker.Prover.IntroPure + + +let coerce_eq (#a #b:Type) (x:a) (_:squash (a == b)) : y:b{y == x} = x + +let unsolved_equiv_pst (#preamble:_) (pst:prover_state preamble) (unsolved':list vprop) + (d:vprop_equiv (push_env pst.pg pst.uvs) (list_as_vprop pst.unsolved) (list_as_vprop unsolved')) + : prover_state preamble = + { pst with unsolved = unsolved'; goals_inv = magic () } + +let remaining_ctxt_equiv_pst (#preamble:_) (pst:prover_state preamble) (remaining_ctxt':list vprop) + (d:vprop_equiv pst.pg (list_as_vprop pst.remaining_ctxt) (list_as_vprop remaining_ctxt')) + : prover_state preamble = + { pst with remaining_ctxt = remaining_ctxt'; + remaining_ctxt_frame_typing = magic (); + k = k_elab_equiv pst.k (VE_Refl _ _) (magic ()) } + +let rec collect_exists (g:env) (l:list vprop) + : exs:list vprop & + rest:list vprop & + vprop_equiv g (list_as_vprop l) (list_as_vprop (exs @ rest)) = + + match l with + | [] -> (| [], [], VE_Refl _ _ |) + | hd::tl -> + let (| exs, rest, _ |) = collect_exists g tl in + match hd.t with + | Tm_ExistsSL _ _ _ -> (| hd::exs, rest, magic () |) + | _ -> (| exs, hd::rest, magic () |) + +let rec collect_pures (g:env) (l:list vprop) + : pures:list vprop & + rest:list vprop & + vprop_equiv g (list_as_vprop l) (list_as_vprop (rest @ pures)) = + + match l with + | [] -> (| [], [], VE_Refl _ _ |) + | hd::tl -> + let (| pures, rest, _ |) = collect_pures g tl in + match hd.t with + | Tm_Pure _ -> (| hd::pures, rest, magic () |) + | _ -> (| pures, hd::rest, magic () |) + +let move_hd_end (g:env) (l:list vprop { Cons? l }) + : vprop_equiv g (list_as_vprop l) (list_as_vprop (L.tl l @ [L.hd l])) = magic () + +let rec match_q (#preamble:_) (pst:prover_state preamble) + (q:vprop) (unsolved':list vprop) + (_:squash (pst.unsolved == q::unsolved')) + (i:nat) + : T.Tac (option (pst':prover_state preamble { pst' `pst_extends` pst })) = + + if L.length pst.remaining_ctxt = 0 + then None + else if i = L.length pst.remaining_ctxt + then None + else + let p = L.hd pst.remaining_ctxt in + let pst_opt = + Match.match_step pst p (L.tl pst.remaining_ctxt) q unsolved' () in + match pst_opt with + | Some pst -> Some pst + | None -> + let pst = + remaining_ctxt_equiv_pst pst (L.tl pst.remaining_ctxt @ [L.hd pst.remaining_ctxt]) + (move_hd_end pst.pg pst.remaining_ctxt) in + match_q pst q unsolved' () (i+1) + +let rec prove_pures #preamble (pst:prover_state preamble) + : T.Tac (pst':prover_state preamble { pst' `pst_extends` pst /\ + is_terminal pst' }) = + + match pst.unsolved with + | [] -> pst + | {t=Tm_Pure p}::unsolved' -> + let pst_opt = IntroPure.intro_pure pst p unsolved' () in + (match pst_opt with + | None -> + fail pst.pg None (Printf.sprintf "prover error: cannot prove pure %s\n" (P.term_to_string p)) + | Some pst1 -> + let pst2 = prove_pures pst1 in + assert (pst1 `pst_extends` pst); + assert (pst2 `pst_extends` pst1); + assert (pst2 `pst_extends` pst); + pst2) + | _ -> + fail pst.pg None + (Printf.sprintf "Impossible! prover.prove_pures: %s is not a pure, please file a bug-report" + (P.term_to_string (L.hd pst.unsolved))) + +#push-options "--z3rlimit_factor 4" +let rec prover + (#preamble:_) + (pst0:prover_state preamble) + : T.Tac (pst':prover_state preamble { pst' `pst_extends` pst0 /\ + is_terminal pst' }) = + + debug_prover pst0.pg (fun _ -> + Printf.sprintf "At the prover top-level with remaining_ctxt: %s\nunsolved: %s" + (P.term_to_string (list_as_vprop pst0.remaining_ctxt)) + (P.term_to_string (list_as_vprop pst0.unsolved))); + + match pst0.unsolved with + | [] -> pst0 + | _ -> + let pst = ElimExists.elim_exists_pst pst0 in + + debug_prover pst.pg (fun _ -> + Printf.sprintf "prover: remaining_ctxt after elim exists: %s\n" + (P.term_to_string (list_as_vprop pst.remaining_ctxt))); + + let pst = ElimPure.elim_pure_pst pst in + + debug_prover pst.pg (fun _ -> + Printf.sprintf "prover: remaining_ctxt after elim pure: %s\n" + (P.term_to_string (list_as_vprop pst.remaining_ctxt))); + + let (| exs, rest, d |) = collect_exists (push_env pst.pg pst.uvs) pst.unsolved in + + debug_prover pst.pg (fun _ -> + Printf.sprintf "prover: tried to pull exists: exs: %s and rest: %s\n" + (P.term_to_string (list_as_vprop exs)) (P.term_to_string (list_as_vprop rest))); + + let pst = unsolved_equiv_pst pst (exs@rest) d in + + debug_prover pst.pg (fun _ -> + Printf.sprintf "prover: unsolved after pulling exists at the top: %s\n" + (P.term_to_string (list_as_vprop pst.unsolved))); + + match pst.unsolved with + | {t=Tm_ExistsSL u b body}::unsolved' -> + IntroExists.intro_exists pst u b body unsolved' () prover + | _ -> + let (| pures, rest, d |) = collect_pures (push_env pst.pg pst.uvs) pst.unsolved in + let pst = unsolved_equiv_pst pst (rest@pures) d in + match pst.unsolved with + | {t=Tm_Pure _}::tl -> prove_pures pst + | q::tl -> + let pst_opt = match_q pst q tl () 0 in + match pst_opt with + | None -> + let msg = Printf.sprintf + "cannot prove vprop %s in the context: %s\n(the prover was started with goal %s and initial context %s)" + (P.term_to_string q) + (P.term_to_string (list_as_vprop pst.remaining_ctxt)) + (P.term_to_string preamble.goals) + (P.term_to_string preamble.ctxt) in + fail pst.pg None msg + | Some pst -> prover pst // a little wasteful? +#pop-options + +let rec get_q_at_hd (g:env) (l:list vprop) (q:vprop { L.existsb (fun v -> eq_tm v q) l }) + : l':list vprop & + vprop_equiv g (list_as_vprop l) (q * list_as_vprop l') = + + match l with + | hd::tl -> + if eq_tm hd q then (| tl, magic () |) + else let (| tl', _ |) = get_q_at_hd g tl q in + (| hd::tl', magic () |) + +#push-options "--z3rlimit_factor 4" +let prove + (#g:env) (#ctxt:vprop) (ctxt_typing:vprop_typing g ctxt) + (uvs:env { disjoint g uvs }) + (#goals:vprop) (goals_typing:vprop_typing (push_env g uvs) goals) + + : T.Tac (g1 : env { g1 `env_extends` g /\ disjoint g1 uvs } & + nts : PS.nt_substs { PS.well_typed_nt_substs g1 uvs nts } & + remaining_ctxt : vprop & + continuation_elaborator g ctxt g1 ((PS.nt_subst_term goals nts) * remaining_ctxt)) = + + debug_prover g (fun _ -> + Printf.sprintf "\nEnter top-level prove with ctxt: %s\ngoals: %s\n" + (P.term_to_string ctxt) (P.term_to_string goals)); + + let ctxt_l = vprop_as_list ctxt in + + if false && Nil? (bindings uvs) && L.existsb (fun v -> eq_tm v goals) ctxt_l + then begin + let (| l', d_eq |) = get_q_at_hd g ctxt_l goals in + let g1 = g in + let nts : PS.nt_substs = [] in + let remaining_ctxt = list_as_vprop l' in + let k : continuation_elaborator g ctxt g1 ctxt = k_elab_unit g ctxt in + assume (list_as_vprop (vprop_as_list ctxt) == ctxt); + let d_eq + : vprop_equiv g ctxt ((PS.nt_subst_term goals nts) * remaining_ctxt) = coerce_eq d_eq () in + (| g1, nts, remaining_ctxt, k_elab_equiv k (VE_Refl _ _) d_eq |) + end + else + let ctxt_frame_typing : vprop_typing g (ctxt * tm_emp) = magic () in + let preamble = { + g0 = g; + ctxt; + frame = tm_emp; + ctxt_frame_typing; + goals; + } in + assume (list_as_vprop (vprop_as_list ctxt) == ctxt); + assume ((PS.empty).(tm_emp) == tm_emp); + let pst0 : prover_state preamble = { + pg = g; + remaining_ctxt = vprop_as_list ctxt; + remaining_ctxt_frame_typing = ctxt_frame_typing; + uvs = uvs; + ss = PS.empty; + solved = tm_emp; + unsolved = vprop_as_list goals; + k = k_elab_equiv (k_elab_unit g ctxt) (magic ()) (magic ()); + goals_inv = magic (); + solved_inv = () + } in + + let pst = prover pst0 in + + let nts : nts:PS.nt_substs { PS.well_typed_nt_substs pst.pg pst.uvs nts /\ + PS.is_permutation nts pst.ss } = + let r = PS.ss_to_nt_substs pst.pg pst.uvs pst.ss in + match r with + | Inr msg -> + fail pst.pg None + (Printf.sprintf "prover error: ill-typed substitutions (%s)" msg) + | Inl nts -> nts in + let nts_uvs = PS.well_typed_nt_substs_prefix pst.pg pst.uvs nts uvs in + let k + : continuation_elaborator + g (ctxt * tm_emp) + pst.pg ((list_as_vprop pst.remaining_ctxt * tm_emp) * (PS.nt_subst_term pst.solved nts)) = pst.k in + // admit () + let goals_inv + : vprop_equiv (push_env pst.pg pst.uvs) goals (list_as_vprop [] * pst.solved) = pst.goals_inv in + let goals_inv + : vprop_equiv pst.pg (PS.nt_subst_term goals nts) (PS.nt_subst_term (list_as_vprop [] * pst.solved) nts) = + PS.vprop_equiv_nt_substs_derived pst.pg pst.uvs goals_inv nts in + + // goals is well-typed in initial g + uvs + // so any of the remaining uvs in pst.uvs should not be in goals + // so we can drop their substitutions from the tail of nts + assume (PS.nt_subst_term goals nts == PS.nt_subst_term goals nts_uvs); + + (| pst.pg, nts_uvs, list_as_vprop pst.remaining_ctxt, k_elab_equiv k (magic ()) (magic ()) |) +#pop-options + +#push-options "--z3rlimit_factor 8 --fuel 1 --ifuel 1" +let try_frame_pre_uvs (#g:env) (#ctxt:vprop) (ctxt_typing:tot_typing g ctxt tm_vprop) + (uvs:env { disjoint g uvs }) + (#t:st_term) (#c:comp_st) (d:st_typing (push_env g uvs) t c) + (res_ppname:ppname) + + : T.Tac (checker_result_t g ctxt None) = + + let g = push_context g "try_frame_pre" t.range in + + let (| g1, nts, remaining_ctxt, k_frame |) = + prove #g #_ ctxt_typing uvs #(comp_pre c) (magic ()) in + // assert (nts == []); + + let d : st_typing (push_env g1 uvs) t c = + Metatheory.st_typing_weakening g uvs t c d g1 in + + assert (comp_pre (PS.nt_subst_comp c nts) == PS.nt_subst_term (comp_pre c) nts); + let t = PS.nt_subst_st_term t nts in + let c = PS.nt_subst_comp c nts in + + let d : st_typing g1 t c = + PS.st_typing_nt_substs_derived g1 uvs d nts in + + let k_frame : continuation_elaborator g ctxt g1 (comp_pre c * remaining_ctxt) = coerce_eq k_frame () in + + let x = fresh g1 in + let ty = comp_res c in + let g2 = push_binding g1 x res_ppname ty in + assert (g2 `env_extends` g1); + let ctxt' = (open_term_nv (comp_post c) (res_ppname, x) * remaining_ctxt) in + + let d : st_typing g1 t c = Metatheory.st_typing_weakening_standard d g1 in + + let k + : continuation_elaborator g1 (remaining_ctxt * comp_pre c) + g2 ctxt' = + continuation_elaborator_with_bind remaining_ctxt d (magic ()) (res_ppname, x) in + + let k + : continuation_elaborator g1 (comp_pre c * remaining_ctxt) + g2 ctxt' = + k_elab_equiv k (VE_Comm _ _ _) (VE_Refl _ _) in + + let k = k_elab_trans k_frame k in + + let comp_res_typing_in_g1, _, f = + Metatheory.st_comp_typing_inversion_cofinite + (Metatheory.comp_typing_inversion (Metatheory.st_typing_correctness d)) in + + let d_ty + : universe_of g2 ty (comp_u c) = + Metatheory.tot_typing_weakening_single comp_res_typing_in_g1 x (comp_res c) in + + assume (~ (x `Set.mem` freevars (comp_post c))); + let d_post + : vprop_typing g2 (open_term_nv (comp_post c) (res_ppname, x)) = + f x in + + // the magic is for the ctxt' typing + // see d_post for post typing + // then the remaining_ctxt typing should come from the prover state + // TODO: add it there + // and then ctxt' is just their `*` + (| x, g2, (| comp_u c, ty, d_ty |), (| ctxt', magic () |), k |) +#pop-options + +let try_frame_pre (#g:env) (#ctxt:vprop) (ctxt_typing:tot_typing g ctxt tm_vprop) + (#t:st_term) (#c:comp_st) (d:st_typing g t c) (res_ppname:ppname) + + : T.Tac (checker_result_t g ctxt None) = + + let uvs = mk_env (fstar_env g) in + assert (equal g (push_env g uvs)); + try_frame_pre_uvs ctxt_typing uvs d res_ppname + +let prove_post_hint (#g:env) (#ctxt:vprop) + (r:checker_result_t g ctxt None) + (post_hint:post_hint_opt g) + (rng:range) + + : T.Tac (checker_result_t g ctxt post_hint) = + + let g = push_context g "prove_post_hint" rng in + + match post_hint with + | None -> r + | Some post_hint -> + let (| x, g2, (| u_ty, ty, ty_typing |), (| ctxt', ctxt'_typing |), k |) = r in + + let ppname = mk_ppname_no_range "_posth" in + let post_hint_opened = open_term_nv post_hint.post (ppname, x) in + + // TODO: subtyping + if not (eq_tm ty post_hint.ret_ty) + then fail g (Some rng) + (Printf.sprintf "error in proving post hint:\ + comp return type %s does not match the post hint %s" + (P.term_to_string ty) + (P.term_to_string post_hint.ret_ty)) + else if eq_tm post_hint_opened ctxt' + then (| x, g2, (| u_ty, ty, ty_typing |), (| ctxt', ctxt'_typing |), k |) + else + let (| g3, nts, remaining_ctxt, k_post |) = + prove #g2 #ctxt' ctxt'_typing (mk_env (fstar_env g2)) #post_hint_opened (magic ()) in + + assert (nts == []); + let k_post + : continuation_elaborator g2 ctxt' g3 (post_hint_opened * remaining_ctxt) = + coerce_eq k_post () in + + match check_equiv_emp g3 remaining_ctxt with + | None -> + fail g (Some rng) + (Printf.sprintf "error in proving post hint:\ + comp post contains extra vprops not matched in the post hint: %s\n" + (P.term_to_string remaining_ctxt)) + | Some d -> + let k_post + : continuation_elaborator g2 ctxt' g3 post_hint_opened = + k_elab_equiv k_post (VE_Refl _ _) (magic ()) in + // + // for the typing of ty in g3, + // we have typing of ty in g2 above, and g3 `env_extends` g2 + // + // + // for the typing of post_hint_opened, + // again post_hint is well-typed in g, and g3 `env_extends` g + // + (| x, g3, (| u_ty, ty, magic () |), (| post_hint_opened, magic () |), k_elab_trans k k_post |) diff --git a/lib/steel/pulse/Pulse.Checker.Prover.fst.hints b/lib/steel/pulse/Pulse.Checker.Prover.fst.hints new file mode 100644 index 000000000..b4d6b3066 --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Prover.fst.hints @@ -0,0 +1,902 @@ +[ + "5.[\beY\r\u001d", + [ + [ + "Pulse.Checker.Prover.coerce_eq", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "refinement_interpretation_Tm_refine_0dee8cb03258a67c2f7ec66427696212" + ], + 0, + "76427ae3c19517bf08bca76e842b34e8" + ], + [ + "Pulse.Checker.Prover.unsolved_equiv_pst", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_uvs", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_3201114dc2ece82edbaf3a0633f82db7", + "refinement_interpretation_Tm_refine_998f5317571047eba4128227bc054984", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__pg", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__uvs", + "typing_Pulse.Typing.Env.dom" + ], + 0, + "bb240033b468b3e7230b64474fb0c365" + ], + [ + "Pulse.Checker.Prover.unsolved_equiv_pst", + 2, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_uvs", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_3201114dc2ece82edbaf3a0633f82db7", + "refinement_interpretation_Tm_refine_998f5317571047eba4128227bc054984", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__pg", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__uvs", + "typing_Pulse.Typing.Env.dom" + ], + 0, + "3ece079c873d760d86c36b0edb71d523" + ], + [ + "Pulse.Checker.Prover.collect_exists", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "binder_x_dde2ec1e863a0bcde2ea8594cff3d454_1", + "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", + "equation_Prims.op_Equals_Equals_Equals", + "equation_Pulse.Syntax.Base.vprop", + "fuel_guarded_inversion_Prims.list", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.List.Tot.Properties.append_l_nil", + "projection_inverse_BoxBool_proj_0", "subterm_ordering_Prims.Cons" + ], + 0, + "4548a3915a723ca8bbcbba0627c34153" + ], + [ + "Pulse.Checker.Prover.collect_pures", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "binder_x_dde2ec1e863a0bcde2ea8594cff3d454_1", + "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", + "equation_Prims.op_Equals_Equals_Equals", + "equation_Pulse.Syntax.Base.vprop", + "fuel_guarded_inversion_Prims.list", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.List.Tot.Properties.append_l_nil", + "projection_inverse_BoxBool_proj_0", "subterm_ordering_Prims.Cons" + ], + 0, + "8236ff07eebbfda97a0e9ee9b053a25b" + ], + [ + "Pulse.Checker.Prover.match_q", + 1, + 2, + 1, + [ + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_FStar.List.Tot.Base.length.fuel_instrumented", + "@fuel_correspondence_Pulse.Typing.Combinators.list_as_vprop.fuel_instrumented", + "@query", "constructor_distinct_Tm_unit", + "data_elim_FStar.Tactics.Result.Success", + "data_elim_Pulse.Checker.Prover.Base.Mkprover_state", + "disc_equation_Prims.Cons", "equation_FStar.List.Tot.Base.hd", + "equation_FStar.List.Tot.Base.tail", + "equation_FStar.List.Tot.Base.tl", "equation_Prims.eqtype", + "equation_Prims.nat", + "equation_Pulse.Checker.Prover.remaining_ctxt_equiv_pst", + "equation_Pulse.Syntax.Base.vprop", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.extends_with", + "equation_with_fuel_FStar.List.Tot.Base.length.fuel_instrumented", + "equation_with_fuel_Pulse.Typing.Combinators.list_as_vprop.fuel_instrumented", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Prims.list", + "fuel_guarded_inversion_Pulse.Checker.Prover.Base.prover_state", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Pervasives.invertOption", "primitive_Prims.op_Addition", + "primitive_Prims.op_Equality", + "proj_equation_Pulse.Checker.Prover.Base.Mkpreamble_g0", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_remaining_ctxt", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_ss", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_unsolved", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_uvs", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_BoxInt_proj_0", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_ss", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_unsolved", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_uvs", + "refinement_interpretation_Tm_refine_3201114dc2ece82edbaf3a0633f82db7", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_cc31469c5037c32a21ab264817e13d53", + "refinement_kinding_Tm_refine_d467b6da218663875fb4670c58386178", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__remaining_ctxt", + "typing_Pulse.Typing.Combinators.list_as_vprop" + ], + 0, + "621e3ac90cd94f9425c8ab80fad18065" + ], + [ + "Pulse.Checker.Prover.prove_pures", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "data_elim_FStar.Tactics.Result.Success", + "data_elim_Pulse.Checker.Prover.Base.Mkprover_state", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", + "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.subset", + "equation_Prims.nat", + "equation_Pulse.Checker.Prover.Base.is_terminal", + "equation_Pulse.Checker.Prover.Base.pst_extends", + "equation_Pulse.Checker.Prover.Base.ss_extends", + "equation_Pulse.Checker.Prover.Substs.contains", + "equation_Pulse.Checker.Prover.Substs.dom", + "equation_Pulse.Syntax.Base.range", + "equation_Pulse.Syntax.Base.tm_pure", + "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.extends_with", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Prims.list", + "fuel_guarded_inversion_Pulse.Checker.Prover.Base.prover_state", + "function_token_typing_Prims.__cache_version_number__", + "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Pervasives.invertOption", + "lemma_Pulse.Syntax.Base.range_singleton", + "lemma_Pulse.Typing.Env.env_extends_refl", + "lemma_Pulse.Typing.Env.env_extends_trans", + "proj_equation_Pulse.Checker.Prover.Base.Mkpreamble_g0", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_ss", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_unsolved", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_uvs", + "proj_equation_Pulse.Syntax.Base.Mkterm_range", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_2fd527fcde0b947169de96ca1a30e30e", + "refinement_interpretation_Tm_refine_3201114dc2ece82edbaf3a0633f82db7", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "refinement_interpretation_Tm_refine_998f5317571047eba4128227bc054984", + "refinement_interpretation_Tm_refine_d467b6da218663875fb4670c58386178", + "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", + "refinement_kinding_Tm_refine_d467b6da218663875fb4670c58386178", + "string_typing", "typing_FStar.Reflection.V2.Data.var", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__pg", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__ss", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__unsolved", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__uvs", + "typing_Pulse.Checker.Prover.Substs.as_map", + "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", + "typing_Pulse.Typing.Env.fstar_env" + ], + 0, + "2ee135d6fac0d204a2ee777fd44d5bcf" + ], + [ + "Pulse.Checker.Prover.prover", + 1, + 2, + 1, + [ + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_FStar.List.Tot.Base.append.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.collect_exists.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.collect_pures.fuel_instrumented", + "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_Prims.Cons", + "constructor_distinct_Pulse.Syntax.Base.Tm_ExistsSL", + "data_elim_FStar.Tactics.Result.Success", "data_elim_Prims.Cons", + "data_elim_Pulse.Checker.Prover.Base.Mkprover_state", + "data_elim_Pulse.Syntax.Base.Mkterm", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", + "equation_FStar.List.Tot.Base.op_At", "equation_FStar.Range.range", + "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_FStar.Set.subset", + "equation_Prims.nat", + "equation_Pulse.Checker.Prover.Base.is_terminal", + "equation_Pulse.Checker.Prover.Base.pst_extends", + "equation_Pulse.Checker.Prover.Base.ss_extends", + "equation_Pulse.Checker.Prover.Substs.contains", + "equation_Pulse.Checker.Prover.Substs.dom", + "equation_Pulse.Checker.Prover.unsolved_equiv_pst", + "equation_Pulse.Syntax.Base.range", + "equation_Pulse.Syntax.Base.tm_exists_sl", + "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.extends_with", + "equation_with_fuel_FStar.List.Tot.Base.append.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.collect_exists.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.collect_pures.fuel_instrumented", + "fuel_guarded_inversion_FStar.Pervasives.dtuple3", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Prims.list", + "fuel_guarded_inversion_Pulse.Checker.Prover.Base.prover_state", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "function_token_typing_Prims.__cache_version_number__", + "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Pervasives.invertOption", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Syntax.Base.range_singleton", + "lemma_Pulse.Typing.Env.env_extends_refl", + "lemma_Pulse.Typing.Env.env_extends_trans", + "primitive_Prims.op_AmpAmp", "proj_equation_Prims.Cons_hd", + "proj_equation_Pulse.Checker.Prover.Base.Mkpreamble_ctxt", + "proj_equation_Pulse.Checker.Prover.Base.Mkpreamble_frame", + "proj_equation_Pulse.Checker.Prover.Base.Mkpreamble_g0", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_ss", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_unsolved", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_uvs", + "proj_equation_Pulse.Syntax.Base.Mkterm_range", + "proj_equation_Pulse.Syntax.Base.Mkterm_t", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Mkdtuple3__1", + "projection_inverse_FStar.Pervasives.Mkdtuple3__2", + "projection_inverse_FStar.Pervasives.Mkdtuple3__3", + "projection_inverse_Prims.Cons_a", + "projection_inverse_Prims.Cons_hd", + "projection_inverse_Prims.Cons_tl", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_ss", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_unsolved", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_uvs", + "projection_inverse_Pulse.Syntax.Base.Mkterm_range", + "projection_inverse_Pulse.Syntax.Base.Mkterm_t", + "projection_inverse_Pulse.Syntax.Base.Tm_ExistsSL_b", + "projection_inverse_Pulse.Syntax.Base.Tm_ExistsSL_body", + "projection_inverse_Pulse.Syntax.Base.Tm_ExistsSL_u", + "refinement_interpretation_Tm_refine_2143809840efecc1e6d26b69d5f82eaf", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_2965b1885cffae7da8ab4b4dc047d022", + "refinement_interpretation_Tm_refine_2fd527fcde0b947169de96ca1a30e30e", + "refinement_interpretation_Tm_refine_3201114dc2ece82edbaf3a0633f82db7", + "refinement_interpretation_Tm_refine_3355ed7a2f0ba7ddfe9dd2a0eecc4406", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_57f98cfc629437c23b1ad18cc90ded34", + "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "refinement_interpretation_Tm_refine_998f5317571047eba4128227bc054984", + "refinement_interpretation_Tm_refine_abade29af6e2d23967e800389ce2999a", + "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", + "refinement_kinding_Tm_refine_3355ed7a2f0ba7ddfe9dd2a0eecc4406", + "string_typing", "typing_FStar.List.Tot.Base.op_At", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Checker.Prover.Base.__proj__Mkpreamble__item__ctxt", + "typing_Pulse.Checker.Prover.Base.__proj__Mkpreamble__item__frame", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__pg", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__ss", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__uvs", + "typing_Pulse.Checker.Prover.Substs.as_map", + "typing_Pulse.Checker.Prover.Substs.dom", + "typing_Pulse.Checker.Prover.collect_exists", + "typing_Pulse.Checker.Prover.collect_pures", + "typing_Pulse.RuntimeUtils.union_ranges", + "typing_Pulse.Syntax.Base.__proj__Mkbinder__item__binder_ty", + "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", + "typing_Pulse.Typing.Env.dom", "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.push_env" + ], + 0, + "6900efe21d23f9ebb29c67b4dc6bc7ed" + ], + [ + "Pulse.Checker.Prover.get_q_at_hd", + 1, + 2, + 1, + [ + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_FStar.List.Tot.Base.existsb.fuel_instrumented", + "@fuel_irrelevance_FStar.List.Tot.Base.existsb.fuel_instrumented", + "@query", + "FStar.Set_interpretation_Tm_arrow_84543425b818e2d10a976186b8e8c250", + "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "Pulse.Syntax.Naming_interpretation_Tm_arrow_12fa1b3ed1cc1655dcad602c3f14587a", + "binder_x_0319b964d409f4c6f7a1762cb6998a90_2", + "binder_x_dde2ec1e863a0bcde2ea8594cff3d454_1", "bool_inversion", + "constructor_distinct_Prims.Cons", "constructor_distinct_Tm_unit", + "disc_equation_Prims.Cons", "equation_Prims.op_Equals_Equals_Equals", + "equation_Pulse.Syntax.Base.vprop", + "equation_with_fuel_FStar.List.Tot.Base.existsb.fuel_instrumented", + "interpretation_Tm_abs_2a2f2a0686938cdbe724315c1a824d61", + "kinding_Pulse.Syntax.Base.term@tok", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_Prims.Cons_a", + "projection_inverse_Prims.Cons_hd", + "projection_inverse_Prims.Cons_tl", + "refinement_interpretation_Tm_refine_80136e9e5b1954e95eea9b00a651c553", + "string_typing", "subterm_ordering_Prims.Cons", + "typing_FStar.List.Tot.Base.existsb", "typing_Prims.uu___is_Cons", + "typing_Tm_abs_2a2f2a0686938cdbe724315c1a824d61", + "typing_Tm_abs_53cd8b855594b9f155c157fb7b929f0e" + ], + 0, + "a0bc6cc1bfa205dbe763e117e984a156" + ], + [ + "Pulse.Checker.Prover.prove", + 1, + 2, + 1, + [ "@query" ], + 0, + "81978f9aa2d124f49f3d927d276771ab" + ], + [ + "Pulse.Checker.Prover.prove", + 2, + 2, + 1, + [ + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.well_typed_nt_substs.fuel_instrumented", + "@fuel_correspondence_Pulse.Syntax.Naming.freevars.fuel_instrumented", + "@fuel_correspondence_Pulse.Typing.Combinators.vprop_as_list.fuel_instrumented", + "@fuel_irrelevance_Pulse.Checker.Prover.Substs.well_typed_nt_substs.fuel_instrumented", + "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_FStar.Tactics.Result.Failed", + "constructor_distinct_FStar.Tactics.Result.Success", + "constructor_distinct_Pulse.Syntax.Base.Tm_Emp", + "data_elim_FStar.Tactics.Result.Success", + "data_typing_intro_Pulse.Checker.Prover.Base.Mkpreamble@tok", + "disc_equation_FStar.Pervasives.Native.None", + "equality_tok_Pulse.Syntax.Base.Tm_Emp@tok", + "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_FStar.Set.subset", + "equation_Prims.nat", + "equation_Pulse.Checker.Prover.Base.is_terminal", + "equation_Pulse.Checker.Prover.Base.op_Array_Access", + "equation_Pulse.Checker.Prover.Base.op_Star", + "equation_Pulse.Checker.Prover.Base.pst_extends", + "equation_Pulse.Syntax.Base.tm_emp", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Syntax.Base.vprop", + "equation_Pulse.Syntax.Base.with_range", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.extends_with", + "equation_with_fuel_Pulse.Syntax.Naming.freevars.fuel_instrumented", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Pulse.Checker.Prover.Base.prover_state", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "function_token_typing_Prims.__cache_version_number__", + "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Pervasives.invertOption", + "lemma_FStar.Set.disjoint_not_in_both", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Checker.Prover.Substs.ss_nt_subst", + "lemma_Pulse.Typing.Env.env_extends_refl", + "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "proj_equation_Pulse.Checker.Prover.Base.Mkpreamble_ctxt", + "proj_equation_Pulse.Checker.Prover.Base.Mkpreamble_frame", + "proj_equation_Pulse.Checker.Prover.Base.Mkpreamble_g0", + "proj_equation_Pulse.Checker.Prover.Base.Mkpreamble_goals", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_solved", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_ss", + "proj_equation_Pulse.Checker.Prover.Base.Mkprover_state_uvs", + "proj_equation_Pulse.Syntax.Base.Mkterm_t", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Tactics.Result.Failed_a", + "projection_inverse_FStar.Tactics.Result.Failed_exn", + "projection_inverse_FStar.Tactics.Result.Failed_ps", + "projection_inverse_FStar.Tactics.Result.Success_a", + "projection_inverse_FStar.Tactics.Result.Success_ps", + "projection_inverse_FStar.Tactics.Result.Success_v", + "projection_inverse_Pulse.Checker.Prover.Base.Mkpreamble_ctxt", + "projection_inverse_Pulse.Checker.Prover.Base.Mkpreamble_frame", + "projection_inverse_Pulse.Checker.Prover.Base.Mkpreamble_g0", + "projection_inverse_Pulse.Checker.Prover.Base.Mkpreamble_goals", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_pg", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_solved", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_ss", + "projection_inverse_Pulse.Checker.Prover.Base.Mkprover_state_uvs", + "projection_inverse_Pulse.Syntax.Base.Mkterm_t", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_998f5317571047eba4128227bc054984", + "refinement_interpretation_Tm_refine_a899d0f0c1a45bdce48dbd70177816ae", + "refinement_interpretation_Tm_refine_bbd4dabe4a73e3c0ba415976da2b0b53", + "refinement_kinding_Tm_refine_bbd4dabe4a73e3c0ba415976da2b0b53", + "string_typing", "typing_FStar.Map.domain", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Prims.magic", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__solved", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__ss", + "typing_Pulse.Checker.Prover.Base.__proj__Mkprover_state__item__uvs", + "typing_Pulse.Checker.Prover.Base.op_Star", + "typing_Pulse.Checker.Prover.Base.vprop_typing", + "typing_Pulse.Syntax.Base.tm_emp", + "typing_Pulse.Syntax.Naming.freevars", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.push_env", "unit_typing" + ], + 0, + "36480e9b0aea59487b37965c46e4a634" + ], + [ + "Pulse.Checker.Prover.try_frame_pre_uvs", + 1, + 1, + 1, + [ + "@query", "constructor_distinct_FStar.Pervasives.Native.None", + "disc_equation_FStar.Pervasives.Native.None", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.None_a" + ], + 0, + "41e15b307d286d48be09b760b387d1ab" + ], + [ + "Pulse.Checker.Prover.try_frame_pre_uvs", + 2, + 1, + 1, + [ + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_FStar.List.Tot.Base.fold_left.fuel_instrumented", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.well_typed_nt_substs.fuel_instrumented", + "@query", + "FStar.List.Tot.Base_interpretation_Tm_arrow_f0225aaf6b987d44876e7f498390aa39", + "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "Pulse.Checker.Prover.Substs_interpretation_Tm_arrow_44c92d7083e71e4940f9a7025bcacc34", + "Pulse.Checker.Prover.Substs_interpretation_Tm_arrow_4aff1389c612fb274ef6cf645fe0fa4a", + "Pulse.Checker.Prover.Substs_interpretation_Tm_arrow_75e84b37473765c128ff689d744c8fe4", + "Pulse.Syntax.Base_pretyping_782a0dad287a00f5de8c110e3ddaeab3", + "Pulse.Syntax.Base_pretyping_b015b044c5bf00a3dd3df9fa711c87dd", + "Pulse.Syntax.Base_pretyping_fe09dc1e796799f4bac0760e63f30d40", + "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.None", + "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_Pulse.Syntax.Base.C_ST", + "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", + "constructor_distinct_Pulse.Syntax.Base.C_STGhost", + "data_elim_Pulse.Syntax.Base.C_ST", + "data_elim_Pulse.Syntax.Base.C_STAtomic", + "data_elim_Pulse.Syntax.Base.C_STGhost", + "data_elim_Pulse.Syntax.Base.Mkppname", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_FStar.Pervasives.Native.fst", + "equation_FStar.Pervasives.Native.snd", "equation_FStar.Range.range", + "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_FStar.Reflection.Typing.pp_name_t", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Sealed.Inhabited.sealed", + "equation_FStar.Sealed.Inhabited.sealed_", + "equation_FStar.Set.disjoint", "equation_Prims.eqtype", + "equation_Prims.nat", + "equation_Pulse.Checker.Base.checker_res_matches_post_hint", + "equation_Pulse.Checker.Base.checker_result_inv", + "equation_Pulse.Checker.Base.continuation_elaborator", + "equation_Pulse.Checker.Prover.Base.op_Star", + "equation_Pulse.Checker.Prover.Substs.nt_subst_comp", + "equation_Pulse.Checker.Prover.Substs.nt_subst_st_comp", + "equation_Pulse.Checker.Prover.Substs.nt_subst_term", + "equation_Pulse.Checker.Prover.Substs.nt_substs", + "equation_Pulse.Syntax.Base.comp_post", + "equation_Pulse.Syntax.Base.comp_pre", + "equation_Pulse.Syntax.Base.comp_res", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.comp_u", + "equation_Pulse.Syntax.Base.ppname_default", + "equation_Pulse.Syntax.Base.range", + "equation_Pulse.Syntax.Base.st_comp_of_comp", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.tm_star", + "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.universe", + "equation_Pulse.Syntax.Base.v_as_nv", + "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", + "equation_Pulse.Syntax.Naming.open_term", + "equation_Pulse.Typing.Env.binding", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.env_bindings", + "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.fresh_wrt", + "equation_with_fuel_FStar.List.Tot.Base.fold_left.fuel_instrumented", + "equation_with_fuel_Pulse.Checker.Prover.Substs.well_typed_nt_substs.fuel_instrumented", + "false_interp", + "fuel_guarded_inversion_FStar.Pervasives.Native.option", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Prims.list", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.ppname", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", + "function_token_typing_Prims.__cache_version_number__", + "function_token_typing_Prims.int", + "function_token_typing_Prims.string", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", + "kinding_Pulse.Syntax.Base.comp@tok", + "kinding_Pulse.Syntax.Base.st_comp@tok", + "kinding_Pulse.Syntax.Base.term@tok", + "kinding_Pulse.Syntax.Naming.subst_elt@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomUpd1", "lemma_FStar.Map.lemma_SelUpd1", + "lemma_FStar.Sealed.Inhabited.sealed_singleton", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Checker.Prover.Substs.nt_subst_comp_commutes", + "lemma_Pulse.Checker.Prover.Substs.nt_substs_st_comp_commutes", + "lemma_Pulse.Syntax.Base.range_singleton", + "lemma_Pulse.Typing.Env.env_extends_push", + "lemma_Pulse.Typing.Env.env_extends_refl", + "lemma_Pulse.Typing.Env.env_extends_trans", + "lemma_Pulse.Typing.Env.push_binding_as_map", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "primitive_Prims.op_Equality", + "proj_equation_FStar.Pervasives.Native.Mktuple2__1", + "proj_equation_FStar.Pervasives.Native.Mktuple2__2", + "proj_equation_Pulse.Syntax.Base.Mknm_nm_ppname", + "proj_equation_Pulse.Syntax.Base.Mkppname_name", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_u", + "proj_equation_Pulse.Syntax.Base.Mkst_term_range", + "proj_equation_Pulse.Syntax.Base.Mkterm_range", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Mkdtuple3__2", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_FStar.Pervasives.Native.None_a", + "projection_inverse_Prims.Mkdtuple2__1", + "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", + "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", + "projection_inverse_Pulse.Syntax.Base.C_ST__0", + "projection_inverse_Pulse.Syntax.Base.Mknm_nm_ppname", + "projection_inverse_Pulse.Syntax.Base.Mkppname_name", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_res", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_u", + "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", + "refinement_interpretation_Tm_refine_12837c1514db76dbfd4a713b928de6cf", + "refinement_interpretation_Tm_refine_25fe9861b42cf97d961ff4c8f44eb399", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "refinement_interpretation_Tm_refine_98cef3ee6a2061303e53ccf185ee1a01", + "refinement_interpretation_Tm_refine_ac147f52608a74d2675e0fe497cebdb9", + "refinement_interpretation_Tm_refine_dae521996fd6cc90aa365214b743f248", + "refinement_interpretation_Tm_refine_eed994d15518279ab75d745192d0d368", + "string_typing", "typing_FStar.Reflection.V2.Data.var", + "typing_FStar.Sealed.seal", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Checker.Prover.Substs.nt_subst_comp", + "typing_Pulse.Checker.Prover.Substs.nt_subst_term", + "typing_Pulse.RuntimeUtils.union_ranges", + "typing_Pulse.Syntax.Base.__proj__Mkppname__item__name", + "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__post", + "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__res", + "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__range", + "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", + "typing_Pulse.Syntax.Base.comp_res", + "typing_Pulse.Syntax.Base.ppname_default", + "typing_Pulse.Syntax.Base.stateful_comp", + "typing_Pulse.Syntax.Base.uu___is_C_Tot", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.bindings", + "typing_Pulse.Typing.Env.dom", "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.lookup", + "typing_Pulse.Typing.Env.push_binding", + "typing_Pulse.Typing.Env.push_context", + "typing_Tm_abs_9221b4287e6d2d711da0e1b1af792f1b", + "typing_Tm_abs_a3d5dd83fbcf4af6e02dd400fbf0f147", + "typing_Tm_abs_a710033180f8da1aa5a51a6e77454ded" + ], + 0, + "d797dbcdf55ec8b7194d1cf646528590" + ], + [ + "Pulse.Checker.Prover.try_frame_pre", + 1, + 2, + 1, + [ + "@query", "constructor_distinct_FStar.Pervasives.Native.None", + "disc_equation_FStar.Pervasives.Native.None", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.None_a" + ], + 0, + "9641901fe93453a73975cb5e29d56687" + ], + [ + "Pulse.Checker.Prover.try_frame_pre", + 2, + 2, + 1, + [ + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_FStar.List.Tot.Base.append.fuel_instrumented", + "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.None", + "constructor_distinct_Prims.Nil", + "constructor_distinct_Pulse.Syntax.Base.C_Tot", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_FStar.List.Tot.Base.op_At", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.binding", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.env_bindings", + "equation_Pulse.Typing.Env.equal", + "equation_with_fuel_FStar.List.Tot.Base.append.fuel_instrumented", + "fuel_guarded_inversion_Pulse.Typing.st_typing", + "function_token_typing_Pulse.Typing.Env.binding", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", "lemma_Pulse.Typing.Env.equal_elim", + "lemma_Pulse.Typing.Env.mk_env_bs", + "lemma_Pulse.Typing.Env.mk_env_dom", + "lemma_Pulse.Typing.Env.push_env_bindings", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.None_a", + "projection_inverse_Prims.Nil_a", + "projection_inverse_Pulse.Syntax.Base.C_Tot__0", + "refinement_interpretation_Tm_refine_30687c6bbf76a4ea67eae131536eafd7", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.bindings", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fstar_env", "typing_Pulse.Typing.Env.mk_env" + ], + 0, + "5dd3658f80f4ab7670985dbf083ff357" + ], + [ + "Pulse.Checker.Prover.prove_post_hint", + 1, + 2, + 1, + [ + "@query", "constructor_distinct_FStar.Pervasives.Native.None", + "disc_equation_FStar.Pervasives.Native.None", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.None_a" + ], + 0, + "529ff4c8ea2f7ac3a1f10e1ededaf12b" + ], + [ + "Pulse.Checker.Prover.prove_post_hint", + 2, + 2, + 1, + [ + "@query", "constructor_distinct_FStar.Pervasives.Native.None", + "disc_equation_FStar.Pervasives.Native.None", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.None_a" + ], + 0, + "26fe3caa40cb5c05247389edc48c277e" + ], + [ + "Pulse.Checker.Prover.prove_post_hint", + 3, + 2, + 1, + [ + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_Pulse.Checker.Prover.Substs.well_typed_nt_substs.fuel_instrumented", + "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.None", + "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", + "data_elim_FStar.Pervasives.Mkdtuple5", + "data_elim_Pulse.Syntax.Base.Mkppname", + "data_typing_intro_FStar.Pervasives.Native.Mktuple2@tok", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_FStar.Pervasives.Native.Some", + "equation_FStar.Pervasives.Native.fst", + "equation_FStar.Pervasives.Native.snd", + "equation_FStar.Pervasives.dfst", + "equation_FStar.Reflection.Typing.pp_name_t", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Sealed.Inhabited.sealed", + "equation_FStar.Sealed.Inhabited.sealed_", + "equation_FStar.Set.disjoint", "equation_Prims.eqtype", + "equation_Prims.nat", + "equation_Pulse.Checker.Base.checker_res_matches_post_hint", + "equation_Pulse.Checker.Base.checker_result_inv", + "equation_Pulse.Checker.Base.checker_result_t", + "equation_Pulse.Checker.Base.continuation_elaborator", + "equation_Pulse.Checker.Prover.Substs.nt_substs", + "equation_Pulse.Syntax.Base.mk_ppname_no_range", + "equation_Pulse.Syntax.Base.nvar", + "equation_Pulse.Syntax.Base.ppname_default", + "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.universe", + "equation_Pulse.Syntax.Base.v_as_nv", + "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", + "equation_Pulse.Syntax.Naming.open_term", + "equation_Pulse.Syntax.Naming.open_term_nv", + "equation_Pulse.Typing.Env.binding", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.env_bindings", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.extends_with", + "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.post_hint_for_env_p", + "equation_Pulse.Typing.post_hint_opt", + "equation_with_fuel_Pulse.Checker.Prover.Substs.well_typed_nt_substs.fuel_instrumented", + "false_interp", "fuel_guarded_inversion_FStar.Pervasives.dtuple3", + "fuel_guarded_inversion_FStar.Pervasives.dtuple5", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Prims.dtuple2", + "fuel_guarded_inversion_Prims.list", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "function_token_typing_Prims.string", "int_inversion", + "interpretation_Tm_abs_3c40274298c18b3c60fac0d11fae8431", + "interpretation_Tm_abs_5adeb3a78b1b342e9d9bdc8b1e2ca123", + "interpretation_Tm_abs_e21586ea0dcb2b831fcc0617ea281b2d", + "interpretation_Tm_abs_f9ba06e91f9754038708331844af2d35", + "kinding_Pulse.Syntax.Base.ppname@tok", + "kinding_Pulse.Syntax.Base.term@tok", + "kinding_Pulse.Typing.post_hint_t@tok", + "kinding_Pulse.Typing.vprop_equiv@tok", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Map.lemma_SelConcat1", + "lemma_FStar.Pervasives.invertOption", + "lemma_FStar.Sealed.Inhabited.sealed_singleton", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.env_extends_trans", + "lemma_Pulse.Typing.Env.mk_env_bs", + "lemma_Pulse.Typing.Env.mk_env_dom", + "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "primitive_Prims.op_Negation", + "proj_equation_FStar.Pervasives.Native.Mktuple2__1", + "proj_equation_FStar.Pervasives.Native.Mktuple2__2", + "proj_equation_FStar.Pervasives.Native.Some_v", + "proj_equation_Prims.Mkdtuple2__1", + "proj_equation_Pulse.Syntax.Base.Mknm_nm_ppname", + "proj_equation_Pulse.Syntax.Base.Mkppname_name", + "proj_equation_Pulse.Typing.Mkpost_hint_t_g", + "proj_equation_Pulse.Typing.Mkpost_hint_t_post", + "proj_equation_Pulse.Typing.Mkpost_hint_t_ret_ty", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Mkdtuple3__2", + "projection_inverse_FStar.Pervasives.Mkdtuple5__1", + "projection_inverse_FStar.Pervasives.Mkdtuple5__2", + "projection_inverse_FStar.Pervasives.Mkdtuple5__3", + "projection_inverse_FStar.Pervasives.Mkdtuple5__4", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_FStar.Pervasives.Native.None_a", + "projection_inverse_FStar.Pervasives.Native.Some_a", + "projection_inverse_FStar.Pervasives.Native.Some_v", + "projection_inverse_Prims.Mkdtuple2__1", + "projection_inverse_Pulse.Syntax.Base.Mknm_nm_ppname", + "projection_inverse_Pulse.Syntax.Base.Mkppname_name", + "refinement_interpretation_Tm_refine_25fe9861b42cf97d961ff4c8f44eb399", + "refinement_interpretation_Tm_refine_30687c6bbf76a4ea67eae131536eafd7", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_7ad5682d990eaec6510764d663af54de", + "refinement_interpretation_Tm_refine_98cef3ee6a2061303e53ccf185ee1a01", + "refinement_interpretation_Tm_refine_a11f840595aa283ad91d016761d341b9", + "refinement_interpretation_Tm_refine_b0ea3495ff282f69439c9d1354d6b870", + "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", + "refinement_interpretation_Tm_refine_c07455da69b1cf59b5df0a11143d2102", + "refinement_interpretation_Tm_refine_f0ac051651fa0e095f1b2c1241fd6a3f", + "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "string_typing", "typing_FStar.Map.concat", + "typing_FStar.Map.domain", "typing_FStar.Reflection.V2.Data.var", + "typing_FStar.Sealed.seal", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Checker.Base.check_equiv_emp", + "typing_Pulse.Syntax.Base.__proj__Mkppname__item__name", + "typing_Pulse.Syntax.Base.eq_tm", + "typing_Pulse.Syntax.Base.mk_ppname_no_range", + "typing_Pulse.Syntax.Base.ppname_default", + "typing_Pulse.Syntax.Base.tm_emp", + "typing_Pulse.Syntax.Naming.open_term_nv", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.bindings", + "typing_Pulse.Typing.Env.dom", "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.mk_env", + "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__post", + "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__ret_ty" + ], + 0, + "88bd4fffd4df1ebdd762af961f591a3f" + ] + ] +] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Prover.fsti b/lib/steel/pulse/Pulse.Checker.Prover.fsti new file mode 100644 index 000000000..a554b9c52 --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Prover.fsti @@ -0,0 +1,42 @@ +module Pulse.Checker.Prover + +module T = FStar.Tactics.V2 + +open Pulse.Syntax +open Pulse.Typing +open Pulse.Checker.Base + +module PS = Pulse.Checker.Prover.Substs + +include Pulse.Checker.Prover.Base +include Pulse.Checker.Prover.Util + +val prove + (#g:env) (#ctxt:vprop) (ctxt_typing:tot_typing g ctxt tm_vprop) + (uvs:env { disjoint g uvs }) + (#goals:vprop) (goals_typing:tot_typing (push_env g uvs) goals tm_vprop) + + : T.Tac (g1 : env { g1 `env_extends` g /\ disjoint g1 uvs } & + nts : PS.nt_substs { PS.well_typed_nt_substs g1 uvs nts } & + remaining_ctxt : vprop & + continuation_elaborator g ctxt g1 ((PS.nt_subst_term goals nts) * remaining_ctxt)) + +val try_frame_pre_uvs (#g:env) (#ctxt:vprop) (ctxt_typing:tot_typing g ctxt tm_vprop) + (uvs:env { disjoint g uvs }) + (#t:st_term) (#c:comp_st) (d:st_typing (push_env g uvs) t c) + (res_ppname:ppname) + + : T.Tac (checker_result_t g ctxt None) + +val try_frame_pre (#g:env) (#ctxt:vprop) (ctxt_typing:tot_typing g ctxt tm_vprop) + (#t:st_term) (#c:comp_st) (d:st_typing g t c) + (res_ppname:ppname) + + : T.Tac (checker_result_t g ctxt None) + +val prove_post_hint (#g:env) (#ctxt:vprop) + (r:checker_result_t g ctxt None) + (post_hint:post_hint_opt g) + (rng:range) + + : T.Tac (checker_result_t g ctxt post_hint) diff --git a/lib/steel/pulse/Pulse.Checker.Prover.fsti.hints b/lib/steel/pulse/Pulse.Checker.Prover.fsti.hints new file mode 100644 index 000000000..60425e2ef --- /dev/null +++ b/lib/steel/pulse/Pulse.Checker.Prover.fsti.hints @@ -0,0 +1,56 @@ +[ + "guOO!\n~35", + [ + [ + "Pulse.Checker.Prover.prove", + 1, + 2, + 1, + [ "@query" ], + 0, + "1bbbd96ed10169f69a534435d68f52df" + ], + [ + "Pulse.Checker.Prover.try_frame_pre_uvs", + 1, + 2, + 1, + [ + "@query", "constructor_distinct_FStar.Pervasives.Native.None", + "disc_equation_FStar.Pervasives.Native.None", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.None_a" + ], + 0, + "c7ca40ecb3a257f22e47594312ae5979" + ], + [ + "Pulse.Checker.Prover.try_frame_pre", + 1, + 2, + 1, + [ + "@query", "constructor_distinct_FStar.Pervasives.Native.None", + "disc_equation_FStar.Pervasives.Native.None", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.None_a" + ], + 0, + "8f64675045d052042fb0f65986bcd431" + ], + [ + "Pulse.Checker.Prover.prove_post_hint", + 1, + 2, + 1, + [ + "@query", "constructor_distinct_FStar.Pervasives.Native.None", + "disc_equation_FStar.Pervasives.Native.None", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.None_a" + ], + 0, + "529ff4c8ea2f7ac3a1f10e1ededaf12b" + ] + ] +] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Pure.fst.hints b/lib/steel/pulse/Pulse.Checker.Pure.fst.hints index 1bc37243f..8112d3959 100644 --- a/lib/steel/pulse/Pulse.Checker.Pure.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.Pure.fst.hints @@ -8,7 +8,7 @@ 1, [ "@query" ], 0, - "bd23f7f1669e84accab1680dcfb496be" + "57191f73bba6376ce8aa2395b65cf0a6" ], [ "Pulse.Checker.Pure.rtb_core_check_term", diff --git a/lib/steel/pulse/Pulse.Checker.Pure.fsti.hints b/lib/steel/pulse/Pulse.Checker.Pure.fsti.hints index 826a301a1..fff2147b4 100644 --- a/lib/steel/pulse/Pulse.Checker.Pure.fsti.hints +++ b/lib/steel/pulse/Pulse.Checker.Pure.fsti.hints @@ -8,7 +8,7 @@ 1, [ "@query" ], 0, - "a95ab54020b7d13921e1557f023935f1" + "116bc0269cda4f59cff6e9196e5793ab" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Return.fst b/lib/steel/pulse/Pulse.Checker.Return.fst index 00a7bcd63..81ddde18d 100644 --- a/lib/steel/pulse/Pulse.Checker.Return.fst +++ b/lib/steel/pulse/Pulse.Checker.Return.fst @@ -1,25 +1,24 @@ module Pulse.Checker.Return -module T = FStar.Tactics.V2 -module RT = FStar.Reflection.Typing - open Pulse.Syntax open Pulse.Typing open Pulse.Checker.Pure -open Pulse.Checker.Common +open Pulse.Checker.Base +open Pulse.Checker.Prover +module T = FStar.Tactics.V2 module P = Pulse.Syntax.Printer -module FV = Pulse.Typing.FV +module Metatheory = Pulse.Typing.Metatheory -#push-options "--query_stats --z3rlimit_factor 2" -let check_return - (allow_inst:bool) +let check (g:env) - (st:st_term{Tm_Return? st.term}) - (pre:term) - (pre_typing:tot_typing g pre tm_vprop) + (ctxt:term) + (ctxt_typing:tot_typing g ctxt tm_vprop) (post_hint:post_hint_opt g) - : T.Tac (checker_result_t g pre post_hint) = + (res_ppname:ppname) + (st:st_term { Tm_Return? st.term }) + : T.Tac (checker_result_t g ctxt post_hint) = + let g = push_context "check_return" st.range g in let Tm_Return {ctag=c; insert_eq=use_eq; term=t} = st.term in let (| t, u, ty, uty, d |) : @@ -35,12 +34,13 @@ let check_return assert (g `env_extends` post.g); let ty_typing : universe_of post.g post.ret_ty post.u = post.ty_typing in - // weakening of post.g to g - let ty_typing : universe_of g post.ret_ty post.u = magic () in + let ty_typing : universe_of g post.ret_ty post.u = + Metatheory.tot_typing_weakening_standard post.g post.ty_typing g in (| t, post.u, post.ret_ty, ty_typing, d |) in + let x = fresh g in - let px = v_as_nv x in + let px = res_ppname, x in let (| post_opened, post_typing |) : t:term & tot_typing (push_binding g x (fst px) ty) t tm_vprop = match post_hint with | None -> @@ -51,7 +51,9 @@ let check_return // we already checked for the return type let post : post_hint_t = post in if x `Set.mem` (freevars post.post) - then fail g None "Unexpected variable clash in return" + then fail g None + ("check_return: unexpected variable clash in return post,\ + please file a bug report") else let ty_rec = post_hint_typing g post x in (| open_term_nv post.post px, ty_rec.post_typing |) @@ -59,4 +61,4 @@ let check_return assume (open_term (close_term post_opened x) x == post_opened); let post = close_term post_opened x in let d = T_Return g c use_eq u ty t post x uty (E d) post_typing in - repack (Pulse.Checker.Common.try_frame_pre pre_typing d) post_hint + prove_post_hint (try_frame_pre ctxt_typing d res_ppname) post_hint t.range diff --git a/lib/steel/pulse/Pulse.Checker.Return.fst.hints b/lib/steel/pulse/Pulse.Checker.Return.fst.hints index 94e123c71..84d4ad231 100644 --- a/lib/steel/pulse/Pulse.Checker.Return.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.Return.fst.hints @@ -1,8 +1,8 @@ [ - "\u001bsoj˩h׆", + "2\u0006-\u0019۝E", [ [ - "Pulse.Checker.Return.check_return", + "Pulse.Checker.Return.check", 1, 2, 1, @@ -10,7 +10,7 @@ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_Pulse.Syntax.Naming.freevars.fuel_instrumented", "@fuel_irrelevance_Pulse.Syntax.Naming.freevars.fuel_instrumented", - "@query", + "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", "Pulse.Syntax.Base_pretyping_fe09dc1e796799f4bac0760e63f30d40", "bool_inversion", "constructor_distinct_FStar.Pervasives.Native.None", @@ -22,23 +22,20 @@ "constructor_distinct_Pulse.Syntax.Base.C_STGhost", "constructor_distinct_Pulse.Syntax.Base.STT", "constructor_distinct_Pulse.Syntax.Base.Tm_Return", + "data_elim_Pulse.Syntax.Base.Mkppname", "data_elim_Pulse.Syntax.Base.Mkst_term", "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", "disc_equation_Pulse.Syntax.Base.C_Tot", "disc_equation_Pulse.Syntax.Base.Tm_Return", "equation_FStar.Pervasives.Native.fst", "equation_FStar.Range.range", "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_FStar.Reflection.Typing.pp_name_t", "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", "equation_Prims.nat", "equation_Pulse.Checker.Pure.push_context", - "equation_Pulse.Syntax.Base.comp_st", "equation_Pulse.Syntax.Base.index", + "equation_Pulse.Syntax.Base.nvar", "equation_Pulse.Syntax.Base.ppname_default", - "equation_Pulse.Syntax.Base.range", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.range", "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.v_as_nv", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Naming.close_term", @@ -49,28 +46,34 @@ "equation_Pulse.Typing.Env.lookup", "equation_Pulse.Typing.FV.set_minus", "equation_Pulse.Typing.comp_return", - "equation_Pulse.Typing.fresh_wrt", + "equation_Pulse.Typing.elab_env", "equation_Pulse.Typing.fresh_wrt", "equation_Pulse.Typing.post_hint_for_env_p", "equation_Pulse.Typing.post_hint_opt", "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", "fuel_guarded_inversion_Pulse.Syntax.Base.ctag", + "fuel_guarded_inversion_Pulse.Syntax.Base.ppname", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "function_token_typing_Prims.__cache_version_number__", "function_token_typing_Prims.int", + "function_token_typing_Prims.string", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", - "int_typing", "kinding_Pulse.Syntax.Base.term@tok", + "int_typing", "kinding_Pulse.Syntax.Base.ppname@tok", + "kinding_Pulse.Syntax.Base.term@tok", "kinding_Pulse.Typing.post_hint_t@tok", "lemma_FStar.Map.lemma_ContainsDom", "lemma_FStar.Pervasives.invertOption", + "lemma_FStar.Sealed.Inhabited.sealed_singleton", "lemma_FStar.Set.mem_complement", "lemma_FStar.Set.mem_intersect", "lemma_FStar.Set.mem_singleton", "lemma_Pulse.Syntax.Base.range_singleton", + "lemma_Pulse.Typing.Env.push_binding_bs", "lemma_Pulse.Typing.FV.freevars_close_term", - "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", - "primitive_Prims.op_Equality", "primitive_Prims.op_Negation", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_Equality", + "primitive_Prims.op_Negation", "proj_equation_FStar.Pervasives.Native.Mktuple2__1", "proj_equation_FStar.Pervasives.Native.Some_v", + "proj_equation_Pulse.Syntax.Base.Mknm_nm_ppname", + "proj_equation_Pulse.Syntax.Base.Mkppname_name", "proj_equation_Pulse.Syntax.Base.Mkst_term_range", "proj_equation_Pulse.Syntax.Base.Mkst_term_term", "proj_equation_Pulse.Typing.Mkpost_hint_t_post", @@ -91,34 +94,41 @@ "projection_inverse_FStar.Tactics.Result.Success_v", "projection_inverse_Prims.Mkdtuple2__1", "projection_inverse_Prims.Mkdtuple2__2", + "projection_inverse_Pulse.Syntax.Base.Mknm_nm_ppname", + "projection_inverse_Pulse.Syntax.Base.Mkppname_name", "projection_inverse_Pulse.Syntax.Base.Tm_Return__0", "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", "refinement_interpretation_Tm_refine_7f3ad0958305f2921bfac06f466396ae", "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", "refinement_interpretation_Tm_refine_b1f6ffdbdc319e94b21425d60dda23d2", "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", "refinement_interpretation_Tm_refine_cf9758cc2789ce185158d55a949d224a", "refinement_interpretation_Tm_refine_eed994d15518279ab75d745192d0d368", + "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "string_typing", "token_correspondence_Pulse.Syntax.Naming.freevars.fuel_instrumented", + "typing_FStar.Pervasives.Native.fst", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.complement", "typing_FStar.Set.mem", "typing_FStar.Set.singleton", "typing_Pulse.Checker.Pure.push_context", + "typing_Pulse.Syntax.Base.__proj__Mkppname__item__name", "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__range", "typing_Pulse.Syntax.Base.ppname_default", + "typing_Pulse.Syntax.Base.v_as_nv", "typing_Pulse.Syntax.Naming.close_term", "typing_Pulse.Syntax.Naming.freevars", "typing_Pulse.Syntax.Naming.open_term", "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", - "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.fresh", "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.push_binding", "typing_Pulse.Typing.Env.push_context", "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__post" ], 0, - "aab5f68cc06846664acb997c6773cf1f" + "3d095a962e76a8f92d0ed18f0b6f56c5" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Return.fsti b/lib/steel/pulse/Pulse.Checker.Return.fsti index 479c6289c..e19c74107 100644 --- a/lib/steel/pulse/Pulse.Checker.Return.fsti +++ b/lib/steel/pulse/Pulse.Checker.Return.fsti @@ -1,16 +1,16 @@ module Pulse.Checker.Return -module T = FStar.Tactics.V2 - open Pulse.Syntax open Pulse.Typing -open Pulse.Checker.Common +open Pulse.Checker.Base + +module T = FStar.Tactics.V2 -val check_return - (allow_inst:bool) +val check (g:env) - (st:st_term{Tm_Return? st.term}) - (pre:term) - (pre_typing:tot_typing g pre tm_vprop) + (ctxt:term) + (ctxt_typing:tot_typing g ctxt tm_vprop) (post_hint:post_hint_opt g) - : T.Tac (checker_result_t g pre post_hint) \ No newline at end of file + (res_ppname:ppname) + (st:st_term { Tm_Return? st.term }) + : T.Tac (checker_result_t g ctxt post_hint) diff --git a/lib/steel/pulse/Pulse.Checker.Return.fsti.hints b/lib/steel/pulse/Pulse.Checker.Return.fsti.hints index c0d1cd9c7..578a2ce69 100644 --- a/lib/steel/pulse/Pulse.Checker.Return.fsti.hints +++ b/lib/steel/pulse/Pulse.Checker.Return.fsti.hints @@ -1 +1 @@ -[ " ʜ^'Xhj", [] ] \ No newline at end of file +[ ")I(8L*2", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Rewrite.fst b/lib/steel/pulse/Pulse.Checker.Rewrite.fst index ee45b1bee..f16d5f0d7 100644 --- a/lib/steel/pulse/Pulse.Checker.Rewrite.fst +++ b/lib/steel/pulse/Pulse.Checker.Rewrite.fst @@ -1,22 +1,24 @@ module Pulse.Checker.Rewrite -module T = FStar.Tactics.V2 -module RT = FStar.Reflection.Typing - open Pulse.Syntax open Pulse.Typing open Pulse.Checker.Pure -open Pulse.Checker.Common +open Pulse.Checker.Base +open Pulse.Checker.Prover + +module T = FStar.Tactics.V2 module P = Pulse.Syntax.Printer -module FV = Pulse.Typing.FV -let check_rewrite +let check (g:env) - (t:st_term{Tm_Rewrite? t.term}) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) + (res_ppname:ppname) + (t:st_term{Tm_Rewrite? t.term}) + : T.Tac (checker_result_t g pre post_hint) = + let g = push_context "check_rewrite" t.range g in let Tm_Rewrite {t1=p; t2=q} = t.term in let (| p, p_typing |) = check_vprop g p in @@ -38,5 +40,5 @@ let check_rewrite (T.term_to_string elab_q)) | Some token -> VE_Ext g p q token in - let d = T_Rewrite _ p q p_typing equiv_p_q in - repack (Pulse.Checker.Common.try_frame_pre pre_typing d) post_hint + let d = T_Rewrite _ p q p_typing equiv_p_q in + prove_post_hint (try_frame_pre pre_typing d res_ppname) post_hint t.range diff --git a/lib/steel/pulse/Pulse.Checker.Rewrite.fst.hints b/lib/steel/pulse/Pulse.Checker.Rewrite.fst.hints index 8b075462e..676fa5348 100644 --- a/lib/steel/pulse/Pulse.Checker.Rewrite.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.Rewrite.fst.hints @@ -1,8 +1,8 @@ [ - "´Uą\u000bEXU", + "-&W\u0001$M#", [ [ - "Pulse.Checker.Rewrite.check_rewrite", + "Pulse.Checker.Rewrite.check", 1, 2, 1, @@ -10,29 +10,25 @@ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_Pulse.Elaborate.Pure.elab_term.fuel_instrumented", "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "constructor_distinct_FStar.Pervasives.Native.None", "constructor_distinct_FStar.Tactics.Result.Failed", "constructor_distinct_FStar.Tactics.Result.Success", "constructor_distinct_Pulse.Syntax.Base.C_STGhost", "constructor_distinct_Pulse.Syntax.Base.Tm_Rewrite", "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", "disc_equation_Pulse.Syntax.Base.C_Tot", "equation_FStar.Reflection.Types.typ", "equation_FStar.Reflection.Typing.fstar_top_env", "equation_Pulse.Checker.Pure.push_context", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", "equation_Pulse.Typing.comp_rewrite", "equation_Pulse.Typing.elab_env", "equation_with_fuel_Pulse.Elaborate.Pure.elab_term.fuel_instrumented", "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "function_token_typing_Prims.__cache_version_number__", "int_inversion", "lemma_FStar.Pervasives.invertOption", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.None_a", "projection_inverse_FStar.Tactics.Result.Failed_a", "projection_inverse_FStar.Tactics.Result.Failed_exn", "projection_inverse_FStar.Tactics.Result.Failed_ps", @@ -41,7 +37,6 @@ "projection_inverse_FStar.Tactics.Result.Success_v", "projection_inverse_Pulse.Syntax.Base.Tm_Rewrite__0", "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", "refinement_interpretation_Tm_refine_7f3ad0958305f2921bfac06f466396ae", "refinement_interpretation_Tm_refine_b907e830dcf6a149317be42029ca9ad7", "refinement_interpretation_Tm_refine_f0ac051651fa0e095f1b2c1241fd6a3f", @@ -53,7 +48,7 @@ "typing_Pulse.Typing.Env.fstar_env", "typing_Pulse.Typing.elab_env" ], 0, - "8b852b86f2f0fe77203a9c09928108bd" + "59361209e8a80e7e337f1c8649a863a9" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.Rewrite.fsti b/lib/steel/pulse/Pulse.Checker.Rewrite.fsti index 4e8eb79fe..e95abf43f 100644 --- a/lib/steel/pulse/Pulse.Checker.Rewrite.fsti +++ b/lib/steel/pulse/Pulse.Checker.Rewrite.fsti @@ -1,15 +1,16 @@ module Pulse.Checker.Rewrite -module T = FStar.Tactics.V2 - open Pulse.Syntax open Pulse.Typing -open Pulse.Checker.Common +open Pulse.Checker.Base + +module T = FStar.Tactics.V2 -val check_rewrite +val check (g:env) - (t:st_term{Tm_Rewrite? t.term}) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) - : T.Tac (checker_result_t g pre post_hint) \ No newline at end of file + (res_ppname:ppname) + (t:st_term { Tm_Rewrite? t.term }) + : T.Tac (checker_result_t g pre post_hint) diff --git a/lib/steel/pulse/Pulse.Checker.Rewrite.fsti.hints b/lib/steel/pulse/Pulse.Checker.Rewrite.fsti.hints index 3cd31d3a7..99cf83997 100644 --- a/lib/steel/pulse/Pulse.Checker.Rewrite.fsti.hints +++ b/lib/steel/pulse/Pulse.Checker.Rewrite.fsti.hints @@ -1 +1 @@ -[ "N̡\u0011wz2P\u001aM", [] ] \ No newline at end of file +[ "\u0014=(+URm}", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.STApp.fst b/lib/steel/pulse/Pulse.Checker.STApp.fst index c0b58c308..8c8f9ec98 100644 --- a/lib/steel/pulse/Pulse.Checker.STApp.fst +++ b/lib/steel/pulse/Pulse.Checker.STApp.fst @@ -1,16 +1,17 @@ module Pulse.Checker.STApp -module T = FStar.Tactics.V2 -module RT = FStar.Reflection.Typing - open Pulse.Syntax open Pulse.Typing open Pulse.Checker.Pure -open Pulse.Checker.Common +open Pulse.Checker.Base + +module T = FStar.Tactics.V2 +module RT = FStar.Reflection.Typing +module FV = Pulse.Typing.FV module RU = Pulse.RuntimeUtils module P = Pulse.Syntax.Printer +module Prover = Pulse.Checker.Prover -module FV = Pulse.Typing.FV let debug_log (g:env) (f:unit -> T.Tac unit) : T.Tac unit = if RU.debug_at_level (fstar_env g) "st_app" then f () else () let canon_comp (c:comp_st) : comp_st = @@ -33,90 +34,112 @@ let canonicalize_st_typing (#g:env) (#t:st_term) (#c:comp_st) (d:st_typing g t c in T_Equiv _ _ _ _ d st_eq +let coerce_eq (#a #b:Type) (x:a) (_:squash (a === b)) : y:b { y == x } = x + +let rec intro_uvars_for_logical_implicits (g:env) (uvs:env { disjoint uvs g }) (t:term) (ty:term) + : T.Tac (uvs':env & + g':env { extends_with g' g uvs' } & + t':st_term { Tm_STApp? t'.term }) = + + let ropt = is_arrow ty in + match ropt with + | Some (b, Some Implicit, c_rest) -> + let x = fresh (push_env g uvs) in + let uvs' = push_binding uvs x ppname_default b.binder_ty in + begin + match c_rest with + | C_ST _ + | C_STAtomic _ _ + | C_STGhost _ _ -> + (| uvs', push_env g uvs', {term=Tm_STApp {head=t;arg_qual=Some Implicit;arg=null_var x}; + range=t.range} |) + | C_Tot ty -> + intro_uvars_for_logical_implicits g uvs' (tm_pureapp t (Some Implicit) (null_var x)) ty + end + | _ -> + fail g None + (Printf.sprintf "check_stapp.intro_uvars_for_logical_implicits: expected an arrow type,\ + with an implicit parameter, found: %s" + (P.term_to_string ty)) + +let instantaite_implicits (g:env) (t:st_term { Tm_STApp? t.term }) + : T.Tac (uvs : env & + g' : env { extends_with g' g uvs } & + t' : st_term { Tm_STApp? t'.term }) = -let check_stapp - (allow_inst:bool) - (g:env) - (t:st_term{Tm_STApp? t.term}) - (pre:term) - (pre_typing:tot_typing g pre tm_vprop) - (post_hint:post_hint_opt g) - (check':bool -> check_t) - : T.Tac (checker_result_t g pre post_hint) = - // maybe_log t; let range = t.range in let Tm_STApp { head; arg_qual=qual; arg } = t.term in + let pure_app = tm_pureapp head qual arg in + let t, ty = instantiate_term_implicits g pure_app in + match is_arrow ty with + | Some (_, Some Implicit, _) -> + //Some implicits to follow + intro_uvars_for_logical_implicits g (mk_env (fstar_env g)) t ty + | _ -> + match is_pure_app t with + | Some (head, q, arg) -> + let uvs = mk_env (fstar_env g) in + (| uvs, push_env g uvs, {term=Tm_STApp {head;arg_qual=q;arg}; range=t.range} |) + | _ -> + fail g (Some t.range) + (Printf.sprintf "check_stapp.instantiate_implicits: expected an application term, found: %s" + (P.term_to_string t)) - // - // c is the comp remaining after applying head to arg, - // - // let infer_logical_implicits_and_check - // (t:term) - // (c:comp{C_Tot? c}) : T.Tac _ = +#push-options "--z3rlimit_factor 4 --fuel 1 --ifuel 1" +let check + (g0:env) + (ctxt:vprop) + (ctxt_typing:tot_typing g0 ctxt tm_vprop) + (post_hint:post_hint_opt g0) + (res_ppname:ppname) + (t:st_term { Tm_STApp? t.term }) + : T.Tac (checker_result_t g0 ctxt post_hint) = - // match c with - // | C_Tot ty -> - // begin match is_arrow ty with - // | Some (_, Some Implicit, _) -> - // //Some implicits to follow - // let t = Pulse.Checker.Inference.infer g t ty pre range in - // check' false g t pre pre_typing post_hint - // | _ -> - // T.fail "Unexpected c in infer_logical_implicits_and_check" - // end + let g0 = push_context "st_app" t.range g0 in + let range = t.range in - // | _ -> - // T.fail "Unexpected c in infer_logical_implicits_and_check" in + let (| uvs, g, t |) = instantaite_implicits g0 t in - let check_st_app () : T.Tac (checker_result_t g pre post_hint) = - let g = push_context "st_app" t.range g in - let (| head, ty_head, dhead |) = check_term g head in + let Tm_STApp { head; arg_qual=qual; arg } = t.term in + let (| head, ty_head, dhead |) = check_term g head in + debug_log g (fun _ -> + T.print (Printf.sprintf "st_app: head = %s, ty_head = %s\n" + (P.term_to_string head) + (P.term_to_string ty_head))); + + match is_arrow ty_head with + | Some ({binder_ty=formal;binder_ppname=ppname}, bqual, comp_typ) -> + is_arrow_tm_arrow ty_head; debug_log g (fun _ -> - T.print (Printf.sprintf "st_app: head = %s, ty_head = %s\n" - (P.term_to_string head) - (P.term_to_string ty_head))); - match is_arrow ty_head with - | Some ({binder_ty=formal;binder_ppname=ppname}, bqual, comp_typ) -> - is_arrow_tm_arrow ty_head; - debug_log g (fun _ -> - T.print (Printf.sprintf "st_app, readback comp as %s\n" - (P.comp_to_string comp_typ))); + T.print (Printf.sprintf "st_app, readback comp as %s\n" + (P.comp_to_string comp_typ))); - assert (ty_head == - tm_arrow ({binder_ty=formal;binder_ppname=ppname}) bqual comp_typ); - if qual = bqual - then - let (| arg, darg |) = check_term_with_expected_type g arg formal in - match comp_typ with - | C_ST res - | C_STAtomic _ res - | C_STGhost _ res -> - // This is a real ST application - let d : st_typing _ _ (open_comp_with comp_typ arg) = T_STApp g head formal qual comp_typ arg (E dhead) (E darg) in - let d' = canonicalize_st_typing d in - // T.print (Printf.sprintf "ST application trying to frame, context: %s and pre: %s\n" - // (Pulse.Syntax.Printer.term_to_string pre) - // (Pulse.Syntax.Printer.term_to_string (comp_pre (open_comp_with comp_typ arg)))); - repack (try_frame_pre pre_typing d') post_hint - | _ -> - fail g (Some t.range) "Expected an effectful application; got a pure term (could it be partially applied by mistake?)" - else - fail g (Some t.range) (Printf.sprintf "Unexpected qualifier in head type %s of stateful application: head = %s, arg = %s" - (P.term_to_string ty_head) - (P.term_to_string head) - (P.term_to_string arg)) + assert (ty_head == + tm_arrow ({binder_ty=formal;binder_ppname=ppname}) bqual comp_typ); - | _ -> fail g (Some t.range) (Printf.sprintf "Unexpected head type in impure application: %s" (P.term_to_string ty_head)) - in + if qual = bqual + then + let (| arg, darg |) = check_term_with_expected_type g arg formal in + match comp_typ with + | C_ST res + | C_STAtomic _ res + | C_STGhost _ res -> + // This is a real ST application + let d : st_typing _ _ (open_comp_with comp_typ arg) = + T_STApp g head formal qual comp_typ arg (E dhead) (E darg) in + let d = canonicalize_st_typing d in + let t = { term = Tm_STApp {head; arg_qual=qual; arg}; range } in + let c = (canon_comp (open_comp_with comp_typ arg)) in + let d : st_typing g t c = d in - let g = push_context "pure_app" t.range g in - let pure_app = tm_pureapp head qual arg in - let t, ty = instantiate_term_implicits g pure_app in - match is_arrow ty with - | Some (_, Some Implicit, _) -> - //Some implicits to follow - let t = Pulse.Checker.Inference.infer g t ty pre range in - check' false g t pre pre_typing post_hint - | _ -> - check_st_app () + Prover.prove_post_hint (Prover.try_frame_pre_uvs ctxt_typing uvs d res_ppname) post_hint t.range + | _ -> + fail g (Some t.range) "Expected an effectful application; got a pure term (could it be partially applied by mistake?)" + else fail g (Some t.range) (Printf.sprintf "Unexpected qualifier in head type %s of stateful application: head = %s, arg = %s" + (P.term_to_string ty_head) + (P.term_to_string head) + (P.term_to_string arg)) + + | _ -> fail g (Some t.range) (Printf.sprintf "Unexpected head type in impure application: %s" (P.term_to_string ty_head)) +#pop-options diff --git a/lib/steel/pulse/Pulse.Checker.STApp.fst.hints b/lib/steel/pulse/Pulse.Checker.STApp.fst.hints index 3d534722d..45f3b86ce 100644 --- a/lib/steel/pulse/Pulse.Checker.STApp.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.STApp.fst.hints @@ -1,5 +1,5 @@ [ - "\bTui޸^\u0010n", + "\nz\u0006/}g", [ [ "Pulse.Checker.STApp.canon_comp", @@ -23,7 +23,7 @@ "typing_Pulse.Readback.readback_comp" ], 0, - "de4e5aa8549ec1642f1197a8c6415a41" + "4f0ead0077f34ea40e1178b237bbd8e7" ], [ "Pulse.Checker.STApp.canonicalize_st_typing", @@ -67,60 +67,175 @@ "3664852232507546dc855d68e8ae66f6" ], [ - "Pulse.Checker.STApp.check_stapp", + "Pulse.Checker.STApp.coerce_eq", 1, 2, 1, + [ + "@MaxIFuel_assumption", "@query", + "equation_Prims.op_Equals_Equals_Equals", "equation_Prims.squash", + "refinement_interpretation_Tm_refine_2de20c066034c13bf76e9c0b94f4806c" + ], + 0, + "35bf60207052da5557e8deea14fa8269" + ], + [ + "Pulse.Checker.STApp.intro_uvars_for_logical_implicits", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_Pulse.Syntax.Base.Tm_STApp", + "data_elim_Pulse.Syntax.Base.Mkbinder", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "disc_equation_Pulse.Syntax.Base.Tm_STApp", + "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.ppname_default", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.extends_with", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Pulse.Syntax.Base.binder", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "function_token_typing_Prims.__cache_version_number__", + "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Map.lemma_InDomUpd2", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.push_binding_as_map", + "lemma_Pulse.Typing.Env.push_env_as_map", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "proj_equation_Pulse.Syntax.Base.Mkbinder_binder_ty", + "proj_equation_Pulse.Syntax.Base.Mkst_term_term", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_Pulse.Syntax.Base.Mkst_term_term", + "projection_inverse_Pulse.Syntax.Base.Tm_STApp__0", + "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_26aa72c2bdd0719b051857cb081974bb", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", + "string_typing", "typing_FStar.Map.contains", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Syntax.Base.__proj__Mkbinder__item__binder_ty", + "typing_Pulse.Syntax.Base.ppname_default", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fstar_env" + ], + 0, + "006f12e7db00ecd299ea28364768085a" + ], + [ + "Pulse.Checker.STApp.instantaite_implicits", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "Pulse.Syntax.Base_pretyping_0b425ab385a56835d52cd71c18622a32", + "bool_inversion", "constructor_distinct_Pulse.Syntax.Base.Tm_STApp", + "disc_equation_FStar.Pervasives.Native.Some", + "disc_equation_Pulse.Syntax.Base.Tm_STApp", + "equality_tok_Pulse.Syntax.Base.Implicit@tok", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.extends_with", + "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", "lemma_Pulse.Typing.Env.mk_env_dom", + "primitive_Prims.op_AmpAmp", + "proj_equation_Pulse.Syntax.Base.Mkst_term_term", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_Pulse.Syntax.Base.Mkst_term_term", + "projection_inverse_Pulse.Syntax.Base.Tm_STApp__0", + "refinement_interpretation_Tm_refine_216a0d577fe6866b7566aea51095c305", + "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", + "string_typing", "typing_FStar.Reflection.V2.Data.var", + "typing_FStar.Set.empty", "typing_FStar.Set.intersect", + "typing_FStar.Set.mem", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fstar_env", + "typing_tok_Pulse.Syntax.Base.Implicit@tok" + ], + 0, + "5d31e5031960f32d5017e4282b4aa376" + ], + [ + "Pulse.Checker.STApp.check", + 1, + 1, + 1, [ "@MaxIFuel_assumption", "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "Pulse.Syntax.Base_pretyping_01e6cbbfeab3ba416b144f2c9223a2d4", "Pulse.Syntax.Base_pretyping_0b425ab385a56835d52cd71c18622a32", "assumption_FStar.Pervasives.Native.option__uu___haseq", "assumption_Pulse.Syntax.Base.qualifier__uu___haseq", + "constructor_distinct_FStar.Pervasives.Native.None", "constructor_distinct_Pulse.Syntax.Base.C_ST", "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", "constructor_distinct_Pulse.Syntax.Base.C_STGhost", - "constructor_distinct_Pulse.Syntax.Base.Tm_STApp", + "disc_equation_FStar.Pervasives.Native.None", "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", "disc_equation_Pulse.Syntax.Base.C_Tot", "disc_equation_Pulse.Syntax.Base.Tm_STApp", "equality_tok_Pulse.Syntax.Base.Implicit@tok", "equation_FStar.Reflection.Typing.pp_name_t", "equation_Prims.eqtype", "equation_Pulse.Checker.Pure.push_context", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.range", "equation_Pulse.Syntax.Naming.open_comp_", "equation_Pulse.Syntax.Naming.open_comp_with", "equation_Pulse.Syntax.Naming.subst_comp", "equation_Pulse.Syntax.Pure.tm_arrow", - "equation_Pulse.Typing.as_binder", - "equation_Pulse.Typing.post_hint_opt", + "equation_Pulse.Typing.Env.extends_with", + "equation_Pulse.Typing.as_binder", "equation_Pulse.Typing.wr", "fuel_guarded_inversion_FStar.Tactics.Result.__result", "fuel_guarded_inversion_Pulse.Syntax.Base.comp", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "function_token_typing_Prims.string", "kinding_Pulse.Syntax.Base.qualifier@tok", "lemma_FStar.Sealed.Inhabited.sealed_singleton", - "primitive_Prims.op_BarBar", "primitive_Prims.op_Equality", + "lemma_Pulse.Syntax.Base.range_singleton", + "primitive_Prims.op_Equality", "proj_equation_Pulse.Syntax.Base.Mkbinder_binder_ppname", "proj_equation_Pulse.Syntax.Base.Mkbinder_binder_ty", "proj_equation_Pulse.Syntax.Base.Mkppname_name", + "proj_equation_Pulse.Syntax.Base.Mkst_term_range", "projection_inverse_BoxBool_proj_0", "projection_inverse_FStar.Pervasives.Native.Mktuple3__1", "projection_inverse_FStar.Pervasives.Native.Mktuple3__2", "projection_inverse_FStar.Pervasives.Native.Mktuple3__3", + "projection_inverse_FStar.Pervasives.Native.None_a", "projection_inverse_FStar.Pervasives.Native.Some_v", "projection_inverse_Pulse.Syntax.Base.Mkbinder_binder_ppname", "projection_inverse_Pulse.Syntax.Base.Mkbinder_binder_ty", - "projection_inverse_Pulse.Syntax.Base.Tm_STApp__0", "refinement_interpretation_Tm_refine_216a0d577fe6866b7566aea51095c305", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", "refinement_interpretation_Tm_refine_7f3ad0958305f2921bfac06f466396ae", - "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", + "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "refinement_interpretation_Tm_refine_c6ef4092b649a72c5716798791f93ffe", "string_typing", "typing_Pulse.Checker.Pure.push_context", "typing_Pulse.Syntax.Base.__proj__Mkppname__item__name", "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__range", @@ -128,7 +243,7 @@ "typing_tok_Pulse.Syntax.Base.Implicit@tok" ], 0, - "284e70b17db729fa05ea6fabd191235b" + "6981db68fd969ba669a690614e514da2" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.STApp.fsti b/lib/steel/pulse/Pulse.Checker.STApp.fsti index ea8d38994..362ae0208 100644 --- a/lib/steel/pulse/Pulse.Checker.STApp.fsti +++ b/lib/steel/pulse/Pulse.Checker.STApp.fsti @@ -4,16 +4,13 @@ module T = FStar.Tactics.V2 open Pulse.Syntax open Pulse.Typing -open Pulse.Checker.Common +open Pulse.Checker.Base -val check_stapp - (allow_inst:bool) +val check (g:env) - (t:st_term{Tm_STApp? t.term}) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) - (check':bool -> check_t) + (res_ppname:ppname) + (t:st_term{Tm_STApp? t.term}) : T.Tac (checker_result_t g pre post_hint) - - diff --git a/lib/steel/pulse/Pulse.Checker.STApp.fsti.hints b/lib/steel/pulse/Pulse.Checker.STApp.fsti.hints index 6458581b8..ae33eda48 100644 --- a/lib/steel/pulse/Pulse.Checker.STApp.fsti.hints +++ b/lib/steel/pulse/Pulse.Checker.STApp.fsti.hints @@ -1 +1 @@ -[ "J\u001aqh^u\u0017kG", [] ] \ No newline at end of file +[ "}m@\tNp=j", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.VPropEquiv.fst b/lib/steel/pulse/Pulse.Checker.VPropEquiv.fst index 7de5e1c2f..6a55984ec 100644 --- a/lib/steel/pulse/Pulse.Checker.VPropEquiv.fst +++ b/lib/steel/pulse/Pulse.Checker.VPropEquiv.fst @@ -3,102 +3,6 @@ open Pulse.Syntax open Pulse.Typing open FStar.List.Tot - -let rec vprop_equiv_typing (#g:_) (#t0 #t1:term) (v:vprop_equiv g t0 t1) - : GTot ((tot_typing g t0 tm_vprop -> tot_typing g t1 tm_vprop) & - (tot_typing g t1 tm_vprop -> tot_typing g t0 tm_vprop)) - (decreases v) - = match v with - | VE_Refl _ _ -> (fun x -> x), (fun x -> x) - - | VE_Sym _ _ _ v' -> - let f, g = vprop_equiv_typing v' in - g, f - - | VE_Trans g t0 t2 t1 v02 v21 -> - let f02, f20 = vprop_equiv_typing v02 in - let f21, f12 = vprop_equiv_typing v21 in - (fun x -> f21 (f02 x)), - (fun x -> f20 (f12 x)) - - | VE_Ctxt g s0 s1 s0' s1' v0 v1 -> - let f0, f0' = vprop_equiv_typing v0 in - let f1, f1' = vprop_equiv_typing v1 in - let ff (x:tot_typing g (tm_star s0 s1) tm_vprop) - : tot_typing g (tm_star s0' s1') tm_vprop - = let s0_typing = star_typing_inversion_l x in - let s1_typing = star_typing_inversion_r x in - let s0'_typing, s1'_typing = f0 s0_typing, f1 s1_typing in - star_typing s0'_typing s1'_typing - in - let gg (x:tot_typing g (tm_star s0' s1') tm_vprop) - : tot_typing g (tm_star s0 s1) tm_vprop - = let s0'_typing = star_typing_inversion_l x in - let s1'_typing = star_typing_inversion_r x in - star_typing (f0' s0'_typing) (f1' s1'_typing) - in - ff, gg - - | VE_Unit g t -> - let fwd (x:tot_typing g (tm_star tm_emp t) tm_vprop) - : tot_typing g t tm_vprop - = let r = star_typing_inversion_r x in - r - in - let bk (x:tot_typing g t tm_vprop) - : tot_typing g (tm_star tm_emp t) tm_vprop - = star_typing emp_typing x - in - fwd, bk - - | VE_Comm g t0 t1 -> - let f t0 t1 (x:tot_typing g (tm_star t0 t1) tm_vprop) - : tot_typing g (tm_star t1 t0) tm_vprop - = let tt0 = star_typing_inversion_l x in - let tt1 = star_typing_inversion_r x in - star_typing tt1 tt0 - in - f t0 t1, f t1 t0 - - | VE_Assoc g t0 t1 t2 -> - let fwd (x:tot_typing g (tm_star t0 (tm_star t1 t2)) tm_vprop) - : tot_typing g (tm_star (tm_star t0 t1) t2) tm_vprop - = let tt0 = star_typing_inversion_l x in - let tt12 = star_typing_inversion_r x in - let tt1 = star_typing_inversion_l tt12 in - let tt2 = star_typing_inversion_r tt12 in - star_typing (star_typing tt0 tt1) tt2 - in - let bk (x : tot_typing g (tm_star (tm_star t0 t1) t2) tm_vprop) - : tot_typing g (tm_star t0 (tm_star t1 t2)) tm_vprop - = let tt01 = star_typing_inversion_l x in - let tt2 = star_typing_inversion_r x in - let tt0 = star_typing_inversion_l tt01 in - let tt1 = star_typing_inversion_r tt01 in - star_typing tt0 (star_typing tt1 tt2) - in - fwd, bk - - | VE_Ext g t0 t1 token -> - let d1, d2 = vprop_eq_typing_inversion g t0 t1 token in - (fun _ -> d2), - (fun _ -> d1) - - -let rec vprop_as_list (vp:term) - : list term - = match vp.t with - | Tm_Emp -> [] - | Tm_Star vp0 vp1 -> vprop_as_list vp0 @ vprop_as_list vp1 - | _ -> [vp] - -let rec list_as_vprop (vps:list term) - : term - = match vps with - | [] -> tm_emp - | hd::tl -> tm_star hd (list_as_vprop tl) - - let ve_unit_r g (p:term) : vprop_equiv g (tm_star p tm_emp) p = VE_Trans _ _ _ _ (VE_Comm _ _ _) (VE_Unit _ _) diff --git a/lib/steel/pulse/Pulse.Checker.VPropEquiv.fst.hints b/lib/steel/pulse/Pulse.Checker.VPropEquiv.fst.hints index 0c196a599..c6c8a584e 100644 --- a/lib/steel/pulse/Pulse.Checker.VPropEquiv.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.VPropEquiv.fst.hints @@ -1,70 +1,6 @@ [ - "A9d^}s", + "\b›IJ\u000f)", [ - [ - "Pulse.Checker.VPropEquiv.vprop_equiv_typing", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "binder_x_40f47b036cc24e11c7ed578f0b141555_1", - "binder_x_40f47b036cc24e11c7ed578f0b141555_2", - "binder_x_4aac6b0850125a17ce56a01cff360133_3", - "data_elim_Pulse.Typing.VE_Assoc", "data_elim_Pulse.Typing.VE_Comm", - "data_elim_Pulse.Typing.VE_Ctxt", "data_elim_Pulse.Typing.VE_Ext", - "data_elim_Pulse.Typing.VE_Refl", "data_elim_Pulse.Typing.VE_Sym", - "data_elim_Pulse.Typing.VE_Trans", "data_elim_Pulse.Typing.VE_Unit", - "disc_equation_Pulse.Typing.VE_Assoc", - "disc_equation_Pulse.Typing.VE_Comm", - "disc_equation_Pulse.Typing.VE_Ctxt", - "disc_equation_Pulse.Typing.VE_Ext", - "disc_equation_Pulse.Typing.VE_Refl", - "disc_equation_Pulse.Typing.VE_Sym", - "disc_equation_Pulse.Typing.VE_Trans", - "disc_equation_Pulse.Typing.VE_Unit", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "fuel_guarded_inversion_Pulse.Typing.vprop_equiv", - "projection_inverse_BoxBool_proj_0", - "subterm_ordering_Pulse.Typing.VE_Ctxt", - "subterm_ordering_Pulse.Typing.VE_Sym", - "subterm_ordering_Pulse.Typing.VE_Trans" - ], - 0, - "262d38283fdd0516bac49bab8a52d8fa" - ], - [ - "Pulse.Checker.VPropEquiv.vprop_as_list", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "binder_x_40f47b036cc24e11c7ed578f0b141555_0", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "proj_equation_Pulse.Syntax.Base.Mkterm_t", - "subterm_ordering_Pulse.Syntax.Base.Mkterm", - "subterm_ordering_Pulse.Syntax.Base.Tm_Star", - "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t" - ], - 0, - "8cfd4059c183f1c55cdbd66fccf978b3" - ], - [ - "Pulse.Checker.VPropEquiv.list_as_vprop", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "binder_x_ce31d037e7efe7dd857e44eb91ef874d_0", - "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", - "fuel_guarded_inversion_Prims.list", - "projection_inverse_BoxBool_proj_0", "subterm_ordering_Prims.Cons" - ], - 0, - "1df97d672de0230d52cb209192d85371" - ], [ "Pulse.Checker.VPropEquiv.list_as_vprop_append", 1, @@ -73,16 +9,16 @@ [ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.append.fuel_instrumented", - "@fuel_correspondence_Pulse.Checker.VPropEquiv.list_as_vprop.fuel_instrumented", + "@fuel_correspondence_Pulse.Typing.Combinators.list_as_vprop.fuel_instrumented", "@fuel_irrelevance_FStar.List.Tot.Base.append.fuel_instrumented", - "@fuel_irrelevance_Pulse.Checker.VPropEquiv.list_as_vprop.fuel_instrumented", + "@fuel_irrelevance_Pulse.Typing.Combinators.list_as_vprop.fuel_instrumented", "@query", "binder_x_ce31d037e7efe7dd857e44eb91ef874d_1", "binder_x_ce31d037e7efe7dd857e44eb91ef874d_2", "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", "equation_FStar.List.Tot.Base.op_At", "equation_with_fuel_FStar.List.Tot.Base.append.fuel_instrumented", - "equation_with_fuel_Pulse.Checker.VPropEquiv.list_as_vprop.fuel_instrumented", + "equation_with_fuel_Pulse.Typing.Combinators.list_as_vprop.fuel_instrumented", "fuel_guarded_inversion_Prims.list", "kinding_Pulse.Syntax.Base.term@tok", "projection_inverse_BoxBool_proj_0", @@ -92,7 +28,7 @@ "subterm_ordering_Prims.Cons", "typing_FStar.List.Tot.Base.op_At" ], 0, - "105e9cf078ed343bc1294823d9ffd453" + "f9c79950704654959da80ae1944ee8c3" ], [ "Pulse.Checker.VPropEquiv.list_as_vprop_assoc", @@ -101,7 +37,7 @@ 1, [ "@query" ], 0, - "57985c5633e122288769fd74a793e86d" + "05ace2bd67ee70c2e8dadd6292fd8b5b" ], [ "Pulse.Checker.VPropEquiv.vprop_list_equiv", @@ -110,9 +46,9 @@ 1, [ "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_Pulse.Checker.VPropEquiv.list_as_vprop.fuel_instrumented", - "@fuel_correspondence_Pulse.Checker.VPropEquiv.vprop_as_list.fuel_instrumented", - "@fuel_irrelevance_Pulse.Checker.VPropEquiv.vprop_as_list.fuel_instrumented", + "@fuel_correspondence_Pulse.Typing.Combinators.list_as_vprop.fuel_instrumented", + "@fuel_correspondence_Pulse.Typing.Combinators.vprop_as_list.fuel_instrumented", + "@fuel_irrelevance_Pulse.Typing.Combinators.vprop_as_list.fuel_instrumented", "@query", "binder_x_40f47b036cc24e11c7ed578f0b141555_1", "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", "constructor_distinct_Pulse.Syntax.Base.Tm_Emp", @@ -128,8 +64,8 @@ "equation_Pulse.Syntax.Base.tm_emp", "equation_Pulse.Syntax.Base.tm_star", "equation_Pulse.Syntax.Base.with_range", - "equation_with_fuel_Pulse.Checker.VPropEquiv.list_as_vprop.fuel_instrumented", - "equation_with_fuel_Pulse.Checker.VPropEquiv.vprop_as_list.fuel_instrumented", + "equation_with_fuel_Pulse.Typing.Combinators.list_as_vprop.fuel_instrumented", + "equation_with_fuel_Pulse.Typing.Combinators.vprop_as_list.fuel_instrumented", "fuel_guarded_inversion_Prims.list", "fuel_guarded_inversion_Pulse.Syntax.Base.term", "kinding_Pulse.Syntax.Base.term@tok", @@ -144,13 +80,13 @@ "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", "subterm_ordering_Pulse.Syntax.Base.Mkterm", "subterm_ordering_Pulse.Syntax.Base.Tm_Star", - "typing_Pulse.Checker.VPropEquiv.vprop_as_list", "typing_Pulse.RuntimeUtils.union_ranges", "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", - "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t" + "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t", + "typing_Pulse.Typing.Combinators.vprop_as_list" ], 0, - "9fc8a1422895cfe7dae54744377f283a" + "6f850f006b400350f4542b4a27097797" ], [ "Pulse.Checker.VPropEquiv.vprop_equiv_split_frame", @@ -163,7 +99,7 @@ "fuel_guarded_inversion_Pulse.Syntax.Base.term" ], 0, - "ff1194134bb7ed12378deb7d4f5080c7" + "5b04a0fc9e9add2b785c00c9996515d9" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.VPropEquiv.fsti b/lib/steel/pulse/Pulse.Checker.VPropEquiv.fsti index c1afb8eed..f5901ddbf 100644 --- a/lib/steel/pulse/Pulse.Checker.VPropEquiv.fsti +++ b/lib/steel/pulse/Pulse.Checker.VPropEquiv.fsti @@ -1,17 +1,12 @@ module Pulse.Checker.VPropEquiv -open Pulse.Syntax -open Pulse.Typing -open FStar.List.Tot -val vprop_equiv_typing (#g:_) (#t0 #t1:term) (v:vprop_equiv g t0 t1) - : GTot ((tot_typing g t0 tm_vprop -> tot_typing g t1 tm_vprop) & - (tot_typing g t1 tm_vprop -> tot_typing g t0 tm_vprop)) +open FStar.List.Tot -val vprop_as_list (vp:term) - : list term +open Pulse.Syntax +open Pulse.Typing +open Pulse.Typing.Combinators -val list_as_vprop (vps:list term) - : term +open Pulse.Checker.Base let canon_vprop (vp:term) : term diff --git a/lib/steel/pulse/Pulse.Checker.VPropEquiv.fsti.hints b/lib/steel/pulse/Pulse.Checker.VPropEquiv.fsti.hints index 8c9e5432a..6e287f7ef 100644 --- a/lib/steel/pulse/Pulse.Checker.VPropEquiv.fsti.hints +++ b/lib/steel/pulse/Pulse.Checker.VPropEquiv.fsti.hints @@ -1 +1 @@ -[ "xڦ\\irda", [] ] \ No newline at end of file +[ "?[J}گt%2", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.While.fst b/lib/steel/pulse/Pulse.Checker.While.fst index 5fc3a082e..d2663f679 100644 --- a/lib/steel/pulse/Pulse.Checker.While.fst +++ b/lib/steel/pulse/Pulse.Checker.While.fst @@ -1,18 +1,14 @@ module Pulse.Checker.While -module T = FStar.Tactics.V2 -module RT = FStar.Reflection.Typing - open Pulse.Syntax open Pulse.Typing open Pulse.Checker.Pure -open Pulse.Checker.Common +open Pulse.Checker.Base +open Pulse.Checker.Prover +module T = FStar.Tactics.V2 module P = Pulse.Syntax.Printer -module FV = Pulse.Typing.FV -module Framing = Pulse.Checker.Framing module Metatheory = Pulse.Typing.Metatheory -module RU = Pulse.RuntimeUtils let while_cond_comp_typing (#g:env) (u:universe) (x:ppname) (ty:term) (inv_body:term) (inv_typing:tot_typing g (tm_exists_sl u (as_binder ty) inv_body) tm_vprop) @@ -24,86 +20,89 @@ let while_body_comp_typing (#g:env) (u:universe) (x:ppname) (ty:term) (inv_body: : Metatheory.comp_typing_u g (comp_while_body x inv_body) = Metatheory.admit_comp_typing g (comp_while_body x inv_body) -#push-options "--ifuel 2 --z3rlimit_factor 10 --split_queries no --query_stats" -let check_while - (allow_inst:bool) +#push-options "--fuel 0 --ifuel 1 --z3rlimit_factor 4" +let check (g:env) - (t:st_term{Tm_While? t.term}) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) - (check':bool -> check_t) + (res_ppname:ppname) + (t:st_term{Tm_While? t.term}) + (check:check_t) : T.Tac (checker_result_t g pre post_hint) = + let g = push_context "while loop" t.range g in let Tm_While { invariant=inv; condition=cond; body; condition_var } = t.term in let (| ex_inv, inv_typing |) = check_vprop (push_context "invariant" (term_range inv) g) (tm_exists_sl u0 { binder_ppname=condition_var; binder_ty=tm_bool } inv) in - if RU.debug_at_level (fstar_env g) "inference" - then ( - T.print (Printf.sprintf "Checking precondition of while loop: %s\n" (P.term_to_string ex_inv)) - ); - match Framing.check_frameable pre_typing ex_inv with - | Inr f -> T.raise (Framing_failure f) - | Inl framing_token -> - match ex_inv.t with - | Tm_ExistsSL u {binder_ppname=nm; binder_ty=ty} inv -> - if not (eq_tm ty tm_bool) || - not (eq_univ u u0) - then fail g (Some nm.range) "While loop invariant exists but its witness type is not bool" - else begin - let while_cond_comp_typing = while_cond_comp_typing u nm ty inv inv_typing in - let (| res_typing, cond_pre_typing, x, post_typing |) = - Metatheory.(st_comp_typing_inversion (comp_typing_inversion while_cond_comp_typing)) - in - let while_cond_hint - : post_hint_for_env g - = post_hint_from_comp_typing while_cond_comp_typing - in - let (| cond, cond_comp, cond_typing |) = - check' allow_inst - (push_context "while condition" cond.range g) - cond - (comp_pre (comp_while_cond nm inv)) - cond_pre_typing - (Some while_cond_hint) - in - if eq_comp cond_comp (comp_while_cond nm inv) - then begin - let while_body_comp_typing = while_body_comp_typing u nm ty inv inv_typing in - let (| res_typing, body_pre_typing, x, post_typing |) = - Metatheory.(st_comp_typing_inversion (comp_typing_inversion while_body_comp_typing)) - in - let while_post_hint - : post_hint_for_env g - = post_hint_from_comp_typing while_body_comp_typing - in - let (| body, body_comp, body_typing |) = - check' allow_inst - (push_context "while body" body.range g) - body - (comp_pre (comp_while_body nm inv)) - body_pre_typing - (Some while_post_hint) - in - if eq_comp body_comp (comp_while_body nm inv) - then let d = T_While g inv cond body inv_typing cond_typing body_typing in - let (| c, st_d |) = Framing.apply_frame pre_typing d framing_token in - repack (| c, st_d |) post_hint - else - fail g None - (Printf.sprintf "Could not prove the inferred type of the while body matches the annotation\n\ - Inferred type = %s\n\ - Annotated type = %s\n" - (P.comp_to_string body_comp) - (P.comp_to_string (comp_while_body nm inv))) - end - else fail g None -(Printf.sprintf "Could not prove that the inferred type of the while condition matches the annotation\n\ - Inferred type = %s\n\ - Annotated type = %s\n" - (P.comp_to_string cond_comp) - (P.comp_to_string (comp_while_cond nm inv))) - end - | _ -> fail g None "Typechecked invariant is not an exists" + + if not (Tm_ExistsSL? ex_inv.t) + then fail g (Some t.range) + (Printf.sprintf "check_while: typechecked invariant %s is not an existential" + (P.term_to_string ex_inv)); + + let Tm_ExistsSL u {binder_ppname=nm; binder_ty=ty} inv = ex_inv.t in + + if not (eq_tm ty tm_bool) || + not (eq_univ u u0) + then fail g (Some nm.range) + (Printf.sprintf "While loop invariant exists but its witness type is %s, expected bool" + (P.term_to_string ty)); + + let while_cond_comp_typing = while_cond_comp_typing u nm ty inv inv_typing in + let (| res_typing, cond_pre_typing, x, post_typing |) = + Metatheory.(st_comp_typing_inversion (comp_typing_inversion while_cond_comp_typing)) + in + let while_cond_hint : post_hint_for_env g = + post_hint_from_comp_typing while_cond_comp_typing + in + + let (| cond, cond_comp, cond_typing |) = + let ppname = mk_ppname_no_range "_while_c" in + let r = check + (push_context "check_while_condition" cond.range g) + (comp_pre (comp_while_cond nm inv)) + cond_pre_typing + (Some while_cond_hint) + ppname + cond in + apply_checker_result_k r ppname + in + if eq_comp cond_comp (comp_while_cond nm inv) + then begin + let while_body_comp_typing = while_body_comp_typing u nm ty inv inv_typing in + let (| res_typing, body_pre_typing, x, post_typing |) = + Metatheory.(st_comp_typing_inversion (comp_typing_inversion while_body_comp_typing)) + in + let while_post_hint : post_hint_for_env g = + post_hint_from_comp_typing while_body_comp_typing + in + let (| body, body_comp, body_typing |) = + let ppname = mk_ppname_no_range "_while_b" in + let r = check + (push_context "check_while_body" body.range g) + (comp_pre (comp_while_body nm inv)) + body_pre_typing + (Some while_post_hint) + ppname + body in + apply_checker_result_k r ppname in + if eq_comp body_comp (comp_while_body nm inv) + then + let d = T_While g inv cond body inv_typing cond_typing body_typing in + prove_post_hint (try_frame_pre pre_typing d res_ppname) post_hint t.range + else fail g None + (Printf.sprintf "Could not prove the inferred type of the while body matches the annotation\n\ + Inferred type = %s\n\ + Annotated type = %s\n" + (P.comp_to_string body_comp) + (P.comp_to_string (comp_while_body nm inv))) + end + else fail g None + (Printf.sprintf "Could not prove that the inferred type of the while condition matches the annotation\n\ + Inferred type = %s\n\ + Annotated type = %s\n" + (P.comp_to_string cond_comp) + (P.comp_to_string (comp_while_cond nm inv))) diff --git a/lib/steel/pulse/Pulse.Checker.While.fst.hints b/lib/steel/pulse/Pulse.Checker.While.fst.hints index 761cd416f..017fdc0a5 100644 --- a/lib/steel/pulse/Pulse.Checker.While.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.While.fst.hints @@ -1,5 +1,5 @@ [ - "[>(\t|\u0013(uw", + "\u0018=Dyl\npmh0^", [ [ "Pulse.Checker.While.while_cond_comp_typing", @@ -15,7 +15,7 @@ "projection_inverse_BoxBool_proj_0" ], 0, - "a733ce0551be14dec83a2cf7014175a7" + "072f488c0db5684ac184e8d832e11113" ], [ "Pulse.Checker.While.while_body_comp_typing", @@ -31,116 +31,93 @@ "projection_inverse_BoxBool_proj_0" ], 0, - "13f42030ab770e44259f505620040ac4" + "dc1713e44937fea0c7a898366031c11c" ], [ - "Pulse.Checker.While.check_while", + "Pulse.Checker.While.check", + 1, + 0, 1, - 2, - 2, [ "@MaxIFuel_assumption", "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "Pulse.Syntax.Base_pretyping_b015b044c5bf00a3dd3df9fa711c87dd", "Pulse.Syntax.Base_pretyping_fe09dc1e796799f4bac0760e63f30d40", "Pulse.Typing_pretyping_85b09ae4ef91823fbf549acd09fde244", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.None", "constructor_distinct_FStar.Pervasives.Native.Some", "constructor_distinct_FStar.Tactics.Result.Failed", "constructor_distinct_FStar.Tactics.Result.Success", "constructor_distinct_Pulse.Syntax.Base.C_ST", "constructor_distinct_Pulse.Syntax.Base.Tm_While", "data_elim_FStar.Pervasives.Mkdtuple4", - "data_elim_FStar.Tactics.Result.Success", - "data_elim_Pulse.Syntax.Base.Mkbinder", "data_elim_Pulse.Syntax.Base.Mkppname", - "data_elim_Pulse.Syntax.Base.Mkterm", "data_elim_Pulse.Typing.STC", - "disc_equation_FStar.Pervasives.Inl", - "disc_equation_FStar.Pervasives.Inr", + "data_elim_Pulse.Syntax.Base.Mkterm", "disc_equation_FStar.Pervasives.Native.None", "disc_equation_Pulse.Syntax.Base.C_ST", "disc_equation_Pulse.Syntax.Base.C_STAtomic", "disc_equation_Pulse.Syntax.Base.C_STGhost", "disc_equation_Pulse.Syntax.Base.C_Tot", + "disc_equation_Pulse.Syntax.Base.Tm_ExistsSL", "disc_equation_Pulse.Syntax.Base.Tm_While", - "equation_FStar.Pervasives.Native.fst", - "equation_FStar.Pervasives.Native.snd", "equation_FStar.Range.range", + "equation_FStar.Pervasives.Native.fst", "equation_FStar.Range.range", "equation_FStar.Reflection.Const.bool_lid", "equation_FStar.Reflection.Typing.fstar_top_env", "equation_FStar.Reflection.Typing.pp_name_t", - "equation_FStar.Reflection.Typing.u_zero", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", - "equation_Prims.nat", - "equation_Pulse.Checker.Framing.frame_for_req_in_ctxt", - "equation_Pulse.Checker.Pure.push_context", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Sealed.Inhabited.sealed", + "equation_FStar.Sealed.Inhabited.sealed_", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Checker.Pure.push_context", "equation_Pulse.Reflection.Util.bool_lid", "equation_Pulse.Syntax.Base.as_fv", "equation_Pulse.Syntax.Base.comp_pre", "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.nvar", "equation_Pulse.Syntax.Base.ppname_default", "equation_Pulse.Syntax.Base.range", "equation_Pulse.Syntax.Base.st_comp_of_comp", "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.term_range", "equation_Pulse.Syntax.Base.tm_exists_sl", "equation_Pulse.Syntax.Base.tm_fstar", - "equation_Pulse.Syntax.Base.typ", - "equation_Pulse.Syntax.Base.universe", - "equation_Pulse.Syntax.Base.v_as_nv", - "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Pure.tm_fvar", "equation_Pulse.Syntax.Pure.u0", "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.env_extends", - "equation_Pulse.Typing.Env.extends_with", "equation_Pulse.Typing.Env.lookup", "equation_Pulse.Typing.as_binder", "equation_Pulse.Typing.comp_while", "equation_Pulse.Typing.comp_while_body", "equation_Pulse.Typing.comp_while_cond", "equation_Pulse.Typing.fresh_wrt", - "equation_Pulse.Typing.named_binder", "equation_Pulse.Typing.post_hint_for_env", - "equation_Pulse.Typing.post_hint_for_env_p", "equation_Pulse.Typing.tm_bool", "fuel_guarded_inversion_FStar.Pervasives.Native.option", "fuel_guarded_inversion_FStar.Pervasives.dtuple4", - "fuel_guarded_inversion_FStar.Pervasives.either", "fuel_guarded_inversion_FStar.Tactics.Result.__result", "fuel_guarded_inversion_Pulse.Syntax.Base.comp", "fuel_guarded_inversion_Pulse.Syntax.Base.ppname", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "fuel_guarded_inversion_Pulse.Typing.st_comp_typing", "function_token_typing_Prims.__cache_version_number__", "function_token_typing_Prims.string", "int_inversion", "interpretation_Tm_abs_9cb689b25d040926e19a35940a7437be", "interpretation_Tm_abs_c8631188b49e797b2c9232f71b480642", - "kinding_Pulse.Syntax.Base.ppname@tok", "kinding_Pulse.Syntax.Base.term@tok", "lemma_FStar.Map.lemma_ContainsDom", - "lemma_FStar.Map.lemma_InDomConcat", "lemma_FStar.Sealed.Inhabited.sealed_singleton", "lemma_Pulse.Syntax.Base.range_singleton", - "lemma_Pulse.Typing.Env.push_env_as_map", "primitive_Prims.op_BarBar", "primitive_Prims.op_Negation", "proj_equation_FStar.Pervasives.Native.Mktuple2__1", - "proj_equation_FStar.Pervasives.Native.Mktuple2__2", "proj_equation_FStar.Pervasives.Native.Some_v", - "proj_equation_Pulse.Syntax.Base.Mkbinder_binder_ppname", "proj_equation_Pulse.Syntax.Base.Mkbinder_binder_ty", "proj_equation_Pulse.Syntax.Base.Mkfv_fv_range", - "proj_equation_Pulse.Syntax.Base.Mknm_nm_ppname", - "proj_equation_Pulse.Syntax.Base.Mkppname_name", - "proj_equation_Pulse.Syntax.Base.Mkppname_range", "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", - "proj_equation_Pulse.Syntax.Base.Mkst_term_range", "proj_equation_Pulse.Syntax.Base.Mkterm_range", "proj_equation_Pulse.Syntax.Base.Mkterm_t", - "proj_equation_Pulse.Typing.Mkpost_hint_t_g", "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Mkdtuple4__3", "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_FStar.Pervasives.Native.None_a", "projection_inverse_FStar.Pervasives.Native.Some_v", "projection_inverse_FStar.Tactics.Result.Failed_a", "projection_inverse_FStar.Tactics.Result.Failed_exn", @@ -149,61 +126,50 @@ "projection_inverse_FStar.Tactics.Result.Success_ps", "projection_inverse_FStar.Tactics.Result.Success_v", "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "projection_inverse_Pulse.Syntax.Base.Mkbinder_binder_ppname", "projection_inverse_Pulse.Syntax.Base.Mkbinder_binder_ty", "projection_inverse_Pulse.Syntax.Base.Mkfv_fv_range", - "projection_inverse_Pulse.Syntax.Base.Mknm_nm_ppname", - "projection_inverse_Pulse.Syntax.Base.Mkppname_name", "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", "projection_inverse_Pulse.Syntax.Base.Mkterm_range", "projection_inverse_Pulse.Syntax.Base.Tm_ExistsSL_b", "projection_inverse_Pulse.Syntax.Base.Tm_ExistsSL_body", "projection_inverse_Pulse.Syntax.Base.Tm_ExistsSL_u", "projection_inverse_Pulse.Syntax.Base.Tm_While__0", + "refinement_interpretation_Tm_refine_25fe9861b42cf97d961ff4c8f44eb399", "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", "refinement_interpretation_Tm_refine_26851533b13187a52e8644f48af2401b", + "refinement_interpretation_Tm_refine_32c58ace7239451bf6df460e56a19191", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_6067909eb7e26441b043722acc4cd3cf", - "refinement_interpretation_Tm_refine_64b37d51002c8aefb2e6e59cffdc3d7d", "refinement_interpretation_Tm_refine_6e8e5238aadfc712ef5fa6bc6310c384", "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "refinement_interpretation_Tm_refine_794754a2b36f266a1d24bacbacc935c2", "refinement_interpretation_Tm_refine_7f3ad0958305f2921bfac06f466396ae", "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", "refinement_interpretation_Tm_refine_c0259d9584cff5be1dbb133bed7b14f4", + "refinement_interpretation_Tm_refine_c36766333c13faf2a6d6de6db1e91a13", "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", "refinement_interpretation_Tm_refine_ce35950777565f210e37ac97fff16964", "refinement_interpretation_Tm_refine_eed994d15518279ab75d745192d0d368", "refinement_interpretation_Tm_refine_f0ac051651fa0e095f1b2c1241fd6a3f", - "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "string_typing", "typing_FStar.Map.contains", - "typing_FStar.Map.domain", "typing_FStar.Pervasives.Native.snd", - "typing_FStar.Range.range_0", - "typing_FStar.Reflection.Typing.u_zero", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Checker.Pure.push_context", + "string_typing", "typing_FStar.Range.range_0", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Sealed.seal", + "typing_FStar.Set.mem", "typing_Pulse.Checker.Pure.push_context", "typing_Pulse.RuntimeUtils.union_ranges", - "typing_Pulse.Syntax.Base.__proj__Mkppname__item__range", "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__range", - "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", "typing_Pulse.Syntax.Base.eq_comp", "typing_Pulse.Syntax.Base.eq_tm", "typing_Pulse.Syntax.Base.eq_univ", "typing_Pulse.Syntax.Base.ppname_default", - "typing_Pulse.Syntax.Base.term_range", - "typing_Pulse.Syntax.Base.v_as_nv", "typing_Pulse.Typing.Env.as_map", - "typing_Pulse.Typing.Env.dom", "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Syntax.Base.stateful_comp", + "typing_Pulse.Syntax.Base.term_range", "typing_Pulse.Syntax.Pure.u0", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fstar_env", "typing_Pulse.Typing.Env.lookup", "typing_Pulse.Typing.Env.push_context", - "typing_Pulse.Typing.Metatheory.st_comp_typing_inversion", - "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g", - "typing_Pulse.Typing.as_binder", + "typing_Pulse.Typing.Metatheory.Base.st_comp_typing_inversion", "typing_Pulse.Typing.comp_while_body", - "typing_Pulse.Typing.comp_while_cond", - "typing_Pulse.Typing.named_binder", "typing_Pulse.Typing.tm_bool" + "typing_Pulse.Typing.comp_while_cond", "typing_Pulse.Typing.tm_bool", + "unit_inversion" ], 0, - "a11927ea7f0d13ce549b5bbff1966bbc" + "4e075784d193aa8c72c7dd3a4d67bdf4" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.While.fsti b/lib/steel/pulse/Pulse.Checker.While.fsti index 78576d579..1d300f3a4 100644 --- a/lib/steel/pulse/Pulse.Checker.While.fsti +++ b/lib/steel/pulse/Pulse.Checker.While.fsti @@ -1,18 +1,17 @@ module Pulse.Checker.While -module T = FStar.Tactics.V2 - open Pulse.Syntax open Pulse.Typing -open Pulse.Checker.Common +open Pulse.Checker.Base + +module T = FStar.Tactics.V2 -val check_while - (allow_inst:bool) +val check (g:env) - (t:st_term{Tm_While? t.term}) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) - (check':bool -> check_t) + (res_ppname:ppname) + (t:st_term{Tm_While? t.term}) + (check:check_t) : T.Tac (checker_result_t g pre post_hint) - diff --git a/lib/steel/pulse/Pulse.Checker.While.fsti.hints b/lib/steel/pulse/Pulse.Checker.While.fsti.hints index d6f819d63..14a644a06 100644 --- a/lib/steel/pulse/Pulse.Checker.While.fsti.hints +++ b/lib/steel/pulse/Pulse.Checker.While.fsti.hints @@ -1 +1 @@ -[ "\b7\u001fVi]{^", [] ] \ No newline at end of file +[ "M;kOy\u000e?\t\u0002\u0003", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.WithLocal.fst b/lib/steel/pulse/Pulse.Checker.WithLocal.fst index 7b22bbffd..464406f30 100644 --- a/lib/steel/pulse/Pulse.Checker.WithLocal.fst +++ b/lib/steel/pulse/Pulse.Checker.WithLocal.fst @@ -1,16 +1,13 @@ module Pulse.Checker.WithLocal -module T = FStar.Tactics.V2 -module RT = FStar.Reflection.Typing - open Pulse.Syntax open Pulse.Typing open Pulse.Checker.Pure -open Pulse.Checker.Common +open Pulse.Checker.Base -module FV = Pulse.Typing.FV +module T = FStar.Tactics.V2 +module P = Pulse.Syntax.Printer -#push-options "--z3rlimit_factor 4" let extend_post_hint_for_local (g:env) (p:post_hint_for_env g) (init_t:term) (x:var { ~ (Set.mem x (dom g)) }) : post_hint_for_env (push_binding g x ppname_default init_t) @@ -24,65 +21,72 @@ let with_local_pre_typing (#g:env) (#pre:term) (pre_typing:tot_typing g pre tm_v tm_vprop = admit() - - -let check_withlocal - (allow_inst:bool) +#push-options "--z3rlimit_factor 4 --fuel 0 --ifuel 1" +let check (g:env) - (t:st_term{Tm_WithLocal? t.term}) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) - (check':bool -> check_t) + (res_ppname:ppname) + (t:st_term { Tm_WithLocal? t.term }) + (check:check_t) : T.Tac (checker_result_t g pre post_hint) = + let g = push_context "check_withlocal" t.range g in let wr t0 = { term = t0; range = t.range } in let Tm_WithLocal {binder; initializer=init; body} = t.term in let (| init, init_u, init_t, init_t_typing, init_typing |) = check_term_and_type g init in if eq_univ init_u u0 - then let x = fresh g in - let px = binder.binder_ppname, x in - if x `Set.mem` freevars_st body - then fail g (Some body.range) (Printf.sprintf "withlocal: %s is free in body" (T.unseal binder.binder_ppname.name)) - else - let x_tm = term_of_nvar px in - let g_extended = push_binding g x binder.binder_ppname (mk_ref init_t) in - let body_pre = comp_withlocal_body_pre pre init_t x_tm init in - let body_pre_typing = with_local_pre_typing pre_typing init_t x init in - // elaborating this post here, - // so that later we can check the computed post to be equal to this one - let post : post_hint_for_env g = - // let post = - match post_hint with - | Some post -> post - | None -> fail g None "Allocating a mutable local variable expects an annotated post-condition" - in - if x `Set.mem` freevars post.post - then fail g None "Unexpected name clash in with_local" - else ( - let body_post = extend_post_hint_for_local g post init_t x in - let (| opened_body, c_body, body_typing |) = - check' allow_inst g_extended (open_st_term_nv body px) body_pre body_pre_typing (Some body_post) in - // - // Checking post equality here to match the typing rule - // - if not (C_ST? c_body) - then fail g (Some body.range) "withlocal: body is not stt or postcondition mismatch" - else let body = close_st_term opened_body x in - assume (open_st_term (close_st_term opened_body x) x == opened_body); - let c = C_ST {u=comp_u c_body;res=comp_res c_body;pre;post=post.post} in - let c_typing = - let post_typing_rec = post_hint_typing g post x in - intro_comp_typing g c pre_typing post_typing_rec.ty_typing x post_typing_rec.post_typing - in - let d = T_WithLocal g init body init_t c x - (E init_typing) - init_t_typing - c_typing - body_typing - in - (| _, _, d |) - ) - else fail g None "Allocating a local variable: init type is not universe zero" -#pop-options + then + let x = fresh g in + let px = binder.binder_ppname, x in + if x `Set.mem` freevars_st body + then fail g (Some body.range) (Printf.sprintf "withlocal: %s is free in body" (T.unseal binder.binder_ppname.name)) + else + let x_tm = term_of_nvar px in + let g_extended = push_binding g x binder.binder_ppname (mk_ref init_t) in + let body_pre = comp_withlocal_body_pre pre init_t x_tm init in + let body_pre_typing = with_local_pre_typing pre_typing init_t x init in + // elaborating this post here, + // so that later we can check the computed post to be equal to this one + let post : post_hint_for_env g = + match post_hint with + | Some post -> post + | None -> fail g None "Allocating a mutable local variable expects an annotated post-condition" + in + if x `Set.mem` freevars post.post + then fail g None "Impossible! check_withlocal: unexpected name clash in with_local,\ + please file a bug-report" + else + let body_post = extend_post_hint_for_local g post init_t x in + let (| opened_body, c_body, body_typing |) = + let r = + check g_extended body_pre body_pre_typing (Some body_post) binder.binder_ppname (open_st_term_nv body px) in + apply_checker_result_k r binder.binder_ppname in + // + // Checking post equality here to match the typing rule + // + if not (C_ST? c_body) + then fail g (Some body.range) + (Printf.sprintf "check_withlocal: body computation type %s is not ST" + (P.comp_to_string c_body)) + else + let body = close_st_term opened_body x in + assume (open_st_term (close_st_term opened_body x) x == opened_body); + let c = C_ST {u=comp_u c_body;res=comp_res c_body;pre;post=post.post} in + let c_typing = + let post_typing_rec = post_hint_typing g post x in + intro_comp_typing g c pre_typing post_typing_rec.ty_typing x post_typing_rec.post_typing + in + let d = T_WithLocal g init body init_t c x + (E init_typing) + init_t_typing + c_typing + body_typing in + checker_result_for_st_typing (| _, _, d |) res_ppname + + else fail g (Some t.range) + (Printf.sprintf "check_withlocal: allocating a local variable: type %s is not universe zero (computed %s)" + (P.term_to_string init) + (P.univ_to_string init_u)) diff --git a/lib/steel/pulse/Pulse.Checker.WithLocal.fst.hints b/lib/steel/pulse/Pulse.Checker.WithLocal.fst.hints index 040531bc7..5817e903c 100644 --- a/lib/steel/pulse/Pulse.Checker.WithLocal.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.WithLocal.fst.hints @@ -1,5 +1,5 @@ [ - ":\u000e)/\u0018\u001bk\\nW", + "\u0016\u001f|Z\\Z!ۗS:_", [ [ "Pulse.Checker.WithLocal.extend_post_hint_for_local", @@ -14,7 +14,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "6043a9285ce9692cc21f9d80f6f5196a" + "a3e75bab11ed7a39d651a2c3f74459ea" ], [ "Pulse.Checker.WithLocal.with_local_pre_typing", @@ -29,17 +29,16 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "fa6fbebcd7e6d05d4bafcfadfda5087d" + "f4d8c12170c6a0c31d68ff52dae9acea" ], [ - "Pulse.Checker.WithLocal.check_withlocal", + "Pulse.Checker.WithLocal.check", 1, - 2, + 0, 1, [ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_Pulse.Syntax.Naming.freevars_st.fuel_instrumented", - "@fuel_irrelevance_Pulse.Syntax.Naming.freevars_st.fuel_instrumented", "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", "Pulse.Syntax.Base_pretyping_fe09dc1e796799f4bac0760e63f30d40", "bool_inversion", @@ -52,6 +51,7 @@ "data_elim_Pulse.Syntax.Base.C_ST", "data_elim_Pulse.Syntax.Base.Mkbinder", "data_elim_Pulse.Syntax.Base.Mkppname", + "data_elim_Pulse.Typing.Mkpost_hint_t", "disc_equation_FStar.Pervasives.Native.None", "disc_equation_Pulse.Syntax.Base.C_ST", "disc_equation_Pulse.Syntax.Base.C_STAtomic", @@ -68,6 +68,7 @@ "equation_Pulse.Syntax.Base.comp_post", "equation_Pulse.Syntax.Base.comp_pre", "equation_Pulse.Syntax.Base.comp_res", + "equation_Pulse.Syntax.Base.comp_st", "equation_Pulse.Syntax.Base.comp_u", "equation_Pulse.Syntax.Base.index", "equation_Pulse.Syntax.Base.ppname_default", @@ -79,14 +80,12 @@ "equation_Pulse.Syntax.Naming.open_st_term", "equation_Pulse.Syntax.Pure.null_var", "equation_Pulse.Syntax.Pure.term_of_nvar", + "equation_Pulse.Syntax.Pure.tm_type", "equation_Pulse.Syntax.Pure.u0", "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.env_extends", - "equation_Pulse.Typing.Env.extends_with", "equation_Pulse.Typing.Env.lookup", "equation_Pulse.Typing.FV.set_minus", "equation_Pulse.Typing.comp_post_matches_hint", "equation_Pulse.Typing.comp_withlocal_body", - "equation_Pulse.Typing.comp_withlocal_body_pre", "equation_Pulse.Typing.elab_env", "equation_Pulse.Typing.fresh_wrt", "equation_Pulse.Typing.mk_ref", "equation_Pulse.Typing.post_hint_for_env", @@ -94,10 +93,12 @@ "equation_Pulse.Typing.post_hint_opt", "fuel_guarded_inversion_FStar.Tactics.Result.__result", "fuel_guarded_inversion_Pulse.Syntax.Base.binder", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", "fuel_guarded_inversion_Pulse.Syntax.Base.ppname", "fuel_guarded_inversion_Pulse.Syntax.Base.st_comp", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "fuel_guarded_inversion_Pulse.Typing.post_hint_t", "function_token_typing_Prims.__cache_version_number__", "function_token_typing_Prims.int", "function_token_typing_Prims.string", @@ -105,14 +106,12 @@ "int_typing", "kinding_Pulse.Syntax.Base.term@tok", "kinding_Pulse.Typing.post_hint_t@tok", "lemma_FStar.Map.lemma_ContainsDom", - "lemma_FStar.Map.lemma_InDomConcat", "lemma_FStar.Pervasives.invertOption", "lemma_FStar.Sealed.Inhabited.sealed_singleton", "lemma_FStar.Set.mem_complement", "lemma_FStar.Set.mem_intersect", "lemma_FStar.Set.mem_singleton", "lemma_Pulse.Syntax.Base.range_singleton", "lemma_Pulse.Typing.Env.push_binding_bs", - "lemma_Pulse.Typing.Env.push_env_as_map", "lemma_Pulse.Typing.FV.freevars_close_st_term", "lemma_Pulse.Typing.post_hint_for_env_extends", "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", @@ -123,7 +122,6 @@ "proj_equation_Pulse.Syntax.Base.Mkbinder_binder_ppname", "proj_equation_Pulse.Syntax.Base.Mknm_nm_ppname", "proj_equation_Pulse.Syntax.Base.Mkppname_name", - "proj_equation_Pulse.Syntax.Base.Mkppname_range", "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", @@ -158,10 +156,11 @@ "projection_inverse_Pulse.Typing.Mkpost_hint_t_u", "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_460ca66dc5107a4a4bd5bf4443e1a214", "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", + "refinement_interpretation_Tm_refine_4a35837bb22dd5d80593cba92d284990", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "refinement_interpretation_Tm_refine_6e8e5238aadfc712ef5fa6bc6310c384", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", "refinement_interpretation_Tm_refine_7f3ad0958305f2921bfac06f466396ae", "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", "refinement_interpretation_Tm_refine_a8346b95ba5a8f04395122ae3c6a0150", @@ -171,14 +170,12 @@ "refinement_interpretation_Tm_refine_f0ac051651fa0e095f1b2c1241fd6a3f", "string_typing", "token_correspondence_Pulse.Syntax.Naming.freevars_st.fuel_instrumented", - "typing_FStar.Map.contains", "typing_FStar.Reflection.V2.Data.var", - "typing_FStar.Set.complement", "typing_FStar.Set.mem", - "typing_FStar.Set.singleton", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.complement", + "typing_FStar.Set.mem", "typing_FStar.Set.singleton", "typing_Pulse.Checker.Pure.push_context", "typing_Pulse.Checker.WithLocal.extend_post_hint_for_local", "typing_Pulse.Syntax.Base.__proj__Mkbinder__item__binder_ppname", "typing_Pulse.Syntax.Base.__proj__Mkppname__item__name", - "typing_Pulse.Syntax.Base.__proj__Mkppname__item__range", "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__range", "typing_Pulse.Syntax.Base.eq_univ", "typing_Pulse.Syntax.Base.ppname_default", @@ -188,12 +185,10 @@ "typing_Pulse.Typing.Env.dom", "typing_Pulse.Typing.Env.fresh", "typing_Pulse.Typing.Env.fstar_env", "typing_Pulse.Typing.Env.push_binding", - "typing_Pulse.Typing.Env.push_context", - "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g", - "typing_Pulse.Typing.mk_ref" + "typing_Pulse.Typing.Env.push_context", "typing_Pulse.Typing.mk_ref" ], 0, - "385c4552707e0146411208cc2cba5085" + "aba63061f6645ace26b942fe67526805" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.WithLocal.fsti b/lib/steel/pulse/Pulse.Checker.WithLocal.fsti index 623e8b11b..836bb97ff 100644 --- a/lib/steel/pulse/Pulse.Checker.WithLocal.fsti +++ b/lib/steel/pulse/Pulse.Checker.WithLocal.fsti @@ -4,14 +4,14 @@ module T = FStar.Tactics.V2 open Pulse.Syntax open Pulse.Typing -open Pulse.Checker.Common +open Pulse.Checker.Base -val check_withlocal - (allow_inst:bool) +val check (g:env) - (t:st_term{Tm_WithLocal? t.term}) (pre:term) (pre_typing:tot_typing g pre tm_vprop) (post_hint:post_hint_opt g) - (check':bool -> check_t) - : T.Tac (checker_result_t g pre post_hint) \ No newline at end of file + (res_ppname:ppname) + (t:st_term { Tm_WithLocal? t.term }) + (check:check_t) + : T.Tac (checker_result_t g pre post_hint) diff --git a/lib/steel/pulse/Pulse.Checker.WithLocal.fsti.hints b/lib/steel/pulse/Pulse.Checker.WithLocal.fsti.hints index af0ae26f1..0e5c99ec9 100644 --- a/lib/steel/pulse/Pulse.Checker.WithLocal.fsti.hints +++ b/lib/steel/pulse/Pulse.Checker.WithLocal.fsti.hints @@ -1 +1 @@ -[ "ޢ-\u00148n@t", [] ] \ No newline at end of file +[ "r\u001dP0Ne\u007f\\Mp", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.fst b/lib/steel/pulse/Pulse.Checker.fst index ea53275e3..d64d9bfc9 100644 --- a/lib/steel/pulse/Pulse.Checker.fst +++ b/lib/steel/pulse/Pulse.Checker.fst @@ -7,11 +7,11 @@ open FStar.List.Tot open Pulse.Syntax open Pulse.Reflection.Util open Pulse.Typing +open Pulse.Typing.Combinators open Pulse.Checker.Pure -open Pulse.Checker.Framing open Pulse.Checker.Bind open Pulse.Checker.VPropEquiv -open Pulse.Checker.Common +open Pulse.Checker.Base module P = Pulse.Syntax.Printer module RTB = FStar.Tactics.Builtins @@ -21,6 +21,7 @@ module Metatheory = Pulse.Typing.Metatheory module Abs = Pulse.Checker.Abs module If = Pulse.Checker.If +module Bind = Pulse.Checker.Bind module Match = Pulse.Checker.Match module WithLocal = Pulse.Checker.WithLocal module While = Pulse.Checker.While @@ -30,428 +31,226 @@ module Par = Pulse.Checker.Par module Admit = Pulse.Checker.Admit module Return = Pulse.Checker.Return module Rewrite = Pulse.Checker.Rewrite -module ElimPure = Pulse.Prover.ElimPure -module ElimExists = Pulse.Prover.ElimExists +module ElimPure = Pulse.Checker.Prover.ElimPure +module ElimExists = Pulse.Checker.Prover.ElimExists let terms_to_string (t:list term) : T.Tac string = String.concat "\n" (T.map Pulse.Syntax.Printer.term_to_string t) -let has_pure_vprops (pre:term) = L.existsb (fun (t:term) -> Tm_Pure? t.t) (vprop_as_list pre) -let elim_pure_explicit_lid = mk_steel_wrapper_lid "elim_pure_explicit" - let default_binder_annot = { binder_ppname = ppname_default; binder_ty = tm_unknown } - -let add_intro_pure rng (continuation:st_term) (p:term) = - let wr t = { term = t; range = rng } in - let intro_pure_tm = - wr ( - Tm_Protect - { t = wr (Tm_IntroPure { p; should_check=should_check_false }) } - ) - in - wr ( - Tm_Protect { t = wr (Tm_Bind { binder = default_binder_annot; - head = intro_pure_tm; - body = continuation }) } - ) - -#push-options "--fuel 2 --ifuel 1 --z3rlimit_factor 10" -let uvar_tys = list (Pulse.Checker.Inference.uvar & term) -let rec prepare_instantiations - (g:env) - (out:list (vprop & either term term)) - (out_uvars: uvar_tys) - (goal_vprop:vprop) - witnesses - : T.Tac (vprop & list (vprop & either term term) & uvar_tys) - = match witnesses, goal_vprop.t with - | [], Tm_ExistsSL u b p -> - let next_goal_vprop, inst, uv = - let uv, t = Pulse.Checker.Inference.gen_uvar b.binder_ppname in - open_term' p t 0, Inr t, uv - in - prepare_instantiations g ((goal_vprop, inst)::out) ((uv,b.binder_ty)::out_uvars) next_goal_vprop [] - - | [], _ -> - goal_vprop, out, out_uvars - | t :: witnesses, Tm_ExistsSL u b p -> - let next_goal_vprop, inst, uvs = - match (t<:term).t with +let rec gen_names_for_unknowns (g:env) (t:term) (ws:list term) + : T.Tac (list (nvar & term) & // new names with their types + term & // opened vprop + list term) // new list of witnesses with _ replaced with corresponding new names + = match ws with + | [] -> [], t, [] + | w::ws -> + match t.t with + | Tm_ExistsSL _ b body -> + let xopt, w, g = + match w.t with | Tm_Unknown -> - let uv, t = Pulse.Checker.Inference.gen_uvar b.binder_ppname in - open_term' p t 0, Inr t, [(uv,b.binder_ty)] - | _ -> - open_term' p t 0, Inl t, [] - in - prepare_instantiations g ((goal_vprop, inst)::out) (uvs@out_uvars) next_goal_vprop witnesses - - | _ -> - fail g None "Unexpected number of instantiations in intro" - - let rec build_instantiations solutions insts - : T.Tac st_term - = let one_inst (v, i) = - let v = Pulse.Checker.Inference.apply_solution solutions v in - match i with - | Inl user_provided -> - wr (Tm_IntroExists {erased=false; p=v; witnesses=[user_provided]; should_check=should_check_true}) - - | Inr inferred -> - let sol = Pulse.Checker.Inference.apply_solution solutions inferred in - match unreveal sol with - | Some sol -> - wr (Tm_IntroExists {erased=true; p=v; witnesses=[sol]; should_check=should_check_false}) - | _ -> - wr (Tm_IntroExists {erased=true; p=v; witnesses=[sol]; should_check=should_check_false}) - in - match insts with - | [] -> T.fail "Impossible" - | [hd] -> wr (Tm_Protect { t = one_inst hd }) - - | hd::tl -> wr (Tm_Protect - { t = wr (Tm_Bind { binder = default_binder_annot; - head = wr (Tm_Protect { t = one_inst hd }); - body = build_instantiations solutions tl }) }) - -let maybe_infer_intro_exists - (g:env) - (st:st_term{Tm_IntroExists? st.term}) - (pre:term) - : T.Tac st_term - = let remove_pure_conjuncts t = - let rest, pure = - List.Tot.partition #term - (function {t=Tm_Pure _} | {t=Tm_Emp} -> false | _ -> true) - (vprop_as_list t) - in - let rest = - match list_as_vprop rest with - | {t=Tm_Star t {t=Tm_Emp}} -> t - | {t=Tm_Star {t=Tm_Emp} t} -> t - | t -> t - in - rest, pure - in - (* Weird: defining prepare_instantiations here causes extraction to crash with - Failure("This should not happen (should have been handled at Tm_abs level)") - *) - if RU.debug_at_level (fstar_env g) "inference" - then ( - T.print (Printf.sprintf "At %s: infer_intro_exists for %s\n" - (T.range_to_string st.range) - (P.st_term_to_string st)) - ); - let Tm_IntroExists {erased; p=t; witnesses} = st.term in - let t, _ = Pulse.Checker.Pure.instantiate_term_implicits g t in - let goal_vprop, insts, uvs = prepare_instantiations g [] [] t witnesses in - let goal_vprop, pure_conjuncts = remove_pure_conjuncts goal_vprop in - let solutions = Pulse.Checker.Inference.try_inst_uvs_in_goal g pre goal_vprop in - // T.print - // (Printf.sprintf - // "maybe_infer_intro_exists: solutions after trying inst with pre: %s, goal: %s: %s\n" - // (P.term_to_string pre) - // (P.term_to_string goal_vprop) - // (Pulse.Checker.Inference.solutions_to_string solutions)); - let maybe_solve_pure solutions p = - let p = Pulse.Checker.Inference.apply_solution solutions p in - match p.t with - | Tm_Pure p -> ( - let sols = Pulse.Checker.Inference.try_solve_pure_equalities g p in - sols @ solutions - ) - | _ -> solutions - in - let solutions = T.fold_left maybe_solve_pure solutions pure_conjuncts in - if RU.debug_at_level (fstar_env g) "inference" - then ( - T.print - (Printf.sprintf - "maybe_infer_intro_exists: solutions after solving pure conjuncts (%s): %s\n" - (P.term_to_string (list_as_vprop pure_conjuncts)) - (Pulse.Checker.Inference.solutions_to_string solutions)) - ); - let mk_hide ty_opt (e:term) : term = - let hd = tm_fvar (as_fv hide_lid) in - match ty_opt with - | None -> tm_pureapp hd None e - | Some ty -> tm_pureapp (tm_pureapp hd (Some Implicit) ty) None e - in - let type_of_uvar uv = - match List.Tot.tryFind (fun (u, _) -> Pulse.Checker.Inference.uvar_eq u uv) uvs with - | None -> None - | Some (_, ty) -> Some ty - in - let solutions = - T.map - (fun (u, v) -> - let sol = Pulse.Checker.Inference.apply_solution solutions v in - match unreveal sol with - | Some _ -> u, sol - | _ -> u, mk_hide (type_of_uvar u) sol) - solutions - in - let _ = - match Pulse.Checker.Inference.unsolved solutions uvs with - | Some uvs -> - fail g (Some st.range) (Printf.sprintf "Could not instantiate existential variables %s\n" - (String.concat ", " (T.map (fun (u, _) -> Pulse.Checker.Inference.uvar_to_string u) uvs))) - | None -> () - in - let wr t = { term = t; range = st.range } in - let intro_exists_chain = build_instantiations solutions insts in - let pure_conjuncts = - T.map - (fun vp -> - match (Pulse.Checker.Inference.apply_solution solutions vp).t with - | Tm_Pure p -> [p] - | p -> []) - pure_conjuncts - in - let pure_conjuncts = L.flatten pure_conjuncts in - let result = List.Tot.fold_left (add_intro_pure intro_exists_chain.range) intro_exists_chain pure_conjuncts in - if RU.debug_at_level (fstar_env g) "inference" - then ( - T.print (Printf.sprintf "Inferred pure and exists:{\n\t %s\n\t}" - (P.st_term_to_string result)) - ); - result - - -let handle_framing_failure - (g:env) - (t0:st_term) - (pre:term) - (pre_typing: tot_typing g pre tm_vprop) - (post_hint:post_hint_opt g) - (failure:framing_failure) - (check:check_t) - : T.Tac (checker_result_t g pre post_hint) - = let wr t = { term = t; range = t0.range } in - if RU.debug_at_level (fstar_env g) "inference" - then ( - T.print (Printf.sprintf - "Handling framing failure in term:\n%s\n\ - with unmatched_pre={\n%s\n} and context={\n%s\n}" - (P.st_term_to_string t0) - (terms_to_string failure.unmatched_preconditions) - (terms_to_string failure.remaining_context)) - ); - let pures, rest = - L.partition #term (function {t=Tm_Pure _} -> true | _ -> false) failure.unmatched_preconditions - in - let t = - T.fold_left - (fun t (p:term) -> - match p.t with - | Tm_Pure p -> add_intro_pure t0.range t p - | _ -> T.fail "Impossible") - (wr (Tm_Protect { t = t0 })) //don't elim what we just intro'd here - pures - in - let rec handle_intro_exists (rest:list term) (t:st_term) - : T.Tac (checker_result_t g pre post_hint) - = match rest with - | [] -> check g t pre pre_typing post_hint - | {t=Tm_ExistsSL u ty p; range} :: rest -> - let t = - Tm_Bind { - binder = default_binder_annot; - head = - wr (Tm_Protect { - t = wr (Tm_IntroExists { - erased=true; - p=with_range (Tm_ExistsSL u ty p) range; - witnesses=[]; - should_check=should_check_true - }); - }); - body = wr (Tm_Protect { t }) - } - in - handle_intro_exists rest (wr t) - | _ -> - fail g (Some t0.range) (format_failed_goal g failure.remaining_context rest) - in - handle_intro_exists rest t - -let protect t = { term = Tm_Protect { t }; range = t.range } - -let rec unprotect t = - let wr t0 = { term = t0; range = t.range } in - match t.term with - | Tm_Protect { t = { term = Tm_Bind { binder; head; body } } } -> - wr (Tm_Bind { binder; head=protect head; body }) - | Tm_Protect { t = { term = Tm_If { b; then_; else_; post }}} -> - wr (Tm_If {b; then_=protect then_; else_=protect else_; post } ) - | Tm_Protect { t } -> - unprotect t + let x = fresh g in + Some x, + tm_var {nm_index=x;nm_ppname=b.binder_ppname}, + push_binding g x b.binder_ppname b.binder_ty + | _ -> None, w, g in + let t : term = open_term' body w 0 in + let new_names, t, ws = gen_names_for_unknowns g t ws in + (match xopt with + | Some x -> + ((b.binder_ppname, x), b.binder_ty)::new_names, + t, + w::ws + | None -> new_names, t, w::ws) + | _ -> fail g (Some t.range) "intro exists with non-existential" + +let instantiate_unknown_witnesses (g:env) (t:st_term { Tm_IntroExists? t.term }) + : T.Tac (option st_term) = + + let Tm_IntroExists { erased; p; witnesses=ws } = t.term in + + let new_names, opened_p, new_ws = gen_names_for_unknowns g p ws in + match new_names with + | [] -> None + | _ -> + let e2 = {t with term=Tm_IntroExists {erased; p; witnesses=new_ws }} in + let e1 = + let hint_type = ASSERT in + let binders = [] in + let v = opened_p in + {term=Tm_ProofHintWithBinders { hint_type;binders;v;t=e2 }; range=t.range} in + + let t = L.fold_right (fun new_name (e:st_term { Tm_ProofHintWithBinders? e.term }) -> + let (ppname, x), ty = new_name in + let e = close_st_term' e x 0 in + match e.term with + | Tm_ProofHintWithBinders {hint_type;binders;v;t} -> + let new_binder = {binder_ty=ty; binder_ppname=ppname} in + let t' = Tm_ProofHintWithBinders {hint_type;binders=new_binder::binders;v;t} in + {e with term=t'} + ) new_names e1 in + Some t + +let maybe_intro_exists_erased (t:st_term { Exists.intro_exists_witness_singleton t }) + : t':st_term { Exists.intro_exists_witness_singleton t' } = + + let Tm_IntroExists { erased; p; witnesses=[w] } = t.term in + match unreveal w with + | Some w -> + let t' = Tm_IntroExists {erased=true;p;witnesses=[w]} in + {t with term=t'} | _ -> t - -#push-options "--ifuel 2" -let elim_then_check (#g:env) (#ctxt:term) - (ctxt_typing:tot_typing g ctxt tm_vprop) - (st:st_term { not (Tm_Protect? st.term) }) - (post_hint: post_hint_opt g) - (check:check_t) - : T.Tac (checker_result_t g ctxt post_hint) - = let (| g', ctxt', ctxt'_typing, elab_k |) = ElimExists.elim_exists ctxt_typing in - let (| g'', ctxt'', ctxt'_typing, elab_k' |) = ElimPure.elim_pure ctxt'_typing in - if RU.debug_at_level (fstar_env g) "inference" - then ( T.print (Printf.sprintf "Eliminated context from\n\t%s\n\tto %s\n" - (P.term_to_string ctxt) - (P.term_to_string ctxt'') )) ; - let res = check g'' (protect st) ctxt'' ctxt'_typing post_hint in - elab_k post_hint (elab_k' post_hint res) - +let rec transform_to_unary_intro_exists (g:env) (t:term) (ws:list term) + : T.Tac st_term = + + match ws with + | [] -> fail g (Some t.range) "intro exists with empty witnesses" + | [w] -> + if Tm_ExistsSL? t.t + then wr (Tm_IntroExists {erased=false;p=t;witnesses=[w]}) + else fail g (Some t.range) "intro exists with non-existential" + | w::ws -> + match t.t with + | Tm_ExistsSL u b body -> + let body = subst_term body [ DT 0 w ] in + let st = transform_to_unary_intro_exists g body ws in + // w is the witness + let intro = wr (Tm_IntroExists {erased=true;p=t;witnesses=[w]}) in + wr (Tm_Bind {binder=null_binder tm_unit; + head=st; + body= intro}) + + | _ -> fail g (Some t.range) "intro exists with non-existential" + +#push-options "--z3rlimit_factor 4 --fuel 0 --ifuel 1" +let rec check + (g0:env) + (pre0:term) + (pre0_typing: tot_typing g0 pre0 tm_vprop) + (post_hint:post_hint_opt g0) + (res_ppname:ppname) + (t:st_term) : T.Tac (checker_result_t g0 pre0 post_hint) = -#push-options "--query_stats" -let rec check' : bool -> check_t = - fun (allow_inst:bool) - (g:env) - (t:st_term) - (pre:term) - (pre_typing: tot_typing g pre tm_vprop) - (post_hint:post_hint_opt g) -> - let open T in // T.print (Printf.sprintf "At %s: allow_inst: %s, context: %s, term: %s\n" // (T.range_to_string t.range) // (string_of_bool allow_inst) - // (Pulse.Syntax.Printer.term_to_string pre) + // (Pulse.Syntax.Printer.term_to_string pre0) // (Pulse.Syntax.Printer.st_term_to_string t)); - if not (Tm_Protect? t.term) - then elim_then_check pre_typing t post_hint (check' allow_inst) - else begin - if RU.debug_at_level (fstar_env g) "proof_states" - then ( - T.print (Printf.sprintf "At %s: context is {\n%s\n}" - (T.range_to_string t.range) - (P.term_to_string pre)); - T.print ("t = " ^ P.st_term_to_string t) - ); - let t = unprotect t in - let g = push_context (P.tag_of_st_term t) t.range g in - try - match t.term with - | Tm_Protect _ -> T.fail "Protect should have been removed" + let (| g, pre, pre_typing, k_elim_pure |) = + Pulse.Checker.Prover.ElimPure.elim_pure pre0_typing in - // | Tm_Return {term = Tm_Bvar _} -> T.fail "not locally nameless" - | Tm_Return _ -> - Return.check_return allow_inst g t pre pre_typing post_hint + let r : checker_result_t g pre post_hint = + let g = push_context (P.tag_of_st_term t) t.range g in + match t.term with + | Tm_Return _ -> + Return.check g pre pre_typing post_hint res_ppname t - | Tm_Abs _ -> - Abs.check_abs g t pre pre_typing post_hint (check' true) - - | Tm_STApp _ -> - STApp.check_stapp allow_inst g t pre pre_typing post_hint check' - - | Tm_Bind _ -> - check_bind g t pre pre_typing post_hint (check' true) - - | Tm_TotBind _ -> - check_tot_bind g t pre pre_typing post_hint (check' true) - - | Tm_If { b; then_=e1; else_=e2; post=post_if } -> - let post = - match post_if, post_hint with - | None, Some p -> p - | Some p, None -> - Checker.Common.intro_post_hint g None p - | Some p, Some q -> - Pulse.Typing.Env.fail g (Some t.range) - (Printf.sprintf - "Multiple annotated postconditions---remove one of them.\n\ - The context expects the postcondition %s,\n\ - but this conditional was annotated with postcondition %s" - (P.term_to_string (q <: post_hint_t).post) - (P.term_to_string p)) - | _, _ -> - Pulse.Typing.Env.fail g (Some t.range) - (Printf.sprintf - "Pulse cannot yet infer a postcondition for a non-tail conditional statement;\n\ - Either annotate this `if` with `returns` clause; or rewrite your code to use a tail conditional") - in - let (| t, c, d |) = If.check_if g b e1 e2 pre pre_typing post (check' true) in - ( (| t, c, d |) <: checker_result_t g pre post_hint) - - | Tm_Match {sc;returns_=post_match;brs} -> - // TODO : dedup - let post = - match post_match, post_hint with - | None, Some p -> p - | Some p, None -> - Checker.Common.intro_post_hint g None p - | Some p, Some q -> - Pulse.Typing.Env.fail g (Some t.range) - (Printf.sprintf - "Multiple annotated postconditions---remove one of them.\n\ - The context expects the postcondition %s,\n\ - but this conditional was annotated with postcondition %s" - (P.term_to_string (q <: post_hint_t).post) - (P.term_to_string p)) - | _, _ -> - Pulse.Typing.Env.fail g (Some t.range) - (Printf.sprintf - "Pulse cannot yet infer a postcondition for a non-tail conditional statement;\n\ - Either annotate this `if` with `returns` clause; or rewrite your code to use a tail conditional") - in - let (| t, c, d |) = Match.check_match g sc brs pre pre_typing post (check' true) in - ( (| t, c, d |) <: checker_result_t g pre post_hint) - - | Tm_IntroPure _ -> - Pulse.Checker.IntroPure.check_intro_pure g t pre pre_typing post_hint - - | Tm_ElimExists _ -> - Exists.check_elim_exists g t pre pre_typing post_hint + | Tm_Abs _ -> T.fail "Tm_Abs check should not have been called in the checker" + + | Tm_STApp _ -> + STApp.check g pre pre_typing post_hint res_ppname t + + | Tm_ElimExists _ -> + Exists.check_elim_exists g pre pre_typing post_hint res_ppname t + + | Tm_IntroExists { p; witnesses } -> + (match instantiate_unknown_witnesses g t with + | Some t -> + check g pre pre_typing post_hint res_ppname t + | None -> + match witnesses with + | [] -> fail g (Some t.range) "intro exists with empty witnesses" + | [_] -> + Exists.check_intro_exists g pre pre_typing post_hint res_ppname (maybe_intro_exists_erased t) None + | _ -> + let t = transform_to_unary_intro_exists g p witnesses in + check g pre pre_typing post_hint res_ppname t) + | Tm_Bind _ -> + Bind.check_bind g pre pre_typing post_hint res_ppname t check + + | Tm_TotBind _ -> + Bind.check_tot_bind g pre pre_typing post_hint res_ppname t check + + | Tm_If { b; then_=e1; else_=e2; post=post_if } -> + let post = + match post_if, post_hint with + | None, Some p -> p + | Some p, None -> + Checker.Base.intro_post_hint g None None p + | Some p, Some q -> + Pulse.Typing.Env.fail g (Some t.range) + (Printf.sprintf + "Multiple annotated postconditions---remove one of them.\n\ + The context expects the postcondition %s,\n\ + but this conditional was annotated with postcondition %s" + (P.term_to_string (q <: post_hint_t).post) + (P.term_to_string p)) + | _, _ -> + Pulse.Typing.Env.fail g (Some t.range) + (Printf.sprintf + "Pulse cannot yet infer a postcondition for a non-tail conditional statement;\n\ + Either annotate this `if` with `returns` clause; or rewrite your code to use a tail conditional") + in + let (| x, t, pre', g1, k |) : checker_result_t g pre (Some post) = + If.check g pre pre_typing post res_ppname b e1 e2 check in + (| x, t, pre', g1, k |) + + | Tm_While _ -> + While.check g pre pre_typing post_hint res_ppname t check + + | Tm_Match {sc;returns_=post_match;brs} -> + // TODO : dedup + let post = + match post_match, post_hint with + | None, Some p -> p + | Some p, None -> + Checker.Base.intro_post_hint g None None p + | Some p, Some q -> + Pulse.Typing.Env.fail g (Some t.range) + (Printf.sprintf + "Multiple annotated postconditions---remove one of them.\n\ + The context expects the postcondition %s,\n\ + but this conditional was annotated with postcondition %s" + (P.term_to_string (q <: post_hint_t).post) + (P.term_to_string p)) + | _, _ -> + Pulse.Typing.Env.fail g (Some t.range) + (Printf.sprintf + "Pulse cannot yet infer a postcondition for a non-tail conditional statement;\n\ + Either annotate this `if` with `returns` clause; or rewrite your code to use a tail conditional") + in + let (| x, ty, pre', g1, k |) = + Match.check g pre pre_typing post res_ppname sc brs check in + (| x, ty, pre', g1, k |) - | Tm_IntroExists { witnesses } -> - let should_infer_witnesses = - match witnesses with - | [w] -> ( - match w.t with - | Tm_Unknown -> true - | _ -> false - ) - | _ -> true - in - if should_infer_witnesses - then ( - let unary_intros = maybe_infer_intro_exists g t pre in - // T.print (Printf.sprintf "Inferred unary_intros:\n%s\n" - // (P.st_term_to_string unary_intros)); - check' allow_inst g unary_intros pre pre_typing post_hint - ) - else ( - Exists.check_intro_exists_either g t None pre pre_typing post_hint - ) + | Tm_ProofHintWithBinders _ -> + Pulse.Checker.AssertWithBinders.check g pre pre_typing post_hint res_ppname t check - | Tm_While _ -> - While.check_while allow_inst g t pre pre_typing post_hint check' + | Tm_WithLocal _ -> + WithLocal.check g pre pre_typing post_hint res_ppname t check - | Tm_Admit _ -> - Admit.check_admit g t pre pre_typing post_hint + | Tm_Par _ -> + Par.check g pre pre_typing post_hint res_ppname t check - | Tm_Par _ -> - Par.check_par allow_inst g t pre pre_typing post_hint check' + | Tm_IntroPure _ -> + Pulse.Checker.IntroPure.check g pre pre_typing post_hint res_ppname t - | Tm_WithLocal _ -> - WithLocal.check_withlocal allow_inst g t pre pre_typing post_hint check' + | Tm_Admit _ -> + Admit.check g pre pre_typing post_hint res_ppname t - | Tm_Rewrite _ -> - Rewrite.check_rewrite g t pre pre_typing post_hint + | Tm_Rewrite _ -> + Rewrite.check g pre pre_typing post_hint res_ppname t - | Tm_ProofHintWithBinders _ -> - Pulse.Checker.AssertWithBinders.check g t pre pre_typing post_hint (check' true) - with - | Framing_failure failure -> - handle_framing_failure g t pre pre_typing post_hint failure (check' true) - | e -> T.raise e - end + | _ -> T.fail "Checker form not implemented" + in -let check = check' true + let (| x, g1, t, pre', k |) = r in + (| x, g1, t, pre', k_elab_trans k_elim_pure k |) diff --git a/lib/steel/pulse/Pulse.Checker.fst.hints b/lib/steel/pulse/Pulse.Checker.fst.hints index 0d38afaaf..f92a4a77c 100644 --- a/lib/steel/pulse/Pulse.Checker.fst.hints +++ b/lib/steel/pulse/Pulse.Checker.fst.hints @@ -1,157 +1,108 @@ [ - "oEa譖*\n\\0", + "S\u0014D\u001b\u001e \u0017eD", [ [ - "Pulse.Checker.build_instantiations", + "Pulse.Checker.gen_names_for_unknowns", 1, 2, 1, [ - "@MaxIFuel_assumption", "@query", - "disc_equation_FStar.Pervasives.Inl", - "disc_equation_FStar.Pervasives.Inr", "disc_equation_Prims.Cons", - "disc_equation_Prims.Nil", - "fuel_guarded_inversion_FStar.Pervasives.either", + "@MaxIFuel_assumption", "@query", "disc_equation_Prims.Cons", + "disc_equation_Prims.Nil", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", "fuel_guarded_inversion_FStar.Tactics.Result.__result", "fuel_guarded_inversion_Prims.list", - "projection_inverse_BoxBool_proj_0" + "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", + "lemma_FStar.Pervasives.invertOption", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2" ], 0, - "b0e60a7574ff9de8309eb01eec9e3e8d" + "3d77b4e736eded51d39024ec25ace24b" ], [ - "Pulse.Checker.maybe_infer_intro_exists", + "Pulse.Checker.instantiate_unknown_witnesses", 1, 2, 1, [ - "@MaxIFuel_assumption", - "@fuel_correspondence_FStar.List.Tot.Base.tryFind.fuel_instrumented", + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_Pulse.Syntax.Naming.subst_st_term.fuel_instrumented", "@query", - "FStar.List.Tot.Base_interpretation_Tm_arrow_84543425b818e2d10a976186b8e8c250", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "Pulse.Checker_interpretation_Tm_arrow_9cdba1df59dc8ce2c635c5d32aff32d8", - "Pulse.Syntax.Base_pretyping_01e6cbbfeab3ba416b144f2c9223a2d4", - "constructor_distinct_FStar.Pervasives.Native.Some", - "constructor_distinct_FStar.Tactics.Result.Failed", - "constructor_distinct_FStar.Tactics.Result.Success", - "data_elim_FStar.Tactics.Result.Success", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_FStar.Pervasives.Native.Some", - "equation_Pulse.Checker.Inference.solution", - "equation_Pulse.Checker.uvar_tys", + "constructor_distinct_Pulse.Syntax.Base.Tm_ProofHintWithBinders", + "data_typing_intro_Prims.Cons@tok", + "data_typing_intro_Prims.Nil@tok", + "data_typing_intro_Pulse.Syntax.Naming.ND@tok", + "disc_equation_Pulse.Syntax.Base.Tm_ProofHintWithBinders", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.index", + "equation_Pulse.Syntax.Naming.close_st_term_", + "equation_Pulse.Syntax.Naming.subst", + "equation_with_fuel_Pulse.Syntax.Naming.subst_st_term.fuel_instrumented", "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "function_token_typing_Pulse.Checker.Inference.solution", - "function_token_typing_Pulse.Checker.Inference.uvar", - "kinding_FStar.Pervasives.Native.tuple2@tok", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Pervasives.invertOption", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "int_typing", + "kinding_Pulse.Syntax.Naming.subst_elt@tok", + "proj_equation_Pulse.Syntax.Base.Mkst_term_term", "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Tactics.Result.Failed_a", - "projection_inverse_FStar.Tactics.Result.Failed_exn", - "projection_inverse_FStar.Tactics.Result.Failed_ps", - "projection_inverse_FStar.Tactics.Result.Success_a", - "projection_inverse_FStar.Tactics.Result.Success_ps", - "projection_inverse_FStar.Tactics.Result.Success_v", + "projection_inverse_Pulse.Syntax.Base.Mkst_term_term", + "projection_inverse_Pulse.Syntax.Base.Tm_ProofHintWithBinders__0", "refinement_interpretation_Tm_refine_2e3881200c03c5d6a5e08c8400580303", - "string_typing", "typing_FStar.List.Tot.Base.tryFind", - "typing_Pulse.Checker.Inference.unsolved", - "typing_Tm_abs_a95fc995fc65154c93f16aa142ec453d" + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_bf49085558242af8c310020a9c32bdc7" ], 0, - "c077c3f2e35ab64df5bd349ed0bc7296" + "5f0e98e559569ed3e8b09c6ea8ed6b53" ], [ - "Pulse.Checker.handle_framing_failure", + "Pulse.Checker.maybe_intro_exists_erased", 1, 2, 1, [ - "@MaxIFuel_assumption", "@query", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "string_typing" + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", + "constructor_distinct_Pulse.Syntax.Base.Tm_IntroExists", + "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", + "disc_equation_Pulse.Syntax.Base.Tm_IntroExists", + "equation_Pulse.Checker.Exists.intro_exists_witness_singleton", + "primitive_Prims.op_AmpAmp", "proj_equation_Prims.Cons_tl", + "proj_equation_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload_witnesses", + "proj_equation_Pulse.Syntax.Base.Mkst_term_term", + "proj_equation_Pulse.Syntax.Base.Tm_IntroExists__0", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_Prims.Cons_a", + "projection_inverse_Prims.Cons_hd", + "projection_inverse_Prims.Cons_tl", "projection_inverse_Prims.Nil_a", + "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload_witnesses", + "projection_inverse_Pulse.Syntax.Base.Mkst_term_term", + "projection_inverse_Pulse.Syntax.Base.Tm_IntroExists__0", + "refinement_interpretation_Tm_refine_43a7826d3ae860fffff888308ee514e3", + "typing_Pulse.Checker.Exists.intro_exists_witness_singleton" ], 0, - "2a00961797cc28fd311d9c0f1b43126d" + "396fc76ebb362c5920b4fd47fd58e9b3" ], [ - "Pulse.Checker.unprotect", + "Pulse.Checker.transform_to_unary_intro_exists", 1, 2, 1, [ - "@MaxIFuel_assumption", "@query", - "binder_x_01e6cbbfeab3ba416b144f2c9223a2d4_0", - "constructor_distinct_Pulse.Syntax.Base.Tm_Protect", - "disc_equation_Pulse.Syntax.Base.Tm_Protect", - "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", - "proj_equation_Pulse.Syntax.Base.Mkst_term_term", - "proj_equation_Pulse.Syntax.Base.Tm_Protect__0", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_Pulse.Syntax.Base.Tm_Protect__0", - "refinement_interpretation_Tm_refine_b1a97c485ad36fd11350bc08f1ae9617", - "subterm_ordering_Pulse.Syntax.Base.Mkst_term", - "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload", - "subterm_ordering_Pulse.Syntax.Base.Tm_Protect", - "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__term", - "typing_Pulse.Syntax.Base.__proj__Tm_Protect__item___0" + "@MaxIFuel_assumption", "@query", "disc_equation_Prims.Cons", + "disc_equation_Prims.Nil", "fuel_guarded_inversion_Prims.list", + "projection_inverse_BoxBool_proj_0" ], 0, - "e683f9061e60eb2789762c009bfc1730" + "e29afb3908a717e578f7c08e49454047" ], [ - "Pulse.Checker.elim_then_check", + "Pulse.Checker.check", 1, - 2, - 2, - [ - "@MaxIFuel_assumption", "@query", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "constructor_distinct_FStar.Pervasives.Native.Some", - "constructor_distinct_FStar.Tactics.Result.Failed", - "constructor_distinct_FStar.Tactics.Result.Success", - "data_elim_FStar.Pervasives.Native.Some", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_FStar.Pervasives.Native.Some", - "equation_FStar.Reflection.Typing.fstar_top_env", - "equation_Pulse.Typing.Env.env_extends", - "equation_Pulse.Typing.Env.extends_with", - "equation_Pulse.Typing.post_hint_for_env_p", - "equation_Pulse.Typing.post_hint_opt", - "fuel_guarded_inversion_FStar.Pervasives.Native.option", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "function_token_typing_Prims.__cache_version_number__", - "int_inversion", "kinding_Pulse.Typing.post_hint_t@tok", - "lemma_FStar.Pervasives.invertOption", - "lemma_Pulse.Typing.Env.env_extends_trans", - "proj_equation_FStar.Pervasives.Native.Some_v", - "proj_equation_Pulse.Typing.Mkpost_hint_t_g", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Tactics.Result.Failed_a", - "projection_inverse_FStar.Tactics.Result.Failed_exn", - "projection_inverse_FStar.Tactics.Result.Failed_ps", - "projection_inverse_FStar.Tactics.Result.Success_a", - "projection_inverse_FStar.Tactics.Result.Success_ps", - "projection_inverse_FStar.Tactics.Result.Success_v", - "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", - "refinement_interpretation_Tm_refine_7ad5682d990eaec6510764d663af54de", - "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", - "string_typing", "typing_Pulse.Typing.Env.fstar_env", - "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g" - ], 0, - "ba74ff7a81642177e8c36518ee3f9ce8" - ], - [ - "Pulse.Checker.check'", 1, - 2, - 2, [ - "@MaxIFuel_assumption", - "@fuel_correspondence_Pulse.Checker.unprotect.fuel_instrumented", - "@query", + "@MaxIFuel_assumption", "@query", "FStar.Pervasives.Native_pretyping_b53dbd183c526bc5d0f20d7b966ae125", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", "Pulse.Syntax.Base_pretyping_01e6cbbfeab3ba416b144f2c9223a2d4", @@ -159,69 +110,62 @@ "constructor_distinct_FStar.Pervasives.Native.Some", "constructor_distinct_FStar.Tactics.Result.Failed", "constructor_distinct_FStar.Tactics.Result.Success", - "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", + "constructor_distinct_Prims.Nil", "constructor_distinct_Pulse.Syntax.Base.Tm_IntroExists", - "constructor_distinct_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "constructor_distinct_Pulse.Syntax.Base.Tm_Unknown", + "data_elim_FStar.Pervasives.Native.Some", + "data_elim_FStar.Tactics.Result.Success", "data_elim_Pulse.Syntax.Base.Mkst_term", "disc_equation_FStar.Pervasives.Native.None", "disc_equation_FStar.Pervasives.Native.Some", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "disc_equation_Pulse.Syntax.Base.Tm_Abs", - "disc_equation_Pulse.Syntax.Base.Tm_Admit", - "disc_equation_Pulse.Syntax.Base.Tm_Bind", - "disc_equation_Pulse.Syntax.Base.Tm_ElimExists", - "disc_equation_Pulse.Syntax.Base.Tm_If", + "disc_equation_Prims.Nil", "disc_equation_Pulse.Syntax.Base.Tm_IntroExists", - "disc_equation_Pulse.Syntax.Base.Tm_IntroPure", - "disc_equation_Pulse.Syntax.Base.Tm_Match", - "disc_equation_Pulse.Syntax.Base.Tm_Par", - "disc_equation_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "disc_equation_Pulse.Syntax.Base.Tm_Protect", "disc_equation_Pulse.Syntax.Base.Tm_Return", - "disc_equation_Pulse.Syntax.Base.Tm_Rewrite", - "disc_equation_Pulse.Syntax.Base.Tm_STApp", - "disc_equation_Pulse.Syntax.Base.Tm_TotBind", - "disc_equation_Pulse.Syntax.Base.Tm_Unknown", - "disc_equation_Pulse.Syntax.Base.Tm_While", - "disc_equation_Pulse.Syntax.Base.Tm_WithLocal", - "equality_tok_Pulse.Syntax.Base.Tm_Unknown@tok", - "equality_tok_Pulse.Syntax.Base.Tm_VProp@tok", - "equation_FStar.Range.range", + "equation_FStar.Pervasives.dfst", "equation_FStar.Range.range", "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_Prims.nat", + "equation_Pulse.Checker.Base.checker_res_matches_post_hint", + "equation_Pulse.Checker.Base.checker_result_inv", + "equation_Pulse.Checker.Base.checker_result_t", "equation_Pulse.Checker.Exists.intro_exists_witness_singleton", "equation_Pulse.Checker.Pure.push_context", - "equation_Pulse.Syntax.Base.range", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.tm_vprop", + "equation_Pulse.Checker.maybe_intro_exists_erased", + "equation_Pulse.Syntax.Base.range", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", - "equation_Pulse.Syntax.Base.with_range", "equation_Pulse.Typing.Env.env_extends", "equation_Pulse.Typing.Env.extends_with", - "equation_Pulse.Typing.comp_post_matches_hint", + "equation_Pulse.Typing.post_hint_for_env", "equation_Pulse.Typing.post_hint_for_env_p", "equation_Pulse.Typing.post_hint_opt", "fuel_guarded_inversion_FStar.Pervasives.Native.option", + "fuel_guarded_inversion_FStar.Pervasives.dtuple5", "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Prims.dtuple2", + "fuel_guarded_inversion_Prims.list", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", - "fuel_guarded_inversion_Pulse.Syntax.Base.st_term_", "function_token_typing_Prims.__cache_version_number__", - "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", + "int_inversion", "kinding_Pulse.Syntax.Base.st_term@tok", + "kinding_Pulse.Syntax.Base.term@tok", "kinding_Pulse.Typing.post_hint_t@tok", "lemma_FStar.Pervasives.invertOption", "lemma_Pulse.Syntax.Base.range_singleton", - "primitive_Prims.op_BarBar", "primitive_Prims.op_Negation", + "lemma_Pulse.Typing.Env.env_extends_trans", "proj_equation_FStar.Pervasives.Native.Mktuple2__1", "proj_equation_FStar.Pervasives.Native.Mktuple2__2", "proj_equation_FStar.Pervasives.Native.Some_v", + "proj_equation_Prims.Cons_tl", "proj_equation_Prims.Mkdtuple2__1", "proj_equation_Pulse.Syntax.Base.Mkst_term_range", "proj_equation_Pulse.Syntax.Base.Mkst_term_term", - "proj_equation_Pulse.Syntax.Base.Mkterm_range", "proj_equation_Pulse.Typing.Mkpost_hint_t_g", "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Mkdtuple5__1", + "projection_inverse_FStar.Pervasives.Mkdtuple5__2", + "projection_inverse_FStar.Pervasives.Mkdtuple5__3", + "projection_inverse_FStar.Pervasives.Mkdtuple5__4", + "projection_inverse_FStar.Pervasives.Mkdtuple5__5", + "projection_inverse_FStar.Pervasives.Mkdtuple5_b", + "projection_inverse_FStar.Pervasives.Mkdtuple5_c", + "projection_inverse_FStar.Pervasives.Mkdtuple5_d", + "projection_inverse_FStar.Pervasives.Mkdtuple5_e", "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", "projection_inverse_FStar.Pervasives.Native.Some_v", @@ -231,29 +175,29 @@ "projection_inverse_FStar.Tactics.Result.Success_a", "projection_inverse_FStar.Tactics.Result.Success_ps", "projection_inverse_FStar.Tactics.Result.Success_v", - "projection_inverse_Prims.Cons_a", - "projection_inverse_Prims.Cons_hd", "projection_inverse_Prims.Cons_tl", "projection_inverse_Prims.Nil_a", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload_witnesses", - "projection_inverse_Pulse.Syntax.Base.Mkterm_range", + "projection_inverse_Pulse.Syntax.Base.Mkst_term_term", "projection_inverse_Pulse.Syntax.Base.Tm_IntroExists__0", - "projection_inverse_Pulse.Syntax.Base.Tm_ProofHintWithBinders__0", "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_562bee4b22524a77a83f0b80bb888777", + "refinement_interpretation_Tm_refine_6e8e5238aadfc712ef5fa6bc6310c384", + "refinement_interpretation_Tm_refine_7ad5682d990eaec6510764d663af54de", "refinement_interpretation_Tm_refine_7f3ad0958305f2921bfac06f466396ae", "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "refinement_interpretation_Tm_refine_a8b89c35fa28900a81d627ef3d7cb576", + "refinement_interpretation_Tm_refine_b0ea3495ff282f69439c9d1354d6b870", "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", "refinement_interpretation_Tm_refine_eed994d15518279ab75d745192d0d368", "string_typing", "typing_Pulse.Checker.Pure.push_context", - "typing_Pulse.Checker.unprotect", - "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__term", - "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", - "typing_Pulse.Syntax.Base.tm_vprop", + "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__range", "typing_Pulse.Syntax.Printer.tag_of_st_term", "typing_Pulse.Typing.Env.fstar_env", - "typing_Pulse.Typing.Env.push_context" + "typing_Pulse.Typing.Env.push_context", + "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g" ], 0, - "ad95ea047d3e105cfc6359e389022966" + "8c19aedf6d12b33ca29d24bfd5a578fb" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Checker.fsti b/lib/steel/pulse/Pulse.Checker.fsti index 06f01fc05..a8e5f55c7 100644 --- a/lib/steel/pulse/Pulse.Checker.fsti +++ b/lib/steel/pulse/Pulse.Checker.fsti @@ -7,6 +7,6 @@ open FStar.List.Tot open Pulse.Syntax open Pulse.Elaborate.Pure open Pulse.Typing -open Pulse.Checker.Common +open Pulse.Checker.Base val check : check_t diff --git a/lib/steel/pulse/Pulse.Checker.fsti.hints b/lib/steel/pulse/Pulse.Checker.fsti.hints index 88da0e699..be9b2d12b 100644 --- a/lib/steel/pulse/Pulse.Checker.fsti.hints +++ b/lib/steel/pulse/Pulse.Checker.fsti.hints @@ -1 +1 @@ -[ "Js&qi\u0003S3A_.", [] ] \ No newline at end of file +[ "A\"t\fv\u001e", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Common.fst.hints b/lib/steel/pulse/Pulse.Common.fst.hints index 4feec8132..37881304c 100644 --- a/lib/steel/pulse/Pulse.Common.fst.hints +++ b/lib/steel/pulse/Pulse.Common.fst.hints @@ -1,5 +1,5 @@ [ - "<ȤTcq0Iv\u001d", + "NQ\u0010Kr\t\u0010\t\u000e", [ [ "Pulse.Common.op_let_Question", @@ -17,7 +17,7 @@ 1, [ "@MaxIFuel_assumption", "@query", - "binder_x_652f4e4a575e8821fc336b216aa5924b_6", + "binder_x_652f4e4a575e8821fc336b216aa5924b_5", "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", "equation_Prims.op_Equals_Equals_Equals", "fuel_guarded_inversion_Prims.list", @@ -26,7 +26,7 @@ "subterm_ordering_Prims.Cons" ], 0, - "8ab8c32710558b7a853f4f48e9a38e4f" + "afcdc75add08344b9a7529257297c504" ], [ "Pulse.Common.map_dec", @@ -44,7 +44,7 @@ "subterm_ordering_Prims.Cons" ], 0, - "6684db7495738c1ff3067a015b777343" + "c357252564dbdd4053996b06389f1dcf" ], [ "Pulse.Common.zipWith", @@ -79,7 +79,7 @@ "refinement_interpretation_Tm_refine_2c4be05c1b74a68da7602e6178acbf47" ], 0, - "141f50e0f46af29221c023628feb0fec" + "65558c9aec76861d164417e53c8135e7" ], [ "Pulse.Common.zip", @@ -151,7 +151,7 @@ "subterm_ordering_Prims.Cons" ], 0, - "62ff1bc109edcd684c04d0291c40dd47" + "f9a3836db708c8f850343a1a0cfd23a2" ], [ "Pulse.Common.concat_map_opt", @@ -166,7 +166,7 @@ "projection_inverse_BoxBool_proj_0", "subterm_ordering_Prims.Cons" ], 0, - "7995d6ce460902c1dc7691a04c2e7c16" + "f6b0e7289f9db61ee6c05fca0821d663" ], [ "Pulse.Common.lemma_map_opt_dec_len", @@ -234,6 +234,56 @@ 0, "9d1793a5cd03bd520adbae7c4fa9a6a1" ], + [ + "Pulse.Common.dec_index", + 1, + 2, + 1, + [ "@query" ], + 0, + "64a46c08f9379794944254db2a7b36d6" + ], + [ + "Pulse.Common.dec_index", + 2, + 2, + 1, + [ + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_FStar.List.Tot.Base.index.fuel_instrumented", + "@fuel_correspondence_FStar.List.Tot.Base.length.fuel_instrumented", + "@fuel_irrelevance_FStar.List.Tot.Base.index.fuel_instrumented", + "@fuel_irrelevance_FStar.List.Tot.Base.length.fuel_instrumented", + "@query", "Prims_pretyping_ae567c2fb75be05905677af440075565", + "binder_x_5a325427f1a843971781c90628c98e12_6", + "binder_x_652f4e4a575e8821fc336b216aa5924b_5", + "binder_x_fe28d8bcde588226b4e538b35321de05_3", + "disc_equation_Prims.Cons", "equation_FStar.List.Tot.Base.hd", + "equation_FStar.List.Tot.Base.tail", + "equation_FStar.List.Tot.Base.tl", "equation_Prims.nat", + "equation_Prims.op_Equals_Equals_Equals", + "equation_with_fuel_FStar.List.Tot.Base.index.fuel_instrumented", + "equation_with_fuel_FStar.List.Tot.Base.length.fuel_instrumented", + "fuel_guarded_inversion_Prims.list", + "function_token_typing_Prims.__cache_version_number__", + "int_inversion", "primitive_Prims.op_Addition", + "primitive_Prims.op_Equality", "primitive_Prims.op_Subtraction", + "proj_equation_FStar.Pervasives.Native.Mktuple2__1", + "proj_equation_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_BoxInt_proj_0", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_Prims.Cons_tl", + "refinement_interpretation_Tm_refine_3e1bb647f12ec6b42d061204098b4e44", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_a729b8af3b174ec9132c616c5b0d4ee9", + "refinement_interpretation_Tm_refine_c86aba5c6243e6b7f9a4b0ad41b4e9a0", + "subterm_ordering_Prims.Cons" + ], + 0, + "1277815adcd9af52fa11acc3aa232999" + ], [ "Pulse.Common.lemma_map_dec_len", 1, @@ -241,10 +291,10 @@ 1, [ "@MaxIFuel_assumption", "@query", - "refinement_interpretation_Tm_refine_e397420330fc2eb5a4e2f30c73d3a871" + "refinement_interpretation_Tm_refine_4d08f8b7c33e9b91d1fd5a3dcb8d32da" ], 0, - "a25140863c0bb1669dd015cd2d7111e5" + "dad9aeaad1119691fbb30f6d6f8ec152" ], [ "Pulse.Common.lemma_map_dec_len", @@ -302,12 +352,12 @@ "lemma_Pulse.Common.lemma_map_dec_len", "refinement_interpretation_Tm_refine_012d84ab711a5da18390cc5d5e8f4433", "refinement_interpretation_Tm_refine_240252e5fc8433e2ded321d56eeb6aed", - "refinement_interpretation_Tm_refine_4a142b6adbf8bb27b2336ee86c007ca6", + "refinement_interpretation_Tm_refine_445797a27cd7a6e51a310e67a09dd697", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "refinement_interpretation_Tm_refine_bf2fa1226f2c9a0f6671df3e80ddcb8e" ], 0, - "6c76ff9a883c5c36531d474d25e8b0f4" + "fd05fc60ecf8f6f25a19af801215eb8c" ], [ "Pulse.Common.__lemma_map_dec_index", @@ -371,7 +421,7 @@ "subterm_ordering_Prims.Cons" ], 0, - "bc13c5737994503960c93e62adcf00ab" + "5156912d931afdcf1f10cd34bc54381e" ], [ "Pulse.Common.lemma_map_dec_index", diff --git a/lib/steel/pulse/Pulse.Elaborate.Core.fst.hints b/lib/steel/pulse/Pulse.Elaborate.Core.fst.hints index 13f33e8b4..f7f921ac0 100644 --- a/lib/steel/pulse/Pulse.Elaborate.Core.fst.hints +++ b/lib/steel/pulse/Pulse.Elaborate.Core.fst.hints @@ -20,7 +20,7 @@ "typing_Pulse.Syntax.Base.uu___is_C_STAtomic" ], 0, - "1d2c7c806e0541362775eb7c975dc4a1" + "ce7c567d7cf45651c342eccdc3d166b0" ], [ "Pulse.Elaborate.Core.elab_sub", @@ -144,7 +144,7 @@ "binder_x_0401a96b6205c6354bafd83b7f4a3e6d_3", "binder_x_1ad99e5433effa849e32ef9adfa111a0_0", "binder_x_b015b044c5bf00a3dd3df9fa711c87dd_2", "bool_inversion", - "bool_typing", "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_FStar.Pervasives.Native.Some", "constructor_distinct_Pulse.Typing.T_Bind", "constructor_distinct_Pulse.Typing.T_Equiv", "constructor_distinct_Pulse.Typing.T_Frame", @@ -291,6 +291,7 @@ "typing_Pulse.Syntax.Base.uu___is_C_ST", "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.uu___is_T_Par", + "typing_Pulse.Typing.uu___is_T_STApp", "typing_Pulse.Typing.uu___is_T_WithLocal" ], 0, @@ -318,6 +319,7 @@ "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Sealed.Inhabited.is_sealed", "equation_Prims.nat", "equation_Prims.squash", "equation_Pulse.Syntax.Base.as_fv", + "equation_Pulse.Syntax.Base.comp_st", "equation_Pulse.Syntax.Base.not_tv_unknown", "equation_Pulse.Syntax.Base.range", "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Typing.Env.dom", @@ -330,6 +332,7 @@ "refinement_interpretation_Tm_refine_2de20c066034c13bf76e9c0b94f4806c", "refinement_interpretation_Tm_refine_31f0431eec32a7971b33471ec380e558", "refinement_interpretation_Tm_refine_5f4e815ddfeb3d0c9882ff3a1fb18eac", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", "refinement_interpretation_Tm_refine_7ad5682d990eaec6510764d663af54de", "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", "subterm_ordering_Pulse.Typing.TBR", "true_interp", @@ -337,7 +340,9 @@ "typing_FStar.Reflection.Const.squash_qn", "typing_FStar.Reflection.V2.Data.var", "typing_Pulse.Syntax.Base.__proj__Mkfv__item__fv_range", - "typing_Pulse.Syntax.Base.as_fv", "typing_Pulse.Typing.Env.as_map" + "typing_Pulse.Syntax.Base.as_fv", + "typing_Pulse.Syntax.Base.uu___is_C_Tot", + "typing_Pulse.Typing.Env.as_map" ], 0, "d83a479107909e2db1869c08d4a1f0a7" diff --git a/lib/steel/pulse/Pulse.Elaborate.Pure.fst.hints b/lib/steel/pulse/Pulse.Elaborate.Pure.fst.hints index df0ae5f35..9b0141c40 100644 --- a/lib/steel/pulse/Pulse.Elaborate.Pure.fst.hints +++ b/lib/steel/pulse/Pulse.Elaborate.Pure.fst.hints @@ -8,7 +8,7 @@ 1, [ "@query", "lemma_FStar.Pervasives.invertOption" ], 0, - "b60a348666f05c278d04c1045d25b483" + "1581d9d3adc7c3fecfb5c9bd707c5379" ], [ "Pulse.Elaborate.Pure.elab_qual", @@ -75,7 +75,7 @@ "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", "Prims_pretyping_f537159ed795b314b4e58c260361ae86", "Pulse.Syntax.Base_pretyping_be189e4f396d5337499ee0c3708ca7f2", - "binder_x_be189e4f396d5337499ee0c3708ca7f2_0", "bool_typing", + "binder_x_be189e4f396d5337499ee0c3708ca7f2_0", "data_elim_Pulse.Syntax.Base.Pat_Dot_Term", "disc_equation_Pulse.Syntax.Base.Pat_Cons", "disc_equation_Pulse.Syntax.Base.Pat_Constant", @@ -88,7 +88,8 @@ "lemma_FStar.Pervasives.invertOption", "proj_equation_Pulse.Syntax.Base.Pat_Dot_Term__0", "projection_inverse_BoxBool_proj_0", "string_typing", - "subterm_ordering_Pulse.Syntax.Base.Pat_Cons", "true_interp" + "subterm_ordering_Pulse.Syntax.Base.Pat_Cons", "true_interp", + "typing_Pulse.Syntax.Base.uu___is_Pat_Constant" ], 0, "47f26a175450a19e3dce37987c67d30f" diff --git a/lib/steel/pulse/Pulse.Elaborate.fst.hints b/lib/steel/pulse/Pulse.Elaborate.fst.hints index 1a05245bc..5c1032009 100644 --- a/lib/steel/pulse/Pulse.Elaborate.fst.hints +++ b/lib/steel/pulse/Pulse.Elaborate.fst.hints @@ -246,7 +246,7 @@ "typing_tok_FStar.Reflection.V2.Data.Tv_Unknown@tok" ], 0, - "03bda717a103cbf58156328bd39a8b65" + "d0726d30dad34a7b6cd04407900619b9" ], [ "Pulse.Elaborate.elab_comp_open_commute'", @@ -1606,7 +1606,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "43b1439e27cbcaa89d7f28b2e6557a61" + "de0fe79f5e59bac391e3de21199df6c0" ], [ "Pulse.Elaborate.elab_freevars", diff --git a/lib/steel/pulse/Pulse.Elaborate.fsti.hints b/lib/steel/pulse/Pulse.Elaborate.fsti.hints index 3b4fa3945..1836d9a2f 100644 --- a/lib/steel/pulse/Pulse.Elaborate.fsti.hints +++ b/lib/steel/pulse/Pulse.Elaborate.fsti.hints @@ -14,7 +14,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "88d9bf9ffac5488356054dbc5fed1bf9" + "1d761983742bdb6ac9b614dc6805b8b9" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Main.fst b/lib/steel/pulse/Pulse.Main.fst index ec9220578..0dd38a45c 100644 --- a/lib/steel/pulse/Pulse.Main.fst +++ b/lib/steel/pulse/Pulse.Main.fst @@ -26,11 +26,18 @@ let main' (t:st_term) (pre:term) (g:RT.fstar_top_env) let (| pre, ty, pre_typing |) = Pulse.Checker.Pure.check_term g pre in if eq_tm ty tm_vprop then let pre_typing : tot_typing g pre tm_vprop = E pre_typing in - let (| t, c, t_typing |) = check g t pre pre_typing None in - let refl_e = elab_st_typing t_typing in - let refl_t = elab_comp c in - soundness_lemma g t c t_typing; - (refl_e, refl_t) + match t.term with + | Tm_Abs _ -> + let (| t, c, t_typing |) = Pulse.Checker.Abs.check_abs g t Pulse.Checker.check in + // let (| t, c, t_typing |) = check g t pre pre_typing None true in + Pulse.Checker.Prover.debug_prover g + (fun _ -> Printf.sprintf "\ncheck call returned in main with:\n%s\n" + (P.st_term_to_string t)); + let refl_e = elab_st_typing t_typing in + let refl_t = elab_comp c in + soundness_lemma g t c t_typing; + (refl_e, refl_t) + | _ -> fail g (Some t.range) "main: top-level term not a Tm_Abs" else fail g (Some t.range) "pulse main: cannot typecheck pre at type vprop" let main t pre : RT.dsl_tac_t = main' t pre diff --git a/lib/steel/pulse/Pulse.Main.fst.hints b/lib/steel/pulse/Pulse.Main.fst.hints index c9c379de2..7d4505ce5 100644 --- a/lib/steel/pulse/Pulse.Main.fst.hints +++ b/lib/steel/pulse/Pulse.Main.fst.hints @@ -1,5 +1,5 @@ [ - "-\"X\\#М\u0001\r-p7", + ".34\u000b2Nss", [ [ "Pulse.Main.main'", @@ -13,18 +13,14 @@ "FStar.List.Tot.Base_interpretation_Tm_arrow_3c1d21b8f6dcc5e202b4ff1cafbaba81", "FStar.Reflection.Types_pretyping_b57262eead998d474939c05a17e1ffab", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "Pulse.Syntax.Base_pretyping_01e6cbbfeab3ba416b144f2c9223a2d4", "Pulse.Typing_interpretation_Tm_arrow_7025f41b53a92b33286c43a926ef926b", - "constructor_distinct_FStar.Pervasives.Native.None", "constructor_distinct_FStar.Pervasives.Native.Some", "constructor_distinct_FStar.Tactics.Result.Failed", "constructor_distinct_FStar.Tactics.Result.Success", "constructor_distinct_Prims.Nil", "disc_equation_FStar.Pervasives.Native.None", "disc_equation_FStar.Pervasives.Native.Some", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", "equation_FStar.Pervasives.Native.fst", "equation_FStar.Pervasives.Native.snd", "equation_FStar.Reflection.Types.typ", @@ -33,7 +29,6 @@ "equation_FStar.Reflection.V2.Data.var", "equation_Pulse.Soundness.Common.check_top_level_environment", "equation_Pulse.Soundness.Common.stt_env", - "equation_Pulse.Syntax.Base.stateful_comp", "equation_Pulse.Syntax.Base.tm_vprop", "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Typing.Env.binding", @@ -42,16 +37,16 @@ "equation_Pulse.Typing.extend_env_l", "equation_with_fuel_FStar.List.Tot.Base.fold_right.fuel_instrumented", "fuel_guarded_inversion_FStar.Tactics.Result.__result", + "fuel_guarded_inversion_Prims.list", "function_token_typing_FStar.Reflection.Types.env", "function_token_typing_Prims.__cache_version_number__", "function_token_typing_Pulse.Typing.Env.binding", "int_inversion", - "lemma_Pulse.Typing.Env.mk_env_bs", "primitive_Prims.op_BarBar", + "lemma_Pulse.Typing.Env.mk_env_bs", "proj_equation_FStar.Pervasives.Native.Mktuple2__1", "proj_equation_FStar.Pervasives.Native.Mktuple2__2", "projection_inverse_BoxBool_proj_0", "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", - "projection_inverse_FStar.Pervasives.Native.None_a", "projection_inverse_FStar.Pervasives.Native.Some_a", "projection_inverse_FStar.Pervasives.Native.Some_v", "projection_inverse_FStar.Tactics.Result.Failed_a", @@ -60,7 +55,6 @@ "projection_inverse_FStar.Tactics.Result.Success_a", "projection_inverse_FStar.Tactics.Result.Success_ps", "projection_inverse_FStar.Tactics.Result.Success_v", - "projection_inverse_Prims.Nil_a", "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", "refinement_interpretation_Tm_refine_30687c6bbf76a4ea67eae131536eafd7", "refinement_interpretation_Tm_refine_8f56033db8fc241ac36f2bef28601f85", @@ -72,7 +66,7 @@ "typing_Tm_abs_9de830881eb0b7299cb605b2cfe97562" ], 0, - "51f38b69b6806ddc11d3609e8a87b77e" + "df8aef011d87b1c2b284752726b22bcd" ], [ "Pulse.Main.main", diff --git a/lib/steel/pulse/Pulse.Prover.Common.fst b/lib/steel/pulse/Pulse.Prover.Common.fst deleted file mode 100644 index 9189c1785..000000000 --- a/lib/steel/pulse/Pulse.Prover.Common.fst +++ /dev/null @@ -1,359 +0,0 @@ -module Pulse.Prover.Common - -module T = FStar.Tactics - -open Pulse.Syntax -open Pulse.Typing -open Pulse.Checker.Common -open Pulse.Typing.Combinators -open Pulse.Typing.Metatheory -open Pulse.Checker.Framing -open Pulse.Checker.VPropEquiv - -module T = FStar.Tactics - -module Metatheory = Pulse.Typing.Metatheory -module PS = Pulse.Prover.Substs - -let k_elab_unit (g:env) (ctxt:term) - : continuation_elaborator g ctxt g ctxt - = fun p r -> r - -let k_elab_trans (#g0 #g1 #g2:env) (#ctxt0 #ctxt1 #ctxt2:term) - (k0:continuation_elaborator g0 ctxt0 g1 ctxt1) - (k1:continuation_elaborator g1 ctxt1 g2 ctxt2 { g1 `env_extends` g0}) - : continuation_elaborator g0 ctxt0 g2 ctxt2 - = fun post_hint res -> k0 post_hint (k1 post_hint res) - -let comp_st_with_post (c:comp_st) (post:term) : c':comp_st { st_comp_of_comp c' == ({ st_comp_of_comp c with post} <: st_comp) } = - match c with - | C_ST st -> C_ST { st with post } - | C_STGhost i st -> C_STGhost i { st with post } - | C_STAtomic i st -> C_STAtomic i {st with post} - -let ve_unit_r g (p:term) : vprop_equiv g (tm_star p tm_emp) p = - VE_Trans _ _ _ _ (VE_Comm _ _ _) (VE_Unit _ _) - -let st_equiv_post (#g:env) (#t:st_term) (#c:comp_st) (d:st_typing g t c) - (post:term { freevars post `Set.subset` freevars (comp_post c)}) - (veq: (x:var { fresh_wrt x g (freevars (comp_post c)) } -> - vprop_equiv (push_binding g x ppname_default (comp_res c)) - (open_term (comp_post c) x) - (open_term post x))) - : st_typing g t (comp_st_with_post c post) - = let c' = comp_st_with_post c post in - let (| u_of, pre_typing, x, post_typing |) = Metatheory.(st_comp_typing_inversion (comp_typing_inversion (st_typing_correctness d))) in - let veq = veq x in - let st_equiv : st_equiv g c c' = - ST_VPropEquiv g c c' x pre_typing u_of post_typing (VE_Refl _ _) veq - in - T_Equiv _ _ _ _ d st_equiv - -let simplify_post (#g:env) (#t:st_term) (#c:comp_st) (d:st_typing g t c) - (post:term { comp_post c == tm_star post tm_emp}) - : st_typing g t (comp_st_with_post c post) - = st_equiv_post d post (fun x -> ve_unit_r (push_binding g x ppname_default (comp_res c)) (open_term post x)) - -let simplify_lemma (c:comp_st) (c':comp_st) (post_hint:option post_hint_t) - : Lemma - (requires - comp_post_matches_hint c post_hint /\ - comp_res c' == comp_res c /\ - comp_u c' == comp_u c /\ - comp_post c' == tm_star (comp_post c) tm_emp) - (ensures comp_post_matches_hint (comp_st_with_post c' (comp_post c)) post_hint /\ - comp_pre (comp_st_with_post c' (comp_post c)) == comp_pre c') - = () - -#push-options "--z3rlimit_factor 4 --ifuel 1 --fuel 0" -let k_elab_equiv_continutation (#g1 #g2:env) (#ctxt #ctxt1 #ctxt2:term) - (k:continuation_elaborator g1 ctxt g2 ctxt1) - (d:vprop_equiv g2 ctxt1 ctxt2) - : continuation_elaborator g1 ctxt g2 ctxt2 = - fun post_hint res -> - let framing_token : frame_for_req_in_ctxt g2 ctxt1 ctxt2 = - let d : vprop_equiv g2 (tm_star ctxt2 tm_emp) ctxt1 = - VE_Trans _ _ _ _ (VE_Comm _ _ _) (VE_Trans _ _ _ _ (VE_Unit _ _) (VE_Sym _ _ _ d)) in - (| tm_emp, emp_typing, d |) - in - let (| st, c, st_d |) = res in - if not (stateful_comp c) then k post_hint (| st, c, st_d |) - else - let (| _, pre_typing, _, _ |) = - Metatheory.(st_comp_typing_inversion (comp_typing_inversion (st_typing_correctness st_d))) in - let (| c', st_d' |) = - Pulse.Checker.Framing.apply_frame (vprop_equiv_typing_bk pre_typing d) st_d framing_token in - assert (comp_post c' == tm_star (comp_post c) tm_emp); - let st_d' = simplify_post st_d' (comp_post c) in - k post_hint (| st, _, st_d' |) -#pop-options - -#push-options "--z3rlimit_factor 4 --ifuel 1 --fuel 0" -let k_elab_equiv_prefix (#g1 #g2:env) (#ctxt1 #ctxt2 #ctxt:term) - (k:continuation_elaborator g1 ctxt1 g2 ctxt) - (d:vprop_equiv g1 ctxt1 ctxt2) - : continuation_elaborator g1 ctxt2 g2 ctxt = - fun post_hint res -> - let framing_token : frame_for_req_in_ctxt g1 ctxt2 ctxt1 = - let d = VE_Trans _ _ _ _ (VE_Comm _ _ _) (VE_Trans _ _ _ _ (VE_Unit _ _) d) in - (| tm_emp, emp_typing, d |) - in - let res = k post_hint res in - let (| st, c, st_d |) = res in - if not (stateful_comp c) then (| st, c, st_d |) - else let (| _, pre_typing, _, _ |) = - Metatheory.(st_comp_typing_inversion (comp_typing_inversion (st_typing_correctness st_d))) in - let (| c', st_d' |) = - Pulse.Checker.Framing.apply_frame - (vprop_equiv_typing_fwd pre_typing d) - st_d - framing_token in - simplify_lemma c c' post_hint; - let c'' = comp_st_with_post c' (comp_post c) in - let st_d' : st_typing g1 st c'' = simplify_post st_d' (comp_post c) in - let res : (checker_result_t g1 ctxt2 post_hint) = (| st, c'', st_d' |) in - res -#pop-options - -let k_elab_equiv (#g1 #g2:env) (#ctxt1 #ctxt1' #ctxt2 #ctxt2':term) - (k:continuation_elaborator g1 ctxt1 g2 ctxt2) - (d1:vprop_equiv g1 ctxt1 ctxt1') - (d2:vprop_equiv g2 ctxt2 ctxt2') - : continuation_elaborator g1 ctxt1' g2 ctxt2' = - - let k : continuation_elaborator g1 ctxt1 g2 ctxt2' = - k_elab_equiv_continutation k d2 in - let k : continuation_elaborator g1 ctxt1' g2 ctxt2' = - k_elab_equiv_prefix k d1 in - k - -let rec list_as_vprop' (vp:vprop) (fvps:list vprop) - : Tot vprop (decreases fvps) = - match fvps with - | [] -> vp - | hd::tl -> list_as_vprop' (tm_star vp hd) tl - -let rec canon_right_aux (g:env) (vps:list vprop) (f:vprop -> T.Tac bool) - : T.Tac (vps' : list vprop & - fvps : list vprop & - vprop_equiv g (list_as_vprop vps) (list_as_vprop' (list_as_vprop vps') fvps)) = - - match vps with - | [] -> (| [], [], VE_Refl _ _ |) - | hd::rest -> - if f hd - then begin - let (| vps', fvps, _ |) = canon_right_aux g rest f in - let v_eq = magic () in - // let v_eq - // : vprop_equiv g (list_as_vprop vps) - // (list_as_vprop (hd :: (vps' @ fvps))) - // = list_as_vprop_ctx g [hd] _ rest (vps' @ fvps) (VE_Refl _ _) v_eq - // in - // let v_eq - // : vprop_equiv g (list_as_vprop vps) - // (list_as_vprop ((vps'@[hd]) @ fvps)) - // = VE_Trans _ _ _ _ v_eq (VE_Sym _ _ _ (vprop_equiv_swap_equiv _ _ _ hd _ (VE_Refl _ _))) - // in - // let v_eq - // : vprop_equiv g (list_as_vprop vps) - // (list_as_vprop (vps'@(hd::fvps))) - // = VE_Trans _ _ _ _ v_eq (VE_Sym _ _ _ (list_as_vprop_assoc _ _ _ _)) in - (| vps', hd :: fvps, v_eq |) - end - else begin - let (| vps', pures, _ |) = canon_right_aux g rest f in - let v_eq = magic () in //list_as_vprop_ctx g [hd] _ _ _ (VE_Refl _ _) v_eq in - (| hd::vps', pures, v_eq |) - end - -module VP = Pulse.Checker.VPropEquiv -module F = Pulse.Checker.Framing - -let canon_right (#g:env) (#ctxt:term) (#frame:term) - (ctxt_frame_typing:tot_typing g (tm_star ctxt frame) tm_vprop) - (f:vprop -> T.Tac bool) - : T.Tac (ctxt':term & - tot_typing g (tm_star ctxt' frame) tm_vprop & - continuation_elaborator g (tm_star ctxt frame) g (tm_star ctxt' frame)) - = let (| vps', pures, veq |) = canon_right_aux g (vprop_as_list ctxt) f in - let veq : vprop_equiv g ctxt (list_as_vprop' (list_as_vprop vps') pures) - = magic () in - let veq : vprop_equiv g (tm_star ctxt frame) (tm_star (list_as_vprop' (list_as_vprop vps') pures) frame) - = VE_Ctxt _ _ _ _ _ veq (VE_Refl _ _) in - (| _, VP.vprop_equiv_typing_fwd ctxt_frame_typing veq, k_elab_equiv (k_elab_unit _ _) (VE_Refl _ _) veq |) - -#push-options "--query_stats --fuel 2 --ifuel 2 --split_queries no --z3rlimit_factor 10" -let continuation_elaborator_with_bind (#g:env) (ctxt:term) - (#c1:comp{stateful_comp c1}) - (#e1:st_term) - (e1_typing:st_typing g e1 c1) - (ctxt_pre1_typing:tot_typing g (tm_star ctxt (comp_pre c1)) tm_vprop) - (x:var { None? (lookup g x) }) - : T.Tac (continuation_elaborator - g (tm_star ctxt (comp_pre c1)) - (push_binding g x ppname_default (comp_res c1)) (tm_star (open_term (comp_post c1) x) ctxt)) = - - let pre1 = comp_pre c1 in - let res1 = comp_res c1 in - let post1 = comp_post c1 in - let ctxt_typing = star_typing_inversion_l ctxt_pre1_typing in - // let p_prop = Metatheory.pure_typing_inversion pure_typing in - let v_eq = VE_Comm g ctxt pre1 in - let framing_token : F.frame_for_req_in_ctxt g (tm_star ctxt pre1) pre1 = - (| ctxt, ctxt_typing, VE_Comm g pre1 ctxt |) - in - let (| c1, e1_typing |) = - Pulse.Checker.Framing.apply_frame ctxt_pre1_typing e1_typing framing_token in - let (| u_of_1, pre_typing, _, _ |) = - Metatheory.(st_comp_typing_inversion (comp_typing_inversion (st_typing_correctness e1_typing))) in - let b = res1 in - let g' = push_binding g x ppname_default b in - - let post1_opened = open_term_nv post1 (v_as_nv x) in - let k : continuation_elaborator g (tm_star ctxt pre1) g' (tm_star post1_opened ctxt) = - fun post_hint res -> - let (| e2, c2, e2_typing |) = res in - if not (stateful_comp c2) // || None? post_hint - then T.fail "Unexpected non-stateful comp in continuation elaborate" - else ( - let e2_typing : st_typing g' e2 c2 = e2_typing in - let e2_closed = close_st_term e2 x in - assume (open_st_term e2_closed x == e2); - assert (comp_pre c1 == (tm_star ctxt pre1)); - assert (comp_post c1 == tm_star post1 ctxt); - assert (comp_pre c2 == tm_star post1_opened ctxt); - assert (open_term (comp_post c1) x == tm_star post1_opened (open_term ctxt x)); - // ctxt is well-typed, hence ln - assume (open_term ctxt x == ctxt); - assert (open_term (comp_post c1) x == comp_pre c2); - // we closed e2 with x - assume (~ (x `Set.mem` freevars_st e2_closed)); - if x `Set.mem` freevars (comp_post c2) - then T.fail "Impossible" - else ( - let t_typing, post_typing = - bind_res_and_post_typing g (st_comp_of_comp c2) x post_hint in - let (| e, c, e_typing |) = - mk_bind - g (tm_star ctxt pre1) - e1 e2_closed c1 c2 (v_as_nv x) e1_typing - u_of_1 - e2_typing - t_typing - post_typing - in - (| e, c, e_typing |) - ) - ) - - in - k -#pop-options - -let elim_one (#g:env) - (ctxt:term) (frame:vprop) (p:vprop) - (ctxt_frame_p_typing:tot_typing g (tm_star (tm_star ctxt frame) p) tm_vprop) - (nx:ppname) (e1:st_term) (c1:comp { stateful_comp c1 /\ comp_pre c1 == p }) - (e1_typing:st_typing g e1 c1) - (uvs:env { disjoint uvs g }) - : T.Tac (g':env { env_extends g' g /\ disjoint uvs g' } & - ctxt':term & - tot_typing g' (tm_star ctxt' frame) tm_vprop & - continuation_elaborator g (tm_star (tm_star ctxt frame) p) g' (tm_star ctxt' frame)) = - - let ctxt_frame_typing = star_typing_inversion_l ctxt_frame_p_typing in - let x = fresh (push_env g uvs) in - let k = - continuation_elaborator_with_bind (tm_star ctxt frame) e1_typing ctxt_frame_p_typing x in - let g' = push_binding g x nx (comp_res c1) in - let ctxt' = tm_star (open_term_nv (comp_post c1) (v_as_nv x)) ctxt in - let veq - : vprop_equiv g' (tm_star (open_term_nv (comp_post c1) (v_as_nv x)) (tm_star ctxt frame)) - (tm_star ctxt' frame) = VE_Assoc _ _ _ _ in - let k - : continuation_elaborator - g (tm_star (tm_star ctxt frame) p) - g' (tm_star ctxt' frame) = - k_elab_equiv - #g #g' - #(tm_star (tm_star ctxt frame) p) - #(tm_star (tm_star ctxt frame) p) - #(tm_star (open_term_nv (comp_post c1) (v_as_nv x)) (tm_star ctxt frame)) - #(tm_star ctxt' frame) - k (VE_Refl g (tm_star (tm_star ctxt frame) p)) veq in - - let ctxt'_frame_typing : tot_typing g' (tm_star ctxt' frame) tm_vprop = magic () in - env_extends_push g x ppname_default (comp_res c1); - (| g', ctxt', ctxt'_frame_typing, k |) - -let rec elim_all (#g:env) - (f:vprop -> T.Tac bool) - (mk:mk_t) - (#ctxt:term) (#frame:term) (ctxt_frame_typing:tot_typing g (tm_star ctxt frame) tm_vprop) - (uvs:env { disjoint uvs g }) - : T.Tac (bool & - (g':env { env_extends g' g /\ disjoint uvs g' } & - ctxt':term & - tot_typing g' (tm_star ctxt' frame) tm_vprop & - continuation_elaborator g (tm_star ctxt frame) g' (tm_star ctxt' frame))) - = match ctxt.t with - | Tm_Star ctxt' p -> - let p_typing = - star_typing_inversion_r #_ #ctxt' #p (star_typing_inversion_l ctxt_frame_typing) in - if f p - then match mk #_ #p p_typing with - | Some (| nx, e1, c1, e1_typing |) -> - let (| g', _, ctxt_typing', k |) = - elim_one ctxt' frame p (magic ()) nx e1 c1 e1_typing uvs in - let k - : continuation_elaborator g (tm_star (tm_star ctxt' frame) p) - g' (tm_star _ frame) = k in - let k - : continuation_elaborator g (tm_star (tm_star ctxt' p) frame) - g' (tm_star _ frame) = - k_elab_equiv k - (magic ()) (VE_Refl _ _) in - let _, (| g'', ctxt'', ctxt_typing'', k' |) = - elim_all #g' f mk ctxt_typing' uvs in - true, (| g'', ctxt'', ctxt_typing'', k_elab_trans k k' |) - | None -> - false, (| g, ctxt, ctxt_frame_typing, k_elab_unit _ _ |) - else begin - false, (| g, ctxt, ctxt_frame_typing, k_elab_unit _ _ |) - end - | _ -> - false, (| g, ctxt, ctxt_frame_typing, k_elab_unit _ _ |) - -let add_elims_aux (#g:env) (#ctxt:term) (#frame:term) - (f:vprop -> T.Tac bool) - (mk:mk_t) - (ctxt_frame_typing:tot_typing g (tm_star ctxt frame) tm_vprop) - (uvs:env { disjoint uvs g }) - : T.Tac (bool & - (g':env { env_extends g' g /\ disjoint uvs g' } & - ctxt':term & - tot_typing g' (tm_star ctxt' frame) tm_vprop & - continuation_elaborator g (tm_star ctxt frame) g' (tm_star ctxt' frame))) - = let (| ctxt', ctxt'_typing, k |) = canon_right ctxt_frame_typing f in - let progress, (| g', ctxt'', ctxt''_typing, k' |) = - elim_all f mk ctxt'_typing uvs in - progress, (| g', ctxt'', ctxt''_typing, k_elab_trans k k' |) - -let rec add_elims (#g:env) (#ctxt:term) (#frame:term) - (f:vprop -> T.Tac bool) - (mk:mk_t) - (ctxt_typing:tot_typing g (tm_star ctxt frame) tm_vprop) - (uvs:env { disjoint uvs g }) - : T.Tac (g':env { env_extends g' g /\ disjoint uvs g' } & - ctxt':term & - tot_typing g' (tm_star ctxt' frame) tm_vprop & - continuation_elaborator g (tm_star ctxt frame) g' (tm_star ctxt' frame)) - = let progress, res = add_elims_aux f mk ctxt_typing uvs in - if not progress - then res - else ( - let (| g', ctxt', ctxt'_typing, k |) = res in - let (| g'', ctxt'', ctxt''_typing, k' |) = add_elims f mk ctxt'_typing uvs in - (| g'', ctxt'', ctxt''_typing, k_elab_trans k k' |) - ) diff --git a/lib/steel/pulse/Pulse.Prover.Common.fst.hints b/lib/steel/pulse/Pulse.Prover.Common.fst.hints deleted file mode 100644 index a09274262..000000000 --- a/lib/steel/pulse/Pulse.Prover.Common.fst.hints +++ /dev/null @@ -1,1150 +0,0 @@ -[ - "7A\u0004%zL#\u0010W`", - [ - [ - "Pulse.Prover.Common.k_elab_trans", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "equation_Pulse.Typing.post_hint_for_env_p", - "equation_Pulse.Typing.post_hint_opt", - "kinding_Pulse.Typing.post_hint_t@tok", - "lemma_FStar.Pervasives.invertOption", - "lemma_Pulse.Typing.Env.env_extends_trans", - "proj_equation_FStar.Pervasives.Native.Some_v", - "proj_equation_Pulse.Typing.Mkpost_hint_t_g", - "refinement_interpretation_Tm_refine_4d5241eb6fe198666a8101195bbd4a2a", - "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", - "refinement_interpretation_Tm_refine_efc21f65d3568fc5a48e98df17843dfa", - "typing_FStar.Pervasives.Native.__proj__Some__item__v", - "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g" - ], - 0, - "7f56ea018a7c4cb52055748c44ab6973" - ], - [ - "Pulse.Prover.Common.comp_st_with_post", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", - "constructor_distinct_Pulse.Syntax.Base.C_STGhost", - "data_elim_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.st_comp_of_comp", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", - "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "5add6fdeb5989187c328e2ac5ddfb6a5" - ], - [ - "Pulse.Prover.Common.st_equiv_post", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", "primitive_Prims.op_BarBar", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "refinement_interpretation_Tm_refine_fbeb4eb12902ab763889d17cad7e9920", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "f91a849f12325c15576f95b5385812ad" - ], - [ - "Pulse.Prover.Common.st_equiv_post", - 2, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "Pulse.Syntax.Base_pretyping_b015b044c5bf00a3dd3df9fa711c87dd", - "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", - "constructor_distinct_Pulse.Syntax.Base.C_STGhost", - "data_elim_FStar.Pervasives.Mkdtuple4", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_FStar.Pervasives.Native.snd", - "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.subset", - "equation_Prims.nat", - "equation_Pulse.Prover.Common.comp_st_with_post", - "equation_Pulse.Syntax.Base.comp_post", - "equation_Pulse.Syntax.Base.comp_pre", - "equation_Pulse.Syntax.Base.comp_res", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.comp_u", - "equation_Pulse.Syntax.Base.ppname_default", - "equation_Pulse.Syntax.Base.st_comp_of_comp", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Syntax.Naming.open_term", - "equation_Pulse.Syntax.Pure.tm_type", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", - "equation_Pulse.Typing.st_equiv_pre", - "equation_Pulse.Typing.tot_typing", "equation_Pulse.Typing.typing", - "equation_Pulse.Typing.universe_of", - "fuel_guarded_inversion_FStar.Pervasives.dtuple4", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "fuel_guarded_inversion_Pulse.Typing.my_erased", - "fuel_guarded_inversion_Pulse.Typing.st_comp_typing", - "interpretation_Tm_abs_9627aa63c90056f8b614da4dfb4d20bf", - "interpretation_Tm_abs_c8631188b49e797b2c9232f71b480642", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", "primitive_Prims.op_BarBar", - "proj_equation_FStar.Pervasives.Native.Mktuple2__2", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_u", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Mkdtuple4__3", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", - "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_res", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_u", - "refinement_interpretation_Tm_refine_2e7859babf6dc4b57292f015e044869d", - "refinement_interpretation_Tm_refine_36441f5163bf4613efd69bece0701f67", - "refinement_interpretation_Tm_refine_6262a74a3e7906640b3d8d4146589509", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", - "typing_FStar.Map.contains", "typing_FStar.Reflection.V2.Data.var", - "typing_FStar.Set.mem", "typing_Pulse.Syntax.Base.stateful_comp", - "typing_Pulse.Syntax.Base.uu___is_C_Tot", - "typing_Pulse.Syntax.Naming.freevars", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", - "typing_Pulse.Typing.Metatheory.comp_typing_inversion", - "typing_Pulse.Typing.Metatheory.st_comp_typing_inversion", - "typing_Pulse.Typing.Metatheory.st_typing_correctness" - ], - 0, - "087b101fee1dce108465e78fcc2a9d43" - ], - [ - "Pulse.Prover.Common.simplify_post", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "cf0410cca10108ecd2b02c27e25dce5d" - ], - [ - "Pulse.Prover.Common.simplify_post", - 2, - 2, - 1, - [ - "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_Pulse.Syntax.Naming.freevars.fuel_instrumented", - "@fuel_correspondence_Pulse.Syntax.Naming.subst_term.fuel_instrumented", - "@fuel_irrelevance_Pulse.Syntax.Naming.freevars.fuel_instrumented", - "@fuel_irrelevance_Pulse.Syntax.Naming.subst_term.fuel_instrumented", - "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "constructor_distinct_Pulse.Syntax.Base.Tm_Emp", - "constructor_distinct_Pulse.Syntax.Base.Tm_Star", - "data_typing_intro_Prims.Cons@tok", - "data_typing_intro_Prims.Nil@tok", - "data_typing_intro_Pulse.Syntax.Naming.DT@tok", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equality_tok_Pulse.Syntax.Base.Tm_Emp@tok", - "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.subset", - "equation_Prims.nat", "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.index", - "equation_Pulse.Syntax.Base.range", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.tm_emp", - "equation_Pulse.Syntax.Base.tm_star", - "equation_Pulse.Syntax.Base.typ", - "equation_Pulse.Syntax.Base.v_as_nv", - "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", - "equation_Pulse.Syntax.Base.with_range", - "equation_Pulse.Syntax.Naming.open_term", - "equation_Pulse.Syntax.Naming.open_term_", - "equation_Pulse.Syntax.Naming.open_term_nv", - "equation_Pulse.Syntax.Naming.subst", - "equation_Pulse.Syntax.Pure.term_of_nvar", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", - "equation_with_fuel_Pulse.Syntax.Naming.freevars.fuel_instrumented", - "equation_with_fuel_Pulse.Syntax.Naming.subst_term.fuel_instrumented", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", "int_inversion", - "int_typing", "kinding_Pulse.Syntax.Base.term@tok", - "kinding_Pulse.Syntax.Naming.subst_elt@tok", - "lemma_FStar.Map.lemma_ContainsDom", "lemma_FStar.Set.mem_union", - "lemma_Pulse.Syntax.Base.range_singleton", - "primitive_Prims.op_BarBar", - "proj_equation_Pulse.Syntax.Base.Mkterm_range", - "proj_equation_Pulse.Syntax.Base.Mkterm_t", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_Pulse.Syntax.Base.Mkterm_range", - "projection_inverse_Pulse.Syntax.Base.Mkterm_t", - "projection_inverse_Pulse.Syntax.Base.Tm_Star_l", - "projection_inverse_Pulse.Syntax.Base.Tm_Star_r", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", - "refinement_interpretation_Tm_refine_ae82812843756c5d6a3ba807e638b88e", - "refinement_interpretation_Tm_refine_fbeb4eb12902ab763889d17cad7e9920", - "token_correspondence_Pulse.Syntax.Naming.freevars.fuel_instrumented", - "typing_FStar.Map.contains", "typing_FStar.Reflection.V2.Data.var", - "typing_FStar.Set.mem", - "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", - "typing_Pulse.Syntax.Base.tm_emp", - "typing_Pulse.Syntax.Base.tm_star", - "typing_Pulse.Syntax.Base.uu___is_C_Tot", - "typing_Pulse.Syntax.Base.v_as_nv", - "typing_Pulse.Syntax.Naming.freevars", - "typing_Pulse.Syntax.Naming.open_term_nv", - "typing_Pulse.Syntax.Pure.term_of_nvar", - "typing_Pulse.Typing.Env.as_map" - ], - 0, - "1e15cc38685bd9919f439f2913e15f1f" - ], - [ - "Pulse.Prover.Common.simplify_lemma", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", - "constructor_distinct_Pulse.Syntax.Base.C_STGhost", - "data_elim_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Prover.Common.comp_st_with_post", - "equation_Pulse.Syntax.Base.comp_post", - "equation_Pulse.Syntax.Base.comp_pre", - "equation_Pulse.Syntax.Base.comp_res", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.comp_u", - "equation_Pulse.Syntax.Base.st_comp_of_comp", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.vprop", - "equation_Pulse.Typing.comp_post_matches_hint", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "primitive_Prims.op_BarBar", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_u", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", - "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_res", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_u", - "refinement_interpretation_Tm_refine_2e82c3c6739f8d96977de8e1ca87d07c", - "refinement_interpretation_Tm_refine_36441f5163bf4613efd69bece0701f67", - "refinement_interpretation_Tm_refine_385f59c31213d29cc308b93df5d99dc9", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "typing_Pulse.Prover.Common.comp_st_with_post", - "typing_Pulse.Syntax.Base.comp_post" - ], - 0, - "e0ddbee9ca14c83115630427087970c7" - ], - [ - "Pulse.Prover.Common.k_elab_equiv_continutation", - 1, - 0, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", "bool_typing", - "constructor_distinct_FStar.Pervasives.Native.Some", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", - "constructor_distinct_Pulse.Syntax.Base.C_STGhost", - "data_elim_FStar.Pervasives.Mkdtuple3", "data_elim_Prims.Mkdtuple2", - "data_elim_Pulse.Syntax.Base.Mkst_comp", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Checker.Common.checker_result_t", - "equation_Pulse.Checker.Framing.frame_of", - "equation_Pulse.Prover.Common.comp_st_with_post", - "equation_Pulse.Syntax.Base.comp_post", - "equation_Pulse.Syntax.Base.comp_pre", - "equation_Pulse.Syntax.Base.comp_res", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.comp_u", - "equation_Pulse.Syntax.Base.st_comp_of_comp", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Syntax.Base.vprop", "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.comp_post_matches_hint", - "equation_Pulse.Typing.fresh_wrt", - "equation_Pulse.Typing.universe_of", - "fuel_guarded_inversion_FStar.Pervasives.dtuple3", - "fuel_guarded_inversion_FStar.Pervasives.dtuple4", - "fuel_guarded_inversion_Prims.dtuple2", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.st_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "fuel_guarded_inversion_Pulse.Typing.st_comp_typing", - "interpretation_Tm_abs_9627aa63c90056f8b614da4dfb4d20bf", - "interpretation_Tm_abs_ba86379e308bc452ec2aaf0d9384ea16", - "interpretation_Tm_abs_c8631188b49e797b2c9232f71b480642", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", "primitive_Prims.op_BarBar", - "primitive_Prims.op_Negation", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_u", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Mkdtuple3__1", - "projection_inverse_FStar.Pervasives.Mkdtuple3__2", - "projection_inverse_Prims.Mkdtuple2__1", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", - "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_res", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_u", - "refinement_interpretation_Tm_refine_1c5e7105979a7231f04ad65b46c30b69", - "refinement_interpretation_Tm_refine_2e7859babf6dc4b57292f015e044869d", - "refinement_interpretation_Tm_refine_36441f5163bf4613efd69bece0701f67", - "refinement_interpretation_Tm_refine_481b8b00009a168b10cebf32cb0deff1", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Prover.Common.comp_st_with_post", - "typing_Pulse.Syntax.Base.uu___is_C_STGhost", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", - "typing_Pulse.Typing.Metatheory.st_comp_typing_inversion" - ], - 0, - "8bb73e5984a51480fa0ec4bb15d6d79a" - ], - [ - "Pulse.Prover.Common.k_elab_equiv_prefix", - 1, - 0, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", "bool_typing", - "constructor_distinct_FStar.Pervasives.Native.Some", - "data_elim_Pulse.Syntax.Base.Mkst_comp", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Checker.Framing.frame_of", - "equation_Pulse.Syntax.Base.comp_pre", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.st_comp_of_comp", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Syntax.Base.vprop", "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", - "equation_Pulse.Typing.universe_of", - "fuel_guarded_inversion_FStar.Pervasives.dtuple4", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.st_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "fuel_guarded_inversion_Pulse.Typing.st_comp_typing", - "interpretation_Tm_abs_9627aa63c90056f8b614da4dfb4d20bf", - "interpretation_Tm_abs_c8631188b49e797b2c9232f71b480642", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", "primitive_Prims.op_BarBar", - "primitive_Prims.op_Negation", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Mkdtuple3__1", - "refinement_interpretation_Tm_refine_1c5e7105979a7231f04ad65b46c30b69", - "refinement_interpretation_Tm_refine_2e7859babf6dc4b57292f015e044869d", - "refinement_interpretation_Tm_refine_47906a90a5ba769ece9e701738040083", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Syntax.Base.uu___is_C_STGhost", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", - "typing_Pulse.Typing.Metatheory.st_comp_typing_inversion" - ], - 0, - "a5718ac6d2c6fbe584af9c0dd0995238" - ], - [ - "Pulse.Prover.Common.list_as_vprop'", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "binder_x_dde2ec1e863a0bcde2ea8594cff3d454_1", - "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", - "equation_Pulse.Syntax.Base.vprop", - "fuel_guarded_inversion_Prims.list", - "projection_inverse_BoxBool_proj_0", "subterm_ordering_Prims.Cons" - ], - 0, - "0793363725a7ab18fe111404b1bc4146" - ], - [ - "Pulse.Prover.Common.canon_right_aux", - 1, - 2, - 1, - [ - "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_Pulse.Prover.Common.list_as_vprop_.fuel_instrumented", - "@query", "constructor_distinct_Prims.Nil", - "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", - "equation_Pulse.Syntax.Base.vprop", - "equation_with_fuel_Pulse.Prover.Common.list_as_vprop_.fuel_instrumented", - "fuel_guarded_inversion_Prims.list", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_Prims.Nil_a", - "typing_Pulse.Checker.VPropEquiv.list_as_vprop" - ], - 0, - "fd721b50340446c23247e828d1e97108" - ], - [ - "Pulse.Prover.Common.continuation_elaborator_with_bind", - 1, - 2, - 2, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "disc_equation_FStar.Pervasives.Native.None", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_f2631f1e9df7e7fe731df0b4c6310657", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "536f5896c5fa0ce9374cf29c16a7b795" - ], - [ - "Pulse.Prover.Common.continuation_elaborator_with_bind", - 2, - 2, - 2, - [ - "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_Pulse.Syntax.Naming.freevars.fuel_instrumented", - "@fuel_correspondence_Pulse.Syntax.Naming.subst_term.fuel_instrumented", - "@fuel_irrelevance_Pulse.Syntax.Naming.subst_term.fuel_instrumented", - "@query", - "Pulse.Syntax.Base_pretyping_01e6cbbfeab3ba416b144f2c9223a2d4", - "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "constructor_distinct_Pulse.Syntax.Base.Tm_Emp", - "constructor_distinct_Pulse.Syntax.Base.Tm_Inames", - "constructor_distinct_Pulse.Syntax.Base.Tm_Star", - "data_elim_FStar.Pervasives.Mkdtuple4", "data_elim_Prims.Mkdtuple2", - "data_typing_intro_Prims.Cons@tok", - "data_typing_intro_Prims.Nil@tok", - "data_typing_intro_Pulse.Syntax.Naming.DT@tok", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equality_tok_Pulse.Syntax.Base.Tm_Inames@tok", - "equation_FStar.Pervasives.Native.fst", - "equation_FStar.Pervasives.Native.snd", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Checker.Framing.frame_of", - "equation_Pulse.Syntax.Base.comp_post", - "equation_Pulse.Syntax.Base.comp_pre", - "equation_Pulse.Syntax.Base.comp_res", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.comp_u", - "equation_Pulse.Syntax.Base.index", - "equation_Pulse.Syntax.Base.ppname_default", - "equation_Pulse.Syntax.Base.range", - "equation_Pulse.Syntax.Base.st_comp_of_comp", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.tm_star", - "equation_Pulse.Syntax.Base.typ", - "equation_Pulse.Syntax.Base.v_as_nv", - "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", - "equation_Pulse.Syntax.Base.with_range", - "equation_Pulse.Syntax.Naming.open_st_term", - "equation_Pulse.Syntax.Naming.open_term", - "equation_Pulse.Syntax.Naming.open_term_", - "equation_Pulse.Syntax.Naming.open_term_nv", - "equation_Pulse.Syntax.Naming.subst", - "equation_Pulse.Syntax.Pure.term_of_nvar", - "equation_Pulse.Syntax.Pure.tm_type", - "equation_Pulse.Typing.Combinators.st_comp_with_pre", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.comp_post_matches_hint", - "equation_Pulse.Typing.fresh_wrt", - "equation_Pulse.Typing.tot_typing", "equation_Pulse.Typing.typing", - "equation_Pulse.Typing.universe_of", - "equation_with_fuel_Pulse.Syntax.Naming.freevars.fuel_instrumented", - "equation_with_fuel_Pulse.Syntax.Naming.subst_term.fuel_instrumented", - "fuel_guarded_inversion_FStar.Pervasives.dtuple4", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Prims.dtuple2", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", - "fuel_guarded_inversion_Pulse.Typing.my_erased", - "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", - "int_typing", - "interpretation_Tm_abs_9627aa63c90056f8b614da4dfb4d20bf", - "interpretation_Tm_abs_c8631188b49e797b2c9232f71b480642", - "kinding_Pulse.Syntax.Base.term@tok", - "kinding_Pulse.Syntax.Naming.subst_elt@tok", - "lemma_FStar.Map.lemma_ContainsDom", "lemma_FStar.Set.mem_union", - "lemma_Pulse.Syntax.Base.range_singleton", - "primitive_Prims.op_BarBar", "primitive_Prims.op_Negation", - "proj_equation_FStar.Pervasives.Native.Mktuple2__1", - "proj_equation_FStar.Pervasives.Native.Mktuple2__2", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", - "proj_equation_Pulse.Syntax.Base.Mkst_comp_u", - "proj_equation_Pulse.Syntax.Base.Mkterm_range", - "proj_equation_Pulse.Syntax.Base.Mkterm_t", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Mkdtuple3__1", - "projection_inverse_FStar.Pervasives.Mkdtuple4__3", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", - "projection_inverse_Prims.Mkdtuple2__1", - "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_res", - "projection_inverse_Pulse.Syntax.Base.Mkst_comp_u", - "projection_inverse_Pulse.Syntax.Base.Mkterm_range", - "projection_inverse_Pulse.Syntax.Base.Mkterm_t", - "projection_inverse_Pulse.Syntax.Base.Tm_Star_l", - "projection_inverse_Pulse.Syntax.Base.Tm_Star_r", - "refinement_interpretation_Tm_refine_2e7859babf6dc4b57292f015e044869d", - "refinement_interpretation_Tm_refine_385f59c31213d29cc308b93df5d99dc9", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_6f7ba47cba322b1ef114079f02b4ebe3", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", - "refinement_interpretation_Tm_refine_9491aaa29a977da7de92f5e9b2712f87", - "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", - "refinement_interpretation_Tm_refine_c985d9b653dbe863d90ae1101a9c9392", - "refinement_interpretation_Tm_refine_eb6f0a03b652ab48a1a8ccec26cd0c88", - "refinement_interpretation_Tm_refine_f2631f1e9df7e7fe731df0b4c6310657", - "token_correspondence_Pulse.Syntax.Naming.freevars.fuel_instrumented", - "typing_FStar.Map.contains", "typing_FStar.Reflection.V2.Data.var", - "typing_FStar.Set.mem", "typing_Pulse.Checker.Framing.apply_frame", - "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__post", - "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", - "typing_Pulse.Syntax.Base.comp_post", - "typing_Pulse.Syntax.Base.comp_pre", - "typing_Pulse.Syntax.Base.stateful_comp", - "typing_Pulse.Syntax.Base.tm_star", - "typing_Pulse.Syntax.Base.v_as_nv", - "typing_Pulse.Syntax.Naming.freevars", - "typing_Pulse.Syntax.Naming.open_term", - "typing_Pulse.Syntax.Naming.open_term_nv", - "typing_Pulse.Syntax.Pure.term_of_nvar", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", - "typing_Pulse.Typing.Metatheory.comp_typing_inversion", - "typing_Pulse.Typing.Metatheory.st_comp_typing_inversion", - "typing_Pulse.Typing.Metatheory.st_typing_correctness" - ], - 0, - "8de98a115fdd393f3c6d6e9ae8703524" - ], - [ - "Pulse.Prover.Common.elim_one", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "Pulse.Syntax.Base_pretyping_fe09dc1e796799f4bac0760e63f30d40", - "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.None", - "data_elim_Pulse.Syntax.Base.Mkppname", - "disc_equation_FStar.Pervasives.Native.None", - "equation_FStar.Pervasives.Native.fst", "equation_FStar.Range.range", - "equation_FStar.Reflection.Typing.pp_name_t", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Syntax.Base.nvar", - "equation_Pulse.Syntax.Base.ppname_default", - "equation_Pulse.Syntax.Base.range", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Syntax.Base.tm_star", - "equation_Pulse.Syntax.Base.typ", - "equation_Pulse.Syntax.Base.v_as_nv", - "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.env_extends", - "equation_Pulse.Typing.Env.extends_with", - "equation_Pulse.Typing.Env.lookup", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.ppname", - "function_token_typing_Prims.int", - "function_token_typing_Prims.string", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", - "kinding_Pulse.Syntax.Base.ppname@tok", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "lemma_FStar.Map.lemma_InDomConcat", - "lemma_FStar.Map.lemma_InDomUpd2", - "lemma_FStar.Sealed.Inhabited.sealed_singleton", - "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", - "lemma_Pulse.Syntax.Base.range_singleton", - "lemma_Pulse.Typing.Env.push_binding_as_map", - "lemma_Pulse.Typing.Env.push_env_as_map", - "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", - "proj_equation_FStar.Pervasives.Native.Mktuple2__1", - "proj_equation_Pulse.Syntax.Base.Mknm_nm_ppname", - "proj_equation_Pulse.Syntax.Base.Mkppname_name", - "proj_equation_Pulse.Syntax.Base.Mkterm_range", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", - "projection_inverse_FStar.Pervasives.Native.None_a", - "projection_inverse_Pulse.Syntax.Base.Mknm_nm_ppname", - "projection_inverse_Pulse.Syntax.Base.Mkppname_name", - "projection_inverse_Pulse.Syntax.Base.Mkterm_range", - "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", - "refinement_interpretation_Tm_refine_26aa72c2bdd0719b051857cb081974bb", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", - "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", - "refinement_interpretation_Tm_refine_d3de001c6427be2e27fcc34006b60e28", - "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", - "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "string_typing", "typing_FStar.Map.contains", - "typing_FStar.Pervasives.Native.fst", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Syntax.Base.__proj__Mkppname__item__name", - "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", - "typing_Pulse.Syntax.Base.comp_res", - "typing_Pulse.Syntax.Base.ppname_default", - "typing_Pulse.Syntax.Base.stateful_comp", - "typing_Pulse.Syntax.Base.tm_star", - "typing_Pulse.Syntax.Base.v_as_nv", "typing_Pulse.Typing.Env.as_map", - "typing_Pulse.Typing.Env.dom" - ], - 0, - "f6fa90e6fceae95bf29fbcaea8ae0cfe" - ], - [ - "Pulse.Prover.Common.elim_all", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "FStar.Pervasives_interpretation_Tm_arrow_0b6559e6ff3addf84b0c2880affbb335", - "FStar.Pervasives_interpretation_Tm_arrow_af8eda99ba3685403be22a88669dcb35", - "Prims_interpretation_Tm_arrow_2eaa01e78f73e9bab5d0955fc1a662da", - "Prims_pretyping_f537159ed795b314b4e58c260361ae86", - "Pulse.Prover.Common_interpretation_Tm_arrow_26f4c22230d9f6eb4398f15eb6b19107", - "Pulse.Prover.Common_interpretation_Tm_arrow_9124c696f71ff74911a7e2710379a493", - "Pulse.Prover.Common_interpretation_Tm_arrow_b56b2318ef4cfbf8b19082b98e3b0c47", - "Pulse.Syntax.Base_pretyping_fe09dc1e796799f4bac0760e63f30d40", - "bool_typing", "data_elim_FStar.Tactics.Result.Success", - "equation_Pulse.Syntax.Base.range", - "equation_Pulse.Syntax.Base.tm_star", - "equation_Pulse.Typing.Env.env_extends", - "equation_Pulse.Typing.Env.extends_with", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "interpretation_Tm_abs_2569042949e68e65b05f1fcb51c2593b", - "interpretation_Tm_abs_35addbe3a9c6ea5c3291e366c0bf151b", - "kinding_FStar.Pervasives.dtuple4@tok", - "kinding_Pulse.Syntax.Base.ppname@tok", - "lemma_FStar.Pervasives.invertOption", - "lemma_Pulse.Syntax.Base.range_singleton", - "lemma_Pulse.Typing.Env.env_extends_refl", - "lemma_Pulse.Typing.Env.env_extends_trans", - "proj_equation_Pulse.Syntax.Base.Mkterm_range", - "proj_equation_Pulse.Syntax.Base.Mkterm_t", - "refinement_interpretation_Tm_refine_1474292636f37e2d80cf2022596f45af", - "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", - "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", - "typing_Pulse.RuntimeUtils.union_ranges", - "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", - "typing_Pulse.Syntax.Base.ppname_default", - "typing_Tm_abs_2569042949e68e65b05f1fcb51c2593b", - "typing_Tm_abs_35addbe3a9c6ea5c3291e366c0bf151b", - "typing_Tm_abs_385ccdcb80169781e0c76efb7f3eeb56" - ], - 0, - "f28720e7895112bb3a896af3a0a17c48" - ], - [ - "Pulse.Prover.Common.add_elims_aux", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "lemma_Pulse.Typing.Env.env_extends_refl" - ], - 0, - "c5ec11d25ade7a88995e833726958be3" - ], - [ - "Pulse.Prover.Common.add_elims", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "lemma_Pulse.Typing.Env.env_extends_trans", - "refinement_interpretation_Tm_refine_1474292636f37e2d80cf2022596f45af" - ], - 0, - "b021e778e6451a29060afd8bcbc086e2" - ], - [ - "Pulse.Prover.Common.prover_state", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", - "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", - "refinement_interpretation_Tm_refine_ffb53b91ee7afecaaf420155b35aadbf", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.dom" - ], - 0, - "c6f5db432cb4b243faaee110f0b12104" - ], - [ - "Pulse.Prover.Common.__proj__Mkprover_state__item__goals_inv", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", - "proj_equation_Pulse.Prover.Common.Mkprover_state_pg", - "proj_equation_Pulse.Prover.Common.Mkprover_state_uvs", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_d75d8936e6500ecc775a054d1682296c", - "refinement_interpretation_Tm_refine_ffb53b91ee7afecaaf420155b35aadbf", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__pg", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__uvs", - "typing_Pulse.Typing.Env.dom" - ], - 0, - "1daae2acb35c5d7674eba86ebc189725" - ], - [ - "Pulse.Prover.Common.__proj__Mkprover_state__item__goals_inv", - 2, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "data_elim_Pulse.Prover.Common.Mkprover_state", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.env_extends", - "equation_Pulse.Typing.Env.extends_with", - "fuel_guarded_inversion_Pulse.Prover.Common.prover_state", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", - "lemma_Pulse.Typing.Env.push_env_as_map", - "primitive_Prims.op_AmpAmp", - "proj_equation_Pulse.Prover.Common.Mkprover_state_pg", - "proj_equation_Pulse.Prover.Common.Mkprover_state_uvs", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_d75d8936e6500ecc775a054d1682296c", - "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", - "refinement_interpretation_Tm_refine_ffb53b91ee7afecaaf420155b35aadbf", - "typing_FStar.Map.concat", "typing_FStar.Map.domain", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Prover.Common.__proj__Mkpreamble__item__g0", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__pg", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__uvs", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "2acb57e958d76ad1b24a8cac552d3608" - ], - [ - "Pulse.Prover.Common.__proj__Mkprover_state__item__solved_inv", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", - "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" - ], - 0, - "d8c297f3cfd44b233d5342e547e9b02c" - ], - [ - "Pulse.Prover.Common.__proj__Mkprover_state__item__solved_inv", - 2, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", - "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" - ], - 0, - "61373f734f329a16d4bb544722a083d9" - ], - [ - "Pulse.Prover.Common.extend_post_hint_opt_g", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "constructor_distinct_FStar.Pervasives.Native.None", - "disc_equation_FStar.Pervasives.Native.None", - "equation_Pulse.Typing.Env.env_extends", - "equation_Pulse.Typing.Env.extends_with", - "equation_Pulse.Typing.post_hint_for_env_p", - "equation_Pulse.Typing.post_hint_opt", - "kinding_Pulse.Typing.post_hint_t@tok", - "lemma_FStar.Pervasives.invertOption", - "lemma_Pulse.Typing.Env.env_extends_trans", - "proj_equation_FStar.Pervasives.Native.Some_v", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Native.None_a", - "projection_inverse_FStar.Pervasives.Native.Some_v", - "refinement_interpretation_Tm_refine_7ad5682d990eaec6510764d663af54de", - "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", - "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g" - ], - 0, - "567184864ff95d0443022c5c9eed5061" - ], - [ - "Pulse.Prover.Common.st_typing_subst", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.dom" - ], - 0, - "9617b9af215909e8fccb193d8c4be40d" - ], - [ - "Pulse.Prover.Common.st_typing_subst", - 2, - 2, - 1, - [ - "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_FStar.List.Tot.Base.append.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.well_typed_nt_substs.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.well_typed_nt_substs.fuel_instrumented", - "@query", "bool_inversion", "constructor_distinct_Prims.Nil", - "data_elim_FStar.Tactics.Result.Success", - "equation_FStar.List.Tot.Base.op_At", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Prover.Substs.nt_subst_env", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.binding", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.env_bindings", - "equation_Pulse.Typing.Env.equal", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "equation_with_fuel_FStar.List.Tot.Base.append.fuel_instrumented", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", - "function_token_typing_Pulse.Typing.Env.binding", - "lemma_FStar.Pervasives.invertOption", - "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", - "lemma_Pulse.Prover.Substs.ss_nt_subst", - "lemma_Pulse.Typing.Env.equal_elim", - "lemma_Pulse.Typing.Env.mk_env_bs", - "lemma_Pulse.Typing.Env.mk_env_dom", - "lemma_Pulse.Typing.Env.push_env_bindings", - "lemma_Pulse.Typing.Env.push_env_fstar_env", - "primitive_Prims.op_AmpAmp", "projection_inverse_BoxBool_proj_0", - "projection_inverse_Prims.Nil_a", - "refinement_interpretation_Tm_refine_172ecd41f58afcb96d3826e084dce400", - "refinement_interpretation_Tm_refine_30687c6bbf76a4ea67eae131536eafd7", - "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", - "refinement_interpretation_Tm_refine_5d038f4dc57ccd0fa38b48276342c675", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", - "refinement_kinding_Tm_refine_172ecd41f58afcb96d3826e084dce400", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Prover.Substs.nt_subst_env", - "typing_Pulse.Typing.Env.bindings", "typing_Pulse.Typing.Env.dom", - "typing_Pulse.Typing.Env.fstar_env", "typing_Pulse.Typing.Env.mk_env" - ], - 0, - "5ef229b8eff2d08260ce4609d377fbba" - ], - [ - "Pulse.Prover.Common.st_typing_weakening", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.equal", - "equation_Pulse.Typing.Env.extends_with", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "lemma_FStar.Map.lemma_InDomConcat", - "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", - "lemma_Pulse.Typing.Env.push_env_as_map", - "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_dd3396f06b5a01f3df9ed905e57d2aab", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "e8b491364c8a354d49ef4bc465ce0372" - ], - [ - "Pulse.Prover.Common.st_typing_weakening_end", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.env_extends", - "equation_Pulse.Typing.Env.extends_with", - "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_dd3396f06b5a01f3df9ed905e57d2aab", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.dom" - ], - 0, - "a198c531ea4e906c996ef8f8d36db44f" - ], - [ - "Pulse.Prover.Common.veq_weakening", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.equal", - "equation_Pulse.Typing.Env.extends_with", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "lemma_FStar.Map.lemma_InDomConcat", - "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", - "lemma_Pulse.Typing.Env.push_env_as_map", - "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_dd3396f06b5a01f3df9ed905e57d2aab", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "3032b7464233048f88b6960b920d2459" - ], - [ - "Pulse.Prover.Common.ss_extends", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Prover.Substs.contains", - "equation_Pulse.Prover.Substs.dom", "equation_Pulse.Syntax.Base.var", - "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", "lemma_FStar.Set.subset_mem", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "typing_FStar.Reflection.V2.Data.var", - "typing_Pulse.Prover.Substs.as_map", "typing_Pulse.Prover.Substs.dom" - ], - 0, - "f49b1a51faf390e752d3ad77efd7d53d" - ] - ] -] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Prover.Common.fsti b/lib/steel/pulse/Pulse.Prover.Common.fsti deleted file mode 100644 index 7e869f41d..000000000 --- a/lib/steel/pulse/Pulse.Prover.Common.fsti +++ /dev/null @@ -1,186 +0,0 @@ -module Pulse.Prover.Common - -module T = FStar.Tactics - -open Pulse.Syntax -open Pulse.Typing -open Pulse.Checker.Common -open Pulse.Typing.Metatheory -open Pulse.Checker.VPropEquiv - -module T = FStar.Tactics.V2 - -module PS = Pulse.Prover.Substs - -let vprop_typing (g:env) (t:term) = tot_typing g t tm_vprop - -type continuation_elaborator - (g:env) (ctxt:term) - (g':env) (ctxt':term) = - post_hint:post_hint_opt g -> - checker_result_t g' ctxt' post_hint -> - T.Tac (checker_result_t g ctxt post_hint) - -val k_elab_unit (g:env) (ctxt:term) - : continuation_elaborator g ctxt g ctxt - -val k_elab_trans (#g0 #g1 #g2:env) (#ctxt0 #ctxt1 #ctxt2:term) - (k0:continuation_elaborator g0 ctxt0 g1 ctxt1) - (k1:continuation_elaborator g1 ctxt1 g2 ctxt2 { g1 `env_extends` g0}) - : continuation_elaborator g0 ctxt0 g2 ctxt2 - -val k_elab_equiv (#g1 #g2:env) (#ctxt1 #ctxt1' #ctxt2 #ctxt2':term) - (k:continuation_elaborator g1 ctxt1 g2 ctxt2) - (d1:vprop_equiv g1 ctxt1 ctxt1') - (d2:vprop_equiv g2 ctxt2 ctxt2') - : continuation_elaborator g1 ctxt1' g2 ctxt2' - -// -// A canonical continuation elaborator for Bind -// -val continuation_elaborator_with_bind (#g:env) (ctxt:term) - (#c1:comp{stateful_comp c1}) - (#e1:st_term) - (e1_typing:st_typing g e1 c1) - (ctxt_pre1_typing:tot_typing g (tm_star ctxt (comp_pre c1)) tm_vprop) - (x:var { None? (lookup g x) }) - : T.Tac (continuation_elaborator - g (tm_star ctxt (comp_pre c1)) - (push_binding g x ppname_default (comp_res c1)) (tm_star (open_term (comp_post c1) x) ctxt)) - - - -// -// Scaffolding for adding elims -// -// Given a function f : vprop -> T.Tac bool that decides whether a vprop -// should be elim-ed, -// and an mk function to create the elim term, comp, and typing, -// add_elims will create a continuation_elaborator -// - -type mk_t = - #g:env -> - #v:vprop -> - tot_typing g v tm_vprop -> - T.Tac (option (x:ppname & - t:st_term & - c:comp { stateful_comp c /\ comp_pre c == v } & - st_typing g t c)) - -val add_elims (#g:env) (#ctxt:term) (#frame:term) - (f:vprop -> T.Tac bool) - (mk:mk_t) - (ctxt_typing:tot_typing g (tm_star ctxt frame) tm_vprop) - (uvs:env { disjoint uvs g }) - : T.Tac (g':env { env_extends g' g /\ disjoint uvs g' } & - ctxt':term & - tot_typing g' (tm_star ctxt' frame) tm_vprop & - continuation_elaborator g (tm_star ctxt frame) g' (tm_star ctxt' frame)) - -noeq type preamble = { - g0 : env; - - ctxt : vprop; - frame : vprop; - ctxt_frame_typing : vprop_typing g0 (tm_star ctxt frame); - - goals : vprop; -} - -let op_Array_Access (ss:PS.ss_t) (t:term) = - PS.ss_term t ss - -let op_Star = tm_star - -noeq type prover_state (preamble:preamble) = { - pg : g:env { g `env_extends` preamble.g0 }; - - remaining_ctxt : list vprop; - remaining_ctxt_frame_typing : vprop_typing pg (list_as_vprop remaining_ctxt * preamble.frame); - - uvs : uvs:env { disjoint uvs pg }; - ss : PS.ss_t; - - solved : vprop; - unsolved : list vprop; - - k : continuation_elaborator preamble.g0 (preamble.ctxt * preamble.frame) - pg ((list_as_vprop remaining_ctxt * preamble.frame) * ss.(solved)); - - goals_inv : vprop_equiv (push_env pg uvs) preamble.goals (list_as_vprop unsolved * solved); - solved_inv : squash (freevars ss.(solved) `Set.subset` dom pg); -} - -let is_terminal (#preamble:_) (st:prover_state preamble) = - st.unsolved == [] - -irreducible -let extend_post_hint_opt_g (g:env) (post_hint:post_hint_opt g) (g1:env { g1 `env_extends` g }) - : p:post_hint_opt g1 { p == post_hint } = - match post_hint with - | None -> None - | Some post_hint -> - assert (g `env_extends` post_hint.g); - assert (g1 `env_extends` g); - assert (g1 `env_extends` post_hint.g); - Some post_hint - -let st_typing_subst (g:env) (uvs:env { disjoint uvs g }) (t:st_term) (c:comp_st) - (d:st_typing (push_env g uvs) t c) - (ss:PS.ss_t) - - : T.Tac (option (st_typing g (PS.ss_st_term t ss) (PS.ss_comp c ss))) = - - let nts_opt = PS.ss_to_nt_substs g uvs ss in - match nts_opt with - | None -> None - | Some nts -> - let g' = mk_env (fstar_env g) in - assert (equal (push_env uvs g') uvs); - let d = PS.st_typing_nt_substs g uvs g' d nts in - assume (equal (push_env g (PS.nt_subst_env g' nts)) g); - Some d - -let st_typing_weakening - (g:env) (g':env { disjoint g g' }) - (t:st_term) (c:comp) (d:st_typing (push_env g g') t c) - (g1:env { g1 `env_extends` g /\ disjoint g1 g' }) - : st_typing (push_env g1 g') t c = - - let g2 = diff g1 g in - let d = st_typing_weakening g g' t c d g2 in - assert (equal (push_env (push_env g g2) g') (push_env g1 g')); - d - -let st_typing_weakening_end - (g:env) (g':env { disjoint g g' }) - (t:st_term) (c:comp) (d:st_typing (push_env g g') t c) - (g'':env { g'' `env_extends` g' /\ disjoint g'' g }) - : st_typing (push_env g g'') t c = admit () - -let veq_weakening - (g:env) (g':env { disjoint g g' }) - (#v1 #v2:vprop) (d:vprop_equiv (push_env g g') v1 v2) - (g1:env { g1 `env_extends` g /\ disjoint g1 g' }) - : vprop_equiv (push_env g1 g') v1 v2 = - - let g2 = diff g1 g in - let d = veq_weakening g g' d g2 in - assert (equal (push_env (push_env g g2) g') (push_env g1 g')); - d - -let ss_extends (ss1 ss2:PS.ss_t) = - Set.subset (PS.dom ss2) (PS.dom ss1) /\ - (forall (x:var). PS.contains ss2 x ==> PS.sel ss1 x == PS.sel ss2 x) - -let pst_extends (#preamble:_) (pst1 pst2:prover_state preamble) = - pst1.pg `env_extends` pst2.pg /\ - pst1.uvs `env_extends` pst2.uvs /\ - pst1.ss `ss_extends` pst2.ss - -type prover_t = - #preamble:_ -> - pst1:prover_state preamble -> - T.Tac (pst2:prover_state preamble { pst2 `pst_extends` pst1 /\ - is_terminal pst2 }) diff --git a/lib/steel/pulse/Pulse.Prover.Common.fsti.hints b/lib/steel/pulse/Pulse.Prover.Common.fsti.hints deleted file mode 100644 index 5effbc071..000000000 --- a/lib/steel/pulse/Pulse.Prover.Common.fsti.hints +++ /dev/null @@ -1,370 +0,0 @@ -[ - "ReHY#", - [ - [ - "Pulse.Prover.Common.continuation_elaborator_with_bind", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "disc_equation_FStar.Pervasives.Native.None", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_f2631f1e9df7e7fe731df0b4c6310657", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "a3e2c62b500adb5f15fdd6b983218f85" - ], - [ - "Pulse.Prover.Common.prover_state", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", - "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", - "refinement_interpretation_Tm_refine_ffb53b91ee7afecaaf420155b35aadbf", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.dom" - ], - 0, - "5dd748135757879fc7f3cebbb389ef47" - ], - [ - "Pulse.Prover.Common.__proj__Mkprover_state__item__goals_inv", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", - "proj_equation_Pulse.Prover.Common.Mkprover_state_pg", - "proj_equation_Pulse.Prover.Common.Mkprover_state_uvs", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_d75d8936e6500ecc775a054d1682296c", - "refinement_interpretation_Tm_refine_ffb53b91ee7afecaaf420155b35aadbf", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__pg", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__uvs", - "typing_Pulse.Typing.Env.dom" - ], - 0, - "0230561e1793baa0652c201a30e62348" - ], - [ - "Pulse.Prover.Common.__proj__Mkprover_state__item__goals_inv", - 2, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "data_elim_Pulse.Prover.Common.Mkprover_state", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.env_extends", - "equation_Pulse.Typing.Env.extends_with", - "fuel_guarded_inversion_Pulse.Prover.Common.prover_state", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", - "lemma_Pulse.Typing.Env.push_env_as_map", - "primitive_Prims.op_AmpAmp", - "proj_equation_Pulse.Prover.Common.Mkprover_state_pg", - "proj_equation_Pulse.Prover.Common.Mkprover_state_uvs", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_d75d8936e6500ecc775a054d1682296c", - "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", - "refinement_interpretation_Tm_refine_ffb53b91ee7afecaaf420155b35aadbf", - "typing_FStar.Map.concat", "typing_FStar.Map.domain", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Prover.Common.__proj__Mkpreamble__item__g0", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__pg", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__uvs", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "2acb57e958d76ad1b24a8cac552d3608" - ], - [ - "Pulse.Prover.Common.__proj__Mkprover_state__item__solved_inv", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", - "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" - ], - 0, - "d8c297f3cfd44b233d5342e547e9b02c" - ], - [ - "Pulse.Prover.Common.__proj__Mkprover_state__item__solved_inv", - 2, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", - "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" - ], - 0, - "61373f734f329a16d4bb544722a083d9" - ], - [ - "Pulse.Prover.Common.extend_post_hint_opt_g", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "constructor_distinct_FStar.Pervasives.Native.None", - "disc_equation_FStar.Pervasives.Native.None", - "equation_Pulse.Typing.Env.env_extends", - "equation_Pulse.Typing.Env.extends_with", - "equation_Pulse.Typing.post_hint_for_env_p", - "equation_Pulse.Typing.post_hint_opt", - "kinding_Pulse.Typing.post_hint_t@tok", - "lemma_FStar.Pervasives.invertOption", - "lemma_Pulse.Typing.Env.env_extends_trans", - "proj_equation_FStar.Pervasives.Native.Some_v", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Native.None_a", - "projection_inverse_FStar.Pervasives.Native.Some_v", - "refinement_interpretation_Tm_refine_7ad5682d990eaec6510764d663af54de", - "refinement_interpretation_Tm_refine_ba488b4f12660f6fd23fa65ec4b4a4ff", - "typing_Pulse.Typing.__proj__Mkpost_hint_t__item__g" - ], - 0, - "567184864ff95d0443022c5c9eed5061" - ], - [ - "Pulse.Prover.Common.st_typing_subst", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.dom" - ], - 0, - "9617b9af215909e8fccb193d8c4be40d" - ], - [ - "Pulse.Prover.Common.st_typing_subst", - 2, - 2, - 1, - [ - "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_FStar.List.Tot.Base.append.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.Substs.well_typed_nt_substs.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.well_typed_nt_substs.fuel_instrumented", - "@query", "bool_inversion", "constructor_distinct_Prims.Nil", - "data_elim_FStar.Tactics.Result.Success", - "equation_FStar.List.Tot.Base.op_At", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Prover.Substs.nt_subst_env", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.binding", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.env_bindings", - "equation_Pulse.Typing.Env.equal", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "equation_with_fuel_FStar.List.Tot.Base.append.fuel_instrumented", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", - "function_token_typing_Pulse.Typing.Env.binding", - "lemma_FStar.Pervasives.invertOption", - "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", - "lemma_Pulse.Prover.Substs.ss_nt_subst", - "lemma_Pulse.Typing.Env.equal_elim", - "lemma_Pulse.Typing.Env.mk_env_bs", - "lemma_Pulse.Typing.Env.mk_env_dom", - "lemma_Pulse.Typing.Env.push_env_bindings", - "lemma_Pulse.Typing.Env.push_env_fstar_env", - "primitive_Prims.op_AmpAmp", "projection_inverse_BoxBool_proj_0", - "projection_inverse_Prims.Nil_a", - "refinement_interpretation_Tm_refine_172ecd41f58afcb96d3826e084dce400", - "refinement_interpretation_Tm_refine_30687c6bbf76a4ea67eae131536eafd7", - "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", - "refinement_interpretation_Tm_refine_5d038f4dc57ccd0fa38b48276342c675", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", - "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", - "refinement_kinding_Tm_refine_172ecd41f58afcb96d3826e084dce400", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Prover.Substs.nt_subst_env", - "typing_Pulse.Typing.Env.bindings", "typing_Pulse.Typing.Env.dom", - "typing_Pulse.Typing.Env.fstar_env", "typing_Pulse.Typing.Env.mk_env" - ], - 0, - "5ef229b8eff2d08260ce4609d377fbba" - ], - [ - "Pulse.Prover.Common.st_typing_weakening", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.equal", - "equation_Pulse.Typing.Env.extends_with", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "lemma_FStar.Map.lemma_InDomConcat", - "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", - "lemma_Pulse.Typing.Env.push_env_as_map", - "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_dd3396f06b5a01f3df9ed905e57d2aab", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "e8b491364c8a354d49ef4bc465ce0372" - ], - [ - "Pulse.Prover.Common.st_typing_weakening_end", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.env_extends", - "equation_Pulse.Typing.Env.extends_with", - "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_dd3396f06b5a01f3df9ed905e57d2aab", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.dom" - ], - 0, - "a198c531ea4e906c996ef8f8d36db44f" - ], - [ - "Pulse.Prover.Common.veq_weakening", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.equal", - "equation_Pulse.Typing.Env.extends_with", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "lemma_FStar.Map.lemma_InDomConcat", - "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", - "lemma_Pulse.Typing.Env.push_env_as_map", - "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_dd3396f06b5a01f3df9ed905e57d2aab", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "3032b7464233048f88b6960b920d2459" - ], - [ - "Pulse.Prover.Common.ss_extends", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Prover.Substs.contains", - "equation_Pulse.Prover.Substs.dom", "equation_Pulse.Syntax.Base.var", - "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", "lemma_FStar.Set.subset_mem", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "typing_FStar.Reflection.V2.Data.var", - "typing_Pulse.Prover.Substs.as_map", "typing_Pulse.Prover.Substs.dom" - ], - 0, - "f49b1a51faf390e752d3ad77efd7d53d" - ] - ] -] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Prover.ElimExists.fsti.hints b/lib/steel/pulse/Pulse.Prover.ElimExists.fsti.hints deleted file mode 100644 index 28f2a2f6e..000000000 --- a/lib/steel/pulse/Pulse.Prover.ElimExists.fsti.hints +++ /dev/null @@ -1 +0,0 @@ -[ "P\u0018.~r\u001a", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Prover.ElimPure.fsti.hints b/lib/steel/pulse/Pulse.Prover.ElimPure.fsti.hints deleted file mode 100644 index 596096635..000000000 --- a/lib/steel/pulse/Pulse.Prover.ElimPure.fsti.hints +++ /dev/null @@ -1 +0,0 @@ -[ "2}\u0018S0^4\u0012\u0012", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Prover.IntroExists.fsti.hints b/lib/steel/pulse/Pulse.Prover.IntroExists.fsti.hints deleted file mode 100644 index 37b82d992..000000000 --- a/lib/steel/pulse/Pulse.Prover.IntroExists.fsti.hints +++ /dev/null @@ -1 +0,0 @@ -[ "4g\u0006n\"F,I", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Prover.Match.fsti.hints b/lib/steel/pulse/Pulse.Prover.Match.fsti.hints deleted file mode 100644 index a91b009f4..000000000 --- a/lib/steel/pulse/Pulse.Prover.Match.fsti.hints +++ /dev/null @@ -1 +0,0 @@ -[ "+vf\u0013\u0004fxc\u0011", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Prover.fst b/lib/steel/pulse/Pulse.Prover.fst deleted file mode 100644 index bcde610f5..000000000 --- a/lib/steel/pulse/Pulse.Prover.fst +++ /dev/null @@ -1,163 +0,0 @@ -module Pulse.Prover - -open FStar.List.Tot - -open Pulse.Syntax -open Pulse.Typing -open Pulse.Checker.Common -open Pulse.Typing.Metatheory -open Pulse.Checker.VPropEquiv -open Pulse.Prover.Common - -module ElimExists = Pulse.Prover.ElimExists -module ElimPure = Pulse.Prover.ElimPure -module Match = Pulse.Prover.Match -module IntroExists = Pulse.Prover.IntroExists - -module T = FStar.Tactics.V2 - -module PS = Pulse.Prover.Substs - -let unsolved_equiv_pst (#preamble:_) (pst:prover_state preamble) (unsolved':list vprop) - (d:vprop_equiv (push_env pst.pg pst.uvs) (list_as_vprop pst.unsolved) (list_as_vprop unsolved')) - : prover_state preamble = - { pst with unsolved = unsolved'; goals_inv = magic () } - -let remaining_ctxt_equiv_pst (#preamble:_) (pst:prover_state preamble) (remaining_ctxt':list vprop) - (d:vprop_equiv pst.pg (list_as_vprop pst.remaining_ctxt) (list_as_vprop remaining_ctxt')) - : prover_state preamble = - { pst with remaining_ctxt = remaining_ctxt'; - remaining_ctxt_frame_typing = magic (); - k = k_elab_equiv pst.k (VE_Refl _ _) (magic ()) } - -let rec collect_exists (g:env) (l:list vprop) - : exs:list vprop & - rest:list vprop & - vprop_equiv g (list_as_vprop l) (list_as_vprop (exs @ rest)) = - - match l with - | [] -> (| [], [], VE_Refl _ _ |) - | hd::tl -> - let (| exs, rest, _ |) = collect_exists g tl in - match hd.t with - | Tm_ExistsSL _ _ _ -> (| hd::exs, rest, magic () |) - | _ -> (| exs, hd::rest, magic () |) - -let rec collect_pures (g:env) (l:list vprop) - : pures:list vprop & - rest:list vprop & - vprop_equiv g (list_as_vprop l) (list_as_vprop (rest @ pures)) = - - match l with - | [] -> (| [], [], VE_Refl _ _ |) - | hd::tl -> - let (| pures, rest, _ |) = collect_pures g tl in - match hd.t with - | Tm_Pure _ -> (| hd::pures, rest, magic () |) - | _ -> (| pures, hd::rest, magic () |) - - -module L = FStar.List.Tot -let move_hd_end (g:env) (l:list vprop { Cons? l }) - : vprop_equiv g (list_as_vprop l) (list_as_vprop (L.tl l @ [L.hd l])) = magic () - -let rec match_q (#preamble:_) (pst:prover_state preamble) - (q:vprop) (unsolved':list vprop) - (_:squash (pst.unsolved == q::unsolved')) - (i:nat) - : T.Tac (option (pst':prover_state preamble { pst' `pst_extends` pst })) = - - if L.length pst.remaining_ctxt = 0 - then None - else if i = L.length pst.remaining_ctxt - then None - else - let p = L.hd pst.remaining_ctxt in - let pst_opt = - Match.match_step pst p (L.tl pst.remaining_ctxt) q unsolved' () in - match pst_opt with - | Some pst -> Some pst - | None -> - let pst = - remaining_ctxt_equiv_pst pst (L.tl pst.remaining_ctxt @ [L.hd pst.remaining_ctxt]) - (move_hd_end pst.pg pst.remaining_ctxt) in - match_q pst q unsolved' () (i+1) - -let rec prover - (#preamble:_) - (pst0:prover_state preamble) - : T.Tac (pst':prover_state preamble { pst' `pst_extends` pst0 /\ - is_terminal pst' }) = - - match pst0.unsolved with - | [] -> pst0 - | _ -> - let pst = ElimExists.elim_exists_pst pst0 in - let pst = ElimPure.elim_pure_pst pst in - - let (| exs, rest, d |) = collect_exists (push_env pst.pg pst.uvs) pst.unsolved in - let pst = unsolved_equiv_pst pst (exs@rest) d in - - match pst.unsolved with - | {t=Tm_ExistsSL u b body}::unsolved' -> - IntroExists.intro_exists pst u b body unsolved' () prover - | _ -> - let (| pures, rest, d |) = collect_pures (push_env pst.pg pst.uvs) pst.unsolved in - let pst = unsolved_equiv_pst pst (rest@pures) d in - match pst.unsolved with - | {t=Tm_Pure _}::tl -> fail pst.pg None "intro pure not implemented yet" // only pures left - | q::tl -> - let pst_opt = match_q pst q tl () 0 in - match pst_opt with - | None -> fail pst.pg None "cannot match a vprop" - | Some pst -> prover pst // a little wasteful? - -#push-options "--z3rlimit_factor 4" -let prove - (#g:env) (#ctxt:vprop) (ctxt_typing:vprop_typing g ctxt) - (uvs:env { disjoint g uvs }) - (#goals:vprop) (goals_typing:vprop_typing (push_env g uvs) goals) - - : T.Tac (g1 : env { g1 `env_extends` g } & - uvs1 : env { uvs1 `env_extends` uvs /\ disjoint uvs1 g1 } & - nts1 : PS.nt_substs { PS.well_typed_nt_substs g1 uvs1 nts1 } & - remaining_ctxt : vprop & - continuation_elaborator g ctxt g1 ((PS.nt_subst_term goals nts1) * remaining_ctxt)) = - - let ctxt_frame_typing : vprop_typing g (ctxt * tm_emp) = magic () in - let preamble = { - g0 = g; - ctxt; - frame = tm_emp; - ctxt_frame_typing; - goals; - } in - assume (list_as_vprop (vprop_as_list ctxt) == ctxt); - assume ((PS.empty).(tm_emp) == tm_emp); - let pst : prover_state preamble = { - pg = g; - remaining_ctxt = vprop_as_list ctxt; - remaining_ctxt_frame_typing = ctxt_frame_typing; - uvs = uvs; - ss = PS.empty; - solved = tm_emp; - unsolved = vprop_as_list goals; - k = k_elab_equiv (k_elab_unit g ctxt) (magic ()) (magic ()); - goals_inv = magic (); - solved_inv = () - } in - let pst = prover pst in - let ropt = PS.ss_to_nt_substs pst.pg pst.uvs pst.ss in - if None? ropt then fail pst.pg None "prove: ss not well-typed"; - let Some nts = ropt in - let k - : continuation_elaborator - g (ctxt * tm_emp) - pst.pg ((list_as_vprop pst.remaining_ctxt * tm_emp) * (PS.nt_subst_term pst.solved nts)) = pst.k in - let goals_inv - : vprop_equiv (push_env pst.pg pst.uvs) goals (list_as_vprop [] * pst.solved) = pst.goals_inv in - let goals_inv - : vprop_equiv pst.pg (PS.nt_subst_term goals nts) (PS.nt_subst_term (list_as_vprop [] * pst.solved) nts) = - PS.vprop_equiv_nt_substs_derived pst.pg pst.uvs goals_inv nts in - (| pst.pg, pst.uvs, nts, list_as_vprop pst.remaining_ctxt, k_elab_equiv k (magic ()) (magic ()) |) -#pop-options diff --git a/lib/steel/pulse/Pulse.Prover.fst.hints b/lib/steel/pulse/Pulse.Prover.fst.hints deleted file mode 100644 index 45e29a828..000000000 --- a/lib/steel/pulse/Pulse.Prover.fst.hints +++ /dev/null @@ -1,346 +0,0 @@ -[ - "B0+Ms@rZ\u001d2", - [ - [ - "Pulse.Prover.unsolved_equiv_pst", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", - "proj_equation_Pulse.Prover.Common.Mkprover_state_pg", - "proj_equation_Pulse.Prover.Common.Mkprover_state_uvs", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_d75d8936e6500ecc775a054d1682296c", - "refinement_interpretation_Tm_refine_ffb53b91ee7afecaaf420155b35aadbf", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__pg", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__uvs", - "typing_Pulse.Typing.Env.dom" - ], - 0, - "806a36d274713fd001739c1ef7c2099b" - ], - [ - "Pulse.Prover.unsolved_equiv_pst", - 2, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", - "proj_equation_Pulse.Prover.Common.Mkprover_state_pg", - "proj_equation_Pulse.Prover.Common.Mkprover_state_uvs", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_d75d8936e6500ecc775a054d1682296c", - "refinement_interpretation_Tm_refine_ffb53b91ee7afecaaf420155b35aadbf", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__pg", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__uvs", - "typing_Pulse.Typing.Env.dom" - ], - 0, - "54ef0133892697cefc6b2d97f9b97c92" - ], - [ - "Pulse.Prover.collect_exists", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "binder_x_dde2ec1e863a0bcde2ea8594cff3d454_1", - "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", - "equation_Prims.op_Equals_Equals_Equals", - "equation_Pulse.Syntax.Base.vprop", - "fuel_guarded_inversion_Prims.list", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.List.Tot.Properties.append_l_nil", - "projection_inverse_BoxBool_proj_0", "subterm_ordering_Prims.Cons" - ], - 0, - "3563bb17b649172f409d407f9e1cc17d" - ], - [ - "Pulse.Prover.collect_pures", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "binder_x_dde2ec1e863a0bcde2ea8594cff3d454_1", - "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", - "equation_Prims.op_Equals_Equals_Equals", - "equation_Pulse.Syntax.Base.vprop", - "fuel_guarded_inversion_Prims.list", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.List.Tot.Properties.append_l_nil", - "projection_inverse_BoxBool_proj_0", "subterm_ordering_Prims.Cons" - ], - 0, - "5ed2d25918d71f992fd581fd970e99d9" - ], - [ - "Pulse.Prover.match_q", - 1, - 2, - 1, - [ - "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_FStar.List.Tot.Base.length.fuel_instrumented", - "@query", "constructor_distinct_Tm_unit", - "data_elim_FStar.Tactics.Result.Success", - "data_elim_Pulse.Prover.Common.Mkprover_state", - "disc_equation_Prims.Cons", "equation_FStar.List.Tot.Base.hd", - "equation_FStar.List.Tot.Base.tail", - "equation_FStar.List.Tot.Base.tl", "equation_Prims.eqtype", - "equation_Prims.nat", - "equation_Pulse.Prover.remaining_ctxt_equiv_pst", - "equation_Pulse.Syntax.Base.vprop", - "equation_Pulse.Typing.Env.env_extends", - "equation_Pulse.Typing.Env.extends_with", - "equation_with_fuel_FStar.List.Tot.Base.length.fuel_instrumented", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Prims.list", - "fuel_guarded_inversion_Pulse.Prover.Common.prover_state", - "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Pervasives.invertOption", "primitive_Prims.op_Addition", - "primitive_Prims.op_Equality", - "proj_equation_Pulse.Prover.Common.Mkpreamble_g0", - "proj_equation_Pulse.Prover.Common.Mkprover_state_pg", - "proj_equation_Pulse.Prover.Common.Mkprover_state_remaining_ctxt", - "proj_equation_Pulse.Prover.Common.Mkprover_state_ss", - "proj_equation_Pulse.Prover.Common.Mkprover_state_unsolved", - "proj_equation_Pulse.Prover.Common.Mkprover_state_uvs", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_BoxInt_proj_0", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_pg", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_ss", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_unsolved", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_uvs", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_d1f40778f2bf94acaf037b4cab78e961", - "refinement_interpretation_Tm_refine_ffb53b91ee7afecaaf420155b35aadbf", - "refinement_kinding_Tm_refine_009a66b156890bf076f65b2cc2dd54a4", - "typing_FStar.List.Tot.Base.length", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__remaining_ctxt" - ], - 0, - "1cd7ca164e181dd75f6d1d80950ece51" - ], - [ - "Pulse.Prover.prover", - 1, - 2, - 1, - [ - "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_FStar.List.Tot.Base.append.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.collect_exists.fuel_instrumented", - "@fuel_correspondence_Pulse.Prover.collect_pures.fuel_instrumented", - "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", - "bool_inversion", "constructor_distinct_Prims.Cons", - "data_elim_FStar.Tactics.Result.Success", "data_elim_Prims.Cons", - "data_elim_Pulse.Prover.Common.Mkprover_state", - "disc_equation_FStar.Pervasives.Native.None", - "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", - "disc_equation_Pulse.Syntax.Base.Tm_ExistsSL", - "equation_FStar.List.Tot.Base.op_At", - "equation_FStar.Reflection.Typing.fstar_top_env", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_FStar.Set.subset", - "equation_Prims.nat", "equation_Pulse.Prover.Common.is_terminal", - "equation_Pulse.Prover.Common.pst_extends", - "equation_Pulse.Prover.Common.ss_extends", - "equation_Pulse.Prover.Substs.contains", - "equation_Pulse.Prover.Substs.dom", - "equation_Pulse.Prover.unsolved_equiv_pst", - "equation_Pulse.Syntax.Base.range", - "equation_Pulse.Syntax.Base.tm_exists_sl", - "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.env_extends", - "equation_Pulse.Typing.Env.extends_with", - "equation_with_fuel_FStar.List.Tot.Base.append.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.collect_exists.fuel_instrumented", - "equation_with_fuel_Pulse.Prover.collect_pures.fuel_instrumented", - "fuel_guarded_inversion_FStar.Pervasives.dtuple3", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Prims.list", - "fuel_guarded_inversion_Pulse.Prover.Common.prover_state", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "function_token_typing_Prims.__cache_version_number__", - "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.List.Tot.Properties.append_l_nil", - "lemma_FStar.Map.lemma_ContainsDom", - "lemma_FStar.Pervasives.invertOption", - "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", "lemma_FStar.Set.subset_mem", - "lemma_Pulse.Syntax.Base.range_singleton", - "lemma_Pulse.Typing.Env.env_extends_refl", - "lemma_Pulse.Typing.Env.env_extends_trans", - "primitive_Prims.op_AmpAmp", "proj_equation_Prims.Cons_hd", - "proj_equation_Pulse.Prover.Common.Mkpreamble_ctxt", - "proj_equation_Pulse.Prover.Common.Mkpreamble_frame", - "proj_equation_Pulse.Prover.Common.Mkpreamble_g0", - "proj_equation_Pulse.Prover.Common.Mkprover_state_pg", - "proj_equation_Pulse.Prover.Common.Mkprover_state_ss", - "proj_equation_Pulse.Prover.Common.Mkprover_state_unsolved", - "proj_equation_Pulse.Prover.Common.Mkprover_state_uvs", - "proj_equation_Pulse.Syntax.Base.Mkterm_range", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Mkdtuple3__1", - "projection_inverse_FStar.Pervasives.Mkdtuple3__2", - "projection_inverse_FStar.Pervasives.Mkdtuple3_c", - "projection_inverse_Prims.Cons_a", - "projection_inverse_Prims.Cons_hd", - "projection_inverse_Prims.Cons_tl", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_pg", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_ss", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_unsolved", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_uvs", - "refinement_interpretation_Tm_refine_054684cadbed84c2b97dd28fc908f7fb", - "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", - "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", - "refinement_interpretation_Tm_refine_997bd7d3396b4ff55821a903d7555e61", - "refinement_interpretation_Tm_refine_abf627ef196cb711185afc3a00e7c111", - "refinement_interpretation_Tm_refine_b504444f9194aea9f63af0d517b5900e", - "refinement_interpretation_Tm_refine_d75d8936e6500ecc775a054d1682296c", - "refinement_interpretation_Tm_refine_de1d02ad66483edc481b70db20a6b9af", - "refinement_interpretation_Tm_refine_ffab16ed31ea26d52e4ed3d8c2809cfe", - "refinement_interpretation_Tm_refine_ffb53b91ee7afecaaf420155b35aadbf", - "refinement_kinding_Tm_refine_997bd7d3396b4ff55821a903d7555e61", - "string_typing", "typing_FStar.Reflection.V2.Data.var", - "typing_FStar.Set.empty", "typing_FStar.Set.intersect", - "typing_FStar.Set.mem", - "typing_Pulse.Prover.Common.__proj__Mkpreamble__item__ctxt", - "typing_Pulse.Prover.Common.__proj__Mkpreamble__item__frame", - "typing_Pulse.Prover.Common.__proj__Mkpreamble__item__g0", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__pg", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__ss", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__uvs", - "typing_Pulse.Prover.Substs.as_map", - "typing_Pulse.Prover.Substs.dom", - "typing_Pulse.Prover.collect_exists", - "typing_Pulse.Prover.collect_pures", - "typing_Pulse.RuntimeUtils.union_ranges", - "typing_Pulse.Syntax.Base.__proj__Mkbinder__item__binder_ty", - "typing_Pulse.Syntax.Base.__proj__Mkterm__item__range", - "typing_Pulse.Typing.Env.dom", "typing_Pulse.Typing.Env.fstar_env", - "typing_Pulse.Typing.Env.push_env" - ], - 0, - "71dc4a81d858e3fc3ae0765e2ed544c0" - ], - [ - "Pulse.Prover.prove", - 1, - 2, - 1, - [ - "@MaxFuel_assumption", "@MaxIFuel_assumption", - "@fuel_correspondence_Pulse.Prover.Substs.well_typed_nt_substs.fuel_instrumented", - "@fuel_correspondence_Pulse.Syntax.Naming.freevars.fuel_instrumented", - "@fuel_irrelevance_Pulse.Prover.Substs.well_typed_nt_substs.fuel_instrumented", - "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "constructor_distinct_FStar.Tactics.Result.Failed", - "constructor_distinct_FStar.Tactics.Result.Success", - "constructor_distinct_Pulse.Syntax.Base.Tm_Emp", - "data_elim_FStar.Tactics.Result.Success", - "data_typing_intro_Pulse.Prover.Common.Mkpreamble@tok", - "disc_equation_FStar.Pervasives.Native.None", - "equality_tok_Pulse.Syntax.Base.Tm_Emp@tok", - "equation_FStar.Reflection.Typing.fstar_top_env", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_FStar.Set.subset", - "equation_Prims.nat", "equation_Pulse.Prover.Common.is_terminal", - "equation_Pulse.Prover.Common.op_Array_Access", - "equation_Pulse.Prover.Common.op_Star", - "equation_Pulse.Prover.Common.pst_extends", - "equation_Pulse.Syntax.Base.tm_emp", - "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Base.vprop", - "equation_Pulse.Syntax.Base.with_range", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", - "equation_with_fuel_Pulse.Syntax.Naming.freevars.fuel_instrumented", - "fuel_guarded_inversion_FStar.Tactics.Result.__result", - "fuel_guarded_inversion_Pulse.Prover.Common.prover_state", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "function_token_typing_Prims.__cache_version_number__", - "int_inversion", "lemma_FStar.Pervasives.invertOption", - "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", - "lemma_Pulse.Prover.Substs.ss_nt_subst", - "lemma_Pulse.Typing.Env.env_extends_refl", - "primitive_Prims.op_AmpAmp", - "proj_equation_Pulse.Prover.Common.Mkpreamble_ctxt", - "proj_equation_Pulse.Prover.Common.Mkpreamble_frame", - "proj_equation_Pulse.Prover.Common.Mkpreamble_g0", - "proj_equation_Pulse.Prover.Common.Mkpreamble_goals", - "proj_equation_Pulse.Prover.Common.Mkprover_state_pg", - "proj_equation_Pulse.Prover.Common.Mkprover_state_ss", - "proj_equation_Pulse.Prover.Common.Mkprover_state_uvs", - "proj_equation_Pulse.Syntax.Base.Mkterm_t", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Tactics.Result.Failed_a", - "projection_inverse_FStar.Tactics.Result.Failed_exn", - "projection_inverse_FStar.Tactics.Result.Failed_ps", - "projection_inverse_FStar.Tactics.Result.Success_a", - "projection_inverse_FStar.Tactics.Result.Success_ps", - "projection_inverse_FStar.Tactics.Result.Success_v", - "projection_inverse_Pulse.Prover.Common.Mkpreamble_ctxt", - "projection_inverse_Pulse.Prover.Common.Mkpreamble_frame", - "projection_inverse_Pulse.Prover.Common.Mkpreamble_g0", - "projection_inverse_Pulse.Prover.Common.Mkpreamble_goals", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_pg", - "projection_inverse_Pulse.Prover.Common.Mkprover_state_uvs", - "projection_inverse_Pulse.Syntax.Base.Mkterm_t", - "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", - "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", - "refinement_interpretation_Tm_refine_d75d8936e6500ecc775a054d1682296c", - "refinement_interpretation_Tm_refine_e616b0e8667723102d794f55637bdf94", - "refinement_interpretation_Tm_refine_ee61f9592eda46e48a43b4b811432b4f", - "refinement_interpretation_Tm_refine_ffb53b91ee7afecaaf420155b35aadbf", - "refinement_kinding_Tm_refine_ee61f9592eda46e48a43b4b811432b4f", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Prims.magic", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__pg", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__solved", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__ss", - "typing_Pulse.Prover.Common.__proj__Mkprover_state__item__uvs", - "typing_Pulse.Prover.Common.op_Star", - "typing_Pulse.Prover.Common.vprop_typing", - "typing_Pulse.Syntax.Base.tm_emp", - "typing_Pulse.Syntax.Naming.freevars", "typing_Pulse.Typing.Env.dom", - "typing_Pulse.Typing.Env.fstar_env", "unit_typing" - ], - 0, - "b9cdbbb3caa937904ddc17fc2f4a0e1e" - ] - ] -] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Prover.fsti b/lib/steel/pulse/Pulse.Prover.fsti deleted file mode 100644 index d9ffa7e34..000000000 --- a/lib/steel/pulse/Pulse.Prover.fsti +++ /dev/null @@ -1,20 +0,0 @@ -module Pulse.Prover - -module T = FStar.Tactics.V2 - -open Pulse.Syntax -open Pulse.Typing -open Pulse.Prover.Common - -module PS = Pulse.Prover.Substs - -val prove - (#g:env) (#ctxt:vprop) (ctxt_typing:vprop_typing g ctxt) - (uvs:env { disjoint g uvs }) - (#goals:vprop) (goals_typing:vprop_typing (push_env g uvs) goals) - - : T.Tac (g1 : env { g1 `env_extends` g } & - uvs1 : env { uvs1 `env_extends` uvs /\ disjoint uvs1 g1 } & - nts1 : PS.nt_substs { PS.well_typed_nt_substs g1 uvs1 nts1 } & - remaining_ctxt : vprop & - continuation_elaborator g ctxt g1 ((PS.nt_subst_term goals nts1) * remaining_ctxt)) diff --git a/lib/steel/pulse/Pulse.Prover.fsti.hints b/lib/steel/pulse/Pulse.Prover.fsti.hints deleted file mode 100644 index cb3125581..000000000 --- a/lib/steel/pulse/Pulse.Prover.fsti.hints +++ /dev/null @@ -1 +0,0 @@ -[ "l\u0017RzS]G$\u001a", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Readback.fst.hints b/lib/steel/pulse/Pulse.Readback.fst.hints index 1be47d974..76fd411ca 100644 --- a/lib/steel/pulse/Pulse.Readback.fst.hints +++ b/lib/steel/pulse/Pulse.Readback.fst.hints @@ -8,7 +8,7 @@ 1, [ "@query", "lemma_FStar.Pervasives.invertOption" ], 0, - "43f3f5f7535236d001d722d5f37ac1f1" + "ef583b91748e480c1f721592a02ade9a" ], [ "Pulse.Readback.try_readback_st_comp", diff --git a/lib/steel/pulse/Pulse.Soundness.Admit.fst.hints b/lib/steel/pulse/Pulse.Soundness.Admit.fst.hints index a097cd86d..457911e72 100644 --- a/lib/steel/pulse/Pulse.Soundness.Admit.fst.hints +++ b/lib/steel/pulse/Pulse.Soundness.Admit.fst.hints @@ -69,7 +69,7 @@ "typing_Pulse.Syntax.Base.tm_emp_inames" ], 0, - "831478a9835246158682a3924e7390d3" + "3dcef4d962880fc439cde719c9893fd6" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Soundness.Bind.fst.hints b/lib/steel/pulse/Pulse.Soundness.Bind.fst.hints index bdeb6f5f8..e61443a51 100644 --- a/lib/steel/pulse/Pulse.Soundness.Bind.fst.hints +++ b/lib/steel/pulse/Pulse.Soundness.Bind.fst.hints @@ -74,7 +74,7 @@ "typing_tok_FStar.Reflection.V2.Data.Q_Implicit@tok" ], 0, - "e2f7cfdd59cc26f6b89d20213705e71e" + "59366f7fe9bb57a20b171b280481f37a" ], [ "Pulse.Soundness.Bind.inst_bind_g", diff --git a/lib/steel/pulse/Pulse.Soundness.Bind.fsti.hints b/lib/steel/pulse/Pulse.Soundness.Bind.fsti.hints index d80847c11..82a09e7de 100644 --- a/lib/steel/pulse/Pulse.Soundness.Bind.fsti.hints +++ b/lib/steel/pulse/Pulse.Soundness.Bind.fsti.hints @@ -25,7 +25,7 @@ "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" ], 0, - "d7e67e22721402d0d8fcaaacf1ff1892" + "ad4a0b11486837a8f48715ffab0b67ac" ], [ "Pulse.Soundness.Bind.elab_bind_ghost_l_typing", diff --git a/lib/steel/pulse/Pulse.Soundness.Common.fst.hints b/lib/steel/pulse/Pulse.Soundness.Common.fst.hints index e854810dd..dd4eae5de 100644 --- a/lib/steel/pulse/Pulse.Soundness.Common.fst.hints +++ b/lib/steel/pulse/Pulse.Soundness.Common.fst.hints @@ -46,7 +46,7 @@ "typing_Tm_abs_9de830881eb0b7299cb605b2cfe97562" ], 0, - "73b7979500e22bcbc76323bc789e5127" + "ecb909235eb655aaa923ee6a36a914e4" ], [ "Pulse.Soundness.Common.elab_term_opt", @@ -281,6 +281,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_f327b3b66854e57c59289f8c259581e7", "typing_FStar.Map.contains", "typing_FStar.Reflection.V2.Data.var", + "typing_FStar.Set.mem", "typing_Pulse.Syntax.Naming.freevars_st", "typing_Pulse.Typing.Env.as_map" ], 0, diff --git a/lib/steel/pulse/Pulse.Soundness.Comp.fst.hints b/lib/steel/pulse/Pulse.Soundness.Comp.fst.hints index fc9348b40..2badc9083 100644 --- a/lib/steel/pulse/Pulse.Soundness.Comp.fst.hints +++ b/lib/steel/pulse/Pulse.Soundness.Comp.fst.hints @@ -144,7 +144,7 @@ "typing_tok_Pulse.Syntax.Base.Implicit@tok" ], 0, - "624cb7e21398709374450808ce065323" + "5016ee55fb33db2b3a04a22b2e3774c1" ], [ "Pulse.Soundness.Comp.comp_typing_soundness", diff --git a/lib/steel/pulse/Pulse.Soundness.Exists.fst.hints b/lib/steel/pulse/Pulse.Soundness.Exists.fst.hints index 5bdb55fd8..a1fc1a5e5 100644 --- a/lib/steel/pulse/Pulse.Soundness.Exists.fst.hints +++ b/lib/steel/pulse/Pulse.Soundness.Exists.fst.hints @@ -191,7 +191,7 @@ "typing_tok_Pulse.Syntax.Base.Implicit@tok" ], 0, - "9b414024e655c1b08284ea711f8f1eec" + "9a83b41f1b77d01187ceeded4fef0049" ], [ "Pulse.Soundness.Exists.intro_exists_soundness", diff --git a/lib/steel/pulse/Pulse.Soundness.Frame.fst.hints b/lib/steel/pulse/Pulse.Soundness.Frame.fst.hints index d0f6bc75e..9a2b83b07 100644 --- a/lib/steel/pulse/Pulse.Soundness.Frame.fst.hints +++ b/lib/steel/pulse/Pulse.Soundness.Frame.fst.hints @@ -156,7 +156,7 @@ "typing_tok_Pulse.Syntax.Base.Implicit@tok" ], 0, - "2d13809a103f27fee86919bd3a49bc0e" + "8ee89b340070db67a32320b37e9b5b1d" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Soundness.Lift.fst.hints b/lib/steel/pulse/Pulse.Soundness.Lift.fst.hints index e242723bc..46397db24 100644 --- a/lib/steel/pulse/Pulse.Soundness.Lift.fst.hints +++ b/lib/steel/pulse/Pulse.Soundness.Lift.fst.hints @@ -21,7 +21,7 @@ "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" ], 0, - "1df083daf9eb8b67020b0573edb69446" + "fdbcdad2727f9019f9e314b303ac6fad" ], [ "Pulse.Soundness.Lift.elab_lift_stt_ghost_typing", diff --git a/lib/steel/pulse/Pulse.Soundness.Lift.fsti.hints b/lib/steel/pulse/Pulse.Soundness.Lift.fsti.hints index cf5e1b745..6ff1c86e9 100644 --- a/lib/steel/pulse/Pulse.Soundness.Lift.fsti.hints +++ b/lib/steel/pulse/Pulse.Soundness.Lift.fsti.hints @@ -21,7 +21,7 @@ "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" ], 0, - "5dc08551a6e37f3c3cb5a7a7918567a7" + "1e275de111e232d65264e7f87dad0009" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Soundness.Match.fst.hints b/lib/steel/pulse/Pulse.Soundness.Match.fst.hints index 11b52b73d..7a4b33bd6 100644 --- a/lib/steel/pulse/Pulse.Soundness.Match.fst.hints +++ b/lib/steel/pulse/Pulse.Soundness.Match.fst.hints @@ -15,7 +15,7 @@ "projection_inverse_Pulse.Typing.PC_Elab_sc_ty" ], 0, - "ec6adcc626c8813d00de8f75ba022897" + "5d9938edd44dbcbc8708a5e4f0c6ebe0" ], [ "Pulse.Soundness.Match.match_soundness", diff --git a/lib/steel/pulse/Pulse.Soundness.Par.fst.hints b/lib/steel/pulse/Pulse.Soundness.Par.fst.hints index cd9c917d6..798de7342 100644 --- a/lib/steel/pulse/Pulse.Soundness.Par.fst.hints +++ b/lib/steel/pulse/Pulse.Soundness.Par.fst.hints @@ -244,7 +244,7 @@ "typing_tok_Pulse.Syntax.Base.Implicit@tok" ], 0, - "d594de096bdeb3401f24b508f5853127" + "afa346ec3219d99fe07416ec1fe54f50" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Soundness.Return.fst.hints b/lib/steel/pulse/Pulse.Soundness.Return.fst.hints index ed9daec7b..d2c52655b 100644 --- a/lib/steel/pulse/Pulse.Soundness.Return.fst.hints +++ b/lib/steel/pulse/Pulse.Soundness.Return.fst.hints @@ -25,7 +25,7 @@ "Pulse.Syntax.Base_pretyping_0b425ab385a56835d52cd71c18622a32", "Pulse.Syntax.Base_pretyping_adc52787535d21bdc2731720d86e99a8", "Pulse.Syntax.Naming_interpretation_Tm_arrow_22833073b0372c4937c72763a2a36c80", - "bool_inversion", "bool_typing", + "bool_inversion", "constructor_distinct_FStar.Pervasives.Native.None", "constructor_distinct_FStar.Pervasives.Native.Some", "constructor_distinct_FStar.Reflection.V2.Data.Tv_Var", @@ -318,7 +318,7 @@ "typing_tok_Pulse.Syntax.Base.Implicit@tok" ], 0, - "40ac54e19b4f07d9941c1107629b244b" + "cc975c1aca12d450b2fb48a5f7c09a08" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Soundness.Rewrite.fst b/lib/steel/pulse/Pulse.Soundness.Rewrite.fst index e4d838da9..1581ff20b 100644 --- a/lib/steel/pulse/Pulse.Soundness.Rewrite.fst +++ b/lib/steel/pulse/Pulse.Soundness.Rewrite.fst @@ -3,6 +3,7 @@ module Pulse.Soundness.Rewrite open Pulse.Syntax open Pulse.Reflection.Util open Pulse.Typing +open Pulse.Typing.Combinators open Pulse.Elaborate.Pure open Pulse.Elaborate.Core open Pulse.Soundness.Common diff --git a/lib/steel/pulse/Pulse.Soundness.Rewrite.fst.hints b/lib/steel/pulse/Pulse.Soundness.Rewrite.fst.hints index 0374d1bd4..562231499 100644 --- a/lib/steel/pulse/Pulse.Soundness.Rewrite.fst.hints +++ b/lib/steel/pulse/Pulse.Soundness.Rewrite.fst.hints @@ -1,5 +1,5 @@ [ - "\u001a:\u0015t\u0000", + "\u001d\u001f/'̶V7.\u0004", [ [ "Pulse.Soundness.Rewrite.rewrite_soundness", @@ -83,7 +83,7 @@ "typing_Pulse.Syntax.Base.tm_vprop", "typing_Pulse.Typing.tm_unit" ], 0, - "b8577f596bec0904ea84775d9ab8b07c" + "3165f467a03e0b0ae8209d228f0aee6e" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Soundness.STEquiv.fst b/lib/steel/pulse/Pulse.Soundness.STEquiv.fst index 259cd85ee..439eeea0c 100644 --- a/lib/steel/pulse/Pulse.Soundness.STEquiv.fst +++ b/lib/steel/pulse/Pulse.Soundness.STEquiv.fst @@ -8,6 +8,7 @@ open Pulse.Syntax open Pulse.Reflection.Util open Pulse.Elaborate.Pure open Pulse.Typing +open Pulse.Typing.Combinators open Pulse.Elaborate open Pulse.Soundness.Common open Pulse.Checker.VPropEquiv diff --git a/lib/steel/pulse/Pulse.Soundness.STEquiv.fst.hints b/lib/steel/pulse/Pulse.Soundness.STEquiv.fst.hints index e8c9bc534..9b46f0796 100644 --- a/lib/steel/pulse/Pulse.Soundness.STEquiv.fst.hints +++ b/lib/steel/pulse/Pulse.Soundness.STEquiv.fst.hints @@ -1,5 +1,5 @@ [ - "\u000e\u0004~\u000b\u0015o?\u0016\tp\r7", + "@ڍ_\f,!c", [ [ "Pulse.Soundness.STEquiv.stt_vprop_equiv_closing", @@ -253,6 +253,7 @@ "typing_Pulse.Syntax.Base.comp_u", "typing_Pulse.Syntax.Base.ppname_default", "typing_Pulse.Syntax.Base.tm_vprop", + "typing_Pulse.Syntax.Base.uu___is_C_Tot", "typing_Pulse.Syntax.Base.v_as_nv", "typing_Pulse.Syntax.Pure.tm_type", "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.bindings", @@ -264,7 +265,7 @@ "typing_tok_Pulse.Syntax.Base.Implicit@tok" ], 0, - "93e70b3d2a526ba653ee487742f7ac0e" + "e58ed8dbc70c7678b54fa6039bcf38e6" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Soundness.VPropEquiv.fst b/lib/steel/pulse/Pulse.Soundness.VPropEquiv.fst index ebaa63243..9b35cbb98 100644 --- a/lib/steel/pulse/Pulse.Soundness.VPropEquiv.fst +++ b/lib/steel/pulse/Pulse.Soundness.VPropEquiv.fst @@ -8,6 +8,7 @@ open Pulse.Syntax open Pulse.Reflection.Util open Pulse.Elaborate.Pure open Pulse.Typing +open Pulse.Typing.Combinators open Pulse.Elaborate open Pulse.Soundness.Common open Pulse.Checker.VPropEquiv diff --git a/lib/steel/pulse/Pulse.Soundness.VPropEquiv.fst.hints b/lib/steel/pulse/Pulse.Soundness.VPropEquiv.fst.hints index d7709d4fc..501f17e87 100644 --- a/lib/steel/pulse/Pulse.Soundness.VPropEquiv.fst.hints +++ b/lib/steel/pulse/Pulse.Soundness.VPropEquiv.fst.hints @@ -1,5 +1,5 @@ [ - "\u0010*Q{zL0MKg\u0017u", + "h:\u00016vWD\u0005;\u0011\u000f", [ [ "Pulse.Soundness.VPropEquiv.vprop_equiv_ext_type", @@ -10,7 +10,7 @@ "@query", "equation_FStar.Sealed.Inhabited.is_sealed", "true_interp" ], 0, - "229c3d668f715c82921400893634914a" + "93574e5dc6ae8b0c7177dc87f134a4b3" ], [ "Pulse.Soundness.VPropEquiv.inst_vprop_equiv_ext_aux", @@ -170,7 +170,7 @@ "typing_tok_FStar.Reflection.V2.Data.Q_Explicit@tok" ], 0, - "e853ed5cbc880419171fd99803f8af2b" + "ada20e2a60d1674889ce150397a72205" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Soundness.While.fst.hints b/lib/steel/pulse/Pulse.Soundness.While.fst.hints index 4598d2d0b..466919f6e 100644 --- a/lib/steel/pulse/Pulse.Soundness.While.fst.hints +++ b/lib/steel/pulse/Pulse.Soundness.While.fst.hints @@ -152,7 +152,7 @@ "typing_tok_FStar.Reflection.V2.Data.Q_Explicit@tok" ], 0, - "6e606c9c1780e0d94c0be88529d75520" + "d8f664beb0427f4a4e72b53df1643b37" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Soundness.WithLocal.fst.hints b/lib/steel/pulse/Pulse.Soundness.WithLocal.fst.hints index 8118f8e4c..14eaf59c6 100644 --- a/lib/steel/pulse/Pulse.Soundness.WithLocal.fst.hints +++ b/lib/steel/pulse/Pulse.Soundness.WithLocal.fst.hints @@ -23,10 +23,11 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_f327b3b66854e57c59289f8c259581e7", "typing_FStar.Map.contains", "typing_FStar.Reflection.V2.Data.var", + "typing_FStar.Set.mem", "typing_Pulse.Syntax.Naming.freevars_st", "typing_Pulse.Typing.Env.as_map" ], 0, - "a513b4cf1ed166f6b56115e8ca321670" + "342a9485605a674f888760af3e53cb96" ], [ "Pulse.Soundness.WithLocal.mk_t_abs", diff --git a/lib/steel/pulse/Pulse.Soundness.fst.hints b/lib/steel/pulse/Pulse.Soundness.fst.hints index e639d1c34..acc5dc220 100644 --- a/lib/steel/pulse/Pulse.Soundness.fst.hints +++ b/lib/steel/pulse/Pulse.Soundness.fst.hints @@ -27,7 +27,7 @@ "typing_Pulse.Typing.Env.dom" ], 0, - "bd776a2800af95eeb568ceb7fdc3693f" + "cbab9db1467525a01bb1d5c4372c0785" ], [ "Pulse.Soundness.lift_soundness", diff --git a/lib/steel/pulse/Pulse.Syntax.Base.fst b/lib/steel/pulse/Pulse.Syntax.Base.fst index b7061b996..53ff317c6 100644 --- a/lib/steel/pulse/Pulse.Syntax.Base.fst +++ b/lib/steel/pulse/Pulse.Syntax.Base.fst @@ -220,10 +220,6 @@ let rec eq_st_term (t1 t2:st_term) eq_univ u1 u2 && eq_tm t1 t2 && eq_tm_opt post1 post2 - - | Tm_Protect { t = t1 }, - Tm_Protect { t = t2 } -> - eq_st_term t1 t2 | Tm_ProofHintWithBinders { hint_type=ht1; binders=bs1; t=t1; v=v1 }, Tm_ProofHintWithBinders { hint_type=ht2; binders=bs2; t=t2; v=v2 } -> diff --git a/lib/steel/pulse/Pulse.Syntax.Base.fst.hints b/lib/steel/pulse/Pulse.Syntax.Base.fst.hints index 3ea3e8ddd..0c062c945 100644 --- a/lib/steel/pulse/Pulse.Syntax.Base.fst.hints +++ b/lib/steel/pulse/Pulse.Syntax.Base.fst.hints @@ -1,5 +1,5 @@ [ - "<\"%&ױY\u0002\u0013&Z", + "\u001cioR\"w!IY", [ [ "Pulse.Syntax.Base.range_singleton", @@ -34,6 +34,20 @@ 0, "df5a2b20da050c7609da1d4d62ebfc69" ], + [ + "Pulse.Syntax.Base.mk_ppname_no_range", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "equation_FStar.Sealed.Inhabited.is_sealed", + "equation_Pulse.Syntax.Base.range_singleton_trigger", "true_interp" + ], + 0, + "19ffa585ec760d9a6d27814e70afa8b3" + ], [ "Pulse.Syntax.Base.as_fv", 1, @@ -41,7 +55,7 @@ 1, [ "@query", "equation_Pulse.Syntax.Base.range_singleton_trigger" ], 0, - "196269a0eb3f5419c4a691c9e99e3207" + "0da9822bf6aab8a0884553cde11e659c" ], [ "Pulse.Syntax.Base.tm_vprop", @@ -50,7 +64,7 @@ 1, [ "@query", "equation_Pulse.Syntax.Base.range_singleton_trigger" ], 0, - "b3765ef1b86efc8371ee80f6e5cd12c4" + "d1df4027608fc7a562ba7511e4d19b6d" ], [ "Pulse.Syntax.Base.tm_inames", @@ -125,7 +139,7 @@ "refinement_interpretation_Tm_refine_f30c5c1cb0a78245bc6b75b64fa49472" ], 0, - "e46c6f1afeb49c1aa4b9d0db496f59f7" + "c239a1322c662bf545bebca2253639a1" ], [ "Pulse.Syntax.Base.__proj__C_ST__item___0", @@ -197,7 +211,7 @@ "refinement_interpretation_Tm_refine_41d61c50c285817138d0c4ccdc37aecf" ], 0, - "e88f49a35f8f880a249d180cdca74883" + "5e70277846efe1a7196757eb6dc0b88d" ], [ "Pulse.Syntax.Base.__proj__Pat_Cons__item___1", @@ -247,6 +261,25 @@ 0, "8ce2f290b0081d401a1ebc1ef62712a3" ], + [ + "Pulse.Syntax.Base.ctag_of_comp_st", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_Pulse.Syntax.Base.comp_st", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" + ], + 0, + "34b71710b33d1ba3eb390b760ad885c3" + ], [ "Pulse.Syntax.Base.proof_hint_type", 1, @@ -261,7 +294,7 @@ "typing_FStar.Reflection.Types.name" ], 0, - "8ac1974702dace683057c0c256c1bf3c" + "2163d89a0dfb6dfb92a05986b48a1589" ], [ "Pulse.Syntax.Base.__proj__FOLD__item___0", @@ -273,7 +306,7 @@ "refinement_interpretation_Tm_refine_f02de02470d5e55219e650c427644816" ], 0, - "489ef0b7576787eb60d846f6e7139bfd" + "fbc6c1b7efdaf6b956d0b527ebd4ee75" ], [ "Pulse.Syntax.Base.__proj__UNFOLD__item___0", @@ -294,7 +327,7 @@ 1, [ "@query" ], 0, - "a8f88d378bfdf073e4a15fd95b6d9188" + "e36f0b18bd9eba7cc0efa030b20363ac" ], [ "Pulse.Syntax.Base.eq_tm", @@ -619,7 +652,7 @@ "Pulse.Syntax.Base_interpretation_Tm_arrow_a67d40c780f758772c1312a51e4ce563", "Pulse.Syntax.Base_pretyping_be189e4f396d5337499ee0c3708ca7f2", "binder_x_be189e4f396d5337499ee0c3708ca7f2_0", - "binder_x_be189e4f396d5337499ee0c3708ca7f2_1", "bool_typing", + "binder_x_be189e4f396d5337499ee0c3708ca7f2_1", "data_elim_Pulse.Syntax.Base.Mkfv", "disc_equation_Pulse.Syntax.Base.Pat_Cons", "disc_equation_Pulse.Syntax.Base.Pat_Constant", @@ -693,7 +726,7 @@ "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", "Prims_pretyping_f537159ed795b314b4e58c260361ae86", "Pulse.Syntax.Base_interpretation_Tm_arrow_0c8ce57cfdf40e20075f6c8b4ba9fc98", - "Pulse.Syntax.Base_interpretation_Tm_arrow_674496c974dc2c4d65a642327c7e3833", + "Pulse.Syntax.Base_interpretation_Tm_arrow_2c90d96fabc093cdd85606526a560f55", "Pulse.Syntax.Base_interpretation_Tm_arrow_972eb530eed225e25dbff78792d72c3d", "Pulse.Syntax.Base_interpretation_Tm_arrow_a67d40c780f758772c1312a51e4ce563", "Pulse.Syntax.Base_pretyping_01e6cbbfeab3ba416b144f2c9223a2d4", @@ -707,7 +740,10 @@ "assumption_Pulse.Syntax.Base.qualifier__uu___haseq", "binder_x_01e6cbbfeab3ba416b144f2c9223a2d4_0", "binder_x_01e6cbbfeab3ba416b144f2c9223a2d4_1", "bool_inversion", - "bool_typing", "data_elim_Pulse.Syntax.Base.Mkbinder", + "bool_typing", "constructor_distinct_Pulse.Syntax.Base.Tm_Admit", + "constructor_distinct_Pulse.Syntax.Base.Tm_If", + "constructor_distinct_Pulse.Syntax.Base.Tm_Par", + "data_elim_Pulse.Syntax.Base.Mkbinder", "data_elim_Pulse.Syntax.Base.Mkppname", "data_elim_Pulse.Syntax.Base.Mkst_term", "data_elim_Pulse.Syntax.Base.Tm_Abs", @@ -716,7 +752,6 @@ "data_elim_Pulse.Syntax.Base.Tm_Match", "data_elim_Pulse.Syntax.Base.Tm_Par", "data_elim_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "data_elim_Pulse.Syntax.Base.Tm_Protect", "data_elim_Pulse.Syntax.Base.Tm_TotBind", "data_elim_Pulse.Syntax.Base.Tm_While", "data_elim_Pulse.Syntax.Base.Tm_WithLocal", @@ -731,7 +766,6 @@ "disc_equation_Pulse.Syntax.Base.Tm_Match", "disc_equation_Pulse.Syntax.Base.Tm_Par", "disc_equation_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "disc_equation_Pulse.Syntax.Base.Tm_Protect", "disc_equation_Pulse.Syntax.Base.Tm_Return", "disc_equation_Pulse.Syntax.Base.Tm_Rewrite", "disc_equation_Pulse.Syntax.Base.Tm_STApp", @@ -747,7 +781,6 @@ "equation_Pulse.Syntax.Base.eq_tm_opt", "equation_Pulse.Syntax.Base.eq_univ", "equation_Pulse.Syntax.Base.range", - "equation_Pulse.Syntax.Base.should_check_t", "equation_Pulse.Syntax.Base.vprop", "fuel_guarded_inversion_Prims.list", "fuel_guarded_inversion_Pulse.Syntax.Base.binder", @@ -755,7 +788,6 @@ "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term_", "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "function_token_typing_Prims.bool", "function_token_typing_Prims.string", "function_token_typing_Pulse.Syntax.Base.branch", "function_token_typing_Pulse.Syntax.Base.eq_binder", @@ -806,7 +838,6 @@ "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload_hint_type", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload_t", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload_v", - "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload_t", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Return__payload_ctag", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Return__payload_insert_eq", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Return__payload_term", @@ -833,7 +864,6 @@ "projection_inverse_Pulse.Syntax.Base.Tm_Match__0", "projection_inverse_Pulse.Syntax.Base.Tm_Par__0", "projection_inverse_Pulse.Syntax.Base.Tm_ProofHintWithBinders__0", - "projection_inverse_Pulse.Syntax.Base.Tm_Protect__0", "projection_inverse_Pulse.Syntax.Base.Tm_Return__0", "projection_inverse_Pulse.Syntax.Base.Tm_Rewrite__0", "projection_inverse_Pulse.Syntax.Base.Tm_STApp__0", @@ -841,11 +871,11 @@ "projection_inverse_Pulse.Syntax.Base.Tm_While__0", "projection_inverse_Pulse.Syntax.Base.Tm_WithLocal__0", "refinement_interpretation_Tm_refine_012d84ab711a5da18390cc5d5e8f4433", - "refinement_interpretation_Tm_refine_323fbfb0e164f38a1102fbe194d8ba6f", "refinement_interpretation_Tm_refine_4119b51505e7e060b7e890e724ebbf23", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", - "refinement_interpretation_Tm_refine_c89484848eef596580b6d2539e2186ec", + "refinement_interpretation_Tm_refine_aca314735d0284e09af09f197e63194e", + "refinement_interpretation_Tm_refine_c2895492361e4cfed15657b5cdb8f539", "refinement_interpretation_Tm_refine_f0ac051651fa0e095f1b2c1241fd6a3f", "string_typing", "subterm_ordering_Pulse.Syntax.Base.Mkst_term", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Abs__payload", @@ -854,7 +884,6 @@ "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload", - "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_TotBind__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_While__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_WithLocal__payload", @@ -864,7 +893,6 @@ "subterm_ordering_Pulse.Syntax.Base.Tm_Match", "subterm_ordering_Pulse.Syntax.Base.Tm_Par", "subterm_ordering_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "subterm_ordering_Pulse.Syntax.Base.Tm_Protect", "subterm_ordering_Pulse.Syntax.Base.Tm_TotBind", "subterm_ordering_Pulse.Syntax.Base.Tm_While", "subterm_ordering_Pulse.Syntax.Base.Tm_WithLocal", @@ -882,7 +910,7 @@ "typing_tok_Pulse.Syntax.Base.Implicit@tok" ], 0, - "d695f9f6af03db12a7b2d6b70296a24a" + "a5bdd8c711534c3922688cfea54a198d" ], [ "Pulse.Syntax.Base.eq_st_term", @@ -896,14 +924,14 @@ "equation_with_fuel_Pulse.Syntax.Base.eq_pattern.fuel_instrumented", "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", - "refinement_interpretation_Tm_refine_7ba6ff2600953c7d0667d030ed19fb43", + "refinement_interpretation_Tm_refine_d8dae5ece96d47544055c130a3482327", "refinement_interpretation_Tm_refine_f0ac051651fa0e095f1b2c1241fd6a3f", "subterm_ordering_FStar.Pervasives.Native.Mktuple2", "typing_Pulse.Syntax.Base.eq_pattern", "typing_Pulse.Syntax.Base.eq_st_term" ], 0, - "76d38a8cc5e25cab43d79dbf36307da1" + "4ff2e02284d12b8fc5066e3c686851f3" ], [ "Pulse.Syntax.Base.comp_res", @@ -920,7 +948,7 @@ "projection_inverse_BoxBool_proj_0" ], 0, - "d100c2cbe0e198736bd29c503c961d05" + "2eaac42a43aebc609f5f01e523ee921f" ], [ "Pulse.Syntax.Base.st_comp_of_comp", diff --git a/lib/steel/pulse/Pulse.Syntax.Base.fsti b/lib/steel/pulse/Pulse.Syntax.Base.fsti index babaa8af7..8e76feec2 100644 --- a/lib/steel/pulse/Pulse.Syntax.Base.fsti +++ b/lib/steel/pulse/Pulse.Syntax.Base.fsti @@ -40,6 +40,11 @@ let mk_ppname (name:RT.pp_name_t) (range:FStar.Range.range) : ppname = { range = range } +let mk_ppname_no_range (s:string) : ppname = { + name = FStar.Sealed.seal s; + range = FStar.Range.range_0; +} + noeq type bv = { bv_index : index; @@ -55,10 +60,6 @@ type nm = { type qualifier = | Implicit -let should_check_t = FStar.Sealed.Inhabited.sealed false -let should_check_true : should_check_t = FStar.Sealed.Inhabited.seal true -let should_check_false : should_check_t = FStar.Sealed.Inhabited.seal false - noeq type fv = { fv_name : R.name; @@ -141,6 +142,12 @@ type ctag = | STT_Atomic | STT_Ghost +let ctag_of_comp_st (c:comp_st) : ctag = + match c with + | C_ST _ -> STT + | C_STAtomic _ _ -> STT_Atomic + | C_STGhost _ _ -> STT_Ghost + type proof_hint_type = | ASSERT | FOLD of option (list string) @@ -188,7 +195,6 @@ type st_term' = } | Tm_IntroPure { p:term; - should_check:should_check_t; } | Tm_ElimExists { p:vprop; @@ -197,7 +203,6 @@ type st_term' = erased:bool; p:vprop; witnesses:list term; - should_check:should_check_t; } | Tm_While { invariant:term; @@ -228,10 +233,6 @@ type st_term' = typ:term; post:option term; } - | Tm_Protect { - //Wrap a term to indicate that no proof-automation heuristics should be applied - t:st_term; - } | Tm_ProofHintWithBinders { // assert (R.pts_to x ?p ?v) in body hint_type:proof_hint_type; binders:list binder; diff --git a/lib/steel/pulse/Pulse.Syntax.Base.fsti.hints b/lib/steel/pulse/Pulse.Syntax.Base.fsti.hints index 5af8a6288..a1a7373ef 100644 --- a/lib/steel/pulse/Pulse.Syntax.Base.fsti.hints +++ b/lib/steel/pulse/Pulse.Syntax.Base.fsti.hints @@ -1,5 +1,5 @@ [ - "Z\f)l;}\b8v\u001e", + "LF\u001eInS!bS", [ [ "Pulse.Syntax.Base.range_singleton", @@ -8,7 +8,7 @@ 1, [ "@query" ], 0, - "8f999629aa9ff5a62a7b0bbc9f8fb8df" + "0f634dffe9c4271786e8cbe699748fe3" ], [ "Pulse.Syntax.Base.ppname_default", @@ -34,6 +34,20 @@ 0, "df5a2b20da050c7609da1d4d62ebfc69" ], + [ + "Pulse.Syntax.Base.mk_ppname_no_range", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "equation_FStar.Sealed.Inhabited.is_sealed", + "equation_Pulse.Syntax.Base.range_singleton_trigger", "true_interp" + ], + 0, + "19ffa585ec760d9a6d27814e70afa8b3" + ], [ "Pulse.Syntax.Base.as_fv", 1, @@ -41,7 +55,7 @@ 1, [ "@query", "equation_Pulse.Syntax.Base.range_singleton_trigger" ], 0, - "196269a0eb3f5419c4a691c9e99e3207" + "0da9822bf6aab8a0884553cde11e659c" ], [ "Pulse.Syntax.Base.tm_vprop", @@ -50,7 +64,7 @@ 1, [ "@query", "equation_Pulse.Syntax.Base.range_singleton_trigger" ], 0, - "b3765ef1b86efc8371ee80f6e5cd12c4" + "d1df4027608fc7a562ba7511e4d19b6d" ], [ "Pulse.Syntax.Base.tm_inames", @@ -125,7 +139,7 @@ "refinement_interpretation_Tm_refine_f30c5c1cb0a78245bc6b75b64fa49472" ], 0, - "e46c6f1afeb49c1aa4b9d0db496f59f7" + "c239a1322c662bf545bebca2253639a1" ], [ "Pulse.Syntax.Base.__proj__C_ST__item___0", @@ -197,7 +211,7 @@ "refinement_interpretation_Tm_refine_41d61c50c285817138d0c4ccdc37aecf" ], 0, - "e88f49a35f8f880a249d180cdca74883" + "5e70277846efe1a7196757eb6dc0b88d" ], [ "Pulse.Syntax.Base.__proj__Pat_Cons__item___1", @@ -247,6 +261,25 @@ 0, "8ce2f290b0081d401a1ebc1ef62712a3" ], + [ + "Pulse.Syntax.Base.ctag_of_comp_st", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_Pulse.Syntax.Base.comp_st", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" + ], + 0, + "34b71710b33d1ba3eb390b760ad885c3" + ], [ "Pulse.Syntax.Base.proof_hint_type", 1, @@ -261,7 +294,7 @@ "typing_FStar.Reflection.Types.name" ], 0, - "8ac1974702dace683057c0c256c1bf3c" + "2163d89a0dfb6dfb92a05986b48a1589" ], [ "Pulse.Syntax.Base.__proj__FOLD__item___0", @@ -273,7 +306,7 @@ "refinement_interpretation_Tm_refine_f02de02470d5e55219e650c427644816" ], 0, - "489ef0b7576787eb60d846f6e7139bfd" + "fbc6c1b7efdaf6b956d0b527ebd4ee75" ], [ "Pulse.Syntax.Base.__proj__UNFOLD__item___0", @@ -302,7 +335,7 @@ "projection_inverse_BoxBool_proj_0" ], 0, - "c60709e087400507353f81f0ce9f72b1" + "5484fb9c27fb1903394a88c2ee5f2d4d" ], [ "Pulse.Syntax.Base.st_comp_of_comp", diff --git a/lib/steel/pulse/Pulse.Syntax.Builder.fst b/lib/steel/pulse/Pulse.Syntax.Builder.fst index a5c9a1447..b859e9243 100644 --- a/lib/steel/pulse/Pulse.Syntax.Builder.fst +++ b/lib/steel/pulse/Pulse.Syntax.Builder.fst @@ -13,12 +13,11 @@ let tm_totbind _binder head body = Tm_TotBind { head; body } let tm_if b then_ else_ post = Tm_If { b; then_; else_; post } let tm_match sc returns_ brs = Tm_Match {sc; returns_; brs} let tm_elim_exists p = Tm_ElimExists { p } -let tm_intro_exists erased p witnesses = Tm_IntroExists { erased; p; witnesses; should_check=should_check_true } +let tm_intro_exists erased p witnesses = Tm_IntroExists { erased; p; witnesses } let tm_while invariant condition condition_var body = Tm_While { invariant; condition; condition_var; body } let tm_par pre1 body1 post1 pre2 body2 post2 = Tm_Par { pre1; body1; post1; pre2; body2; post2 } let tm_with_local binder initializer body = Tm_WithLocal { binder; initializer; body } let tm_rewrite t1 t2 = Tm_Rewrite { t1; t2 } let tm_admit ctag u typ post = Tm_Admit { ctag; u; typ; post } -let tm_protect t = Tm_Protect { t } let with_range t r = { term = t; range = r} let tm_assert_with_binders bs v t = Tm_ProofHintWithBinders { hint_type=ASSERT; binders=bs; v; t } \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Syntax.Builder.fst.hints b/lib/steel/pulse/Pulse.Syntax.Builder.fst.hints index ccfea4c84..538ff5987 100644 --- a/lib/steel/pulse/Pulse.Syntax.Builder.fst.hints +++ b/lib/steel/pulse/Pulse.Syntax.Builder.fst.hints @@ -1 +1 @@ -[ "\u001bPW=", [] ] \ No newline at end of file +[ "F\u00049G[qt", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Syntax.Naming.fst b/lib/steel/pulse/Pulse.Syntax.Naming.fst index c28747d6b..3630d1003 100644 --- a/lib/steel/pulse/Pulse.Syntax.Naming.fst +++ b/lib/steel/pulse/Pulse.Syntax.Naming.fst @@ -150,9 +150,6 @@ let rec close_open_inverse_st' (t:st_term) close_open_inverse' typ x i; close_open_inverse_opt' post x (i + 1) - | Tm_Protect { t } -> - close_open_inverse_st' t x i - | Tm_ProofHintWithBinders { binders; v; t} -> let n = L.length binders in close_open_inverse' v x (i + n); diff --git a/lib/steel/pulse/Pulse.Syntax.Naming.fst.hints b/lib/steel/pulse/Pulse.Syntax.Naming.fst.hints index 84b65e6dc..8120772b7 100644 --- a/lib/steel/pulse/Pulse.Syntax.Naming.fst.hints +++ b/lib/steel/pulse/Pulse.Syntax.Naming.fst.hints @@ -1,5 +1,5 @@ [ - "ib\u0001#_", + "8Va:g]\u0010:]", [ [ "Pulse.Syntax.Naming.freevars", @@ -14,7 +14,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "e886b594e3777bd936a097867098f31e" + "e264670e418c000fec37d9fc34517584" ], [ "Pulse.Syntax.Naming.freevars", @@ -199,7 +199,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "88ead742b38c0607af72b92fb383a6e4" + "c78fa67f5627d645bbc6312b4054edac" ], [ "Pulse.Syntax.Naming.freevars_st", @@ -217,7 +217,6 @@ "data_elim_Pulse.Syntax.Base.Tm_Match", "data_elim_Pulse.Syntax.Base.Tm_Par", "data_elim_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "data_elim_Pulse.Syntax.Base.Tm_Protect", "data_elim_Pulse.Syntax.Base.Tm_TotBind", "data_elim_Pulse.Syntax.Base.Tm_While", "data_elim_Pulse.Syntax.Base.Tm_WithLocal", @@ -231,7 +230,6 @@ "disc_equation_Pulse.Syntax.Base.Tm_Match", "disc_equation_Pulse.Syntax.Base.Tm_Par", "disc_equation_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "disc_equation_Pulse.Syntax.Base.Tm_Protect", "disc_equation_Pulse.Syntax.Base.Tm_Return", "disc_equation_Pulse.Syntax.Base.Tm_Rewrite", "disc_equation_Pulse.Syntax.Base.Tm_STApp", @@ -251,7 +249,6 @@ "projection_inverse_Pulse.Syntax.Base.Tm_If__0", "projection_inverse_Pulse.Syntax.Base.Tm_Match__0", "projection_inverse_Pulse.Syntax.Base.Tm_Par__0", - "projection_inverse_Pulse.Syntax.Base.Tm_Protect__0", "projection_inverse_Pulse.Syntax.Base.Tm_TotBind__0", "projection_inverse_Pulse.Syntax.Base.Tm_While__0", "projection_inverse_Pulse.Syntax.Base.Tm_WithLocal__0", @@ -263,7 +260,6 @@ "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload", - "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_TotBind__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_While__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_WithLocal__payload", @@ -273,14 +269,13 @@ "subterm_ordering_Pulse.Syntax.Base.Tm_Match", "subterm_ordering_Pulse.Syntax.Base.Tm_Par", "subterm_ordering_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "subterm_ordering_Pulse.Syntax.Base.Tm_Protect", "subterm_ordering_Pulse.Syntax.Base.Tm_TotBind", "subterm_ordering_Pulse.Syntax.Base.Tm_While", "subterm_ordering_Pulse.Syntax.Base.Tm_WithLocal", "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__term" ], 0, - "3507425fed8dad9c087308c9511a57d8" + "23f1c133f671537e1f11efb48f66d56f" ], [ "Pulse.Syntax.Naming.freevars_st", @@ -295,7 +290,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "88e5240c6c696a41d7e30b2f373d97a0" + "d0a344bbfc97cbdd526e148efa24c9bf" ], [ "Pulse.Syntax.Naming.freevars_st", @@ -359,7 +354,7 @@ "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t" ], 0, - "b3a3da5604b94759cc8e88cf17fcd59f" + "1ea05e9a27a268b394c00d34e24ac4b6" ], [ "Pulse.Syntax.Naming.ln_c'", @@ -403,7 +398,7 @@ "projection_inverse_BoxBool_proj_0", "subterm_ordering_Prims.Cons" ], 0, - "cfdfe96b3faba5986a71dab2e5858215" + "66472f4b392899a688efd9d0a7471ff6" ], [ "Pulse.Syntax.Naming.ln_st'", @@ -421,7 +416,6 @@ "data_elim_Pulse.Syntax.Base.Tm_Match", "data_elim_Pulse.Syntax.Base.Tm_Par", "data_elim_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "data_elim_Pulse.Syntax.Base.Tm_Protect", "data_elim_Pulse.Syntax.Base.Tm_TotBind", "data_elim_Pulse.Syntax.Base.Tm_While", "data_elim_Pulse.Syntax.Base.Tm_WithLocal", @@ -435,13 +429,13 @@ "disc_equation_Pulse.Syntax.Base.Tm_Match", "disc_equation_Pulse.Syntax.Base.Tm_Par", "disc_equation_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "disc_equation_Pulse.Syntax.Base.Tm_Protect", "disc_equation_Pulse.Syntax.Base.Tm_Return", "disc_equation_Pulse.Syntax.Base.Tm_Rewrite", "disc_equation_Pulse.Syntax.Base.Tm_STApp", "disc_equation_Pulse.Syntax.Base.Tm_TotBind", "disc_equation_Pulse.Syntax.Base.Tm_While", "disc_equation_Pulse.Syntax.Base.Tm_WithLocal", + "equation_Pulse.Syntax.Base.branch", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term_", "proj_equation_Pulse.Syntax.Base.Mkst_term_term", @@ -451,7 +445,6 @@ "projection_inverse_Pulse.Syntax.Base.Tm_If__0", "projection_inverse_Pulse.Syntax.Base.Tm_Match__0", "projection_inverse_Pulse.Syntax.Base.Tm_Par__0", - "projection_inverse_Pulse.Syntax.Base.Tm_Protect__0", "projection_inverse_Pulse.Syntax.Base.Tm_TotBind__0", "projection_inverse_Pulse.Syntax.Base.Tm_While__0", "projection_inverse_Pulse.Syntax.Base.Tm_WithLocal__0", @@ -462,7 +455,6 @@ "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload", - "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_TotBind__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_While__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_WithLocal__payload", @@ -472,14 +464,13 @@ "subterm_ordering_Pulse.Syntax.Base.Tm_Match", "subterm_ordering_Pulse.Syntax.Base.Tm_Par", "subterm_ordering_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "subterm_ordering_Pulse.Syntax.Base.Tm_Protect", "subterm_ordering_Pulse.Syntax.Base.Tm_TotBind", "subterm_ordering_Pulse.Syntax.Base.Tm_While", "subterm_ordering_Pulse.Syntax.Base.Tm_WithLocal", "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__term" ], 0, - "c56217a02c2b3f352552ce34831adb70" + "93d354dffacebbcad92a3757a473d1d4" ], [ "Pulse.Syntax.Naming.ln_st'", @@ -488,7 +479,7 @@ 1, [ "@MaxIFuel_assumption", "@query", - "binder_x_eb84920ddcf811c52d43769218f8dfbd_1", + "binder_x_eb84920ddcf811c52d43769218f8dfbd_0", "disc_equation_Pulse.Syntax.Base.Pat_Cons", "disc_equation_Pulse.Syntax.Base.Pat_Constant", "disc_equation_Pulse.Syntax.Base.Pat_Dot_Term", @@ -502,7 +493,20 @@ "typing_Pulse.Syntax.Base.__proj__Pat_Dot_Term__item___0" ], 0, - "d36e3baf2b1a5b97fd99a091b4c8b4d3" + "eb1699308c2f656b9c41d30adaa32180" + ], + [ + "Pulse.Syntax.Naming.ln_st'", + 3, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "equation_Pulse.Syntax.Base.branch", + "refinement_interpretation_Tm_refine_f68d290322827fb39846709c7b4c89ac" + ], + 0, + "4fdcb0174d88a55638f2e865a7f14f0d" ], [ "Pulse.Syntax.Naming.__proj__DT__item___0", @@ -514,7 +518,7 @@ "refinement_interpretation_Tm_refine_8c81d20b67a6909c9a4ec95659f4bc57" ], 0, - "9661542d715ebb49de7e4e68b52da53a" + "3d7ed13284175dd868dd0b13441f36fb" ], [ "Pulse.Syntax.Naming.__proj__DT__item___1", @@ -651,7 +655,7 @@ "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t" ], 0, - "59c6b40b0cf411dfb67e6997322b86dd" + "033e4246732e14a28a7512e7e1e9ff73" ], [ "Pulse.Syntax.Naming.subst_comp", @@ -695,7 +699,7 @@ "projection_inverse_BoxBool_proj_0", "subterm_ordering_Prims.Cons" ], 0, - "006c46e4804442e47c8d332906bf712d" + "0ca66e5029a7b4327da565ac368e051d" ], [ "Pulse.Syntax.Naming.subst_st_term", @@ -713,7 +717,6 @@ "data_elim_Pulse.Syntax.Base.Tm_Match", "data_elim_Pulse.Syntax.Base.Tm_Par", "data_elim_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "data_elim_Pulse.Syntax.Base.Tm_Protect", "data_elim_Pulse.Syntax.Base.Tm_TotBind", "data_elim_Pulse.Syntax.Base.Tm_While", "data_elim_Pulse.Syntax.Base.Tm_WithLocal", @@ -727,7 +730,6 @@ "disc_equation_Pulse.Syntax.Base.Tm_Match", "disc_equation_Pulse.Syntax.Base.Tm_Par", "disc_equation_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "disc_equation_Pulse.Syntax.Base.Tm_Protect", "disc_equation_Pulse.Syntax.Base.Tm_Return", "disc_equation_Pulse.Syntax.Base.Tm_Rewrite", "disc_equation_Pulse.Syntax.Base.Tm_STApp", @@ -744,7 +746,6 @@ "projection_inverse_Pulse.Syntax.Base.Tm_If__0", "projection_inverse_Pulse.Syntax.Base.Tm_Match__0", "projection_inverse_Pulse.Syntax.Base.Tm_Par__0", - "projection_inverse_Pulse.Syntax.Base.Tm_Protect__0", "projection_inverse_Pulse.Syntax.Base.Tm_TotBind__0", "projection_inverse_Pulse.Syntax.Base.Tm_While__0", "projection_inverse_Pulse.Syntax.Base.Tm_WithLocal__0", @@ -755,7 +756,6 @@ "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload", - "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_TotBind__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_While__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_WithLocal__payload", @@ -765,14 +765,13 @@ "subterm_ordering_Pulse.Syntax.Base.Tm_Match", "subterm_ordering_Pulse.Syntax.Base.Tm_Par", "subterm_ordering_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "subterm_ordering_Pulse.Syntax.Base.Tm_Protect", "subterm_ordering_Pulse.Syntax.Base.Tm_TotBind", "subterm_ordering_Pulse.Syntax.Base.Tm_While", "subterm_ordering_Pulse.Syntax.Base.Tm_WithLocal", "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__term" ], 0, - "f77777458c441f779e029ba0895da584" + "5b0861b28dca21f626d994f52936e15d" ], [ "Pulse.Syntax.Naming.subst_st_term", @@ -781,7 +780,7 @@ 1, [ "@query", "equation_Pulse.Syntax.Base.branch" ], 0, - "98123a6046296f0d068ddf5f8e28098e" + "ae90774bd52037719aaf18a11c2fabe6" ], [ "Pulse.Syntax.Naming.subst_st_term", @@ -800,7 +799,7 @@ "subterm_ordering_FStar.Pervasives.Native.Mktuple2" ], 0, - "6c3853d2a4664971d125559aac479254" + "3f0af1fca6497683cd923eb68275da3c" ], [ "Pulse.Syntax.Naming.close_term_n", @@ -818,7 +817,7 @@ "subterm_ordering_Prims.Cons" ], 0, - "3e547cb84ff258219cc68c12a62b9235" + "5ae665cd3d3343858b450f2a34d56a01" ], [ "Pulse.Syntax.Naming.close_st_term_n", @@ -836,7 +835,7 @@ "subterm_ordering_Prims.Cons" ], 0, - "f770df2c2b3a59f9b4d79ffff7e65973" + "cb61fb7b407f6704601a4963a854166b" ], [ "Pulse.Syntax.Naming.close_open_inverse'", @@ -1208,11 +1207,10 @@ 2, 1, [ - "@MaxIFuel_assumption", "@query", "bool_inversion", + "@MaxIFuel_assumption", "@query", "constructor_distinct_FStar.Pervasives.Native.None", "constructor_distinct_FStar.Pervasives.Native.Some", - "disc_equation_FStar.Pervasives.Native.None", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "disc_equation_FStar.Pervasives.Native.None", "equation_Prims.nat", "equation_Pulse.Syntax.Base.index", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Syntax.Naming.close_term_", "equation_Pulse.Syntax.Naming.close_term_opt_", @@ -1230,9 +1228,7 @@ "projection_inverse_FStar.Pervasives.Native.Some_v", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "refinement_interpretation_Tm_refine_d9770e5d65a5d0394a5252493e36b4e9", - "token_correspondence_Pulse.Syntax.Naming.freevars", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Syntax.Naming.freevars_term_opt" + "token_correspondence_Pulse.Syntax.Naming.freevars" ], 0, "64ffc306269f1e2af1ceed9c6ddfb338" @@ -1382,7 +1378,6 @@ "constructor_distinct_Pulse.Syntax.Base.Tm_Match", "constructor_distinct_Pulse.Syntax.Base.Tm_Par", "constructor_distinct_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "constructor_distinct_Pulse.Syntax.Base.Tm_Protect", "constructor_distinct_Pulse.Syntax.Base.Tm_Return", "constructor_distinct_Pulse.Syntax.Base.Tm_Rewrite", "constructor_distinct_Pulse.Syntax.Base.Tm_STApp", @@ -1398,7 +1393,6 @@ "data_elim_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload", "data_elim_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload", "data_elim_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload", - "data_elim_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload", "data_elim_Pulse.Syntax.Base.Mkst_term___Tm_While__payload", "data_elim_Pulse.Syntax.Base.Mkst_term___Tm_WithLocal__payload", "data_elim_Pulse.Syntax.Base.Tm_Abs", @@ -1408,7 +1402,6 @@ "data_elim_Pulse.Syntax.Base.Tm_Match", "data_elim_Pulse.Syntax.Base.Tm_Par", "data_elim_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "data_elim_Pulse.Syntax.Base.Tm_Protect", "data_elim_Pulse.Syntax.Base.Tm_TotBind", "data_elim_Pulse.Syntax.Base.Tm_While", "data_elim_Pulse.Syntax.Base.Tm_WithLocal", @@ -1427,7 +1420,6 @@ "disc_equation_Pulse.Syntax.Base.Tm_Match", "disc_equation_Pulse.Syntax.Base.Tm_Par", "disc_equation_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "disc_equation_Pulse.Syntax.Base.Tm_Protect", "disc_equation_Pulse.Syntax.Base.Tm_Return", "disc_equation_Pulse.Syntax.Base.Tm_Rewrite", "disc_equation_Pulse.Syntax.Base.Tm_STApp", @@ -1471,7 +1463,6 @@ "fuel_guarded_inversion_Pulse.Syntax.Base.st_term___Tm_Match__payload", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term___Tm_Par__payload", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term___Tm_ProofHintWithBinders__payload", - "fuel_guarded_inversion_Pulse.Syntax.Base.st_term___Tm_Protect__payload", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term___Tm_While__payload", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term___Tm_WithLocal__payload", "fuel_guarded_inversion_Pulse.Syntax.Base.term", @@ -1520,10 +1511,8 @@ "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_If__payload_then_", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload_erased", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload_p", - "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload_should_check", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload_witnesses", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroPure__payload_p", - "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroPure__payload_should_check", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload_brs", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload_returns_", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload_sc", @@ -1537,7 +1526,6 @@ "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload_hint_type", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload_t", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload_v", - "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload_t", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Return__payload_ctag", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Return__payload_insert_eq", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Return__payload_term", @@ -1567,7 +1555,6 @@ "projection_inverse_Pulse.Syntax.Base.Tm_Match__0", "projection_inverse_Pulse.Syntax.Base.Tm_Par__0", "projection_inverse_Pulse.Syntax.Base.Tm_ProofHintWithBinders__0", - "projection_inverse_Pulse.Syntax.Base.Tm_Protect__0", "projection_inverse_Pulse.Syntax.Base.Tm_Return__0", "projection_inverse_Pulse.Syntax.Base.Tm_Rewrite__0", "projection_inverse_Pulse.Syntax.Base.Tm_STApp__0", @@ -1589,7 +1576,6 @@ "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_If__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload", - "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_TotBind__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_While__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_WithLocal__payload", @@ -1598,7 +1584,6 @@ "subterm_ordering_Pulse.Syntax.Base.Tm_If", "subterm_ordering_Pulse.Syntax.Base.Tm_Par", "subterm_ordering_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "subterm_ordering_Pulse.Syntax.Base.Tm_Protect", "subterm_ordering_Pulse.Syntax.Base.Tm_TotBind", "subterm_ordering_Pulse.Syntax.Base.Tm_While", "subterm_ordering_Pulse.Syntax.Base.Tm_WithLocal", @@ -1627,7 +1612,7 @@ "typing_Pulse.Syntax.Pure.term_of_nvar" ], 0, - "a20ff9712dd30d553d8558fe78eb9c43" + "be87904f5ec9c132256b9e8a9c63a96f" ], [ "Pulse.Syntax.Naming.close_open_inverse", @@ -1820,7 +1805,7 @@ "typing_Pulse.Syntax.Naming.shift_subst" ], 0, - "ecb8bd2ac88fe738665779e1f814b4fc" + "f6ce8b9adbb2765735170aa77a7d259e" ], [ "Pulse.Syntax.Naming.open_with_gt_ln_st", @@ -1941,7 +1926,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "e0cb5a8330709eda6a48a5ef4737896c" + "bcb91cce33eac7140602b30a12f724ee" ], [ "Pulse.Syntax.Naming.close_with_non_freevar", @@ -2058,7 +2043,7 @@ "typing_Pulse.Syntax.Naming.shift_subst" ], 0, - "bba83a8bef62418ed7d9ce549e1159db" + "0562e1eda711b161af44d68b712507c7" ], [ "Pulse.Syntax.Naming.close_with_non_freevar_st", @@ -2163,7 +2148,7 @@ 2, 1, [ - "@MaxIFuel_assumption", "@query", "bool_inversion", + "@MaxIFuel_assumption", "@query", "constructor_distinct_Pulse.Syntax.Base.C_ST", "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", "constructor_distinct_Pulse.Syntax.Base.C_STGhost", @@ -2192,9 +2177,8 @@ "projection_inverse_Pulse.Syntax.Base.C_Tot__0", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", + "typing_FStar.Reflection.V2.Data.var", "typing_Pulse.Syntax.Naming.freevars", - "typing_Pulse.Syntax.Naming.freevars_comp", "typing_Pulse.Syntax.Naming.freevars_st_comp" ], 0, @@ -2234,7 +2218,7 @@ "token_correspondence_FStar.List.Tot.Base.length.fuel_instrumented" ], 0, - "bfb0fabdb8c77473904a7a65a80d1fb1" + "dce046f1d4189309e5bfe2a104d7093c" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Syntax.Naming.fsti b/lib/steel/pulse/Pulse.Syntax.Naming.fsti index a73840dc0..667393a6f 100644 --- a/lib/steel/pulse/Pulse.Syntax.Naming.fsti +++ b/lib/steel/pulse/Pulse.Syntax.Naming.fsti @@ -114,8 +114,6 @@ let rec freevars_st (t:st_term) Set.union (freevars typ) (freevars_term_opt post) - | Tm_Protect { t } -> freevars_st t - | Tm_ProofHintWithBinders { binders; v; t } -> Set.union (freevars v) (freevars_st t) and freevars_branches (t:list (pattern & st_term)) : Set.set var = @@ -241,9 +239,6 @@ let rec ln_st' (t:st_term) (i:int) ln' typ i && ln_opt' post (i + 1) - | Tm_Protect { t } -> - ln_st' t i - | Tm_ProofHintWithBinders { binders; v; t } -> let n = L.length binders in ln' v (i + n) && @@ -416,17 +411,16 @@ let rec subst_st_term (t:st_term) (ss:subst) returns_ = subst_term_opt returns_ ss; brs = subst_branches t ss brs } - | Tm_IntroPure { p; should_check } -> - Tm_IntroPure { p = subst_term p ss; should_check } + | Tm_IntroPure { p } -> + Tm_IntroPure { p = subst_term p ss } | Tm_ElimExists { p } -> Tm_ElimExists { p = subst_term p ss } - | Tm_IntroExists { erased; p; witnesses; should_check } -> + | Tm_IntroExists { erased; p; witnesses } -> Tm_IntroExists { erased; p = subst_term p ss; - witnesses = subst_term_list witnesses ss; - should_check } + witnesses = subst_term_list witnesses ss } | Tm_While { invariant; condition; body; condition_var } -> Tm_While { invariant = subst_term invariant (shift_subst ss); @@ -457,9 +451,6 @@ let rec subst_st_term (t:st_term) (ss:subst) typ=subst_term typ ss; post=subst_term_opt post (shift_subst ss) } - | Tm_Protect { t } -> - Tm_Protect { t = subst_st_term t ss } - | Tm_ProofHintWithBinders { hint_type; binders; v; t} -> let n = L.length binders in let ss = shift_subst_n n ss in diff --git a/lib/steel/pulse/Pulse.Syntax.Naming.fsti.hints b/lib/steel/pulse/Pulse.Syntax.Naming.fsti.hints index d62f03b9b..57b9a9cc6 100644 --- a/lib/steel/pulse/Pulse.Syntax.Naming.fsti.hints +++ b/lib/steel/pulse/Pulse.Syntax.Naming.fsti.hints @@ -1,5 +1,5 @@ [ - "J87IOeik", + "t;%ܶ", [ [ "Pulse.Syntax.Naming.freevars", @@ -14,7 +14,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "9f819d5ba1ddc1063daab211d6e1bd3d" + "b1143a6bba15a8e3c833896e393eb1ff" ], [ "Pulse.Syntax.Naming.freevars", @@ -199,7 +199,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "88ead742b38c0607af72b92fb383a6e4" + "c78fa67f5627d645bbc6312b4054edac" ], [ "Pulse.Syntax.Naming.freevars_st", @@ -217,7 +217,6 @@ "data_elim_Pulse.Syntax.Base.Tm_Match", "data_elim_Pulse.Syntax.Base.Tm_Par", "data_elim_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "data_elim_Pulse.Syntax.Base.Tm_Protect", "data_elim_Pulse.Syntax.Base.Tm_TotBind", "data_elim_Pulse.Syntax.Base.Tm_While", "data_elim_Pulse.Syntax.Base.Tm_WithLocal", @@ -231,7 +230,6 @@ "disc_equation_Pulse.Syntax.Base.Tm_Match", "disc_equation_Pulse.Syntax.Base.Tm_Par", "disc_equation_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "disc_equation_Pulse.Syntax.Base.Tm_Protect", "disc_equation_Pulse.Syntax.Base.Tm_Return", "disc_equation_Pulse.Syntax.Base.Tm_Rewrite", "disc_equation_Pulse.Syntax.Base.Tm_STApp", @@ -251,7 +249,6 @@ "projection_inverse_Pulse.Syntax.Base.Tm_If__0", "projection_inverse_Pulse.Syntax.Base.Tm_Match__0", "projection_inverse_Pulse.Syntax.Base.Tm_Par__0", - "projection_inverse_Pulse.Syntax.Base.Tm_Protect__0", "projection_inverse_Pulse.Syntax.Base.Tm_TotBind__0", "projection_inverse_Pulse.Syntax.Base.Tm_While__0", "projection_inverse_Pulse.Syntax.Base.Tm_WithLocal__0", @@ -263,7 +260,6 @@ "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload", - "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_TotBind__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_While__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_WithLocal__payload", @@ -273,14 +269,13 @@ "subterm_ordering_Pulse.Syntax.Base.Tm_Match", "subterm_ordering_Pulse.Syntax.Base.Tm_Par", "subterm_ordering_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "subterm_ordering_Pulse.Syntax.Base.Tm_Protect", "subterm_ordering_Pulse.Syntax.Base.Tm_TotBind", "subterm_ordering_Pulse.Syntax.Base.Tm_While", "subterm_ordering_Pulse.Syntax.Base.Tm_WithLocal", "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__term" ], 0, - "3507425fed8dad9c087308c9511a57d8" + "23f1c133f671537e1f11efb48f66d56f" ], [ "Pulse.Syntax.Naming.freevars_st", @@ -295,7 +290,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "88e5240c6c696a41d7e30b2f373d97a0" + "d0a344bbfc97cbdd526e148efa24c9bf" ], [ "Pulse.Syntax.Naming.freevars_st", @@ -359,7 +354,7 @@ "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t" ], 0, - "b3a3da5604b94759cc8e88cf17fcd59f" + "1ea05e9a27a268b394c00d34e24ac4b6" ], [ "Pulse.Syntax.Naming.ln_c'", @@ -403,7 +398,7 @@ "projection_inverse_BoxBool_proj_0", "subterm_ordering_Prims.Cons" ], 0, - "cfdfe96b3faba5986a71dab2e5858215" + "66472f4b392899a688efd9d0a7471ff6" ], [ "Pulse.Syntax.Naming.ln_st'", @@ -421,7 +416,6 @@ "data_elim_Pulse.Syntax.Base.Tm_Match", "data_elim_Pulse.Syntax.Base.Tm_Par", "data_elim_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "data_elim_Pulse.Syntax.Base.Tm_Protect", "data_elim_Pulse.Syntax.Base.Tm_TotBind", "data_elim_Pulse.Syntax.Base.Tm_While", "data_elim_Pulse.Syntax.Base.Tm_WithLocal", @@ -435,13 +429,13 @@ "disc_equation_Pulse.Syntax.Base.Tm_Match", "disc_equation_Pulse.Syntax.Base.Tm_Par", "disc_equation_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "disc_equation_Pulse.Syntax.Base.Tm_Protect", "disc_equation_Pulse.Syntax.Base.Tm_Return", "disc_equation_Pulse.Syntax.Base.Tm_Rewrite", "disc_equation_Pulse.Syntax.Base.Tm_STApp", "disc_equation_Pulse.Syntax.Base.Tm_TotBind", "disc_equation_Pulse.Syntax.Base.Tm_While", "disc_equation_Pulse.Syntax.Base.Tm_WithLocal", + "equation_Pulse.Syntax.Base.branch", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term_", "proj_equation_Pulse.Syntax.Base.Mkst_term_term", @@ -451,7 +445,6 @@ "projection_inverse_Pulse.Syntax.Base.Tm_If__0", "projection_inverse_Pulse.Syntax.Base.Tm_Match__0", "projection_inverse_Pulse.Syntax.Base.Tm_Par__0", - "projection_inverse_Pulse.Syntax.Base.Tm_Protect__0", "projection_inverse_Pulse.Syntax.Base.Tm_TotBind__0", "projection_inverse_Pulse.Syntax.Base.Tm_While__0", "projection_inverse_Pulse.Syntax.Base.Tm_WithLocal__0", @@ -462,7 +455,6 @@ "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload", - "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_TotBind__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_While__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_WithLocal__payload", @@ -472,14 +464,13 @@ "subterm_ordering_Pulse.Syntax.Base.Tm_Match", "subterm_ordering_Pulse.Syntax.Base.Tm_Par", "subterm_ordering_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "subterm_ordering_Pulse.Syntax.Base.Tm_Protect", "subterm_ordering_Pulse.Syntax.Base.Tm_TotBind", "subterm_ordering_Pulse.Syntax.Base.Tm_While", "subterm_ordering_Pulse.Syntax.Base.Tm_WithLocal", "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__term" ], 0, - "c56217a02c2b3f352552ce34831adb70" + "93d354dffacebbcad92a3757a473d1d4" ], [ "Pulse.Syntax.Naming.ln_st'", @@ -488,7 +479,7 @@ 1, [ "@MaxIFuel_assumption", "@query", - "binder_x_eb84920ddcf811c52d43769218f8dfbd_1", + "binder_x_eb84920ddcf811c52d43769218f8dfbd_0", "disc_equation_Pulse.Syntax.Base.Pat_Cons", "disc_equation_Pulse.Syntax.Base.Pat_Constant", "disc_equation_Pulse.Syntax.Base.Pat_Dot_Term", @@ -502,7 +493,20 @@ "typing_Pulse.Syntax.Base.__proj__Pat_Dot_Term__item___0" ], 0, - "d36e3baf2b1a5b97fd99a091b4c8b4d3" + "eb1699308c2f656b9c41d30adaa32180" + ], + [ + "Pulse.Syntax.Naming.ln_st'", + 3, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "equation_Pulse.Syntax.Base.branch", + "refinement_interpretation_Tm_refine_f68d290322827fb39846709c7b4c89ac" + ], + 0, + "4fdcb0174d88a55638f2e865a7f14f0d" ], [ "Pulse.Syntax.Naming.__proj__DT__item___0", @@ -514,7 +518,7 @@ "refinement_interpretation_Tm_refine_8c81d20b67a6909c9a4ec95659f4bc57" ], 0, - "9661542d715ebb49de7e4e68b52da53a" + "3d7ed13284175dd868dd0b13441f36fb" ], [ "Pulse.Syntax.Naming.__proj__DT__item___1", @@ -651,7 +655,7 @@ "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t" ], 0, - "59c6b40b0cf411dfb67e6997322b86dd" + "033e4246732e14a28a7512e7e1e9ff73" ], [ "Pulse.Syntax.Naming.subst_comp", @@ -695,7 +699,7 @@ "projection_inverse_BoxBool_proj_0", "subterm_ordering_Prims.Cons" ], 0, - "006c46e4804442e47c8d332906bf712d" + "0ca66e5029a7b4327da565ac368e051d" ], [ "Pulse.Syntax.Naming.subst_st_term", @@ -713,7 +717,6 @@ "data_elim_Pulse.Syntax.Base.Tm_Match", "data_elim_Pulse.Syntax.Base.Tm_Par", "data_elim_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "data_elim_Pulse.Syntax.Base.Tm_Protect", "data_elim_Pulse.Syntax.Base.Tm_TotBind", "data_elim_Pulse.Syntax.Base.Tm_While", "data_elim_Pulse.Syntax.Base.Tm_WithLocal", @@ -727,7 +730,6 @@ "disc_equation_Pulse.Syntax.Base.Tm_Match", "disc_equation_Pulse.Syntax.Base.Tm_Par", "disc_equation_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "disc_equation_Pulse.Syntax.Base.Tm_Protect", "disc_equation_Pulse.Syntax.Base.Tm_Return", "disc_equation_Pulse.Syntax.Base.Tm_Rewrite", "disc_equation_Pulse.Syntax.Base.Tm_STApp", @@ -744,7 +746,6 @@ "projection_inverse_Pulse.Syntax.Base.Tm_If__0", "projection_inverse_Pulse.Syntax.Base.Tm_Match__0", "projection_inverse_Pulse.Syntax.Base.Tm_Par__0", - "projection_inverse_Pulse.Syntax.Base.Tm_Protect__0", "projection_inverse_Pulse.Syntax.Base.Tm_TotBind__0", "projection_inverse_Pulse.Syntax.Base.Tm_While__0", "projection_inverse_Pulse.Syntax.Base.Tm_WithLocal__0", @@ -755,7 +756,6 @@ "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload", - "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_TotBind__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_While__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_WithLocal__payload", @@ -765,14 +765,13 @@ "subterm_ordering_Pulse.Syntax.Base.Tm_Match", "subterm_ordering_Pulse.Syntax.Base.Tm_Par", "subterm_ordering_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "subterm_ordering_Pulse.Syntax.Base.Tm_Protect", "subterm_ordering_Pulse.Syntax.Base.Tm_TotBind", "subterm_ordering_Pulse.Syntax.Base.Tm_While", "subterm_ordering_Pulse.Syntax.Base.Tm_WithLocal", "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__term" ], 0, - "f77777458c441f779e029ba0895da584" + "5b0861b28dca21f626d994f52936e15d" ], [ "Pulse.Syntax.Naming.subst_st_term", @@ -781,7 +780,7 @@ 1, [ "@query", "equation_Pulse.Syntax.Base.branch" ], 0, - "98123a6046296f0d068ddf5f8e28098e" + "ae90774bd52037719aaf18a11c2fabe6" ], [ "Pulse.Syntax.Naming.subst_st_term", @@ -800,7 +799,7 @@ "subterm_ordering_FStar.Pervasives.Native.Mktuple2" ], 0, - "6c3853d2a4664971d125559aac479254" + "3f0af1fca6497683cd923eb68275da3c" ], [ "Pulse.Syntax.Naming.close_term_n", @@ -818,7 +817,7 @@ "subterm_ordering_Prims.Cons" ], 0, - "3e547cb84ff258219cc68c12a62b9235" + "5ae665cd3d3343858b450f2a34d56a01" ], [ "Pulse.Syntax.Naming.close_st_term_n", @@ -836,7 +835,7 @@ "subterm_ordering_Prims.Cons" ], 0, - "f770df2c2b3a59f9b4d79ffff7e65973" + "cb61fb7b407f6704601a4963a854166b" ], [ "Pulse.Syntax.Naming.close_open_inverse'", diff --git a/lib/steel/pulse/Pulse.Syntax.Printer.fst b/lib/steel/pulse/Pulse.Syntax.Printer.fst index 572988acd..e9c994063 100644 --- a/lib/steel/pulse/Pulse.Syntax.Printer.fst +++ b/lib/steel/pulse/Pulse.Syntax.Printer.fst @@ -1,6 +1,9 @@ module Pulse.Syntax.Printer open FStar.Printf open Pulse.Syntax.Base + +module L = FStar.List.Tot + module T = FStar.Tactics.V2 module Un = FStar.Sealed module R = FStar.Reflection.V2 @@ -79,6 +82,11 @@ let binder_to_string (b:binder) (T.unseal b.binder_ppname.name) (term_to_string b.binder_ty) +let ctag_to_string = function + | STT -> "ST" + | STT_Atomic -> "STAtomic" + | STT_Ghost -> "STGhost" + let comp_to_string (c:comp) : T.Tac string = match c with @@ -135,18 +143,18 @@ let rec st_term_to_string' (level:string) (t:st_term) (term_to_string arg) | Tm_Bind { binder; head; body } -> - if T.unseal binder.binder_ppname.name = "_" - then sprintf "%s;\n%s%s" - (st_term_to_string' level head) - level - (st_term_to_string' level body) - else ( + // if T.unseal binder.binder_ppname.name = "_" + // then sprintf "%s;\n%s%s" + // (st_term_to_string' level head) + // level + // (st_term_to_string' level body) + // else ( sprintf "let %s = %s;\n%s%s" (binder_to_string binder) (st_term_to_string' level head) level (st_term_to_string' level body) - ) + // ) | Tm_TotBind { head; body } -> sprintf "let tot _ = %s;\n%s%s" @@ -245,13 +253,11 @@ let rec st_term_to_string' (level:string) (t:st_term) | None -> "" | Some post -> sprintf " %s" (term_to_string post)) - | Tm_Protect { t } -> - sprintf "Protect(\n%s%s)" - level - (st_term_to_string' level t) - | Tm_ProofHintWithBinders { binders; v; t} -> - sprintf "assert %s in\n%s" + sprintf "assert %s%s in\n%s" + (if L.length binders = 0 then "" + else let s = L.fold_left (fun s _b -> Printf.sprintf "%s _" s) "" binders in + Printf.sprintf "%s." s) (term_to_string v) (st_term_to_string' level t) @@ -266,7 +272,6 @@ and branch_to_string br : T.Tac _ = let st_term_to_string t = st_term_to_string' "" t - let tag_of_term (t:term) = match t.t with | Tm_Emp -> "Tm_Emp" @@ -297,7 +302,6 @@ let tag_of_st_term (t:st_term) = | Tm_WithLocal _ -> "Tm_WithLocal" | Tm_Rewrite _ -> "Tm_Rewrite" | Tm_Admit _ -> "Tm_Admit" - | Tm_Protect _ -> "Tm_Protect" | Tm_ProofHintWithBinders _ -> "Tm_ProofHintWithBinders" let tag_of_comp (c:comp) : T.Tac string = @@ -313,7 +317,6 @@ let rec print_st_head (t:st_term) : Tot string (decreases t) = match t.term with | Tm_Abs _ -> "Abs" - | Tm_Protect p -> print_st_head p.t | Tm_Return p -> print_head p.term | Tm_Bind _ -> "Bind" | Tm_TotBind _ -> "TotBind" @@ -340,7 +343,6 @@ and print_head (t:term) = let rec print_skel (t:st_term) = match t.term with | Tm_Abs { body } -> Printf.sprintf "(fun _ -> %s)" (print_skel body) - | Tm_Protect { t=p } -> Printf.sprintf "(Protect %s)" (print_skel p) | Tm_Return { term = p } -> print_head p | Tm_Bind { head=e1; body=e2 } -> Printf.sprintf "(Bind %s %s)" (print_skel e1) (print_skel e2) | Tm_TotBind { body=e2 } -> Printf.sprintf "(TotBind _ %s)" (print_skel e2) diff --git a/lib/steel/pulse/Pulse.Syntax.Printer.fst.hints b/lib/steel/pulse/Pulse.Syntax.Printer.fst.hints index 100c8cf7d..b2f2a4fb9 100644 --- a/lib/steel/pulse/Pulse.Syntax.Printer.fst.hints +++ b/lib/steel/pulse/Pulse.Syntax.Printer.fst.hints @@ -1,5 +1,5 @@ [ - "3J.%\u0015Iͧ", + "#X&;|", [ [ "Pulse.Syntax.Printer.universe_to_string", @@ -21,7 +21,7 @@ "typing_FStar.Reflection.V2.Builtins.inspect_universe" ], 0, - "7f223d2be21c9d36d346054d67ca4db2" + "b3e8a17005de6ea1a903322553d56195" ], [ "Pulse.Syntax.Printer.univ_to_string", @@ -86,6 +86,22 @@ 0, "d31cbd3b9a8ba67870614a7275cab386" ], + [ + "Pulse.Syntax.Printer.ctag_to_string", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "disc_equation_Pulse.Syntax.Base.STT", + "disc_equation_Pulse.Syntax.Base.STT_Atomic", + "disc_equation_Pulse.Syntax.Base.STT_Ghost", + "fuel_guarded_inversion_Pulse.Syntax.Base.ctag", + "projection_inverse_BoxBool_proj_0" + ], + 0, + "6b02eea266efcb18c1f9686c25282ee4" + ], [ "Pulse.Syntax.Printer.comp_to_string", 1, @@ -103,7 +119,7 @@ "projection_inverse_BoxBool_proj_0", "string_typing" ], 0, - "4e86e5572f49a3b4249a1c51cbfbb9eb" + "18d6125b244426a4c390f4caead02d00" ], [ "Pulse.Syntax.Printer.term_opt_to_string", @@ -128,7 +144,6 @@ "Prims_pretyping_f537159ed795b314b4e58c260361ae86", "Pulse.Syntax.Base_pretyping_f0a71477fd567f96c0f87dffa5cea230", "bool_inversion", "bool_typing", - "constructor_distinct_FStar.Tactics.Result.Failed", "constructor_distinct_FStar.Tactics.Result.Success", "constructor_distinct_Pulse.Syntax.Base.STT", "data_elim_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload", @@ -146,7 +161,6 @@ "disc_equation_Pulse.Syntax.Base.Tm_Match", "disc_equation_Pulse.Syntax.Base.Tm_Par", "disc_equation_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "disc_equation_Pulse.Syntax.Base.Tm_Protect", "disc_equation_Pulse.Syntax.Base.Tm_Return", "disc_equation_Pulse.Syntax.Base.Tm_Rewrite", "disc_equation_Pulse.Syntax.Base.Tm_STApp", @@ -164,17 +178,13 @@ "proj_equation_Pulse.Syntax.Base.Mkst_term_term", "proj_equation_Pulse.Syntax.Base.Tm_IntroExists__0", "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Tactics.Result.Failed_a", - "projection_inverse_FStar.Tactics.Result.Failed_exn", - "projection_inverse_FStar.Tactics.Result.Failed_ps", "projection_inverse_FStar.Tactics.Result.Success_a", "projection_inverse_FStar.Tactics.Result.Success_ps", "projection_inverse_FStar.Tactics.Result.Success_v", - "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__term", - "typing_Pulse.Syntax.Base.uu___is_Tm_Admit" + "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__term" ], 0, - "b3de7d776243179ed748a5901d316f3c" + "ef932732105363abeba79862760f758e" ], [ "Pulse.Syntax.Printer.st_term_to_string'", @@ -231,7 +241,6 @@ "disc_equation_Pulse.Syntax.Base.Tm_Match", "disc_equation_Pulse.Syntax.Base.Tm_Par", "disc_equation_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "disc_equation_Pulse.Syntax.Base.Tm_Protect", "disc_equation_Pulse.Syntax.Base.Tm_Return", "disc_equation_Pulse.Syntax.Base.Tm_Rewrite", "disc_equation_Pulse.Syntax.Base.Tm_STApp", @@ -244,7 +253,7 @@ "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__term" ], 0, - "6b98248508ef72661ece9e25844c656f" + "30188921b5f3c08dc6e0483f51569678" ], [ "Pulse.Syntax.Printer.tag_of_comp", @@ -263,7 +272,7 @@ "projection_inverse_BoxBool_proj_0", "string_typing" ], 0, - "89dab05a58081998e1a0631ab5c887ce" + "2ba54512348ce5944431965ee5c805e5" ], [ "Pulse.Syntax.Printer.print_st_head", @@ -275,7 +284,6 @@ "Pulse.Syntax.Base_pretyping_01e6cbbfeab3ba416b144f2c9223a2d4", "binder_x_01e6cbbfeab3ba416b144f2c9223a2d4_0", "data_elim_Pulse.Syntax.Base.Mkst_term", - "data_elim_Pulse.Syntax.Base.Tm_Protect", "data_elim_Pulse.Syntax.Base.Tm_Return", "data_elim_Pulse.Syntax.Base.Tm_STApp", "disc_equation_Pulse.Syntax.Base.Tm_Abs", @@ -288,7 +296,6 @@ "disc_equation_Pulse.Syntax.Base.Tm_Match", "disc_equation_Pulse.Syntax.Base.Tm_Par", "disc_equation_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "disc_equation_Pulse.Syntax.Base.Tm_Protect", "disc_equation_Pulse.Syntax.Base.Tm_Return", "disc_equation_Pulse.Syntax.Base.Tm_Rewrite", "disc_equation_Pulse.Syntax.Base.Tm_STApp", @@ -297,26 +304,21 @@ "disc_equation_Pulse.Syntax.Base.Tm_WithLocal", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term_", - "fuel_guarded_inversion_Pulse.Syntax.Base.st_term___Tm_Protect__payload", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term___Tm_Return__payload", - "proj_equation_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload_t", "proj_equation_Pulse.Syntax.Base.Mkst_term___Tm_Return__payload_term", "proj_equation_Pulse.Syntax.Base.Mkst_term_term", "projection_inverse_BoxBool_proj_0", - "projection_inverse_Pulse.Syntax.Base.Tm_Protect__0", "projection_inverse_Pulse.Syntax.Base.Tm_Return__0", "projection_inverse_Pulse.Syntax.Base.Tm_STApp__0", "subterm_ordering_Pulse.Syntax.Base.Mkst_term", - "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Return__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_STApp__payload", - "subterm_ordering_Pulse.Syntax.Base.Tm_Protect", "subterm_ordering_Pulse.Syntax.Base.Tm_Return", "subterm_ordering_Pulse.Syntax.Base.Tm_STApp", "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__term" ], 0, - "8ebfe6d456e66c309cb152b0802584bb" + "29bfa818a6425ed0c0191598575c385a" ], [ "Pulse.Syntax.Printer.print_skel", @@ -330,7 +332,6 @@ "data_elim_Pulse.Syntax.Base.Mkst_term", "data_elim_Pulse.Syntax.Base.Tm_Abs", "data_elim_Pulse.Syntax.Base.Tm_Bind", - "data_elim_Pulse.Syntax.Base.Tm_Protect", "data_elim_Pulse.Syntax.Base.Tm_TotBind", "disc_equation_Pulse.Syntax.Base.Tm_Abs", "disc_equation_Pulse.Syntax.Base.Tm_Admit", @@ -342,7 +343,6 @@ "disc_equation_Pulse.Syntax.Base.Tm_Match", "disc_equation_Pulse.Syntax.Base.Tm_Par", "disc_equation_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "disc_equation_Pulse.Syntax.Base.Tm_Protect", "disc_equation_Pulse.Syntax.Base.Tm_Return", "disc_equation_Pulse.Syntax.Base.Tm_Rewrite", "disc_equation_Pulse.Syntax.Base.Tm_STApp", @@ -354,21 +354,18 @@ "proj_equation_Pulse.Syntax.Base.Mkst_term_term", "projection_inverse_BoxBool_proj_0", "projection_inverse_Pulse.Syntax.Base.Tm_Bind__0", - "projection_inverse_Pulse.Syntax.Base.Tm_Protect__0", "projection_inverse_Pulse.Syntax.Base.Tm_TotBind__0", "subterm_ordering_Pulse.Syntax.Base.Mkst_term", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Abs__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Bind__payload", - "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_TotBind__payload", "subterm_ordering_Pulse.Syntax.Base.Tm_Abs", "subterm_ordering_Pulse.Syntax.Base.Tm_Bind", - "subterm_ordering_Pulse.Syntax.Base.Tm_Protect", "subterm_ordering_Pulse.Syntax.Base.Tm_TotBind", "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__term" ], 0, - "c487ff876ddecf3527c1c7209b335d51" + "56ff58477a5d8a2994dfef84c0d82708" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Syntax.Printer.fsti b/lib/steel/pulse/Pulse.Syntax.Printer.fsti index 82e3a85d2..d5ec57d37 100644 --- a/lib/steel/pulse/Pulse.Syntax.Printer.fsti +++ b/lib/steel/pulse/Pulse.Syntax.Printer.fsti @@ -9,6 +9,7 @@ val univ_to_string (u:universe) : string val qual_to_string (q:option qualifier) : string val term_to_string (t:term) : T.Tac string val binder_to_string (b:binder) : T.Tac string +val ctag_to_string (c:ctag) : string val comp_to_string (c:comp) : T.Tac string val term_list_to_string (sep:string) (t:list term): T.Tac string val st_term_to_string (t:st_term) : T.Tac string diff --git a/lib/steel/pulse/Pulse.Syntax.Printer.fsti.hints b/lib/steel/pulse/Pulse.Syntax.Printer.fsti.hints index cabd1eddf..0a373540f 100644 --- a/lib/steel/pulse/Pulse.Syntax.Printer.fsti.hints +++ b/lib/steel/pulse/Pulse.Syntax.Printer.fsti.hints @@ -1 +1 @@ -[ "ZϮmȀ%u?\u0000\nc", [] ] \ No newline at end of file +[ "qd\u0006ٻ%\n/N\u0001", [] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Syntax.Pure.fst b/lib/steel/pulse/Pulse.Syntax.Pure.fst index 4636ed11c..8cc48c113 100644 --- a/lib/steel/pulse/Pulse.Syntax.Pure.fst +++ b/lib/steel/pulse/Pulse.Syntax.Pure.fst @@ -215,7 +215,7 @@ let unreveal (t:term) : option term = (match is_pure_app head with | Some (head, Some Implicit, _) -> (match is_fvar head with - | Some (l, []) -> + | Some (l, _) -> if l = ["FStar"; "Ghost"; "reveal"] then Some arg else None diff --git a/lib/steel/pulse/Pulse.Syntax.Pure.fst.hints b/lib/steel/pulse/Pulse.Syntax.Pure.fst.hints index 02e8a191f..00c933772 100644 --- a/lib/steel/pulse/Pulse.Syntax.Pure.fst.hints +++ b/lib/steel/pulse/Pulse.Syntax.Pure.fst.hints @@ -1,5 +1,5 @@ [ - "u\u001fI1o}\u0018 C", + "#\nI\f7h\t\u0011&\\", [ [ "Pulse.Syntax.Pure.op_let_Question", @@ -8,7 +8,7 @@ 1, [ "@query", "lemma_FStar.Pervasives.invertOption" ], 0, - "ab73d95fc189639b26e172aa29fa9dae" + "1d2aff30ec30b3d7c0d9e3c1a9e70f5c" ], [ "Pulse.Syntax.Pure.tm_bvar", @@ -367,7 +367,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "001ab24cb7d0b39c8c01f806e24ee236" + "4549e206d35ab4fb94a16faccbc72f94" ], [ "Pulse.Syntax.Pure.is_arrow_tm_arrow", @@ -379,7 +379,7 @@ "refinement_interpretation_Tm_refine_2de20c066034c13bf76e9c0b94f4806c" ], 0, - "4d8e80b969ecc47b7d1198c9d1ad3d18" + "6d43fcbd91338028489a6f97c2fc8c5e" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Typing.Combinators.fst b/lib/steel/pulse/Pulse.Typing.Combinators.fst index 7c830a922..07cc70f59 100644 --- a/lib/steel/pulse/Pulse.Typing.Combinators.fst +++ b/lib/steel/pulse/Pulse.Typing.Combinators.fst @@ -11,6 +11,87 @@ open Pulse.Syntax open Pulse.Typing open Pulse.Checker.Pure +let rec vprop_equiv_typing (#g:_) (#t0 #t1:term) (v:vprop_equiv g t0 t1) + : GTot ((tot_typing g t0 tm_vprop -> tot_typing g t1 tm_vprop) & + (tot_typing g t1 tm_vprop -> tot_typing g t0 tm_vprop)) + (decreases v) + = match v with + | VE_Refl _ _ -> (fun x -> x), (fun x -> x) + + | VE_Sym _ _ _ v' -> + let f, g = vprop_equiv_typing v' in + g, f + + | VE_Trans g t0 t2 t1 v02 v21 -> + let f02, f20 = vprop_equiv_typing v02 in + let f21, f12 = vprop_equiv_typing v21 in + (fun x -> f21 (f02 x)), + (fun x -> f20 (f12 x)) + + | VE_Ctxt g s0 s1 s0' s1' v0 v1 -> + let f0, f0' = vprop_equiv_typing v0 in + let f1, f1' = vprop_equiv_typing v1 in + let ff (x:tot_typing g (tm_star s0 s1) tm_vprop) + : tot_typing g (tm_star s0' s1') tm_vprop + = let s0_typing = star_typing_inversion_l x in + let s1_typing = star_typing_inversion_r x in + let s0'_typing, s1'_typing = f0 s0_typing, f1 s1_typing in + star_typing s0'_typing s1'_typing + in + let gg (x:tot_typing g (tm_star s0' s1') tm_vprop) + : tot_typing g (tm_star s0 s1) tm_vprop + = let s0'_typing = star_typing_inversion_l x in + let s1'_typing = star_typing_inversion_r x in + star_typing (f0' s0'_typing) (f1' s1'_typing) + in + ff, gg + + | VE_Unit g t -> + let fwd (x:tot_typing g (tm_star tm_emp t) tm_vprop) + : tot_typing g t tm_vprop + = let r = star_typing_inversion_r x in + r + in + let bk (x:tot_typing g t tm_vprop) + : tot_typing g (tm_star tm_emp t) tm_vprop + = star_typing emp_typing x + in + fwd, bk + + | VE_Comm g t0 t1 -> + let f t0 t1 (x:tot_typing g (tm_star t0 t1) tm_vprop) + : tot_typing g (tm_star t1 t0) tm_vprop + = let tt0 = star_typing_inversion_l x in + let tt1 = star_typing_inversion_r x in + star_typing tt1 tt0 + in + f t0 t1, f t1 t0 + + | VE_Assoc g t0 t1 t2 -> + let fwd (x:tot_typing g (tm_star t0 (tm_star t1 t2)) tm_vprop) + : tot_typing g (tm_star (tm_star t0 t1) t2) tm_vprop + = let tt0 = star_typing_inversion_l x in + let tt12 = star_typing_inversion_r x in + let tt1 = star_typing_inversion_l tt12 in + let tt2 = star_typing_inversion_r tt12 in + star_typing (star_typing tt0 tt1) tt2 + in + let bk (x : tot_typing g (tm_star (tm_star t0 t1) t2) tm_vprop) + : tot_typing g (tm_star t0 (tm_star t1 t2)) tm_vprop + = let tt01 = star_typing_inversion_l x in + let tt2 = star_typing_inversion_r x in + let tt0 = star_typing_inversion_l tt01 in + let tt1 = star_typing_inversion_r tt01 in + star_typing tt0 (star_typing tt1 tt2) + in + fwd, bk + + | VE_Ext g t0 t1 token -> + let d1, d2 = vprop_eq_typing_inversion g t0 t1 token in + (fun _ -> d2), + (fun _ -> d1) + + #push-options "--z3rlimit_factor 8 --ifuel 1 --fuel 2 --query_stats" let rec mk_bind (g:env) (pre:term) @@ -158,3 +239,34 @@ let add_frame (#g:env) (#t:st_term) (#c:comp_st) (t_typing:st_typing g t c) st_typing g t' c' = (| t, add_frame c frame, T_Frame _ _ _ _ frame_typing t_typing |) + +let apply_frame (#g:env) + (#t:st_term) + (#ctxt:term) + (ctxt_typing: tot_typing g ctxt tm_vprop) + (#c:comp { stateful_comp c }) + (t_typing: st_typing g t c) + (frame_t:frame_for_req_in_ctxt g ctxt (comp_pre c)) + : Tot (c':comp_st { comp_pre c' == ctxt /\ + comp_res c' == comp_res c /\ + comp_u c' == comp_u c /\ + comp_post c' == tm_star (comp_post c) (frame_of frame_t) } & + st_typing g t c') + = let s = st_comp_of_comp c in + let (| frame, frame_typing, ve |) = frame_t in + let t_typing + : st_typing g t (Pulse.Typing.add_frame c frame) + = T_Frame g t c frame frame_typing t_typing in + let c' = Pulse.Typing.add_frame c frame in + let c'_typing = Metatheory.st_typing_correctness t_typing in + let s' = st_comp_of_comp c' in + let ve: vprop_equiv g s'.pre ctxt = ve in + let s'' = { s' with pre = ctxt } in + let c'' = c' `with_st_comp` s'' in + assert (comp_post c' == comp_post c''); + let ve: vprop_equiv g (comp_pre c') (comp_pre c'') = ve in + let st_typing = Metatheory.comp_typing_inversion c'_typing in + let (| res_typing, pre_typing, x, post_typing |) = Metatheory.st_comp_typing_inversion st_typing in + let st_equiv = ST_VPropEquiv g c' c'' x pre_typing res_typing post_typing ve (VE_Refl _ _) in + let t_typing = T_Equiv _ _ _ _ t_typing st_equiv in + (| c'', t_typing |) diff --git a/lib/steel/pulse/Pulse.Typing.Combinators.fst.hints b/lib/steel/pulse/Pulse.Typing.Combinators.fst.hints index 0c8c6309b..f271b1f4a 100644 --- a/lib/steel/pulse/Pulse.Typing.Combinators.fst.hints +++ b/lib/steel/pulse/Pulse.Typing.Combinators.fst.hints @@ -1,6 +1,38 @@ [ - "wE* ,8t[K\u007f", + "\u0014Oɍ}ռuM^", [ + [ + "Pulse.Typing.Combinators.vprop_equiv_typing", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "binder_x_40f47b036cc24e11c7ed578f0b141555_1", + "binder_x_40f47b036cc24e11c7ed578f0b141555_2", + "binder_x_4aac6b0850125a17ce56a01cff360133_3", + "data_elim_Pulse.Typing.VE_Assoc", "data_elim_Pulse.Typing.VE_Comm", + "data_elim_Pulse.Typing.VE_Ctxt", "data_elim_Pulse.Typing.VE_Ext", + "data_elim_Pulse.Typing.VE_Refl", "data_elim_Pulse.Typing.VE_Sym", + "data_elim_Pulse.Typing.VE_Trans", "data_elim_Pulse.Typing.VE_Unit", + "disc_equation_Pulse.Typing.VE_Assoc", + "disc_equation_Pulse.Typing.VE_Comm", + "disc_equation_Pulse.Typing.VE_Ctxt", + "disc_equation_Pulse.Typing.VE_Ext", + "disc_equation_Pulse.Typing.VE_Refl", + "disc_equation_Pulse.Typing.VE_Sym", + "disc_equation_Pulse.Typing.VE_Trans", + "disc_equation_Pulse.Typing.VE_Unit", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "fuel_guarded_inversion_Pulse.Typing.vprop_equiv", + "projection_inverse_BoxBool_proj_0", + "subterm_ordering_Pulse.Typing.VE_Ctxt", + "subterm_ordering_Pulse.Typing.VE_Sym", + "subterm_ordering_Pulse.Typing.VE_Trans" + ], + 0, + "859ea77a78966a2d869cc5154a4da92d" + ], [ "Pulse.Typing.Combinators.mk_bind", 1, @@ -24,7 +56,7 @@ "refinement_interpretation_Tm_refine_c3db93a75dbfff93223215a880c044ae" ], 0, - "90827240f023495699ff3e2568daa748" + "8314a61ab4d977cecb76eb0c0fa44440" ], [ "Pulse.Typing.Combinators.mk_bind", @@ -204,7 +236,7 @@ "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" ], 0, - "19b9bf363a11d18bed4ce9c50b60517a" + "14bfd4cf3cae0fb86632bc6d6353b743" ], [ "Pulse.Typing.Combinators.bind_res_and_post_typing", @@ -217,7 +249,7 @@ "projection_inverse_BoxBool_proj_0" ], 0, - "b9b5fb72f5ffe1e758803622e60d4e80" + "3ec49e529da373989445fec620155551" ], [ "Pulse.Typing.Combinators.bind_res_and_post_typing", @@ -270,7 +302,166 @@ "typing_Pulse.Typing.Env.as_map" ], 0, - "7c45cfea7d3dccb30277d44b30e3aa2d" + "1dd5402f90b7e0b4c82b98823f815eb7" + ], + [ + "Pulse.Typing.Combinators.apply_frame", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.stateful_comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" + ], + 0, + "646a7382312d6ac80540b163487858ae" + ], + [ + "Pulse.Typing.Combinators.apply_frame", + 2, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "Pulse.Syntax.Base_pretyping_b015b044c5bf00a3dd3df9fa711c87dd", + "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_Pulse.Syntax.Base.C_ST", + "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", + "constructor_distinct_Pulse.Syntax.Base.C_STGhost", + "data_elim_FStar.Pervasives.Mkdtuple3", + "data_elim_FStar.Pervasives.Mkdtuple4", + "data_elim_Pulse.Syntax.Base.Mkst_comp", + "data_elim_Pulse.Typing.STC", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_FStar.Pervasives.Native.fst", + "equation_FStar.Pervasives.Native.snd", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.comp_post", + "equation_Pulse.Syntax.Base.comp_pre", + "equation_Pulse.Syntax.Base.comp_res", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.comp_u", + "equation_Pulse.Syntax.Base.ppname_default", + "equation_Pulse.Syntax.Base.st_comp_of_comp", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.tm_star", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Syntax.Base.vprop", + "equation_Pulse.Syntax.Base.with_st_comp", + "equation_Pulse.Typing.Combinators.frame_for_req_in_ctxt", + "equation_Pulse.Typing.Combinators.frame_of", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.add_frame", "equation_Pulse.Typing.fresh_wrt", + "equation_Pulse.Typing.st_equiv_pre", + "fuel_guarded_inversion_FStar.Pervasives.dtuple3", + "fuel_guarded_inversion_FStar.Pervasives.dtuple4", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "fuel_guarded_inversion_Pulse.Typing.st_comp_typing", + "interpretation_Tm_abs_c8631188b49e797b2c9232f71b480642", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", "primitive_Prims.op_BarBar", + "proj_equation_FStar.Pervasives.Native.Mktuple2__1", + "proj_equation_FStar.Pervasives.Native.Mktuple2__2", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_pre", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_res", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_u", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Mkdtuple3__1", + "projection_inverse_FStar.Pervasives.Mkdtuple4__3", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", + "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", + "projection_inverse_Pulse.Syntax.Base.C_ST__0", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_post", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_pre", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_res", + "projection_inverse_Pulse.Syntax.Base.Mkst_comp_u", + "refinement_interpretation_Tm_refine_385f59c31213d29cc308b93df5d99dc9", + "refinement_interpretation_Tm_refine_51ce27dbef61de85828cfe7017f500b6", + "refinement_interpretation_Tm_refine_6067909eb7e26441b043722acc4cd3cf", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", + "typing_FStar.Map.contains", "typing_FStar.Reflection.V2.Data.var", + "typing_FStar.Set.mem", + "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__post", + "typing_Pulse.Syntax.Base.stateful_comp", + "typing_Pulse.Syntax.Naming.freevars", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Metatheory.Base.st_comp_typing_inversion" + ], + 0, + "a03258934f96b7023f6e51010fe9e738" + ], + [ + "Pulse.Typing.Combinators.st_typing_in_ctxt", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.stateful_comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" + ], + 0, + "78ab3e65865f41ce01a26a7d98bcb368" + ], + [ + "Pulse.Typing.Combinators.vprop_as_list", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "binder_x_40f47b036cc24e11c7ed578f0b141555_0", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "proj_equation_Pulse.Syntax.Base.Mkterm_t", + "subterm_ordering_Pulse.Syntax.Base.Mkterm", + "subterm_ordering_Pulse.Syntax.Base.Tm_Star", + "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t" + ], + 0, + "e5dd7a04680fae17436d8800ba00c44b" + ], + [ + "Pulse.Typing.Combinators.list_as_vprop", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "binder_x_ce31d037e7efe7dd857e44eb91ef874d_0", + "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", + "fuel_guarded_inversion_Prims.list", + "projection_inverse_BoxBool_proj_0", "subterm_ordering_Prims.Cons" + ], + 0, + "69884340bf5c48e0999661da10b3014e" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Typing.Combinators.fsti b/lib/steel/pulse/Pulse.Typing.Combinators.fsti index c3d392adf..fb0835d57 100644 --- a/lib/steel/pulse/Pulse.Typing.Combinators.fsti +++ b/lib/steel/pulse/Pulse.Typing.Combinators.fsti @@ -11,6 +11,10 @@ let st_comp_with_pre (st:st_comp) (pre:term) : st_comp = { st with pre } let nvar_as_binder (x:nvar) (t:term) : binder = {binder_ty=t;binder_ppname=fst x} +val vprop_equiv_typing (#g:_) (#t0 #t1:term) (v:vprop_equiv g t0 t1) + : GTot ((tot_typing g t0 tm_vprop -> tot_typing g t1 tm_vprop) & + (tot_typing g t1 tm_vprop -> tot_typing g t0 tm_vprop)) + val mk_bind (g:env) (pre:term) (e1:st_term) @@ -49,3 +53,42 @@ val add_frame (#g:env) (#t:st_term) (#c:comp_st) (t_typing:st_typing g t c) : t':st_term & c':comp_st { c' == add_frame c frame } & st_typing g t' c' + +let frame_for_req_in_ctxt (g:env) (ctxt:term) (req:term) + = (frame:term & + tot_typing g frame tm_vprop & + vprop_equiv g (tm_star req frame) ctxt) + +let frame_of #g #ctxt #req (f:frame_for_req_in_ctxt g ctxt req) = + let (| frame, _, _ |) = f in frame + +val apply_frame (#g:env) + (#t:st_term) + (#ctxt:term) + (ctxt_typing: tot_typing g ctxt tm_vprop) + (#c:comp { stateful_comp c }) + (t_typing: st_typing g t c) + (frame_t:frame_for_req_in_ctxt g ctxt (comp_pre c)) + : Tot (c':comp_st { comp_pre c' == ctxt /\ + comp_res c' == comp_res c /\ + comp_u c' == comp_u c /\ + comp_post c' == tm_star (comp_post c) (frame_of frame_t) } & + st_typing g t c') + +type st_typing_in_ctxt (g:env) (ctxt:vprop) (post_hint:post_hint_opt g) = + t:st_term & + c:comp_st { comp_pre c == ctxt /\ comp_post_matches_hint c post_hint } & + st_typing g t c + +let rec vprop_as_list (vp:term) + : list term + = match vp.t with + | Tm_Emp -> [] + | Tm_Star vp0 vp1 -> vprop_as_list vp0 @ vprop_as_list vp1 + | _ -> [vp] + +let rec list_as_vprop (vps:list term) + : term + = match vps with + | [] -> tm_emp + | hd::tl -> tm_star hd (list_as_vprop tl) diff --git a/lib/steel/pulse/Pulse.Typing.Combinators.fsti.hints b/lib/steel/pulse/Pulse.Typing.Combinators.fsti.hints index 2c5dd070d..128e26fdd 100644 --- a/lib/steel/pulse/Pulse.Typing.Combinators.fsti.hints +++ b/lib/steel/pulse/Pulse.Typing.Combinators.fsti.hints @@ -1,5 +1,5 @@ [ - "\u0010r\u00063V\u0015Z2@~`", + "ʱh\u001a\u000bm}\u0016\t\u001e\u000f(", [ [ "Pulse.Typing.Combinators.mk_bind", @@ -24,7 +24,7 @@ "refinement_interpretation_Tm_refine_c3db93a75dbfff93223215a880c044ae" ], 0, - "154724536e1aa78dbff5cbf6512ab767" + "333378589454f4d53a828ec06d1f8bf3" ], [ "Pulse.Typing.Combinators.bind_res_and_post_typing", @@ -50,6 +50,78 @@ ], 0, "1df2a3981307c0c965fcfc8522010e9a" + ], + [ + "Pulse.Typing.Combinators.apply_frame", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.stateful_comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" + ], + 0, + "738989b9ddcdb4ca0caee5215102f2c0" + ], + [ + "Pulse.Typing.Combinators.st_typing_in_ctxt", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.stateful_comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" + ], + 0, + "01f5330de3aa1eba607b0f3375183198" + ], + [ + "Pulse.Typing.Combinators.vprop_as_list", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "binder_x_40f47b036cc24e11c7ed578f0b141555_0", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "proj_equation_Pulse.Syntax.Base.Mkterm_t", + "subterm_ordering_Pulse.Syntax.Base.Mkterm", + "subterm_ordering_Pulse.Syntax.Base.Tm_Star", + "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t" + ], + 0, + "e5dd7a04680fae17436d8800ba00c44b" + ], + [ + "Pulse.Typing.Combinators.list_as_vprop", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "binder_x_ce31d037e7efe7dd857e44eb91ef874d_0", + "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", + "fuel_guarded_inversion_Prims.list", + "projection_inverse_BoxBool_proj_0", "subterm_ordering_Prims.Cons" + ], + 0, + "69884340bf5c48e0999661da10b3014e" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Typing.Env.fst b/lib/steel/pulse/Pulse.Typing.Env.fst index 92942f411..02753b85b 100644 --- a/lib/steel/pulse/Pulse.Typing.Env.fst +++ b/lib/steel/pulse/Pulse.Typing.Env.fst @@ -110,6 +110,10 @@ let push_env_assoc g1 g2 g3 = L.append_assoc g3.bs g2.bs g1.bs; assert (equal (push_env g1 (push_env g2 g3)) (push_env (push_env g1 g2) g3)) +let check_disjoint g s = + admit (); + not (L.existsb (fun (x, _) -> Set.mem x s) g.bs) + let rec remove_binding_aux (g:env) (prefix:list (var & typ)) (prefix_names:list ppname { List.length prefix == List.length prefix_names}) @@ -258,6 +262,17 @@ let extends_with_push (g1 g2 g3:env) assert (equal (push_binding g1 x n t) (push_env g2 (push_binding g3 x n t))) +#push-options "--admit_smt_queries true" +let rec subst_env (en:env) (ss:subst) + : en':env { fstar_env en == fstar_env en' /\ + dom en == dom en' } = + match bindings en with + | [] -> en + | _ -> + let x, t, en = remove_latest_binding en in + push_binding (subst_env en ss) x ppname_default (subst_term t ss) +#pop-options + let push_context g ctx r = { g with ctxt = Pulse.RuntimeUtils.extend_context ctx (Some r) g.ctxt } let push_context_no_range g ctx = { g with ctxt = Pulse.RuntimeUtils.extend_context ctx None g.ctxt } @@ -316,8 +331,8 @@ let print_issues (g:env) = String.concat "\n" (T.map (print_issue g) i) let env_to_string (e:env) : T.Tac string = - let bs = T.map - (fun ((_, t), x) -> Printf.sprintf "%s : %s" (T.unseal x.name) (Pulse.Syntax.Printer.term_to_string t)) + let bs = T.map #((var & _) & _) #_ + (fun ((n, t), x) -> Printf.sprintf "%s#%d : %s" (T.unseal x.name) n (Pulse.Syntax.Printer.term_to_string t)) (T.zip e.bs e.names) in String.concat "\n " bs diff --git a/lib/steel/pulse/Pulse.Typing.Env.fst.hints b/lib/steel/pulse/Pulse.Typing.Env.fst.hints index 38656eb56..04fcb43c4 100644 --- a/lib/steel/pulse/Pulse.Typing.Env.fst.hints +++ b/lib/steel/pulse/Pulse.Typing.Env.fst.hints @@ -1,5 +1,5 @@ [ - "\u000e\u0005z&\r5\u000bz", + "F Set.disjoint s (dom g)} + // removes the binding that was added first // leftmost when we write env on paper val remove_binding (g:env { Cons? (bindings g) }) @@ -158,6 +165,10 @@ val extends_with_push (g1 g2 g3:env) SMTPat (push_binding g1 x n t); SMTPat (push_binding g3 x n t)] +val subst_env (en:env) (ss:subst) + : en':env { fstar_env en == fstar_env en' /\ + dom en == dom en' } + val push_context (g:env) (ctx:string) (r:range) : g':env { g' == g } val push_context_no_range (g:env) (ctx:string) : g':env { g' == g } val get_context (g:env) : Pulse.RuntimeUtils.context diff --git a/lib/steel/pulse/Pulse.Typing.Env.fsti.hints b/lib/steel/pulse/Pulse.Typing.Env.fsti.hints index 411a08535..669f23101 100644 --- a/lib/steel/pulse/Pulse.Typing.Env.fsti.hints +++ b/lib/steel/pulse/Pulse.Typing.Env.fsti.hints @@ -1,5 +1,5 @@ [ - "}T)`˾\u007f\u0007\u0013Հ", + "|\u0011\u0002!\u0014w.rg\n", [ [ "Pulse.Typing.Env.as_map", @@ -14,7 +14,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "24c90a8e939eb99015fdc01fdc47f1ff" + "a9abc4a459987951398a12f4421c30fb" ], [ "Pulse.Typing.Env.is_related_to", @@ -91,6 +91,20 @@ 0, "031253dd18a2ee8e170f1f00fb00a2f2" ], + [ + "Pulse.Typing.Env.singleton_env", + 1, + 2, + 1, + [ + "@query", "equation_FStar.Reflection.V2.Data.var", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", + "lemma_FStar.Set.mem_empty", "lemma_Pulse.Typing.Env.mk_env_dom", + "typing_FStar.Reflection.V2.Data.var" + ], + 0, + "e36048a888a73994ebc88dfe71d3fe05" + ], [ "Pulse.Typing.Env.push_binding_def", 1, @@ -104,7 +118,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "bfd6222636fb0d1900d35ea768ae3b02" + "1aac05b50a7c930877f55b0fb476c318" ], [ "Pulse.Typing.Env.push_binding_bs", @@ -210,7 +224,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "2a5d27251fc813a6b92f9be95b4b2649" + "0d6c2829d2f23980b1aa299f82a16371" ], [ "Pulse.Typing.Env.push_env_bindings", @@ -247,6 +261,7 @@ 1, [ "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.disjoint", "equation_Prims.nat", "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", @@ -272,6 +287,21 @@ 0, "0064d5a91097c495fe83dac614915548" ], + [ + "Pulse.Typing.Env.check_disjoint", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", + "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" + ], + 0, + "9d3b3f63bd627c8803f302168ac2ba5e" + ], [ "Pulse.Typing.Env.remove_binding", 1, @@ -307,7 +337,7 @@ "typing_Pulse.Typing.Env.fstar_env", "typing_Pulse.Typing.Env.mk_env" ], 0, - "4749ac2a35c661b065229570604d20d6" + "11ccf867f6a4a077af7d3af746945620" ], [ "Pulse.Typing.Env.remove_latest_binding", @@ -346,7 +376,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "5c83059d3b4a0bbf78b7d13543e30175" + "4d87ab69f875db65dddfbb7cb5b9ca74" ], [ "Pulse.Typing.Env.extends_with_push", @@ -376,6 +406,21 @@ 0, "5db3c5924abc18a18c0159d103147d69" ], + [ + "Pulse.Typing.Env.subst_env", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", + "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" + ], + 0, + "9d1e5b1603538e7083eb328cfcbd7c14" + ], [ "Pulse.Typing.Env.fail", 1, @@ -386,7 +431,7 @@ "data_typing_intro_FStar.Tactics.Result.Failed@tok" ], 0, - "80933249c0df95a76a4c1d8afbbd9fb1" + "6564078578e4487de731b9b675ab3d56" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Typing.FV.fst b/lib/steel/pulse/Pulse.Typing.FV.fst index 61c9f02a8..ea39f1ff7 100644 --- a/lib/steel/pulse/Pulse.Typing.FV.fst +++ b/lib/steel/pulse/Pulse.Typing.FV.fst @@ -157,9 +157,6 @@ let rec freevars_close_st_term' (t:st_term) (x:var) (i:index) freevars_close_term' typ x i; freevars_close_term_opt' post x (i + 1) - | Tm_Protect { t } -> - freevars_close_st_term' t x i - | Tm_ProofHintWithBinders { binders; v; t } -> let n = L.length binders in freevars_close_term' v x (i + n); diff --git a/lib/steel/pulse/Pulse.Typing.FV.fst.hints b/lib/steel/pulse/Pulse.Typing.FV.fst.hints index 1689a979e..81deb857c 100644 --- a/lib/steel/pulse/Pulse.Typing.FV.fst.hints +++ b/lib/steel/pulse/Pulse.Typing.FV.fst.hints @@ -1,5 +1,5 @@ [ - "9ΜE\u0010\u001b\u00014\rU", + "]\u0003\u0012sx\u0002^", [ [ "Pulse.Typing.FV.freevars_close_term_host_term", @@ -15,7 +15,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "b5a0a1df3c6a39f0b7527fd625b70f9b" + "1edaf04da4f0ed40207c7aa280edb921" ], [ "Pulse.Typing.FV.freevars_close_term'", @@ -65,6 +65,7 @@ "constructor_distinct_Pulse.Syntax.Naming.ND", "data_elim_Prims.Cons", "data_elim_Pulse.Syntax.Base.Mkterm", "data_elim_Pulse.Syntax.Base.Tm_ExistsSL", + "data_elim_Pulse.Syntax.Base.Tm_ForallSL", "data_typing_intro_Prims.Cons@tok", "data_typing_intro_Prims.Nil@tok", "data_typing_intro_Pulse.Syntax.Naming.ND@tok", @@ -395,7 +396,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "5a2661dc3d23a2f3142b3bc88ec54bb3" + "e7fcdfbf940cc9d9928ea7d699239bfe" ], [ "Pulse.Typing.FV.freevars_close_st_term'", @@ -431,7 +432,6 @@ "constructor_distinct_Pulse.Syntax.Base.Tm_IntroPure", "constructor_distinct_Pulse.Syntax.Base.Tm_Par", "constructor_distinct_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "constructor_distinct_Pulse.Syntax.Base.Tm_Protect", "constructor_distinct_Pulse.Syntax.Base.Tm_Return", "constructor_distinct_Pulse.Syntax.Base.Tm_Rewrite", "constructor_distinct_Pulse.Syntax.Base.Tm_STApp", @@ -445,7 +445,6 @@ "data_elim_Pulse.Syntax.Base.Tm_If", "data_elim_Pulse.Syntax.Base.Tm_Par", "data_elim_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "data_elim_Pulse.Syntax.Base.Tm_Protect", "data_elim_Pulse.Syntax.Base.Tm_TotBind", "data_elim_Pulse.Syntax.Base.Tm_While", "data_elim_Pulse.Syntax.Base.Tm_WithLocal", @@ -463,7 +462,6 @@ "disc_equation_Pulse.Syntax.Base.Tm_Match", "disc_equation_Pulse.Syntax.Base.Tm_Par", "disc_equation_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "disc_equation_Pulse.Syntax.Base.Tm_Protect", "disc_equation_Pulse.Syntax.Base.Tm_Return", "disc_equation_Pulse.Syntax.Base.Tm_Rewrite", "disc_equation_Pulse.Syntax.Base.Tm_STApp", @@ -492,6 +490,7 @@ "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term_", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term___Tm_Bind__payload", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term___Tm_If__payload", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term___Tm_ProofHintWithBinders__payload", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term___Tm_TotBind__payload", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term___Tm_WithLocal__payload", @@ -542,7 +541,6 @@ "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload_binders", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload_t", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload_v", - "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload_t", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Return__payload_ctag", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Return__payload_insert_eq", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Return__payload_term", @@ -570,7 +568,6 @@ "projection_inverse_Pulse.Syntax.Base.Tm_IntroPure__0", "projection_inverse_Pulse.Syntax.Base.Tm_Par__0", "projection_inverse_Pulse.Syntax.Base.Tm_ProofHintWithBinders__0", - "projection_inverse_Pulse.Syntax.Base.Tm_Protect__0", "projection_inverse_Pulse.Syntax.Base.Tm_Return__0", "projection_inverse_Pulse.Syntax.Base.Tm_Rewrite__0", "projection_inverse_Pulse.Syntax.Base.Tm_STApp__0", @@ -579,8 +576,8 @@ "projection_inverse_Pulse.Syntax.Base.Tm_WithLocal__0", "projection_inverse_Pulse.Syntax.Naming.ND__0", "projection_inverse_Pulse.Syntax.Naming.ND__1", + "refinement_interpretation_Tm_refine_0b587af9737b58041652f2a5c99e1772", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "refinement_interpretation_Tm_refine_4643bfc2c00d970d2a2628a6bf311d60", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "subterm_ordering_Pulse.Syntax.Base.Mkst_term", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Abs__payload", @@ -588,7 +585,6 @@ "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_If__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload", - "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_TotBind__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_While__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_WithLocal__payload", @@ -597,7 +593,6 @@ "subterm_ordering_Pulse.Syntax.Base.Tm_If", "subterm_ordering_Pulse.Syntax.Base.Tm_Par", "subterm_ordering_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "subterm_ordering_Pulse.Syntax.Base.Tm_Protect", "subterm_ordering_Pulse.Syntax.Base.Tm_TotBind", "subterm_ordering_Pulse.Syntax.Base.Tm_While", "subterm_ordering_Pulse.Syntax.Base.Tm_WithLocal", @@ -630,7 +625,7 @@ "typing_Pulse.Typing.FV.set_minus" ], 0, - "e40e6b91563663b3ce1f50495879095d" + "8c2bba28f667d93edac8e9dfd78f7877" ], [ "Pulse.Typing.FV.freevars_close_term", @@ -1003,7 +998,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "93ea785c585816c674d7f2370781848c" + "c871227beff51f1bdaeabffc30dc6445" ], [ "Pulse.Typing.FV.vprop_equiv_freevars", @@ -1167,6 +1162,7 @@ "typing_Pulse.Syntax.Base.comp_res", "typing_Pulse.Syntax.Base.ppname_default", "typing_Pulse.Syntax.Base.stateful_comp", + "typing_Pulse.Syntax.Base.uu___is_C_Tot", "typing_Pulse.Syntax.Base.v_as_nv", "typing_Pulse.Syntax.Naming.freevars", "typing_Pulse.Syntax.Naming.freevars_comp", @@ -1542,7 +1538,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "23188149c7202e9ab310fe65953e6680" + "7e93fa6f1e3c574eb5f15865ff3f9f62" ], [ "Pulse.Typing.FV.st_typing_freevars", @@ -1553,20 +1549,22 @@ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.Reflection.Typing.freevars.fuel_instrumented", "@fuel_correspondence_FStar.Reflection.V2.Derived.mk_app.fuel_instrumented", + "@fuel_correspondence_Pulse.Elaborate.Pure.elab_term.fuel_instrumented", "@fuel_correspondence_Pulse.Syntax.Naming.freevars.fuel_instrumented", "@fuel_correspondence_Pulse.Syntax.Naming.freevars_list.fuel_instrumented", "@fuel_correspondence_Pulse.Syntax.Naming.freevars_st.fuel_instrumented", "@fuel_correspondence_Pulse.Syntax.Naming.subst_term.fuel_instrumented", + "@fuel_irrelevance_FStar.Reflection.Typing.freevars.fuel_instrumented", "@fuel_irrelevance_Pulse.Syntax.Naming.freevars.fuel_instrumented", "@fuel_irrelevance_Pulse.Syntax.Naming.freevars_st.fuel_instrumented", "@query", "FStar.Reflection.Types_pretyping_8632d594431d6c78cb2dd50457d25394", + "FStar.Reflection.V2.Data_pretyping_f60681fbcdc25fab56ef0ee7d5de8af8", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", "Prims_pretyping_f8666440faa91836cc5a13998af863fc", "Pulse.Syntax.Base_pretyping_0b425ab385a56835d52cd71c18622a32", "Pulse.Syntax.Base_pretyping_782a0dad287a00f5de8c110e3ddaeab3", "Pulse.Syntax.Base_pretyping_fe09dc1e796799f4bac0760e63f30d40", - "Pulse.Syntax.Naming_interpretation_Tm_arrow_3599716e433ba3f225adaddbec6624af", "binder_x_01e6cbbfeab3ba416b144f2c9223a2d4_1", "binder_x_0401a96b6205c6354bafd83b7f4a3e6d_3", "binder_x_1ad99e5433effa849e32ef9adfa111a0_0", @@ -1574,9 +1572,11 @@ "constructor_distinct_FStar.Pervasives.Native.None", "constructor_distinct_FStar.Pervasives.Native.Some", "constructor_distinct_FStar.Reflection.Types.term", + "constructor_distinct_FStar.Reflection.V2.Data.Tv_App", "constructor_distinct_FStar.Reflection.V2.Data.Tv_Const", "constructor_distinct_FStar.Reflection.V2.Data.Tv_FVar", "constructor_distinct_FStar.Reflection.V2.Data.Tv_Type", + "constructor_distinct_FStar.Reflection.V2.Data.Tv_UInst", "constructor_distinct_FStar.Reflection.V2.Data.Tv_Var", "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", "constructor_distinct_Prims.unit", @@ -1628,10 +1628,15 @@ "data_elim_Pulse.Typing.T_Rewrite", "data_elim_Pulse.Typing.T_STApp", "data_elim_Pulse.Typing.T_TotBind", "data_elim_Pulse.Typing.T_While", "data_elim_Pulse.Typing.T_WithLocal", + "data_typing_intro_FStar.Pervasives.Native.Mktuple2@tok", + "data_typing_intro_FStar.Pervasives.Native.None@tok", "data_typing_intro_FStar.Pervasives.Native.Some@tok", + "data_typing_intro_FStar.Reflection.V2.Data.Q_Explicit@tok", + "data_typing_intro_FStar.Reflection.V2.Data.Tv_App@tok", "data_typing_intro_FStar.Reflection.V2.Data.Tv_Const@tok", "data_typing_intro_FStar.Reflection.V2.Data.Tv_FVar@tok", "data_typing_intro_FStar.Reflection.V2.Data.Tv_Type@tok", + "data_typing_intro_FStar.Reflection.V2.Data.Tv_UInst@tok", "data_typing_intro_FStar.Reflection.V2.Data.Tv_Var@tok", "data_typing_intro_Prims.Cons@tok", "data_typing_intro_Prims.Nil@tok", @@ -1682,12 +1687,14 @@ "equation_FStar.Reflection.Typing.unit_fv", "equation_FStar.Reflection.Typing.unit_ty", "equation_FStar.Reflection.V2.Data.argv", + "equation_FStar.Reflection.V2.Data.universes", "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Sealed.Inhabited.sealed", "equation_FStar.Sealed.Inhabited.sealed_", "equation_FStar.Set.subset", "equation_Prims.eqtype", "equation_Prims.nat", "equation_Pulse.Reflection.Util.bool_lid", "equation_Pulse.Reflection.Util.erased_lid", + "equation_Pulse.Reflection.Util.tuple2_lid", "equation_Pulse.Reflection.Util.unit_lid", "equation_Pulse.Syntax.Base.as_binder", "equation_Pulse.Syntax.Base.as_fv", @@ -1754,15 +1761,17 @@ "equation_Pulse.Typing.comp_return", "equation_Pulse.Typing.comp_rewrite", "equation_Pulse.Typing.comp_while", - "equation_Pulse.Typing.comp_while_cond", + "equation_Pulse.Typing.comp_while_body", "equation_Pulse.Typing.elim_exists_post", "equation_Pulse.Typing.mk_eq2", "equation_Pulse.Typing.mk_eq2_prop", - "equation_Pulse.Typing.mk_ref", "equation_Pulse.Typing.mk_reveal", + "equation_Pulse.Typing.mk_erased", "equation_Pulse.Typing.mk_ref", + "equation_Pulse.Typing.mk_snd", "equation_Pulse.Typing.mk_tuple2", "equation_Pulse.Typing.named_binder", "equation_Pulse.Typing.par_post", "equation_Pulse.Typing.tm_bool", "equation_Pulse.Typing.tm_false", "equation_Pulse.Typing.tm_prop", "equation_Pulse.Typing.tm_unit", "equation_Pulse.Typing.wr", "equation_with_fuel_FStar.Reflection.Typing.freevars.fuel_instrumented", + "equation_with_fuel_FStar.Reflection.V2.Derived.mk_app.fuel_instrumented", "equation_with_fuel_Pulse.Elaborate.Pure.elab_term.fuel_instrumented", "equation_with_fuel_Pulse.Syntax.Naming.freevars.fuel_instrumented", "equation_with_fuel_Pulse.Syntax.Naming.freevars_list.fuel_instrumented", @@ -1778,11 +1787,14 @@ "fuel_guarded_inversion_Pulse.Typing.lift_comp", "fuel_guarded_inversion_Pulse.Typing.st_comp_typing", "fuel_guarded_inversion_Pulse.Typing.st_typing", + "function_token_typing_FStar.Reflection.Types.term", + "function_token_typing_FStar.Reflection.Types.universe", + "function_token_typing_FStar.Reflection.V2.Data.argv", "function_token_typing_Prims.int", "function_token_typing_Prims.string", - "function_token_typing_Pulse.Syntax.Naming.freevars", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", - "int_typing", "kinding_Pulse.Syntax.Base.ppname@tok", + "int_typing", "kinding_FStar.Reflection.V2.Data.aqualv@tok", + "kinding_Pulse.Syntax.Base.ppname@tok", "kinding_Pulse.Syntax.Base.qualifier@tok", "kinding_Pulse.Syntax.Base.term@tok", "kinding_Pulse.Syntax.Naming.subst_elt@tok", @@ -1830,9 +1842,13 @@ "projection_inverse_FStar.Pervasives.Native.Some_a", "projection_inverse_FStar.Pervasives.Native.Some_v", "projection_inverse_FStar.Reflection.V2.Data.Mknamedv_view_uniq", + "projection_inverse_FStar.Reflection.V2.Data.Tv_App_a", + "projection_inverse_FStar.Reflection.V2.Data.Tv_App_hd", "projection_inverse_FStar.Reflection.V2.Data.Tv_Const__0", "projection_inverse_FStar.Reflection.V2.Data.Tv_FVar_v", "projection_inverse_FStar.Reflection.V2.Data.Tv_Type__0", + "projection_inverse_FStar.Reflection.V2.Data.Tv_UInst_us", + "projection_inverse_FStar.Reflection.V2.Data.Tv_UInst_v", "projection_inverse_FStar.Reflection.V2.Data.Tv_Var_v", "projection_inverse_Prims.Cons_a", "projection_inverse_Prims.Cons_hd", @@ -1944,6 +1960,7 @@ "refinement_interpretation_Tm_refine_d79470205dca7f56c9b5a5da9d23b961", "refinement_interpretation_Tm_refine_f2631f1e9df7e7fe731df0b4c6310657", "refinement_interpretation_Tm_refine_f327b3b66854e57c59289f8c259581e7", + "refinement_interpretation_Tm_refine_f39ae41739caa6a3420811af45940127", "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "string_typing", "subterm_ordering_Pulse.Typing.T_Abs", "subterm_ordering_Pulse.Typing.T_Bind", @@ -1955,16 +1972,16 @@ "subterm_ordering_Pulse.Typing.T_TotBind", "subterm_ordering_Pulse.Typing.T_While", "subterm_ordering_Pulse.Typing.T_WithLocal", + "token_correspondence_FStar.Reflection.Typing.freevars.fuel_instrumented", "token_correspondence_Pulse.Elaborate.Pure.elab_term.fuel_instrumented", "token_correspondence_Pulse.Syntax.Naming.freevars.fuel_instrumented", "token_correspondence_Pulse.Syntax.Naming.freevars_st.fuel_instrumented", "token_correspondence_Pulse.Syntax.Naming.subst_term.fuel_instrumented", "typing_FStar.Map.contains", "typing_FStar.Pervasives.Native.fst", - "typing_FStar.Pervasives.Native.snd", + "typing_FStar.Pervasives.Native.snd", "typing_FStar.Range.range_0", "typing_FStar.Reflection.Const.prop_qn", "typing_FStar.Reflection.Typing.bool_fv", "typing_FStar.Reflection.Typing.bool_ty", - "typing_FStar.Reflection.Typing.freevars", "typing_FStar.Reflection.Typing.make_namedv_with_name", "typing_FStar.Reflection.Typing.tm_prop", "typing_FStar.Reflection.Typing.unit_fv", @@ -1972,10 +1989,16 @@ "typing_FStar.Reflection.V2.Builtins.pack_fv", "typing_FStar.Reflection.V2.Builtins.pack_ln", "typing_FStar.Reflection.V2.Builtins.pack_namedv", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Sealed.seal", - "typing_FStar.Set.complement", "typing_FStar.Set.empty", - "typing_FStar.Set.mem", "typing_FStar.Set.singleton", - "typing_FStar.Set.union", + "typing_FStar.Reflection.V2.Data.var", + "typing_FStar.Reflection.V2.Derived.mk_app", + "typing_FStar.Sealed.seal", "typing_FStar.Set.complement", + "typing_FStar.Set.empty", "typing_FStar.Set.mem", + "typing_FStar.Set.singleton", "typing_FStar.Set.union", + "typing_Pulse.Elaborate.Pure.elab_qual", + "typing_Pulse.Elaborate.Pure.elab_term", + "typing_Pulse.Reflection.Util.erased_lid", + "typing_Pulse.Reflection.Util.reveal_lid", + "typing_Pulse.RuntimeUtils.set_range", "typing_Pulse.Syntax.Base.__proj__Mkbinder__item__binder_ppname", "typing_Pulse.Syntax.Base.__proj__Mkbinder__item__binder_ty", "typing_Pulse.Syntax.Base.__proj__Mkppname__item__name", @@ -1984,6 +2007,7 @@ "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__pre", "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__res", "typing_Pulse.Syntax.Base.__proj__Mkterm__item__t", + "typing_Pulse.Syntax.Base.as_fv", "typing_Pulse.Syntax.Base.comp_post", "typing_Pulse.Syntax.Base.comp_pre", "typing_Pulse.Syntax.Base.comp_res", @@ -1996,6 +2020,7 @@ "typing_Pulse.Syntax.Base.tm_star", "typing_Pulse.Syntax.Base.tm_unknown", "typing_Pulse.Syntax.Base.tm_vprop", + "typing_Pulse.Syntax.Base.uu___is_C_ST", "typing_Pulse.Syntax.Base.v_as_nv", "typing_Pulse.Syntax.Naming.close_comp", "typing_Pulse.Syntax.Naming.freevars", @@ -2014,19 +2039,22 @@ "typing_Pulse.Syntax.Pure.term_of_no_name_var", "typing_Pulse.Syntax.Pure.term_of_nvar", "typing_Pulse.Syntax.Pure.tm_arrow", - "typing_Pulse.Syntax.Pure.tm_type", "typing_Pulse.Syntax.Pure.u0", + "typing_Pulse.Syntax.Pure.tm_pureapp", + "typing_Pulse.Syntax.Pure.tm_type", + "typing_Pulse.Syntax.Pure.tm_uinst", "typing_Pulse.Syntax.Pure.u0", "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.lookup", "typing_Pulse.Typing.Env.push_binding", "typing_Pulse.Typing.FV.set_minus", "typing_Pulse.Typing.FV.vars_of_env", "typing_Pulse.Typing.add_frame", "typing_Pulse.Typing.as_binder", + "typing_Pulse.Typing.comp_while_body", "typing_Pulse.Typing.elim_exists_post", "typing_Pulse.Typing.mk_eq2", - "typing_Pulse.Typing.mk_eq2_prop", "typing_Pulse.Typing.mk_ref", - "typing_Pulse.Typing.mk_reveal", "typing_Pulse.Typing.mk_snd", - "typing_Pulse.Typing.mk_tuple2", "typing_Pulse.Typing.par_post", - "typing_Pulse.Typing.tm_bool", "typing_Pulse.Typing.tm_false", - "typing_Pulse.Typing.tm_prop", "typing_Pulse.Typing.tm_true", - "typing_Pulse.Typing.tm_unit", + "typing_Pulse.Typing.mk_eq2_prop", "typing_Pulse.Typing.mk_erased", + "typing_Pulse.Typing.mk_ref", "typing_Pulse.Typing.mk_reveal", + "typing_Pulse.Typing.mk_snd", "typing_Pulse.Typing.mk_tuple2", + "typing_Pulse.Typing.par_post", "typing_Pulse.Typing.tm_bool", + "typing_Pulse.Typing.tm_false", "typing_Pulse.Typing.tm_prop", + "typing_Pulse.Typing.tm_true", "typing_Pulse.Typing.tm_unit", "typing_tok_FStar.Reflection.V2.Data.C_False@tok", "typing_tok_Pulse.Syntax.Base.Implicit@tok", "unit_typing" ], diff --git a/lib/steel/pulse/Pulse.Typing.FV.fsti.hints b/lib/steel/pulse/Pulse.Typing.FV.fsti.hints index 44236ffb3..542af7b12 100644 --- a/lib/steel/pulse/Pulse.Typing.FV.fsti.hints +++ b/lib/steel/pulse/Pulse.Typing.FV.fsti.hints @@ -14,7 +14,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "29f287bb662f4a29042cceb9d1590cb0" + "6cf5d09e7e7f087d4a7bb34845d664ec" ], [ "Pulse.Typing.FV.freevars_close_st_term", diff --git a/lib/steel/pulse/Pulse.Typing.LN.fst b/lib/steel/pulse/Pulse.Typing.LN.fst index 827f2aa18..27639c6d6 100644 --- a/lib/steel/pulse/Pulse.Typing.LN.fst +++ b/lib/steel/pulse/Pulse.Typing.LN.fst @@ -181,9 +181,6 @@ let rec open_st_term_ln' (e:st_term) open_term_ln' typ x i; open_term_ln_opt' post x (i + 1) - | Tm_Protect { t } -> - open_st_term_ln' t x i - | Tm_ProofHintWithBinders { binders; v; t } -> let n = L.length binders in open_term_ln' v x (i + n); @@ -374,9 +371,6 @@ let rec ln_weakening_st (t:st_term) (i j:int) ln_weakening typ i j; ln_weakening_opt post (i + 1) (j + 1) - | Tm_Protect { t } -> - ln_weakening_st t i j - | Tm_ProofHintWithBinders { binders; v; t } -> let n = L.length binders in ln_weakening v (i + n) (j + n); @@ -539,9 +533,6 @@ let rec open_term_ln_inv_st' (t:st_term) open_term_ln_inv' typ x i; open_term_ln_inv_opt' post x (i + 1) - | Tm_Protect { t } -> - open_term_ln_inv_st' t x i - | Tm_ProofHintWithBinders { binders; v; t } -> let n = L.length binders in open_term_ln_inv' v x (i + n); @@ -697,9 +688,6 @@ let rec close_st_term_ln' (t:st_term) (x:var) (i:index) close_term_ln' typ x i; close_term_ln_opt' post x (i + 1) - | Tm_Protect { t } -> - close_st_term_ln' t x i - | Tm_ProofHintWithBinders { binders; v; t } -> let n = L.length binders in close_term_ln' v x (i + n); diff --git a/lib/steel/pulse/Pulse.Typing.LN.fst.hints b/lib/steel/pulse/Pulse.Typing.LN.fst.hints index 82b971a41..78e8eb123 100644 --- a/lib/steel/pulse/Pulse.Typing.LN.fst.hints +++ b/lib/steel/pulse/Pulse.Typing.LN.fst.hints @@ -1,5 +1,5 @@ [ - "h3\r޻d4\u001dz", + "\u0005\u0016\u001et7NF", [ [ "Pulse.Typing.LN.well_typed_terms_are_ln", @@ -14,7 +14,7 @@ "projection_inverse_FStar.Pervasives.Native.Mktuple2__2" ], 0, - "85ae0e104315357406b17bb1fabf8dc1" + "912e2bb7027811a27b90403637906123" ], [ "Pulse.Typing.LN.open_term_ln'", @@ -260,6 +260,18 @@ 0, "fc733b5772db224fc45b25073855e173" ], + [ + "Pulse.Typing.LN.__brs_of", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "refinement_interpretation_Tm_refine_897e035f456f9b67567004120d97c53a" + ], + 0, + "09f602fca9ce7ef50458437a5997f1fa" + ], [ "Pulse.Typing.LN.open_term_ln_list'", 1, @@ -305,22 +317,71 @@ "typing_Pulse.Syntax.Naming.subst_term" ], 0, - "14c3a26bbcbc89a7039040c044953681" + "a5f8b6d3163afcbc8c174ddf6e052c63" ], [ "Pulse.Typing.LN.open_st_term_ln'", 1, 2, 2, + [ + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_Pulse.Syntax.Naming.subst_branches.fuel_instrumented", + "@fuel_correspondence_Pulse.Syntax.Naming.subst_st_term.fuel_instrumented", + "@fuel_irrelevance_Pulse.Syntax.Naming.subst_branches.fuel_instrumented", + "@query", + "Pulse.Syntax.Base_pretyping_01e6cbbfeab3ba416b144f2c9223a2d4", + "constructor_distinct_Pulse.Syntax.Base.Tm_Match", + "data_elim_Pulse.Syntax.Base.Tm_Match", + "data_typing_intro_Prims.Cons@tok", + "data_typing_intro_Prims.Nil@tok", + "data_typing_intro_Pulse.Syntax.Naming.DT@tok", + "disc_equation_Pulse.Syntax.Base.Tm_Match", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.branch", + "equation_Pulse.Syntax.Base.index", + "equation_Pulse.Syntax.Naming.open_st_term_", + "equation_Pulse.Syntax.Naming.subst", + "equation_Pulse.Typing.LN.__brs_of", + "equation_with_fuel_Pulse.Syntax.Naming.subst_st_term.fuel_instrumented", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", "int_inversion", + "kinding_Pulse.Syntax.Naming.subst_elt@tok", + "proj_equation_Pulse.Syntax.Base.Mkst_term_term", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload_brs", + "projection_inverse_Pulse.Syntax.Base.Mkst_term_term", + "projection_inverse_Pulse.Syntax.Base.Tm_Match__0", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_897e035f456f9b67567004120d97c53a", + "refinement_interpretation_Tm_refine_d4c35914da7e721a176997373a6ac793", + "refinement_interpretation_Tm_refine_ed0c42e2175c7e5d11cc6ad4a9c10f68", + "subterm_ordering_Pulse.Syntax.Base.Mkst_term", + "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload", + "subterm_ordering_Pulse.Syntax.Base.Tm_Match", + "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__term", + "typing_Pulse.Syntax.Naming.subst_st_term" + ], + 0, + "daac8c8167e5c8197d826c94d90346da" + ], + [ + "Pulse.Typing.LN.open_st_term_ln'", + 2, + 2, + 2, [ "@MaxFuel_assumption", "@MaxIFuel_assumption", "@fuel_correspondence_FStar.List.Tot.Base.map.fuel_instrumented", "@fuel_correspondence_Pulse.Syntax.Naming.ln_.fuel_instrumented", + "@fuel_correspondence_Pulse.Syntax.Naming.ln_branches_.fuel_instrumented", "@fuel_correspondence_Pulse.Syntax.Naming.ln_list_.fuel_instrumented", "@fuel_correspondence_Pulse.Syntax.Naming.ln_st_.fuel_instrumented", + "@fuel_correspondence_Pulse.Syntax.Naming.subst_branches.fuel_instrumented", "@fuel_correspondence_Pulse.Syntax.Naming.subst_st_term.fuel_instrumented", "@fuel_irrelevance_Pulse.Syntax.Naming.ln_.fuel_instrumented", + "@fuel_irrelevance_Pulse.Syntax.Naming.ln_branches_.fuel_instrumented", "@fuel_irrelevance_Pulse.Syntax.Naming.ln_st_.fuel_instrumented", + "@fuel_irrelevance_Pulse.Syntax.Naming.subst_branches.fuel_instrumented", "@fuel_irrelevance_Pulse.Syntax.Naming.subst_st_term.fuel_instrumented", "@query", "FStar.Ghost_interpretation_Tm_arrow_6980332764c4493a7b0df5c02f7aefbe", @@ -343,7 +404,6 @@ "constructor_distinct_Pulse.Syntax.Base.Tm_Match", "constructor_distinct_Pulse.Syntax.Base.Tm_Par", "constructor_distinct_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "constructor_distinct_Pulse.Syntax.Base.Tm_Protect", "constructor_distinct_Pulse.Syntax.Base.Tm_Return", "constructor_distinct_Pulse.Syntax.Base.Tm_Rewrite", "constructor_distinct_Pulse.Syntax.Base.Tm_STApp", @@ -351,13 +411,23 @@ "constructor_distinct_Pulse.Syntax.Base.Tm_While", "constructor_distinct_Pulse.Syntax.Base.Tm_WithLocal", "constructor_distinct_Pulse.Syntax.Naming.DT", - "data_elim_Pulse.Syntax.Base.Mkbinder", + "data_elim_Pulse.Syntax.Base.Mkst_term___Tm_Admit__payload", + "data_elim_Pulse.Syntax.Base.Mkst_term___Tm_ElimExists__payload", + "data_elim_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload", + "data_elim_Pulse.Syntax.Base.Mkst_term___Tm_IntroPure__payload", + "data_elim_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload", + "data_elim_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload", + "data_elim_Pulse.Syntax.Base.Mkst_term___Tm_WithLocal__payload", "data_elim_Pulse.Syntax.Base.Tm_Abs", + "data_elim_Pulse.Syntax.Base.Tm_Admit", "data_elim_Pulse.Syntax.Base.Tm_Bind", + "data_elim_Pulse.Syntax.Base.Tm_ElimExists", "data_elim_Pulse.Syntax.Base.Tm_If", + "data_elim_Pulse.Syntax.Base.Tm_IntroExists", + "data_elim_Pulse.Syntax.Base.Tm_IntroPure", + "data_elim_Pulse.Syntax.Base.Tm_Match", "data_elim_Pulse.Syntax.Base.Tm_Par", "data_elim_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "data_elim_Pulse.Syntax.Base.Tm_Protect", "data_elim_Pulse.Syntax.Base.Tm_TotBind", "data_elim_Pulse.Syntax.Base.Tm_While", "data_elim_Pulse.Syntax.Base.Tm_WithLocal", @@ -374,13 +444,13 @@ "disc_equation_Pulse.Syntax.Base.Tm_Match", "disc_equation_Pulse.Syntax.Base.Tm_Par", "disc_equation_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "disc_equation_Pulse.Syntax.Base.Tm_Protect", "disc_equation_Pulse.Syntax.Base.Tm_Return", "disc_equation_Pulse.Syntax.Base.Tm_Rewrite", "disc_equation_Pulse.Syntax.Base.Tm_STApp", "disc_equation_Pulse.Syntax.Base.Tm_TotBind", "disc_equation_Pulse.Syntax.Base.Tm_While", "disc_equation_Pulse.Syntax.Base.Tm_WithLocal", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.branch", "equation_Pulse.Syntax.Base.index", "equation_Pulse.Syntax.Base.vprop", "equation_Pulse.Syntax.Naming.ln_c_", @@ -395,6 +465,7 @@ "equation_Pulse.Syntax.Naming.shift_subst_n", "equation_Pulse.Syntax.Naming.subst", "equation_Pulse.Syntax.Naming.subst_binder", + "equation_Pulse.Typing.LN.__brs_of", "equation_with_fuel_FStar.List.Tot.Base.map.fuel_instrumented", "equation_with_fuel_Pulse.Syntax.Naming.ln_.fuel_instrumented", "equation_with_fuel_Pulse.Syntax.Naming.ln_st_.fuel_instrumented", @@ -402,6 +473,13 @@ "fuel_guarded_inversion_Pulse.Syntax.Base.binder", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term_", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term___Tm_Admit__payload", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term___Tm_ElimExists__payload", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term___Tm_IntroExists__payload", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term___Tm_IntroPure__payload", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term___Tm_Par__payload", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term___Tm_ProofHintWithBinders__payload", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term___Tm_WithLocal__payload", "fuel_guarded_inversion_Pulse.Syntax.Base.term", "function_token_typing_Pulse.Syntax.Naming.shift_subst_elt", "function_token_typing_Pulse.Syntax.Naming.shift_subst_n", @@ -434,12 +512,10 @@ "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_If__payload_else_", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_If__payload_post", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_If__payload_then_", - "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload_erased", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload_p", - "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload_should_check", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload_witnesses", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroPure__payload_p", - "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroPure__payload_should_check", + "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload_brs", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload_returns_", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload_sc", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload_body1", @@ -452,7 +528,6 @@ "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload_hint_type", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload_t", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload_v", - "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload_t", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Return__payload_ctag", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Return__payload_insert_eq", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Return__payload_term", @@ -481,7 +556,6 @@ "projection_inverse_Pulse.Syntax.Base.Tm_Match__0", "projection_inverse_Pulse.Syntax.Base.Tm_Par__0", "projection_inverse_Pulse.Syntax.Base.Tm_ProofHintWithBinders__0", - "projection_inverse_Pulse.Syntax.Base.Tm_Protect__0", "projection_inverse_Pulse.Syntax.Base.Tm_Return__0", "projection_inverse_Pulse.Syntax.Base.Tm_Rewrite__0", "projection_inverse_Pulse.Syntax.Base.Tm_STApp__0", @@ -495,18 +569,18 @@ "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Abs__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Bind__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_If__payload", + "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload", - "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_TotBind__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_While__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_WithLocal__payload", "subterm_ordering_Pulse.Syntax.Base.Tm_Abs", "subterm_ordering_Pulse.Syntax.Base.Tm_Bind", "subterm_ordering_Pulse.Syntax.Base.Tm_If", + "subterm_ordering_Pulse.Syntax.Base.Tm_Match", "subterm_ordering_Pulse.Syntax.Base.Tm_Par", "subterm_ordering_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "subterm_ordering_Pulse.Syntax.Base.Tm_Protect", "subterm_ordering_Pulse.Syntax.Base.Tm_TotBind", "subterm_ordering_Pulse.Syntax.Base.Tm_While", "subterm_ordering_Pulse.Syntax.Base.Tm_WithLocal", @@ -532,7 +606,245 @@ "typing_Pulse.Syntax.Naming.subst_term_opt" ], 0, - "012f1e0cdde7e9d79ee459c5fbba8e73" + "5ecc0a8130b507e443f5a0eb2bd2ea53" + ], + [ + "Pulse.Typing.LN.open_st_term_ln'", + 3, + 2, + 2, + [ + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_Pulse.Syntax.Naming.subst_branches.fuel_instrumented", + "@fuel_correspondence_Pulse.Syntax.Naming.subst_st_term.fuel_instrumented", + "@fuel_irrelevance_Pulse.Syntax.Naming.subst_branches.fuel_instrumented", + "@query", + "Pulse.Syntax.Base_pretyping_01e6cbbfeab3ba416b144f2c9223a2d4", + "constructor_distinct_Pulse.Syntax.Base.Tm_Match", + "data_elim_Pulse.Syntax.Base.Tm_Match", + "data_typing_intro_Prims.Cons@tok", + "data_typing_intro_Prims.Nil@tok", + "data_typing_intro_Pulse.Syntax.Naming.DT@tok", + "disc_equation_Pulse.Syntax.Base.Tm_Match", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.branch", + "equation_Pulse.Syntax.Base.index", + "equation_Pulse.Syntax.Naming.open_st_term_", + "equation_Pulse.Syntax.Naming.subst", + "equation_Pulse.Typing.LN.__brs_of", + "equation_with_fuel_Pulse.Syntax.Naming.subst_st_term.fuel_instrumented", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", "int_inversion", + "kinding_Pulse.Syntax.Naming.subst_elt@tok", + "proj_equation_Pulse.Syntax.Base.Mkst_term_term", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload_brs", + "projection_inverse_Pulse.Syntax.Base.Mkst_term_term", + "projection_inverse_Pulse.Syntax.Base.Tm_Match__0", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_897e035f456f9b67567004120d97c53a", + "refinement_interpretation_Tm_refine_c21fec71cbbff3fd819f53ddab50457e", + "refinement_interpretation_Tm_refine_d4c35914da7e721a176997373a6ac793", + "subterm_ordering_Pulse.Syntax.Base.Mkst_term", + "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload", + "subterm_ordering_Pulse.Syntax.Base.Tm_Match", + "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__term", + "typing_Pulse.Syntax.Naming.subst_st_term" + ], + 0, + "f72a45f59dbc4064d4f27aeff4cc43ec" + ], + [ + "Pulse.Typing.LN.open_st_term_ln'", + 4, + 2, + 2, + [ + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_Pulse.Common.for_all_dec.fuel_instrumented", + "@fuel_correspondence_Pulse.Syntax.Naming.ln_branches_.fuel_instrumented", + "@fuel_correspondence_Pulse.Syntax.Naming.subst_branches.fuel_instrumented", + "@fuel_correspondence_Pulse.Syntax.Naming.subst_st_term.fuel_instrumented", + "@fuel_irrelevance_Pulse.Syntax.Naming.subst_branches.fuel_instrumented", + "@query", + "Pulse.Common_interpretation_Tm_arrow_04834da3b06d2232af814498108af1a5", + "Pulse.Syntax.Base_pretyping_01e6cbbfeab3ba416b144f2c9223a2d4", + "Pulse.Syntax.Naming_interpretation_Tm_arrow_dcfb23ff36b5c8318eea312533dbde89", + "Pulse.Syntax.Naming_pretyping_1444707d10f4f7f77442e9d69b323ec4", + "binder_x_40f47b036cc24e11c7ed578f0b141555_2", + "binder_x_633a9d87960b10f47c7552ac45528057_3", + "binder_x_b0498be3627eadc88d68398040eefbcf_1", + "binder_x_faf1ab2b96db77e78735511acfd74e1f_0", + "constructor_distinct_Prims.Nil", + "constructor_distinct_Pulse.Syntax.Base.Tm_Match", + "data_elim_Pulse.Syntax.Base.Tm_Match", + "data_typing_intro_Prims.Cons@tok", + "data_typing_intro_Prims.Nil@tok", + "data_typing_intro_Pulse.Syntax.Naming.DT@tok", + "disc_equation_Prims.Cons", "disc_equation_Prims.Nil", + "disc_equation_Pulse.Syntax.Base.Tm_Match", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.branch", + "equation_Pulse.Syntax.Base.index", + "equation_Pulse.Syntax.Naming.open_st_term_", + "equation_Pulse.Syntax.Naming.subst", + "equation_Pulse.Typing.LN.__brs_of", + "equation_with_fuel_Pulse.Common.for_all_dec.fuel_instrumented", + "equation_with_fuel_Pulse.Syntax.Naming.ln_branches_.fuel_instrumented", + "equation_with_fuel_Pulse.Syntax.Naming.subst_st_term.fuel_instrumented", + "fuel_guarded_inversion_Prims.list", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "function_token_typing_Pulse.Syntax.Base.branch", "int_inversion", + "interpretation_Tm_abs_7600129eccf73a3a5dd1d2a7b0095e14", + "kinding_Pulse.Syntax.Base.st_term@tok", + "kinding_Pulse.Syntax.Naming.subst_elt@tok", + "proj_equation_Pulse.Syntax.Base.Mkst_term_term", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_Prims.Nil_a", + "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload_brs", + "projection_inverse_Pulse.Syntax.Base.Mkst_term_term", + "projection_inverse_Pulse.Syntax.Base.Tm_Match__0", + "refinement_interpretation_Tm_refine_012d84ab711a5da18390cc5d5e8f4433", + "refinement_interpretation_Tm_refine_07090021ca2498d4b1aeaa8b0e7c7abb", + "refinement_interpretation_Tm_refine_2a4c666f3fb954ffa3f9ca348ae28520", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_6d56c54b76b299baa80a359c9d20cb8c", + "refinement_interpretation_Tm_refine_897e035f456f9b67567004120d97c53a", + "subterm_ordering_Prims.Cons", + "subterm_ordering_Pulse.Syntax.Base.Mkst_term", + "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload", + "subterm_ordering_Pulse.Syntax.Base.Tm_Match", + "token_correspondence_Pulse.Syntax.Naming.ln_branch_.fuel_instrumented", + "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__term", + "typing_Pulse.Syntax.Naming.subst_st_term", + "typing_Tm_abs_7600129eccf73a3a5dd1d2a7b0095e14" + ], + 0, + "0196c178fc28f1b765bf552f23b6f273" + ], + [ + "Pulse.Typing.LN.open_st_term_ln'", + 5, + 2, + 2, + [ + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_Pulse.Syntax.Naming.subst_branches.fuel_instrumented", + "@fuel_correspondence_Pulse.Syntax.Naming.subst_st_term.fuel_instrumented", + "@fuel_irrelevance_Pulse.Syntax.Naming.subst_branches.fuel_instrumented", + "@query", "constructor_distinct_Pulse.Syntax.Base.Tm_Match", + "data_elim_Pulse.Syntax.Base.Tm_Match", + "data_typing_intro_Prims.Cons@tok", + "data_typing_intro_Prims.Nil@tok", + "data_typing_intro_Pulse.Syntax.Naming.DT@tok", + "disc_equation_Pulse.Syntax.Base.Tm_Match", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.branch", + "equation_Pulse.Syntax.Base.index", + "equation_Pulse.Syntax.Naming.open_st_term_", + "equation_Pulse.Syntax.Naming.subst", + "equation_Pulse.Typing.LN.__brs_of", + "equation_with_fuel_Pulse.Syntax.Naming.subst_st_term.fuel_instrumented", + "fuel_guarded_inversion_FStar.Pervasives.Native.tuple2", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", "int_inversion", + "kinding_Pulse.Syntax.Naming.subst_elt@tok", + "proj_equation_Pulse.Syntax.Base.Mkst_term_term", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload_brs", + "projection_inverse_Pulse.Syntax.Base.Mkst_term_term", + "projection_inverse_Pulse.Syntax.Base.Tm_Match__0", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_897e035f456f9b67567004120d97c53a", + "refinement_interpretation_Tm_refine_c3dd34516b9f33e89d58e0a8ce691913", + "refinement_interpretation_Tm_refine_d4c35914da7e721a176997373a6ac793", + "subterm_ordering_Pulse.Syntax.Base.Mkst_term", + "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Match__payload", + "subterm_ordering_Pulse.Syntax.Base.Tm_Match", + "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__term", + "typing_Pulse.Syntax.Naming.subst_st_term" + ], + 0, + "c7a4ee7e7f18f82ca0c3777feb682c83" + ], + [ + "Pulse.Typing.LN.open_st_term_ln'", + 6, + 2, + 1, + [ + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_FStar.List.Tot.Base.map.fuel_instrumented", + "@fuel_correspondence_Pulse.Syntax.Naming.ln_branch_.fuel_instrumented", + "@fuel_correspondence_Pulse.Syntax.Naming.ln_st_.fuel_instrumented", + "@fuel_correspondence_Pulse.Syntax.Naming.subst_branch.fuel_instrumented", + "@fuel_correspondence_Pulse.Syntax.Naming.subst_st_term.fuel_instrumented", + "@fuel_irrelevance_Pulse.Syntax.Naming.ln_st_.fuel_instrumented", + "@fuel_irrelevance_Pulse.Syntax.Naming.subst_st_term.fuel_instrumented", + "@query", + "FStar.Ghost_interpretation_Tm_arrow_6980332764c4493a7b0df5c02f7aefbe", + "Prims_pretyping_f537159ed795b314b4e58c260361ae86", + "Pulse.Syntax.Naming_interpretation_Tm_arrow_c0d5e1c4dd22f0fc7f6b9bbecbfa2056", + "binder_x_24a33297838fd91bb915d52c7a807a12_0", + "binder_x_40f47b036cc24e11c7ed578f0b141555_1", + "binder_x_633a9d87960b10f47c7552ac45528057_2", "bool_inversion", + "constructor_distinct_Prims.Cons", "constructor_distinct_Prims.Nil", + "constructor_distinct_Pulse.Syntax.Base.Pat_Cons", + "constructor_distinct_Pulse.Syntax.Base.Pat_Constant", + "constructor_distinct_Pulse.Syntax.Base.Pat_Dot_Term", + "constructor_distinct_Pulse.Syntax.Base.Pat_Var", + "constructor_distinct_Pulse.Syntax.Naming.DT", + "constructor_distinct_Tm_unit", "data_typing_intro_Prims.Cons@tok", + "data_typing_intro_Prims.Nil@tok", + "data_typing_intro_Pulse.Syntax.Naming.DT@tok", + "disc_equation_Pulse.Syntax.Base.Pat_Cons", + "disc_equation_Pulse.Syntax.Base.Pat_Constant", + "disc_equation_Pulse.Syntax.Base.Pat_Dot_Term", + "disc_equation_Pulse.Syntax.Base.Pat_Var", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.branch", + "equation_Pulse.Syntax.Base.index", + "equation_Pulse.Syntax.Naming.open_st_term_", + "equation_Pulse.Syntax.Naming.shift_subst_elt", + "equation_Pulse.Syntax.Naming.shift_subst_n", + "equation_Pulse.Syntax.Naming.subst", + "equation_with_fuel_FStar.List.Tot.Base.map.fuel_instrumented", + "equation_with_fuel_Pulse.Syntax.Naming.ln_branch_.fuel_instrumented", + "equation_with_fuel_Pulse.Syntax.Naming.subst_branch.fuel_instrumented", + "fuel_guarded_inversion_FStar.Pervasives.Native.option", + "fuel_guarded_inversion_Pulse.Syntax.Base.pattern", + "function_token_typing_Prims.bool", + "function_token_typing_Pulse.Syntax.Naming.shift_subst_elt", + "int_inversion", "int_typing", + "kinding_FStar.Pervasives.Native.tuple2@tok", + "kinding_Pulse.Syntax.Base.pattern@tok", + "kinding_Pulse.Syntax.Naming.subst_elt@tok", + "primitive_Prims.op_Addition", "primitive_Prims.op_Subtraction", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_BoxInt_proj_0", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_Prims.Cons_a", + "projection_inverse_Prims.Cons_hd", + "projection_inverse_Prims.Cons_tl", "projection_inverse_Prims.Nil_a", + "projection_inverse_Pulse.Syntax.Base.Pat_Cons__0", + "projection_inverse_Pulse.Syntax.Base.Pat_Cons__1", + "projection_inverse_Pulse.Syntax.Base.Pat_Constant__0", + "projection_inverse_Pulse.Syntax.Base.Pat_Dot_Term__0", + "projection_inverse_Pulse.Syntax.Base.Pat_Var__0", + "projection_inverse_Pulse.Syntax.Naming.DT__0", + "projection_inverse_Pulse.Syntax.Naming.DT__1", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "subterm_ordering_FStar.Pervasives.Native.Mktuple2", + "token_correspondence_FStar.List.Tot.Base.map", + "token_correspondence_Pulse.Syntax.Naming.shift_subst_elt", + "token_correspondence_Pulse.Syntax.Naming.shift_subst_n", + "typing_FStar.List.Tot.Base.length", + "typing_Pulse.Syntax.Naming.ln_branch_", + "typing_Pulse.Syntax.Naming.ln_st_", + "typing_Pulse.Syntax.Naming.open_st_term_", + "typing_Pulse.Syntax.Naming.subst_branch" + ], + 0, + "a876421039381b5dd9f575a4b024cfc7" ], [ "Pulse.Typing.LN.open_term_ln", @@ -550,7 +862,7 @@ "projection_inverse_FStar.Pervasives.Native.Mktuple2__2" ], 0, - "73248ff3bf2f9c04aa9543fc3ebf7350" + "9dccb47a8baf8cb14e4bf0736ab9eef0" ], [ "Pulse.Typing.LN.open_st_term_ln", @@ -627,7 +939,7 @@ "projection_inverse_Pulse.Syntax.Base.Tm_Pure_p", "projection_inverse_Pulse.Syntax.Base.Tm_Star_l", "projection_inverse_Pulse.Syntax.Base.Tm_Star_r", - "refinement_interpretation_Tm_refine_2b07e19a604076f8fe3c2f6c74c5eafa", + "refinement_interpretation_Tm_refine_d0bd4a6a6dc392fc5cca81e4b7db6b23", "subterm_ordering_Pulse.Syntax.Base.Mkbinder", "subterm_ordering_Pulse.Syntax.Base.Mkterm", "subterm_ordering_Pulse.Syntax.Base.Tm_ExistsSL", @@ -640,7 +952,7 @@ "typing_Pulse.Syntax.Naming.ln_" ], 0, - "6eec919a98ca0c47efacae5f1c5c78e8" + "9a1ea9f19911d33c88521bfc8a81e555" ], [ "Pulse.Typing.LN.ln_weakening_comp", @@ -767,7 +1079,6 @@ "constructor_distinct_Pulse.Syntax.Base.Tm_IntroPure", "constructor_distinct_Pulse.Syntax.Base.Tm_Par", "constructor_distinct_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "constructor_distinct_Pulse.Syntax.Base.Tm_Protect", "constructor_distinct_Pulse.Syntax.Base.Tm_Return", "constructor_distinct_Pulse.Syntax.Base.Tm_Rewrite", "constructor_distinct_Pulse.Syntax.Base.Tm_STApp", @@ -779,7 +1090,6 @@ "data_elim_Pulse.Syntax.Base.Tm_If", "data_elim_Pulse.Syntax.Base.Tm_Par", "data_elim_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "data_elim_Pulse.Syntax.Base.Tm_Protect", "data_elim_Pulse.Syntax.Base.Tm_TotBind", "data_elim_Pulse.Syntax.Base.Tm_While", "data_elim_Pulse.Syntax.Base.Tm_WithLocal", @@ -793,7 +1103,6 @@ "disc_equation_Pulse.Syntax.Base.Tm_Match", "disc_equation_Pulse.Syntax.Base.Tm_Par", "disc_equation_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "disc_equation_Pulse.Syntax.Base.Tm_Protect", "disc_equation_Pulse.Syntax.Base.Tm_Return", "disc_equation_Pulse.Syntax.Base.Tm_Rewrite", "disc_equation_Pulse.Syntax.Base.Tm_STApp", @@ -834,7 +1143,6 @@ "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload_binders", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload_t", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload_v", - "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload_t", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Return__payload_term", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Rewrite__payload_t1", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Rewrite__payload_t2", @@ -857,21 +1165,19 @@ "projection_inverse_Pulse.Syntax.Base.Tm_IntroPure__0", "projection_inverse_Pulse.Syntax.Base.Tm_Par__0", "projection_inverse_Pulse.Syntax.Base.Tm_ProofHintWithBinders__0", - "projection_inverse_Pulse.Syntax.Base.Tm_Protect__0", "projection_inverse_Pulse.Syntax.Base.Tm_Return__0", "projection_inverse_Pulse.Syntax.Base.Tm_Rewrite__0", "projection_inverse_Pulse.Syntax.Base.Tm_STApp__0", "projection_inverse_Pulse.Syntax.Base.Tm_TotBind__0", "projection_inverse_Pulse.Syntax.Base.Tm_While__0", "projection_inverse_Pulse.Syntax.Base.Tm_WithLocal__0", - "refinement_interpretation_Tm_refine_ba6e67e1f9ad39172ad663ba7e62a9ce", + "refinement_interpretation_Tm_refine_75c82a10d632b1c55872146d397dffc9", "subterm_ordering_Pulse.Syntax.Base.Mkst_term", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Abs__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Bind__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_If__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload", - "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_TotBind__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_While__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_WithLocal__payload", @@ -880,7 +1186,6 @@ "subterm_ordering_Pulse.Syntax.Base.Tm_If", "subterm_ordering_Pulse.Syntax.Base.Tm_Par", "subterm_ordering_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "subterm_ordering_Pulse.Syntax.Base.Tm_Protect", "subterm_ordering_Pulse.Syntax.Base.Tm_TotBind", "subterm_ordering_Pulse.Syntax.Base.Tm_While", "subterm_ordering_Pulse.Syntax.Base.Tm_WithLocal", @@ -893,7 +1198,7 @@ "typing_Pulse.Syntax.Naming.ln_st_" ], 0, - "baa113c329ff9c3476b60e98e5ead3bf" + "620a25e97e9458008b8e4cc4f53ac44e" ], [ "Pulse.Typing.LN.open_term_ln_inv'", @@ -995,10 +1300,10 @@ "projection_inverse_Pulse.Syntax.Base.Tm_Star_r", "projection_inverse_Pulse.Syntax.Naming.DT__0", "projection_inverse_Pulse.Syntax.Naming.DT__1", - "refinement_interpretation_Tm_refine_06f0985e1d668cfe1fefa13d44a42dbe", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", "refinement_interpretation_Tm_refine_93b615957e3384de144041e0ee9e1c03", + "refinement_interpretation_Tm_refine_bb83236742b7e5615206b48fe8bcaad4", "subterm_ordering_Pulse.Syntax.Base.Mkbinder", "subterm_ordering_Pulse.Syntax.Base.Mkterm", "subterm_ordering_Pulse.Syntax.Base.Tm_ExistsSL", @@ -1020,7 +1325,7 @@ "typing_Pulse.Syntax.Naming.shift_subst" ], 0, - "0198ddefe69f111c93e600af2da94ff7" + "44e04ecca1bc01189e099489a24c111d" ], [ "Pulse.Typing.LN.open_comp_ln_inv'", @@ -1226,7 +1531,6 @@ "constructor_distinct_Pulse.Syntax.Base.Tm_IntroPure", "constructor_distinct_Pulse.Syntax.Base.Tm_Par", "constructor_distinct_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "constructor_distinct_Pulse.Syntax.Base.Tm_Protect", "constructor_distinct_Pulse.Syntax.Base.Tm_Return", "constructor_distinct_Pulse.Syntax.Base.Tm_Rewrite", "constructor_distinct_Pulse.Syntax.Base.Tm_STApp", @@ -1241,7 +1545,6 @@ "data_elim_Pulse.Syntax.Base.Tm_If", "data_elim_Pulse.Syntax.Base.Tm_Par", "data_elim_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "data_elim_Pulse.Syntax.Base.Tm_Protect", "data_elim_Pulse.Syntax.Base.Tm_TotBind", "data_elim_Pulse.Syntax.Base.Tm_While", "data_elim_Pulse.Syntax.Base.Tm_WithLocal", @@ -1258,7 +1561,6 @@ "disc_equation_Pulse.Syntax.Base.Tm_Match", "disc_equation_Pulse.Syntax.Base.Tm_Par", "disc_equation_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "disc_equation_Pulse.Syntax.Base.Tm_Protect", "disc_equation_Pulse.Syntax.Base.Tm_Return", "disc_equation_Pulse.Syntax.Base.Tm_Rewrite", "disc_equation_Pulse.Syntax.Base.Tm_STApp", @@ -1289,8 +1591,8 @@ "int_inversion", "int_typing", "kinding_Pulse.Syntax.Base.binder@tok", "kinding_Pulse.Syntax.Naming.subst_elt@tok", - "lemma_Pulse.Typing.LN.ln_weakening", "primitive_Prims.op_Addition", - "primitive_Prims.op_AmpAmp", "primitive_Prims.op_Subtraction", + "primitive_Prims.op_Addition", "primitive_Prims.op_AmpAmp", + "primitive_Prims.op_Subtraction", "proj_equation_Pulse.Syntax.Base.Mkbinder_binder_ty", "proj_equation_Pulse.Syntax.Base.Mkst_term_term", "projection_inverse_BoxBool_proj_0", @@ -1317,10 +1619,8 @@ "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_If__payload_then_", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload_erased", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload_p", - "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload_should_check", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload_witnesses", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroPure__payload_p", - "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroPure__payload_should_check", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload_body1", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload_body2", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload_post1", @@ -1331,7 +1631,6 @@ "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload_hint_type", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload_t", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload_v", - "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload_t", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Return__payload_ctag", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Return__payload_insert_eq", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Return__payload_term", @@ -1359,7 +1658,6 @@ "projection_inverse_Pulse.Syntax.Base.Tm_IntroPure__0", "projection_inverse_Pulse.Syntax.Base.Tm_Par__0", "projection_inverse_Pulse.Syntax.Base.Tm_ProofHintWithBinders__0", - "projection_inverse_Pulse.Syntax.Base.Tm_Protect__0", "projection_inverse_Pulse.Syntax.Base.Tm_Return__0", "projection_inverse_Pulse.Syntax.Base.Tm_Rewrite__0", "projection_inverse_Pulse.Syntax.Base.Tm_STApp__0", @@ -1368,16 +1666,15 @@ "projection_inverse_Pulse.Syntax.Base.Tm_WithLocal__0", "projection_inverse_Pulse.Syntax.Naming.DT__0", "projection_inverse_Pulse.Syntax.Naming.DT__1", + "refinement_interpretation_Tm_refine_39016d8ea96681c1a6dc1e3bb600e8f6", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "refinement_interpretation_Tm_refine_93b615957e3384de144041e0ee9e1c03", - "refinement_interpretation_Tm_refine_e9375579389ab1737bacf82594814383", "subterm_ordering_Pulse.Syntax.Base.Mkst_term", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Abs__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Bind__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_If__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload", - "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_TotBind__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_While__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_WithLocal__payload", @@ -1386,7 +1683,6 @@ "subterm_ordering_Pulse.Syntax.Base.Tm_If", "subterm_ordering_Pulse.Syntax.Base.Tm_Par", "subterm_ordering_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "subterm_ordering_Pulse.Syntax.Base.Tm_Protect", "subterm_ordering_Pulse.Syntax.Base.Tm_TotBind", "subterm_ordering_Pulse.Syntax.Base.Tm_While", "subterm_ordering_Pulse.Syntax.Base.Tm_WithLocal", @@ -1395,9 +1691,7 @@ "token_correspondence_Pulse.Syntax.Naming.ln_st_.fuel_instrumented", "token_correspondence_Pulse.Syntax.Naming.shift_subst_elt", "token_correspondence_Pulse.Syntax.Naming.shift_subst_n", - "token_correspondence_Pulse.Syntax.Naming.subst_st_term.fuel_instrumented", "typing_FStar.List.Tot.Base.length", - "typing_FStar.List.Tot.Base.map", "typing_Pulse.Syntax.Base.__proj__Mkbinder__item__binder_ty", "typing_Pulse.Syntax.Base.__proj__Mkst_term__item__term", "typing_Pulse.Syntax.Naming.ln_", "typing_Pulse.Syntax.Naming.ln_c_", @@ -1414,7 +1708,7 @@ "typing_Pulse.Syntax.Naming.subst_term" ], 0, - "fb8da6d5f47010e8dd343f5b36179a0d" + "82edb3b73771ac191a796afb6e0ca3e5" ], [ "Pulse.Typing.LN.close_term_ln'", @@ -1516,7 +1810,7 @@ "projection_inverse_Pulse.Syntax.Naming.ND__1", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", - "refinement_interpretation_Tm_refine_acd56ddfd27d052b49e8f950f072af08", + "refinement_interpretation_Tm_refine_bce2bbb134414707ea3deea581a33ecf", "subterm_ordering_Pulse.Syntax.Base.Mkbinder", "subterm_ordering_Pulse.Syntax.Base.Mkterm", "subterm_ordering_Pulse.Syntax.Base.Tm_ExistsSL", @@ -1537,7 +1831,7 @@ "typing_Pulse.Syntax.Naming.subst_term" ], 0, - "dd7be532eb69719c60e06acbe9cda8e8" + "fec9bd7d0a3f33f107b505e8ac85e67c" ], [ "Pulse.Typing.LN.close_comp_ln'", @@ -1742,7 +2036,6 @@ "constructor_distinct_Pulse.Syntax.Base.Tm_IntroPure", "constructor_distinct_Pulse.Syntax.Base.Tm_Par", "constructor_distinct_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "constructor_distinct_Pulse.Syntax.Base.Tm_Protect", "constructor_distinct_Pulse.Syntax.Base.Tm_Return", "constructor_distinct_Pulse.Syntax.Base.Tm_Rewrite", "constructor_distinct_Pulse.Syntax.Base.Tm_STApp", @@ -1757,7 +2050,6 @@ "data_elim_Pulse.Syntax.Base.Tm_If", "data_elim_Pulse.Syntax.Base.Tm_Par", "data_elim_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "data_elim_Pulse.Syntax.Base.Tm_Protect", "data_elim_Pulse.Syntax.Base.Tm_TotBind", "data_elim_Pulse.Syntax.Base.Tm_While", "data_elim_Pulse.Syntax.Base.Tm_WithLocal", @@ -1775,7 +2067,6 @@ "disc_equation_Pulse.Syntax.Base.Tm_Match", "disc_equation_Pulse.Syntax.Base.Tm_Par", "disc_equation_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "disc_equation_Pulse.Syntax.Base.Tm_Protect", "disc_equation_Pulse.Syntax.Base.Tm_Return", "disc_equation_Pulse.Syntax.Base.Tm_Rewrite", "disc_equation_Pulse.Syntax.Base.Tm_STApp", @@ -1833,10 +2124,8 @@ "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_If__payload_then_", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload_erased", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload_p", - "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload_should_check", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroExists__payload_witnesses", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroPure__payload_p", - "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_IntroPure__payload_should_check", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload_body1", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload_body2", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload_post1", @@ -1847,7 +2136,6 @@ "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload_hint_type", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload_t", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload_v", - "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload_t", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Return__payload_ctag", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Return__payload_insert_eq", "projection_inverse_Pulse.Syntax.Base.Mkst_term___Tm_Return__payload_term", @@ -1875,7 +2163,6 @@ "projection_inverse_Pulse.Syntax.Base.Tm_IntroPure__0", "projection_inverse_Pulse.Syntax.Base.Tm_Par__0", "projection_inverse_Pulse.Syntax.Base.Tm_ProofHintWithBinders__0", - "projection_inverse_Pulse.Syntax.Base.Tm_Protect__0", "projection_inverse_Pulse.Syntax.Base.Tm_Return__0", "projection_inverse_Pulse.Syntax.Base.Tm_Rewrite__0", "projection_inverse_Pulse.Syntax.Base.Tm_STApp__0", @@ -1891,7 +2178,6 @@ "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_If__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Par__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_ProofHintWithBinders__payload", - "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_Protect__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_TotBind__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_While__payload", "subterm_ordering_Pulse.Syntax.Base.Mkst_term___Tm_WithLocal__payload", @@ -1900,7 +2186,6 @@ "subterm_ordering_Pulse.Syntax.Base.Tm_If", "subterm_ordering_Pulse.Syntax.Base.Tm_Par", "subterm_ordering_Pulse.Syntax.Base.Tm_ProofHintWithBinders", - "subterm_ordering_Pulse.Syntax.Base.Tm_Protect", "subterm_ordering_Pulse.Syntax.Base.Tm_TotBind", "subterm_ordering_Pulse.Syntax.Base.Tm_While", "subterm_ordering_Pulse.Syntax.Base.Tm_WithLocal", @@ -1927,7 +2212,7 @@ "typing_Pulse.Syntax.Naming.subst_term_list" ], 0, - "61d704130f69c48e61ee9a6c8e5ec482" + "f3a786aab44e1fe55a59f8b4416015b8" ], [ "Pulse.Typing.LN.close_comp_ln", @@ -1971,7 +2256,7 @@ "typing_Pulse.Syntax.Naming.ln_c" ], 0, - "82335154cfe190383f1b41e759eb1c7a" + "4eb44e8c7e316a3252fed613f6882e5a" ], [ "Pulse.Typing.LN.tot_typing_ln", @@ -2347,8 +2632,7 @@ "typing_Pulse.Syntax.Naming.ln", "typing_Pulse.Syntax.Naming.ln_", "typing_Pulse.Syntax.Naming.ln_c", "typing_Pulse.Syntax.Naming.ln_st_comp", - "typing_Pulse.Typing.Env.as_map", - "typing_Pulse.Typing.uu___is_CT_Tot" + "typing_Pulse.Typing.Env.as_map" ], 0, "a1cb7d8ea7076c27c1a4cc6e1e447217" @@ -2934,7 +3218,8 @@ "typing_FStar.Reflection.V2.Builtins.pack_namedv", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Reflection.V2.Derived.mk_app", - "typing_FStar.Sealed.seal", "typing_Pulse.Elaborate.Pure.elab_comp", + "typing_FStar.Sealed.seal", "typing_FStar.Set.mem", + "typing_Pulse.Elaborate.Pure.elab_comp", "typing_Pulse.Elaborate.Pure.elab_qual", "typing_Pulse.Elaborate.Pure.elab_term", "typing_Pulse.Reflection.Util.binder_of_t_q_s", @@ -2971,6 +3256,7 @@ "typing_Pulse.Syntax.Base.with_range", "typing_Pulse.Syntax.Naming.close_comp", "typing_Pulse.Syntax.Naming.close_term_", + "typing_Pulse.Syntax.Naming.freevars_st", "typing_Pulse.Syntax.Naming.ln", "typing_Pulse.Syntax.Naming.ln_", "typing_Pulse.Syntax.Naming.ln_c", "typing_Pulse.Syntax.Naming.ln_c_", @@ -3009,7 +3295,7 @@ "unit_typing" ], 0, - "b694c34bb770bfc650e8d985083ea43d" + "1c197766e58cea202cbef0d52e621cc5" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Typing.Metatheory.Base.fst b/lib/steel/pulse/Pulse.Typing.Metatheory.Base.fst new file mode 100644 index 000000000..6383b548f --- /dev/null +++ b/lib/steel/pulse/Pulse.Typing.Metatheory.Base.fst @@ -0,0 +1,619 @@ +module Pulse.Typing.Metatheory.Base +open Pulse.Syntax +open Pulse.Syntax.Naming +open Pulse.Typing + +let admit_st_comp_typing (g:env) (st:st_comp) + : st_comp_typing g st + = admit(); + STC g st (fresh g) (admit()) (admit()) (admit()) + +let admit_comp_typing (g:env) (c:comp_st) + : comp_typing_u g c + = match c with + | C_ST st -> + CT_ST g st (admit_st_comp_typing g st) + | C_STAtomic inames st -> + CT_STAtomic g inames st (admit()) (admit_st_comp_typing g st) + | C_STGhost inames st -> + CT_STGhost g inames st (admit()) (admit_st_comp_typing g st) + +let st_typing_correctness (#g:env) (#t:st_term) (#c:comp_st) + (_:st_typing g t c) + : comp_typing_u g c + = admit_comp_typing g c + +let add_frame_well_typed (#g:env) (#c:comp_st) (ct:comp_typing_u g c) + (#f:term) (ft:tot_typing g f tm_vprop) + : comp_typing_u g (add_frame c f) + = admit_comp_typing _ _ + +let comp_typing_inversion #g #c ct = + match ct with + | CT_ST _ _ st + | CT_STAtomic _ _ _ _ st + | CT_STGhost _ _ _ _ st -> st + +let st_comp_typing_inversion_cofinite (#g:env) (#st:_) (ct:st_comp_typing g st) = + admit(), admit(), (fun _ -> admit()) + +let st_comp_typing_inversion (#g:env) (#st:_) (ct:st_comp_typing g st) = + let STC g st x ty pre post = ct in + (| ty, pre, x, post |) + +let tm_exists_inversion (#g:env) (#u:universe) (#ty:term) (#p:term) + (_:tot_typing g (tm_exists_sl u (as_binder ty) p) tm_vprop) + (x:var { fresh_wrt x g (freevars p) } ) + : universe_of g ty u & + tot_typing (push_binding g x ppname_default ty) p tm_vprop + = admit(), admit() + +let pure_typing_inversion (#g:env) (#p:term) (_:tot_typing g (tm_pure p) tm_vprop) + : tot_typing g p (tm_fstar FStar.Reflection.Typing.tm_prop Range.range_0) + = admit () + +let tot_typing_weakening _ _ _ _ _ _ = admit () + +let non_informative_t_weakening (g g':env) (g1:env{ pairwise_disjoint g g1 g' }) + (u:universe) (t:term) + (d:non_informative_t (push_env g g') u t) + : non_informative_t (push_env (push_env g g1) g') u t = + let (| w, _ |) = d in + (| w, magic () |) + +let non_informative_c_weakening (g g':env) (g1:env{ pairwise_disjoint g g1 g' }) + (c:comp_st) + (d:non_informative_c (push_env g g') c) + : non_informative_c (push_env (push_env g g1) g') c = + non_informative_t_weakening g g' g1 _ _ d + +let bind_comp_weakening (g:env) (g':env { disjoint g g' }) + (#x:var) (#c1 #c2 #c3:comp) (d:bind_comp (push_env g g') x c1 c2 c3) + (g1:env { pairwise_disjoint g g1 g' }) + : Tot (bind_comp (push_env (push_env g g1) g') x c1 c2 c3) + (decreases d) = + + match d with + | Bind_comp _ x c1 c2 _ _ _ -> + assume (None? (lookup (push_env g g1) x)); + let y = fresh (push_env (push_env g g1) g') in + assume (~ (y `Set.mem` (freevars (comp_post c2)))); + Bind_comp _ x c1 c2 (magic ()) y (magic ()) + + | Bind_comp_ghost_l _ x c1 c2 n_d _ _ _ -> + assume (None? (lookup (push_env g g1) x)); + let y = fresh (push_env (push_env g g1) g') in + assume (~ (y `Set.mem` (freevars (comp_post c2)))); + Bind_comp_ghost_l _ x c1 c2 (non_informative_c_weakening g g' g1 _ n_d) (magic ()) y (magic ()) + + | Bind_comp_ghost_r _ x c1 c2 n_d _ _ _ -> + assume (None? (lookup (push_env g g1) x)); + let y = fresh (push_env (push_env g g1) g') in + assume (~ (y `Set.mem` (freevars (comp_post c2)))); + Bind_comp_ghost_r _ x c1 c2 (non_informative_c_weakening g g' g1 _ n_d) (magic ()) y (magic ()) + +let lift_comp_weakening (g:env) (g':env { disjoint g g'}) + (#c1 #c2:comp) (d:lift_comp (push_env g g') c1 c2) + (g1:env { pairwise_disjoint g g1 g' }) + : Tot (lift_comp (push_env (push_env g g1) g') c1 c2) + (decreases d) = + + match d with + | Lift_STAtomic_ST _ c -> Lift_STAtomic_ST _ c + | Lift_STGhost_STAtomic _ c non_informative_c -> + Lift_STGhost_STAtomic _ c (non_informative_c_weakening g g' g1 _ non_informative_c) + +let st_equiv_weakening (g:env) (g':env { disjoint g g' }) + (#c1 #c2:comp) (d:st_equiv (push_env g g') c1 c2) + (g1:env { pairwise_disjoint g g1 g' }) + : st_equiv (push_env (push_env g g1) g') c1 c2 = + match d with + | ST_VPropEquiv _ c1 c2 x _ _ _ _ _ -> + assume (~ (x `Set.mem` dom g')); + assume (~ (x `Set.mem` dom g1)); + ST_VPropEquiv _ c1 c2 x (magic ()) (magic ()) (magic ()) (magic ()) (magic ()) + +let st_comp_typing_weakening (g:env) (g':env { disjoint g g' }) + (#s:st_comp) (d:st_comp_typing (push_env g g') s) + (g1:env { pairwise_disjoint g g1 g' }) + : st_comp_typing (push_env (push_env g g1) g') s = + match d with + | STC _ st x _ _ _ -> + assume (~ (x `Set.mem` dom g')); + assume (~ (x `Set.mem` dom g1)); + STC _ st x (magic ()) (magic ()) (magic ()) + +let comp_typing_weakening (g:env) (g':env { disjoint g g' }) + (#c:comp) (#u:universe) (d:comp_typing (push_env g g') c u) + (g1:env { pairwise_disjoint g g1 g' }) + : comp_typing (push_env (push_env g g1) g') c u = + match d with + | CT_Tot _ t u _ -> CT_Tot _ t u (magic ()) + | CT_ST _ _ d -> CT_ST _ _ (st_comp_typing_weakening g g' d g1) + | CT_STAtomic _ inames _ _ d -> + CT_STAtomic _ inames _ (magic ()) (st_comp_typing_weakening g g' d g1) + | CT_STGhost _ inames _ _ d -> + CT_STGhost _ inames _ (magic ()) (st_comp_typing_weakening g g' d g1) + +// TODO: add precondition that g1 extends g' +let prop_validity_token_weakening (#g:env) (#t:term) + (token:prop_validity g t) + (g1:env) + : prop_validity g1 t = + admit (); + token + +#push-options "--z3rlimit_factor 4 --fuel 1 --ifuel 1" +let rec st_typing_weakening g g' t c d g1 + : Tot (st_typing (push_env (push_env g g1) g') t c) + (decreases d) = + + match d with + | T_Abs _ _ _ _ _ _ _ _ _ -> + // T_Abs is used only at the top, should not come up + magic () + + | T_STApp _ head ty q res arg _ _ -> + T_STApp _ head ty q res arg (magic ()) (magic ()) + + | T_Return _ c use_eq u t e post x_old _ _ _ -> + let x = fresh (push_env (push_env g g1) g') in + assume (~ (x `Set.mem` freevars post)); + // x is only used to open and then close + assume (comp_return c use_eq u t e post x_old == + comp_return c use_eq u t e post x); + T_Return _ c use_eq u t e post x (magic ()) (magic ()) (magic ()) + + | T_Lift _ e c1 c2 d_c1 d_lift -> + T_Lift _ e c1 c2 (st_typing_weakening g g' e c1 d_c1 g1) + (lift_comp_weakening g g' d_lift g1) + + | T_Bind _ e1 e2 c1 c2 b x c d_e1 _ d_e2 d_bc -> + let d_e1 : st_typing (push_env (push_env g g1) g') e1 c1 = + st_typing_weakening g g' e1 c1 d_e1 g1 in + // + // When we call it, g' will actually be empty + // And they way bind checker invokes the lemma, we also know x is not in g1 + // But we must fix it cleanly + // Perhaps typing rules should take a thunk, fun (x:var) ... + // + assume (~ (x `Set.mem` dom g')); + assume (~ (x `Set.mem` dom g1)); + let d_e2 + : st_typing (push_binding (push_env g g') x ppname_default (comp_res c1)) + (open_st_term_nv e2 (b.binder_ppname, x)) + c2 = d_e2 in + assert (equal (push_binding (push_env g g') x ppname_default (comp_res c1)) + (push_env g (push_binding g' x ppname_default (comp_res c1)))); + let d_e2 + : st_typing (push_env g (push_binding g' x ppname_default (comp_res c1))) + (open_st_term_nv e2 (b.binder_ppname, x)) + c2 = d_e2 in + let d_e2 + : st_typing (push_env (push_env g g1) (push_binding g' x ppname_default (comp_res c1))) + (open_st_term_nv e2 (b.binder_ppname, x)) + c2 = st_typing_weakening g (push_binding g' x ppname_default (comp_res c1)) _ _ d_e2 g1 in + assert (equal (push_env (push_env g g1) (push_binding g' x ppname_default (comp_res c1))) + (push_binding (push_env (push_env g g1) g') x ppname_default (comp_res c1))); + let d_e2 + : st_typing (push_binding (push_env (push_env g g1) g') x ppname_default (comp_res c1)) + (open_st_term_nv e2 (b.binder_ppname, x)) + c2 = d_e2 in + let d_bc = bind_comp_weakening g g' d_bc g1 in + T_Bind _ e1 e2 c1 c2 b x c d_e1 (magic ()) d_e2 d_bc + + | T_TotBind _ e1 e2 t1 c2 x _ d_e2 -> + assume (~ (x `Set.mem` dom g')); + assume (~ (x `Set.mem` dom g1)); + let d_e2 + : st_typing (push_binding (push_env g g') x ppname_default t1) + (open_st_term_nv e2 (v_as_nv x)) + c2 = d_e2 in + assert (equal (push_binding (push_env g g') x ppname_default t1) + (push_env g (push_binding g' x ppname_default t1))); + let d_e2 + : st_typing (push_env g (push_binding g' x ppname_default t1)) + (open_st_term_nv e2 (v_as_nv x)) + c2 = d_e2 in + let d_e2 + : st_typing (push_env (push_env g g1) (push_binding g' x ppname_default t1)) + (open_st_term_nv e2 (v_as_nv x)) + c2 = st_typing_weakening g (push_binding g' x ppname_default t1) _ _ d_e2 g1 in + assert (equal (push_env (push_env g g1) (push_binding g' x ppname_default t1)) + (push_binding (push_env (push_env g g1) g') x ppname_default t1)); + let d_e2 + : st_typing (push_binding (push_env (push_env g g1) g') x ppname_default t1) + (open_st_term_nv e2 (v_as_nv x)) + c2 = d_e2 in + + T_TotBind _ e1 e2 t1 c2 x (magic ()) d_e2 + + | T_If _ b e1 e2 c uc hyp _ d_e1 d_e2 _ -> + assume (~ (hyp `Set.mem` dom g')); + assume (~ (hyp `Set.mem` dom g1)); + let d_e1 + : st_typing (push_binding (push_env g g') hyp ppname_default (mk_eq2 u0 tm_bool b tm_true)) + e1 c = d_e1 in + assert (equal (push_binding (push_env g g') hyp ppname_default (mk_eq2 u0 tm_bool b tm_true)) + (push_env g (push_binding g' hyp ppname_default (mk_eq2 u0 tm_bool b tm_true)))); + let d_e1 + : st_typing (push_env g (push_binding g' hyp ppname_default (mk_eq2 u0 tm_bool b tm_true))) + e1 c = d_e1 in + let d_e1 + : st_typing (push_env (push_env g g1) (push_binding g' hyp ppname_default (mk_eq2 u0 tm_bool b tm_true))) + e1 c = st_typing_weakening g (push_binding g' hyp ppname_default (mk_eq2 u0 tm_bool b tm_true)) _ _ d_e1 g1 in + assert (equal (push_env (push_env g g1) (push_binding g' hyp ppname_default (mk_eq2 u0 tm_bool b tm_true))) + (push_binding (push_env (push_env g g1) g') hyp ppname_default (mk_eq2 u0 tm_bool b tm_true))); + let d_e1 + : st_typing (push_binding (push_env (push_env g g1) g') hyp ppname_default (mk_eq2 u0 tm_bool b tm_true)) + e1 c = d_e1 in + let d_e2 + : st_typing (push_binding (push_env g g') hyp ppname_default (mk_eq2 u0 tm_bool b tm_false)) + e2 c = d_e2 in + assert (equal (push_binding (push_env g g') hyp ppname_default (mk_eq2 u0 tm_bool b tm_false)) + (push_env g (push_binding g' hyp ppname_default (mk_eq2 u0 tm_bool b tm_false)))); + let d_e2 + : st_typing (push_env g (push_binding g' hyp ppname_default (mk_eq2 u0 tm_bool b tm_false))) + e2 c = d_e2 in + let d_e2 + : st_typing (push_env (push_env g g1) (push_binding g' hyp ppname_default (mk_eq2 u0 tm_bool b tm_false))) + e2 c = st_typing_weakening g (push_binding g' hyp ppname_default (mk_eq2 u0 tm_bool b tm_false)) _ _ d_e2 g1 in + assert (equal (push_env (push_env g g1) (push_binding g' hyp ppname_default (mk_eq2 u0 tm_bool b tm_false))) + (push_binding (push_env (push_env g g1) g') hyp ppname_default (mk_eq2 u0 tm_bool b tm_false))); + let d_e2 + : st_typing (push_binding (push_env (push_env g g1) g') hyp ppname_default (mk_eq2 u0 tm_bool b tm_false)) + e2 c = d_e2 in + + T_If _ b e1 e2 c uc hyp (magic ()) d_e1 d_e2 (magic ()) + + | T_Match _ sc_u sc_ty sc d_sc_ty d_sc c brs d_brs d_pats_complete -> magic () + + | T_Frame _ e c frame _ d_e -> + T_Frame _ e c frame (magic ()) (st_typing_weakening g g' e c d_e g1) + + | T_Equiv _ e c c' d_e d_eq -> + T_Equiv _ e c c' (st_typing_weakening g g' e c d_e g1) (st_equiv_weakening g g' d_eq g1) + + | T_IntroPure _ p _ token -> T_IntroPure _ p (magic ()) (prop_validity_token_weakening token _) + + | T_ElimExists _ u t p x _ _ -> + assume (~ (x `Set.mem` dom g')); + assume (~ (x `Set.mem` dom g1)); + T_ElimExists _ u t p x (magic ()) (magic ()) + + | T_IntroExists _ u b p e _ _ _ -> + T_IntroExists _ u b p e (magic ()) (magic ()) (magic ()) + + | T_IntroExistsErased _ u b p e _ _ _ -> + T_IntroExistsErased _ u b p e (magic ()) (magic ()) (magic ()) + + | T_While _ inv cond body _ cond_typing body_typing -> + T_While _ inv cond body (magic ()) + (st_typing_weakening g g' cond (comp_while_cond ppname_default inv) cond_typing g1) + (st_typing_weakening g g' body (comp_while_body ppname_default inv) body_typing g1) + + | T_Par _ eL cL eR cR x cL_typing cR_typing eL_typing eR_typing -> + assume (~ (x `Set.mem` dom g')); + assume (~ (x `Set.mem` dom g1)); + T_Par _ eL cL eR cR x + (comp_typing_weakening g g' cL_typing g1) + (comp_typing_weakening g g' cR_typing g1) + (st_typing_weakening g g' eL cL eL_typing g1) + (st_typing_weakening g g' eR cR eR_typing g1) + + | T_WithLocal _ init body init_t c x _ _ d_c d_body -> + assume (~ (x `Set.mem` dom g')); + assume (~ (x `Set.mem` dom g1)); + let d_body + : st_typing (push_binding (push_env g g') x ppname_default (mk_ref init_t)) + (open_st_term_nv body (v_as_nv x)) + (comp_withlocal_body x init_t init c) = d_body in + assert (equal (push_binding (push_env g g') x ppname_default (mk_ref init_t)) + (push_env g (push_binding g' x ppname_default (mk_ref init_t)))); + let d_body + : st_typing (push_env g (push_binding g' x ppname_default (mk_ref init_t))) + (open_st_term_nv body (v_as_nv x)) + (comp_withlocal_body x init_t init c) = d_body in + let d_body + : st_typing (push_env (push_env g g1) (push_binding g' x ppname_default (mk_ref init_t))) + (open_st_term_nv body (v_as_nv x)) + (comp_withlocal_body x init_t init c) + = st_typing_weakening g (push_binding g' x ppname_default (mk_ref init_t)) _ _ d_body g1 in + assert (equal (push_env (push_env g g1) (push_binding g' x ppname_default (mk_ref init_t))) + (push_binding (push_env (push_env g g1) g') x ppname_default (mk_ref init_t))); + let d_body + : st_typing (push_binding (push_env (push_env g g1) g') x ppname_default (mk_ref init_t)) + (open_st_term_nv body (v_as_nv x)) + (comp_withlocal_body x init_t init c) = d_body in + T_WithLocal _ init body init_t c x (magic ()) (magic ()) + (comp_typing_weakening g g' d_c g1) + d_body + + | T_Rewrite _ p q _ _ -> T_Rewrite _ p q (magic ()) (magic ()) + + | T_Admit _ s c d_s -> T_Admit _ s c (st_comp_typing_weakening g g' d_s g1) +#pop-options + +#push-options "--admit_smt_queries true" +let non_informative_t_subst (g:env) (x:var) (t:typ) (g':env { pairwise_disjoint g (singleton_env (fstar_env g) x t) g' }) + (#e:term) + (e_typing:tot_typing g e t) + (u:universe) (t1:term) + (d:non_informative_t (push_env g (push_env (singleton_env (fstar_env g) x t) g')) u t1) + + : non_informative_t (push_env g (subst_env g' (nt x e))) u (subst_term t1 (nt x e)) = + + let ss = nt x e in + + let (| w, _ |) = d in + (| subst_term w ss, magic () |) + +let non_informative_c_subst (g:env) (x:var) (t:typ) (g':env { pairwise_disjoint g (singleton_env (fstar_env g) x t) g' }) + (#e:term) + (e_typing:tot_typing g e t) + (c:comp) + (d:non_informative_c (push_env g (push_env (singleton_env (fstar_env g) x t) g')) c) + + : non_informative_c (push_env g (subst_env g' (nt x e))) (subst_comp c (nt x e)) = + + non_informative_t_subst g x t g' e_typing _ _ d + +let lift_comp_subst + (g:env) (x:var) (t:typ) (g':env { pairwise_disjoint g (singleton_env (fstar_env g) x t) g' }) + (#e:term) + (e_typing:tot_typing g e t) + (#c1 #c2:comp) + (d:lift_comp (push_env g (push_env (singleton_env (fstar_env g) x t) g')) c1 c2) + + : lift_comp (push_env g (subst_env g' (nt x e))) + (subst_comp c1 (nt x e)) + (subst_comp c2 (nt x e)) = + + let ss = nt x e in + + match d with + | Lift_STAtomic_ST _ c -> + Lift_STAtomic_ST _ (subst_comp c ss) + + | Lift_STGhost_STAtomic _ c d_non_informative -> + Lift_STGhost_STAtomic _ (subst_comp c ss) + (non_informative_c_subst g x t g' e_typing _ d_non_informative) + +let bind_comp_subst + (g:env) (x:var) (t:typ) (g':env { pairwise_disjoint g (singleton_env (fstar_env g) x t) g' }) + (#e:term) + (e_typing:tot_typing g e t) + (#y:var) (#c1 #c2 #c3:comp) (d:bind_comp (push_env g (push_env (singleton_env (fstar_env g) x t) g')) y c1 c2 c3) + : bind_comp (push_env g (subst_env g' (nt x e))) + y + (subst_comp c1 (nt x e)) + (subst_comp c2 (nt x e)) + (subst_comp c3 (nt x e)) = + + let ss = nt x e in + + match d with + | Bind_comp _ y c1 c2 _ z _ -> + Bind_comp _ y (subst_comp c1 ss) + (subst_comp c2 ss) + (magic ()) + z + (magic ()) + + | Bind_comp_ghost_l _ y c1 c2 d_non_informative _ z _ -> + Bind_comp_ghost_l _ y (subst_comp c1 ss) + (subst_comp c2 ss) + (non_informative_c_subst g x t g' e_typing _ d_non_informative) + (magic ()) + z + (magic ()) + + | Bind_comp_ghost_r _ y c1 c2 d_non_informative _ z _ -> + Bind_comp_ghost_r _ y (subst_comp c1 ss) + (subst_comp c2 ss) + (non_informative_c_subst g x t g' e_typing _ d_non_informative) + (magic ()) + z + (magic ()) + +let st_equiv_subst (g:env) (x:var) (t:typ) (g':env { pairwise_disjoint g (singleton_env (fstar_env g) x t) g' }) + (#e:term) + (e_typing:tot_typing g e t) + (#c1 #c2:comp) (d:st_equiv (push_env g (push_env (singleton_env (fstar_env g) x t) g')) c1 c2) + : st_equiv (push_env g (subst_env g' (nt x e))) + (subst_comp c1 (nt x e)) + (subst_comp c2 (nt x e)) = + match d with + | ST_VPropEquiv _ c1 c2 y _ _ _ _ _ -> + ST_VPropEquiv _ (subst_comp c1 (nt x e)) + (subst_comp c2 (nt x e)) + y + (magic ()) + (magic ()) + (magic ()) + (magic ()) + (magic ()) + +let st_comp_typing_subst (g:env) (x:var) (t:typ) (g':env { pairwise_disjoint g (singleton_env (fstar_env g) x t) g' }) + (#e:term) + (e_typing:tot_typing g e t) + (#s:st_comp) (d:st_comp_typing (push_env g (push_env (singleton_env (fstar_env g) x t) g')) s) + : st_comp_typing (push_env g (subst_env g' (nt x e))) + (subst_st_comp s (nt x e)) = + match d with + | STC _ s y _ _ _ -> + STC _ (subst_st_comp s (nt x e)) + y + (magic ()) + (magic ()) + (magic ()) + +let comp_typing_subst (g:env) (x:var) (t:typ) (g':env { pairwise_disjoint g (singleton_env (fstar_env g) x t) g' }) + (#e:term) + (e_typing:tot_typing g e t) + (#c:comp) (#u:universe) (d:comp_typing (push_env g (push_env (singleton_env (fstar_env g) x t) g')) c u) + : comp_typing (push_env g (subst_env g' (nt x e))) + (subst_comp c (nt x e)) u = + match d with + | CT_Tot _ t u _ -> + CT_Tot _ (subst_term t (nt x e)) u (magic ()) + | CT_ST _ s d_s -> + CT_ST _ (subst_st_comp s (nt x e)) (st_comp_typing_subst g x t g' e_typing d_s) + | CT_STAtomic _ inames s _ d_s -> + CT_STAtomic _ inames (subst_st_comp s (nt x e)) (magic ()) (st_comp_typing_subst g x t g' e_typing d_s) + | CT_STGhost _ inames s _ d_s -> + CT_STGhost _ inames (subst_st_comp s (nt x e)) (magic ()) (st_comp_typing_subst g x t g' e_typing d_s) + + +let coerce_eq (#a #b:Type) (x:a) (_:squash (a == b)) : y:b { y == x } = x + +let rec st_typing_subst g x t g' #e e_typing #e1 #c1 e1_typing + : Tot (st_typing (push_env g (subst_env g' (nt x e))) + (subst_st_term e1 (nt x e)) + (subst_comp c1 (nt x e))) + (decreases e1_typing) = + + let ss = nt x e in + + match e1_typing with + | T_Abs _ _ _ _ _ _ _ _ _ -> magic () + + | T_STApp _ head ty q res arg _ _ -> + T_STApp _ (subst_term head ss) + (subst_term ty ss) + q + (subst_comp res ss) + (subst_term arg ss) + (magic ()) + (magic ()) + + | T_Return _ c use_eq u t e post x _ _ _ -> + T_Return _ c use_eq u + (subst_term t ss) + (subst_term e ss) + (subst_term post ss) + x + (magic ()) + (magic ()) + (magic ()) + + | T_Lift _ e c1 c2 d_e d_lift -> + T_Lift _ (subst_st_term e ss) + (subst_comp c1 ss) + (subst_comp c2 ss) + (st_typing_subst g x t g' e_typing d_e) + (lift_comp_subst g x t g' e_typing d_lift) + + | T_Bind _ e1 e2 c1 c2 b y c d_e1 _ d_e2 d_bc -> + T_Bind _ (subst_st_term e1 ss) + (subst_st_term e2 ss) + (subst_comp c1 ss) + (subst_comp c2 ss) + (subst_binder b ss) + y + (subst_comp c ss) + (st_typing_subst g x t g' e_typing d_e1) + (magic ()) + (coerce_eq (st_typing_subst g x t (push_binding g' y ppname_default (comp_res c1)) e_typing d_e2) ()) + (bind_comp_subst g x t g' e_typing d_bc) + + | T_TotBind _ e1 e2 t1 c2 y _ d_e2 -> + T_TotBind _ (subst_term e1 ss) + (subst_st_term e2 ss) + (subst_term t1 ss) + (subst_comp c2 ss) + y + (magic ()) + (coerce_eq (st_typing_subst g x t (push_binding g' y ppname_default t1) e_typing d_e2) ()) + + | T_If _ b e1 e2 c uc hyp _ d_e1 d_e2 _ -> + T_If _ (subst_term b ss) + (subst_st_term e1 ss) + (subst_st_term e2 ss) + (subst_comp c ss) + uc + hyp + (magic ()) + (coerce_eq (st_typing_subst g x t (push_binding g' hyp ppname_default (mk_eq2 u0 tm_bool b tm_true)) e_typing d_e1) ()) + (coerce_eq (st_typing_subst g x t (push_binding g' hyp ppname_default (mk_eq2 u0 tm_bool b tm_false)) e_typing d_e2) ()) + (magic ()) + + | T_Match _ _ _ _ _ _ _ _ _ _ -> magic () + + | T_Frame _ e c frame _ d_e -> + T_Frame _ (subst_st_term e ss) + (subst_comp c ss) + (subst_term frame ss) + (magic ()) + (st_typing_subst g x t g' e_typing d_e) + + | T_Equiv _ e c c' d_e d_eq -> + T_Equiv _ (subst_st_term e ss) + (subst_comp c ss) + (subst_comp c' ss) + (st_typing_subst g x t g' e_typing d_e) + (st_equiv_subst g x t g' e_typing d_eq) + + | T_IntroPure _ p _ _ -> + T_IntroPure _ (subst_term p ss) + (magic ()) + (magic ()) + + | T_ElimExists _ u t p y _ _ -> + T_ElimExists _ u (subst_term t ss) (subst_term p ss) y (magic ()) (magic ()) + + | T_IntroExists _ u b p e _ _ _ -> + T_IntroExists _ u (subst_binder b ss) + (subst_term p ss) + (subst_term e ss) + (magic ()) + (magic ()) + (magic ()) + + | T_IntroExistsErased _ u b p e _ _ _ -> + T_IntroExistsErased _ u (subst_binder b ss) + (subst_term p ss) + (subst_term e ss) + (magic ()) + (magic ()) + (magic ()) + + | T_While _ inv cond body _ cond_typing body_typing -> + T_While _ (subst_term inv ss) + (subst_st_term cond ss) + (subst_st_term body ss) + (magic ()) + (st_typing_subst g x t g' e_typing cond_typing) + (st_typing_subst g x t g' e_typing body_typing) + + | T_Par _ eL cL eR cR y d_cL d_cR d_eL d_eR -> + T_Par _ (subst_st_term eL ss) + (subst_comp cL ss) + (subst_st_term eR ss) + (subst_comp cR ss) + y + (comp_typing_subst g x t g' e_typing d_cL) + (comp_typing_subst g x t g' e_typing d_cR) + (st_typing_subst g x t g' e_typing d_eL) + (st_typing_subst g x t g' e_typing d_eR) + + | T_WithLocal _ init body init_t c y _ _ d_c d_body -> + T_WithLocal _ (subst_term init ss) + (subst_st_term body ss) + (subst_term init_t ss) + (subst_comp c ss) + y + (magic ()) + (magic ()) + (comp_typing_subst g x t g' e_typing d_c) + (coerce_eq (st_typing_subst g x t (push_binding g' y ppname_default (mk_ref init_t)) e_typing d_body) ()) + + | T_Rewrite _ p q _ _ -> + T_Rewrite _ (subst_term p ss) + (subst_term q ss) + (magic ()) + (magic ()) + + | T_Admit _ s c d_s -> + T_Admit _ (subst_st_comp s ss) c (st_comp_typing_subst g x t g' e_typing d_s) +#pop-options diff --git a/lib/steel/pulse/Pulse.Typing.Metatheory.Base.fst.hints b/lib/steel/pulse/Pulse.Typing.Metatheory.Base.fst.hints new file mode 100644 index 000000000..5c03a976c --- /dev/null +++ b/lib/steel/pulse/Pulse.Typing.Metatheory.Base.fst.hints @@ -0,0 +1,1052 @@ +[ + "2(:]}{T13o", + [ + [ + "Pulse.Typing.Metatheory.Base.comp_typing_u", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.stateful_comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" + ], + 0, + "4f2a63f23be33da61c74b0d64f4700f8" + ], + [ + "Pulse.Typing.Metatheory.Base.admit_comp_typing", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "constructor_distinct_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.comp_u", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_Pulse.Syntax.Base.C_ST__0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" + ], + 0, + "84de79f95fc3d91a6b619cb2ab9d2793" + ], + [ + "Pulse.Typing.Metatheory.Base.comp_typing_inversion", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.stateful_comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" + ], + 0, + "6ed3bb04f09c4048310c051a9c9294d0" + ], + [ + "Pulse.Typing.Metatheory.Base.comp_typing_inversion", + 2, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "constructor_distinct_Pulse.Syntax.Base.C_ST", + "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", + "constructor_distinct_Pulse.Syntax.Base.C_STGhost", + "constructor_distinct_Pulse.Syntax.Base.C_Tot", + "data_elim_Pulse.Typing.CT_ST", "data_elim_Pulse.Typing.CT_STAtomic", + "data_elim_Pulse.Typing.CT_STGhost", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "disc_equation_Pulse.Typing.CT_ST", + "disc_equation_Pulse.Typing.CT_STAtomic", + "disc_equation_Pulse.Typing.CT_STGhost", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.comp_u", + "equation_Pulse.Syntax.Base.st_comp_of_comp", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Typing.Metatheory.Base.comp_typing_u", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "fuel_guarded_inversion_Pulse.Typing.comp_typing", + "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", + "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", + "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", + "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", + "projection_inverse_Pulse.Syntax.Base.C_ST__0", + "projection_inverse_Pulse.Syntax.Base.C_Tot__0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" + ], + 0, + "7744685a17cdec687c045153a4a737aa" + ], + [ + "Pulse.Typing.Metatheory.Base.st_comp_typing_inversion_cofinite", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "disc_equation_FStar.Pervasives.Native.None", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.fresh_wrt", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "1eed16705e64ce3ba0d564a1c0a8aa6c" + ], + [ + "Pulse.Typing.Metatheory.Base.st_comp_typing_inversion_cofinite", + 2, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "disc_equation_FStar.Pervasives.Native.None", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.fresh_wrt", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "73b3b6ba3dd0b28a5875e50b335dfd02" + ], + [ + "Pulse.Typing.Metatheory.Base.st_comp_typing_inversion", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "disc_equation_FStar.Pervasives.Native.None", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.fresh_wrt", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "33bc6338b32b456b902b466f2b13416b" + ], + [ + "Pulse.Typing.Metatheory.Base.st_comp_typing_inversion", + 2, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "data_elim_Pulse.Typing.STC", + "disc_equation_FStar.Pervasives.Native.None", + "equation_FStar.Pervasives.Native.snd", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.ppname_default", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Syntax.Naming.open_term", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.fresh_wrt", + "fuel_guarded_inversion_Pulse.Typing.st_comp_typing", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "proj_equation_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_Pulse.Typing.STC_g", + "projection_inverse_Pulse.Typing.STC_st", + "projection_inverse_Pulse.Typing.STC_x", + "refinement_interpretation_Tm_refine_6067909eb7e26441b043722acc4cd3cf", + "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "bb8bfdd8ac017e8d29fb5d4130d6bb69" + ], + [ + "Pulse.Typing.Metatheory.Base.tm_exists_inversion", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "disc_equation_FStar.Pervasives.Native.None", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.fresh_wrt", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_5decb6aa26ec21455bdbf1ef967a5856", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "161766957172704111ce5db172730911" + ], + [ + "Pulse.Typing.Metatheory.Base.tm_exists_inversion", + 2, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "disc_equation_FStar.Pervasives.Native.None", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.fresh_wrt", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_5decb6aa26ec21455bdbf1ef967a5856", + "typing_FStar.Map.contains", "typing_FStar.Reflection.V2.Data.var", + "typing_Pulse.Typing.Env.as_map" + ], + 0, + "1d56383ce8115532894431c0c7459cb6" + ], + [ + "Pulse.Typing.Metatheory.Base.pure_typing_inversion", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "constructor_distinct_FStar.Reflection.V2.Data.Tv_FVar", + "constructor_distinct_FStar.Reflection.V2.Data.Tv_Unknown", + "data_elim_Pulse.Syntax.Base.Mkterm", + "data_typing_intro_FStar.Reflection.V2.Data.Tv_FVar@tok", + "equality_tok_FStar.Reflection.V2.Data.Tv_Unknown@tok", + "equality_tok_Pulse.Syntax.Base.Tm_VProp@tok", + "equation_FStar.Reflection.Types.name", + "equation_FStar.Reflection.Typing.tm_prop", + "equation_Pulse.Syntax.Base.not_tv_unknown", + "equation_Pulse.Syntax.Base.range", + "equation_Pulse.Syntax.Base.tm_vprop", + "equation_Pulse.Syntax.Base.with_range", + "lemma_FStar.Reflection.Typing.inspect_pack", + "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "typing_FStar.Reflection.Const.prop_qn", + "typing_FStar.Reflection.V2.Builtins.pack_fv", + "typing_Pulse.Syntax.Base.tm_vprop" + ], + 0, + "c27abe8099ab0e19892a3ca7e119c441" + ], + [ + "Pulse.Typing.Metatheory.Base.pure_typing_inversion", + 2, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "constructor_distinct_FStar.Reflection.V2.Data.Tv_FVar", + "constructor_distinct_FStar.Reflection.V2.Data.Tv_Unknown", + "data_elim_Pulse.Syntax.Base.Mkterm", + "data_typing_intro_FStar.Reflection.V2.Data.Tv_FVar@tok", + "equality_tok_FStar.Reflection.V2.Data.Tv_Unknown@tok", + "equality_tok_Pulse.Syntax.Base.Tm_VProp@tok", + "equation_FStar.Reflection.Types.name", + "equation_FStar.Reflection.Typing.tm_prop", + "equation_Pulse.Syntax.Base.not_tv_unknown", + "equation_Pulse.Syntax.Base.range", + "equation_Pulse.Syntax.Base.tm_vprop", + "equation_Pulse.Syntax.Base.with_range", + "lemma_FStar.Reflection.Typing.inspect_pack", + "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "typing_FStar.Reflection.Const.prop_qn", + "typing_FStar.Reflection.V2.Builtins.pack_fv", + "typing_Pulse.Syntax.Base.tm_vprop" + ], + 0, + "3978fc73c096745ad025c48e564d6082" + ], + [ + "Pulse.Typing.Metatheory.Base.tot_typing_weakening", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.pairwise_disjoint", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_3aba1e2499c7e2419418a981cbb95c4a", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "ddb58d64255bc87a9fc264d295319aec" + ], + [ + "Pulse.Typing.Metatheory.Base.tot_typing_weakening", + 2, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.pairwise_disjoint", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_3aba1e2499c7e2419418a981cbb95c4a", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "45d35456d70fcdb4ea7d69d850fa1990" + ], + [ + "Pulse.Typing.Metatheory.Base.non_informative_t_weakening", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "equation_Pulse.Typing.Env.pairwise_disjoint", + "refinement_interpretation_Tm_refine_3aba1e2499c7e2419418a981cbb95c4a" + ], + 0, + "001638d07f758adfadd47ef0e5388e49" + ], + [ + "Pulse.Typing.Metatheory.Base.non_informative_t_weakening", + 2, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.pairwise_disjoint", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_3aba1e2499c7e2419418a981cbb95c4a", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "a77078c8c99d754c5949574c9e614407" + ], + [ + "Pulse.Typing.Metatheory.Base.non_informative_c_weakening", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "equation_Pulse.Typing.Env.pairwise_disjoint", + "refinement_interpretation_Tm_refine_3aba1e2499c7e2419418a981cbb95c4a" + ], + 0, + "b872c80b43f2671cf7352038c6476c1c" + ], + [ + "Pulse.Typing.Metatheory.Base.non_informative_c_weakening", + 2, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.pairwise_disjoint", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_3aba1e2499c7e2419418a981cbb95c4a", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "719f0ac8aec8018176e39deb4edad52a" + ], + [ + "Pulse.Typing.Metatheory.Base.bind_comp_weakening", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "Pulse.Syntax.Base_pretyping_b015b044c5bf00a3dd3df9fa711c87dd", + "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "data_elim_Pulse.Typing.Bind_comp", + "data_elim_Pulse.Typing.Bind_comp_ghost_l", + "data_elim_Pulse.Typing.Bind_comp_ghost_r", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "disc_equation_Pulse.Typing.Bind_comp", + "disc_equation_Pulse.Typing.Bind_comp_ghost_l", + "disc_equation_Pulse.Typing.Bind_comp_ghost_r", + "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.Env.pairwise_disjoint", + "equation_Pulse.Typing.bind_comp_ghost_l_compatible", + "equation_Pulse.Typing.bind_comp_ghost_l_pre", + "equation_Pulse.Typing.bind_comp_ghost_r_compatible", + "equation_Pulse.Typing.bind_comp_ghost_r_pre", "false_interp", + "fuel_guarded_inversion_FStar.Pervasives.Native.option", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "fuel_guarded_inversion_Pulse.Typing.bind_comp", + "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", + "int_typing", "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Map.lemma_SelConcat1", + "lemma_FStar.Set.disjoint_not_in_both", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_2b6798c0823f5b5055723c1967d93598", + "refinement_interpretation_Tm_refine_2f458fa5f654138dcffb245813d49f42", + "refinement_interpretation_Tm_refine_3aba1e2499c7e2419418a981cbb95c4a", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_4f650fc2932b3d31e01200d48fa18e08", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_611ba448e793150e81181c9e427cdb95", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_f2631f1e9df7e7fe731df0b4c6310657", + "refinement_interpretation_Tm_refine_fecc77b374a5a63ebf9e46c0cac6c2d5", + "typing_FStar.Map.contains", "typing_FStar.Map.domain", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fstar_env", "typing_Pulse.Typing.Env.lookup" + ], + 0, + "0d99dcdab8f87a13017e52341158244d" + ], + [ + "Pulse.Typing.Metatheory.Base.lift_comp_weakening", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "data_elim_Pulse.Typing.Lift_STAtomic_ST", + "data_elim_Pulse.Typing.Lift_STGhost_STAtomic", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Pulse.Typing.Lift_STAtomic_ST", + "disc_equation_Pulse.Typing.Lift_STGhost_STAtomic", + "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.pairwise_disjoint", + "fuel_guarded_inversion_Pulse.Typing.lift_comp", + "function_token_typing_Prims.__cache_version_number__", + "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_3aba1e2499c7e2419418a981cbb95c4a", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fstar_env" + ], + 0, + "e3a30f8d6e6a6260f7720f37b481a428" + ], + [ + "Pulse.Typing.Metatheory.Base.st_equiv_weakening", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_Tm_unit", + "data_elim_Pulse.Typing.ST_VPropEquiv", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_FStar.Pervasives.Native.snd", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.comp_res", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.ppname_default", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.Env.pairwise_disjoint", + "equation_Pulse.Typing.st_equiv_pre", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", + "fuel_guarded_inversion_Pulse.Typing.st_equiv", + "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "proj_equation_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_Pulse.Typing.ST_VPropEquiv_c1", + "projection_inverse_Pulse.Typing.ST_VPropEquiv_c2", + "projection_inverse_Pulse.Typing.ST_VPropEquiv_x", + "refinement_interpretation_Tm_refine_28c4a39499c4c8364ff6badb936a6446", + "refinement_interpretation_Tm_refine_3aba1e2499c7e2419418a981cbb95c4a", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_5ecc2896a3c67fb3a0af5aa92f4f89a7", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "typing_FStar.Map.contains", "typing_FStar.Reflection.V2.Data.var", + "typing_FStar.Set.empty", "typing_FStar.Set.intersect", + "typing_FStar.Set.mem", "typing_Pulse.Syntax.Base.comp_res", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.push_env" + ], + 0, + "ea4839a7977efae5d9d34eef3269799b" + ], + [ + "Pulse.Typing.Metatheory.Base.st_comp_typing_weakening", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "data_elim_Pulse.Typing.STC", + "disc_equation_FStar.Pervasives.Native.None", + "equation_FStar.Pervasives.Native.snd", + "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.ppname_default", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Syntax.Base.vprop", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.Env.pairwise_disjoint", + "fuel_guarded_inversion_FStar.Pervasives.Native.option", + "fuel_guarded_inversion_Pulse.Typing.st_comp_typing", + "function_token_typing_Prims.int", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", + "int_typing", "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "proj_equation_FStar.Pervasives.Native.Mktuple2__2", + "proj_equation_Pulse.Syntax.Base.Mkst_comp_post", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_Pulse.Typing.STC_st", + "projection_inverse_Pulse.Typing.STC_x", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_3aba1e2499c7e2419418a981cbb95c4a", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_6067909eb7e26441b043722acc4cd3cf", + "typing_FStar.Map.contains", "typing_FStar.Reflection.V2.Data.var", + "typing_FStar.Set.empty", "typing_FStar.Set.intersect", + "typing_FStar.Set.mem", + "typing_Pulse.Syntax.Base.__proj__Mkst_comp__item__post", + "typing_Pulse.Syntax.Naming.freevars", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.lookup", "typing_Pulse.Typing.Env.push_env" + ], + 0, + "0ccc2ab39fdd63d272c85371ebf363a4" + ], + [ + "Pulse.Typing.Metatheory.Base.comp_typing_weakening", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "data_elim_Pulse.Typing.CT_ST", "data_elim_Pulse.Typing.CT_STAtomic", + "data_elim_Pulse.Typing.CT_STGhost", "data_elim_Pulse.Typing.CT_Tot", + "disc_equation_Pulse.Typing.CT_ST", + "disc_equation_Pulse.Typing.CT_STAtomic", + "disc_equation_Pulse.Typing.CT_STGhost", + "disc_equation_Pulse.Typing.CT_Tot", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.pairwise_disjoint", + "fuel_guarded_inversion_Pulse.Typing.comp_typing", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_3aba1e2499c7e2419418a981cbb95c4a", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "63d4c92493bb6d279a8761f7c077c435" + ], + [ + "Pulse.Typing.Metatheory.Base.st_typing_weakening", + 1, + 1, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.pairwise_disjoint", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_3aba1e2499c7e2419418a981cbb95c4a", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "b63c7c9992e4ddeded7f7e01d4a8abe2" + ], + [ + "Pulse.Typing.Metatheory.Base.st_typing_weakening", + 2, + 1, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.pairwise_disjoint", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_5371726821249ae5627a70b6626e6c93", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "da59a6775894b8d67cf28510d65c7bfa" + ], + [ + "Pulse.Typing.Metatheory.Base.st_typing_weakening", + 3, + 1, + 1, + [ + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_FStar.List.Tot.Base.append.fuel_instrumented", + "@fuel_correspondence_Pulse.Syntax.Naming.freevars_st.fuel_instrumented", + "@fuel_irrelevance_FStar.List.Tot.Base.append.fuel_instrumented", + "@query", "Prims_pretyping_ce036b6b736ef4e0bc3a9ff132a12aed", + "binder_x_01e6cbbfeab3ba416b144f2c9223a2d4_2", + "binder_x_1ad99e5433effa849e32ef9adfa111a0_0", + "binder_x_253c3a680f4c9d78f6acd0325daa4c3c_1", + "binder_x_5b6164b63aa5506d6aacf8c001ca520e_5", + "binder_x_7112683412d09ec447176f925f3fb12f_4", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.None", + "constructor_distinct_FStar.Pervasives.Native.Some", + "constructor_distinct_Prims.Cons", + "data_elim_Pulse.Syntax.Base.Mkppname", + "data_elim_Pulse.Typing.ST_VPropEquiv", + "data_elim_Pulse.Typing.T_Admit", "data_elim_Pulse.Typing.T_Bind", + "data_elim_Pulse.Typing.T_ElimExists", + "data_elim_Pulse.Typing.T_Equiv", "data_elim_Pulse.Typing.T_Frame", + "data_elim_Pulse.Typing.T_If", + "data_elim_Pulse.Typing.T_IntroExists", + "data_elim_Pulse.Typing.T_IntroExistsErased", + "data_elim_Pulse.Typing.T_IntroPure", + "data_elim_Pulse.Typing.T_Lift", "data_elim_Pulse.Typing.T_Par", + "data_elim_Pulse.Typing.T_Return", + "data_elim_Pulse.Typing.T_Rewrite", "data_elim_Pulse.Typing.T_STApp", + "data_elim_Pulse.Typing.T_TotBind", "data_elim_Pulse.Typing.T_While", + "data_elim_Pulse.Typing.T_WithLocal", + "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "disc_equation_Pulse.Typing.T_Abs", + "disc_equation_Pulse.Typing.T_Admit", + "disc_equation_Pulse.Typing.T_Bind", + "disc_equation_Pulse.Typing.T_ElimExists", + "disc_equation_Pulse.Typing.T_Equiv", + "disc_equation_Pulse.Typing.T_Frame", + "disc_equation_Pulse.Typing.T_If", + "disc_equation_Pulse.Typing.T_IntroExists", + "disc_equation_Pulse.Typing.T_IntroExistsErased", + "disc_equation_Pulse.Typing.T_IntroPure", + "disc_equation_Pulse.Typing.T_Lift", + "disc_equation_Pulse.Typing.T_Match", + "disc_equation_Pulse.Typing.T_Par", + "disc_equation_Pulse.Typing.T_Return", + "disc_equation_Pulse.Typing.T_Rewrite", + "disc_equation_Pulse.Typing.T_STApp", + "disc_equation_Pulse.Typing.T_TotBind", + "disc_equation_Pulse.Typing.T_While", + "disc_equation_Pulse.Typing.T_WithLocal", + "equation_FStar.List.Tot.Base.op_At", + "equation_FStar.Pervasives.Native.fst", + "equation_FStar.Pervasives.Native.snd", + "equation_FStar.Reflection.Typing.fstar_env", + "equation_FStar.Reflection.Typing.fstar_env_fvs", + "equation_FStar.Reflection.Typing.fstar_top_env", + "equation_FStar.Reflection.Typing.pp_name_t", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Sealed.Inhabited.sealed", + "equation_FStar.Sealed.Inhabited.sealed_", + "equation_FStar.Set.disjoint", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.comp_res", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.nvar", + "equation_Pulse.Syntax.Base.ppname_default", + "equation_Pulse.Syntax.Base.range", + "equation_Pulse.Syntax.Base.stateful_comp", + "equation_Pulse.Syntax.Base.typ", + "equation_Pulse.Syntax.Base.v_as_nv", + "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.binding", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.env_bindings", + "equation_Pulse.Typing.Env.equal", + "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.Env.pairwise_disjoint", + "equation_Pulse.Typing.mk_eq2", "equation_Pulse.Typing.mk_ref", + "equation_with_fuel_FStar.List.Tot.Base.append.fuel_instrumented", + "equation_with_fuel_Pulse.Syntax.Naming.freevars_st.fuel_instrumented", + "fuel_guarded_inversion_FStar.Pervasives.Native.option", + "fuel_guarded_inversion_Prims.list", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.ppname", + "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", + "fuel_guarded_inversion_Pulse.Typing.st_equiv", + "fuel_guarded_inversion_Pulse.Typing.st_typing", + "function_token_typing_FStar.Reflection.Types.term", + "function_token_typing_Prims.__cache_version_number__", + "function_token_typing_Prims.int", + "function_token_typing_Prims.string", + "function_token_typing_Pulse.Typing.Env.binding", + "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", "int_inversion", + "kinding_Pulse.Syntax.Base.ppname@tok", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.List.Tot.Properties.append_l_nil", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Map.lemma_InDomUpd2", "lemma_FStar.Map.lemma_UpdDomain", + "lemma_FStar.Sealed.Inhabited.sealed_singleton", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", + "lemma_FStar.Set.lemma_equal_refl", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", "lemma_FStar.Set.mem_singleton", + "lemma_FStar.Set.mem_union", + "lemma_Pulse.Syntax.Base.range_singleton", + "lemma_Pulse.Typing.Env.equal_elim", + "lemma_Pulse.Typing.Env.push_binding_as_map", + "lemma_Pulse.Typing.Env.push_binding_bs", + "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_Pulse.Typing.Env.push_env_bindings", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "primitive_Prims.op_Equality", + "proj_equation_FStar.Pervasives.Native.Mktuple2__1", + "proj_equation_FStar.Pervasives.Native.Mktuple2__2", + "proj_equation_Pulse.Syntax.Base.Mknm_nm_ppname", + "proj_equation_Pulse.Syntax.Base.Mkppname_name", + "proj_equation_Pulse.Syntax.Base.Mkppname_range", + "projection_inverse_BoxBool_proj_0", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__1", + "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", + "projection_inverse_Prims.Cons_a", + "projection_inverse_Prims.Cons_hd", + "projection_inverse_Prims.Cons_tl", + "projection_inverse_Pulse.Syntax.Base.Mknm_nm_ppname", + "refinement_interpretation_Tm_refine_00889bd3bc6adb297f9f40795de5a761", + "refinement_interpretation_Tm_refine_0e05a441736ee1a990510e8440d3b4d7", + "refinement_interpretation_Tm_refine_1e3b46ef574b7c7b56e6f48d45a4bd20", + "refinement_interpretation_Tm_refine_2059be2dd67c6c852866b0f758545706", + "refinement_interpretation_Tm_refine_25fe9861b42cf97d961ff4c8f44eb399", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", + "refinement_interpretation_Tm_refine_28c4a39499c4c8364ff6badb936a6446", + "refinement_interpretation_Tm_refine_2ee1d1f639c54669fffde14441581c40", + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_55ade9f9fb5b5fd33c51185b667c6eed", + "refinement_interpretation_Tm_refine_65c667c598fddb3432338b957782b444", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "refinement_interpretation_Tm_refine_90df79b9523270fa979deaff360b5107", + "refinement_interpretation_Tm_refine_a8f9fbb656279b348f0b063081025b13", + "refinement_interpretation_Tm_refine_b62cb64ffa39b6d9d2eb56acf9f4cf34", + "refinement_interpretation_Tm_refine_b9943bf670d3eeece9d9f2e3e534ed66", + "refinement_interpretation_Tm_refine_c3a8a0db088f6874b298e9191f4d6f5c", + "refinement_interpretation_Tm_refine_c985e04063fe38cddadc0a297161b419", + "refinement_interpretation_Tm_refine_d79470205dca7f56c9b5a5da9d23b961", + "refinement_interpretation_Tm_refine_f2631f1e9df7e7fe731df0b4c6310657", + "refinement_interpretation_Tm_refine_f327b3b66854e57c59289f8c259581e7", + "refinement_kinding_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "string_typing", "subterm_ordering_Pulse.Typing.T_Bind", + "subterm_ordering_Pulse.Typing.T_Equiv", + "subterm_ordering_Pulse.Typing.T_Frame", + "subterm_ordering_Pulse.Typing.T_If", + "subterm_ordering_Pulse.Typing.T_Lift", + "subterm_ordering_Pulse.Typing.T_Par", + "subterm_ordering_Pulse.Typing.T_TotBind", + "subterm_ordering_Pulse.Typing.T_While", + "subterm_ordering_Pulse.Typing.T_WithLocal", + "typing_FStar.Map.contains", "typing_FStar.Pervasives.Native.fst", + "typing_FStar.Pervasives.Native.snd", + "typing_FStar.Pervasives.Native.uu___is_None", + "typing_FStar.Reflection.Typing.bool_fv", + "typing_FStar.Reflection.Typing.lookup_fvar", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Sealed.seal", + "typing_FStar.Set.empty", "typing_FStar.Set.intersect", + "typing_FStar.Set.mem", "typing_FStar.Set.singleton", + "typing_FStar.Set.union", + "typing_Pulse.Syntax.Base.__proj__Mkbinder__item__binder_ppname", + "typing_Pulse.Syntax.Base.__proj__Mkppname__item__name", + "typing_Pulse.Syntax.Base.__proj__Mkppname__item__range", + "typing_Pulse.Syntax.Base.comp_res", + "typing_Pulse.Syntax.Base.ppname_default", + "typing_Pulse.Syntax.Base.uu___is_C_ST", + "typing_Pulse.Syntax.Base.v_as_nv", + "typing_Pulse.Syntax.Naming.freevars_st", + "typing_Pulse.Syntax.Pure.u0", "typing_Pulse.Typing.Env.as_map", + "typing_Pulse.Typing.Env.bindings", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.lookup", + "typing_Pulse.Typing.Env.push_binding", + "typing_Pulse.Typing.Env.push_env", "typing_Pulse.Typing.mk_eq2", + "typing_Pulse.Typing.mk_ref", "typing_Pulse.Typing.tm_bool", + "typing_Pulse.Typing.tm_false", "typing_Pulse.Typing.tm_true" + ], + 0, + "5f6b10a4ebab5b3e5b2025584326c48a" + ], + [ + "Pulse.Typing.Metatheory.Base.veq_weakening", + 1, + 1, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.pairwise_disjoint", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_3aba1e2499c7e2419418a981cbb95c4a", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "42fa03b072055a8ae381c40050b1d2cd" + ] + ] +] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Typing.Metatheory.Base.fsti b/lib/steel/pulse/Pulse.Typing.Metatheory.Base.fsti new file mode 100644 index 000000000..da0103664 --- /dev/null +++ b/lib/steel/pulse/Pulse.Typing.Metatheory.Base.fsti @@ -0,0 +1,80 @@ +module Pulse.Typing.Metatheory.Base +open Pulse.Syntax +open Pulse.Syntax.Naming +open Pulse.Typing + +let comp_typing_u (g:env) (c:comp_st) = comp_typing g c (comp_u c) + +val admit_comp_typing (g:env) (c:comp_st) + : comp_typing_u g c + +val st_typing_correctness (#g:env) (#t:st_term) (#c:comp_st) + (_:st_typing g t c) + : comp_typing_u g c + +val comp_typing_inversion (#g:env) (#c:comp_st) (ct:comp_typing_u g c) + : st_comp_typing g (st_comp_of_comp c) + +val st_comp_typing_inversion_cofinite (#g:env) (#st:_) (ct:st_comp_typing g st) + : (universe_of g st.res st.u & + tot_typing g st.pre tm_vprop & + (x:var{fresh_wrt x g (freevars st.post)} -> //this part is tricky, to get the quantification on x + tot_typing (push_binding g x ppname_default st.res) (open_term st.post x) tm_vprop)) + +val st_comp_typing_inversion (#g:env) (#st:_) (ct:st_comp_typing g st) + : (universe_of g st.res st.u & + tot_typing g st.pre tm_vprop & + x:var{fresh_wrt x g (freevars st.post)} & + tot_typing (push_binding g x ppname_default st.res) (open_term st.post x) tm_vprop) + +val tm_exists_inversion (#g:env) (#u:universe) (#ty:term) (#p:term) + (_:tot_typing g (tm_exists_sl u (as_binder ty) p) tm_vprop) + (x:var { fresh_wrt x g (freevars p) } ) + : universe_of g ty u & + tot_typing (push_binding g x ppname_default ty) p tm_vprop + +val pure_typing_inversion (#g:env) (#p:term) (_:tot_typing g (tm_pure p) tm_vprop) + : tot_typing g p (tm_fstar FStar.Reflection.Typing.tm_prop Range.range_0) + +val tot_typing_weakening + (g:env) (g':env { disjoint g g' }) + (t:term) (ty:typ) (_:tot_typing (push_env g g') t ty) + (g1:env { pairwise_disjoint g g1 g' }) + : tot_typing (push_env (push_env g g1) g') t ty + +val st_typing_weakening + (g:env) (g':env { disjoint g g' }) + (t:st_term) (c:comp) (_:st_typing (push_env g g') t c) + (g1:env { pairwise_disjoint g g1 g' }) + : st_typing (push_env (push_env g g1) g') t c + +let veq_weakening + (g:env) (g':env { disjoint g g' }) + (#v1 #v2:vprop) (_:vprop_equiv (push_env g g') v1 v2) + (g1:env { pairwise_disjoint g g1 g' }) + : vprop_equiv (push_env (push_env g g1) g') v1 v2 = magic () + +let nt (x:var) (t:term) = [ NT x t ] + +val st_typing_subst + (g:env) (x:var) (t:typ) (g':env { pairwise_disjoint g (singleton_env (fstar_env g) x t) g' }) + (#e:term) + (e_typing:tot_typing g e t) + (#e1:st_term) (#c1:comp_st) + (e1_typing:st_typing (push_env g (push_env (singleton_env (fstar_env g) x t) g')) e1 c1) + + : st_typing (push_env g (subst_env g' (nt x e))) + (subst_st_term e1 (nt x e)) + (subst_comp c1 (nt x e)) + +let vprop_equiv_subst + (g:env) (x:var) (t:typ) (g':env { pairwise_disjoint g (singleton_env (fstar_env g) x t) g' }) + (#e:term) + (e_typing:tot_typing g e t) + (#p1:term) (#p2:term) + (veq:vprop_equiv (push_env g (push_env (singleton_env (fstar_env g) x t) g')) p1 p2) + +: vprop_equiv (push_env g (subst_env g' (nt x e))) + (subst_term p1 (nt x e)) + (subst_term p2 (nt x e)) = + admit () diff --git a/lib/steel/pulse/Pulse.Typing.Metatheory.Base.fsti.hints b/lib/steel/pulse/Pulse.Typing.Metatheory.Base.fsti.hints new file mode 100644 index 000000000..47c4b3e9e --- /dev/null +++ b/lib/steel/pulse/Pulse.Typing.Metatheory.Base.fsti.hints @@ -0,0 +1,337 @@ +[ + "\u0017U<\u0014@\u0010i7HiK", + [ + [ + "Pulse.Typing.Metatheory.Base.comp_typing_u", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.stateful_comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" + ], + 0, + "0a5522265d725f8db8698bebd00088e2" + ], + [ + "Pulse.Typing.Metatheory.Base.comp_typing_inversion", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "disc_equation_Pulse.Syntax.Base.C_ST", + "disc_equation_Pulse.Syntax.Base.C_STAtomic", + "disc_equation_Pulse.Syntax.Base.C_STGhost", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.stateful_comp", + "fuel_guarded_inversion_Pulse.Syntax.Base.comp", + "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" + ], + 0, + "0703365ac22db0057b9409aa385842d9" + ], + [ + "Pulse.Typing.Metatheory.Base.st_comp_typing_inversion_cofinite", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "disc_equation_FStar.Pervasives.Native.None", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.fresh_wrt", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "00cecfdace16fb43b63d4fd4726fbe75" + ], + [ + "Pulse.Typing.Metatheory.Base.st_comp_typing_inversion", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "disc_equation_FStar.Pervasives.Native.None", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.fresh_wrt", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "b6ad6f7892ed29cbb7408d4b27afc40d" + ], + [ + "Pulse.Typing.Metatheory.Base.tm_exists_inversion", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "disc_equation_FStar.Pervasives.Native.None", + "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", + "equation_Pulse.Typing.fresh_wrt", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_5decb6aa26ec21455bdbf1ef967a5856", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "f670e43065dc1a30a3a3acbbb33af092" + ], + [ + "Pulse.Typing.Metatheory.Base.pure_typing_inversion", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", + "constructor_distinct_FStar.Reflection.V2.Data.Tv_FVar", + "constructor_distinct_FStar.Reflection.V2.Data.Tv_Unknown", + "data_elim_Pulse.Syntax.Base.Mkterm", + "data_typing_intro_FStar.Reflection.V2.Data.Tv_FVar@tok", + "equality_tok_FStar.Reflection.V2.Data.Tv_Unknown@tok", + "equality_tok_Pulse.Syntax.Base.Tm_VProp@tok", + "equation_FStar.Reflection.Types.name", + "equation_FStar.Reflection.Typing.tm_prop", + "equation_Pulse.Syntax.Base.not_tv_unknown", + "equation_Pulse.Syntax.Base.range", + "equation_Pulse.Syntax.Base.tm_vprop", + "equation_Pulse.Syntax.Base.with_range", + "lemma_FStar.Reflection.Typing.inspect_pack", + "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", + "typing_FStar.Reflection.Const.prop_qn", + "typing_FStar.Reflection.V2.Builtins.pack_fv", + "typing_Pulse.Syntax.Base.tm_vprop" + ], + 0, + "5381d3c42d4596e2c3e0232763ca69a1" + ], + [ + "Pulse.Typing.Metatheory.Base.tot_typing_weakening", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.pairwise_disjoint", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_3aba1e2499c7e2419418a981cbb95c4a", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "51c2f31483fad94fe46ebe1737735495" + ], + [ + "Pulse.Typing.Metatheory.Base.st_typing_weakening", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.pairwise_disjoint", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_3aba1e2499c7e2419418a981cbb95c4a", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "3530e7ff140c115907addadc565aa81d" + ], + [ + "Pulse.Typing.Metatheory.Base.veq_weakening", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.pairwise_disjoint", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", + "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_3aba1e2499c7e2419418a981cbb95c4a", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + ], + 0, + "16cbe1999178dd0dd9df7b1ebd52e5eb" + ], + [ + "Pulse.Typing.Metatheory.Base.st_typing_subst", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "disc_equation_Pulse.Syntax.Base.C_Tot", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.pairwise_disjoint", + "equation_Pulse.Typing.Env.singleton_env", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", "lemma_Pulse.Typing.Env.mk_env_dom", + "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_5640c3b1e6dbb4f6537716200df8bd14", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", + "refinement_interpretation_Tm_refine_7c7d00e0760f324c8ab1d3479743b399", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.singleton_env" + ], + 0, + "f2e89b82b8fc12fba38e97b77345f7fd" + ], + [ + "Pulse.Typing.Metatheory.Base.vprop_equiv_subst", + 1, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "bool_inversion", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", + "equation_Pulse.Typing.Env.pairwise_disjoint", + "equation_Pulse.Typing.Env.singleton_env", + "fuel_guarded_inversion_Pulse.Syntax.Base.term", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", + "lemma_FStar.Map.lemma_ContainsDom", + "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", "lemma_Pulse.Typing.Env.mk_env_dom", + "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_Pulse.Typing.Env.push_env_fstar_env", + "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", + "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_5640c3b1e6dbb4f6537716200df8bd14", + "refinement_interpretation_Tm_refine_7c7d00e0760f324c8ab1d3479743b399", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.singleton_env" + ], + 0, + "e25136e9b9ae3d34808fc358f0a341db" + ], + [ + "Pulse.Typing.Metatheory.Base.vprop_equiv_subst", + 2, + 2, + 1, + [ + "@MaxIFuel_assumption", "@query", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.pairwise_disjoint", + "equation_Pulse.Typing.Env.singleton_env", + "refinement_interpretation_Tm_refine_7c7d00e0760f324c8ab1d3479743b399" + ], + 0, + "db06c345628a9b895eb18531998c908a" + ] + ] +] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Typing.Metatheory.fst b/lib/steel/pulse/Pulse.Typing.Metatheory.fst index e161016cd..1c130988d 100644 --- a/lib/steel/pulse/Pulse.Typing.Metatheory.fst +++ b/lib/steel/pulse/Pulse.Typing.Metatheory.fst @@ -1,55 +1,92 @@ module Pulse.Typing.Metatheory + open Pulse.Syntax -open Pulse.Syntax.Naming open Pulse.Typing -let admit_st_comp_typing (g:env) (st:st_comp) - : st_comp_typing g st - = admit(); - STC g st (fresh g) (admit()) (admit()) (admit()) - -let admit_comp_typing (g:env) (c:comp_st) - : comp_typing_u g c - = match c with - | C_ST st -> - CT_ST g st (admit_st_comp_typing g st) - | C_STAtomic inames st -> - CT_STAtomic g inames st (admit()) (admit_st_comp_typing g st) - | C_STGhost inames st -> - CT_STGhost g inames st (admit()) (admit_st_comp_typing g st) - -let st_typing_correctness (#g:env) (#t:st_term) (#c:comp_st) - (_:st_typing g t c) - : comp_typing_u g c - = admit_comp_typing g c - -let add_frame_well_typed (#g:env) (#c:comp_st) (ct:comp_typing_u g c) - (#f:term) (ft:tot_typing g f tm_vprop) - : comp_typing_u g (add_frame c f) - = admit_comp_typing _ _ - -let comp_typing_inversion #g #c ct = - match ct with - | CT_ST _ _ st - | CT_STAtomic _ _ _ _ st - | CT_STGhost _ _ _ _ st -> st - -let st_comp_typing_inversion_cofinite (#g:env) (#st:_) (ct:st_comp_typing g st) = - admit(), admit(), (fun _ -> admit()) - -let st_comp_typing_inversion (#g:env) (#st:_) (ct:st_comp_typing g st) = - let STC g st x ty pre post = ct in - (| ty, pre, x, post |) - -let tm_exists_inversion (#g:env) (#u:universe) (#ty:term) (#p:term) - (_:tot_typing g (tm_exists_sl u (as_binder ty) p) tm_vprop) - (x:var { fresh_wrt x g (freevars p) } ) - : universe_of g ty u & - tot_typing (push_binding g x ppname_default ty) p tm_vprop - = admit(), admit() - -let tot_typing_weakening #g #t #ty x b d = admit() - -let pure_typing_inversion (#g:env) (#p:term) (_:tot_typing g (tm_pure p) tm_vprop) - : tot_typing g p (tm_fstar FStar.Reflection.Typing.tm_prop Range.range_0) - = admit() \ No newline at end of file +module T = FStar.Tactics.V2 + +let tot_typing_weakening_single #g #t #ty d x x_t = + let g1 = singleton_env (fstar_env g) x x_t in + let g' = mk_env (fstar_env g) in + assert (equal (push_env g g') g); + assert (equal (push_env (push_env g g1) g') (push_env g g1)); + assert (equal (push_env g g1) (push_binding g x ppname_default x_t)); + tot_typing_weakening g g' t ty d g1 + +let tot_typing_weakening_standard g #t #ty d g2 = + let g1 = diff g2 g in + let g' = mk_env (fstar_env g) in + assert (equal (push_env g g1) g2); + assert (equal (push_env g g') g); + assert (equal (push_env (push_env g g1) g') g2); + tot_typing_weakening g g' t ty d g1 + +let st_typing_weakening + (g:env) (g':env { disjoint g g' }) + (t:st_term) (c:comp) (d:st_typing (push_env g g') t c) + (g1:env { g1 `env_extends` g /\ disjoint g1 g' }) + : st_typing (push_env g1 g') t c = + + let g2 = diff g1 g in + let d = st_typing_weakening g g' t c d g2 in + assert (equal (push_env (push_env g g2) g') (push_env g1 g')); + d + +let st_typing_weakening_standard + (#g:env) (#t:st_term) (#c:comp) (d:st_typing g t c) + (g1:env { g1 `env_extends` g }) + : st_typing g1 t c = + + let g' = mk_env (fstar_env g) in + assert (equal (push_env g g') g); + let d = st_typing_weakening g g' t c d g1 in + assert (equal (push_env g1 g') g1); + d + +let st_typing_weakening_end + (g:env) (g':env { disjoint g g' }) + (t:st_term) (c:comp) (d:st_typing (push_env g g') t c) + (g'':env { g'' `env_extends` g' /\ disjoint g'' g }) + : st_typing (push_env g g'') t c = + + let g2 = diff g'' g' in + let emp_env = mk_env (fstar_env g) in + assert (equal (push_env g g') + (push_env (push_env g g') emp_env)); + let d + : st_typing (push_env (push_env (push_env g g') g2) emp_env) _ _ + = Pulse.Typing.Metatheory.Base.st_typing_weakening (push_env g g') emp_env t c (coerce_eq () d) g2 in + assert (equal (push_env (push_env (push_env g g') g2) emp_env) + (push_env (push_env g g') g2)); + push_env_assoc g g' g2; + assert (equal (push_env (push_env g g') g2) + (push_env g (push_env g' g2))); + assert (equal (push_env g (push_env g' g2)) + (push_env g g'')); + coerce_eq () d + +let veq_weakening + (g:env) (g':env { disjoint g g' }) + (#v1 #v2:vprop) (d:vprop_equiv (push_env g g') v1 v2) + (g1:env { g1 `env_extends` g /\ disjoint g1 g' }) + : vprop_equiv (push_env g1 g') v1 v2 = + + let g2 = diff g1 g in + let d = Pulse.Typing.Metatheory.Base.veq_weakening g g' d g2 in + assert (equal (push_env (push_env g g2) g') (push_env g1 g')); + d + +let veq_weakening_end g g' #v1 #v2 d g'' = + let g2 = diff g'' g' in + let emp_env = mk_env (fstar_env g) in + assert (equal (push_env g g') + (push_env (push_env g g') emp_env)); + let d = Pulse.Typing.Metatheory.Base.veq_weakening (push_env g g') emp_env #v1 #v2(coerce_eq () d) g2 in + assert (equal (push_env (push_env (push_env g g') g2) emp_env) + (push_env (push_env g g') g2)); + push_env_assoc g g' g2; + assert (equal (push_env (push_env g g') g2) + (push_env g (push_env g' g2))); + assert (equal (push_env g (push_env g' g2)) + (push_env g g'')); + coerce_eq () d diff --git a/lib/steel/pulse/Pulse.Typing.Metatheory.fst.hints b/lib/steel/pulse/Pulse.Typing.Metatheory.fst.hints index be4d3ae29..4097400cf 100644 --- a/lib/steel/pulse/Pulse.Typing.Metatheory.fst.hints +++ b/lib/steel/pulse/Pulse.Typing.Metatheory.fst.hints @@ -1,284 +1,23 @@ [ - "}O\u0003\u00118b\u007fgT\u001b\u0001", + "\u0002\bXZc=Չ_;", [ [ - "Pulse.Typing.Metatheory.comp_typing_u", + "Pulse.Typing.Metatheory.tot_typing_weakening_single", 1, 2, 1, [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "fc14b04a5c6ad7377456f4cd2ab16795" - ], - [ - "Pulse.Typing.Metatheory.admit_comp_typing", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.comp_u", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "9871739a1529c615aff41dd7175b237f" - ], - [ - "Pulse.Typing.Metatheory.comp_typing_inversion", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "3d7065fe1bcf372e84f7d114c945cef6" - ], - [ - "Pulse.Typing.Metatheory.comp_typing_inversion", - 2, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", - "constructor_distinct_Pulse.Syntax.Base.C_STGhost", - "constructor_distinct_Pulse.Syntax.Base.C_Tot", - "data_elim_Pulse.Typing.CT_ST", "data_elim_Pulse.Typing.CT_STAtomic", - "data_elim_Pulse.Typing.CT_STGhost", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "disc_equation_Pulse.Typing.CT_ST", - "disc_equation_Pulse.Typing.CT_STAtomic", - "disc_equation_Pulse.Typing.CT_STGhost", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.comp_u", - "equation_Pulse.Syntax.Base.st_comp_of_comp", - "equation_Pulse.Syntax.Base.stateful_comp", - "equation_Pulse.Typing.Metatheory.comp_typing_u", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Typing.comp_typing", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", - "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "projection_inverse_Pulse.Syntax.Base.C_Tot__0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "9a570ea75337687fe4670a0512046485" - ], - [ - "Pulse.Typing.Metatheory.st_comp_typing_inversion_cofinite", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "disc_equation_FStar.Pervasives.Native.None", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "ae57042592df606172616177f7a03d63" - ], - [ - "Pulse.Typing.Metatheory.st_comp_typing_inversion_cofinite", - 2, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "disc_equation_FStar.Pervasives.Native.None", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "73b3b6ba3dd0b28a5875e50b335dfd02" - ], - [ - "Pulse.Typing.Metatheory.st_comp_typing_inversion", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "disc_equation_FStar.Pervasives.Native.None", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "094569f812add28b3be8233ac2232818" - ], - [ - "Pulse.Typing.Metatheory.st_comp_typing_inversion", - 2, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "data_elim_Pulse.Typing.STC", - "disc_equation_FStar.Pervasives.Native.None", - "equation_FStar.Pervasives.Native.snd", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.ppname_default", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Syntax.Naming.open_term", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", - "fuel_guarded_inversion_Pulse.Typing.st_comp_typing", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "proj_equation_FStar.Pervasives.Native.Mktuple2__2", - "projection_inverse_BoxBool_proj_0", - "projection_inverse_FStar.Pervasives.Native.Mktuple2__2", - "projection_inverse_Pulse.Typing.STC_g", - "projection_inverse_Pulse.Typing.STC_st", - "projection_inverse_Pulse.Typing.STC_x", - "refinement_interpretation_Tm_refine_6067909eb7e26441b043722acc4cd3cf", - "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "5725e11382c88da7e95f8e115d3c27da" - ], - [ - "Pulse.Typing.Metatheory.tm_exists_inversion", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "disc_equation_FStar.Pervasives.Native.None", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_5decb6aa26ec21455bdbf1ef967a5856", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "060e5e0a5f3fc62cdc8ef2299a20f43b" - ], - [ - "Pulse.Typing.Metatheory.tm_exists_inversion", - 2, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "disc_equation_FStar.Pervasives.Native.None", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_5decb6aa26ec21455bdbf1ef967a5856", - "typing_FStar.Map.contains", "typing_FStar.Reflection.V2.Data.var", - "typing_Pulse.Typing.Env.as_map" - ], - 0, - "1d56383ce8115532894431c0c7459cb6" - ], - [ - "Pulse.Typing.Metatheory.tot_typing_weakening", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "disc_equation_FStar.Pervasives.Native.None", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Syntax.Base.typ", - "equation_Pulse.Syntax.Base.var", "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", "function_token_typing_Prims.int", + "@MaxIFuel_assumption", "@query", "equation_Prims.eqtype", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", + "function_token_typing_Prims.int", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_356d7afdfe093fa68350ffe4fb20df1e", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "ce78b62bb516f54f1f69e588fafefcb1" + "ce7d00c38f76240f436badda65d1998a" ], [ - "Pulse.Typing.Metatheory.tot_typing_weakening", + "Pulse.Typing.Metatheory.tot_typing_weakening_single", 2, 2, 1, @@ -290,143 +29,23 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "1d9968c09b0fce5d9b57a1b4b0ce6cba" - ], - [ - "Pulse.Typing.Metatheory.tot_typing_weakening", - 3, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "disc_equation_FStar.Pervasives.Native.None", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_356d7afdfe093fa68350ffe4fb20df1e", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "586b8535666de9f65684b1bdbafcec83" - ], - [ - "Pulse.Typing.Metatheory.pure_typing_inversion", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "constructor_distinct_FStar.Reflection.V2.Data.Tv_FVar", - "constructor_distinct_FStar.Reflection.V2.Data.Tv_Unknown", - "data_elim_Pulse.Syntax.Base.Mkterm", - "data_typing_intro_FStar.Reflection.V2.Data.Tv_FVar@tok", - "equality_tok_FStar.Reflection.V2.Data.Tv_Unknown@tok", - "equality_tok_Pulse.Syntax.Base.Tm_VProp@tok", - "equation_FStar.Reflection.Types.name", - "equation_FStar.Reflection.Typing.tm_prop", - "equation_Pulse.Syntax.Base.not_tv_unknown", - "equation_Pulse.Syntax.Base.range", - "equation_Pulse.Syntax.Base.tm_vprop", - "equation_Pulse.Syntax.Base.with_range", - "lemma_FStar.Reflection.Typing.inspect_pack", - "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", - "typing_FStar.Reflection.Const.prop_qn", - "typing_FStar.Reflection.V2.Builtins.pack_fv", - "typing_Pulse.Syntax.Base.tm_vprop" - ], - 0, - "7145f8167c31a2e9a6ee764942501020" - ], - [ - "Pulse.Typing.Metatheory.pure_typing_inversion", - 2, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "constructor_distinct_FStar.Reflection.V2.Data.Tv_FVar", - "constructor_distinct_FStar.Reflection.V2.Data.Tv_Unknown", - "data_elim_Pulse.Syntax.Base.Mkterm", - "data_typing_intro_FStar.Reflection.V2.Data.Tv_FVar@tok", - "equality_tok_FStar.Reflection.V2.Data.Tv_Unknown@tok", - "equality_tok_Pulse.Syntax.Base.Tm_VProp@tok", - "equation_FStar.Reflection.Types.name", - "equation_FStar.Reflection.Typing.tm_prop", - "equation_Pulse.Syntax.Base.not_tv_unknown", - "equation_Pulse.Syntax.Base.range", - "equation_Pulse.Syntax.Base.tm_vprop", - "equation_Pulse.Syntax.Base.with_range", - "lemma_FStar.Reflection.Typing.inspect_pack", - "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", - "typing_FStar.Reflection.Const.prop_qn", - "typing_FStar.Reflection.V2.Builtins.pack_fv", - "typing_Pulse.Syntax.Base.tm_vprop" - ], - 0, - "3978fc73c096745ad025c48e564d6082" - ], - [ - "Pulse.Typing.Metatheory.comp_st_with_post", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", - "constructor_distinct_Pulse.Syntax.Base.C_STGhost", - "data_elim_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.st_comp_of_comp", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", - "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "1af5a0d50a29c08466d5ac1ac02372be" + "787d87ddf047743acdbdb9fc212335e1" ], [ - "Pulse.Typing.Metatheory.comp_st_with_pre", + "Pulse.Typing.Metatheory.st_typing_weakening", 1, 2, 1, [ "@MaxIFuel_assumption", "@query", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", - "constructor_distinct_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" + "refinement_interpretation_Tm_refine_dd3396f06b5a01f3df9ed905e57d2aab" ], 0, - "615dd9ff35c89df193f5c24479e37e21" + "a2de9df58b7a04c94ccde5a47e0269b1" ], [ "Pulse.Typing.Metatheory.st_typing_weakening", - 1, + 2, 2, 1, [ @@ -435,197 +54,196 @@ "equation_FStar.Set.disjoint", "equation_Prims.nat", "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.equal", + "equation_Pulse.Typing.Env.extends_with", + "equation_Pulse.Typing.Env.pairwise_disjoint", "int_inversion", + "kinding_Pulse.Syntax.Base.term@tok", "lemma_FStar.Map.lemma_ContainsDom", "lemma_FStar.Map.lemma_InDomConcat", "lemma_FStar.Set.lemma_equal_elim", "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", "lemma_FStar.Set.mem_intersect", "lemma_Pulse.Typing.Env.push_env_as_map", - "lemma_Pulse.Typing.Env.push_env_fstar_env", "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_478810302d3261f456fa9b0eb16ba8e8", "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_dd3396f06b5a01f3df9ed905e57d2aab", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", "typing_FStar.Set.intersect", "typing_FStar.Set.mem", "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" ], 0, - "aa729e06fe17586a5769b39d653b69f7" + "362bd1bdb698dcd91ccec6d49e1ecdc6" ], [ - "Pulse.Typing.Metatheory.veq_weakening", + "Pulse.Typing.Metatheory.st_typing_weakening_standard", 1, 2, 1, [ - "@MaxIFuel_assumption", "@query", "bool_inversion", + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_FStar.List.Tot.Base.append.fuel_instrumented", + "@query", "bool_inversion", "constructor_distinct_Prims.Nil", + "equation_FStar.List.Tot.Base.op_At", "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.binding", "equation_Pulse.Typing.Env.disjoint", "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "lemma_FStar.Map.lemma_InDomConcat", + "equation_Pulse.Typing.Env.env_bindings", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.equal", + "equation_Pulse.Typing.Env.extends_with", + "equation_with_fuel_FStar.List.Tot.Base.append.fuel_instrumented", + "fuel_guarded_inversion_Pulse.Typing.st_typing", + "function_token_typing_Pulse.Typing.Env.binding", "lemma_FStar.Set.lemma_equal_elim", "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", - "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_FStar.Set.mem_intersect", "lemma_Pulse.Typing.Env.equal_elim", + "lemma_Pulse.Typing.Env.mk_env_bs", + "lemma_Pulse.Typing.Env.mk_env_dom", + "lemma_Pulse.Typing.Env.push_env_bindings", "lemma_Pulse.Typing.Env.push_env_fstar_env", - "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_478810302d3261f456fa9b0eb16ba8e8", + "primitive_Prims.op_AmpAmp", "projection_inverse_Prims.Nil_a", + "refinement_interpretation_Tm_refine_30687c6bbf76a4ea67eae131536eafd7", "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", + "refinement_interpretation_Tm_refine_7ad5682d990eaec6510764d663af54de", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" + "typing_Pulse.Typing.Env.bindings", "typing_Pulse.Typing.Env.dom", + "typing_Pulse.Typing.Env.fstar_env", "typing_Pulse.Typing.Env.mk_env" ], 0, - "8122d56501f567eb12106c95b11f0be0" + "57e0569f3c5b0b66d4f26ef8ebfc15f1" ], [ - "Pulse.Typing.Metatheory.singleton_env", + "Pulse.Typing.Metatheory.st_typing_weakening_end", 1, 2, 1, [ - "@query", "equation_FStar.Reflection.V2.Data.var", - "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", - "lemma_FStar.Set.mem_empty", "lemma_Pulse.Typing.Env.mk_env_dom", - "typing_FStar.Reflection.V2.Data.var" + "@MaxIFuel_assumption", "@query", "bool_inversion", + "equation_FStar.Reflection.V2.Data.var", + "equation_FStar.Set.disjoint", "equation_Prims.nat", + "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.disjoint", + "equation_Pulse.Typing.Env.dom", "lemma_FStar.Set.lemma_equal_elim", + "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", + "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", + "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_dd3396f06b5a01f3df9ed905e57d2aab", + "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", + "typing_FStar.Set.intersect", "typing_FStar.Set.mem", + "typing_Pulse.Typing.Env.dom" ], 0, - "6f440ae7cc1d76b0dee82d84cbea23d1" + "656ab0be259a067261a03469eaea01fb" ], [ - "Pulse.Typing.Metatheory.subst_env", - 1, + "Pulse.Typing.Metatheory.st_typing_weakening_end", 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", - "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" - ], - 0, - "3f34c911b195009d59bf0f5810a2dccb" - ], - [ - "Pulse.Typing.Metatheory.st_typing_subst", - 1, 2, 1, [ - "@MaxIFuel_assumption", "@query", "bool_inversion", + "@MaxFuel_assumption", "@MaxIFuel_assumption", + "@fuel_correspondence_FStar.List.Tot.Base.append.fuel_instrumented", + "@query", "bool_inversion", "constructor_distinct_Prims.Nil", + "equation_FStar.List.Tot.Base.op_At", "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.disjoint", "equation_Prims.nat", "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.binding", "equation_Pulse.Typing.Env.disjoint", "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "equation_Pulse.Typing.Metatheory.singleton_env", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", "int_inversion", + "equation_Pulse.Typing.Env.env_bindings", + "equation_Pulse.Typing.Env.env_extends", + "equation_Pulse.Typing.Env.equal", + "equation_Pulse.Typing.Env.extends_with", + "equation_Pulse.Typing.Env.pairwise_disjoint", + "equation_with_fuel_FStar.List.Tot.Base.append.fuel_instrumented", + "fuel_guarded_inversion_Pulse.Typing.st_typing", + "function_token_typing_Pulse.Typing.Env.binding", "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", "lemma_FStar.Map.lemma_ContainsDom", "lemma_FStar.Map.lemma_InDomConcat", + "lemma_FStar.Set.disjoint_not_in_both", "lemma_FStar.Set.lemma_equal_elim", "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", "lemma_Pulse.Typing.Env.mk_env_dom", + "lemma_FStar.Set.mem_intersect", "lemma_Pulse.Typing.Env.equal_elim", + "lemma_Pulse.Typing.Env.mk_env_bs", + "lemma_Pulse.Typing.Env.mk_env_dom", "lemma_Pulse.Typing.Env.push_env_as_map", + "lemma_Pulse.Typing.Env.push_env_bindings", "lemma_Pulse.Typing.Env.push_env_fstar_env", "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", + "projection_inverse_Prims.Nil_a", + "refinement_interpretation_Tm_refine_30687c6bbf76a4ea67eae131536eafd7", + "refinement_interpretation_Tm_refine_484fe0819d1383a2c20d94ae027baa5f", "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_5640c3b1e6dbb4f6537716200df8bd14", - "refinement_interpretation_Tm_refine_d0cbf185f53471ab94597d0f4191e07f", + "refinement_interpretation_Tm_refine_dd3396f06b5a01f3df9ed905e57d2aab", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", - "typing_Pulse.Typing.Env.fstar_env", - "typing_Pulse.Typing.Metatheory.singleton_env" + "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.bindings", + "typing_Pulse.Typing.Env.dom", "typing_Pulse.Typing.Env.fstar_env", + "typing_Pulse.Typing.Env.mk_env", "typing_Pulse.Typing.Env.push_env" ], 0, - "d4cbc07157d9009d5cb5518a0b788c9c" + "9e3450e2d49793dca6b6321bacdb3bca" ], [ - "Pulse.Typing.Metatheory.st_typing_subst", - 2, + "Pulse.Typing.Metatheory.veq_weakening", + 1, 2, 1, [ - "@MaxIFuel_assumption", "@query", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "equation_Pulse.Typing.Metatheory.singleton_env", - "refinement_interpretation_Tm_refine_d0cbf185f53471ab94597d0f4191e07f" + "@MaxIFuel_assumption", "@query", + "refinement_interpretation_Tm_refine_dd3396f06b5a01f3df9ed905e57d2aab" ], 0, - "81c54fd13c73cab83f75f9a4b30caa4a" + "78db82acf32ede0c864ce70ba096bc73" ], [ - "Pulse.Typing.Metatheory.vprop_equiv_subst", - 1, + "Pulse.Typing.Metatheory.veq_weakening", + 2, 2, 1, [ "@MaxIFuel_assumption", "@query", "bool_inversion", + "constructor_distinct_FStar.Pervasives.Native.Some", + "disc_equation_FStar.Pervasives.Native.None", + "equation_FStar.Reflection.Typing.fstar_top_env", "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.disjoint", "equation_Prims.nat", "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "equation_Pulse.Typing.Metatheory.singleton_env", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", "int_inversion", - "kinding_Pulse.Syntax.Base.term@tok", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.equal", + "equation_Pulse.Typing.Env.extends_with", + "equation_Pulse.Typing.Env.pairwise_disjoint", + "function_token_typing_Prims.__cache_version_number__", + "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", "lemma_FStar.Map.lemma_ContainsDom", "lemma_FStar.Map.lemma_InDomConcat", "lemma_FStar.Set.lemma_equal_elim", "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", "lemma_Pulse.Typing.Env.mk_env_dom", + "lemma_FStar.Set.mem_intersect", "lemma_Pulse.Typing.Env.push_env_as_map", - "lemma_Pulse.Typing.Env.push_env_fstar_env", "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", + "refinement_interpretation_Tm_refine_262f039a938fc14ac016e995f8cd074e", "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_5640c3b1e6dbb4f6537716200df8bd14", - "refinement_interpretation_Tm_refine_d0cbf185f53471ab94597d0f4191e07f", + "refinement_interpretation_Tm_refine_dd3396f06b5a01f3df9ed905e57d2aab", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", "typing_FStar.Set.intersect", "typing_FStar.Set.mem", "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", - "typing_Pulse.Typing.Env.fstar_env", - "typing_Pulse.Typing.Metatheory.singleton_env" - ], - 0, - "ac9f94d892af32315a0badfae95d1855" - ], - [ - "Pulse.Typing.Metatheory.vprop_equiv_subst", - 2, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "equation_Pulse.Typing.Metatheory.singleton_env", - "refinement_interpretation_Tm_refine_d0cbf185f53471ab94597d0f4191e07f" + "typing_Pulse.Typing.Env.fstar_env" ], 0, - "96e2864565aa229ecdac0907f982f991" + "c9d5b51c7a6209a7d74068ad8ddebd22" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Typing.Metatheory.fsti b/lib/steel/pulse/Pulse.Typing.Metatheory.fsti index cf5679e8a..8660df3cf 100644 --- a/lib/steel/pulse/Pulse.Typing.Metatheory.fsti +++ b/lib/steel/pulse/Pulse.Typing.Metatheory.fsti @@ -3,103 +3,45 @@ open Pulse.Syntax open Pulse.Syntax.Naming open Pulse.Typing -let comp_typing_u (g:env) (c:comp_st) = comp_typing g c (comp_u c) +include Pulse.Typing.Metatheory.Base -val admit_comp_typing (g:env) (c:comp_st) - : comp_typing_u g c - -val st_typing_correctness (#g:env) (#t:st_term) (#c:comp_st) - (_:st_typing g t c) - : comp_typing_u g c +val tot_typing_weakening_single (#g:env) (#t #ty:term) + (d:tot_typing g t ty) + (x:var { ~ (x `Set.mem` dom g)}) + (x_t:typ) -val comp_typing_inversion (#g:env) (#c:comp_st) (ct:comp_typing_u g c) - : st_comp_typing g (st_comp_of_comp c) + : tot_typing (push_binding g x ppname_default x_t) t ty -val st_comp_typing_inversion_cofinite (#g:env) (#st:_) (ct:st_comp_typing g st) - : (universe_of g st.res st.u & - tot_typing g st.pre tm_vprop & - (x:var{fresh_wrt x g (freevars st.post)} -> //this part is tricky, to get the quantification on x - tot_typing (push_binding g x ppname_default st.res) (open_term st.post x) tm_vprop)) +val tot_typing_weakening_standard (g:env) + (#t #ty:term) (d:tot_typing g t ty) + (g1:env { g1 `env_extends` g }) + : tot_typing g1 t ty -val st_comp_typing_inversion (#g:env) (#st:_) (ct:st_comp_typing g st) - : (universe_of g st.res st.u & - tot_typing g st.pre tm_vprop & - x:var{fresh_wrt x g (freevars st.post)} & - tot_typing (push_binding g x ppname_default st.res) (open_term st.post x) tm_vprop) - -val tm_exists_inversion (#g:env) (#u:universe) (#ty:term) (#p:term) - (_:tot_typing g (tm_exists_sl u (as_binder ty) p) tm_vprop) - (x:var { fresh_wrt x g (freevars p) } ) - : universe_of g ty u & - tot_typing (push_binding g x ppname_default ty) p tm_vprop - -val tot_typing_weakening (#g:env) (#t:term) (#ty:term) - (x:var { fresh_wrt x g Set.empty }) - (x_t:typ) - (_:tot_typing g t ty) - : tot_typing (push_binding g x ppname_default x_t) t ty - -val pure_typing_inversion (#g:env) (#p:term) (_:tot_typing g (tm_pure p) tm_vprop) - : tot_typing g p (tm_fstar FStar.Reflection.Typing.tm_prop Range.range_0) - - -let comp_st_with_post (c:comp_st) (post:term) : c':comp_st { st_comp_of_comp c' == ({ st_comp_of_comp c with post} <: st_comp) } = - match c with - | C_ST st -> C_ST { st with post } - | C_STGhost i st -> C_STGhost i { st with post } - | C_STAtomic i st -> C_STAtomic i {st with post} - -let comp_st_with_pre (c:comp_st) (pre:term) : comp_st = - match c with - | C_ST st -> C_ST { st with pre } - | C_STGhost i st -> C_STGhost i { st with pre } - | C_STAtomic i st -> C_STAtomic i {st with pre } +val st_typing_weakening + (g:env) (g':env { disjoint g g' }) + (t:st_term) (c:comp) (d:st_typing (push_env g g') t c) + (g1:env { g1 `env_extends` g /\ disjoint g1 g' }) + : st_typing (push_env g1 g') t c -let pairwise_disjoint (g g' g'':env) = - disjoint g g' /\ disjoint g' g'' /\ disjoint g g'' +val st_typing_weakening_standard + (#g:env) (#t:st_term) (#c:comp) (d:st_typing g t c) + (g1:env { g1 `env_extends` g }) + : st_typing g1 t c -let st_typing_weakening +val st_typing_weakening_end (g:env) (g':env { disjoint g g' }) - (t:st_term) (c:comp) (_:st_typing (push_env g g') t c) - (g1:env { pairwise_disjoint g g1 g' }) - : st_typing (push_env (push_env g g1) g') t c = magic () + (t:st_term) (c:comp) (d:st_typing (push_env g g') t c) + (g'':env { g'' `env_extends` g' /\ disjoint g'' g }) + : st_typing (push_env g g'') t c -let veq_weakening +val veq_weakening (g:env) (g':env { disjoint g g' }) - (#v1 #v2:vprop) (_:vprop_equiv (push_env g g') v1 v2) - (g1:env { pairwise_disjoint g g1 g' }) - : vprop_equiv (push_env (push_env g g1) g') v1 v2 = magic () + (#v1 #v2:vprop) (d:vprop_equiv (push_env g g') v1 v2) + (g1:env { g1 `env_extends` g /\ disjoint g1 g' }) + : vprop_equiv (push_env g1 g') v1 v2 -// move to Env -let singleton_env (f:_) (x:var) (t:typ) = push_binding (mk_env f) x ppname_default t - -let nt (x:var) (t:term) = [ NT x t ] - -let subst_env (en:env) (ss:subst) - : en':env { fstar_env en == fstar_env en' /\ - dom en == dom en' } = - admit () - -let st_typing_subst - (g:env) (x:var) (t:typ) (g':env { pairwise_disjoint g (singleton_env (fstar_env g) x t) g' }) - (#e:term) - (e_typing:tot_typing g e t) - (#e1:st_term) (#c1:comp_st) - (e1_typing:st_typing (push_env g (push_env (singleton_env (fstar_env g) x t) g')) e1 c1) - - : st_typing (push_env g (subst_env g' (nt x e))) - (subst_st_term e1 (nt x e)) - (subst_comp c1 (nt x e)) = - admit () - -let vprop_equiv_subst - (g:env) (x:var) (t:typ) (g':env { pairwise_disjoint g (singleton_env (fstar_env g) x t) g' }) - (#e:term) - (e_typing:tot_typing g e t) - (#p1:term) (#p2:term) - (veq:vprop_equiv (push_env g (push_env (singleton_env (fstar_env g) x t) g')) p1 p2) - -: vprop_equiv (push_env g (subst_env g' (nt x e))) - (subst_term p1 (nt x e)) - (subst_term p2 (nt x e)) = - admit () +val veq_weakening_end + (g:env) (g':env { disjoint g g' }) + (#v1 #v2:vprop) (d:vprop_equiv (push_env g g') v1 v2) + (g'':env { g'' `env_extends` g' /\ disjoint g'' g }) + : vprop_equiv (push_env g g'') v1 v2 diff --git a/lib/steel/pulse/Pulse.Typing.Metatheory.fsti.hints b/lib/steel/pulse/Pulse.Typing.Metatheory.fsti.hints index ac0ac9a85..e0c18fc88 100644 --- a/lib/steel/pulse/Pulse.Typing.Metatheory.fsti.hints +++ b/lib/steel/pulse/Pulse.Typing.Metatheory.fsti.hints @@ -1,304 +1,8 @@ [ - "->VҢ)CՏ#", + ",x>mI\u0015", [ [ - "Pulse.Typing.Metatheory.comp_typing_u", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "fc14b04a5c6ad7377456f4cd2ab16795" - ], - [ - "Pulse.Typing.Metatheory.comp_typing_inversion", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "5ab99c4ac0af08422d88aaef00843707" - ], - [ - "Pulse.Typing.Metatheory.st_comp_typing_inversion_cofinite", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "disc_equation_FStar.Pervasives.Native.None", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "5d5e7594596379280b2bd365dded2d48" - ], - [ - "Pulse.Typing.Metatheory.st_comp_typing_inversion", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "disc_equation_FStar.Pervasives.Native.None", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_c66fdd97364ac13701a9ea2a206028a8", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "b27b4126daebb5ea01effba7aa6912b8" - ], - [ - "Pulse.Typing.Metatheory.tm_exists_inversion", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "disc_equation_FStar.Pervasives.Native.None", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_5decb6aa26ec21455bdbf1ef967a5856", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "788dc67acbbd2c8f53e86a069bcda036" - ], - [ - "Pulse.Typing.Metatheory.tot_typing_weakening", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "constructor_distinct_FStar.Pervasives.Native.Some", - "disc_equation_FStar.Pervasives.Native.None", - "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Syntax.Base.typ", - "equation_Pulse.Syntax.Base.var", "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.lookup", - "equation_Pulse.Typing.fresh_wrt", "function_token_typing_Prims.int", - "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_356d7afdfe093fa68350ffe4fb20df1e", - "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "19499076a776cd1a3f0486bc3b4caaad" - ], - [ - "Pulse.Typing.Metatheory.pure_typing_inversion", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "constructor_distinct_FStar.Reflection.V2.Data.Tv_FVar", - "constructor_distinct_FStar.Reflection.V2.Data.Tv_Unknown", - "data_elim_Pulse.Syntax.Base.Mkterm", - "data_typing_intro_FStar.Reflection.V2.Data.Tv_FVar@tok", - "equality_tok_FStar.Reflection.V2.Data.Tv_Unknown@tok", - "equality_tok_Pulse.Syntax.Base.Tm_VProp@tok", - "equation_FStar.Reflection.Types.name", - "equation_FStar.Reflection.Typing.tm_prop", - "equation_Pulse.Syntax.Base.not_tv_unknown", - "equation_Pulse.Syntax.Base.range", - "equation_Pulse.Syntax.Base.tm_vprop", - "equation_Pulse.Syntax.Base.with_range", - "lemma_FStar.Reflection.Typing.inspect_pack", - "refinement_interpretation_Tm_refine_8c22aa61a47c16d0229ef090894097c8", - "typing_FStar.Reflection.Const.prop_qn", - "typing_FStar.Reflection.V2.Builtins.pack_fv", - "typing_Pulse.Syntax.Base.tm_vprop" - ], - 0, - "7a4651690b38bb056f1d4ee211e2d617" - ], - [ - "Pulse.Typing.Metatheory.comp_st_with_post", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", - "constructor_distinct_Pulse.Syntax.Base.C_STGhost", - "data_elim_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "equation_Pulse.Syntax.Base.st_comp_of_comp", - "equation_Pulse.Syntax.Base.stateful_comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", - "primitive_Prims.op_BarBar", "projection_inverse_BoxBool_proj_0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__0", - "projection_inverse_Pulse.Syntax.Base.C_STAtomic__1", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__0", - "projection_inverse_Pulse.Syntax.Base.C_STGhost__1", - "projection_inverse_Pulse.Syntax.Base.C_ST__0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "1754ba3f8776e76f6a61731c9df87731" - ], - [ - "Pulse.Typing.Metatheory.comp_st_with_pre", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", - "constructor_distinct_Pulse.Syntax.Base.C_ST", - "constructor_distinct_Pulse.Syntax.Base.C_STAtomic", - "constructor_distinct_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_ST", - "disc_equation_Pulse.Syntax.Base.C_STAtomic", - "disc_equation_Pulse.Syntax.Base.C_STGhost", - "disc_equation_Pulse.Syntax.Base.C_Tot", - "equation_Pulse.Syntax.Base.comp_st", - "fuel_guarded_inversion_Pulse.Syntax.Base.comp", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a" - ], - 0, - "615dd9ff35c89df193f5c24479e37e21" - ], - [ - "Pulse.Typing.Metatheory.st_typing_weakening", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "lemma_FStar.Map.lemma_InDomConcat", - "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", - "lemma_Pulse.Typing.Env.push_env_as_map", - "lemma_Pulse.Typing.Env.push_env_fstar_env", - "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_478810302d3261f456fa9b0eb16ba8e8", - "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "aa729e06fe17586a5769b39d653b69f7" - ], - [ - "Pulse.Typing.Metatheory.veq_weakening", - 1, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "int_inversion", "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "lemma_FStar.Map.lemma_InDomConcat", - "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", - "lemma_Pulse.Typing.Env.push_env_as_map", - "lemma_Pulse.Typing.Env.push_env_fstar_env", - "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_478810302d3261f456fa9b0eb16ba8e8", - "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom" - ], - 0, - "8122d56501f567eb12106c95b11f0be0" - ], - [ - "Pulse.Typing.Metatheory.singleton_env", - 1, - 2, - 1, - [ - "@query", "equation_FStar.Reflection.V2.Data.var", - "equation_Prims.nat", "equation_Pulse.Syntax.Base.var", - "lemma_FStar.Set.mem_empty", "lemma_Pulse.Typing.Env.mk_env_dom", - "typing_FStar.Reflection.V2.Data.var" - ], - 0, - "6f440ae7cc1d76b0dee82d84cbea23d1" - ], - [ - "Pulse.Typing.Metatheory.subst_env", + "Pulse.Typing.Metatheory.tot_typing_weakening_single", 1, 2, 1, @@ -310,64 +14,22 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "3f34c911b195009d59bf0f5810a2dccb" + "d956953603bdee068aa6f354b59eedbd" ], [ - "Pulse.Typing.Metatheory.st_typing_subst", + "Pulse.Typing.Metatheory.st_typing_weakening", 1, 2, 1, [ - "@MaxIFuel_assumption", "@query", "bool_inversion", - "equation_FStar.Reflection.V2.Data.var", - "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "equation_Pulse.Typing.Metatheory.singleton_env", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", "int_inversion", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "lemma_FStar.Map.lemma_InDomConcat", - "lemma_FStar.Set.lemma_equal_elim", - "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", "lemma_Pulse.Typing.Env.mk_env_dom", - "lemma_Pulse.Typing.Env.push_env_as_map", - "lemma_Pulse.Typing.Env.push_env_fstar_env", - "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", - "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_5640c3b1e6dbb4f6537716200df8bd14", - "refinement_interpretation_Tm_refine_d0cbf185f53471ab94597d0f4191e07f", - "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", - "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", - "typing_Pulse.Typing.Env.fstar_env", - "typing_Pulse.Typing.Metatheory.singleton_env" - ], - 0, - "d4cbc07157d9009d5cb5518a0b788c9c" - ], - [ - "Pulse.Typing.Metatheory.st_typing_subst", - 2, - 2, - 1, - [ - "@MaxIFuel_assumption", "@query", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "equation_Pulse.Typing.Metatheory.singleton_env", - "refinement_interpretation_Tm_refine_d0cbf185f53471ab94597d0f4191e07f" + "@MaxIFuel_assumption", "@query", + "refinement_interpretation_Tm_refine_dd3396f06b5a01f3df9ed905e57d2aab" ], 0, - "81c54fd13c73cab83f75f9a4b30caa4a" + "e7ab244afcc1f3afdbcb000f2aac6d54" ], [ - "Pulse.Typing.Metatheory.vprop_equiv_subst", + "Pulse.Typing.Metatheory.st_typing_weakening_end", 1, 2, 1, @@ -375,50 +37,31 @@ "@MaxIFuel_assumption", "@query", "bool_inversion", "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Set.disjoint", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Syntax.Base.var", "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "equation_Pulse.Typing.Metatheory.singleton_env", - "fuel_guarded_inversion_Pulse.Syntax.Base.term", "int_inversion", - "kinding_Pulse.Syntax.Base.term@tok", - "lemma_FStar.Map.lemma_ContainsDom", - "lemma_FStar.Map.lemma_InDomConcat", - "lemma_FStar.Set.lemma_equal_elim", + "equation_Pulse.Typing.Env.dom", "lemma_FStar.Set.lemma_equal_elim", "lemma_FStar.Set.lemma_equal_intro", "lemma_FStar.Set.mem_empty", - "lemma_FStar.Set.mem_intersect", "lemma_Pulse.Typing.Env.mk_env_dom", - "lemma_Pulse.Typing.Env.push_env_as_map", - "lemma_Pulse.Typing.Env.push_env_fstar_env", - "primitive_Prims.op_AmpAmp", "primitive_Prims.op_BarBar", + "lemma_FStar.Set.mem_intersect", "primitive_Prims.op_AmpAmp", "projection_inverse_BoxBool_proj_0", - "refinement_interpretation_Tm_refine_530c8dba59115f16314c44e7c3c4f062", - "refinement_interpretation_Tm_refine_542f9d4f129664613f2483a6c88bc7c2", - "refinement_interpretation_Tm_refine_5640c3b1e6dbb4f6537716200df8bd14", - "refinement_interpretation_Tm_refine_d0cbf185f53471ab94597d0f4191e07f", + "refinement_interpretation_Tm_refine_dd3396f06b5a01f3df9ed905e57d2aab", "typing_FStar.Reflection.V2.Data.var", "typing_FStar.Set.empty", "typing_FStar.Set.intersect", "typing_FStar.Set.mem", - "typing_Pulse.Typing.Env.as_map", "typing_Pulse.Typing.Env.dom", - "typing_Pulse.Typing.Env.fstar_env", - "typing_Pulse.Typing.Metatheory.singleton_env" + "typing_Pulse.Typing.Env.dom" ], 0, - "ac9f94d892af32315a0badfae95d1855" + "1de85b8e50579c769e74c7ec9c75ad8a" ], [ - "Pulse.Typing.Metatheory.vprop_equiv_subst", - 2, + "Pulse.Typing.Metatheory.veq_weakening", + 1, 2, 1, [ - "@MaxIFuel_assumption", "@query", "equation_Prims.nat", - "equation_Pulse.Syntax.Base.var", - "equation_Pulse.Typing.Env.disjoint", - "equation_Pulse.Typing.Metatheory.pairwise_disjoint", - "equation_Pulse.Typing.Metatheory.singleton_env", - "refinement_interpretation_Tm_refine_d0cbf185f53471ab94597d0f4191e07f" + "@MaxIFuel_assumption", "@query", + "refinement_interpretation_Tm_refine_dd3396f06b5a01f3df9ed905e57d2aab" ], 0, - "96e2864565aa229ecdac0907f982f991" + "2f67cdea47a82000e15ff8d222dd8f20" ] ] ] \ No newline at end of file diff --git a/lib/steel/pulse/Pulse.Typing.fst b/lib/steel/pulse/Pulse.Typing.fst index af2e5de49..742242245 100644 --- a/lib/steel/pulse/Pulse.Typing.fst +++ b/lib/steel/pulse/Pulse.Typing.fst @@ -732,7 +732,7 @@ type st_typing : env -> st_term -> comp -> Type = p:term -> tot_typing g p tm_prop -> prop_validity g p -> - st_typing g (wr (Tm_IntroPure { p; should_check=should_check_true })) + st_typing g (wr (Tm_IntroPure { p })) (comp_intro_pure p) | T_ElimExists: @@ -757,8 +757,7 @@ type st_typing : env -> st_term -> comp -> Type = tot_typing g e b.binder_ty -> st_typing g (wr (Tm_IntroExists { erased = false; p = tm_exists_sl u b p; - witnesses= [e]; - should_check=should_check_true })) + witnesses= [e] })) (comp_intro_exists u b p e) | T_IntroExistsErased: @@ -772,8 +771,7 @@ type st_typing : env -> st_term -> comp -> Type = tot_typing g e (mk_erased u b.binder_ty) -> st_typing g (wr (Tm_IntroExists { erased = true; p = tm_exists_sl u b p; - witnesses= [e]; - should_check=should_check_true })) + witnesses= [e] })) (comp_intro_exists_erased u b p e) | T_While: @@ -937,6 +935,7 @@ let emp_typing (#g:_) noeq type post_hint_t = { g:env; + ctag_hint:option ctag; ret_ty:term; u:universe; ty_typing:universe_of g ret_ty u; diff --git a/lib/steel/pulse/Pulse.Typing.fst.hints b/lib/steel/pulse/Pulse.Typing.fst.hints index e43f5352b..1546135be 100644 --- a/lib/steel/pulse/Pulse.Typing.fst.hints +++ b/lib/steel/pulse/Pulse.Typing.fst.hints @@ -1,5 +1,5 @@ [ - "\u0001\b\u0014Hit*&\u0017", + "&\tˉ7yR_v,}", [ [ "Pulse.Typing.debug_log", @@ -11,7 +11,7 @@ "fuel_guarded_inversion_FStar.Tactics.Result.__result" ], 0, - "ea45a066bc18de878b03e5829023284d" + "bd47f093a5144a716970e4acf048ce94" ], [ "Pulse.Typing.tm_prop", @@ -1280,10 +1280,12 @@ "disc_equation_FStar.Pervasives.Native.None", "disc_equation_FStar.Pervasives.Native.Some", "disc_equation_FStar.Reflection.V2.Data.Tv_Unknown", + "disc_equation_Pulse.Syntax.Base.C_Tot", "equality_tok_FStar.Reflection.V2.Data.Tv_Unknown@tok", "equation_FStar.Reflection.V2.Data.var", "equation_FStar.Sealed.Inhabited.is_sealed", "equation_Prims.nat", - "equation_Prims.squash", "equation_Pulse.Syntax.Base.not_tv_unknown", + "equation_Prims.squash", "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.not_tv_unknown", "equation_Pulse.Syntax.Base.range_singleton_trigger", "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", @@ -1293,6 +1295,7 @@ "refinement_interpretation_Tm_refine_2de20c066034c13bf76e9c0b94f4806c", "refinement_interpretation_Tm_refine_31f0431eec32a7971b33471ec380e558", "refinement_interpretation_Tm_refine_5f4e815ddfeb3d0c9882ff3a1fb18eac", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", "refinement_interpretation_Tm_refine_7ad5682d990eaec6510764d663af54de", "string_typing", "true_interp", "typing_FStar.Map.contains", "typing_FStar.Reflection.V2.Data.var", @@ -1363,10 +1366,11 @@ "@MaxIFuel_assumption", "@query", "bool_inversion", "constructor_distinct_FStar.Pervasives.Native.Some", "disc_equation_FStar.Pervasives.Native.None", + "disc_equation_Pulse.Syntax.Base.C_Tot", "equation_FStar.Reflection.V2.Data.var", "equation_Prims.eqtype", - "equation_Prims.nat", "equation_Pulse.Syntax.Base.typ", - "equation_Pulse.Syntax.Base.var", "equation_Pulse.Typing.Env.dom", - "equation_Pulse.Typing.Env.lookup", + "equation_Prims.nat", "equation_Pulse.Syntax.Base.comp_st", + "equation_Pulse.Syntax.Base.typ", "equation_Pulse.Syntax.Base.var", + "equation_Pulse.Typing.Env.dom", "equation_Pulse.Typing.Env.lookup", "fuel_guarded_inversion_Pulse.Syntax.Base.st_term", "function_token_typing_Prims.int", "haseqTm_refine_542f9d4f129664613f2483a6c88bc7c2", @@ -1374,8 +1378,11 @@ "lemma_FStar.Map.lemma_ContainsDom", "projection_inverse_BoxBool_proj_0", "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f", + "refinement_interpretation_Tm_refine_78cf9fabb706bab7e54de904b7db9d2a", "refinement_interpretation_Tm_refine_c3a8a0db088f6874b298e9191f4d6f5c", "typing_FStar.Map.contains", "typing_FStar.Reflection.V2.Data.var", + "typing_FStar.Set.mem", "typing_FStar.Set.union", + "typing_Pulse.Syntax.Naming.freevars_st", "typing_Pulse.Typing.Env.as_map" ], 0, @@ -1508,7 +1515,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "d7a51609fe234d44a00785c2934e9e2a" + "9d2f222cbe100b12820d57eee2a15dcb" ], [ "Pulse.Typing.__proj__T_Abs__item___8", @@ -1862,7 +1869,6 @@ "fuel_guarded_inversion_Pulse.Typing.br_typing", "proj_equation_Pulse.Typing.TBR_bs", "proj_equation_Pulse.Typing.TBR_p", - "projection_inverse_BoxBool_proj_0", "refinement_interpretation_Tm_refine_2de20c066034c13bf76e9c0b94f4806c" ], 0, @@ -1956,7 +1962,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "5e36c057ed66712ec74d8e33d12295c0" + "d21340b7b6abd5a4528752bae777361b" ], [ "Pulse.Typing.post_hint_for_env_extends", @@ -2018,7 +2024,7 @@ "refinement_interpretation_Tm_refine_414d0a9f578ab0048252f8c8f552b99f" ], 0, - "e31f52a22270886f88be1963fb8c264e" + "f0dfdc0240ea1b9be65f343612cbef47" ], [ "Pulse.Typing.__proj__Mkpost_hint_typing_t__item__ty_typing", diff --git a/share/steel/examples/pulse/CustomSyntax.fst b/share/steel/examples/pulse/CustomSyntax.fst index 6a9195cfd..09b80e821 100755 --- a/share/steel/examples/pulse/CustomSyntax.fst +++ b/share/steel/examples/pulse/CustomSyntax.fst @@ -12,6 +12,21 @@ open Pulse.Steel.Wrapper #push-options "--using_facts_from 'Prims FStar.Pervasives FStar.UInt FStar.UInt32 FStar.Ghost Pulse.Steel.Wrapper CustomSyntax'" #push-options "--ide_id_info_off" +assume val p : vprop +assume val g : unit -> stt unit emp (fun _ -> p) + +let folded_pts_to (r:ref U32.t) (n:erased U32.t) : vprop = pts_to r full_perm n + +```pulse +fn unfold_test (r:ref U32.t) (n:erased U32.t) + requires folded_pts_to r n + ensures folded_pts_to r n +{ + with n. unfold (folded_pts_to r n); + with n. fold (folded_pts_to r n) +} +``` + ```pulse fn test_write_10 (x:ref U32.t) (#n:erased U32.t) @@ -31,8 +46,7 @@ fn test_read (r:ref U32.t) returns x : U32.t ensures pts_to r p x { - let x = !r; - x + !r } ``` @@ -123,7 +137,6 @@ fn if_example (r:ref U32.t) } ``` - ```pulse ghost fn elim_intro_exists2 (r:ref U32.t) @@ -136,7 +149,6 @@ fn elim_intro_exists2 (r:ref U32.t) } ``` - assume val pred (b:bool) : vprop assume @@ -153,7 +165,7 @@ fn while_test_alt (r:ref U32.t) exists n. (pts_to r full_perm n `star` pred false) { - while (let x = read_pred(); x) + while (read_pred ()) invariant b . exists n. (pts_to r full_perm n `star` pred b) { () @@ -187,16 +199,13 @@ fn while_count2 (r:ref U32.t) let x = !r; if (x <^ 10ul) { - r := x +^ 1ul; - () + r := x +^ 1ul } else { - r := x -^ 1ul; - () + r := x -^ 1ul } - }; - () + } } ``` @@ -251,8 +260,7 @@ fn test_local (r:ref U32.t) { let mut x = 0ul; let y = !x; - r := y; - introduce exists n. (pts_to x full_perm n) with _ + r := y } ``` @@ -269,12 +277,10 @@ fn count_local (r:ref int) (n:int) pure (b == (m <> n))) { let m = !i; - i := m + 1; - () + i := m + 1 }; let x = !i; - r := x; - introduce exists m. (pts_to i full_perm m) with _ + r := x } ``` @@ -401,4 +407,4 @@ fn incr (x:nat) let y = x + 1; ( y <: r:nat { r > x } ) } -``` \ No newline at end of file +``` diff --git a/share/steel/examples/pulse/ExistsWitness.fst b/share/steel/examples/pulse/ExistsWitness.fst index 1e6a2496e..596332805 100644 --- a/share/steel/examples/pulse/ExistsWitness.fst +++ b/share/steel/examples/pulse/ExistsWitness.fst @@ -66,8 +66,7 @@ ensures emp with (v0 v1:erased _). assert (R.pts_to x0 p0 v0 ** R.pts_to x1 p1 v1); drop (R.pts_to x0 p0 v0); - drop (R.pts_to x1 p1 v1); - () + drop (R.pts_to x1 p1 v1) } ``` @@ -80,8 +79,7 @@ ensures emp with v0 v1. assert R.pts_to x0 p0 v0 ** R.pts_to x1 p1 v1; drop (R.pts_to x0 p0 v0); - drop (R.pts_to x1 p1 v1); - () + drop (R.pts_to x1 p1 v1) } ``` @@ -96,8 +94,7 @@ ensures emp with v1. assert R.pts_to x1 p1 v1; drop (R.pts_to x0 p0 v0); - drop (R.pts_to x1 p1 v1); - () + drop (R.pts_to x1 p1 v1) } ``` @@ -110,7 +107,6 @@ ensures emp with p0 p1 v0 v1. assert R.pts_to x0 p0 v0 ** R.pts_to x1 p1 v1; drop (R.pts_to x0 p0 v0); - drop (R.pts_to x1 p1 v1); - () + drop (R.pts_to x1 p1 v1) } -``` \ No newline at end of file +``` diff --git a/share/steel/examples/pulse/GhostFunction.fst b/share/steel/examples/pulse/GhostFunction.fst index 30ceeb45a..335cd28ea 100644 --- a/share/steel/examples/pulse/GhostFunction.fst +++ b/share/steel/examples/pulse/GhostFunction.fst @@ -8,7 +8,6 @@ module R = Steel.ST.Reference open Pulse.Steel.Wrapper module GR = Steel.ST.GhostReference -[@@expect_failure] ```pulse fn increment (x:GR.ref int) (#n:erased int) requires GR.pts_to x full_perm n @@ -21,7 +20,7 @@ fn increment (x:GR.ref int) (#n:erased int) ```pulse ghost -fn increment (x:GR.ref int) (#n:erased int) +fn incrementg (x:GR.ref int) (#n:erased int) requires GR.pts_to x full_perm n ensures GR.pts_to x full_perm (n + 1) { diff --git a/src/ocaml/plugin/PulseSyntaxWrapper.ml b/src/ocaml/plugin/PulseSyntaxWrapper.ml index 0a1daac34..08c24674a 100755 --- a/src/ocaml/plugin/PulseSyntaxWrapper.ml +++ b/src/ocaml/plugin/PulseSyntaxWrapper.ml @@ -132,8 +132,6 @@ let is_tm_intro_exists (s:st_term) : bool = | Tm_IntroExists _ -> true | _ -> false -let tm_protect (s:st_term) : st_term = PSB.(with_range (tm_protect s) s.range2) - let trans_ns = function | None -> None | Some l -> Some (List.map FStar_Ident.string_of_lid l) @@ -148,7 +146,7 @@ let tm_proof_hint_with_binders (ht:PulseSugar.hint_type) (binders: binder list) PSB.(with_range (Tm_ProofHintWithBinders { hint_type=trans_hint_type ht; binders; v=p; - t4=s }) r) + t3=s }) r) let tm_par p1 p2 q1 q2 b1 b2 r : st_term = PSB.(with_range (tm_par p1 b1 q1 p2 b2 q2) r) diff --git a/src/ocaml/plugin/generated/PulseDesugar.ml b/src/ocaml/plugin/generated/PulseDesugar.ml index b8eb7ba73..1e0a03c30 100644 --- a/src/ocaml/plugin/generated/PulseDesugar.ml +++ b/src/ocaml/plugin/generated/PulseDesugar.ml @@ -637,17 +637,7 @@ let (mk_bind : PulseSyntaxWrapper.st_term -> PulseSyntaxWrapper.range -> PulseSyntaxWrapper.st_term) = - fun b -> - fun s1 -> - fun s2 -> - fun r -> - let uu___ = PulseSyntaxWrapper.is_tm_intro_exists s1 in - if uu___ - then - let uu___1 = PulseSyntaxWrapper.tm_protect s1 in - let uu___2 = PulseSyntaxWrapper.tm_protect s2 in - PulseSyntaxWrapper.tm_bind b uu___1 uu___2 r - else PulseSyntaxWrapper.tm_bind b s1 s2 r + fun b -> fun s1 -> fun s2 -> fun r -> PulseSyntaxWrapper.tm_bind b s1 s2 r let (explicit_rvalues : env_t -> PulseSugar.stmt -> PulseSugar.stmt) = fun env -> fun s -> s type qual = PulseSyntaxWrapper.qualifier FStar_Pervasives_Native.option diff --git a/src/ocaml/plugin/generated/Pulse_Checker.ml b/src/ocaml/plugin/generated/Pulse_Checker.ml index 71c945315..b6cf9779e 100644 --- a/src/ocaml/plugin/generated/Pulse_Checker.ml +++ b/src/ocaml/plugin/generated/Pulse_Checker.ml @@ -7,3123 +7,781 @@ let (terms_to_string : FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" (Prims.of_int (38)) - (Prims.of_int (23)) (Prims.of_int (38)) (Prims.of_int (68))))) + (FStar_Range.mk_range "Pulse.Checker.fst" (Prims.of_int (39)) + (Prims.of_int (23)) (Prims.of_int (39)) (Prims.of_int (68))))) (FStar_Sealed.seal (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" (Prims.of_int (38)) - (Prims.of_int (4)) (Prims.of_int (38)) (Prims.of_int (68))))) + (FStar_Range.mk_range "Pulse.Checker.fst" (Prims.of_int (39)) + (Prims.of_int (4)) (Prims.of_int (39)) (Prims.of_int (68))))) (Obj.magic (FStar_Tactics_Util.map Pulse_Syntax_Printer.term_to_string t)) (fun uu___ -> FStar_Tactics_Effect.lift_div_tac (fun uu___1 -> FStar_String.concat "\n" uu___)) -let (has_pure_vprops : Pulse_Syntax_Base.term -> Prims.bool) = - fun pre -> - FStar_List_Tot_Base.existsb - (fun t -> Pulse_Syntax_Base.uu___is_Tm_Pure t.Pulse_Syntax_Base.t) - (Pulse_Checker_VPropEquiv.vprop_as_list pre) -let (elim_pure_explicit_lid : Prims.string Prims.list) = - Pulse_Reflection_Util.mk_steel_wrapper_lid "elim_pure_explicit" let (default_binder_annot : Pulse_Syntax_Base.binder) = { Pulse_Syntax_Base.binder_ty = Pulse_Syntax_Base.tm_unknown; Pulse_Syntax_Base.binder_ppname = Pulse_Syntax_Base.ppname_default } -let (add_intro_pure : - Pulse_Syntax_Base.range -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.term -> Pulse_Syntax_Base.st_term) - = - fun rng -> - fun continuation -> - fun p -> - let wr t = - { Pulse_Syntax_Base.term1 = t; Pulse_Syntax_Base.range2 = rng } in - let intro_pure_tm = - wr - (Pulse_Syntax_Base.Tm_Protect - { - Pulse_Syntax_Base.t3 = - (wr - (Pulse_Syntax_Base.Tm_IntroPure - { - Pulse_Syntax_Base.p = p; - Pulse_Syntax_Base.should_check = - Pulse_Syntax_Base.should_check_false - })) - }) in - wr - (Pulse_Syntax_Base.Tm_Protect - { - Pulse_Syntax_Base.t3 = - (wr - (Pulse_Syntax_Base.Tm_Bind - { - Pulse_Syntax_Base.binder = default_binder_annot; - Pulse_Syntax_Base.head1 = intro_pure_tm; - Pulse_Syntax_Base.body1 = continuation - })) - }) -type uvar_tys = - (Pulse_Checker_Inference.uvar * Pulse_Syntax_Base.term) Prims.list -let rec (prepare_instantiations : - Pulse_Typing_Env.env -> - (Pulse_Syntax_Base.vprop * (Pulse_Syntax_Base.term, - Pulse_Syntax_Base.term) FStar_Pervasives.either) Prims.list -> - uvar_tys -> - Pulse_Syntax_Base.vprop -> - Pulse_Syntax_Base.term Prims.list -> - ((Pulse_Syntax_Base.vprop * (Pulse_Syntax_Base.vprop * - (Pulse_Syntax_Base.term, Pulse_Syntax_Base.term) - FStar_Pervasives.either) Prims.list * uvar_tys), - unit) FStar_Tactics_Effect.tac_repr) - = - fun uu___4 -> - fun uu___3 -> - fun uu___2 -> - fun uu___1 -> - fun uu___ -> - (fun g -> - fun out -> - fun out_uvars -> - fun goal_vprop -> - fun witnesses -> - match (witnesses, (goal_vprop.Pulse_Syntax_Base.t)) - with - | ([], Pulse_Syntax_Base.Tm_ExistsSL (u, b, p)) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (73)) - (Prims.of_int (37)) - (Prims.of_int (75)) - (Prims.of_int (37))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (72)) - (Prims.of_int (30)) - (Prims.of_int (77)) - (Prims.of_int (105))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (74)) - (Prims.of_int (22)) - (Prims.of_int (74)) - (Prims.of_int (70))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (73)) - (Prims.of_int (37)) - (Prims.of_int (75)) - (Prims.of_int (37))))) - (Obj.magic - (Pulse_Checker_Inference.gen_uvar - b.Pulse_Syntax_Base.binder_ppname)) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - match uu___ with - | (uv, t) -> - ((Pulse_Syntax_Naming.open_term' - p t Prims.int_zero), - (FStar_Pervasives.Inr - t), uv))))) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | (next_goal_vprop, inst, uv) -> - Obj.magic - (prepare_instantiations g - ((goal_vprop, inst) :: out) - ((uv, - (b.Pulse_Syntax_Base.binder_ty)) - :: out_uvars) - next_goal_vprop [])) uu___))) - | ([], uu___) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - (goal_vprop, out, out_uvars)))) - | (t::witnesses1, Pulse_Syntax_Base.Tm_ExistsSL - (u, b, p)) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (84)) - (Prims.of_int (10)) - (Prims.of_int (89)) - (Prims.of_int (39))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (82)) - (Prims.of_int (42)) - (Prims.of_int (91)) - (Prims.of_int (98))))) - (match t.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_Unknown -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (86)) - (Prims.of_int (24)) - (Prims.of_int (86)) - (Prims.of_int (72))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (85)) - (Prims.of_int (25)) - (Prims.of_int (87)) - (Prims.of_int (55))))) - (Obj.magic - (Pulse_Checker_Inference.gen_uvar - b.Pulse_Syntax_Base.binder_ppname)) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - match uu___ with - | (uv, t1) -> - ((Pulse_Syntax_Naming.open_term' - p t1 - Prims.int_zero), - (FStar_Pervasives.Inr - t1), - [(uv, - (b.Pulse_Syntax_Base.binder_ty))]))))) - | uu___ -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - ((Pulse_Syntax_Naming.open_term' - p t Prims.int_zero), - (FStar_Pervasives.Inl t), - []))))) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | (next_goal_vprop, inst, uvs) -> - Obj.magic - (prepare_instantiations g - ((goal_vprop, inst) :: out) - (FStar_List_Tot_Base.op_At - uvs out_uvars) - next_goal_vprop witnesses1)) - uu___))) - | uu___ -> - Obj.magic - (Obj.repr - (Pulse_Typing_Env.fail g - FStar_Pervasives_Native.None - "Unexpected number of instantiations in intro"))) - uu___4 uu___3 uu___2 uu___1 uu___ -let rec (build_instantiations : - Pulse_Checker_Inference.solution -> - (Pulse_Syntax_Base.term * (Pulse_Syntax_Base.term, - Pulse_Syntax_Base.term) FStar_Pervasives.either) Prims.list -> - (Pulse_Syntax_Base.st_term, unit) FStar_Tactics_Effect.tac_repr) - = - fun solutions -> - fun insts -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" (Prims.of_int (98)) - (Prims.of_int (29)) (Prims.of_int (110)) - (Prims.of_int (102))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" (Prims.of_int (112)) - (Prims.of_int (8)) (Prims.of_int (119)) (Prims.of_int (92))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - fun uu___1 -> - match uu___1 with - | (v, i) -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (99)) (Prims.of_int (18)) - (Prims.of_int (99)) (Prims.of_int (68))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (100)) (Prims.of_int (10)) - (Prims.of_int (110)) (Prims.of_int (102))))) - (Obj.magic - (Pulse_Checker_Inference.apply_solution solutions v)) - (fun uu___2 -> - (fun v1 -> - match i with - | FStar_Pervasives.Inl user_provided -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - Pulse_Typing.wr - (Pulse_Syntax_Base.Tm_IntroExists - { - Pulse_Syntax_Base.erased = - false; - Pulse_Syntax_Base.p2 = v1; - Pulse_Syntax_Base.witnesses - = [user_provided]; - Pulse_Syntax_Base.should_check1 - = - Pulse_Syntax_Base.should_check_true - })))) - | FStar_Pervasives.Inr inferred -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (105)) - (Prims.of_int (22)) - (Prims.of_int (105)) - (Prims.of_int (79))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (106)) - (Prims.of_int (12)) - (Prims.of_int (110)) - (Prims.of_int (102))))) - (Obj.magic - (Pulse_Checker_Inference.apply_solution - solutions inferred)) - (fun sol -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - match Pulse_Syntax_Pure.unreveal - sol - with - | FStar_Pervasives_Native.Some - sol1 -> - Pulse_Typing.wr - (Pulse_Syntax_Base.Tm_IntroExists - { - Pulse_Syntax_Base.erased - = true; - Pulse_Syntax_Base.p2 - = v1; - Pulse_Syntax_Base.witnesses - = [sol1]; - Pulse_Syntax_Base.should_check1 - = - Pulse_Syntax_Base.should_check_false - }) - | uu___3 -> - Pulse_Typing.wr - (Pulse_Syntax_Base.Tm_IntroExists - { - Pulse_Syntax_Base.erased - = true; - Pulse_Syntax_Base.p2 - = v1; - Pulse_Syntax_Base.witnesses - = [sol]; - Pulse_Syntax_Base.should_check1 - = - Pulse_Syntax_Base.should_check_false - })))))) uu___2))) - (fun uu___ -> - (fun one_inst -> - match insts with - | [] -> - Obj.magic - (Obj.repr (FStar_Tactics_V2_Derived.fail "Impossible")) - | hd::[] -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (114)) (Prims.of_int (21)) - (Prims.of_int (114)) (Prims.of_int (53))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (114)) (Prims.of_int (18)) - (Prims.of_int (114)) (Prims.of_int (53))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (114)) - (Prims.of_int (35)) - (Prims.of_int (114)) - (Prims.of_int (50))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (114)) - (Prims.of_int (21)) - (Prims.of_int (114)) - (Prims.of_int (53))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (114)) - (Prims.of_int (39)) - (Prims.of_int (114)) - (Prims.of_int (50))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (114)) - (Prims.of_int (35)) - (Prims.of_int (114)) - (Prims.of_int (50))))) - (Obj.magic (one_inst hd)) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - { Pulse_Syntax_Base.t3 = uu___ - })))) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - Pulse_Syntax_Base.Tm_Protect uu___)))) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> Pulse_Typing.wr uu___)))) - | hd::tl -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (116)) (Prims.of_int (23)) - (Prims.of_int (119)) (Prims.of_int (92))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (116)) (Prims.of_int (20)) - (Prims.of_int (119)) (Prims.of_int (92))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (117)) - (Prims.of_int (28)) - (Prims.of_int (119)) - (Prims.of_int (89))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (116)) - (Prims.of_int (23)) - (Prims.of_int (119)) - (Prims.of_int (92))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (117)) - (Prims.of_int (32)) - (Prims.of_int (119)) - (Prims.of_int (89))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (117)) - (Prims.of_int (28)) - (Prims.of_int (119)) - (Prims.of_int (89))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (117)) - (Prims.of_int (35)) - (Prims.of_int (119)) - (Prims.of_int (89))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (117)) - (Prims.of_int (32)) - (Prims.of_int (119)) - (Prims.of_int (89))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (117)) - (Prims.of_int (46)) - (Prims.of_int (119)) - (Prims.of_int (86))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (117)) - (Prims.of_int (35)) - (Prims.of_int (119)) - (Prims.of_int (89))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (118)) - (Prims.of_int (53)) - (Prims.of_int (118)) - (Prims.of_int (88))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (117)) - (Prims.of_int (46)) - (Prims.of_int (119)) - (Prims.of_int (86))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - ( - FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (118)) - (Prims.of_int (56)) - (Prims.of_int (118)) - (Prims.of_int (88))))) - (FStar_Sealed.seal - (Obj.magic - ( - FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (118)) - (Prims.of_int (53)) - (Prims.of_int (118)) - (Prims.of_int (88))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - ( - FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (118)) - (Prims.of_int (70)) - (Prims.of_int (118)) - (Prims.of_int (85))))) - ( - FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (118)) - (Prims.of_int (56)) - (Prims.of_int (118)) - (Prims.of_int (88))))) - ( - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (118)) - (Prims.of_int (74)) - (Prims.of_int (118)) - (Prims.of_int (85))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (118)) - (Prims.of_int (70)) - (Prims.of_int (118)) - (Prims.of_int (85))))) - (Obj.magic - (one_inst - hd)) - (fun - uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___1 -> - { - Pulse_Syntax_Base.t3 - = uu___ - })))) - ( - fun uu___ - -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___1 -> - Pulse_Syntax_Base.Tm_Protect - uu___)))) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___1 -> - Pulse_Typing.wr - uu___)))) - (fun uu___ -> - (fun uu___ -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (119)) - (Prims.of_int (53)) - (Prims.of_int (119)) - (Prims.of_int (86))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (117)) - (Prims.of_int (46)) - (Prims.of_int (119)) - (Prims.of_int (86))))) - (Obj.magic - (build_instantiations - solutions - tl)) - (fun - uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___2 -> - { - Pulse_Syntax_Base.binder - = - default_binder_annot; - Pulse_Syntax_Base.head1 - = uu___; - Pulse_Syntax_Base.body1 - = uu___1 - })))) - uu___))) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - Pulse_Syntax_Base.Tm_Bind - uu___)))) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - Pulse_Typing.wr uu___)))) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - { Pulse_Syntax_Base.t3 = uu___ - })))) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - Pulse_Syntax_Base.Tm_Protect uu___)))) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> Pulse_Typing.wr uu___))))) - uu___) -let (maybe_infer_intro_exists : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.term -> - (Pulse_Syntax_Base.st_term, unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun st -> - fun pre -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (126)) (Prims.of_int (33)) - (Prims.of_int (138)) (Prims.of_int (18))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (143)) (Prims.of_int (4)) - (Prims.of_int (222)) (Prims.of_int (10))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - fun t -> - match FStar_List_Tot_Base.partition - (fun uu___1 -> - match uu___1 with - | { - Pulse_Syntax_Base.t = - Pulse_Syntax_Base.Tm_Pure uu___2; - Pulse_Syntax_Base.range1 = uu___3;_} -> - false - | { - Pulse_Syntax_Base.t = - Pulse_Syntax_Base.Tm_Emp; - Pulse_Syntax_Base.range1 = uu___2;_} -> - false - | uu___2 -> true) - (Pulse_Checker_VPropEquiv.vprop_as_list t) - with - | (rest, pure) -> - (((match Pulse_Checker_VPropEquiv.list_as_vprop rest - with - | { - Pulse_Syntax_Base.t = Pulse_Syntax_Base.Tm_Star - (t1, - { - Pulse_Syntax_Base.t = - Pulse_Syntax_Base.Tm_Emp; - Pulse_Syntax_Base.range1 = uu___1;_}); - Pulse_Syntax_Base.range1 = uu___2;_} -> t1 - | { - Pulse_Syntax_Base.t = Pulse_Syntax_Base.Tm_Star - ({ - Pulse_Syntax_Base.t = - Pulse_Syntax_Base.Tm_Emp; - Pulse_Syntax_Base.range1 = uu___1;_}, - t1); - Pulse_Syntax_Base.range1 = uu___2;_} -> t1 - | t1 -> t1)), pure))) - (fun uu___ -> - (fun remove_pure_conjuncts -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (143)) (Prims.of_int (4)) - (Prims.of_int (148)) (Prims.of_int (5))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (148)) (Prims.of_int (6)) - (Prims.of_int (222)) (Prims.of_int (10))))) - (if - Pulse_RuntimeUtils.debug_at_level - (Pulse_Typing_Env.fstar_env g) "inference" - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (145)) - (Prims.of_int (14)) - (Prims.of_int (147)) - (Prims.of_int (43))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (144)) - (Prims.of_int (9)) - (Prims.of_int (148)) - (Prims.of_int (5))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (147)) - (Prims.of_int (18)) - (Prims.of_int (147)) - (Prims.of_int (42))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (145)) - (Prims.of_int (14)) - (Prims.of_int (147)) - (Prims.of_int (43))))) - (Obj.magic - (Pulse_Syntax_Printer.st_term_to_string - st)) - (fun uu___ -> - (fun uu___ -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (145)) - (Prims.of_int (14)) - (Prims.of_int (147)) - (Prims.of_int (43))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (145)) - (Prims.of_int (14)) - (Prims.of_int (147)) - (Prims.of_int (43))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (146)) - (Prims.of_int (18)) - (Prims.of_int (146)) - (Prims.of_int (46))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "FStar.Printf.fst" - (Prims.of_int (121)) - (Prims.of_int (8)) - (Prims.of_int (123)) - (Prims.of_int (44))))) - (Obj.magic - (FStar_Tactics_V2_Builtins.range_to_string - st.Pulse_Syntax_Base.range2)) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - fun x -> - Prims.strcat - (Prims.strcat - "At " - (Prims.strcat - uu___1 - ": infer_intro_exists for ")) - (Prims.strcat - x "\n"))))) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - uu___1 uu___)))) - uu___))) - (fun uu___ -> - (fun uu___ -> - Obj.magic - (FStar_Tactics_V2_Builtins.print - uu___)) uu___))) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> ())))) - (fun uu___ -> - (fun uu___ -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (149)) - (Prims.of_int (50)) - (Prims.of_int (149)) - (Prims.of_int (57))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (148)) - (Prims.of_int (6)) - (Prims.of_int (222)) - (Prims.of_int (10))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> st.Pulse_Syntax_Base.term1)) - (fun uu___1 -> - (fun uu___1 -> - match uu___1 with - | Pulse_Syntax_Base.Tm_IntroExists - { - Pulse_Syntax_Base.erased = erased; - Pulse_Syntax_Base.p2 = t; - Pulse_Syntax_Base.witnesses = - witnesses; - Pulse_Syntax_Base.should_check1 = - uu___2;_} - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (150)) - (Prims.of_int (15)) - (Prims.of_int (150)) - (Prims.of_int (64))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (149)) - (Prims.of_int (60)) - (Prims.of_int (222)) - (Prims.of_int (10))))) - (Obj.magic - (Pulse_Checker_Pure.instantiate_term_implicits - g t)) - (fun uu___3 -> - (fun uu___3 -> - match uu___3 with - | (t1, uu___4) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - ( - FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (151)) - (Prims.of_int (33)) - (Prims.of_int (151)) - (Prims.of_int (75))))) - (FStar_Sealed.seal - (Obj.magic - ( - FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (150)) - (Prims.of_int (67)) - (Prims.of_int (222)) - (Prims.of_int (10))))) - (Obj.magic - (prepare_instantiations - g [] [] - t1 - witnesses)) - (fun uu___5 -> - (fun uu___5 - -> - match uu___5 - with - | - (goal_vprop, - insts, - uvs) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (152)) - (Prims.of_int (37)) - (Prims.of_int (152)) - (Prims.of_int (69))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (151)) - (Prims.of_int (78)) - (Prims.of_int (222)) - (Prims.of_int (10))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___6 -> - remove_pure_conjuncts - goal_vprop)) - (fun - uu___6 -> - (fun - uu___6 -> - match uu___6 - with - | - (goal_vprop1, - pure_conjuncts) - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (153)) - (Prims.of_int (20)) - (Prims.of_int (153)) - (Prims.of_int (81))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (153)) - (Prims.of_int (84)) - (Prims.of_int (222)) - (Prims.of_int (10))))) - (Obj.magic - (Pulse_Checker_Inference.try_inst_uvs_in_goal - g pre - goal_vprop1)) - (fun - uu___7 -> - (fun - solutions - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (160)) - (Prims.of_int (38)) - (Prims.of_int (167)) - (Prims.of_int (22))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (168)) - (Prims.of_int (6)) - (Prims.of_int (222)) - (Prims.of_int (10))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___7 -> - fun - solutions1 - -> - fun p -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (161)) - (Prims.of_int (14)) - (Prims.of_int (161)) - (Prims.of_int (64))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (162)) - (Prims.of_int (6)) - (Prims.of_int (167)) - (Prims.of_int (22))))) - (Obj.magic - (Pulse_Checker_Inference.apply_solution - solutions1 - p)) - (fun - uu___8 -> - (fun p1 - -> - match - p1.Pulse_Syntax_Base.t - with - | - Pulse_Syntax_Base.Tm_Pure - p2 -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (164)) - (Prims.of_int (19)) - (Prims.of_int (164)) - (Prims.of_int (72))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (165)) - (Prims.of_int (8)) - (Prims.of_int (165)) - (Prims.of_int (24))))) - (Obj.magic - (Pulse_Checker_Inference.try_solve_pure_equalities - g p2)) - (fun sols - -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___8 -> - FStar_List_Tot_Base.op_At - sols - solutions1)))) - | - uu___8 -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___9 -> - solutions1)))) - uu___8))) - (fun - uu___7 -> - (fun - maybe_solve_pure - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (169)) - (Prims.of_int (20)) - (Prims.of_int (169)) - (Prims.of_int (73))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (170)) - (Prims.of_int (4)) - (Prims.of_int (222)) - (Prims.of_int (10))))) - (Obj.magic - (FStar_Tactics_Util.fold_left - maybe_solve_pure - solutions - pure_conjuncts)) - (fun - uu___7 -> - (fun - solutions1 - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (170)) - (Prims.of_int (4)) - (Prims.of_int (177)) - (Prims.of_int (5))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (177)) - (Prims.of_int (6)) - (Prims.of_int (222)) - (Prims.of_int (10))))) - (if - Pulse_RuntimeUtils.debug_at_level - (Pulse_Typing_Env.fstar_env - g) - "inference" - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (173)) - (Prims.of_int (8)) - (Prims.of_int (176)) - (Prims.of_int (68))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (171)) - (Prims.of_int (9)) - (Prims.of_int (177)) - (Prims.of_int (5))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (176)) - (Prims.of_int (12)) - (Prims.of_int (176)) - (Prims.of_int (67))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (173)) - (Prims.of_int (8)) - (Prims.of_int (176)) - (Prims.of_int (68))))) - (Obj.magic - (Pulse_Checker_Inference.solutions_to_string - solutions1)) - (fun - uu___7 -> - (fun - uu___7 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (173)) - (Prims.of_int (8)) - (Prims.of_int (176)) - (Prims.of_int (68))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (173)) - (Prims.of_int (8)) - (Prims.of_int (176)) - (Prims.of_int (68))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (175)) - (Prims.of_int (12)) - (Prims.of_int (175)) - (Prims.of_int (61))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "FStar.Printf.fst" - (Prims.of_int (121)) - (Prims.of_int (8)) - (Prims.of_int (123)) - (Prims.of_int (44))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - (Pulse_Checker_VPropEquiv.list_as_vprop - pure_conjuncts))) - (fun - uu___8 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___9 -> - fun x -> - Prims.strcat - (Prims.strcat - "maybe_infer_intro_exists: solutions after solving pure conjuncts (" - (Prims.strcat - uu___8 - "): ")) - (Prims.strcat - x "\n"))))) - (fun - uu___8 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___9 -> - uu___8 - uu___7)))) - uu___7))) - (fun - uu___7 -> - (fun - uu___7 -> - Obj.magic - (FStar_Tactics_V2_Builtins.print - uu___7)) - uu___7))) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___8 -> - ())))) - (fun - uu___7 -> - (fun - uu___7 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (178)) - (Prims.of_int (40)) - (Prims.of_int (182)) - (Prims.of_int (73))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (183)) - (Prims.of_int (6)) - (Prims.of_int (222)) - (Prims.of_int (10))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___8 -> - fun - ty_opt -> - fun e -> - match ty_opt - with - | - FStar_Pervasives_Native.None - -> - Pulse_Syntax_Pure.tm_pureapp - (Pulse_Syntax_Pure.tm_fvar - (Pulse_Syntax_Base.as_fv - Pulse_Reflection_Util.hide_lid)) - FStar_Pervasives_Native.None - e - | - FStar_Pervasives_Native.Some - ty -> - Pulse_Syntax_Pure.tm_pureapp - (Pulse_Syntax_Pure.tm_pureapp - (Pulse_Syntax_Pure.tm_fvar - (Pulse_Syntax_Base.as_fv - Pulse_Reflection_Util.hide_lid)) - (FStar_Pervasives_Native.Some - Pulse_Syntax_Base.Implicit) - ty) - FStar_Pervasives_Native.None - e)) - (fun - uu___8 -> - (fun - mk_hide - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (185)) - (Prims.of_int (6)) - (Prims.of_int (187)) - (Prims.of_int (31))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (188)) - (Prims.of_int (6)) - (Prims.of_int (222)) - (Prims.of_int (10))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___8 -> - fun uv -> - match - FStar_List_Tot_Base.tryFind - (fun - uu___9 -> - match uu___9 - with - | - (u, - uu___10) - -> - Pulse_Checker_Inference.uvar_eq - u uv) uvs - with - | - FStar_Pervasives_Native.None - -> - FStar_Pervasives_Native.None - | - FStar_Pervasives_Native.Some - (uu___9, - ty) -> - FStar_Pervasives_Native.Some - ty)) - (fun - uu___8 -> - (fun - type_of_uvar - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (190)) - (Prims.of_int (6)) - (Prims.of_int (196)) - (Prims.of_int (17))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (197)) - (Prims.of_int (6)) - (Prims.of_int (222)) - (Prims.of_int (10))))) - (Obj.magic - (FStar_Tactics_Util.map - (fun - uu___8 -> - match uu___8 - with - | - (u, v) -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (192)) - (Prims.of_int (20)) - (Prims.of_int (192)) - (Prims.of_int (70))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (193)) - (Prims.of_int (10)) - (Prims.of_int (195)) - (Prims.of_int (48))))) - (Obj.magic - (Pulse_Checker_Inference.apply_solution - solutions1 - v)) - (fun sol - -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___9 -> - match - Pulse_Syntax_Pure.unreveal - sol - with - | - FStar_Pervasives_Native.Some - uu___10 - -> - (u, sol) - | - uu___10 - -> - (u, - (mk_hide - (type_of_uvar - u) sol))))) - solutions1)) - (fun - uu___8 -> - (fun - solutions2 - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (199)) - (Prims.of_int (6)) - (Prims.of_int (203)) - (Prims.of_int (18))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (204)) - (Prims.of_int (6)) - (Prims.of_int (222)) - (Prims.of_int (10))))) - (match - Pulse_Checker_Inference.unsolved - solutions2 - uvs - with - | - FStar_Pervasives_Native.Some - uvs1 -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (201)) - (Prims.of_int (31)) - (Prims.of_int (202)) - (Prims.of_int (126))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (201)) - (Prims.of_int (8)) - (Prims.of_int (202)) - (Prims.of_int (126))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (202)) - (Prims.of_int (36)) - (Prims.of_int (202)) - (Prims.of_int (125))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "prims.fst" - (Prims.of_int (590)) - (Prims.of_int (19)) - (Prims.of_int (590)) - (Prims.of_int (31))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (202)) - (Prims.of_int (56)) - (Prims.of_int (202)) - (Prims.of_int (124))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (202)) - (Prims.of_int (36)) - (Prims.of_int (202)) - (Prims.of_int (125))))) - (Obj.magic - (FStar_Tactics_Util.map - (fun - uu___8 -> - match uu___8 - with - | - (u, - uu___9) - -> - Pulse_Checker_Inference.uvar_to_string - u) uvs1)) - (fun - uu___8 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___9 -> - FStar_String.concat - ", " - uu___8)))) - (fun - uu___8 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___9 -> - Prims.strcat - "Could not instantiate existential variables " - (Prims.strcat - uu___8 - "\n"))))) - (fun - uu___8 -> - (fun - uu___8 -> - Obj.magic - (Pulse_Typing_Env.fail - g - (FStar_Pervasives_Native.Some - (st.Pulse_Syntax_Base.range2)) - uu___8)) - uu___8))) - | - FStar_Pervasives_Native.None - -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___8 -> - ())))) - (fun - uu___8 -> - (fun - uu___8 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (205)) - (Prims.of_int (17)) - (Prims.of_int (205)) - (Prims.of_int (43))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (205)) - (Prims.of_int (48)) - (Prims.of_int (222)) - (Prims.of_int (10))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___9 -> - fun t2 -> - { - Pulse_Syntax_Base.term1 - = t2; - Pulse_Syntax_Base.range2 - = - (st.Pulse_Syntax_Base.range2) - })) - (fun - uu___9 -> - (fun wr - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (206)) - (Prims.of_int (29)) - (Prims.of_int (206)) - (Prims.of_int (65))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (206)) - (Prims.of_int (68)) - (Prims.of_int (222)) - (Prims.of_int (10))))) - (Obj.magic - (build_instantiations - solutions2 - insts)) - (fun - uu___9 -> - (fun - intro_exists_chain - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (208)) - (Prims.of_int (6)) - (Prims.of_int (213)) - (Prims.of_int (21))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (214)) - (Prims.of_int (6)) - (Prims.of_int (222)) - (Prims.of_int (10))))) - (Obj.magic - (FStar_Tactics_Util.map - (fun vp - -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (210)) - (Prims.of_int (16)) - (Prims.of_int (210)) - (Prims.of_int (71))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (210)) - (Prims.of_int (10)) - (Prims.of_int (212)) - (Prims.of_int (19))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (210)) - (Prims.of_int (16)) - (Prims.of_int (210)) - (Prims.of_int (69))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (210)) - (Prims.of_int (16)) - (Prims.of_int (210)) - (Prims.of_int (71))))) - (Obj.magic - (Pulse_Checker_Inference.apply_solution - solutions2 - vp)) - (fun - uu___9 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___10 - -> - uu___9.Pulse_Syntax_Base.t)))) - (fun - uu___9 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___10 - -> - match uu___9 - with - | - Pulse_Syntax_Base.Tm_Pure - p -> - [p] - | - p -> []))) - pure_conjuncts)) - (fun - uu___9 -> - (fun - pure_conjuncts1 - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (215)) - (Prims.of_int (25)) - (Prims.of_int (215)) - (Prims.of_int (49))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (215)) - (Prims.of_int (52)) - (Prims.of_int (222)) - (Prims.of_int (10))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___9 -> - FStar_List_Tot_Base.flatten - pure_conjuncts1)) - (fun - uu___9 -> - (fun - pure_conjuncts2 - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (216)) - (Prims.of_int (17)) - (Prims.of_int (216)) - (Prims.of_int (111))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (217)) - (Prims.of_int (4)) - (Prims.of_int (222)) - (Prims.of_int (10))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___9 -> - FStar_List_Tot_Base.fold_left - (add_intro_pure - intro_exists_chain.Pulse_Syntax_Base.range2) - intro_exists_chain - pure_conjuncts2)) - (fun - uu___9 -> - (fun - result -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (217)) - (Prims.of_int (4)) - (Prims.of_int (221)) - (Prims.of_int (5))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (216)) - (Prims.of_int (8)) - (Prims.of_int (216)) - (Prims.of_int (14))))) - (if - Pulse_RuntimeUtils.debug_at_level - (Pulse_Typing_Env.fstar_env - g) - "inference" - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (219)) - (Prims.of_int (14)) - (Prims.of_int (220)) - (Prims.of_int (45))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (218)) - (Prims.of_int (9)) - (Prims.of_int (221)) - (Prims.of_int (5))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (220)) - (Prims.of_int (16)) - (Prims.of_int (220)) - (Prims.of_int (44))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "prims.fst" - (Prims.of_int (590)) - (Prims.of_int (19)) - (Prims.of_int (590)) - (Prims.of_int (31))))) - (Obj.magic - (Pulse_Syntax_Printer.st_term_to_string - result)) - (fun - uu___9 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___10 - -> - Prims.strcat - "Inferred pure and exists:{\n\t " - (Prims.strcat - uu___9 - "\n\t}"))))) - (fun - uu___9 -> - (fun - uu___9 -> - Obj.magic - (FStar_Tactics_V2_Builtins.print - uu___9)) - uu___9))) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___10 - -> ())))) - (fun - uu___9 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___10 - -> result)))) - uu___9))) - uu___9))) - uu___9))) - uu___9))) - uu___9))) - uu___8))) - uu___8))) - uu___8))) - uu___8))) - uu___7))) - uu___7))) - uu___7))) - uu___7))) - uu___6))) - uu___5))) - uu___3))) uu___1))) uu___))) - uu___) -let (handle_framing_failure : +let rec (gen_names_for_unknowns : Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.term -> - unit -> - unit Pulse_Typing.post_hint_opt -> - Pulse_Checker_Framing.framing_failure -> - Pulse_Checker_Common.check_t -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, - unit) FStar_Tactics_Effect.tac_repr) + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.term Prims.list -> + (((Pulse_Syntax_Base.nvar * Pulse_Syntax_Base.term) Prims.list * + Pulse_Syntax_Base.term * Pulse_Syntax_Base.term Prims.list), + unit) FStar_Tactics_Effect.tac_repr) = - fun g -> - fun t0 -> - fun pre -> - fun pre_typing -> - fun post_hint -> - fun failure -> - fun check -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (234)) (Prims.of_int (17)) - (Prims.of_int (234)) (Prims.of_int (43))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (235)) (Prims.of_int (4)) - (Prims.of_int (280)) (Prims.of_int (30))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - fun t -> - { - Pulse_Syntax_Base.term1 = t; - Pulse_Syntax_Base.range2 = - (t0.Pulse_Syntax_Base.range2) - })) - (fun uu___ -> - (fun wr -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (235)) (Prims.of_int (4)) - (Prims.of_int (243)) (Prims.of_int (5))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (243)) (Prims.of_int (6)) - (Prims.of_int (280)) - (Prims.of_int (30))))) - (if - Pulse_RuntimeUtils.debug_at_level - (Pulse_Typing_Env.fstar_env g) "inference" - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (237)) - (Prims.of_int (14)) - (Prims.of_int (242)) - (Prims.of_int (66))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (236)) - (Prims.of_int (9)) - (Prims.of_int (243)) - (Prims.of_int (5))))) - (Obj.magic + fun uu___2 -> + fun uu___1 -> + fun uu___ -> + (fun g -> + fun t -> + fun ws -> + match ws with + | [] -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> ([], t, [])))) + | w::ws1 -> + Obj.magic + (Obj.repr + (match t.Pulse_Syntax_Base.t with + | Pulse_Syntax_Base.Tm_ExistsSL (uu___, b, body) -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.fst" + (Prims.of_int (56)) + (Prims.of_int (10)) + (Prims.of_int (62)) + (Prims.of_int (27))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.fst" + (Prims.of_int (54)) + (Prims.of_int (31)) + (Prims.of_int (70)) + (Prims.of_int (39))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + match w.Pulse_Syntax_Base.t with + | Pulse_Syntax_Base.Tm_Unknown -> + ((FStar_Pervasives_Native.Some + (Pulse_Typing_Env.fresh g)), + (Pulse_Syntax_Pure.tm_var + { + Pulse_Syntax_Base.nm_index = + (Pulse_Typing_Env.fresh g); + Pulse_Syntax_Base.nm_ppname = + (b.Pulse_Syntax_Base.binder_ppname) + }), + (Pulse_Typing_Env.push_binding g + (Pulse_Typing_Env.fresh g) + b.Pulse_Syntax_Base.binder_ppname + b.Pulse_Syntax_Base.binder_ty)) + | uu___2 -> + (FStar_Pervasives_Native.None, w, g))) + (fun uu___1 -> + (fun uu___1 -> + match uu___1 with + | (xopt, w1, g1) -> + Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (242)) - (Prims.of_int (22)) - (Prims.of_int (242)) - (Prims.of_int (65))))) + (Prims.of_int (63)) + (Prims.of_int (23)) + (Prims.of_int (63)) + (Prims.of_int (42))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (237)) - (Prims.of_int (14)) - (Prims.of_int (242)) - (Prims.of_int (66))))) - (Obj.magic - (terms_to_string - failure.Pulse_Checker_Framing.remaining_context)) - (fun uu___ -> - (fun uu___ -> + (Prims.of_int (63)) + (Prims.of_int (45)) + (Prims.of_int (70)) + (Prims.of_int (39))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + Pulse_Syntax_Naming.open_term' + body w1 Prims.int_zero)) + (fun uu___2 -> + (fun t1 -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (237)) - (Prims.of_int (14)) - (Prims.of_int (242)) - (Prims.of_int (66))))) + (Prims.of_int (64)) + (Prims.of_int (31)) + (Prims.of_int (64)) + (Prims.of_int (60))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (237)) - (Prims.of_int (14)) - (Prims.of_int (242)) - (Prims.of_int (66))))) + (Prims.of_int (63)) + (Prims.of_int (45)) + (Prims.of_int (70)) + (Prims.of_int (39))))) (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (241)) - (Prims.of_int (22)) - (Prims.of_int (241)) - (Prims.of_int (71))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (237)) - (Prims.of_int (14)) - (Prims.of_int (242)) - (Prims.of_int (66))))) - (Obj.magic - (terms_to_string - failure.Pulse_Checker_Framing.unmatched_preconditions)) - (fun uu___1 -> - (fun uu___1 - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (237)) - (Prims.of_int (14)) - (Prims.of_int (242)) - (Prims.of_int (66))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (237)) - (Prims.of_int (14)) - (Prims.of_int (242)) - (Prims.of_int (66))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (240)) - (Prims.of_int (22)) - (Prims.of_int (240)) - (Prims.of_int (46))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "FStar.Printf.fst" - (Prims.of_int (121)) - (Prims.of_int (8)) - (Prims.of_int (123)) - (Prims.of_int (44))))) - (Obj.magic - (Pulse_Syntax_Printer.st_term_to_string - t0)) - (fun - uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - fun x -> - fun x1 -> - Prims.strcat - (Prims.strcat - (Prims.strcat - "Handling framing failure in term:\n" - (Prims.strcat - uu___2 - "\nwith unmatched_pre={\n")) - (Prims.strcat - x - "\n} and context={\n")) - (Prims.strcat - x1 "\n}"))))) - (fun - uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - uu___2 - uu___1)))) - uu___1))) - (fun uu___1 -> + (gen_names_for_unknowns + g1 t1 ws1)) + (fun uu___2 -> FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - uu___1 uu___)))) - uu___))) - (fun uu___ -> - (fun uu___ -> - Obj.magic - (FStar_Tactics_V2_Builtins.print - uu___)) uu___))) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> ())))) - (fun uu___ -> - (fun uu___ -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (245)) - (Prims.of_int (6)) - (Prims.of_int (245)) - (Prims.of_int (101))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (243)) - (Prims.of_int (6)) - (Prims.of_int (280)) - (Prims.of_int (30))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - FStar_List_Tot_Base.partition - (fun uu___2 -> - match uu___2 with - | { - Pulse_Syntax_Base.t = - Pulse_Syntax_Base.Tm_Pure - uu___3; - Pulse_Syntax_Base.range1 - = uu___4;_} - -> true - | uu___3 -> false) - failure.Pulse_Checker_Framing.unmatched_preconditions)) - (fun uu___1 -> - (fun uu___1 -> - match uu___1 with - | (pures, rest) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (248)) - (Prims.of_int (6)) - (Prims.of_int (254)) - (Prims.of_int (13))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (255)) - (Prims.of_int (6)) - (Prims.of_int (280)) - (Prims.of_int (30))))) - (Obj.magic - (FStar_Tactics_Util.fold_left - (fun uu___3 -> - fun uu___2 -> - (fun t -> - fun p -> - match - p.Pulse_Syntax_Base.t + (fun uu___3 -> + match uu___2 + with + | (new_names, + t2, ws2) + -> + (match xopt with | - Pulse_Syntax_Base.Tm_Pure - p1 -> - Obj.magic - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___2 -> - add_intro_pure - t0.Pulse_Syntax_Base.range2 - t p1)) + FStar_Pervasives_Native.Some + x -> + (((((b.Pulse_Syntax_Base.binder_ppname), + x), + (b.Pulse_Syntax_Base.binder_ty)) + :: + new_names), + t2, (w1 + :: ws2)) | - uu___2 -> - Obj.magic - (FStar_Tactics_V2_Derived.fail - "Impossible")) - uu___3 - uu___2) - (wr - (Pulse_Syntax_Base.Tm_Protect - { - Pulse_Syntax_Base.t3 - = t0 - })) pures)) - (fun uu___2 -> - (fun t -> - let rec handle_intro_exists - rest1 t1 = - match rest1 - with - | [] -> - check g t1 - pre () - post_hint - | { - Pulse_Syntax_Base.t - = - Pulse_Syntax_Base.Tm_ExistsSL - (u, ty, - p); - Pulse_Syntax_Base.range1 - = range;_}::rest2 - -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (262)) - (Prims.of_int (14)) - (Prims.of_int (274)) - (Prims.of_int (15))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (276)) - (Prims.of_int (10)) - (Prims.of_int (276)) - (Prims.of_int (41))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___2 -> - Pulse_Syntax_Base.Tm_Bind - { - Pulse_Syntax_Base.binder - = - default_binder_annot; - Pulse_Syntax_Base.head1 - = - (wr - (Pulse_Syntax_Base.Tm_Protect - { - Pulse_Syntax_Base.t3 - = - (wr - (Pulse_Syntax_Base.Tm_IntroExists - { - Pulse_Syntax_Base.erased - = true; - Pulse_Syntax_Base.p2 - = - (Pulse_Syntax_Base.with_range - (Pulse_Syntax_Base.Tm_ExistsSL - (u, ty, - p)) range); - Pulse_Syntax_Base.witnesses - = []; - Pulse_Syntax_Base.should_check1 - = - Pulse_Syntax_Base.should_check_true - })) - })); - Pulse_Syntax_Base.body1 - = - (wr - (Pulse_Syntax_Base.Tm_Protect - { - Pulse_Syntax_Base.t3 - = t1 - })) - })) - (fun - uu___2 -> - (fun t2 - -> - Obj.magic - (handle_intro_exists - rest2 - (wr t2))) - uu___2) - | uu___2 -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (278)) - (Prims.of_int (32)) - (Prims.of_int (278)) - (Prims.of_int (85))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (278)) - (Prims.of_int (9)) - (Prims.of_int (278)) - (Prims.of_int (85))))) - (Obj.magic - (Pulse_Checker_Common.format_failed_goal - g - failure.Pulse_Checker_Framing.remaining_context - rest1)) - (fun - uu___3 -> - (fun - uu___3 -> - Obj.magic - (Pulse_Typing_Env.fail - g - (FStar_Pervasives_Native.Some - (t0.Pulse_Syntax_Base.range2)) - uu___3)) - uu___3) in - Obj.magic - (handle_intro_exists - rest t)) - uu___2))) uu___1))) - uu___))) uu___) -let (protect : Pulse_Syntax_Base.st_term -> Pulse_Syntax_Base.st_term) = - fun t -> - { - Pulse_Syntax_Base.term1 = - (Pulse_Syntax_Base.Tm_Protect { Pulse_Syntax_Base.t3 = t }); - Pulse_Syntax_Base.range2 = (t.Pulse_Syntax_Base.range2) - } -let rec (unprotect : Pulse_Syntax_Base.st_term -> Pulse_Syntax_Base.st_term) + FStar_Pervasives_Native.None + -> + (new_names, + t2, (w1 + :: ws2))))))) + uu___2))) uu___1) + | uu___ -> + Pulse_Typing_Env.fail g + (FStar_Pervasives_Native.Some + (t.Pulse_Syntax_Base.range1)) + "intro exists with non-existential"))) uu___2 + uu___1 uu___ +let (instantiate_unknown_witnesses : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.st_term -> + (Pulse_Syntax_Base.st_term FStar_Pervasives_Native.option, unit) + FStar_Tactics_Effect.tac_repr) = + fun g -> + fun t -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.fst" (Prims.of_int (76)) + (Prims.of_int (51)) (Prims.of_int (76)) (Prims.of_int (57))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.fst" (Prims.of_int (74)) + (Prims.of_int (28)) (Prims.of_int (98)) (Prims.of_int (10))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> t.Pulse_Syntax_Base.term1)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | Pulse_Syntax_Base.Tm_IntroExists + { Pulse_Syntax_Base.erased = erased; + Pulse_Syntax_Base.p2 = p; + Pulse_Syntax_Base.witnesses = ws;_} + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.fst" + (Prims.of_int (78)) (Prims.of_int (36)) + (Prims.of_int (78)) (Prims.of_int (65))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.fst" + (Prims.of_int (76)) (Prims.of_int (60)) + (Prims.of_int (98)) (Prims.of_int (10))))) + (Obj.magic (gen_names_for_unknowns g p ws)) + (fun uu___1 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + match uu___1 with + | (new_names, opened_p, new_ws) -> + (match new_names with + | [] -> FStar_Pervasives_Native.None + | uu___3 -> + FStar_Pervasives_Native.Some + (FStar_List_Tot_Base.fold_right + (fun new_name -> + fun e -> + match new_name with + | ((ppname, x), ty) -> + (match (Pulse_Syntax_Naming.close_st_term' + e x + Prims.int_zero).Pulse_Syntax_Base.term1 + with + | Pulse_Syntax_Base.Tm_ProofHintWithBinders + { + Pulse_Syntax_Base.hint_type + = hint_type; + Pulse_Syntax_Base.binders + = binders; + Pulse_Syntax_Base.v + = v; + Pulse_Syntax_Base.t3 + = t1;_} + -> + { + Pulse_Syntax_Base.term1 + = + (Pulse_Syntax_Base.Tm_ProofHintWithBinders + { + Pulse_Syntax_Base.hint_type + = + hint_type; + Pulse_Syntax_Base.binders + = + ({ + Pulse_Syntax_Base.binder_ty + = ty; + Pulse_Syntax_Base.binder_ppname + = ppname + } :: + binders); + Pulse_Syntax_Base.v + = v; + Pulse_Syntax_Base.t3 + = t1 + }); + Pulse_Syntax_Base.range2 + = + ((Pulse_Syntax_Naming.close_st_term' + e x + Prims.int_zero).Pulse_Syntax_Base.range2) + })) new_names + { + Pulse_Syntax_Base.term1 = + (Pulse_Syntax_Base.Tm_ProofHintWithBinders + { + Pulse_Syntax_Base.hint_type + = + Pulse_Syntax_Base.ASSERT; + Pulse_Syntax_Base.binders + = []; + Pulse_Syntax_Base.v = + opened_p; + Pulse_Syntax_Base.t3 = + { + Pulse_Syntax_Base.term1 + = + (Pulse_Syntax_Base.Tm_IntroExists + { + Pulse_Syntax_Base.erased + = erased; + Pulse_Syntax_Base.p2 + = p; + Pulse_Syntax_Base.witnesses + = new_ws + }); + Pulse_Syntax_Base.range2 + = + (t.Pulse_Syntax_Base.range2) + } + }); + Pulse_Syntax_Base.range2 = + (t.Pulse_Syntax_Base.range2) + })))))) uu___) +let (maybe_intro_exists_erased : + Pulse_Syntax_Base.st_term -> Pulse_Syntax_Base.st_term) = fun t -> - let wr t0 = - { - Pulse_Syntax_Base.term1 = t0; - Pulse_Syntax_Base.range2 = (t.Pulse_Syntax_Base.range2) - } in - match t.Pulse_Syntax_Base.term1 with - | Pulse_Syntax_Base.Tm_Protect - { - Pulse_Syntax_Base.t3 = - { - Pulse_Syntax_Base.term1 = Pulse_Syntax_Base.Tm_Bind - { Pulse_Syntax_Base.binder = binder; - Pulse_Syntax_Base.head1 = head; - Pulse_Syntax_Base.body1 = body;_}; - Pulse_Syntax_Base.range2 = uu___;_};_} + let uu___ = t.Pulse_Syntax_Base.term1 in + match uu___ with + | Pulse_Syntax_Base.Tm_IntroExists + { Pulse_Syntax_Base.erased = erased; Pulse_Syntax_Base.p2 = p; + Pulse_Syntax_Base.witnesses = w::[];_} -> - wr - (Pulse_Syntax_Base.Tm_Bind + (match Pulse_Syntax_Pure.unreveal w with + | FStar_Pervasives_Native.Some w1 -> + let t' = + Pulse_Syntax_Base.Tm_IntroExists + { + Pulse_Syntax_Base.erased = true; + Pulse_Syntax_Base.p2 = p; + Pulse_Syntax_Base.witnesses = [w1] + } in { - Pulse_Syntax_Base.binder = binder; - Pulse_Syntax_Base.head1 = (protect head); - Pulse_Syntax_Base.body1 = body - }) - | Pulse_Syntax_Base.Tm_Protect - { - Pulse_Syntax_Base.t3 = - { - Pulse_Syntax_Base.term1 = Pulse_Syntax_Base.Tm_If - { Pulse_Syntax_Base.b1 = b; Pulse_Syntax_Base.then_ = then_; - Pulse_Syntax_Base.else_ = else_; - Pulse_Syntax_Base.post1 = post;_}; - Pulse_Syntax_Base.range2 = uu___;_};_} - -> - wr - (Pulse_Syntax_Base.Tm_If - { - Pulse_Syntax_Base.b1 = b; - Pulse_Syntax_Base.then_ = (protect then_); - Pulse_Syntax_Base.else_ = (protect else_); - Pulse_Syntax_Base.post1 = post - }) - | Pulse_Syntax_Base.Tm_Protect { Pulse_Syntax_Base.t3 = t1;_} -> - unprotect t1 - | uu___ -> t -let (elim_then_check : + Pulse_Syntax_Base.term1 = t'; + Pulse_Syntax_Base.range2 = (t.Pulse_Syntax_Base.range2) + } + | uu___1 -> t) +let rec (transform_to_unary_intro_exists : Pulse_Typing_Env.env -> Pulse_Syntax_Base.term -> - unit -> - Pulse_Syntax_Base.st_term -> - unit Pulse_Typing.post_hint_opt -> - Pulse_Checker_Common.check_t -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, - unit) FStar_Tactics_Effect.tac_repr) + Pulse_Syntax_Base.term Prims.list -> + (Pulse_Syntax_Base.st_term, unit) FStar_Tactics_Effect.tac_repr) = - fun g -> - fun ctxt -> - fun ctxt_typing -> - fun st -> - fun post_hint -> - fun check -> + fun uu___2 -> + fun uu___1 -> + fun uu___ -> + (fun g -> + fun t -> + fun ws -> + match ws with + | [] -> + Obj.magic + (Obj.repr + (Pulse_Typing_Env.fail g + (FStar_Pervasives_Native.Some + (t.Pulse_Syntax_Base.range1)) + "intro exists with empty witnesses")) + | w::[] -> + Obj.magic + (Obj.repr + (if + Pulse_Syntax_Base.uu___is_Tm_ExistsSL + t.Pulse_Syntax_Base.t + then + Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing.wr + (Pulse_Syntax_Base.Tm_IntroExists + { + Pulse_Syntax_Base.erased = false; + Pulse_Syntax_Base.p2 = t; + Pulse_Syntax_Base.witnesses = [w] + }))) + else + Obj.repr + (Pulse_Typing_Env.fail g + (FStar_Pervasives_Native.Some + (t.Pulse_Syntax_Base.range1)) + "intro exists with non-existential"))) + | w::ws1 -> + Obj.magic + (Obj.repr + (match t.Pulse_Syntax_Base.t with + | Pulse_Syntax_Base.Tm_ExistsSL (u, b, body) -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.fst" + (Prims.of_int (122)) + (Prims.of_int (17)) + (Prims.of_int (122)) + (Prims.of_int (43))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.fst" + (Prims.of_int (122)) + (Prims.of_int (46)) + (Prims.of_int (128)) + (Prims.of_int (35))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Syntax_Naming.subst_term body + [Pulse_Syntax_Naming.DT + (Prims.int_zero, w)])) + (fun uu___ -> + (fun body1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.fst" + (Prims.of_int (123)) + (Prims.of_int (15)) + (Prims.of_int (123)) + (Prims.of_int (56))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.fst" + (Prims.of_int (126)) + (Prims.of_int (6)) + (Prims.of_int (128)) + (Prims.of_int (35))))) + (Obj.magic + (transform_to_unary_intro_exists + g body1 ws1)) + (fun st -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing.wr + (Pulse_Syntax_Base.Tm_Bind + { + Pulse_Syntax_Base.binder + = + (Pulse_Syntax_Base.null_binder + Pulse_Typing.tm_unit); + Pulse_Syntax_Base.head1 + = st; + Pulse_Syntax_Base.body1 + = + (Pulse_Typing.wr + (Pulse_Syntax_Base.Tm_IntroExists + { + Pulse_Syntax_Base.erased + = true; + Pulse_Syntax_Base.p2 + = t; + Pulse_Syntax_Base.witnesses + = + [w] + })) + }))))) uu___) + | uu___ -> + Pulse_Typing_Env.fail g + (FStar_Pervasives_Native.Some + (t.Pulse_Syntax_Base.range1)) + "intro exists with non-existential"))) uu___2 + uu___1 uu___ +let rec (check : Pulse_Checker_Base.check_t) = + fun g0 -> + fun pre0 -> + fun pre0_typing -> + fun post_hint -> + fun res_ppname -> + fun t -> FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (303)) (Prims.of_int (48)) - (Prims.of_int (303)) (Prims.of_int (82))))) + (Prims.of_int (148)) (Prims.of_int (4)) + (Prims.of_int (148)) (Prims.of_int (55))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (303)) (Prims.of_int (3)) - (Prims.of_int (310)) (Prims.of_int (44))))) - (Obj.magic (Pulse_Prover_ElimExists.elim_exists g ctxt ())) + (Prims.of_int (139)) (Prims.of_int (60)) + (Prims.of_int (256)) (Prims.of_int (50))))) + (Obj.magic + (Pulse_Checker_Prover_ElimPure.elim_pure g0 pre0 ())) (fun uu___ -> (fun uu___ -> match uu___ with | FStar_Pervasives.Mkdtuple4 - (g', ctxt', ctxt'_typing, elab_k) -> + (g, pre, pre_typing, k_elim_pure) -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (304)) - (Prims.of_int (51)) - (Prims.of_int (304)) - (Prims.of_int (82))))) + (Prims.of_int (150)) + (Prims.of_int (44)) + (Prims.of_int (252)) + (Prims.of_int (48))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (303)) - (Prims.of_int (85)) - (Prims.of_int (310)) - (Prims.of_int (44))))) + (Prims.of_int (253)) + (Prims.of_int (4)) + (Prims.of_int (256)) + (Prims.of_int (50))))) (Obj.magic - (Pulse_Prover_ElimPure.elim_pure g' ctxt' - ())) - (fun uu___1 -> - (fun uu___1 -> - match uu___1 with - | FStar_Pervasives.Mkdtuple4 - (g'', ctxt'', ctxt'_typing1, - elab_k') - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (305)) - (Prims.of_int (4)) - (Prims.of_int (308)) - (Prims.of_int (44))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (308)) - (Prims.of_int (46)) - (Prims.of_int (310)) - (Prims.of_int (44))))) - (if - Pulse_RuntimeUtils.debug_at_level - (Pulse_Typing_Env.fstar_env - g) "inference" - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (306)) - (Prims.of_int (19)) - (Prims.of_int (308)) - (Prims.of_int (43))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (306)) - (Prims.of_int (9)) - (Prims.of_int (308)) - (Prims.of_int (44))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (308)) - (Prims.of_int (16)) - (Prims.of_int (308)) - (Prims.of_int (41))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (306)) - (Prims.of_int (19)) - (Prims.of_int (308)) - (Prims.of_int (43))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - ctxt'')) - (fun uu___2 -> - (fun uu___2 + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.fst" + (Prims.of_int (151)) + (Prims.of_int (12)) + (Prims.of_int (151)) + (Prims.of_int (55))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.fst" + (Prims.of_int (152)) + (Prims.of_int (4)) + (Prims.of_int (252)) + (Prims.of_int (48))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + Pulse_Checker_Pure.push_context + (Pulse_Syntax_Printer.tag_of_st_term + t) t.Pulse_Syntax_Base.range2 + g)) + (fun uu___1 -> + (fun g1 -> + match t.Pulse_Syntax_Base.term1 + with + | Pulse_Syntax_Base.Tm_Return + uu___1 -> + Obj.magic + (Obj.repr + (Pulse_Checker_Return.check + g1 pre () post_hint + res_ppname t)) + | Pulse_Syntax_Base.Tm_Abs uu___1 + -> + Obj.magic + (Obj.repr + (FStar_Tactics_V2_Derived.fail + "Tm_Abs check should not have been called in the checker")) + | Pulse_Syntax_Base.Tm_STApp + uu___1 -> + Obj.magic + (Obj.repr + (Pulse_Checker_STApp.check + g1 pre () post_hint + res_ppname t)) + | Pulse_Syntax_Base.Tm_ElimExists + uu___1 -> + Obj.magic + (Obj.repr + (Pulse_Checker_Exists.check_elim_exists + g1 pre () post_hint + res_ppname t)) + | Pulse_Syntax_Base.Tm_IntroExists + { + Pulse_Syntax_Base.erased = + uu___1; + Pulse_Syntax_Base.p2 = p; + Pulse_Syntax_Base.witnesses + = witnesses;_} + -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.fst" + (Prims.of_int (165)) + (Prims.of_int (13)) + (Prims.of_int (165)) + (Prims.of_int (46))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.fst" + (Prims.of_int (165)) + (Prims.of_int (6)) + (Prims.of_int (175)) + (Prims.of_int (57))))) + (Obj.magic + (instantiate_unknown_witnesses + g1 t)) + (fun uu___2 -> + (fun uu___2 -> + match uu___2 + with + | FStar_Pervasives_Native.Some + t1 -> + Obj.magic + (check g1 + pre () + post_hint + res_ppname + t1) + | FStar_Pervasives_Native.None + -> + (match witnesses + with + | [] -> + Obj.magic + (Pulse_Typing_Env.fail + g1 + (FStar_Pervasives_Native.Some + (t.Pulse_Syntax_Base.range2)) + "intro exists with empty witnesses") + | uu___3::[] -> + Obj.magic + (Pulse_Checker_Exists.check_intro_exists + g1 pre () + post_hint + res_ppname + (maybe_intro_exists_erased + t) + FStar_Pervasives_Native.None) + | uu___3 -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (306)) - (Prims.of_int (19)) - (Prims.of_int (308)) - (Prims.of_int (43))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (306)) + (Prims.of_int (174)) (Prims.of_int (19)) - (Prims.of_int (308)) - (Prims.of_int (43))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind + (Prims.of_int (174)) + (Prims.of_int (64))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (307)) - (Prims.of_int (16)) - (Prims.of_int (307)) - (Prims.of_int (39))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "FStar.Printf.fst" - (Prims.of_int (121)) - (Prims.of_int (8)) - (Prims.of_int (123)) - (Prims.of_int (44))))) + (Prims.of_int (175)) + (Prims.of_int (11)) + (Prims.of_int (175)) + (Prims.of_int (56))))) (Obj.magic - (Pulse_Syntax_Printer.term_to_string - ctxt)) - (fun - uu___3 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - fun x -> - Prims.strcat - (Prims.strcat - "Eliminated context from\n\t" - (Prims.strcat - uu___3 - "\n\tto ")) - (Prims.strcat - x "\n"))))) - (fun - uu___3 -> - FStar_Tactics_Effect.lift_div_tac + (transform_to_unary_intro_exists + g1 p + witnesses)) (fun uu___4 -> - uu___3 - uu___2)))) - uu___2))) - (fun uu___2 -> - (fun uu___2 -> - Obj.magic - (FStar_Tactics_V2_Builtins.print - uu___2)) - uu___2))) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> ())))) - (fun uu___2 -> - (fun uu___2 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (309)) - (Prims.of_int (14)) - (Prims.of_int (309)) - (Prims.of_int (66))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (310)) - (Prims.of_int (4)) - (Prims.of_int (310)) - (Prims.of_int (44))))) - (Obj.magic - (check g'' - (protect st) - ctxt'' () - post_hint)) - (fun uu___3 -> - (fun res -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - ( - FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (310)) - (Prims.of_int (21)) - (Prims.of_int (310)) - (Prims.of_int (44))))) - ( - FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (310)) - (Prims.of_int (4)) - (Prims.of_int (310)) - (Prims.of_int (44))))) - ( - Obj.magic - (elab_k' - post_hint - res)) - ( - fun - uu___3 -> - (fun - uu___3 -> + (fun t1 + -> Obj.magic - (elab_k + (check g1 + pre () post_hint - uu___3)) - uu___3))) - uu___3))) - uu___2))) uu___1))) uu___) -let rec (check' : Prims.bool -> Pulse_Checker_Common.check_t) = - fun allow_inst -> - fun g -> - fun t -> - fun pre -> - fun pre_typing -> - fun post_hint -> - if - Prims.op_Negation - (Pulse_Syntax_Base.uu___is_Tm_Protect - t.Pulse_Syntax_Base.term1) - then elim_then_check g pre () t post_hint (check' allow_inst) - else - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (331)) (Prims.of_int (4)) - (Prims.of_int (337)) (Prims.of_int (5))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (337)) (Prims.of_int (6)) - (Prims.of_int (454)) (Prims.of_int (20))))) - (if - Pulse_RuntimeUtils.debug_at_level - (Pulse_Typing_Env.fstar_env g) "proof_states" - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (333)) (Prims.of_int (6)) - (Prims.of_int (335)) - (Prims.of_int (51))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (336)) (Prims.of_int (6)) - (Prims.of_int (336)) - (Prims.of_int (46))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (333)) - (Prims.of_int (14)) - (Prims.of_int (335)) - (Prims.of_int (51))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (333)) - (Prims.of_int (6)) - (Prims.of_int (335)) - (Prims.of_int (51))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (335)) - (Prims.of_int (28)) - (Prims.of_int (335)) - (Prims.of_int (50))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (333)) - (Prims.of_int (14)) - (Prims.of_int (335)) - (Prims.of_int (51))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - pre)) - (fun uu___1 -> - (fun uu___1 -> + res_ppname + t1)) + uu___4)))) + uu___2))) + | Pulse_Syntax_Base.Tm_Bind uu___1 + -> Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (333)) - (Prims.of_int (14)) - (Prims.of_int (335)) - (Prims.of_int (51))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (333)) - (Prims.of_int (14)) - (Prims.of_int (335)) - (Prims.of_int (51))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (334)) - (Prims.of_int (28)) - (Prims.of_int (334)) - (Prims.of_int (55))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "FStar.Printf.fst" - (Prims.of_int (121)) - (Prims.of_int (8)) - (Prims.of_int (123)) - (Prims.of_int (44))))) + (Obj.repr + (Pulse_Checker_Bind.check_bind + g1 pre () post_hint + res_ppname t check)) + | Pulse_Syntax_Base.Tm_TotBind + uu___1 -> + Obj.magic + (Obj.repr + (Pulse_Checker_Bind.check_tot_bind + g1 pre () post_hint + res_ppname t check)) + | Pulse_Syntax_Base.Tm_If + { Pulse_Syntax_Base.b1 = b; + Pulse_Syntax_Base.then_ = e1; + Pulse_Syntax_Base.else_ = e2; + Pulse_Syntax_Base.post1 = + post_if;_} + -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal (Obj.magic - (FStar_Tactics_V2_Builtins.range_to_string - t.Pulse_Syntax_Base.range2)) - (fun uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - fun x -> - Prims.strcat - (Prims.strcat - "At " - (Prims.strcat - uu___2 - ": context is {\n")) - (Prims.strcat - x "\n}"))))) - (fun uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - uu___2 uu___1)))) - uu___1))) - (fun uu___1 -> - (fun uu___1 -> - Obj.magic - (FStar_Tactics_V2_Builtins.print - uu___1)) uu___1))) - (fun uu___1 -> - (fun uu___1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (336)) - (Prims.of_int (14)) - (Prims.of_int (336)) - (Prims.of_int (46))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (336)) - (Prims.of_int (6)) - (Prims.of_int (336)) - (Prims.of_int (46))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (336)) - (Prims.of_int (24)) - (Prims.of_int (336)) - (Prims.of_int (45))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "prims.fst" - (Prims.of_int (590)) - (Prims.of_int (19)) - (Prims.of_int (590)) - (Prims.of_int (31))))) - (Obj.magic - (Pulse_Syntax_Printer.st_term_to_string - t)) - (fun uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - Prims.strcat "t = " - uu___2)))) - (fun uu___2 -> - (fun uu___2 -> - Obj.magic - (FStar_Tactics_V2_Builtins.print - uu___2)) uu___2))) uu___1))) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> ())))) - (fun uu___1 -> - (fun uu___1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (338)) - (Prims.of_int (12)) - (Prims.of_int (338)) - (Prims.of_int (23))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (338)) - (Prims.of_int (26)) - (Prims.of_int (454)) - (Prims.of_int (20))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> unprotect t)) - (fun uu___2 -> - (fun t1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (339)) - (Prims.of_int (12)) - (Prims.of_int (339)) - (Prims.of_int (55))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (340)) - (Prims.of_int (4)) - (Prims.of_int (454)) - (Prims.of_int (20))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - Pulse_Checker_Pure.push_context - (Pulse_Syntax_Printer.tag_of_st_term - t1) - t1.Pulse_Syntax_Base.range2 g)) - (fun uu___2 -> - (fun g1 -> - Obj.magic - (FStar_Tactics_V2_Derived.try_with - (fun uu___2 -> - (fun uu___2 -> - match () with - | () -> - (match t1.Pulse_Syntax_Base.term1 - with - | Pulse_Syntax_Base.Tm_Protect - uu___3 -> - Obj.magic - ( - Obj.repr - (FStar_Tactics_V2_Derived.fail - "Protect should have been removed")) - | Pulse_Syntax_Base.Tm_Return - uu___3 -> - Obj.magic - ( - Obj.repr - (Pulse_Checker_Return.check_return - allow_inst - g1 t1 pre - () - post_hint)) - | Pulse_Syntax_Base.Tm_Abs - uu___3 -> - Obj.magic - ( - Obj.repr - (Pulse_Checker_Abs.check_abs - g1 t1 pre - () - post_hint - (check' - true))) - | Pulse_Syntax_Base.Tm_STApp - uu___3 -> - Obj.magic - ( - Obj.repr - (Pulse_Checker_STApp.check_stapp - allow_inst - g1 t1 pre - () - post_hint - check')) - | Pulse_Syntax_Base.Tm_Bind - uu___3 -> - Obj.magic - ( - Obj.repr - (Pulse_Checker_Bind.check_bind - g1 t1 pre - () - post_hint - (check' - true))) - | Pulse_Syntax_Base.Tm_TotBind - uu___3 -> - Obj.magic - ( - Obj.repr - (Pulse_Checker_Bind.check_tot_bind - g1 t1 pre - () - post_hint - (check' - true))) - | Pulse_Syntax_Base.Tm_If - { - Pulse_Syntax_Base.b1 - = b; - Pulse_Syntax_Base.then_ - = e1; - Pulse_Syntax_Base.else_ - = e2; - Pulse_Syntax_Base.post1 - = post_if;_} - -> - Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.fst" + (Prims.of_int (184)) + (Prims.of_int (8)) + (Prims.of_int (200)) + (Prims.of_int (97))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.fst" + (Prims.of_int (201)) + (Prims.of_int (8)) + (Prims.of_int (204)) + (Prims.of_int (29))))) + (match (post_if, + post_hint) + with + | (FStar_Pervasives_Native.None, + FStar_Pervasives_Native.Some + p) -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac ( - Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (362)) - (Prims.of_int (10)) - (Prims.of_int (378)) - (Prims.of_int (97))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (379)) - (Prims.of_int (10)) - (Prims.of_int (381)) - (Prims.of_int (60))))) - (match - (post_if, - post_hint) - with - | - (FStar_Pervasives_Native.None, - FStar_Pervasives_Native.Some - p) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> + fun + uu___1 -> p))) - | - (FStar_Pervasives_Native.Some - p, - FStar_Pervasives_Native.None) - -> - Obj.magic - (Obj.repr - (Pulse_Checker_Common.intro_post_hint + | (FStar_Pervasives_Native.Some + p, + FStar_Pervasives_Native.None) + -> + Obj.magic + (Obj.repr + (Pulse_Checker_Base.intro_post_hint g1 FStar_Pervasives_Native.None + FStar_Pervasives_Native.None p)) - | - (FStar_Pervasives_Native.Some - p, - FStar_Pervasives_Native.Some - q) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (368)) - (Prims.of_int (14)) - (Prims.of_int (373)) - (Prims.of_int (39))))) - (FStar_Sealed.seal + | (FStar_Pervasives_Native.Some + p, + FStar_Pervasives_Native.Some + q) -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + ( + FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (367)) + (Prims.of_int (190)) (Prims.of_int (12)) - (Prims.of_int (373)) - (Prims.of_int (39))))) + (Prims.of_int (195)) + (Prims.of_int (37))))) + ( + FStar_Sealed.seal (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.fst" + (Prims.of_int (189)) + (Prims.of_int (10)) + (Prims.of_int (195)) + (Prims.of_int (37))))) + ( + Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (373)) - (Prims.of_int (18)) - (Prims.of_int (373)) - (Prims.of_int (38))))) + (Prims.of_int (195)) + (Prims.of_int (16)) + (Prims.of_int (195)) + (Prims.of_int (36))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (368)) - (Prims.of_int (14)) - (Prims.of_int (373)) - (Prims.of_int (39))))) + (Prims.of_int (190)) + (Prims.of_int (12)) + (Prims.of_int (195)) + (Prims.of_int (37))))) (Obj.magic (Pulse_Syntax_Printer.term_to_string p)) (fun - uu___3 -> + uu___1 -> (fun - uu___3 -> + uu___1 -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (368)) - (Prims.of_int (14)) - (Prims.of_int (373)) - (Prims.of_int (39))))) + (Prims.of_int (190)) + (Prims.of_int (12)) + (Prims.of_int (195)) + (Prims.of_int (37))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (368)) - (Prims.of_int (14)) - (Prims.of_int (373)) - (Prims.of_int (39))))) + (Prims.of_int (190)) + (Prims.of_int (12)) + (Prims.of_int (195)) + (Prims.of_int (37))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (372)) - (Prims.of_int (18)) - (Prims.of_int (372)) - (Prims.of_int (60))))) + (Prims.of_int (194)) + (Prims.of_int (16)) + (Prims.of_int (194)) + (Prims.of_int (58))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range @@ -3136,225 +794,228 @@ let rec (check' : Prims.bool -> Pulse_Checker_Common.check_t) = (Pulse_Syntax_Printer.term_to_string q.Pulse_Typing.post)) (fun - uu___4 -> + uu___2 -> FStar_Tactics_Effect.lift_div_tac (fun - uu___5 -> + uu___3 -> fun x -> Prims.strcat (Prims.strcat "Multiple annotated postconditions---remove one of them.\nThe context expects the postcondition " (Prims.strcat - uu___4 + uu___2 ",\nbut this conditional was annotated with postcondition ")) (Prims.strcat x ""))))) (fun - uu___4 -> + uu___2 -> FStar_Tactics_Effect.lift_div_tac (fun - uu___5 -> - uu___4 - uu___3)))) - uu___3))) - (fun uu___3 -> + uu___2 + uu___1)))) + uu___1))) + ( + fun + uu___1 -> (fun - uu___3 -> + uu___1 -> Obj.magic (Pulse_Typing_Env.fail g1 (FStar_Pervasives_Native.Some - (t1.Pulse_Syntax_Base.range2)) - uu___3)) - uu___3))) - | - (uu___3, - uu___4) - -> - Obj.magic - (Obj.repr - (Pulse_Typing_Env.fail + (t.Pulse_Syntax_Base.range2)) + uu___1)) + uu___1))) + | (uu___1, uu___2) -> + Obj.magic + (Obj.repr + (Pulse_Typing_Env.fail g1 - (FStar_Pervasives_Native.Some - (t1.Pulse_Syntax_Base.range2)) + ( + FStar_Pervasives_Native.Some + (t.Pulse_Syntax_Base.range2)) "Pulse cannot yet infer a postcondition for a non-tail conditional statement;\nEither annotate this `if` with `returns` clause; or rewrite your code to use a tail conditional"))) - (fun - uu___3 -> - (fun post - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal + (fun uu___1 -> + (fun post -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (380)) - (Prims.of_int (28)) - (Prims.of_int (380)) - (Prims.of_int (83))))) - (FStar_Sealed.seal + (Prims.of_int (203)) + (Prims.of_int (8)) + (Prims.of_int (203)) + (Prims.of_int (63))))) + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (379)) - (Prims.of_int (10)) - (Prims.of_int (381)) - (Prims.of_int (60))))) - (Obj.magic - (Pulse_Checker_If.check_if - g1 b e1 - e2 pre () + (Prims.of_int (201)) + (Prims.of_int (8)) + (Prims.of_int (204)) + (Prims.of_int (29))))) + (Obj.magic + (Pulse_Checker_If.check + g1 pre () post - (check' - true))) - (fun - uu___3 -> + res_ppname + b e1 e2 + check)) + (fun uu___1 + -> FStar_Tactics_Effect.lift_div_tac (fun - uu___4 -> - match uu___3 + uu___2 -> + match uu___1 with | - FStar_Pervasives.Mkdtuple3 - (t2, c, - d) -> - FStar_Pervasives.Mkdtuple3 - (t2, c, - d))))) - uu___3))) - | Pulse_Syntax_Base.Tm_Match - { - Pulse_Syntax_Base.sc - = sc; - Pulse_Syntax_Base.returns_ - = - post_match; - Pulse_Syntax_Base.brs - = brs;_} - -> - Obj.magic + FStar_Pervasives.Mkdtuple5 + (x, t1, + pre', + g11, k) + -> + FStar_Pervasives.Mkdtuple5 + (x, t1, + pre', + g11, k))))) + uu___1))) + | Pulse_Syntax_Base.Tm_While + uu___1 -> + Obj.magic + (Obj.repr + (Pulse_Checker_While.check + g1 pre () post_hint + res_ppname t check)) + | Pulse_Syntax_Base.Tm_Match + { Pulse_Syntax_Base.sc = sc; + Pulse_Syntax_Base.returns_ = + post_match; + Pulse_Syntax_Base.brs = brs;_} + -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.fst" + (Prims.of_int (212)) + (Prims.of_int (8)) + (Prims.of_int (228)) + (Prims.of_int (97))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.fst" + (Prims.of_int (229)) + (Prims.of_int (8)) + (Prims.of_int (232)) + (Prims.of_int (30))))) + (match (post_match, + post_hint) + with + | (FStar_Pervasives_Native.None, + FStar_Pervasives_Native.Some + p) -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac ( - Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (386)) - (Prims.of_int (10)) - (Prims.of_int (402)) - (Prims.of_int (97))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (403)) - (Prims.of_int (10)) - (Prims.of_int (405)) - (Prims.of_int (60))))) - (match - (post_match, - post_hint) - with - | - (FStar_Pervasives_Native.None, - FStar_Pervasives_Native.Some - p) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> + fun + uu___1 -> p))) - | - (FStar_Pervasives_Native.Some - p, - FStar_Pervasives_Native.None) - -> - Obj.magic - (Obj.repr - (Pulse_Checker_Common.intro_post_hint + | (FStar_Pervasives_Native.Some + p, + FStar_Pervasives_Native.None) + -> + Obj.magic + (Obj.repr + (Pulse_Checker_Base.intro_post_hint g1 FStar_Pervasives_Native.None + FStar_Pervasives_Native.None p)) - | - (FStar_Pervasives_Native.Some - p, - FStar_Pervasives_Native.Some - q) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal + | (FStar_Pervasives_Native.Some + p, + FStar_Pervasives_Native.Some + q) -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + ( + FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (392)) - (Prims.of_int (14)) - (Prims.of_int (397)) - (Prims.of_int (39))))) - (FStar_Sealed.seal + (Prims.of_int (218)) + (Prims.of_int (12)) + (Prims.of_int (223)) + (Prims.of_int (37))))) + ( + FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (391)) - (Prims.of_int (12)) - (Prims.of_int (397)) - (Prims.of_int (39))))) - (Obj.magic + (Prims.of_int (217)) + (Prims.of_int (10)) + (Prims.of_int (223)) + (Prims.of_int (37))))) + ( + Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (397)) - (Prims.of_int (18)) - (Prims.of_int (397)) - (Prims.of_int (38))))) + (Prims.of_int (223)) + (Prims.of_int (16)) + (Prims.of_int (223)) + (Prims.of_int (36))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (392)) - (Prims.of_int (14)) - (Prims.of_int (397)) - (Prims.of_int (39))))) + (Prims.of_int (218)) + (Prims.of_int (12)) + (Prims.of_int (223)) + (Prims.of_int (37))))) (Obj.magic (Pulse_Syntax_Printer.term_to_string p)) (fun - uu___3 -> + uu___1 -> (fun - uu___3 -> + uu___1 -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (392)) - (Prims.of_int (14)) - (Prims.of_int (397)) - (Prims.of_int (39))))) + (Prims.of_int (218)) + (Prims.of_int (12)) + (Prims.of_int (223)) + (Prims.of_int (37))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (392)) - (Prims.of_int (14)) - (Prims.of_int (397)) - (Prims.of_int (39))))) + (Prims.of_int (218)) + (Prims.of_int (12)) + (Prims.of_int (223)) + (Prims.of_int (37))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (396)) - (Prims.of_int (18)) - (Prims.of_int (396)) - (Prims.of_int (60))))) + (Prims.of_int (222)) + (Prims.of_int (16)) + (Prims.of_int (222)) + (Prims.of_int (58))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range @@ -3367,294 +1028,150 @@ let rec (check' : Prims.bool -> Pulse_Checker_Common.check_t) = (Pulse_Syntax_Printer.term_to_string q.Pulse_Typing.post)) (fun - uu___4 -> + uu___2 -> FStar_Tactics_Effect.lift_div_tac (fun - uu___5 -> + uu___3 -> fun x -> Prims.strcat (Prims.strcat "Multiple annotated postconditions---remove one of them.\nThe context expects the postcondition " (Prims.strcat - uu___4 + uu___2 ",\nbut this conditional was annotated with postcondition ")) (Prims.strcat x ""))))) (fun - uu___4 -> + uu___2 -> FStar_Tactics_Effect.lift_div_tac (fun - uu___5 -> - uu___4 - uu___3)))) - uu___3))) - (fun uu___3 -> + uu___2 + uu___1)))) + uu___1))) + ( + fun + uu___1 -> (fun - uu___3 -> + uu___1 -> Obj.magic (Pulse_Typing_Env.fail g1 (FStar_Pervasives_Native.Some - (t1.Pulse_Syntax_Base.range2)) - uu___3)) - uu___3))) - | - (uu___3, - uu___4) - -> - Obj.magic - (Obj.repr - (Pulse_Typing_Env.fail + (t.Pulse_Syntax_Base.range2)) + uu___1)) + uu___1))) + | (uu___1, uu___2) -> + Obj.magic + (Obj.repr + (Pulse_Typing_Env.fail g1 - (FStar_Pervasives_Native.Some - (t1.Pulse_Syntax_Base.range2)) + ( + FStar_Pervasives_Native.Some + (t.Pulse_Syntax_Base.range2)) "Pulse cannot yet infer a postcondition for a non-tail conditional statement;\nEither annotate this `if` with `returns` clause; or rewrite your code to use a tail conditional"))) - (fun - uu___3 -> - (fun post - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal + (fun uu___1 -> + (fun post -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (404)) - (Prims.of_int (28)) - (Prims.of_int (404)) - (Prims.of_int (88))))) - (FStar_Sealed.seal + (Prims.of_int (231)) + (Prims.of_int (8)) + (Prims.of_int (231)) + (Prims.of_int (65))))) + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.fst" - (Prims.of_int (403)) - (Prims.of_int (10)) - (Prims.of_int (405)) - (Prims.of_int (60))))) - (Obj.magic - (Pulse_Checker_Match.check_match - g1 sc brs - pre () + (Prims.of_int (229)) + (Prims.of_int (8)) + (Prims.of_int (232)) + (Prims.of_int (30))))) + (Obj.magic + (Pulse_Checker_Match.check + g1 pre () post - (check' - true))) - (fun - uu___3 -> + res_ppname + sc brs + check)) + (fun uu___1 + -> FStar_Tactics_Effect.lift_div_tac (fun - uu___4 -> - match uu___3 - with - | - FStar_Pervasives.Mkdtuple3 - (t2, c, - d) -> - FStar_Pervasives.Mkdtuple3 - (t2, c, - d))))) - uu___3))) - | Pulse_Syntax_Base.Tm_IntroPure - uu___3 -> - Obj.magic - ( - Obj.repr - (Pulse_Checker_IntroPure.check_intro_pure - g1 t1 pre - () - post_hint)) - | Pulse_Syntax_Base.Tm_ElimExists - uu___3 -> - Obj.magic - ( - Obj.repr - (Pulse_Checker_Exists.check_elim_exists - g1 t1 pre - () - post_hint)) - | Pulse_Syntax_Base.Tm_IntroExists - { - Pulse_Syntax_Base.erased - = uu___3; - Pulse_Syntax_Base.p2 - = uu___4; - Pulse_Syntax_Base.witnesses - = - witnesses; - Pulse_Syntax_Base.should_check1 - = uu___5;_} - -> - Obj.magic - ( - Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (415)) - (Prims.of_int (10)) - (Prims.of_int (421)) - (Prims.of_int (21))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (423)) - (Prims.of_int (8)) - (Prims.of_int (432)) - (Prims.of_int (9))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___6 -> - match witnesses - with - | - w::[] -> - (match - w.Pulse_Syntax_Base.t + uu___2 -> + match uu___1 with | - Pulse_Syntax_Base.Tm_Unknown - -> true - | - uu___7 -> - false) - | - uu___7 -> - true)) - (fun - uu___6 -> - (fun - should_infer_witnesses - -> - if - should_infer_witnesses - then - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (425)) - (Prims.of_int (29)) - (Prims.of_int (425)) - (Prims.of_int (61))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.fst" - (Prims.of_int (428)) - (Prims.of_int (10)) - (Prims.of_int (428)) - (Prims.of_int (67))))) - (Obj.magic - (maybe_infer_intro_exists - g1 t1 pre)) - (fun - uu___6 -> - (fun - unary_intros + FStar_Pervasives.Mkdtuple5 + (x, ty, + pre', + g11, k) -> - Obj.magic - (check' - allow_inst - g1 - unary_intros - pre () - post_hint)) - uu___6)) - else - Obj.magic - (Pulse_Checker_Exists.check_intro_exists_either - g1 t1 - FStar_Pervasives_Native.None - pre () - post_hint)) - uu___6))) - | Pulse_Syntax_Base.Tm_While - uu___3 -> - Obj.magic - ( - Obj.repr - (Pulse_Checker_While.check_while - allow_inst - g1 t1 pre - () - post_hint - check')) - | Pulse_Syntax_Base.Tm_Admit - uu___3 -> - Obj.magic - ( - Obj.repr - (Pulse_Checker_Admit.check_admit - g1 t1 pre - () - post_hint)) - | Pulse_Syntax_Base.Tm_Par - uu___3 -> - Obj.magic - ( - Obj.repr - (Pulse_Checker_Par.check_par - allow_inst - g1 t1 pre - () - post_hint - check')) - | Pulse_Syntax_Base.Tm_WithLocal - uu___3 -> - Obj.magic - ( - Obj.repr - (Pulse_Checker_WithLocal.check_withlocal - allow_inst - g1 t1 pre - () - post_hint - check')) - | Pulse_Syntax_Base.Tm_Rewrite - uu___3 -> - Obj.magic - ( - Obj.repr - (Pulse_Checker_Rewrite.check_rewrite - g1 t1 pre - () - post_hint)) - | Pulse_Syntax_Base.Tm_ProofHintWithBinders - uu___3 -> - Obj.magic - ( - Obj.repr - (Pulse_Checker_AssertWithBinders.check - g1 t1 pre - () - post_hint - (check' - true))))) - uu___2) - (fun uu___2 -> - (fun uu___2 -> - match uu___2 with - | Pulse_Checker_Common.Framing_failure - failure -> - Obj.magic - (Obj.repr - (handle_framing_failure - g1 t1 pre - () - post_hint - failure - (check' - true))) - | e -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.raise - e))) - uu___2))) uu___2))) - uu___2))) uu___1) -let (check : Pulse_Checker_Common.check_t) = check' true \ No newline at end of file + FStar_Pervasives.Mkdtuple5 + (x, ty, + pre', + g11, k))))) + uu___1))) + | Pulse_Syntax_Base.Tm_ProofHintWithBinders + uu___1 -> + Obj.magic + (Obj.repr + (Pulse_Checker_AssertWithBinders.check + g1 pre () post_hint + res_ppname t check)) + | Pulse_Syntax_Base.Tm_WithLocal + uu___1 -> + Obj.magic + (Obj.repr + (Pulse_Checker_WithLocal.check + g1 pre () post_hint + res_ppname t check)) + | Pulse_Syntax_Base.Tm_Par uu___1 + -> + Obj.magic + (Obj.repr + (Pulse_Checker_Par.check + g1 pre () post_hint + res_ppname t check)) + | Pulse_Syntax_Base.Tm_IntroPure + uu___1 -> + Obj.magic + (Obj.repr + (Pulse_Checker_IntroPure.check + g1 pre () post_hint + res_ppname t)) + | Pulse_Syntax_Base.Tm_Admit + uu___1 -> + Obj.magic + (Obj.repr + (Pulse_Checker_Admit.check + g1 pre () post_hint + res_ppname t)) + | Pulse_Syntax_Base.Tm_Rewrite + uu___1 -> + Obj.magic + (Obj.repr + (Pulse_Checker_Rewrite.check + g1 pre () post_hint + res_ppname t)) + | uu___1 -> + Obj.magic + (Obj.repr + (FStar_Tactics_V2_Derived.fail + "Checker form not implemented"))) + uu___1))) + (fun r -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + match r with + | FStar_Pervasives.Mkdtuple5 + (x, g1, t1, pre', k) -> + FStar_Pervasives.Mkdtuple5 + (x, g1, t1, pre', + (Pulse_Checker_Base.k_elab_trans + g0 g g1 pre0 pre + (FStar_Pervasives.dfst pre') + k_elim_pure k)))))) uu___) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Checker_Abs.ml b/src/ocaml/plugin/generated/Pulse_Checker_Abs.ml index 72705b626..51cb38811 100644 --- a/src/ocaml/plugin/generated/Pulse_Checker_Abs.ml +++ b/src/ocaml/plugin/generated/Pulse_Checker_Abs.ml @@ -364,153 +364,136 @@ let (check_effect_annotation : (FStar_Pervasives_Native.Some r) uu___2)) uu___2)))) uu___3 uu___2 uu___1 uu___ -let (check_abs : +let rec (check_abs : Pulse_Typing_Env.env -> Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.term -> - unit -> - unit Pulse_Typing.post_hint_opt -> - Pulse_Checker_Common.check_t -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, - unit) FStar_Tactics_Effect.tac_repr) + Pulse_Checker_Base.check_t -> + ((Pulse_Syntax_Base.st_term, Pulse_Syntax_Base.comp, + (unit, unit, unit) Pulse_Typing.st_typing) + FStar_Pervasives.dtuple3, + unit) FStar_Tactics_Effect.tac_repr) = fun g -> fun t -> - fun pre -> - fun pre_typing -> - fun post_hint -> - fun check -> - if FStar_Pervasives_Native.uu___is_Some post_hint - then - Pulse_Typing_Env.fail g FStar_Pervasives_Native.None - "Unexpected post-condition annotation from context for an abstraction" - else - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Abs.fst" - (Prims.of_int (43)) (Prims.of_int (14)) - (Prims.of_int (43)) (Prims.of_int (21))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Abs.fst" - (Prims.of_int (44)) (Prims.of_int (2)) - (Prims.of_int (88)) (Prims.of_int (27))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> t.Pulse_Syntax_Base.range2)) - (fun uu___1 -> - (fun range -> - match t.Pulse_Syntax_Base.term1 with - | Pulse_Syntax_Base.Tm_Abs - { - Pulse_Syntax_Base.b = - { Pulse_Syntax_Base.binder_ty = t1; - Pulse_Syntax_Base.binder_ppname = ppname;_}; - Pulse_Syntax_Base.q = qual; - Pulse_Syntax_Base.ascription = c; - Pulse_Syntax_Base.body = body;_} - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Abs.fst" - (Prims.of_int (47)) - (Prims.of_int (24)) - (Prims.of_int (47)) - (Prims.of_int (38))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Abs.fst" - (Prims.of_int (45)) - (Prims.of_int (84)) - (Prims.of_int (88)) - (Prims.of_int (27))))) - (Obj.magic - (Pulse_Checker_Pure.check_term g t1)) - (fun uu___1 -> - (fun uu___1 -> - match uu___1 with - | FStar_Pervasives.Mkdtuple3 - (t2, uu___2, uu___3) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Abs.fst" - (Prims.of_int (48)) - (Prims.of_int (28)) - (Prims.of_int (48)) - (Prims.of_int (46))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Abs.fst" - (Prims.of_int (47)) - (Prims.of_int (41)) - (Prims.of_int (88)) - (Prims.of_int (27))))) - (Obj.magic - (Pulse_Checker_Pure.check_universe - g t2)) - (fun uu___4 -> - (fun uu___4 -> - match uu___4 with - | Prims.Mkdtuple2 - (u, t_typing) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Abs.fst" - (Prims.of_int (49)) - (Prims.of_int (12)) - (Prims.of_int (49)) - (Prims.of_int (19))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Abs.fst" - (Prims.of_int (49)) - (Prims.of_int (22)) - (Prims.of_int (88)) - (Prims.of_int (27))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___5 - -> - Pulse_Typing_Env.fresh - g)) - (fun uu___5 -> - (fun x -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal + fun check -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Abs.fst" + (Prims.of_int (40)) (Prims.of_int (14)) + (Prims.of_int (40)) (Prims.of_int (21))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Abs.fst" + (Prims.of_int (41)) (Prims.of_int (2)) + (Prims.of_int (101)) (Prims.of_int (29))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> t.Pulse_Syntax_Base.range2)) + (fun uu___ -> + (fun range -> + match t.Pulse_Syntax_Base.term1 with + | Pulse_Syntax_Base.Tm_Abs + { + Pulse_Syntax_Base.b = + { Pulse_Syntax_Base.binder_ty = t1; + Pulse_Syntax_Base.binder_ppname = ppname;_}; + Pulse_Syntax_Base.q = qual; + Pulse_Syntax_Base.ascription = c; + Pulse_Syntax_Base.body = body;_} + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Abs.fst" + (Prims.of_int (45)) (Prims.of_int (24)) + (Prims.of_int (45)) (Prims.of_int (38))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Abs.fst" + (Prims.of_int (42)) (Prims.of_int (84)) + (Prims.of_int (101)) (Prims.of_int (29))))) + (Obj.magic (Pulse_Checker_Pure.check_term g t1)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | FStar_Pervasives.Mkdtuple3 + (t2, uu___1, uu___2) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Abs.fst" + (Prims.of_int (46)) + (Prims.of_int (28)) + (Prims.of_int (46)) + (Prims.of_int (46))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Abs.fst" + (Prims.of_int (45)) + (Prims.of_int (41)) + (Prims.of_int (101)) + (Prims.of_int (29))))) + (Obj.magic + (Pulse_Checker_Pure.check_universe + g t2)) + (fun uu___3 -> + (fun uu___3 -> + match uu___3 with + | Prims.Mkdtuple2 (u, t_typing) + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Abs.fst" + (Prims.of_int (47)) + (Prims.of_int (12)) + (Prims.of_int (47)) + (Prims.of_int (19))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Abs.fst" + (Prims.of_int (47)) + (Prims.of_int (22)) + (Prims.of_int (101)) + (Prims.of_int (29))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___4 -> + Pulse_Typing_Env.fresh + g)) + (fun uu___4 -> + (fun x -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Abs.fst" - (Prims.of_int (50)) + (Prims.of_int (48)) (Prims.of_int (13)) - (Prims.of_int (50)) + (Prims.of_int (48)) (Prims.of_int (22))))) - (FStar_Sealed.seal + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Abs.fst" - (Prims.of_int (50)) + (Prims.of_int (48)) (Prims.of_int (25)) - (Prims.of_int (88)) - (Prims.of_int (27))))) - (FStar_Tactics_Effect.lift_div_tac + (Prims.of_int (101)) + (Prims.of_int (29))))) + (FStar_Tactics_Effect.lift_div_tac (fun - uu___5 -> + uu___4 -> (ppname, x))) - (fun - uu___5 -> + (fun uu___4 + -> (fun px -> Obj.magic @@ -519,21 +502,21 @@ let (check_abs : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Abs.fst" - (Prims.of_int (51)) + (Prims.of_int (49)) (Prims.of_int (14)) - (Prims.of_int (51)) + (Prims.of_int (49)) (Prims.of_int (50))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Abs.fst" - (Prims.of_int (51)) + (Prims.of_int (49)) (Prims.of_int (53)) - (Prims.of_int (88)) - (Prims.of_int (27))))) + (Prims.of_int (101)) + (Prims.of_int (29))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___5 -> + uu___4 -> Pulse_Syntax_Pure.tm_var { Pulse_Syntax_Base.nm_index @@ -542,7 +525,7 @@ let (check_abs : = ppname })) (fun - uu___5 -> + uu___4 -> (fun var -> Obj.magic @@ -551,26 +534,26 @@ let (check_abs : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Abs.fst" - (Prims.of_int (52)) + (Prims.of_int (50)) (Prims.of_int (13)) - (Prims.of_int (52)) + (Prims.of_int (50)) (Prims.of_int (38))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Abs.fst" - (Prims.of_int (52)) + (Prims.of_int (50)) (Prims.of_int (41)) - (Prims.of_int (88)) - (Prims.of_int (27))))) + (Prims.of_int (101)) + (Prims.of_int (29))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___5 -> + uu___4 -> Pulse_Typing_Env.push_binding g x ppname t2)) (fun - uu___5 -> + uu___4 -> (fun g' -> Obj.magic @@ -579,44 +562,183 @@ let (check_abs : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Abs.fst" - (Prims.of_int (54)) - (Prims.of_int (6)) - (Prims.of_int (66)) + (Prims.of_int (51)) + (Prims.of_int (22)) + (Prims.of_int (51)) (Prims.of_int (45))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Abs.fst" (Prims.of_int (52)) - (Prims.of_int (41)) - (Prims.of_int (88)) - (Prims.of_int (27))))) + (Prims.of_int (4)) + (Prims.of_int (101)) + (Prims.of_int (29))))) (FStar_Tactics_Effect.lift_div_tac (fun + uu___4 -> + Pulse_Syntax_Naming.open_st_term_nv + body px)) + (fun + uu___4 -> + (fun + body_opened + -> + match + body_opened.Pulse_Syntax_Base.term1 + with + | + Pulse_Syntax_Base.Tm_Abs + uu___4 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Abs.fst" + (Prims.of_int (54)) + (Prims.of_int (44)) + (Prims.of_int (54)) + (Prims.of_int (74))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Abs.fst" + (Prims.of_int (53)) + (Prims.of_int (17)) + (Prims.of_int (62)) + (Prims.of_int (29))))) + (Obj.magic + (check_abs + g' + body_opened + check)) + (fun uu___5 -> - match c + (fun + uu___5 -> + match uu___5 with | - Pulse_Syntax_Base.C_Tot + FStar_Pervasives.Mkdtuple3 + (body1, + c_body, + body_typing) + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Abs.fst" + (Prims.of_int (55)) + (Prims.of_int (6)) + (Prims.of_int (55)) + (Prims.of_int (52))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Abs.fst" + (Prims.of_int (62)) + (Prims.of_int (6)) + (Prims.of_int (62)) + (Prims.of_int (29))))) + (Obj.magic + (check_effect_annotation + g' + body1.Pulse_Syntax_Base.range2 + c c_body)) + (fun + uu___6 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___7 -> + FStar_Pervasives.Mkdtuple3 + ((Pulse_Typing.wr + (Pulse_Syntax_Base.Tm_Abs { - Pulse_Syntax_Base.t + Pulse_Syntax_Base.b = - Pulse_Syntax_Base.Tm_Unknown; - Pulse_Syntax_Base.range1 - = uu___6;_} - -> - (Pulse_Syntax_Base.tm_emp, - FStar_Pervasives_Native.None, - FStar_Pervasives_Native.None) + { + Pulse_Syntax_Base.binder_ty + = t2; + Pulse_Syntax_Base.binder_ppname + = ppname + }; + Pulse_Syntax_Base.q + = qual; + Pulse_Syntax_Base.ascription + = + (Pulse_Syntax_Naming.close_comp + c_body x); + Pulse_Syntax_Base.body + = + (Pulse_Syntax_Naming.close_st_term + body1 x) + })), + (Pulse_Syntax_Base.C_Tot + (Pulse_Syntax_Pure.tm_arrow + { + Pulse_Syntax_Base.binder_ty + = t2; + Pulse_Syntax_Base.binder_ppname + = ppname + } qual + (Pulse_Syntax_Naming.close_comp + c_body x))), + (Pulse_Typing.T_Abs + (g, x, + qual, + { + Pulse_Syntax_Base.binder_ty + = t2; + Pulse_Syntax_Base.binder_ppname + = ppname + }, u, + (Pulse_Syntax_Naming.close_st_term + body1 x), + c_body, + (), + body_typing))))))) + uu___5)) + | + uu___4 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Abs.fst" + (Prims.of_int (65)) + (Prims.of_int (8)) + (Prims.of_int (73)) + (Prims.of_int (47))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Abs.fst" + (Prims.of_int (63)) + (Prims.of_int (10)) + (Prims.of_int (101)) + (Prims.of_int (29))))) + (match c + with | Pulse_Syntax_Base.C_Tot - ty -> - (Pulse_Syntax_Base.tm_emp, + uu___5 -> + Obj.magic + (Obj.repr + (Pulse_Typing_Env.fail + g (FStar_Pervasives_Native.Some - (Pulse_Syntax_Naming.open_term_nv - ty px)), - FStar_Pervasives_Native.None) + (body.Pulse_Syntax_Base.range2)) + "Unexpected error: found a total computation annotation on a top-level function")) | + uu___5 -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___6 -> ((Pulse_Syntax_Naming.open_term_nv (Pulse_Syntax_Base.comp_pre @@ -629,7 +751,7 @@ let (check_abs : (Pulse_Syntax_Naming.open_term' (Pulse_Syntax_Base.comp_post c) var - Prims.int_one))))) + Prims.int_one))))))) (fun uu___5 -> (fun @@ -647,18 +769,18 @@ let (check_abs : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Abs.fst" - (Prims.of_int (68)) - (Prims.of_int (39)) - (Prims.of_int (68)) - (Prims.of_int (64))))) + (Prims.of_int (75)) + (Prims.of_int (41)) + (Prims.of_int (75)) + (Prims.of_int (66))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Abs.fst" - (Prims.of_int (67)) - (Prims.of_int (6)) - (Prims.of_int (88)) - (Prims.of_int (27))))) + (Prims.of_int (74)) + (Prims.of_int (8)) + (Prims.of_int (101)) + (Prims.of_int (29))))) (Obj.magic (Pulse_Checker_Pure.check_vprop g' @@ -672,7 +794,7 @@ let (check_abs : | Prims.Mkdtuple2 (pre_opened1, - pre_typing1) + pre_typing) -> Obj.magic (FStar_Tactics_Effect.tac_bind @@ -680,18 +802,18 @@ let (check_abs : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Abs.fst" - (Prims.of_int (69)) - (Prims.of_int (14)) - (Prims.of_int (69)) - (Prims.of_int (37))))) + (Prims.of_int (76)) + (Prims.of_int (16)) + (Prims.of_int (76)) + (Prims.of_int (39))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Abs.fst" - (Prims.of_int (69)) - (Prims.of_int (40)) - (Prims.of_int (88)) - (Prims.of_int (27))))) + (Prims.of_int (76)) + (Prims.of_int (42)) + (Prims.of_int (101)) + (Prims.of_int (29))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___7 -> @@ -700,7 +822,7 @@ let (check_abs : x)) (fun uu___7 -> - (fun pre1 + (fun pre -> Obj.magic (FStar_Tactics_Effect.tac_bind @@ -708,56 +830,58 @@ let (check_abs : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Abs.fst" - (Prims.of_int (71)) - (Prims.of_int (6)) (Prims.of_int (78)) - (Prims.of_int (29))))) + (Prims.of_int (8)) + (Prims.of_int (85)) + (Prims.of_int (31))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Abs.fst" - (Prims.of_int (79)) - (Prims.of_int (6)) - (Prims.of_int (88)) - (Prims.of_int (27))))) + (Prims.of_int (86)) + (Prims.of_int (8)) + (Prims.of_int (101)) + (Prims.of_int (29))))) (match post_hint_body with | FStar_Pervasives_Native.None -> Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___7 -> - FStar_Pervasives_Native.None))) + (Pulse_Typing_Env.fail + g + (FStar_Pervasives_Native.Some + (body.Pulse_Syntax_Base.range2)) + "Top-level functions must be annotated with pre and post conditions") | FStar_Pervasives_Native.Some post -> Obj.magic - (Obj.repr (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Abs.fst" - (Prims.of_int (76)) - (Prims.of_int (12)) - (Prims.of_int (76)) - (Prims.of_int (103))))) + (Prims.of_int (83)) + (Prims.of_int (14)) + (Prims.of_int (83)) + (Prims.of_int (130))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Abs.fst" - (Prims.of_int (78)) - (Prims.of_int (8)) - (Prims.of_int (78)) - (Prims.of_int (29))))) + (Prims.of_int (85)) + (Prims.of_int (10)) + (Prims.of_int (85)) + (Prims.of_int (31))))) (Obj.magic - (Pulse_Checker_Common.intro_post_hint + (Pulse_Checker_Base.intro_post_hint (Pulse_Checker_Pure.push_context "post_hint_typing" range g') + (FStar_Pervasives_Native.Some + (Pulse_Syntax_Base.ctag_of_comp_st + c)) ret_ty post)) (fun @@ -767,7 +891,7 @@ let (check_abs : (fun uu___7 -> FStar_Pervasives_Native.Some - post_hint_typing))))) + post_hint_typing)))) (fun uu___7 -> (fun post @@ -778,24 +902,80 @@ let (check_abs : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Abs.fst" - (Prims.of_int (80)) - (Prims.of_int (43)) - (Prims.of_int (80)) - (Prims.of_int (104))))) + (Prims.of_int (88)) + (Prims.of_int (19)) + (Prims.of_int (88)) + (Prims.of_int (45))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Abs.fst" - (Prims.of_int (79)) - (Prims.of_int (6)) (Prims.of_int (88)) - (Prims.of_int (27))))) + (Prims.of_int (48)) + (Prims.of_int (101)) + (Prims.of_int (29))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___7 -> + Pulse_Syntax_Base.mk_ppname_no_range + "_fret")) + (fun + uu___7 -> + (fun + ppname1 + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Abs.fst" + (Prims.of_int (89)) + (Prims.of_int (15)) + (Prims.of_int (89)) + (Prims.of_int (69))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Abs.fst" + (Prims.of_int (89)) + (Prims.of_int (73)) + (Prims.of_int (101)) + (Prims.of_int (29))))) (Obj.magic (check g' - (Pulse_Syntax_Naming.open_st_term_nv - body px) pre_opened1 - () post)) + () post + ppname1 + body_opened)) + (fun + uu___7 -> + (fun r -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Abs.fst" + (Prims.of_int (91)) + (Prims.of_int (8)) + (Prims.of_int (91)) + (Prims.of_int (61))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Abs.fst" + (Prims.of_int (89)) + (Prims.of_int (73)) + (Prims.of_int (101)) + (Prims.of_int (29))))) + (Obj.magic + (Pulse_Checker_Base.apply_checker_result_k + g' + pre_opened1 + (FStar_Pervasives_Native.__proj__Some__item__v + post) r + ppname1)) (fun uu___7 -> (fun @@ -804,7 +984,7 @@ let (check_abs : with | FStar_Pervasives.Mkdtuple3 - (body', + (body1, c_body, body_typing) -> @@ -814,28 +994,55 @@ let (check_abs : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Abs.fst" - (Prims.of_int (81)) - (Prims.of_int (4)) - (Prims.of_int (81)) - (Prims.of_int (51))))) + (Prims.of_int (93)) + (Prims.of_int (6)) + (Prims.of_int (101)) + (Prims.of_int (29))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Abs.fst" - (Prims.of_int (88)) - (Prims.of_int (4)) - (Prims.of_int (88)) - (Prims.of_int (27))))) + (Prims.of_int (93)) + (Prims.of_int (6)) + (Prims.of_int (101)) + (Prims.of_int (29))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___8 -> + uu___7)) + (fun + uu___8 -> + (fun + uu___8 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Abs.fst" + (Prims.of_int (93)) + (Prims.of_int (6)) + (Prims.of_int (93)) + (Prims.of_int (52))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Abs.fst" + (Prims.of_int (101)) + (Prims.of_int (6)) + (Prims.of_int (101)) + (Prims.of_int (29))))) (Obj.magic (check_effect_annotation g' - body'.Pulse_Syntax_Base.range2 + body1.Pulse_Syntax_Base.range2 c c_body)) (fun - uu___8 -> + uu___9 -> FStar_Tactics_Effect.lift_div_tac (fun - uu___9 -> + uu___10 + -> FStar_Pervasives.Mkdtuple3 ((Pulse_Typing.wr (Pulse_Syntax_Base.Tm_Abs @@ -846,7 +1053,7 @@ let (check_abs : Pulse_Syntax_Base.binder_ty = t2; Pulse_Syntax_Base.binder_ppname - = ppname + = ppname1 }; Pulse_Syntax_Base.q = qual; @@ -857,7 +1064,7 @@ let (check_abs : Pulse_Syntax_Base.body = (Pulse_Syntax_Naming.close_st_term - body' x) + body1 x) })), (Pulse_Syntax_Base.C_Tot (Pulse_Syntax_Pure.tm_arrow @@ -865,7 +1072,7 @@ let (check_abs : Pulse_Syntax_Base.binder_ty = t2; Pulse_Syntax_Base.binder_ppname - = ppname + = ppname1 } qual (Pulse_Syntax_Naming.close_comp c_body x))), @@ -876,21 +1083,24 @@ let (check_abs : Pulse_Syntax_Base.binder_ty = t2; Pulse_Syntax_Base.binder_ppname - = ppname + = ppname1 }, u, (Pulse_Syntax_Naming.close_st_term - body' x), + body1 x), c_body, (), body_typing))))))) + uu___8))) + uu___7))) + uu___7))) uu___7))) uu___7))) uu___7))) uu___6))) uu___5))) - uu___5))) - uu___5))) - uu___5))) - uu___5))) - uu___4))) uu___1))) - uu___1) \ No newline at end of file + uu___4))) + uu___4))) + uu___4))) + uu___4))) + uu___4))) uu___3))) + uu___))) uu___) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Checker_Admit.ml b/src/ocaml/plugin/generated/Pulse_Checker_Admit.ml index bf41beb42..bd7d5dda0 100644 --- a/src/ocaml/plugin/generated/Pulse_Checker_Admit.ml +++ b/src/ocaml/plugin/generated/Pulse_Checker_Admit.ml @@ -1,149 +1,292 @@ open Prims type ('p, 'x, 't, 'u, 'post) post_hint_compatible = Obj.t -let (check_admit : +let (check : Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.term -> - unit -> - unit Pulse_Typing.post_hint_opt -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, - unit) FStar_Tactics_Effect.tac_repr) + Pulse_Syntax_Base.term -> + unit -> + unit Pulse_Typing.post_hint_opt -> + Pulse_Syntax_Base.ppname -> + Pulse_Syntax_Base.st_term -> + ((unit, unit, unit) Pulse_Checker_Base.checker_result_t, + unit) FStar_Tactics_Effect.tac_repr) = fun g -> - fun t -> - fun pre -> - fun pre_typing -> - fun post_hint -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Admit.fst" - (Prims.of_int (29)) (Prims.of_int (43)) - (Prims.of_int (29)) (Prims.of_int (49))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Admit.fst" - (Prims.of_int (28)) (Prims.of_int (46)) - (Prims.of_int (71)) (Prims.of_int (4))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> t.Pulse_Syntax_Base.term1)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | Pulse_Syntax_Base.Tm_Admit - { Pulse_Syntax_Base.ctag1 = c; - Pulse_Syntax_Base.u1 = uu___1; - Pulse_Syntax_Base.typ = t1; - Pulse_Syntax_Base.post3 = post;_} - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Admit.fst" - (Prims.of_int (30)) (Prims.of_int (10)) - (Prims.of_int (30)) (Prims.of_int (17))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Admit.fst" - (Prims.of_int (30)) (Prims.of_int (20)) - (Prims.of_int (71)) (Prims.of_int (4))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> Pulse_Typing_Env.fresh g)) - (fun uu___2 -> - (fun x -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Admit.fst" - (Prims.of_int (31)) - (Prims.of_int (11)) - (Prims.of_int (31)) - (Prims.of_int (20))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Admit.fst" - (Prims.of_int (31)) - (Prims.of_int (23)) - (Prims.of_int (71)) - (Prims.of_int (4))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - Pulse_Syntax_Base.v_as_nv x)) - (fun uu___2 -> - (fun px -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Admit.fst" - (Prims.of_int (38)) - (Prims.of_int (6)) - (Prims.of_int (60)) - (Prims.of_int (9))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Admit.fst" - (Prims.of_int (61)) - (Prims.of_int (4)) - (Prims.of_int (71)) - (Prims.of_int (4))))) - (match (post, post_hint) - with - | (FStar_Pervasives_Native.None, - FStar_Pervasives_Native.None) - -> - Obj.magic - (Pulse_Typing_Env.fail - g - FStar_Pervasives_Native.None - "T_Admit: either no post or two posts") - | (FStar_Pervasives_Native.Some - uu___2, - FStar_Pervasives_Native.Some - uu___3) -> - Obj.magic - (Pulse_Typing_Env.fail - g - FStar_Pervasives_Native.None - "T_Admit: either no post or two posts") - | (FStar_Pervasives_Native.Some - post1, uu___2) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range + fun pre -> + fun pre_typing -> + fun post_hint -> + fun res_ppname -> + fun t -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Admit.fst" + (Prims.of_int (31)) (Prims.of_int (10)) + (Prims.of_int (31)) (Prims.of_int (63))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Admit.fst" + (Prims.of_int (31)) (Prims.of_int (66)) + (Prims.of_int (78)) (Prims.of_int (75))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing_Env.push_context g "check_admit" + t.Pulse_Syntax_Base.range2)) + (fun uu___ -> + (fun g1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (33)) (Prims.of_int (43)) + (Prims.of_int (33)) (Prims.of_int (49))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (31)) (Prims.of_int (66)) + (Prims.of_int (78)) (Prims.of_int (75))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> t.Pulse_Syntax_Base.term1)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | Pulse_Syntax_Base.Tm_Admit + { Pulse_Syntax_Base.ctag1 = c; + Pulse_Syntax_Base.u1 = uu___1; + Pulse_Syntax_Base.typ = t1; + Pulse_Syntax_Base.post3 = post;_} + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (35)) + (Prims.of_int (10)) + (Prims.of_int (35)) + (Prims.of_int (17))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (35)) + (Prims.of_int (20)) + (Prims.of_int (78)) + (Prims.of_int (75))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + Pulse_Typing_Env.fresh g1)) + (fun uu___2 -> + (fun x -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (36)) + (Prims.of_int (11)) + (Prims.of_int (36)) + (Prims.of_int (20))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (36)) + (Prims.of_int (23)) + (Prims.of_int (78)) + (Prims.of_int (75))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + Pulse_Syntax_Base.v_as_nv + x)) + (fun uu___2 -> + (fun px -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (43)) + (Prims.of_int (6)) + (Prims.of_int (70)) + (Prims.of_int (9))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (71)) + (Prims.of_int (4)) + (Prims.of_int (78)) + (Prims.of_int (75))))) + (match + (post, + post_hint) + with + | (FStar_Pervasives_Native.None, + FStar_Pervasives_Native.None) + -> + Obj.magic + (Pulse_Typing_Env.fail + g1 + FStar_Pervasives_Native.None + "could not find a post annotation on admit, please add one") + | (FStar_Pervasives_Native.Some + post1, + FStar_Pervasives_Native.Some + post2) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (49)) + (Prims.of_int (10)) + (Prims.of_int (51)) + (Prims.of_int (43))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (48)) + (Prims.of_int (8)) + (Prims.of_int (51)) + (Prims.of_int (43))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (51)) + (Prims.of_int (13)) + (Prims.of_int (51)) + (Prims.of_int (42))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (49)) + (Prims.of_int (10)) + (Prims.of_int (51)) + (Prims.of_int (43))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + post2.Pulse_Typing.post)) + (fun + uu___2 -> + (fun + uu___2 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (49)) + (Prims.of_int (10)) + (Prims.of_int (51)) + (Prims.of_int (43))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (49)) + (Prims.of_int (10)) + (Prims.of_int (51)) + (Prims.of_int (43))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (50)) + (Prims.of_int (13)) + (Prims.of_int (50)) + (Prims.of_int (37))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + post1)) + (fun + uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + fun x1 -> + Prims.strcat + (Prims.strcat + "found two post annotations on admit: " + (Prims.strcat + uu___3 + " and ")) + (Prims.strcat + x1 + ", please remove one"))))) + (fun + uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + uu___3 + uu___2)))) + uu___2))) + (fun + uu___2 -> + (fun + uu___2 -> + Obj.magic + (Pulse_Typing_Env.fail + g1 + FStar_Pervasives_Native.None + uu___2)) + uu___2)) + | (FStar_Pervasives_Native.Some + post1, + uu___2) + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Admit.fst" - (Prims.of_int (44)) + (Prims.of_int (54)) (Prims.of_int (32)) - (Prims.of_int (44)) + (Prims.of_int (54)) (Prims.of_int (50))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Admit.fst" - (Prims.of_int (43)) + (Prims.of_int (53)) (Prims.of_int (23)) - (Prims.of_int (49)) + (Prims.of_int (59)) (Prims.of_int (49))))) - (Obj.magic - (Pulse_Checker_Pure.check_universe - g t1)) - (fun uu___3 -> - (fun uu___3 - -> - match uu___3 - with - | - Prims.Mkdtuple2 + (Obj.magic + (Pulse_Checker_Pure.check_universe + g1 t1)) + (fun + uu___3 -> + (fun + uu___3 -> + match uu___3 + with + | + Prims.Mkdtuple2 (u, t_typing) -> @@ -153,17 +296,17 @@ let (check_admit : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Admit.fst" - (Prims.of_int (45)) + (Prims.of_int (55)) (Prims.of_int (26)) - (Prims.of_int (45)) + (Prims.of_int (55)) (Prims.of_int (46))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Admit.fst" - (Prims.of_int (45)) - (Prims.of_int (49)) + (Prims.of_int (55)) (Prims.of_int (49)) + (Prims.of_int (59)) (Prims.of_int (49))))) (FStar_Tactics_Effect.lift_div_tac (fun @@ -181,22 +324,22 @@ let (check_admit : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Admit.fst" - (Prims.of_int (47)) + (Prims.of_int (57)) (Prims.of_int (12)) - (Prims.of_int (47)) + (Prims.of_int (57)) (Prims.of_int (92))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Admit.fst" - (Prims.of_int (45)) - (Prims.of_int (49)) + (Prims.of_int (55)) (Prims.of_int (49)) + (Prims.of_int (59)) (Prims.of_int (49))))) (Obj.magic (Pulse_Checker_Pure.check_term_with_expected_type (Pulse_Typing_Env.push_binding - g x + g1 x (FStar_Pervasives_Native.fst px) t1) post_opened @@ -219,46 +362,49 @@ let (check_admit : post2, ()))))) uu___4))) - uu___3)) - | (uu___2, - FStar_Pervasives_Native.Some - post1) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range + uu___3)) + | (uu___2, + FStar_Pervasives_Native.Some + post1) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Admit.fst" - (Prims.of_int (52)) + (Prims.of_int (62)) (Prims.of_int (33)) - (Prims.of_int (52)) + (Prims.of_int (62)) (Prims.of_int (37))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Admit.fst" - (Prims.of_int (53)) + (Prims.of_int (63)) (Prims.of_int (8)) - (Prims.of_int (60)) + (Prims.of_int (70)) (Prims.of_int (9))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___3 - -> post1)) - (fun uu___3 -> - (fun post2 -> - if + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + post1)) + (fun + uu___3 -> + (fun + post2 -> + if FStar_Set.mem x (Pulse_Syntax_Naming.freevars post2.Pulse_Typing.post) - then + then Obj.magic (Obj.repr (Pulse_Typing_Env.fail - g + g1 FStar_Pervasives_Native.None - "Unexpected freevar clash in Tm_Admit")) - else + "Impossible: unexpected freevar clash in Tm_Admit, please file a bug-report")) + else Obj.magic (Obj.repr (FStar_Tactics_Effect.lift_div_tac @@ -271,26 +417,96 @@ let (check_admit : (Pulse_Syntax_Naming.open_term_nv post2.Pulse_Typing.post px), ()))))) - uu___3))) - (fun res -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - match res with - | FStar_Pervasives.Mkdtuple5 - (t2, u, - t_typing, - post_opened, - post_typing) - -> - FStar_Pervasives.Mkdtuple3 - ((Pulse_Typing.wr - (Pulse_Syntax_Base.Tm_Admit + uu___3))) + (fun uu___2 + -> + (fun res + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (72)) + (Prims.of_int (55)) + (Prims.of_int (72)) + (Prims.of_int (58))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (71)) + (Prims.of_int (4)) + (Prims.of_int (78)) + (Prims.of_int (75))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___2 -> + res)) + (fun + uu___2 -> + (fun + uu___2 -> + match uu___2 + with + | + FStar_Pervasives.Mkdtuple5 + (t2, u, + t_typing, + post_opened, + post_typing) + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (73)) + (Prims.of_int (13)) + (Prims.of_int (73)) + (Prims.of_int (37))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (73)) + (Prims.of_int (40)) + (Prims.of_int (78)) + (Prims.of_int (75))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + Pulse_Syntax_Naming.close_term + post_opened + x)) + (fun + uu___3 -> + (fun + post1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (74)) + (Prims.of_int (21)) + (Prims.of_int (74)) + (Prims.of_int (37))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (76)) + (Prims.of_int (65)) + (Prims.of_int (78)) + (Prims.of_int (75))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> { - Pulse_Syntax_Base.ctag1 - = c; - Pulse_Syntax_Base.u1 - = - ({ Pulse_Syntax_Base.u = u; Pulse_Syntax_Base.res @@ -298,74 +514,96 @@ let (check_admit : Pulse_Syntax_Base.pre = pre; Pulse_Syntax_Base.post + = post1 + })) + (fun + uu___3 -> + (fun s -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (77)) + (Prims.of_int (10)) + (Prims.of_int (77)) + (Prims.of_int (67))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (78)) + (Prims.of_int (2)) + (Prims.of_int (78)) + (Prims.of_int (75))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + Pulse_Typing.T_Admit + (g1, s, + c, + (Pulse_Typing.STC + (g1, s, + x, (), + (), ()))))) + (fun + uu___3 -> + (fun d -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (78)) + (Prims.of_int (18)) + (Prims.of_int (78)) + (Prims.of_int (57))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Admit.fst" + (Prims.of_int (78)) + (Prims.of_int (2)) + (Prims.of_int (78)) + (Prims.of_int (75))))) + (Obj.magic + (Pulse_Checker_Prover.try_frame_pre + g pre () + (Pulse_Typing.wr + (Pulse_Syntax_Base.Tm_Admit + { + Pulse_Syntax_Base.ctag1 + = c; + Pulse_Syntax_Base.u1 = - (Pulse_Syntax_Naming.close_term - post_opened - x) - }.Pulse_Syntax_Base.u); + (s.Pulse_Syntax_Base.u); Pulse_Syntax_Base.typ = - ({ - Pulse_Syntax_Base.u - = u; - Pulse_Syntax_Base.res - = t2; - Pulse_Syntax_Base.pre - = pre; - Pulse_Syntax_Base.post - = - (Pulse_Syntax_Naming.close_term - post_opened - x) - }.Pulse_Syntax_Base.res); + (s.Pulse_Syntax_Base.res); Pulse_Syntax_Base.post3 = FStar_Pervasives_Native.None - })), - (Pulse_Typing.comp_admit - c - { - Pulse_Syntax_Base.u - = u; - Pulse_Syntax_Base.res - = t2; - Pulse_Syntax_Base.pre - = pre; - Pulse_Syntax_Base.post - = - (Pulse_Syntax_Naming.close_term - post_opened - x) - }), - (Pulse_Typing.T_Admit - (g, - { - Pulse_Syntax_Base.u - = u; - Pulse_Syntax_Base.res - = t2; - Pulse_Syntax_Base.pre - = pre; - Pulse_Syntax_Base.post - = - (Pulse_Syntax_Naming.close_term - post_opened - x) - }, c, - (Pulse_Typing.STC - (g, - { - Pulse_Syntax_Base.u - = u; - Pulse_Syntax_Base.res - = t2; - Pulse_Syntax_Base.pre - = pre; - Pulse_Syntax_Base.post - = - (Pulse_Syntax_Naming.close_term - post_opened - x) - }, x, (), - (), ()))))))))) - uu___2))) uu___2))) uu___) \ No newline at end of file + })) + (Pulse_Typing.comp_admit + c s) d + res_ppname)) + (fun + uu___3 -> + (fun + uu___3 -> + Obj.magic + (Pulse_Checker_Prover.prove_post_hint + g pre + uu___3 + post_hint + t2.Pulse_Syntax_Base.range1)) + uu___3))) + uu___3))) + uu___3))) + uu___3))) + uu___2))) + uu___2))) + uu___2))) uu___2))) + uu___))) uu___) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Checker_AssertWithBinders.ml b/src/ocaml/plugin/generated/Pulse_Checker_AssertWithBinders.ml index 138c1fcde..3b0fd6640 100644 --- a/src/ocaml/plugin/generated/Pulse_Checker_AssertWithBinders.ml +++ b/src/ocaml/plugin/generated/Pulse_Checker_AssertWithBinders.ml @@ -9,25 +9,169 @@ let (debug_log : (unit -> (Prims.string, unit) FStar_Tactics_Effect.tac_repr) -> (unit, unit) FStar_Tactics_Effect.tac_repr) = Pulse_Typing.debug_log "with_binders" -let (instantiate_binders_with_fresh_names : +let option_must : + 'a . + 'a FStar_Pervasives_Native.option -> + Prims.string -> ('a, unit) FStar_Tactics_Effect.tac_repr + = + fun uu___1 -> + fun uu___ -> + (fun f -> + fun msg -> + match f with + | FStar_Pervasives_Native.Some x -> + Obj.magic (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> x)) + | FStar_Pervasives_Native.None -> + Obj.magic (FStar_Tactics_V2_Derived.fail msg)) uu___1 uu___ +let rec (refl_abs_binders : + FStar_Reflection_Types.term -> + Pulse_Syntax_Base.binder Prims.list -> + (Pulse_Syntax_Base.binder Prims.list, unit) + FStar_Tactics_Effect.tac_repr) + = + fun uu___1 -> + fun uu___ -> + (fun t -> + fun acc -> + match FStar_Reflection_V2_Builtins.inspect_ln t with + | FStar_Reflection_V2_Data.Tv_Abs (b, body) -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (34)) (Prims.of_int (25)) + (Prims.of_int (34)) (Prims.of_int (43))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (33)) (Prims.of_int (20)) + (Prims.of_int (39)) (Prims.of_int (87))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + FStar_Reflection_V2_Builtins.inspect_binder b)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | { FStar_Reflection_V2_Data.sort2 = sort; + FStar_Reflection_V2_Data.qual = uu___1; + FStar_Reflection_V2_Data.attrs = uu___2; + FStar_Reflection_V2_Data.ppname2 = ppname;_} + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (35)) + (Prims.of_int (15)) + (Prims.of_int (37)) + (Prims.of_int (33))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (38)) + (Prims.of_int (4)) + (Prims.of_int (39)) + (Prims.of_int (87))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (36)) + (Prims.of_int (6)) + (Prims.of_int (37)) + (Prims.of_int (33))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (35)) + (Prims.of_int (15)) + (Prims.of_int (37)) + (Prims.of_int (33))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (37)) + (Prims.of_int (9)) + (Prims.of_int (37)) + (Prims.of_int (32))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (FStar_Tactics_V2_Builtins.term_to_string + sort)) + (fun uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___4 -> + Prims.strcat + "Failed to readback elaborated binder sort " + (Prims.strcat + uu___3 + " in refl_abs_binders"))))) + (fun uu___3 -> + (fun uu___3 -> + Obj.magic + (option_must + (Pulse_Readback.readback_ty + sort) uu___3)) + uu___3))) + (fun uu___3 -> + (fun sort1 -> + Obj.magic + (refl_abs_binders body + ({ + Pulse_Syntax_Base.binder_ty + = sort1; + Pulse_Syntax_Base.binder_ppname + = + (Pulse_Syntax_Base.mk_ppname + ppname + (Pulse_RuntimeUtils.range_of_term + t)) + } :: acc))) uu___3))) uu___))) + | uu___ -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> FStar_List_Tot_Base.rev acc)))) uu___1 + uu___ +let (infer_binder_types : Pulse_Typing_Env.env -> - FStar_Reflection_Types.term -> - ((Pulse_Syntax_Base.nvar Prims.list * FStar_Reflection_Types.term), - unit) FStar_Tactics_Effect.tac_repr) + Pulse_Syntax_Base.binder Prims.list -> + Pulse_Syntax_Base.vprop -> + (Pulse_Syntax_Base.binder Prims.list, unit) + FStar_Tactics_Effect.tac_repr) = - fun g -> - fun top -> - let rec aux uu___2 uu___1 uu___ = - (fun g1 -> - fun vars -> - fun t -> - match FStar_Reflection_V2_Builtins.inspect_ln t with - | FStar_Reflection_V2_Data.Tv_Unknown -> + fun uu___2 -> + fun uu___1 -> + fun uu___ -> + (fun g -> + fun bs -> + fun v -> + match bs with + | [] -> Obj.magic (Obj.repr - (FStar_Tactics_V2_Derived.fail - "Impossible: instantiate_binders_with_fresh_names got an unknown term")) - | FStar_Reflection_V2_Data.Tv_Abs (b, body) -> + (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> []))) + | uu___ -> Obj.magic (Obj.repr (FStar_Tactics_Effect.tac_bind @@ -35,99 +179,229 @@ let (instantiate_binders_with_fresh_names : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (26)) (Prims.of_int (21)) - (Prims.of_int (26)) (Prims.of_int (39))))) + (Prims.of_int (47)) (Prims.of_int (13)) + (Prims.of_int (47)) (Prims.of_int (24))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (26)) (Prims.of_int (42)) - (Prims.of_int (32)) (Prims.of_int (27))))) + (Prims.of_int (48)) (Prims.of_int (4)) + (Prims.of_int (72)) (Prims.of_int (106))))) (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - FStar_Reflection_V2_Builtins.inspect_binder - b)) - (fun uu___ -> - (fun bv -> + (fun uu___1 -> Pulse_Elaborate_Pure.elab_term v)) + (fun uu___1 -> + (fun tv -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (27)) - (Prims.of_int (20)) - (Prims.of_int (27)) - (Prims.of_int (27))))) + (Prims.of_int (48)) + (Prims.of_int (4)) + (Prims.of_int (51)) + (Prims.of_int (57))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (27)) - (Prims.of_int (30)) - (Prims.of_int (32)) - (Prims.of_int (27))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - Pulse_Typing_Env.fresh g1)) - (fun uu___ -> - (fun x -> + (Prims.of_int (51)) + (Prims.of_int (58)) + (Prims.of_int (72)) + (Prims.of_int (106))))) + (if Prims.op_Negation (is_host_term tv) + then + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (50)) + (Prims.of_int (11)) + (Prims.of_int (51)) + (Prims.of_int (57))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (49)) + (Prims.of_int (9)) + (Prims.of_int (51)) + (Prims.of_int (57))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (51)) + (Prims.of_int (35)) + (Prims.of_int (51)) + (Prims.of_int (56))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (50)) + (Prims.of_int (11)) + (Prims.of_int (51)) + (Prims.of_int (57))))) + (Obj.magic + (FStar_Tactics_V2_Builtins.term_to_string + tv)) + (fun uu___1 -> + (fun uu___1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (50)) + (Prims.of_int (11)) + (Prims.of_int (51)) + (Prims.of_int (57))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (50)) + (Prims.of_int (11)) + (Prims.of_int (51)) + (Prims.of_int (57))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (51)) + (Prims.of_int (14)) + (Prims.of_int (51)) + (Prims.of_int (34))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + v)) + (fun + uu___2 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + fun x -> + Prims.strcat + (Prims.strcat + "assert.infer_binder_types: elaborated " + (Prims.strcat + uu___2 + " to ")) + (Prims.strcat + x + ", which failed the host term check"))))) + (fun uu___2 + -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + uu___2 + uu___1)))) + uu___1))) + (fun uu___1 -> + (fun uu___1 -> + Obj.magic + (Pulse_Typing_Env.fail + g + (FStar_Pervasives_Native.Some + (v.Pulse_Syntax_Base.range1)) + uu___1)) uu___1))) + else + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> ())))) + (fun uu___1 -> + (fun uu___1 -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (28)) - (Prims.of_int (25)) - (Prims.of_int (28)) - (Prims.of_int (67))))) + (Prims.of_int (53)) + (Prims.of_int (6)) + (Prims.of_int (59)) + (Prims.of_int (20))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (28)) - (Prims.of_int (70)) - (Prims.of_int (32)) - (Prims.of_int (27))))) + (Prims.of_int (60)) + (Prims.of_int (6)) + (Prims.of_int (72)) + (Prims.of_int (106))))) (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - Pulse_Syntax_Base.mk_ppname - bv.FStar_Reflection_V2_Data.ppname2 - (Pulse_RuntimeUtils.range_of_term - t))) - (fun uu___ -> - (fun ppname -> + (fun uu___2 -> + fun b -> + FStar_Reflection_V2_Builtins.pack_binder + { + FStar_Reflection_V2_Data.sort2 + = + (Pulse_Elaborate_Pure.elab_term + b.Pulse_Syntax_Base.binder_ty); + FStar_Reflection_V2_Data.qual + = + FStar_Reflection_V2_Data.Q_Explicit; + FStar_Reflection_V2_Data.attrs + = []; + FStar_Reflection_V2_Data.ppname2 + = + ((b.Pulse_Syntax_Base.binder_ppname).Pulse_Syntax_Base.name) + })) + (fun uu___2 -> + (fun as_binder -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (29)) - (Prims.of_int (20)) - (Prims.of_int (29)) - (Prims.of_int (88))))) + (Prims.of_int (62)) + (Prims.of_int (6)) + (Prims.of_int (67)) + (Prims.of_int (10))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (29)) - (Prims.of_int (91)) - (Prims.of_int (32)) - (Prims.of_int (27))))) + (Prims.of_int (68)) + (Prims.of_int (6)) + (Prims.of_int (72)) + (Prims.of_int (106))))) (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - Pulse_Typing_Env.push_binding - g1 x - ppname + (fun uu___2 -> + FStar_List_Tot_Base.fold_right ( - Pulse_Syntax_Base.with_range - Pulse_Syntax_Base.Tm_Unknown - (Pulse_RuntimeUtils.range_of_term - t)))) - (fun uu___ -> - (fun g2 -> + fun b -> + fun tv1 + -> + FStar_Reflection_V2_Builtins.pack_ln + (FStar_Reflection_V2_Data.Tv_Abs + ((as_binder + b), tv1))) + bs tv)) + (fun uu___2 -> + (fun + abstraction + -> Obj.magic ( FStar_Tactics_Effect.tac_bind @@ -135,654 +409,577 @@ let (instantiate_binders_with_fresh_names : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (69)) (Prims.of_int (30)) - (Prims.of_int (23)) - (Prims.of_int (30)) - (Prims.of_int (40))))) + (Prims.of_int (69)) + (Prims.of_int (92))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (30)) - (Prims.of_int (43)) - (Prims.of_int (32)) - (Prims.of_int (27))))) - (FStar_Tactics_Effect.lift_div_tac + (Prims.of_int (68)) + (Prims.of_int (6)) + (Prims.of_int (72)) + (Prims.of_int (106))))) + (Obj.magic + (Pulse_Checker_Pure.instantiate_term_implicits + g + (Pulse_Syntax_Base.tm_fstar + abstraction + v.Pulse_Syntax_Base.range1))) + (fun + uu___2 -> + (fun + uu___2 -> + match uu___2 + with + | + (inst_abstraction, + uu___3) + -> + (match + inst_abstraction.Pulse_Syntax_Base.t + with + | + Pulse_Syntax_Base.Tm_FStar + t -> + Obj.magic + (Obj.repr + (refl_abs_binders + t [])) + | + uu___4 -> + Obj.magic + (Obj.repr + (FStar_Tactics_V2_Derived.fail + "Impossible: instantiated abstraction is not embedded F* term, please file a bug-report")))) + uu___2))) + uu___2))) + uu___2))) uu___1))) + uu___1)))) uu___2 uu___1 uu___ +let rec (open_binders : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.binder Prims.list -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.st_term -> + ((Pulse_Typing_Env.env, Pulse_Syntax_Base.term, + Pulse_Syntax_Base.st_term) FStar_Pervasives.dtuple3, + unit) FStar_Tactics_Effect.tac_repr) + = + fun uu___4 -> + fun uu___3 -> + fun uu___2 -> + fun uu___1 -> + fun uu___ -> + (fun g -> + fun bs -> + fun uvs -> + fun v -> + fun body -> + match bs with + | [] -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + FStar_Pervasives.Mkdtuple3 + (uvs, v, body)))) + | b::bs1 -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (81)) + (Prims.of_int (12)) + (Prims.of_int (81)) + (Prims.of_int (58))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (81)) + (Prims.of_int (61)) + (Prims.of_int (89)) + (Prims.of_int (77))))) + (Obj.magic + (Pulse_Checker_Pure.check_universe + (Pulse_Typing_Env.push_env g uvs) + b.Pulse_Syntax_Base.binder_ty)) + (fun uu___ -> + (fun uu___ -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (82)) + (Prims.of_int (12)) + (Prims.of_int (82)) + (Prims.of_int (34))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (82)) + (Prims.of_int (37)) + (Prims.of_int (89)) + (Prims.of_int (77))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + Pulse_Typing_Env.fresh + (Pulse_Typing_Env.push_env + g uvs))) + (fun uu___1 -> + (fun x -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (83)) + (Prims.of_int (13)) + (Prims.of_int (83)) + (Prims.of_int (69))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (83)) + (Prims.of_int (72)) + (Prims.of_int (89)) + (Prims.of_int (77))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + [Pulse_Syntax_Naming.DT + (Prims.int_zero, + ( + Pulse_Syntax_Pure.tm_var + { + Pulse_Syntax_Base.nm_index + = x; + Pulse_Syntax_Base.nm_ppname + = + (b.Pulse_Syntax_Base.binder_ppname) + }))])) + (fun uu___1 -> + (fun ss -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + ( + FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (84)) + (Prims.of_int (13)) + (Prims.of_int (86)) + (Prims.of_int (45))))) + ( + FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (86)) + (Prims.of_int (48)) + (Prims.of_int (89)) + (Prims.of_int (77))))) + ( + FStar_Tactics_Effect.lift_div_tac (fun - uu___ -> - (ppname, - x) :: - vars)) + uu___1 -> + FStar_List_Tot_Base.mapi + (fun i -> + fun b1 -> + Pulse_Syntax_Naming.subst_binder + b1 + (Pulse_Syntax_Naming.shift_subst_n + i ss)) + bs1)) + ( + fun + uu___1 -> + (fun bs2 + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (87)) + (Prims.of_int (12)) + (Prims.of_int (87)) + (Prims.of_int (57))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (87)) + (Prims.of_int (60)) + (Prims.of_int (89)) + (Prims.of_int (77))))) + (FStar_Tactics_Effect.lift_div_tac (fun - uu___ -> + uu___1 -> + Pulse_Syntax_Naming.subst_term + v + (Pulse_Syntax_Naming.shift_subst_n + (FStar_List_Tot_Base.length + bs2) ss))) (fun - vars1 -> + uu___1 -> + (fun v1 + -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (31)) - (Prims.of_int (23)) - (Prims.of_int (31)) - (Prims.of_int (42))))) + (Prims.of_int (88)) + (Prims.of_int (15)) + (Prims.of_int (88)) + (Prims.of_int (66))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (32)) - (Prims.of_int (12)) - (Prims.of_int (32)) - (Prims.of_int (27))))) + (Prims.of_int (89)) + (Prims.of_int (4)) + (Prims.of_int (89)) + (Prims.of_int (77))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___ -> - FStar_Reflection_Typing.open_term - body x)) + uu___1 -> + Pulse_Syntax_Naming.subst_st_term + body + (Pulse_Syntax_Naming.shift_subst_n + (FStar_List_Tot_Base.length + bs2) ss))) (fun - uu___ -> + uu___1 -> (fun body1 -> Obj.magic - (aux g2 - vars1 - body1)) - uu___))) - uu___))) - uu___))) - uu___))) uu___))) uu___))) - | uu___ -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> ((FStar_List_Tot_Base.rev vars), t))))) - uu___2 uu___1 uu___ in - aux g [] top -let (instantiate_names_with_uvars : - Pulse_Syntax_Base.nvar Prims.list -> - Pulse_Syntax_Base.term -> + (open_binders + g bs2 + (Pulse_Typing_Env.push_binding + uvs x + b.Pulse_Syntax_Base.binder_ppname + b.Pulse_Syntax_Base.binder_ty) + v1 body1)) + uu___1))) + uu___1))) + uu___1))) + uu___1))) + uu___1))) uu___)))) uu___4 + uu___3 uu___2 uu___1 uu___ +let (close_binders : + (Pulse_Syntax_Base.var * Pulse_Syntax_Base.typ) Prims.list -> + Pulse_Syntax_Base.term -> Pulse_Syntax_Base.term) + = + fun bs -> + fun t -> + let r = + FStar_List_Tot_Base.fold_right + (fun uu___ -> + fun uu___1 -> + match (uu___, uu___1) with + | ((x, uu___2), (n, t1)) -> + let ss = [Pulse_Syntax_Naming.ND (x, Prims.int_zero)] in + ((n + Prims.int_one), + (Pulse_Syntax_Naming.subst_term t1 + (Pulse_Syntax_Naming.shift_subst_n n ss)))) bs + (Prims.int_zero, t) in + FStar_Pervasives_Native.snd r +let (unfold_defs : + Pulse_Typing_Env.env -> + Prims.string Prims.list FStar_Pervasives_Native.option -> Pulse_Syntax_Base.term -> - (((Pulse_Checker_Inference.uvar * Pulse_Syntax_Base.term) Prims.list - * Pulse_Syntax_Base.vprop * Pulse_Syntax_Base.vprop), - unit) FStar_Tactics_Effect.tac_repr) + (Pulse_Syntax_Base.term, unit) FStar_Tactics_Effect.tac_repr) = - fun xs -> - fun t0 -> - fun t1 -> + fun g -> + fun defs -> + fun t -> FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (41)) (Prims.of_int (6)) (Prims.of_int (47)) - (Prims.of_int (16))))) + (Prims.of_int (101)) (Prims.of_int (12)) + (Prims.of_int (101)) (Prims.of_int (23))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (40)) (Prims.of_int (3)) (Prims.of_int (49)) - (Prims.of_int (49))))) - (Obj.magic - (FStar_Tactics_Util.fold_right - (fun uu___ -> - fun uu___1 -> - match (uu___, uu___1) with - | ((p, x), (subst, out)) -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (42)) (Prims.of_int (20)) - (Prims.of_int (42)) (Prims.of_int (34))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (41)) (Prims.of_int (45)) - (Prims.of_int (45)) (Prims.of_int (18))))) - (Obj.magic (Pulse_Checker_Inference.gen_uvar p)) - (fun uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - match uu___2 with - | (uv, t) -> - (((Pulse_Syntax_Naming.NT (x, t)) :: - subst), ((uv, t) :: out))))) xs - ([], []))) + (Prims.of_int (101)) (Prims.of_int (26)) + (Prims.of_int (122)) (Prims.of_int (89))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> Pulse_Elaborate_Pure.elab_term t)) (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - match uu___ with - | (subst, out) -> - (out, (Pulse_Syntax_Naming.subst_term t0 subst), - (Pulse_Syntax_Naming.subst_term t1 subst)))) -let (instantiate_binders_with_uvars : - FStar_Reflection_Types.term -> - (((Pulse_Checker_Inference.uvar * Pulse_Syntax_Base.term) Prims.list * - Pulse_Syntax_Base.vprop), - unit) FStar_Tactics_Effect.tac_repr) - = - fun top -> - let rec aux uu___1 uu___ = - (fun uvars -> - fun t -> - match FStar_Reflection_V2_Builtins.inspect_ln t with - | FStar_Reflection_V2_Data.Tv_Unknown -> - Obj.magic - (Obj.repr - (FStar_Tactics_V2_Derived.fail - "Impossible: instantiate_binders_with_uvars got an unknown term")) - | FStar_Reflection_V2_Data.Tv_Abs (b, body) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (56)) (Prims.of_int (21)) - (Prims.of_int (56)) (Prims.of_int (39))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (56)) (Prims.of_int (42)) - (Prims.of_int (60)) (Prims.of_int (26))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - FStar_Reflection_V2_Builtins.inspect_binder b)) - (fun uu___ -> - (fun bv -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (57)) - (Prims.of_int (24)) - (Prims.of_int (57)) - (Prims.of_int (79))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (57)) - (Prims.of_int (16)) - (Prims.of_int (57)) - (Prims.of_int (21))))) - (Obj.magic - (Pulse_Checker_Inference.gen_uvar - (Pulse_Syntax_Base.mk_ppname - bv.FStar_Reflection_V2_Data.ppname2 - (Pulse_RuntimeUtils.range_of_term - t)))) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | (uv, t1) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (58)) - (Prims.of_int (24)) - (Prims.of_int (58)) - (Prims.of_int (38))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (58)) - (Prims.of_int (41)) - (Prims.of_int (60)) - (Prims.of_int (26))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> (uv, t1) - :: uvars)) - (fun uu___1 -> - (fun uvars1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (59)) - (Prims.of_int (23)) - (Prims.of_int (59)) - (Prims.of_int (63))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (60)) - (Prims.of_int (12)) - (Prims.of_int (60)) - (Prims.of_int (26))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - FStar_Reflection_Typing.subst_term - body - ( - Pulse_Syntax_Naming.rt_subst - [ - Pulse_Syntax_Naming.DT - (Prims.int_zero, - t1)]))) - (fun uu___1 -> - (fun body1 -> - Obj.magic - ( - aux - uvars1 - body1)) - uu___1))) - uu___1))) uu___))) - uu___))) - | uu___ -> - Obj.magic - (Obj.repr - (match Pulse_Readback.readback_ty t with - | FStar_Pervasives_Native.None -> - FStar_Tactics_V2_Derived.fail - "Failed to readback elaborated assertion" - | FStar_Pervasives_Native.Some t1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - ((FStar_List_Tot_Base.rev uvars), t1))))) - uu___1 uu___ in - aux [] top -let (infer_binder_types : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.binder Prims.list -> - Pulse_Syntax_Base.vprop -> - ((Pulse_Syntax_Base.nvar Prims.list * FStar_Reflection_Types.term), - unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun bs -> - fun v -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (70)) (Prims.of_int (13)) - (Prims.of_int (70)) (Prims.of_int (24))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (71)) (Prims.of_int (4)) (Prims.of_int (98)) - (Prims.of_int (82))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> Pulse_Elaborate_Pure.elab_term v)) - (fun uu___ -> - (fun tv -> + (fun t1 -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (71)) (Prims.of_int (4)) - (Prims.of_int (72)) (Prims.of_int (94))))) + (Prims.of_int (102)) (Prims.of_int (18)) + (Prims.of_int (102)) (Prims.of_int (33))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (72)) (Prims.of_int (95)) - (Prims.of_int (98)) (Prims.of_int (82))))) - (if Prims.op_Negation (is_host_term tv) - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (72)) - (Prims.of_int (31)) - (Prims.of_int (72)) - (Prims.of_int (94))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (72)) - (Prims.of_int (9)) - (Prims.of_int (72)) - (Prims.of_int (94))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (72)) - (Prims.of_int (73)) - (Prims.of_int (72)) - (Prims.of_int (93))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "prims.fst" - (Prims.of_int (590)) - (Prims.of_int (19)) - (Prims.of_int (590)) - (Prims.of_int (31))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - v)) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - Prims.strcat - "Cannot infer type of " - (Prims.strcat uu___ ""))))) - (fun uu___ -> - (fun uu___ -> - Obj.magic - (Pulse_Typing_Env.fail g - (FStar_Pervasives_Native.Some - (v.Pulse_Syntax_Base.range1)) - uu___)) uu___))) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> ())))) + (Prims.of_int (101)) (Prims.of_int (26)) + (Prims.of_int (122)) (Prims.of_int (89))))) + (Obj.magic + (FStar_Tactics_V2_SyntaxHelpers.collect_app t1)) (fun uu___ -> (fun uu___ -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (74)) - (Prims.of_int (8)) - (Prims.of_int (80)) - (Prims.of_int (22))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (81)) - (Prims.of_int (6)) - (Prims.of_int (98)) - (Prims.of_int (82))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - fun b -> - FStar_Reflection_V2_Builtins.pack_binder - { - FStar_Reflection_V2_Data.sort2 = - (Pulse_Elaborate_Pure.elab_term - b.Pulse_Syntax_Base.binder_ty); - FStar_Reflection_V2_Data.qual = - FStar_Reflection_V2_Data.Q_Explicit; - FStar_Reflection_V2_Data.attrs = - []; - FStar_Reflection_V2_Data.ppname2 - = - ((b.Pulse_Syntax_Base.binder_ppname).Pulse_Syntax_Base.name) - })) - (fun uu___1 -> - (fun as_binder -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (83)) - (Prims.of_int (8)) - (Prims.of_int (88)) - (Prims.of_int (14))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (89)) - (Prims.of_int (6)) - (Prims.of_int (98)) - (Prims.of_int (82))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - FStar_List_Tot_Base.fold_right - (fun b -> - fun tv1 -> - FStar_Reflection_V2_Builtins.pack_ln - (FStar_Reflection_V2_Data.Tv_Abs - ((as_binder b), - tv1))) bs tv)) - (fun uu___1 -> - (fun abstraction -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (91)) - (Prims.of_int (30)) - (Prims.of_int (91)) - (Prims.of_int (92))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (89)) - (Prims.of_int (6)) - (Prims.of_int (98)) - (Prims.of_int (82))))) - (Obj.magic - (Pulse_Checker_Pure.instantiate_term_implicits - g - (Pulse_Syntax_Base.tm_fstar - abstraction - v.Pulse_Syntax_Base.range1))) - (fun uu___1 -> - (fun uu___1 -> - match uu___1 with - | (inst_abstraction, - uu___2) -> - (match - inst_abstraction.Pulse_Syntax_Base.t - with - | Pulse_Syntax_Base.Tm_FStar - t -> - Obj.magic - (Obj.repr - (instantiate_binders_with_fresh_names - g t)) - | t -> - Obj.magic - (Obj.repr - (match bs - with - | - [] -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - ([], - (Pulse_Elaborate_Pure.elab_term - inst_abstraction))) - | - uu___3 -> - FStar_Tactics_V2_Derived.fail - "Impossible: Instantiated abstraction is not embedded F* term")))) - uu___1))) uu___1))) - uu___1))) uu___))) uu___) -let option_must : - 'a . - 'a FStar_Pervasives_Native.option -> - Prims.string -> ('a, unit) FStar_Tactics_Effect.tac_repr - = - fun uu___1 -> - fun uu___ -> - (fun f -> - fun msg -> - match f with - | FStar_Pervasives_Native.Some x -> - Obj.magic (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> x)) - | FStar_Pervasives_Native.None -> - Obj.magic (FStar_Tactics_V2_Derived.fail msg)) uu___1 uu___ -let (unfold_defs : - Pulse_Typing_Env.env -> - Prims.string Prims.list FStar_Pervasives_Native.option -> - FStar_Reflection_Types.term -> - (Pulse_Syntax_Base.term, unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun defs -> - fun t -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (107)) (Prims.of_int (18)) - (Prims.of_int (107)) (Prims.of_int (33))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (107)) (Prims.of_int (3)) - (Prims.of_int (124)) (Prims.of_int (97))))) - (Obj.magic (FStar_Tactics_V2_SyntaxHelpers.collect_app t)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | (head, uu___1) -> - (match FStar_Reflection_V2_Builtins.inspect_ln head with - | FStar_Reflection_V2_Data.Tv_FVar fv -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (111)) - (Prims.of_int (19)) - (Prims.of_int (111)) - (Prims.of_int (54))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (111)) - (Prims.of_int (57)) - (Prims.of_int (121)) - (Prims.of_int (10))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - FStar_String.concat "." - (FStar_Reflection_V2_Builtins.inspect_fv - fv))) - (fun uu___2 -> - (fun head1 -> + match uu___ with + | (head, uu___1) -> + (match FStar_Reflection_V2_Builtins.inspect_ln + head + with + | FStar_Reflection_V2_Data.Tv_FVar fv -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (113)) - (Prims.of_int (10)) - (Prims.of_int (115)) - (Prims.of_int (22))))) + (Prims.of_int (106)) + (Prims.of_int (19)) + (Prims.of_int (106)) + (Prims.of_int (54))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (116)) - (Prims.of_int (10)) - (Prims.of_int (121)) + (Prims.of_int (106)) + (Prims.of_int (57)) + (Prims.of_int (118)) (Prims.of_int (10))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___2 -> - match defs with - | FStar_Pervasives_Native.Some - defs1 -> defs1 - | FStar_Pervasives_Native.None - -> [])) + FStar_String.concat "." + (FStar_Reflection_V2_Builtins.inspect_fv + fv))) (fun uu___2 -> - (fun fully -> + (fun head1 -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (117)) - (Prims.of_int (17)) - (Prims.of_int (117)) - (Prims.of_int (57))))) + (Prims.of_int (108)) + (Prims.of_int (10)) + (Prims.of_int (110)) + (Prims.of_int (22))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (117)) - (Prims.of_int (60)) - (Prims.of_int (121)) + (Prims.of_int (111)) + (Prims.of_int (10)) + (Prims.of_int (118)) (Prims.of_int (10))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___2 -> - Pulse_RuntimeUtils.unfold_def - (Pulse_Typing_Env.fstar_env - g) head1 fully - t)) + match defs with + | FStar_Pervasives_Native.Some + defs1 -> defs1 + | FStar_Pervasives_Native.None + -> [])) (fun uu___2 -> - (fun rt -> + (fun fully -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (118)) + (Prims.of_int (112)) (Prims.of_int (17)) - (Prims.of_int (118)) - (Prims.of_int (83))))) + (Prims.of_int (112)) + (Prims.of_int (57))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (112)) + (Prims.of_int (60)) (Prims.of_int (118)) - (Prims.of_int (86)) - (Prims.of_int (121)) (Prims.of_int (10))))) - (Obj.magic - (option_must - rt - "Unexpected: reduction produced an ill-formed term")) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___2 + -> + Pulse_RuntimeUtils.unfold_def + (Pulse_Typing_Env.fstar_env + g) head1 + fully t1)) (fun uu___2 -> - (fun rt1 -> + (fun rt -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (119)) + (Prims.of_int (113)) (Prims.of_int (17)) - (Prims.of_int (119)) - (Prims.of_int (92))))) + (Prims.of_int (114)) + (Prims.of_int (76))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (114)) + (Prims.of_int (79)) + (Prims.of_int (118)) + (Prims.of_int (10))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (114)) + (Prims.of_int (10)) + (Prims.of_int (114)) + (Prims.of_int (76))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (113)) + (Prims.of_int (17)) + (Prims.of_int (114)) + (Prims.of_int (76))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (114)) + (Prims.of_int (55)) + (Prims.of_int (114)) + (Prims.of_int (75))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (FStar_Tactics_V2_Builtins.term_to_string + t1)) + (fun + uu___2 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + Prims.strcat + "unfolding " + (Prims.strcat + uu___2 + " returned None"))))) + (fun + uu___2 -> + (fun + uu___2 -> + Obj.magic + (option_must + rt uu___2)) + uu___2))) + (fun + uu___2 -> + (fun rt1 + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (115)) + (Prims.of_int (17)) + (Prims.of_int (116)) + (Prims.of_int (93))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) + (Prims.of_int (117)) (Prims.of_int (8)) - (Prims.of_int (121)) + (Prims.of_int (118)) (Prims.of_int (10))))) (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (116)) + (Prims.of_int (10)) + (Prims.of_int (116)) + (Prims.of_int (93))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (115)) + (Prims.of_int (17)) + (Prims.of_int (116)) + (Prims.of_int (93))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (116)) + (Prims.of_int (71)) + (Prims.of_int (116)) + (Prims.of_int (92))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (FStar_Tactics_V2_Builtins.term_to_string + rt1)) + (fun + uu___2 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + Prims.strcat + "error in reading back the unfolded term " + (Prims.strcat + uu___2 ""))))) + (fun + uu___2 -> + (fun + uu___2 -> + Obj.magic (option_must (Pulse_Readback.readback_ty rt1) - "Unexpected: unable to readback unfolded term")) + uu___2)) + uu___2))) (fun uu___2 -> (fun ty @@ -793,17 +990,17 @@ let (unfold_defs : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) + (Prims.of_int (117)) (Prims.of_int (8)) - (Prims.of_int (120)) + (Prims.of_int (117)) (Prims.of_int (157))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (119)) + (Prims.of_int (115)) (Prims.of_int (12)) - (Prims.of_int (119)) + (Prims.of_int (115)) (Prims.of_int (14))))) (Obj.magic (debug_log @@ -815,17 +1012,17 @@ let (unfold_defs : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) + (Prims.of_int (117)) (Prims.of_int (135)) - (Prims.of_int (120)) + (Prims.of_int (117)) (Prims.of_int (156))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) + (Prims.of_int (117)) (Prims.of_int (30)) - (Prims.of_int (120)) + (Prims.of_int (117)) (Prims.of_int (156))))) (Obj.magic (Pulse_Syntax_Printer.term_to_string @@ -840,17 +1037,17 @@ let (unfold_defs : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) + (Prims.of_int (117)) (Prims.of_int (30)) - (Prims.of_int (120)) + (Prims.of_int (117)) (Prims.of_int (156))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) + (Prims.of_int (117)) (Prims.of_int (30)) - (Prims.of_int (120)) + (Prims.of_int (117)) (Prims.of_int (156))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -858,17 +1055,17 @@ let (unfold_defs : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) + (Prims.of_int (117)) (Prims.of_int (113)) - (Prims.of_int (120)) + (Prims.of_int (117)) (Prims.of_int (134))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) + (Prims.of_int (117)) (Prims.of_int (30)) - (Prims.of_int (120)) + (Prims.of_int (117)) (Prims.of_int (156))))) (Obj.magic (FStar_Tactics_V2_Builtins.term_to_string @@ -883,17 +1080,17 @@ let (unfold_defs : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) + (Prims.of_int (117)) (Prims.of_int (30)) - (Prims.of_int (120)) + (Prims.of_int (117)) (Prims.of_int (156))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) + (Prims.of_int (117)) (Prims.of_int (30)) - (Prims.of_int (120)) + (Prims.of_int (117)) (Prims.of_int (156))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -901,9 +1098,9 @@ let (unfold_defs : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) + (Prims.of_int (117)) (Prims.of_int (92)) - (Prims.of_int (120)) + (Prims.of_int (117)) (Prims.of_int (112))))) (FStar_Sealed.seal (Obj.magic @@ -915,7 +1112,7 @@ let (unfold_defs : (Prims.of_int (44))))) (Obj.magic (FStar_Tactics_V2_Builtins.term_to_string - t)) + t1)) (fun uu___5 -> FStar_Tactics_Effect.lift_div_tac @@ -959,1339 +1156,214 @@ let (unfold_defs : ty)))) uu___2))) uu___2))) - uu___2))) uu___2))) - uu___2)) - | FStar_Reflection_V2_Data.Tv_UInst (fv, uu___2) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (111)) - (Prims.of_int (19)) - (Prims.of_int (111)) - (Prims.of_int (54))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (111)) - (Prims.of_int (57)) - (Prims.of_int (121)) - (Prims.of_int (10))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - FStar_String.concat "." - (FStar_Reflection_V2_Builtins.inspect_fv - fv))) - (fun uu___3 -> - (fun head1 -> + uu___2))) + uu___2))) uu___2)) + | FStar_Reflection_V2_Data.Tv_UInst + (fv, uu___2) -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (113)) - (Prims.of_int (10)) - (Prims.of_int (115)) - (Prims.of_int (22))))) + (Prims.of_int (106)) + (Prims.of_int (19)) + (Prims.of_int (106)) + (Prims.of_int (54))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (116)) - (Prims.of_int (10)) - (Prims.of_int (121)) + (Prims.of_int (106)) + (Prims.of_int (57)) + (Prims.of_int (118)) (Prims.of_int (10))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___3 -> - match defs with - | FStar_Pervasives_Native.Some - defs1 -> defs1 - | FStar_Pervasives_Native.None - -> [])) + FStar_String.concat "." + (FStar_Reflection_V2_Builtins.inspect_fv + fv))) (fun uu___3 -> - (fun fully -> + (fun head1 -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (117)) - (Prims.of_int (17)) - (Prims.of_int (117)) - (Prims.of_int (57))))) + (Prims.of_int (108)) + (Prims.of_int (10)) + (Prims.of_int (110)) + (Prims.of_int (22))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (117)) - (Prims.of_int (60)) - (Prims.of_int (121)) + (Prims.of_int (111)) + (Prims.of_int (10)) + (Prims.of_int (118)) (Prims.of_int (10))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___3 -> - Pulse_RuntimeUtils.unfold_def - (Pulse_Typing_Env.fstar_env - g) head1 fully - t)) + match defs with + | FStar_Pervasives_Native.Some + defs1 -> defs1 + | FStar_Pervasives_Native.None + -> [])) (fun uu___3 -> - (fun rt -> + (fun fully -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (118)) + (Prims.of_int (112)) (Prims.of_int (17)) - (Prims.of_int (118)) - (Prims.of_int (83))))) + (Prims.of_int (112)) + (Prims.of_int (57))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (112)) + (Prims.of_int (60)) (Prims.of_int (118)) - (Prims.of_int (86)) - (Prims.of_int (121)) (Prims.of_int (10))))) - (Obj.magic - (option_must - rt - "Unexpected: reduction produced an ill-formed term")) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___3 + -> + Pulse_RuntimeUtils.unfold_def + (Pulse_Typing_Env.fstar_env + g) head1 + fully t1)) (fun uu___3 -> - (fun rt1 -> + (fun rt -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (119)) + (Prims.of_int (113)) (Prims.of_int (17)) - (Prims.of_int (119)) - (Prims.of_int (92))))) + (Prims.of_int (114)) + (Prims.of_int (76))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) - (Prims.of_int (8)) - (Prims.of_int (121)) + (Prims.of_int (114)) + (Prims.of_int (79)) + (Prims.of_int (118)) (Prims.of_int (10))))) (Obj.magic - (option_must - (Pulse_Readback.readback_ty - rt1) - "Unexpected: unable to readback unfolded term")) - (fun - uu___3 -> - (fun ty - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) - (Prims.of_int (8)) - (Prims.of_int (120)) - (Prims.of_int (157))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (119)) - (Prims.of_int (12)) - (Prims.of_int (119)) - (Prims.of_int (14))))) - (Obj.magic - (debug_log - g - (fun - uu___3 -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) - (Prims.of_int (135)) - (Prims.of_int (120)) - (Prims.of_int (156))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) - (Prims.of_int (30)) - (Prims.of_int (120)) - (Prims.of_int (156))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - ty)) - (fun - uu___4 -> - (fun - uu___4 -> - Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) - (Prims.of_int (30)) - (Prims.of_int (120)) - (Prims.of_int (156))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) - (Prims.of_int (30)) - (Prims.of_int (120)) - (Prims.of_int (156))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind + (Prims.of_int (114)) + (Prims.of_int (10)) + (Prims.of_int (114)) + (Prims.of_int (76))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) (Prims.of_int (113)) - (Prims.of_int (120)) - (Prims.of_int (134))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) - (Prims.of_int (30)) - (Prims.of_int (120)) - (Prims.of_int (156))))) - (Obj.magic - (FStar_Tactics_V2_Builtins.term_to_string - rt1)) - (fun - uu___5 -> - (fun - uu___5 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) - (Prims.of_int (30)) - (Prims.of_int (120)) - (Prims.of_int (156))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) - (Prims.of_int (30)) - (Prims.of_int (120)) - (Prims.of_int (156))))) + (Prims.of_int (17)) + (Prims.of_int (114)) + (Prims.of_int (76))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (120)) - (Prims.of_int (92)) - (Prims.of_int (120)) - (Prims.of_int (112))))) + (Prims.of_int (114)) + (Prims.of_int (55)) + (Prims.of_int (114)) + (Prims.of_int (75))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "FStar.Printf.fst" - (Prims.of_int (121)) - (Prims.of_int (8)) - (Prims.of_int (123)) - (Prims.of_int (44))))) + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) (Obj.magic (FStar_Tactics_V2_Builtins.term_to_string - t)) + t1)) (fun - uu___6 -> + uu___3 -> FStar_Tactics_Effect.lift_div_tac (fun - uu___7 -> - fun x -> - fun x1 -> + uu___4 -> Prims.strcat + "unfolding " (Prims.strcat - (Prims.strcat - "Unfolded " - (Prims.strcat - uu___6 - " to F* term ")) - (Prims.strcat - x - " and readback as ")) - (Prims.strcat - x1 ""))))) - (fun - uu___6 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___7 -> - uu___6 - uu___5)))) - uu___5))) - (fun - uu___5 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___6 -> - uu___5 - uu___4)))) - uu___4)))) + uu___3 + " returned None"))))) (fun uu___3 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - ty)))) - uu___3))) - uu___3))) - uu___3))) uu___3))) - uu___3)) - | uu___2 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (124)) - (Prims.of_int (41)) - (Prims.of_int (124)) - (Prims.of_int (97))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (124)) - (Prims.of_int (6)) - (Prims.of_int (124)) - (Prims.of_int (97))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (124)) - (Prims.of_int (76)) - (Prims.of_int (124)) - (Prims.of_int (96))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "prims.fst" - (Prims.of_int (590)) - (Prims.of_int (19)) - (Prims.of_int (590)) - (Prims.of_int (31))))) - (Obj.magic - (FStar_Tactics_V2_Builtins.term_to_string - t)) - (fun uu___3 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___4 -> - Prims.strcat "Cannot unfold " - (Prims.strcat uu___3 ""))))) - (fun uu___3 -> - (fun uu___3 -> - Obj.magic - (Pulse_Typing_Env.fail g - (FStar_Pervasives_Native.Some - (Pulse_RuntimeUtils.range_of_term - t)) uu___3)) uu___3)))) uu___) -let (prepare_goal : - Pulse_Syntax_Base.proof_hint_type -> - Pulse_Typing_Env.env -> - FStar_Reflection_Types.term -> - ((Pulse_Syntax_Base.term * Pulse_Syntax_Base.term), unit) - FStar_Tactics_Effect.tac_repr) - = - fun hint_type -> - fun g -> - fun v -> - match hint_type with - | Pulse_Syntax_Base.ASSERT -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (129)) (Prims.of_int (12)) - (Prims.of_int (129)) (Prims.of_int (81))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (130)) (Prims.of_int (4)) - (Prims.of_int (130)) (Prims.of_int (8))))) - (Obj.magic - (option_must (Pulse_Readback.readback_ty v) - "Failed to readback elaborated assertion")) - (fun v1 -> - FStar_Tactics_Effect.lift_div_tac (fun uu___ -> (v1, v1))) - | Pulse_Syntax_Base.UNFOLD uu___ -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (132)) (Prims.of_int (4)) - (Prims.of_int (132)) (Prims.of_int (73))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (132)) (Prims.of_int (4)) - (Prims.of_int (133)) (Prims.of_int (24))))) - (Obj.magic - (option_must (Pulse_Readback.readback_ty v) - "Failed to readback elaborated assertion")) - (fun uu___1 -> - (fun uu___1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (133)) (Prims.of_int (4)) - (Prims.of_int (133)) (Prims.of_int (24))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (132)) (Prims.of_int (4)) - (Prims.of_int (133)) (Prims.of_int (24))))) - (Obj.magic - (unfold_defs g FStar_Pervasives_Native.None v)) - (fun uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> (uu___1, uu___2))))) uu___1) - | Pulse_Syntax_Base.FOLD ns -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (135)) (Prims.of_int (4)) - (Prims.of_int (135)) (Prims.of_int (22))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (135)) (Prims.of_int (4)) - (Prims.of_int (136)) (Prims.of_int (73))))) - (Obj.magic (unfold_defs g ns v)) - (fun uu___ -> - (fun uu___ -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (136)) (Prims.of_int (4)) - (Prims.of_int (136)) (Prims.of_int (73))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (135)) (Prims.of_int (4)) - (Prims.of_int (136)) (Prims.of_int (73))))) - (Obj.magic - (option_must (Pulse_Readback.readback_ty v) - "Failed to readback elaborated assertion")) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> (uu___, uu___1))))) uu___) -let (check_unfoldable : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.proof_hint_type -> - Pulse_Syntax_Base.term -> (unit, unit) FStar_Tactics_Effect.tac_repr) - = - fun uu___2 -> - fun uu___1 -> - fun uu___ -> - (fun g -> - fun hint_type -> - fun v -> - match hint_type with - | Pulse_Syntax_Base.ASSERT -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> ()))) - | Pulse_Syntax_Base.FOLD uu___ -> - Obj.magic - (Obj.repr - (match v.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_FStar uu___1 -> - Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> ())) - | uu___1 -> - Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (148)) - (Prims.of_int (8)) - (Prims.of_int (150)) - (Prims.of_int (47))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (146)) - (Prims.of_int (5)) - (Prims.of_int (150)) - (Prims.of_int (47))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (150)) - (Prims.of_int (26)) - (Prims.of_int (150)) - (Prims.of_int (46))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "prims.fst" - (Prims.of_int (590)) - (Prims.of_int (19)) - (Prims.of_int (590)) - (Prims.of_int (31))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - v)) - (fun uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - Prims.strcat - "`fold` and `unfold` expect a single user-defined predicate as an argument, but " - (Prims.strcat uu___2 - " is a primitive term that cannot be folded or unfolded"))))) - (fun uu___2 -> - (fun uu___2 -> - Obj.magic - (Pulse_Typing_Env.fail g - (FStar_Pervasives_Native.Some - (v.Pulse_Syntax_Base.range1)) - uu___2)) uu___2)))) - | Pulse_Syntax_Base.UNFOLD uu___ -> - Obj.magic - (Obj.repr - (match v.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_FStar uu___1 -> - Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> ())) - | uu___1 -> - Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (148)) - (Prims.of_int (8)) - (Prims.of_int (150)) - (Prims.of_int (47))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (146)) - (Prims.of_int (5)) - (Prims.of_int (150)) - (Prims.of_int (47))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (150)) - (Prims.of_int (26)) - (Prims.of_int (150)) - (Prims.of_int (46))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "prims.fst" - (Prims.of_int (590)) - (Prims.of_int (19)) - (Prims.of_int (590)) - (Prims.of_int (31))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - v)) - (fun uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - Prims.strcat - "`fold` and `unfold` expect a single user-defined predicate as an argument, but " - (Prims.strcat uu___2 - " is a primitive term that cannot be folded or unfolded"))))) - (fun uu___2 -> - (fun uu___2 -> - Obj.magic - (Pulse_Typing_Env.fail g - (FStar_Pervasives_Native.Some - (v.Pulse_Syntax_Base.range1)) - uu___2)) uu___2))))) uu___2 - uu___1 uu___ -let (check : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.term -> - unit -> - unit Pulse_Typing.post_hint_opt -> - Pulse_Checker_Common.check_t -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, - unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun st -> - fun pre -> - fun pre_typing -> - fun post_hint -> - fun check1 -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (160)) (Prims.of_int (68)) - (Prims.of_int (160)) (Prims.of_int (75))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (160)) (Prims.of_int (3)) - (Prims.of_int (204)) (Prims.of_int (43))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> st.Pulse_Syntax_Base.term1)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | Pulse_Syntax_Base.Tm_ProofHintWithBinders - { Pulse_Syntax_Base.hint_type = hint_type; - Pulse_Syntax_Base.binders = binders; - Pulse_Syntax_Base.v = v; - Pulse_Syntax_Base.t4 = body;_} - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (161)) - (Prims.of_int (4)) - (Prims.of_int (161)) - (Prims.of_int (34))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (161)) - (Prims.of_int (35)) - (Prims.of_int (204)) - (Prims.of_int (43))))) - (Obj.magic (check_unfoldable g hint_type v)) - (fun uu___1 -> - (fun uu___1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (162)) - (Prims.of_int (19)) - (Prims.of_int (162)) - (Prims.of_int (49))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (161)) - (Prims.of_int (35)) - (Prims.of_int (204)) - (Prims.of_int (43))))) - (Obj.magic - (infer_binder_types g binders v)) - (fun uu___2 -> - (fun uu___2 -> - match uu___2 with - | (nvars, v1) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (163)) - (Prims.of_int (19)) - (Prims.of_int (163)) - (Prims.of_int (45))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (162)) - (Prims.of_int (52)) - (Prims.of_int (204)) - (Prims.of_int (43))))) - (Obj.magic - (prepare_goal - hint_type g v1)) - (fun uu___3 -> - (fun uu___3 -> - match uu___3 - with - | (lhs, rhs) - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (164)) - (Prims.of_int (24)) - (Prims.of_int (164)) - (Prims.of_int (66))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (163)) - (Prims.of_int (48)) - (Prims.of_int (204)) - (Prims.of_int (43))))) - (Obj.magic - (instantiate_names_with_uvars - nvars lhs - rhs)) - (fun - uu___4 -> (fun - uu___4 -> - match uu___4 - with - | - (uvs, - lhs1, - rhs1) -> + uu___3 -> Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (165)) - (Prims.of_int (4)) - (Prims.of_int (165)) - (Prims.of_int (129))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (165)) - (Prims.of_int (130)) - (Prims.of_int (204)) - (Prims.of_int (43))))) - (Obj.magic - (debug_log - g - (fun - uu___5 -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (165)) - (Prims.of_int (106)) - (Prims.of_int (165)) - (Prims.of_int (128))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (165)) - (Prims.of_int (26)) - (Prims.of_int (165)) - (Prims.of_int (128))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - pre)) - (fun - uu___6 -> + (option_must + rt uu___3)) + uu___3))) (fun - uu___6 -> + uu___3 -> + (fun rt1 + -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (165)) - (Prims.of_int (26)) - (Prims.of_int (165)) - (Prims.of_int (128))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (165)) - (Prims.of_int (26)) - (Prims.of_int (165)) - (Prims.of_int (128))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind + (Prims.of_int (115)) + (Prims.of_int (17)) + (Prims.of_int (116)) + (Prims.of_int (93))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (165)) - (Prims.of_int (83)) - (Prims.of_int (165)) - (Prims.of_int (105))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "FStar.Printf.fst" - (Prims.of_int (121)) - (Prims.of_int (8)) - (Prims.of_int (123)) - (Prims.of_int (44))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - lhs1)) - (fun - uu___7 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___8 -> - fun x -> - Prims.strcat - (Prims.strcat - "Trying to solve " - (Prims.strcat - uu___7 - " \nagainst context ")) - (Prims.strcat - x ""))))) - (fun - uu___7 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___8 -> - uu___7 - uu___6)))) - uu___6)))) - (fun - uu___5 -> - (fun - uu___5 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (166)) - (Prims.of_int (19)) - (Prims.of_int (166)) - (Prims.of_int (73))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (167)) - (Prims.of_int (4)) - (Prims.of_int (204)) - (Prims.of_int (43))))) - (Obj.magic - (Pulse_Checker_Inference.try_inst_uvs_in_goal - g pre - lhs1)) - (fun - uu___6 -> - (fun - solution - -> - match - Pulse_Checker_Inference.unsolved - solution - uvs - with - | - FStar_Pervasives_Native.Some - uvs1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (170)) - (Prims.of_int (13)) - (Prims.of_int (171)) - (Prims.of_int (97))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (169)) - (Prims.of_int (6)) - (Prims.of_int (171)) - (Prims.of_int (97))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (171)) - (Prims.of_int (29)) - (Prims.of_int (171)) - (Prims.of_int (96))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "prims.fst" - (Prims.of_int (590)) - (Prims.of_int (19)) - (Prims.of_int (590)) - (Prims.of_int (31))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (171)) - (Prims.of_int (49)) - (Prims.of_int (171)) - (Prims.of_int (95))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (171)) - (Prims.of_int (29)) - (Prims.of_int (171)) - (Prims.of_int (96))))) - (Obj.magic - (FStar_Tactics_Util.map - (fun - uu___6 -> - match uu___6 - with - | - (uu___7, - t) -> - Pulse_Syntax_Printer.term_to_string - t) uvs1)) - (fun - uu___6 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___7 -> - FStar_String.concat - ", " - uu___6)))) - (fun - uu___6 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___7 -> - Prims.strcat - "Could not instantiate " - (Prims.strcat - uu___6 ""))))) - (fun - uu___6 -> - (fun - uu___6 -> - Obj.magic - (Pulse_Typing_Env.fail - g - (FStar_Pervasives_Native.Some - (st.Pulse_Syntax_Base.range2)) - uu___6)) - uu___6)) - | - uu___6 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (173)) - (Prims.of_int (6)) - (Prims.of_int (173)) - (Prims.of_int (95))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (173)) - (Prims.of_int (96)) - (Prims.of_int (204)) - (Prims.of_int (43))))) - (Obj.magic - (debug_log - g - (fun - uu___7 -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (173)) - (Prims.of_int (60)) - (Prims.of_int (173)) - (Prims.of_int (94))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "prims.fst" - (Prims.of_int (590)) - (Prims.of_int (19)) - (Prims.of_int (590)) - (Prims.of_int (31))))) - (Obj.magic - (Pulse_Checker_Inference.solutions_to_string - solution)) - (fun - uu___8 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___9 -> - Prims.strcat - "Solution: " - (Prims.strcat - uu___8 - "\n")))))) - (fun - uu___7 -> - (fun - uu___7 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (175)) - (Prims.of_int (8)) - (Prims.of_int (180)) - (Prims.of_int (15))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (181)) - (Prims.of_int (8)) - (Prims.of_int (204)) - (Prims.of_int (43))))) - (Obj.magic - (FStar_Tactics_Util.fold_left - (fun - subst -> - fun - uu___8 -> - match uu___8 - with - | - (uv, t) - -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (177)) - (Prims.of_int (26)) - (Prims.of_int (177)) - (Prims.of_int (55))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (178)) - (Prims.of_int (16)) - (Prims.of_int (178)) - (Prims.of_int (45))))) - (Obj.magic - (Pulse_Checker_Inference.apply_solution - solution - t)) - (fun sol - -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___9 -> - (Pulse_Syntax_Naming.DT - (Prims.int_zero, - sol)) :: - (Pulse_Syntax_Naming.shift_subst - subst)))) - [] uvs)) - (fun - uu___8 -> - (fun sub - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (183)) - (Prims.of_int (12)) - (Prims.of_int (185)) - (Prims.of_int (28))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (187)) - (Prims.of_int (6)) - (Prims.of_int (204)) - (Prims.of_int (43))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___8 -> - fun t1 -> - fun t2 -> - { - Pulse_Syntax_Base.term1 - = - (Pulse_Syntax_Base.Tm_Bind - { - Pulse_Syntax_Base.binder - = - (Pulse_Typing.as_binder - (Pulse_Syntax_Base.tm_fstar - (FStar_Reflection_V2_Builtins.pack_ln - (FStar_Reflection_V2_Data.Tv_FVar - (FStar_Reflection_V2_Builtins.pack_fv - ["Prims"; - "unit"]))) - st.Pulse_Syntax_Base.range2)); - Pulse_Syntax_Base.head1 - = t1; - Pulse_Syntax_Base.body1 - = t2 - }); - Pulse_Syntax_Base.range2 - = - (st.Pulse_Syntax_Base.range2) - })) - (fun - uu___8 -> - (fun seq - -> - match hint_type - with - | - Pulse_Syntax_Base.ASSERT - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (189)) - (Prims.of_int (26)) - (Prims.of_int (189)) - (Prims.of_int (76))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (189)) - (Prims.of_int (79)) - (Prims.of_int (195)) - (Prims.of_int (43))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___8 -> - Pulse_Syntax_Base.tm_fstar - (FStar_Reflection_V2_Builtins.pack_ln - (FStar_Reflection_V2_Data.Tv_FVar - (FStar_Reflection_V2_Builtins.pack_fv - ["Pulse"; - "Steel"; - "Wrapper"; - "assert_"]))) - st.Pulse_Syntax_Base.range2)) - (fun - uu___8 -> - (fun - assert_term - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (190)) - (Prims.of_int (30)) - (Prims.of_int (190)) - (Prims.of_int (61))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (190)) - (Prims.of_int (64)) - (Prims.of_int (195)) - (Prims.of_int (43))))) - (Obj.magic - (Pulse_Checker_Inference.apply_solution - solution - lhs1)) - (fun - uu___8 -> - (fun - vprop_to_assert - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (191)) - (Prims.of_int (21)) - (Prims.of_int (192)) - (Prims.of_int (37))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (192)) - (Prims.of_int (42)) - (Prims.of_int (195)) - (Prims.of_int (43))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___8 -> - { - Pulse_Syntax_Base.term1 - = - (Pulse_Syntax_Base.Tm_STApp - { - Pulse_Syntax_Base.head - = - assert_term; - Pulse_Syntax_Base.arg_qual - = - FStar_Pervasives_Native.None; - Pulse_Syntax_Base.arg - = - vprop_to_assert - }); - Pulse_Syntax_Base.range2 - = - (st.Pulse_Syntax_Base.range2) - })) - (fun - uu___8 -> - (fun asrt - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (193)) - (Prims.of_int (17)) - (Prims.of_int (193)) - (Prims.of_int (50))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (194)) - (Prims.of_int (8)) - (Prims.of_int (195)) - (Prims.of_int (43))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___8 -> - seq asrt - (Pulse_Syntax_Naming.subst_st_term - body sub))) - (fun - uu___8 -> - (fun tm - -> - Obj.magic + (Prims.of_int (117)) + (Prims.of_int (8)) + (Prims.of_int (118)) + (Prims.of_int (10))))) + (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (194)) - (Prims.of_int (8)) - (Prims.of_int (194)) - (Prims.of_int (112))))) + (Prims.of_int (116)) + (Prims.of_int (10)) + (Prims.of_int (116)) + (Prims.of_int (93))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (195)) - (Prims.of_int (8)) - (Prims.of_int (195)) - (Prims.of_int (43))))) + (Prims.of_int (115)) + (Prims.of_int (17)) + (Prims.of_int (116)) + (Prims.of_int (93))))) (Obj.magic - (debug_log - g - (fun - uu___8 -> - FStar_Tactics_Effect.tac_bind + (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (194)) - (Prims.of_int (87)) - (Prims.of_int (194)) - (Prims.of_int (111))))) + (Prims.of_int (116)) + (Prims.of_int (71)) + (Prims.of_int (116)) + (Prims.of_int (92))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range @@ -2301,175 +1373,449 @@ let (check : (Prims.of_int (590)) (Prims.of_int (31))))) (Obj.magic - (Pulse_Syntax_Printer.st_term_to_string - tm)) + (FStar_Tactics_V2_Builtins.term_to_string + rt1)) (fun - uu___9 -> + uu___3 -> FStar_Tactics_Effect.lift_div_tac (fun - uu___10 - -> + uu___4 -> Prims.strcat - "After with_binders: about to check " + "error in reading back the unfolded term " (Prims.strcat - uu___9 - "\n")))))) + uu___3 ""))))) (fun - uu___8 -> + uu___3 -> (fun - uu___8 -> + uu___3 -> Obj.magic - (check1 g - tm pre () - post_hint)) - uu___8))) - uu___8))) - uu___8))) - uu___8))) - uu___8)) - | - Pulse_Syntax_Base.UNFOLD - uu___8 -> + (option_must + (Pulse_Readback.readback_ty + rt1) + uu___3)) + uu___3))) + (fun + uu___3 -> + (fun ty + -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (198)) - (Prims.of_int (19)) - (Prims.of_int (200)) - (Prims.of_int (35))))) + (Prims.of_int (117)) + (Prims.of_int (8)) + (Prims.of_int (117)) + (Prims.of_int (157))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (200)) - (Prims.of_int (40)) - (Prims.of_int (204)) - (Prims.of_int (43))))) + (Prims.of_int (115)) + (Prims.of_int (12)) + (Prims.of_int (115)) + (Prims.of_int (14))))) (Obj.magic - (FStar_Tactics_Effect.tac_bind + (debug_log + g + (fun + uu___3 -> + FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (198)) - (Prims.of_int (26)) - (Prims.of_int (199)) - (Prims.of_int (77))))) + (Prims.of_int (117)) + (Prims.of_int (135)) + (Prims.of_int (117)) + (Prims.of_int (156))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (198)) - (Prims.of_int (19)) - (Prims.of_int (200)) - (Prims.of_int (35))))) + (Prims.of_int (117)) + (Prims.of_int (30)) + (Prims.of_int (117)) + (Prims.of_int (156))))) (Obj.magic + (Pulse_Syntax_Printer.term_to_string + ty)) + (fun + uu___4 -> + (fun + uu___4 -> + Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (198)) - (Prims.of_int (39)) - (Prims.of_int (199)) - (Prims.of_int (75))))) + (Prims.of_int (117)) + (Prims.of_int (30)) + (Prims.of_int (117)) + (Prims.of_int (156))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (198)) - (Prims.of_int (26)) - (Prims.of_int (199)) - (Prims.of_int (77))))) + (Prims.of_int (117)) + (Prims.of_int (30)) + (Prims.of_int (117)) + (Prims.of_int (156))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (198)) - (Prims.of_int (44)) - (Prims.of_int (198)) - (Prims.of_int (75))))) + (Prims.of_int (117)) + (Prims.of_int (113)) + (Prims.of_int (117)) + (Prims.of_int (134))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (198)) - (Prims.of_int (39)) - (Prims.of_int (199)) - (Prims.of_int (75))))) + (Prims.of_int (117)) + (Prims.of_int (30)) + (Prims.of_int (117)) + (Prims.of_int (156))))) (Obj.magic - (Pulse_Checker_Inference.apply_solution - solution - lhs1)) + (FStar_Tactics_V2_Builtins.term_to_string + rt1)) (fun - uu___9 -> + uu___5 -> (fun - uu___9 -> + uu___5 -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (199)) - (Prims.of_int (44)) - (Prims.of_int (199)) - (Prims.of_int (75))))) + (Prims.of_int (117)) + (Prims.of_int (30)) + (Prims.of_int (117)) + (Prims.of_int (156))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (198)) - (Prims.of_int (39)) - (Prims.of_int (199)) - (Prims.of_int (75))))) + (Prims.of_int (117)) + (Prims.of_int (30)) + (Prims.of_int (117)) + (Prims.of_int (156))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal (Obj.magic - (Pulse_Checker_Inference.apply_solution - solution - rhs1)) + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (117)) + (Prims.of_int (92)) + (Prims.of_int (117)) + (Prims.of_int (112))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (FStar_Tactics_V2_Builtins.term_to_string + t1)) (fun - uu___10 - -> + uu___6 -> FStar_Tactics_Effect.lift_div_tac (fun - uu___11 - -> - { - Pulse_Syntax_Base.t1 - = uu___9; - Pulse_Syntax_Base.t2 - = uu___10 - })))) - uu___9))) + uu___7 -> + fun x -> + fun x1 -> + Prims.strcat + (Prims.strcat + (Prims.strcat + "Unfolded " + (Prims.strcat + uu___6 + " to F* term ")) + (Prims.strcat + x + " and readback as ")) + (Prims.strcat + x1 ""))))) (fun - uu___9 -> + uu___6 -> FStar_Tactics_Effect.lift_div_tac (fun - uu___10 - -> - Pulse_Syntax_Base.Tm_Rewrite - uu___9)))) + uu___7 -> + uu___6 + uu___5)))) + uu___5))) (fun - uu___9 -> + uu___5 -> FStar_Tactics_Effect.lift_div_tac (fun - uu___10 - -> - { - Pulse_Syntax_Base.term1 - = uu___9; - Pulse_Syntax_Base.range2 - = - (st.Pulse_Syntax_Base.range2) - })))) + uu___6 -> + uu___5 + uu___4)))) + uu___4)))) (fun - uu___9 -> - (fun rw + uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + ty)))) + uu___3))) + uu___3))) + uu___3))) + uu___3))) uu___3)) + | uu___2 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (122)) + (Prims.of_int (8)) + (Prims.of_int (122)) + (Prims.of_int (89))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (121)) + (Prims.of_int (6)) + (Prims.of_int (122)) + (Prims.of_int (89))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (122)) + (Prims.of_int (68)) + (Prims.of_int (122)) + (Prims.of_int (88))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (FStar_Tactics_V2_Builtins.term_to_string + t1)) + (fun uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___4 -> + Prims.strcat + "Cannot unfold " + (Prims.strcat uu___3 + ", the head is not an fvar"))))) + (fun uu___3 -> + (fun uu___3 -> + Obj.magic + (Pulse_Typing_Env.fail g + (FStar_Pervasives_Native.Some + (Pulse_RuntimeUtils.range_of_term + t1)) uu___3)) + uu___3)))) uu___))) uu___) +let (check_unfoldable : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> (unit, unit) FStar_Tactics_Effect.tac_repr) + = + fun uu___1 -> + fun uu___ -> + (fun g -> + fun v -> + match v.Pulse_Syntax_Base.t with + | Pulse_Syntax_Base.Tm_FStar uu___ -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac (fun uu___1 -> ()))) + | uu___ -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (130)) (Prims.of_int (6)) + (Prims.of_int (132)) (Prims.of_int (45))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (128)) (Prims.of_int (3)) + (Prims.of_int (132)) (Prims.of_int (45))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (132)) + (Prims.of_int (24)) + (Prims.of_int (132)) + (Prims.of_int (44))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string v)) + (fun uu___1 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + Prims.strcat + "`fold` and `unfold` expect a single user-defined predicate as an argument, but " + (Prims.strcat uu___1 + " is a primitive term that cannot be folded or unfolded"))))) + (fun uu___1 -> + (fun uu___1 -> + Obj.magic + (Pulse_Typing_Env.fail g + (FStar_Pervasives_Native.Some + (v.Pulse_Syntax_Base.range1)) uu___1)) + uu___1)))) uu___1 uu___ +let (check : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + unit -> + unit Pulse_Typing.post_hint_opt -> + Pulse_Syntax_Base.ppname -> + Pulse_Syntax_Base.st_term -> + Pulse_Checker_Base.check_t -> + ((unit, unit, unit) Pulse_Checker_Base.checker_result_t, + unit) FStar_Tactics_Effect.tac_repr) + = + fun g -> + fun pre -> + fun pre_typing -> + fun post_hint -> + fun res_ppname -> + fun st -> + fun check1 -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (145)) (Prims.of_int (10)) + (Prims.of_int (145)) (Prims.of_int (48))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (145)) (Prims.of_int (51)) + (Prims.of_int (191)) (Prims.of_int (50))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing_Env.push_context g "check_assert" + st.Pulse_Syntax_Base.range2)) + (fun uu___ -> + (fun g1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (147)) + (Prims.of_int (69)) + (Prims.of_int (147)) + (Prims.of_int (76))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (145)) + (Prims.of_int (51)) + (Prims.of_int (191)) + (Prims.of_int (50))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> st.Pulse_Syntax_Base.term1)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | Pulse_Syntax_Base.Tm_ProofHintWithBinders + { + Pulse_Syntax_Base.hint_type = + hint_type; + Pulse_Syntax_Base.binders = bs; + Pulse_Syntax_Base.v = v; + Pulse_Syntax_Base.t3 = body;_} + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (149)) + (Prims.of_int (11)) + (Prims.of_int (149)) + (Prims.of_int (36))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (149)) + (Prims.of_int (39)) + (Prims.of_int (191)) + (Prims.of_int (50))))) + (Obj.magic + (infer_binder_types g1 bs v)) + (fun uu___1 -> + (fun bs1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (151)) + (Prims.of_int (41)) + (Prims.of_int (151)) + (Prims.of_int (88))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (149)) + (Prims.of_int (39)) + (Prims.of_int (191)) + (Prims.of_int (50))))) + (Obj.magic + (open_binders g1 + bs1 + (Pulse_Typing_Env.mk_env + (Pulse_Typing_Env.fstar_env + g1)) v + body)) + (fun uu___1 -> + (fun uu___1 -> + match uu___1 + with + | FStar_Pervasives.Mkdtuple3 + (uvs, + v_opened, + body_opened) + -> + (match hint_type + with + | Pulse_Syntax_Base.ASSERT -> Obj.magic (FStar_Tactics_Effect.tac_bind @@ -2477,53 +1823,64 @@ let (check : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (201)) - (Prims.of_int (20)) - (Prims.of_int (201)) - (Prims.of_int (42))))) + (Prims.of_int (155)) + (Prims.of_int (18)) + (Prims.of_int (155)) + (Prims.of_int (39))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (201)) - (Prims.of_int (45)) - (Prims.of_int (204)) - (Prims.of_int (43))))) + (Prims.of_int (154)) + (Prims.of_int (13)) + (Prims.of_int (160)) + (Prims.of_int (52))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___9 -> - Pulse_Syntax_Naming.subst_st_term - body sub)) + uu___2 -> + (v_opened, + body_opened))) (fun - uu___9 -> + uu___2 -> (fun - body' -> + uu___2 -> + match uu___2 + with + | + (v1, + body1) -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (202)) - (Prims.of_int (17)) - (Prims.of_int (202)) - (Prims.of_int (29))))) + (Prims.of_int (156)) + (Prims.of_int (21)) + (Prims.of_int (156)) + (Prims.of_int (54))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (203)) - (Prims.of_int (8)) - (Prims.of_int (204)) - (Prims.of_int (43))))) - (FStar_Tactics_Effect.lift_div_tac + (Prims.of_int (155)) + (Prims.of_int (42)) + (Prims.of_int (160)) + (Prims.of_int (52))))) + (Obj.magic + (Pulse_Checker_Pure.check_vprop + (Pulse_Typing_Env.push_env + g1 uvs) + v1)) (fun - uu___9 -> - seq rw - body')) + uu___3 -> (fun - uu___9 -> - (fun tm + uu___3 -> + match uu___3 + with + | + Prims.Mkdtuple2 + (v2, d) -> Obj.magic (FStar_Tactics_Effect.tac_bind @@ -2531,264 +1888,351 @@ let (check : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (203)) - (Prims.of_int (8)) - (Prims.of_int (203)) - (Prims.of_int (112))))) + (Prims.of_int (157)) + (Prims.of_int (39)) + (Prims.of_int (157)) + (Prims.of_int (68))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (204)) - (Prims.of_int (8)) - (Prims.of_int (204)) - (Prims.of_int (43))))) + (Prims.of_int (156)) + (Prims.of_int (57)) + (Prims.of_int (160)) + (Prims.of_int (52))))) (Obj.magic - (debug_log - g + (Pulse_Checker_Prover.prove + g pre () + uvs v2 ())) (fun - uu___9 -> - FStar_Tactics_Effect.tac_bind + uu___4 -> + (fun + uu___4 -> + match uu___4 + with + | + FStar_Pervasives.Mkdtuple4 + (g11, + nts, + pre', + k_frame) + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (203)) - (Prims.of_int (87)) - (Prims.of_int (203)) - (Prims.of_int (111))))) + (Prims.of_int (159)) + (Prims.of_int (6)) + (Prims.of_int (159)) + (Prims.of_int (117))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "prims.fst" - (Prims.of_int (590)) - (Prims.of_int (19)) - (Prims.of_int (590)) - (Prims.of_int (31))))) + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (157)) + (Prims.of_int (71)) + (Prims.of_int (160)) + (Prims.of_int (52))))) (Obj.magic - (Pulse_Syntax_Printer.st_term_to_string - tm)) + (check1 + g11 + (Pulse_Syntax_Base.tm_star + (Pulse_Checker_Prover_Substs.nt_subst_term + v2 nts) + pre') () + post_hint + res_ppname + (Pulse_Checker_Prover_Substs.nt_subst_st_term + body1 nts))) (fun - uu___10 - -> + uu___5 -> FStar_Tactics_Effect.lift_div_tac (fun - uu___11 - -> - Prims.strcat - "After with_binders: about to check " - (Prims.strcat - uu___10 - "\n")))))) - (fun - uu___9 -> - (fun - uu___9 -> - Obj.magic - (check1 g - tm pre () - post_hint)) - uu___9))) - uu___9))) - uu___9))) - uu___9)) + uu___6 -> + match uu___5 + with | - Pulse_Syntax_Base.FOLD - uu___8 -> + FStar_Pervasives.Mkdtuple5 + (x, x_ty, + pre'', + g2, k) -> + FStar_Pervasives.Mkdtuple5 + (x, x_ty, + pre'', + g2, + (Pulse_Checker_Base.k_elab_trans + g g11 + x_ty pre + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Substs.nt_subst_term + v2 nts) + pre') + (FStar_Pervasives.dfst + g2) + k_frame k)))))) + uu___4))) + uu___3))) + uu___2)) + | uu___2 -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (198)) - (Prims.of_int (19)) - (Prims.of_int (200)) - (Prims.of_int (35))))) + (Prims.of_int (163)) + (Prims.of_int (4)) + (Prims.of_int (163)) + (Prims.of_int (24))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (200)) - (Prims.of_int (40)) - (Prims.of_int (204)) - (Prims.of_int (43))))) + (Prims.of_int (163)) + (Prims.of_int (25)) + (Prims.of_int (191)) + (Prims.of_int (50))))) (Obj.magic + (check_unfoldable + g1 v)) + (fun + uu___3 -> + (fun + uu___3 -> + Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (198)) - (Prims.of_int (26)) - (Prims.of_int (199)) + (Prims.of_int (164)) + (Prims.of_int (22)) + (Prims.of_int (164)) (Prims.of_int (77))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (198)) - (Prims.of_int (19)) - (Prims.of_int (200)) - (Prims.of_int (35))))) + (Prims.of_int (163)) + (Prims.of_int (25)) + (Prims.of_int (191)) + (Prims.of_int (50))))) (Obj.magic + (Pulse_Checker_Pure.instantiate_term_implicits + (Pulse_Typing_Env.push_env + g1 uvs) + v_opened)) + (fun + uu___4 -> + (fun + uu___4 -> + match uu___4 + with + | + (v_opened1, + uu___5) + -> + Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (198)) - (Prims.of_int (39)) - (Prims.of_int (199)) - (Prims.of_int (75))))) + (Prims.of_int (166)) + (Prims.of_int (6)) + (Prims.of_int (172)) + (Prims.of_int (16))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (198)) - (Prims.of_int (26)) - (Prims.of_int (199)) - (Prims.of_int (77))))) - (Obj.magic + (Prims.of_int (164)) + (Prims.of_int (80)) + (Prims.of_int (191)) + (Prims.of_int (50))))) + (match hint_type + with + | + Pulse_Syntax_Base.UNFOLD + uu___6 -> + Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (198)) - (Prims.of_int (44)) - (Prims.of_int (198)) - (Prims.of_int (75))))) + (Prims.of_int (169)) + (Prims.of_int (8)) + (Prims.of_int (169)) + (Prims.of_int (50))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (198)) - (Prims.of_int (39)) - (Prims.of_int (199)) - (Prims.of_int (75))))) + (Prims.of_int (168)) + (Prims.of_int (8)) + (Prims.of_int (169)) + (Prims.of_int (50))))) (Obj.magic - (Pulse_Checker_Inference.apply_solution - solution - lhs1)) + (unfold_defs + (Pulse_Typing_Env.push_env + g1 uvs) + FStar_Pervasives_Native.None + v_opened1)) (fun - uu___9 -> + uu___7 -> + FStar_Tactics_Effect.lift_div_tac (fun - uu___9 -> + uu___8 -> + (v_opened1, + uu___7)))) + | + Pulse_Syntax_Base.FOLD + ns -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (199)) - (Prims.of_int (44)) - (Prims.of_int (199)) - (Prims.of_int (75))))) + (Prims.of_int (171)) + (Prims.of_int (8)) + (Prims.of_int (171)) + (Prims.of_int (48))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (198)) - (Prims.of_int (39)) - (Prims.of_int (199)) - (Prims.of_int (75))))) + (Prims.of_int (171)) + (Prims.of_int (8)) + (Prims.of_int (172)) + (Prims.of_int (16))))) (Obj.magic - (Pulse_Checker_Inference.apply_solution - solution - rhs1)) + (unfold_defs + (Pulse_Typing_Env.push_env + g1 uvs) + ns + v_opened1)) (fun - uu___10 - -> + uu___6 -> FStar_Tactics_Effect.lift_div_tac (fun - uu___11 - -> - { - Pulse_Syntax_Base.t1 - = uu___9; - Pulse_Syntax_Base.t2 - = uu___10 - })))) - uu___9))) + uu___7 -> + (uu___6, + v_opened1))))) (fun - uu___9 -> - FStar_Tactics_Effect.lift_div_tac + uu___6 -> (fun - uu___10 - -> - Pulse_Syntax_Base.Tm_Rewrite - uu___9)))) + uu___6 -> + match uu___6 + with + | + (lhs, + rhs) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (173)) + (Prims.of_int (17)) + (Prims.of_int (173)) + (Prims.of_int (37))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (173)) + (Prims.of_int (40)) + (Prims.of_int (191)) + (Prims.of_int (50))))) + (FStar_Tactics_Effect.lift_div_tac (fun - uu___9 -> - FStar_Tactics_Effect.lift_div_tac + uu___7 -> + FStar_List_Tot_Base.rev + (Pulse_Typing_Env.bindings + uvs))) (fun - uu___10 - -> - { - Pulse_Syntax_Base.term1 - = uu___9; - Pulse_Syntax_Base.range2 - = - (st.Pulse_Syntax_Base.range2) - })))) + uu___7 -> (fun - uu___9 -> - (fun rw - -> + uvs_bs -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (201)) - (Prims.of_int (20)) - (Prims.of_int (201)) - (Prims.of_int (42))))) + (Prims.of_int (174)) + (Prims.of_int (19)) + (Prims.of_int (174)) + (Prims.of_int (69))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (201)) - (Prims.of_int (45)) - (Prims.of_int (204)) - (Prims.of_int (43))))) + (Prims.of_int (173)) + (Prims.of_int (40)) + (Prims.of_int (191)) + (Prims.of_int (50))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___9 -> - Pulse_Syntax_Naming.subst_st_term - body sub)) + uu___7 -> + ((close_binders + uvs_bs + lhs), + (close_binders + uvs_bs + rhs)))) (fun - uu___9 -> + uu___7 -> (fun - body' -> + uu___7 -> + match uu___7 + with + | + (lhs1, + rhs1) -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (202)) - (Prims.of_int (17)) - (Prims.of_int (202)) - (Prims.of_int (29))))) + (Prims.of_int (175)) + (Prims.of_int (15)) + (Prims.of_int (177)) + (Prims.of_int (31))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (203)) - (Prims.of_int (8)) - (Prims.of_int (204)) - (Prims.of_int (43))))) + (Prims.of_int (177)) + (Prims.of_int (36)) + (Prims.of_int (191)) + (Prims.of_int (50))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___9 -> - seq rw - body')) + uu___8 -> + { + Pulse_Syntax_Base.term1 + = + (Pulse_Syntax_Base.Tm_Rewrite + { + Pulse_Syntax_Base.t1 + = lhs1; + Pulse_Syntax_Base.t2 + = rhs1 + }); + Pulse_Syntax_Base.range2 + = + (st.Pulse_Syntax_Base.range2) + })) (fun - uu___9 -> - (fun tm + uu___8 -> + (fun rw -> Obj.magic (FStar_Tactics_Effect.tac_bind @@ -2796,72 +2240,112 @@ let (check : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (203)) - (Prims.of_int (8)) - (Prims.of_int (203)) - (Prims.of_int (112))))) + (Prims.of_int (178)) + (Prims.of_int (15)) + (Prims.of_int (180)) + (Prims.of_int (31))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (204)) - (Prims.of_int (8)) - (Prims.of_int (204)) - (Prims.of_int (43))))) - (Obj.magic - (debug_log - g + (Prims.of_int (180)) + (Prims.of_int (36)) + (Prims.of_int (191)) + (Prims.of_int (50))))) + (FStar_Tactics_Effect.lift_div_tac (fun - uu___9 -> - FStar_Tactics_Effect.tac_bind + uu___8 -> + { + Pulse_Syntax_Base.term1 + = + (Pulse_Syntax_Base.Tm_Bind + { + Pulse_Syntax_Base.binder + = + (Pulse_Typing.as_binder + (Pulse_Syntax_Base.tm_fstar + (FStar_Reflection_V2_Builtins.pack_ln + (FStar_Reflection_V2_Data.Tv_FVar + (FStar_Reflection_V2_Builtins.pack_fv + ["Prims"; + "unit"]))) + st.Pulse_Syntax_Base.range2)); + Pulse_Syntax_Base.head1 + = rw; + Pulse_Syntax_Base.body1 + = body + }); + Pulse_Syntax_Base.range2 + = + (st.Pulse_Syntax_Base.range2) + })) + (fun + uu___8 -> + (fun st1 + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.AssertWithBinders.fst" - (Prims.of_int (203)) - (Prims.of_int (87)) - (Prims.of_int (203)) - (Prims.of_int (111))))) + (Prims.of_int (183)) + (Prims.of_int (6)) + (Prims.of_int (190)) + (Prims.of_int (28))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "prims.fst" - (Prims.of_int (590)) - (Prims.of_int (19)) - (Prims.of_int (590)) - (Prims.of_int (31))))) - (Obj.magic - (Pulse_Syntax_Printer.st_term_to_string - tm)) - (fun - uu___10 - -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___11 - -> - Prims.strcat - "After with_binders: about to check " - (Prims.strcat - uu___10 - "\n")))))) + "Pulse.Checker.AssertWithBinders.fst" + (Prims.of_int (191)) + (Prims.of_int (4)) + (Prims.of_int (191)) + (Prims.of_int (50))))) + (FStar_Tactics_Effect.lift_div_tac (fun + uu___8 -> + match bs1 + with + | + [] -> st1 + | uu___9 -> + { + Pulse_Syntax_Base.term1 + = + (Pulse_Syntax_Base.Tm_ProofHintWithBinders + { + Pulse_Syntax_Base.hint_type + = + Pulse_Syntax_Base.ASSERT; + Pulse_Syntax_Base.binders + = bs1; + Pulse_Syntax_Base.v + = lhs1; + Pulse_Syntax_Base.t3 + = st1 + }); + Pulse_Syntax_Base.range2 + = + (st1.Pulse_Syntax_Base.range2) + })) (fun - uu___9 -> + uu___8 -> + (fun st2 + -> Obj.magic - (check1 g - tm pre () - post_hint)) - uu___9))) - uu___9))) - uu___9))) - uu___9))) + (check1 + g1 pre () + post_hint + res_ppname + st2)) uu___8))) uu___8))) + uu___8))) + uu___7))) uu___7))) uu___6))) - uu___5))) uu___4))) - uu___3))) - uu___2))) uu___1))) uu___) \ No newline at end of file + uu___3)))) + uu___1))) uu___1))) + uu___))) uu___) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Checker_Common.ml b/src/ocaml/plugin/generated/Pulse_Checker_Base.ml similarity index 59% rename from src/ocaml/plugin/generated/Pulse_Checker_Common.ml rename to src/ocaml/plugin/generated/Pulse_Checker_Base.ml index c7d373c92..69fd2fd1a 100644 --- a/src/ocaml/plugin/generated/Pulse_Checker_Common.ml +++ b/src/ocaml/plugin/generated/Pulse_Checker_Base.ml @@ -11,14 +11,14 @@ let (format_failed_goal : FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Common.fst" - (Prims.of_int (11)) (Prims.of_int (39)) - (Prims.of_int (11)) (Prims.of_int (83))))) + (FStar_Range.mk_range "Pulse.Checker.Base.fst" + (Prims.of_int (14)) (Prims.of_int (39)) + (Prims.of_int (14)) (Prims.of_int (83))))) (FStar_Sealed.seal (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Common.fst" - (Prims.of_int (11)) (Prims.of_int (86)) - (Prims.of_int (26)) (Prims.of_int (21))))) + (FStar_Range.mk_range "Pulse.Checker.Base.fst" + (Prims.of_int (14)) (Prims.of_int (86)) + (Prims.of_int (29)) (Prims.of_int (21))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> fun ts -> @@ -30,14 +30,14 @@ let (format_failed_goal : (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Common.fst" - (Prims.of_int (12)) (Prims.of_int (24)) - (Prims.of_int (14)) (Prims.of_int (40))))) + (FStar_Range.mk_range "Pulse.Checker.Base.fst" + (Prims.of_int (15)) (Prims.of_int (24)) + (Prims.of_int (17)) (Prims.of_int (40))))) (FStar_Sealed.seal (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Common.fst" - (Prims.of_int (15)) (Prims.of_int (4)) - (Prims.of_int (26)) (Prims.of_int (21))))) + (FStar_Range.mk_range "Pulse.Checker.Base.fst" + (Prims.of_int (18)) (Prims.of_int (4)) + (Prims.of_int (29)) (Prims.of_int (21))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> fun ss -> @@ -45,18 +45,18 @@ let (format_failed_goal : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (13)) + "Pulse.Checker.Base.fst" + (Prims.of_int (16)) (Prims.of_int (18)) - (Prims.of_int (13)) + (Prims.of_int (16)) (Prims.of_int (102))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (12)) + "Pulse.Checker.Base.fst" + (Prims.of_int (15)) (Prims.of_int (24)) - (Prims.of_int (14)) + (Prims.of_int (17)) (Prims.of_int (40))))) (Obj.magic (FStar_Tactics_Util.fold_left @@ -96,18 +96,18 @@ let (format_failed_goal : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (16)) + "Pulse.Checker.Base.fst" + (Prims.of_int (19)) (Prims.of_int (36)) - (Prims.of_int (16)) + (Prims.of_int (19)) (Prims.of_int (71))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (17)) + "Pulse.Checker.Base.fst" + (Prims.of_int (20)) (Prims.of_int (2)) - (Prims.of_int (26)) + (Prims.of_int (29)) (Prims.of_int (21))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> @@ -116,18 +116,18 @@ let (format_failed_goal : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (16)) + "Pulse.Checker.Base.fst" + (Prims.of_int (19)) (Prims.of_int (50)) - (Prims.of_int (16)) + (Prims.of_int (19)) (Prims.of_int (71))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (16)) + "Pulse.Checker.Base.fst" + (Prims.of_int (19)) (Prims.of_int (36)) - (Prims.of_int (16)) + (Prims.of_int (19)) (Prims.of_int (71))))) (Obj.magic (terms_to_strings ts)) (fun uu___1 -> @@ -142,18 +142,18 @@ let (format_failed_goal : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (26)) + "Pulse.Checker.Base.fst" + (Prims.of_int (29)) (Prims.of_int (4)) - (Prims.of_int (26)) + (Prims.of_int (29)) (Prims.of_int (21))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (17)) + "Pulse.Checker.Base.fst" + (Prims.of_int (20)) (Prims.of_int (2)) - (Prims.of_int (26)) + (Prims.of_int (29)) (Prims.of_int (21))))) (Obj.magic (Pulse_Typing_Env.env_to_string @@ -165,36 +165,36 @@ let (format_failed_goal : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (17)) + "Pulse.Checker.Base.fst" + (Prims.of_int (20)) (Prims.of_int (2)) - (Prims.of_int (26)) + (Prims.of_int (29)) (Prims.of_int (21))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (17)) + "Pulse.Checker.Base.fst" + (Prims.of_int (20)) (Prims.of_int (2)) - (Prims.of_int (26)) + (Prims.of_int (29)) (Prims.of_int (21))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (25)) + "Pulse.Checker.Base.fst" + (Prims.of_int (28)) (Prims.of_int (4)) - (Prims.of_int (25)) + (Prims.of_int (28)) (Prims.of_int (23))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (17)) + "Pulse.Checker.Base.fst" + (Prims.of_int (20)) (Prims.of_int (2)) - (Prims.of_int (26)) + (Prims.of_int (29)) (Prims.of_int (21))))) (Obj.magic (format_terms @@ -207,28 +207,28 @@ let (format_failed_goal : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (17)) + "Pulse.Checker.Base.fst" + (Prims.of_int (20)) (Prims.of_int (2)) - (Prims.of_int (26)) + (Prims.of_int (29)) (Prims.of_int (21))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (17)) + "Pulse.Checker.Base.fst" + (Prims.of_int (20)) (Prims.of_int (2)) - (Prims.of_int (26)) + (Prims.of_int (29)) (Prims.of_int (21))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (24)) + "Pulse.Checker.Base.fst" + (Prims.of_int (27)) (Prims.of_int (4)) - (Prims.of_int (24)) + (Prims.of_int (27)) (Prims.of_int (23))))) (FStar_Sealed.seal (Obj.magic @@ -294,137 +294,136 @@ let (mk_abs : (Pulse_Elaborate_Pure.elab_term t) let (intro_post_hint : Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term FStar_Pervasives_Native.option -> - Pulse_Syntax_Base.term -> - (unit Pulse_Typing.post_hint_for_env, unit) - FStar_Tactics_Effect.tac_repr) + Pulse_Syntax_Base.ctag FStar_Pervasives_Native.option -> + Pulse_Syntax_Base.term FStar_Pervasives_Native.option -> + Pulse_Syntax_Base.term -> + (unit Pulse_Typing.post_hint_for_env, unit) + FStar_Tactics_Effect.tac_repr) = fun g -> - fun ret_ty_opt -> - fun post -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Common.fst" - (Prims.of_int (38)) (Prims.of_int (10)) - (Prims.of_int (38)) (Prims.of_int (17))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Common.fst" - (Prims.of_int (38)) (Prims.of_int (20)) - (Prims.of_int (50)) (Prims.of_int (109))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> Pulse_Typing_Env.fresh g)) - (fun uu___ -> - (fun x -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Common.fst" - (Prims.of_int (40)) (Prims.of_int (6)) - (Prims.of_int (42)) (Prims.of_int (19))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Common.fst" - (Prims.of_int (43)) (Prims.of_int (4)) - (Prims.of_int (50)) (Prims.of_int (109))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - match ret_ty_opt with - | FStar_Pervasives_Native.None -> - Pulse_Syntax_Base.tm_fstar - FStar_Reflection_Typing.unit_ty - FStar_Range.range_0 - | FStar_Pervasives_Native.Some t -> t)) - (fun uu___ -> - (fun ret_ty -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (44)) - (Prims.of_int (18)) - (Prims.of_int (44)) - (Prims.of_int (56))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (43)) - (Prims.of_int (4)) - (Prims.of_int (50)) - (Prims.of_int (109))))) - (Obj.magic - (Pulse_Checker_Pure.instantiate_term_implicits - g ret_ty)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | (ret_ty1, uu___1) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (45)) - (Prims.of_int (27)) - (Prims.of_int (45)) - (Prims.of_int (53))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (44)) - (Prims.of_int (59)) - (Prims.of_int (50)) - (Prims.of_int (109))))) - (Obj.magic - (Pulse_Checker_Pure.check_universe - g ret_ty1)) - (fun uu___2 -> - (fun uu___2 -> - match uu___2 with - | Prims.Mkdtuple2 - (u, ty_typing) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - ( - FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (46)) + fun ctag_opt -> + fun ret_ty_opt -> + fun post -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Base.fst" + (Prims.of_int (42)) (Prims.of_int (10)) + (Prims.of_int (42)) (Prims.of_int (17))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Base.fst" + (Prims.of_int (42)) (Prims.of_int (20)) + (Prims.of_int (54)) (Prims.of_int (129))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> Pulse_Typing_Env.fresh g)) + (fun uu___ -> + (fun x -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Base.fst" + (Prims.of_int (44)) (Prims.of_int (6)) + (Prims.of_int (46)) (Prims.of_int (19))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Base.fst" + (Prims.of_int (47)) (Prims.of_int (4)) + (Prims.of_int (54)) (Prims.of_int (129))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + match ret_ty_opt with + | FStar_Pervasives_Native.None -> + Pulse_Syntax_Base.tm_fstar + FStar_Reflection_Typing.unit_ty + FStar_Range.range_0 + | FStar_Pervasives_Native.Some t -> t)) + (fun uu___ -> + (fun ret_ty -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (48)) + (Prims.of_int (18)) + (Prims.of_int (48)) + (Prims.of_int (56))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (47)) + (Prims.of_int (4)) + (Prims.of_int (54)) + (Prims.of_int (129))))) + (Obj.magic + (Pulse_Checker_Pure.instantiate_term_implicits + g ret_ty)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | (ret_ty1, uu___1) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (49)) + (Prims.of_int (27)) + (Prims.of_int (49)) + (Prims.of_int (53))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (48)) + (Prims.of_int (59)) + (Prims.of_int (54)) + (Prims.of_int (129))))) + (Obj.magic + (Pulse_Checker_Pure.check_universe + g ret_ty1)) + (fun uu___2 -> + (fun uu___2 -> + match uu___2 with + | Prims.Mkdtuple2 + (u, ty_typing) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (50)) (Prims.of_int (32)) - (Prims.of_int (46)) + (Prims.of_int (50)) (Prims.of_int (119))))) - (FStar_Sealed.seal - (Obj.magic - ( - FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (45)) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (49)) (Prims.of_int (56)) - (Prims.of_int (50)) - (Prims.of_int (109))))) - (Obj.magic - (Pulse_Checker_Pure.check_vprop - ( - Pulse_Typing_Env.push_binding + (Prims.of_int (54)) + (Prims.of_int (129))))) + (Obj.magic + (Pulse_Checker_Pure.check_vprop + (Pulse_Typing_Env.push_binding g x Pulse_Syntax_Base.ppname_default ret_ty1) - ( - Pulse_Syntax_Naming.open_term_nv + (Pulse_Syntax_Naming.open_term_nv post (Pulse_Syntax_Base.v_as_nv x)))) - (fun uu___3 -> - FStar_Tactics_Effect.lift_div_tac - (fun + (fun uu___3 + -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___4 -> match uu___3 with @@ -436,6 +435,9 @@ let (intro_post_hint : { Pulse_Typing.g = g; + Pulse_Typing.ctag_hint + = + ctag_opt; Pulse_Typing.ret_ty = ret_ty1; Pulse_Typing.u @@ -449,21 +451,21 @@ let (intro_post_hint : Pulse_Typing.post_typing = () })))) - uu___2))) uu___))) uu___))) - uu___) + uu___2))) uu___))) + uu___))) uu___) let (post_hint_from_comp_typing : Pulse_Typing_Env.env -> Pulse_Syntax_Base.comp_st -> - (unit, unit) Pulse_Typing_Metatheory.comp_typing_u -> + (unit, unit) Pulse_Typing_Metatheory_Base.comp_typing_u -> unit Pulse_Typing.post_hint_for_env) = fun g -> fun c -> fun ct -> let st_comp_typing = - Pulse_Typing_Metatheory.comp_typing_inversion g c ct in + Pulse_Typing_Metatheory_Base.comp_typing_inversion g c ct in let uu___ = - Pulse_Typing_Metatheory.st_comp_typing_inversion g + Pulse_Typing_Metatheory_Base.st_comp_typing_inversion g (Pulse_Syntax_Base.st_comp_of_comp c) st_comp_typing in match uu___ with | FStar_Pervasives.Mkdtuple4 (ty_typing, pre_typing, x, post_typing) @@ -471,6 +473,9 @@ let (post_hint_from_comp_typing : let p = { Pulse_Typing.g = g; + Pulse_Typing.ctag_hint = + (FStar_Pervasives_Native.Some + (Pulse_Syntax_Base.ctag_of_comp_st c)); Pulse_Typing.ret_ty = (Pulse_Syntax_Base.comp_res c); Pulse_Typing.u = (Pulse_Syntax_Base.comp_u c); Pulse_Typing.ty_typing = (); @@ -478,917 +483,762 @@ let (post_hint_from_comp_typing : Pulse_Typing.post_typing = () } in p -exception Framing_failure of Pulse_Checker_Framing.framing_failure -let (uu___is_Framing_failure : Prims.exn -> Prims.bool) = - fun projectee -> - match projectee with | Framing_failure uu___ -> true | uu___ -> false -let (__proj__Framing_failure__item__uu___ : - Prims.exn -> Pulse_Checker_Framing.framing_failure) = - fun projectee -> match projectee with | Framing_failure uu___ -> uu___ -let (try_frame_pre : +type ('g, 'ctxt, 'gu, 'ctxtu) continuation_elaborator = + unit Pulse_Typing.post_hint_opt -> + (unit, unit, unit) Pulse_Typing_Combinators.st_typing_in_ctxt -> + ((unit, unit, unit) Pulse_Typing_Combinators.st_typing_in_ctxt, + unit) FStar_Tactics_Effect.tac_repr +let (k_elab_unit : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + (unit, unit, unit, unit) continuation_elaborator) + = + fun uu___1 -> + fun uu___ -> + (fun g -> + fun ctxt -> + fun p -> + fun r -> + Obj.magic (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> r))) + uu___1 uu___ +let (k_elab_trans : + Pulse_Typing_Env.env -> + Pulse_Typing_Env.env -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.term -> + (unit, unit, unit, unit) continuation_elaborator -> + (unit, unit, unit, unit) continuation_elaborator -> + (unit, unit, unit, unit) continuation_elaborator) + = + fun g0 -> + fun g1 -> + fun g2 -> + fun ctxt0 -> + fun ctxt1 -> + fun ctxt2 -> + fun k0 -> + fun k1 -> + fun post_hint -> + fun res -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Base.fst" + (Prims.of_int (78)) (Prims.of_int (39)) + (Prims.of_int (78)) (Prims.of_int (57))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Base.fst" + (Prims.of_int (78)) (Prims.of_int (26)) + (Prims.of_int (78)) (Prims.of_int (57))))) + (Obj.magic (k1 post_hint res)) + (fun uu___ -> + (fun uu___ -> Obj.magic (k0 post_hint uu___)) + uu___) +let (comp_st_with_post : + Pulse_Syntax_Base.comp_st -> + Pulse_Syntax_Base.term -> Pulse_Syntax_Base.comp_st) + = + fun c -> + fun post -> + match c with + | Pulse_Syntax_Base.C_ST st -> + Pulse_Syntax_Base.C_ST + { + Pulse_Syntax_Base.u = (st.Pulse_Syntax_Base.u); + Pulse_Syntax_Base.res = (st.Pulse_Syntax_Base.res); + Pulse_Syntax_Base.pre = (st.Pulse_Syntax_Base.pre); + Pulse_Syntax_Base.post = post + } + | Pulse_Syntax_Base.C_STGhost (i, st) -> + Pulse_Syntax_Base.C_STGhost + (i, + { + Pulse_Syntax_Base.u = (st.Pulse_Syntax_Base.u); + Pulse_Syntax_Base.res = (st.Pulse_Syntax_Base.res); + Pulse_Syntax_Base.pre = (st.Pulse_Syntax_Base.pre); + Pulse_Syntax_Base.post = post + }) + | Pulse_Syntax_Base.C_STAtomic (i, st) -> + Pulse_Syntax_Base.C_STAtomic + (i, + { + Pulse_Syntax_Base.u = (st.Pulse_Syntax_Base.u); + Pulse_Syntax_Base.res = (st.Pulse_Syntax_Base.res); + Pulse_Syntax_Base.pre = (st.Pulse_Syntax_Base.pre); + Pulse_Syntax_Base.post = post + }) +let (st_equiv_post : Pulse_Typing_Env.env -> Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.term -> - unit -> - Pulse_Syntax_Base.comp_st -> - (unit, unit, unit) Pulse_Typing.st_typing -> - ((Pulse_Syntax_Base.comp_st, - (unit, unit, unit) Pulse_Typing.st_typing) Prims.dtuple2, - unit) FStar_Tactics_Effect.tac_repr) + Pulse_Syntax_Base.comp_st -> + (unit, unit, unit) Pulse_Typing.st_typing -> + Pulse_Syntax_Base.term -> + unit -> (unit, unit, unit) Pulse_Typing.st_typing) = fun g -> fun t -> - fun pre -> - fun pre_typing -> - fun c -> - fun t_typing -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Common.fst" - (Prims.of_int (71)) (Prims.of_int (12)) - (Prims.of_int (71)) (Prims.of_int (53))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Common.fst" - (Prims.of_int (72)) (Prims.of_int (4)) - (Prims.of_int (80)) (Prims.of_int (48))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - Pulse_Checker_Pure.push_context "try_frame_pre" - t.Pulse_Syntax_Base.range2 g)) - (fun uu___ -> - (fun g1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (72)) (Prims.of_int (4)) - (Prims.of_int (77)) (Prims.of_int (56))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (78)) (Prims.of_int (4)) - (Prims.of_int (80)) (Prims.of_int (48))))) - (if - Pulse_RuntimeUtils.debug_at_level - (Pulse_Typing_Env.fstar_env g1) "try_frame" - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (73)) - (Prims.of_int (17)) - (Prims.of_int (77)) - (Prims.of_int (56))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (73)) - (Prims.of_int (9)) - (Prims.of_int (77)) - (Prims.of_int (56))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (77)) - (Prims.of_int (33)) - (Prims.of_int (77)) - (Prims.of_int (55))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (73)) - (Prims.of_int (17)) - (Prims.of_int (77)) - (Prims.of_int (56))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - pre)) - (fun uu___ -> - (fun uu___ -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (73)) - (Prims.of_int (17)) - (Prims.of_int (77)) - (Prims.of_int (56))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (73)) - (Prims.of_int (17)) - (Prims.of_int (77)) - (Prims.of_int (56))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (76)) - (Prims.of_int (33)) - (Prims.of_int (76)) - (Prims.of_int (53))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (73)) - (Prims.of_int (17)) - (Prims.of_int (77)) - (Prims.of_int (56))))) - (Obj.magic - (Pulse_Syntax_Printer.comp_to_string - c)) - (fun uu___1 -> - (fun uu___1 - -> - Obj.magic + fun c -> + fun d -> + fun post -> + fun veq -> + let c' = comp_st_with_post c post in + let uu___ = + Pulse_Typing_Metatheory_Base.st_comp_typing_inversion g + (Pulse_Syntax_Base.st_comp_of_comp c) + (Pulse_Typing_Metatheory_Base.comp_typing_inversion g c + (Pulse_Typing_Metatheory_Base.st_typing_correctness g t + c d)) in + match uu___ with + | FStar_Pervasives.Mkdtuple4 (u_of, pre_typing, x, post_typing) + -> + let st_equiv = + Pulse_Typing.ST_VPropEquiv + (g, c, c', x, (), (), (), (), ()) in + Pulse_Typing.T_Equiv (g, t, c, c', d, st_equiv) +let (simplify_post : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.st_term -> + Pulse_Syntax_Base.comp_st -> + (unit, unit, unit) Pulse_Typing.st_typing -> + Pulse_Syntax_Base.term -> (unit, unit, unit) Pulse_Typing.st_typing) + = + fun g -> + fun t -> fun c -> fun d -> fun post -> st_equiv_post g t c d post () + +let (k_elab_equiv_continutation : + Pulse_Typing_Env.env -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.term -> + (unit, unit, unit, unit) continuation_elaborator -> + unit -> (unit, unit, unit, unit) continuation_elaborator) + = + fun g1 -> + fun g2 -> + fun ctxt -> + fun ctxt1 -> + fun ctxt2 -> + fun k -> + fun d -> + fun post_hint -> + fun res -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Base.fst" + (Prims.of_int (134)) (Prims.of_int (60)) + (Prims.of_int (137)) (Prims.of_int (33))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Base.fst" + (Prims.of_int (138)) (Prims.of_int (4)) + (Prims.of_int (146)) (Prims.of_int (32))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + FStar_Pervasives.Mkdtuple3 + (Pulse_Syntax_Base.tm_emp, (), ()))) + (fun uu___ -> + (fun framing_token -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (139)) + (Prims.of_int (26)) + (Prims.of_int (139)) + (Prims.of_int (29))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (138)) + (Prims.of_int (4)) + (Prims.of_int (146)) + (Prims.of_int (32))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> res)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | FStar_Pervasives.Mkdtuple3 + (st, c, st_d) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (141)) + (Prims.of_int (16)) + (Prims.of_int (141)) + (Prims.of_int (93))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (139)) + (Prims.of_int (32)) + (Prims.of_int (146)) + (Prims.of_int (32))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + Pulse_Typing_Metatheory_Base.st_comp_typing_inversion + g2 + (Pulse_Syntax_Base.st_comp_of_comp + c) + (Pulse_Typing_Metatheory_Base.comp_typing_inversion + g2 c + (Pulse_Typing_Metatheory_Base.st_typing_correctness + g2 st c st_d)))) + (fun uu___1 -> + (fun uu___1 -> + match uu___1 with + | FStar_Pervasives.Mkdtuple4 + (uu___2, + pre_typing, + uu___3, uu___4) + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (143)) + (Prims.of_int (4)) + (Prims.of_int (143)) + (Prims.of_int (71))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (141)) + (Prims.of_int (97)) + (Prims.of_int (146)) + (Prims.of_int (32))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___5 + -> + Pulse_Typing_Combinators.apply_frame + g2 st + ctxt1 () + c st_d + framing_token)) + (fun uu___5 -> + (fun uu___5 + -> + match uu___5 + with + | + Prims.Mkdtuple2 + (c', + st_d') -> + Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (73)) - (Prims.of_int (17)) - (Prims.of_int (77)) - (Prims.of_int (56))))) + "Pulse.Checker.Base.fst" + (Prims.of_int (145)) + (Prims.of_int (14)) + (Prims.of_int (145)) + (Prims.of_int (47))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (73)) - (Prims.of_int (17)) - (Prims.of_int (77)) - (Prims.of_int (56))))) - (Obj.magic + "Pulse.Checker.Base.fst" + (Prims.of_int (146)) + (Prims.of_int (2)) + (Prims.of_int (146)) + (Prims.of_int (32))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___6 -> + simplify_post + g2 st c' + st_d' + (Pulse_Syntax_Base.comp_post + c))) + (fun + uu___6 -> + (fun + st_d'1 -> + Obj.magic + (k + post_hint + (FStar_Pervasives.Mkdtuple3 + (st, + (comp_st_with_post + c' + (Pulse_Syntax_Base.comp_post + c)), + st_d'1)))) + uu___6))) + uu___5))) + uu___1))) uu___))) uu___) + +let (k_elab_equiv_prefix : + Pulse_Typing_Env.env -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.term -> + (unit, unit, unit, unit) continuation_elaborator -> + unit -> (unit, unit, unit, unit) continuation_elaborator) + = + fun g1 -> + fun g2 -> + fun ctxt1 -> + fun ctxt2 -> + fun ctxt -> + fun k -> + fun d -> + fun post_hint -> + fun res -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Base.fst" + (Prims.of_int (162)) (Prims.of_int (60)) + (Prims.of_int (164)) (Prims.of_int (31))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Base.fst" + (Prims.of_int (165)) (Prims.of_int (4)) + (Prims.of_int (179)) (Prims.of_int (5))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + FStar_Pervasives.Mkdtuple3 + (Pulse_Syntax_Base.tm_emp, (), ()))) + (fun uu___ -> + (fun framing_token -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (166)) + (Prims.of_int (12)) + (Prims.of_int (166)) + (Prims.of_int (27))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (166)) + (Prims.of_int (30)) + (Prims.of_int (179)) + (Prims.of_int (5))))) + (Obj.magic (k post_hint res)) + (fun res1 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + match res1 with + | FStar_Pervasives.Mkdtuple3 + (st, c, st_d) -> + (match Pulse_Typing_Metatheory_Base.st_comp_typing_inversion + g1 + (Pulse_Syntax_Base.st_comp_of_comp + c) + (Pulse_Typing_Metatheory_Base.comp_typing_inversion + g1 c + (Pulse_Typing_Metatheory_Base.st_typing_correctness + g1 st c st_d)) + with + | FStar_Pervasives.Mkdtuple4 + (uu___1, pre_typing, + uu___2, uu___3) + -> + (match Pulse_Typing_Combinators.apply_frame + g1 st ctxt2 () c + st_d framing_token + with + | Prims.Mkdtuple2 + (c', st_d') -> + FStar_Pervasives.Mkdtuple3 + (st, + (comp_st_with_post + c' + (Pulse_Syntax_Base.comp_post + c)), + (simplify_post g1 + st c' st_d' + (Pulse_Syntax_Base.comp_post + c))))))))) + uu___) +let (k_elab_equiv : + Pulse_Typing_Env.env -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.term -> + (unit, unit, unit, unit) continuation_elaborator -> + unit -> + unit -> (unit, unit, unit, unit) continuation_elaborator) + = + fun g1 -> + fun g2 -> + fun ctxt1 -> + fun ctxt1' -> + fun ctxt2 -> + fun ctxt2' -> + fun k -> + fun d1 -> + fun d2 -> + let k1 = + k_elab_equiv_continutation g1 g2 ctxt1 ctxt2 ctxt2' k + () in + let k2 = + k_elab_equiv_prefix g1 g2 ctxt1 ctxt1' ctxt2' k1 () in + k2 +let (continuation_elaborator_with_bind : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.comp -> + Pulse_Syntax_Base.st_term -> + (unit, unit, unit) Pulse_Typing.st_typing -> + unit -> + Pulse_Syntax_Base.nvar -> + ((unit, unit, unit, unit) continuation_elaborator, unit) + FStar_Tactics_Effect.tac_repr) + = + fun uu___6 -> + fun uu___5 -> + fun uu___4 -> + fun uu___3 -> + fun uu___2 -> + fun uu___1 -> + fun uu___ -> + (fun g -> + fun ctxt -> + fun c1 -> + fun e1 -> + fun e1_typing -> + fun ctxt_pre1_typing -> + fun x -> + Obj.magic + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + match Pulse_Typing_Combinators.apply_frame + g e1 + (Pulse_Syntax_Base.tm_star + ctxt + (Pulse_Syntax_Base.comp_pre + c1)) () c1 e1_typing + (FStar_Pervasives.Mkdtuple3 + (ctxt, (), ())) + with + | Prims.Mkdtuple2 (c11, e1_typing1) -> + (match Pulse_Typing_Metatheory_Base.st_comp_typing_inversion + g + (Pulse_Syntax_Base.st_comp_of_comp + c11) + (Pulse_Typing_Metatheory_Base.comp_typing_inversion + g c11 + (Pulse_Typing_Metatheory_Base.st_typing_correctness + g e1 c11 e1_typing1)) + with + | FStar_Pervasives.Mkdtuple4 + (u_of_1, pre_typing, uu___1, + uu___2) + -> + (match x with + | (ppname, x1) -> + (fun post_hint -> + fun res -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (228)) + (Prims.of_int (34)) + (Prims.of_int (228)) + (Prims.of_int (37))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (227)) + (Prims.of_int (24)) + (Prims.of_int (256)) + (Prims.of_int (5))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___3 -> + res)) + (fun uu___3 -> + (fun uu___3 -> + match uu___3 + with + | FStar_Pervasives.Mkdtuple3 + (e2, c2, + e2_typing) + -> + Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (75)) - (Prims.of_int (33)) - (Prims.of_int (75)) + "Pulse.Checker.Base.fst" + (Prims.of_int (229)) + (Prims.of_int (41)) + (Prims.of_int (229)) (Prims.of_int (50))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (73)) - (Prims.of_int (17)) - (Prims.of_int (77)) - (Prims.of_int (56))))) - (Obj.magic - (Pulse_Typing_Env.print_context - g1)) + "Pulse.Checker.Base.fst" + (Prims.of_int (229)) + (Prims.of_int (53)) + (Prims.of_int (256)) + (Prims.of_int (5))))) + (FStar_Tactics_Effect.lift_div_tac (fun - uu___2 -> + uu___4 -> + e2_typing)) (fun - uu___2 -> + uu___4 -> + (fun + e2_typing1 + -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (73)) - (Prims.of_int (17)) - (Prims.of_int (77)) - (Prims.of_int (56))))) + "Pulse.Checker.Base.fst" + (Prims.of_int (230)) + (Prims.of_int (20)) + (Prims.of_int (230)) + (Prims.of_int (38))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (73)) - (Prims.of_int (17)) - (Prims.of_int (77)) - (Prims.of_int (56))))) - (Obj.magic + "Pulse.Checker.Base.fst" + (Prims.of_int (241)) + (Prims.of_int (4)) + (Prims.of_int (256)) + (Prims.of_int (5))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + Pulse_Syntax_Naming.close_st_term + e2 x1)) + (fun + uu___4 -> + (fun + e2_closed + -> + if + FStar_Set.mem + x1 + (Pulse_Syntax_Naming.freevars + (Pulse_Syntax_Base.comp_post + c2)) + then + Obj.magic + (Pulse_Typing_Env.fail + (Pulse_Typing_Env.push_binding + g x1 + ppname + (Pulse_Syntax_Base.comp_res + c1)) + FStar_Pervasives_Native.None + "Impossible: freevar clash when constructing continuation elaborator for bind, please file a bug-report") + else + Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (74)) - (Prims.of_int (33)) - (Prims.of_int (74)) - (Prims.of_int (60))))) + "Pulse.Checker.Base.fst" + (Prims.of_int (245)) + (Prims.of_int (8)) + (Prims.of_int (245)) + (Prims.of_int (92))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "FStar.Printf.fst" - (Prims.of_int (121)) - (Prims.of_int (8)) - (Prims.of_int (123)) - (Prims.of_int (44))))) + "Pulse.Checker.Base.fst" + (Prims.of_int (243)) + (Prims.of_int (9)) + (Prims.of_int (256)) + (Prims.of_int (5))))) (Obj.magic - (FStar_Tactics_V2_Builtins.range_to_string - t.Pulse_Syntax_Base.range2)) - (fun - uu___3 -> - FStar_Tactics_Effect.lift_div_tac + (Pulse_Typing_Combinators.bind_res_and_post_typing + g + (Pulse_Syntax_Base.st_comp_of_comp + c2) x1 + post_hint)) (fun - uu___4 -> - fun x -> - fun x1 -> - fun x2 -> - Prims.strcat - (Prims.strcat - (Prims.strcat - (Prims.strcat - "(Try frame@" - (Prims.strcat - uu___3 - ") with ")) - (Prims.strcat - x - "\n\tcomp=")) - (Prims.strcat - x1 - ",\n\tpre=")) - (Prims.strcat - x2 "\n"))))) - (fun - uu___3 -> - FStar_Tactics_Effect.lift_div_tac + uu___5 -> (fun - uu___4 -> - uu___3 - uu___2)))) - uu___2))) + uu___5 -> + match uu___5 + with + | + (t_typing, + post_typing) + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (247)) + (Prims.of_int (8)) + (Prims.of_int (253)) + (Prims.of_int (21))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (245)) + (Prims.of_int (95)) + (Prims.of_int (255)) + (Prims.of_int (26))))) + (Obj.magic + (Pulse_Typing_Combinators.mk_bind + g + (Pulse_Syntax_Base.tm_star + ctxt + (Pulse_Syntax_Base.comp_pre + c1)) e1 + e2_closed + c11 c2 + (ppname, + x1) + e1_typing1 + () + e2_typing1 + () ())) (fun - uu___2 -> + uu___6 -> FStar_Tactics_Effect.lift_div_tac (fun - uu___3 -> - uu___2 - uu___1)))) - uu___1))) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - uu___1 uu___)))) - uu___))) - (fun uu___ -> - (fun uu___ -> - Obj.magic - (FStar_Tactics_V2_Builtins.print - uu___)) uu___))) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> ())))) - (fun uu___ -> - (fun uu___ -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (78)) - (Prims.of_int (10)) - (Prims.of_int (78)) - (Prims.of_int (68))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (78)) - (Prims.of_int (4)) - (Prims.of_int (80)) - (Prims.of_int (48))))) - (Obj.magic - (Pulse_Checker_Framing.try_frame_pre - g1 t pre () c t_typing)) - (fun uu___1 -> - match uu___1 with - | FStar_Pervasives.Inl ok -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> ok) - | FStar_Pervasives.Inr fail -> - FStar_Tactics_Effect.raise - (Framing_failure fail)))) - uu___))) uu___) + uu___7 -> + match uu___6 + with + | + FStar_Pervasives.Mkdtuple3 + (e, c, + e_typing) + -> + FStar_Pervasives.Mkdtuple3 + (e, c, + e_typing))))) + uu___5))) + uu___4))) + uu___4))) + uu___3))))))) + uu___6 uu___5 uu___4 uu___3 uu___2 uu___1 uu___ +let (continuation_elaborator_with_tot_bind : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + unit -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.term -> + unit -> + Pulse_Syntax_Base.nvar -> + ((unit, unit, unit, unit) continuation_elaborator, unit) + FStar_Tactics_Effect.tac_repr) + = + fun uu___6 -> + fun uu___5 -> + fun uu___4 -> + fun uu___3 -> + fun uu___2 -> + fun uu___1 -> + fun uu___ -> + (fun g -> + fun ctxt -> + fun ctxt_typing -> + fun e1 -> + fun t1 -> + fun e1_typing -> + fun x -> + Obj.magic + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + (fun uu___ -> + fun post_hint -> + fun uu___1 -> + Obj.magic + (FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + match uu___1 with + | FStar_Pervasives.Mkdtuple3 + (e2, c2, d2) -> + (match x with + | (ppname, x1) -> + FStar_Pervasives.Mkdtuple3 + ((Pulse_Typing.wr + (Pulse_Syntax_Base.Tm_TotBind + { + Pulse_Syntax_Base.head2 + = e1; + Pulse_Syntax_Base.body2 + = + (Pulse_Syntax_Naming.close_st_term + e2 x1) + })), + (Pulse_Syntax_Naming.open_comp_with + (Pulse_Syntax_Naming.close_comp + c2 x1) e1), + (Pulse_Typing.T_TotBind + (g, e1, + (Pulse_Syntax_Naming.close_st_term + e2 x1), + t1, c2, + x1, (), + d2))))))) + uu___))) uu___6 uu___5 uu___4 uu___3 + uu___2 uu___1 uu___ +let rec (check_equiv_emp : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> unit FStar_Pervasives_Native.option) + = + fun g -> + fun vp -> + match vp.Pulse_Syntax_Base.t with + | Pulse_Syntax_Base.Tm_Emp -> FStar_Pervasives_Native.Some () + | Pulse_Syntax_Base.Tm_Star (vp1, vp2) -> + (match ((check_equiv_emp g vp1), (check_equiv_emp g vp2)) with + | (FStar_Pervasives_Native.Some d1, FStar_Pervasives_Native.Some + d2) -> FStar_Pervasives_Native.Some () + | (uu___, uu___1) -> FStar_Pervasives_Native.None) + | uu___ -> FStar_Pervasives_Native.None +type ('g, 'postuhint, 'x, 't, 'ctxtu) checker_res_matches_post_hint = Obj.t +type ('g, 'postuhint, 'x, 'g1, 't, 'ctxtu) checker_result_inv = Obj.t type ('g, 'ctxt, 'postuhint) checker_result_t = - (Pulse_Syntax_Base.st_term, Pulse_Syntax_Base.comp, - (unit, unit, unit) Pulse_Typing.st_typing) FStar_Pervasives.dtuple3 + (Pulse_Syntax_Base.var, Pulse_Typing_Env.env, + (Pulse_Syntax_Base.universe, Pulse_Syntax_Base.typ, unit) + FStar_Pervasives.dtuple3, + (Pulse_Syntax_Base.vprop, unit) Prims.dtuple2, + (unit, unit, unit, unit) continuation_elaborator) + FStar_Pervasives.dtuple5 type check_t = Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.term -> - unit -> - unit Pulse_Typing.post_hint_opt -> - ((unit, unit, unit) checker_result_t, unit) - FStar_Tactics_Effect.tac_repr -let (replace_equiv_post : - Pulse_Syntax_Base.range -> - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.comp -> - (unit, unit) Pulse_Typing_Metatheory.comp_typing_u -> - unit Pulse_Typing.post_hint_opt -> - ((Pulse_Syntax_Base.comp, - (unit, unit, unit) Pulse_Typing.st_equiv) Prims.dtuple2, - unit) FStar_Tactics_Effect.tac_repr) - = - fun r -> - fun g -> - fun c -> - fun ct -> - fun post_hint -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Common.fst" - (Prims.of_int (91)) (Prims.of_int (12)) - (Prims.of_int (91)) (Prims.of_int (52))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Common.fst" - (Prims.of_int (91)) (Prims.of_int (55)) - (Prims.of_int (141)) (Prims.of_int (7))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - Pulse_Checker_Pure.push_context "replace_equiv_post" r g)) - (fun uu___ -> - (fun g1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (92)) (Prims.of_int (50)) - (Prims.of_int (92)) (Prims.of_int (67))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (91)) (Prims.of_int (55)) - (Prims.of_int (141)) (Prims.of_int (7))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> Pulse_Syntax_Base.st_comp_of_comp c)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | { Pulse_Syntax_Base.u = u_c; - Pulse_Syntax_Base.res = res_c; - Pulse_Syntax_Base.pre = pre_c; - Pulse_Syntax_Base.post = post_c;_} -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (93)) - (Prims.of_int (20)) - (Prims.of_int (93)) - (Prims.of_int (55))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (93)) - (Prims.of_int (58)) - (Prims.of_int (141)) - (Prims.of_int (7))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - Pulse_Typing_Metatheory.comp_typing_inversion - g c ct)) - (fun uu___1 -> - (fun st_typing -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (94)) - (Prims.of_int (61)) - (Prims.of_int (94)) - (Prims.of_int (106))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (93)) - (Prims.of_int (58)) - (Prims.of_int (141)) - (Prims.of_int (7))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - Pulse_Typing_Metatheory.st_comp_typing_inversion - g - (Pulse_Syntax_Base.st_comp_of_comp - c) st_typing)) - (fun uu___1 -> - (fun uu___1 -> - match uu___1 with - | FStar_Pervasives.Mkdtuple4 - (res_c_typing, - pre_c_typing, - x, - post_c_typing) - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (95)) - (Prims.of_int (13)) - (Prims.of_int (95)) - (Prims.of_int (22))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (95)) - (Prims.of_int (25)) - (Prims.of_int (141)) - (Prims.of_int (7))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___2 -> - Pulse_Syntax_Base.v_as_nv - x)) - (fun uu___2 - -> - (fun px - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (96)) - (Prims.of_int (17)) - (Prims.of_int (96)) - (Prims.of_int (48))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (96)) - (Prims.of_int (51)) - (Prims.of_int (141)) - (Prims.of_int (7))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___2 -> - Pulse_Typing_Env.push_binding - g1 x - (FStar_Pervasives_Native.fst - px) res_c)) - (fun - uu___2 -> - (fun - g_post -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (97)) - (Prims.of_int (24)) - (Prims.of_int (97)) - (Prims.of_int (46))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (98)) - (Prims.of_int (4)) - (Prims.of_int (141)) - (Prims.of_int (7))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___2 -> - Pulse_Syntax_Naming.open_term_nv - post_c px)) - (fun - uu___2 -> - (fun - post_c_opened - -> - match post_hint - with - | - FStar_Pervasives_Native.None - -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___2 -> - Prims.Mkdtuple2 - (c, - (Pulse_Typing.ST_VPropEquiv - (g1, c, - c, x, (), - (), (), - (), ())))))) - | - FStar_Pervasives_Native.Some - post -> - Obj.magic - (Obj.repr - (if - Prims.op_Negation - ((Pulse_Syntax_Base.eq_univ - u_c - post.Pulse_Typing.u) - && - (Pulse_Syntax_Base.eq_tm - res_c - post.Pulse_Typing.ret_ty)) - then - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (109)) - (Prims.of_int (12)) - (Prims.of_int (114)) - (Prims.of_int (43))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (108)) - (Prims.of_int (11)) - (Prims.of_int (114)) - (Prims.of_int (43))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (114)) - (Prims.of_int (18)) - (Prims.of_int (114)) - (Prims.of_int (42))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (109)) - (Prims.of_int (12)) - (Prims.of_int (114)) - (Prims.of_int (43))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - res_c)) - (fun - uu___2 -> - (fun - uu___2 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (109)) - (Prims.of_int (12)) - (Prims.of_int (114)) - (Prims.of_int (43))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (109)) - (Prims.of_int (12)) - (Prims.of_int (114)) - (Prims.of_int (43))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (113)) - (Prims.of_int (18)) - (Prims.of_int (113)) - (Prims.of_int (48))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (109)) - (Prims.of_int (12)) - (Prims.of_int (114)) - (Prims.of_int (43))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - post.Pulse_Typing.ret_ty)) - (fun - uu___3 -> - (fun - uu___3 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (109)) - (Prims.of_int (12)) - (Prims.of_int (114)) - (Prims.of_int (43))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (109)) - (Prims.of_int (12)) - (Prims.of_int (114)) - (Prims.of_int (43))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (112)) - (Prims.of_int (18)) - (Prims.of_int (112)) - (Prims.of_int (39))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "FStar.Printf.fst" - (Prims.of_int (121)) - (Prims.of_int (8)) - (Prims.of_int (123)) - (Prims.of_int (44))))) - (Obj.magic - (FStar_Tactics_V2_Builtins.range_to_string - r)) - (fun - uu___4 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___5 -> - fun x1 -> - fun x2 -> - Prims.strcat - (Prims.strcat - (Prims.strcat - "(" - (Prims.strcat - uu___4 - ") Inferred result type does not match annotation.\nExpected type ")) - (Prims.strcat - x1 - "\nGot type ")) - (Prims.strcat - x2 "\n"))))) - (fun - uu___4 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___5 -> - uu___4 - uu___3)))) - uu___3))) - (fun - uu___3 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - uu___3 - uu___2)))) - uu___2))) - (fun - uu___2 -> - (fun - uu___2 -> - Obj.magic - (Pulse_Typing_Env.fail - g1 - FStar_Pervasives_Native.None - uu___2)) - uu___2) - else - if - FStar_Set.mem - x - (Pulse_Syntax_Naming.freevars - post.Pulse_Typing.post) - then - Pulse_Typing_Env.fail - g1 - FStar_Pervasives_Native.None - "Unexpected variable clash with annotated postcondition" - else - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (118)) - (Prims.of_int (26)) - (Prims.of_int (118)) - (Prims.of_int (51))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (118)) - (Prims.of_int (54)) - (Prims.of_int (140)) - (Prims.of_int (30))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - Pulse_Syntax_Naming.open_term_nv - post.Pulse_Typing.post - px)) - (fun - uu___4 -> - (fun - post_opened - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (121)) - (Prims.of_int (12)) - (Prims.of_int (125)) - (Prims.of_int (27))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (136)) - (Prims.of_int (8)) - (Prims.of_int (140)) - (Prims.of_int (30))))) - (Obj.magic - (Pulse_Checker_Framing.check_vprop_equiv - (Pulse_Checker_Pure.push_context - "check_vprop_equiv" - r g_post) - post_c_opened - post_opened - ())) - (fun - post_c_post_eq - -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - Prims.Mkdtuple2 - ((Pulse_Syntax_Base.with_st_comp - c - { - Pulse_Syntax_Base.u - = u_c; - Pulse_Syntax_Base.res - = res_c; - Pulse_Syntax_Base.pre - = pre_c; - Pulse_Syntax_Base.post - = - (Pulse_Syntax_Naming.close_term - post_opened - x) - }), - (Pulse_Typing.ST_VPropEquiv - (g1, c, - (Pulse_Syntax_Base.with_st_comp - c - { - Pulse_Syntax_Base.u - = u_c; - Pulse_Syntax_Base.res - = res_c; - Pulse_Syntax_Base.pre - = pre_c; - Pulse_Syntax_Base.post - = - (Pulse_Syntax_Naming.close_term - post_opened - x) - }), x, - (), (), - (), (), - ()))))))) - uu___4)))) - uu___2))) - uu___2))) - uu___2))) - uu___1))) uu___1))) - uu___))) uu___) -let (repack : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.st_term -> - (Pulse_Syntax_Base.comp_st, - (unit, unit, unit) Pulse_Typing.st_typing) Prims.dtuple2 -> - unit Pulse_Typing.post_hint_opt -> - ((unit, unit, unit) checker_result_t, unit) - FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun pre -> - fun t -> - fun x -> - fun post_hint -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Common.fst" - (Prims.of_int (148)) (Prims.of_int (23)) - (Prims.of_int (148)) (Prims.of_int (24))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Common.fst" - (Prims.of_int (148)) (Prims.of_int (3)) - (Prims.of_int (155)) (Prims.of_int (24))))) - (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> x)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | Prims.Mkdtuple2 (c, d_c) -> - if Pulse_Syntax_Base.stateful_comp c - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (152)) - (Prims.of_int (30)) - (Prims.of_int (152)) - (Prims.of_int (109))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (151)) - (Prims.of_int (32)) - (Prims.of_int (153)) - (Prims.of_int (46))))) - (Obj.magic - (replace_equiv_post - t.Pulse_Syntax_Base.range2 g c - (Pulse_Typing_Metatheory.st_typing_correctness - g t c d_c) post_hint)) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - match uu___1 with - | Prims.Mkdtuple2 (c1, c_c1_eq) -> - FStar_Pervasives.Mkdtuple3 - (t, c1, - (Pulse_Typing.T_Equiv - (g, t, c, c1, d_c, - c_c1_eq))))))) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - FStar_Pervasives.Mkdtuple3 (t, c, d_c))))) - uu___) -let (intro_comp_typing : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.comp_st -> - unit -> + Pulse_Syntax_Base.vprop -> + unit -> + unit Pulse_Typing.post_hint_opt -> + Pulse_Syntax_Base.ppname -> + Pulse_Syntax_Base.st_term -> + ((unit, unit, unit) checker_result_t, unit) + FStar_Tactics_Effect.tac_repr +let (intro_comp_typing : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.comp_st -> + unit -> unit -> Pulse_Syntax_Base.var -> unit -> @@ -1404,14 +1254,14 @@ let (intro_comp_typing : FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Common.fst" - (Prims.of_int (169)) (Prims.of_int (8)) - (Prims.of_int (169)) (Prims.of_int (52))))) + (FStar_Range.mk_range "Pulse.Checker.Base.fst" + (Prims.of_int (335)) (Prims.of_int (8)) + (Prims.of_int (335)) (Prims.of_int (52))))) (FStar_Sealed.seal (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Common.fst" - (Prims.of_int (171)) (Prims.of_int (4)) - (Prims.of_int (186)) (Prims.of_int (44))))) + (FStar_Range.mk_range "Pulse.Checker.Base.fst" + (Prims.of_int (337)) (Prims.of_int (4)) + (Prims.of_int (352)) (Prims.of_int (44))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___1 -> fun uu___ -> @@ -1431,18 +1281,18 @@ let (intro_comp_typing : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (173)) + "Pulse.Checker.Base.fst" + (Prims.of_int (339)) (Prims.of_int (16)) - (Prims.of_int (173)) + (Prims.of_int (339)) (Prims.of_int (39))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (174)) + "Pulse.Checker.Base.fst" + (Prims.of_int (340)) (Prims.of_int (6)) - (Prims.of_int (174)) + (Prims.of_int (340)) (Prims.of_int (19))))) (Obj.magic (intro_st_comp_typing st)) (fun stc -> @@ -1455,18 +1305,18 @@ let (intro_comp_typing : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (176)) + "Pulse.Checker.Base.fst" + (Prims.of_int (342)) (Prims.of_int (16)) - (Prims.of_int (176)) + (Prims.of_int (342)) (Prims.of_int (39))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (176)) + "Pulse.Checker.Base.fst" + (Prims.of_int (342)) (Prims.of_int (42)) - (Prims.of_int (180)) + (Prims.of_int (346)) (Prims.of_int (45))))) (Obj.magic (intro_st_comp_typing st)) (fun uu___ -> @@ -1476,18 +1326,18 @@ let (intro_comp_typing : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (177)) + "Pulse.Checker.Base.fst" + (Prims.of_int (343)) (Prims.of_int (31)) - (Prims.of_int (177)) + (Prims.of_int (343)) (Prims.of_int (53))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (176)) + "Pulse.Checker.Base.fst" + (Prims.of_int (342)) (Prims.of_int (42)) - (Prims.of_int (180)) + (Prims.of_int (346)) (Prims.of_int (45))))) (Obj.magic (Pulse_Checker_Pure.core_check_term @@ -1505,10 +1355,68 @@ let (intro_comp_typing : then Obj.magic (Obj.repr - (Pulse_Typing_Env.fail - g - FStar_Pervasives_Native.None - "Ill-typed inames")) + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + ( + FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (345)) + (Prims.of_int (23)) + (Prims.of_int (345)) + (Prims.of_int (87))))) + (FStar_Sealed.seal + (Obj.magic + ( + FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (345)) + (Prims.of_int (11)) + (Prims.of_int (345)) + (Prims.of_int (87))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + ( + FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (345)) + (Prims.of_int (66)) + (Prims.of_int (345)) + (Prims.of_int (86))))) + ( + FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + ( + Obj.magic + (Pulse_Syntax_Printer.term_to_string + i)) + ( + fun + uu___1 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___2 -> + Prims.strcat + "ill-typed inames term " + (Prims.strcat + uu___1 ""))))) + (fun uu___1 -> + (fun uu___1 + -> + Obj.magic + (Pulse_Typing_Env.fail + g + FStar_Pervasives_Native.None + uu___1)) + uu___1))) else Obj.magic (Obj.repr @@ -1524,18 +1432,18 @@ let (intro_comp_typing : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (182)) + "Pulse.Checker.Base.fst" + (Prims.of_int (348)) (Prims.of_int (16)) - (Prims.of_int (182)) + (Prims.of_int (348)) (Prims.of_int (39))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (182)) + "Pulse.Checker.Base.fst" + (Prims.of_int (348)) (Prims.of_int (42)) - (Prims.of_int (186)) + (Prims.of_int (352)) (Prims.of_int (44))))) (Obj.magic (intro_st_comp_typing st)) (fun uu___ -> @@ -1545,18 +1453,18 @@ let (intro_comp_typing : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (183)) + "Pulse.Checker.Base.fst" + (Prims.of_int (349)) (Prims.of_int (31)) - (Prims.of_int (183)) + (Prims.of_int (349)) (Prims.of_int (53))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Checker.Common.fst" - (Prims.of_int (182)) + "Pulse.Checker.Base.fst" + (Prims.of_int (348)) (Prims.of_int (42)) - (Prims.of_int (186)) + (Prims.of_int (352)) (Prims.of_int (44))))) (Obj.magic (Pulse_Checker_Pure.core_check_term @@ -1574,10 +1482,68 @@ let (intro_comp_typing : then Obj.magic (Obj.repr - (Pulse_Typing_Env.fail - g - FStar_Pervasives_Native.None - "Ill-typed inames")) + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + ( + FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (351)) + (Prims.of_int (23)) + (Prims.of_int (351)) + (Prims.of_int (87))))) + (FStar_Sealed.seal + (Obj.magic + ( + FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (351)) + (Prims.of_int (11)) + (Prims.of_int (351)) + (Prims.of_int (87))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + ( + FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (351)) + (Prims.of_int (66)) + (Prims.of_int (351)) + (Prims.of_int (86))))) + ( + FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + ( + Obj.magic + (Pulse_Syntax_Printer.term_to_string + i)) + ( + fun + uu___1 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___2 -> + Prims.strcat + "ill-typed inames term " + (Prims.strcat + uu___1 ""))))) + (fun uu___1 -> + (fun uu___1 + -> + Obj.magic + (Pulse_Typing_Env.fail + g + FStar_Pervasives_Native.None + uu___1)) + uu___1))) else Obj.magic (Obj.repr @@ -1586,4 +1552,317 @@ let (intro_comp_typing : Pulse_Typing.CT_STGhost (g, i, st, (), stc))))) - uu___))) uu___))) uu___) \ No newline at end of file + uu___))) uu___))) uu___) +let (return_in_ctxt : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.var -> + Pulse_Syntax_Base.ppname -> + Pulse_Syntax_Base.universe -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.vprop -> + unit -> + unit Pulse_Typing.post_hint_opt -> + (unit, unit, unit) + Pulse_Typing_Combinators.st_typing_in_ctxt) + = + fun g -> + fun y -> + fun y_ppname -> + fun u -> + fun ty -> + fun ctxt -> + fun ty_typing -> + fun post_hint0 -> + let uu___ = post_hint0 in + match uu___ with + | FStar_Pervasives_Native.Some post_hint -> + let x = Pulse_Typing_Env.fresh g in + let ctag = + match post_hint.Pulse_Typing.ctag_hint with + | FStar_Pervasives_Native.None -> + Pulse_Syntax_Base.STT + | FStar_Pervasives_Native.Some ctag1 -> ctag1 in + let y_tm = + Pulse_Syntax_Pure.tm_var + { + Pulse_Syntax_Base.nm_index = y; + Pulse_Syntax_Base.nm_ppname = y_ppname + } in + let d = + Pulse_Typing.T_Return + (g, ctag, false, u, ty, y_tm, + (post_hint.Pulse_Typing.post), x, (), (), ()) in + let t = + Pulse_Typing.wr + (Pulse_Syntax_Base.Tm_Return + { + Pulse_Syntax_Base.ctag = ctag; + Pulse_Syntax_Base.insert_eq = false; + Pulse_Syntax_Base.term = y_tm + }) in + let c = + Pulse_Typing.comp_return ctag false u ty y_tm + post_hint.Pulse_Typing.post x in + let d1 = d in FStar_Pervasives.Mkdtuple3 (t, c, d1) +let (apply_checker_result_k : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.vprop -> + unit Pulse_Typing.post_hint_for_env -> + (unit, unit, unit) checker_result_t -> + Pulse_Syntax_Base.ppname -> + ((unit, unit, unit) Pulse_Typing_Combinators.st_typing_in_ctxt, + unit) FStar_Tactics_Effect.tac_repr) + = + fun g -> + fun ctxt -> + fun post_hint -> + fun r -> + fun res_ppname -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Base.fst" + (Prims.of_int (393)) (Prims.of_int (64)) + (Prims.of_int (393)) (Prims.of_int (65))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Base.fst" + (Prims.of_int (390)) (Prims.of_int (55)) + (Prims.of_int (400)) (Prims.of_int (22))))) + (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> r)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | FStar_Pervasives.Mkdtuple5 + (y, g1, FStar_Pervasives.Mkdtuple3 + (u_ty, ty_y, d_ty_y), Prims.Mkdtuple2 + (pre', uu___1), k) + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (395)) + (Prims.of_int (29)) + (Prims.of_int (395)) + (Prims.of_int (70))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (393)) + (Prims.of_int (68)) + (Prims.of_int (400)) + (Prims.of_int (22))))) + (Obj.magic + (Pulse_Checker_Pure.check_universe g1 ty_y)) + (fun uu___2 -> + (fun uu___2 -> + match uu___2 with + | Prims.Mkdtuple2 (u_ty_y, d_ty_y1) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (398)) + (Prims.of_int (4)) + (Prims.of_int (398)) + (Prims.of_int (75))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (400)) + (Prims.of_int (2)) + (Prims.of_int (400)) + (Prims.of_int (22))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___3 -> + return_in_ctxt g1 y + res_ppname u_ty_y ty_y + pre' () + (FStar_Pervasives_Native.Some + post_hint))) + (fun uu___3 -> + (fun d -> + Obj.magic + (k + (FStar_Pervasives_Native.Some + post_hint) d)) + uu___3))) uu___2))) uu___) +let (checker_result_for_st_typing : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.vprop -> + unit Pulse_Typing.post_hint_opt -> + (unit, unit, unit) Pulse_Typing_Combinators.st_typing_in_ctxt -> + Pulse_Syntax_Base.ppname -> + ((unit, unit, unit) checker_result_t, unit) + FStar_Tactics_Effect.tac_repr) + = + fun g -> + fun ctxt -> + fun post_hint -> + fun d -> + fun ppname -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Base.fst" + (Prims.of_int (408)) (Prims.of_int (22)) + (Prims.of_int (408)) (Prims.of_int (23))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Base.fst" + (Prims.of_int (406)) (Prims.of_int (47)) + (Prims.of_int (437)) (Prims.of_int (72))))) + (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> d)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | FStar_Pervasives.Mkdtuple3 (t, c, d1) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (410)) + (Prims.of_int (10)) + (Prims.of_int (410)) + (Prims.of_int (17))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (410)) + (Prims.of_int (20)) + (Prims.of_int (437)) + (Prims.of_int (72))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> Pulse_Typing_Env.fresh g)) + (fun uu___1 -> + (fun x -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (412)) + (Prims.of_int (11)) + (Prims.of_int (412)) + (Prims.of_int (47))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (412)) + (Prims.of_int (50)) + (Prims.of_int (437)) + (Prims.of_int (72))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + Pulse_Typing_Env.push_binding g + x ppname + (Pulse_Syntax_Base.comp_res c))) + (fun uu___1 -> + (fun g' -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (413)) + (Prims.of_int (14)) + (Prims.of_int (413)) + (Prims.of_int (52))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (413)) + (Prims.of_int (55)) + (Prims.of_int (437)) + (Prims.of_int (72))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + Pulse_Syntax_Naming.open_term_nv + (Pulse_Syntax_Base.comp_post + c) (ppname, x))) + (fun uu___1 -> + (fun ctxt' -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + ( + FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (418)) + (Prims.of_int (4)) + (Prims.of_int (418)) + (Prims.of_int (69))))) + (FStar_Sealed.seal + (Obj.magic + ( + FStar_Range.mk_range + "Pulse.Checker.Base.fst" + (Prims.of_int (428)) + (Prims.of_int (30)) + (Prims.of_int (437)) + (Prims.of_int (72))))) + (Obj.magic + (continuation_elaborator_with_bind + g + Pulse_Syntax_Base.tm_emp + c t d1 () + (ppname, + x))) + (fun k -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___1 -> + match + Pulse_Typing_Metatheory_Base.st_comp_typing_inversion_cofinite + g + (Pulse_Syntax_Base.st_comp_of_comp + c) + (Pulse_Typing_Metatheory_Base.comp_typing_inversion + g c + (Pulse_Typing_Metatheory_Base.st_typing_correctness + g t c d1)) + with + | + (comp_res_typing, + uu___2, + f) -> + FStar_Pervasives.Mkdtuple5 + (x, g', + (FStar_Pervasives.Mkdtuple3 + ((Pulse_Syntax_Base.comp_u + c), + (Pulse_Syntax_Base.comp_res + c), ())), + (Prims.Mkdtuple2 + (ctxt', + ())), + (k_elab_equiv + g g' + (Pulse_Syntax_Base.tm_star + Pulse_Syntax_Base.tm_emp + (Pulse_Syntax_Base.comp_pre + c)) + (Pulse_Syntax_Base.comp_pre + c) + (Pulse_Syntax_Base.tm_star + ctxt' + Pulse_Syntax_Base.tm_emp) + ctxt' k + () ())))))) + uu___1))) uu___1))) + uu___1))) uu___) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Checker_Bind.ml b/src/ocaml/plugin/generated/Pulse_Checker_Bind.ml index 60662fd68..10399b14a 100644 --- a/src/ocaml/plugin/generated/Pulse_Checker_Bind.ml +++ b/src/ocaml/plugin/generated/Pulse_Checker_Bind.ml @@ -1,787 +1,481 @@ open Prims -let (mk_bind' : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.comp_st -> - Pulse_Syntax_Base.comp_st -> - Pulse_Syntax_Base.nvar -> - (unit, unit, unit) Pulse_Typing.st_typing -> - unit -> - (unit, unit, unit) Pulse_Typing.st_typing -> - unit Pulse_Typing.post_hint_opt -> - unit -> - ((unit, unit, unit) - Pulse_Checker_Common.checker_result_t, - unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun pre -> - fun e1 -> - fun e2 -> - fun c1 -> - fun c2 -> - fun px -> - fun d_e1 -> - fun d_c1res -> - fun d_e2 -> - fun post_hint -> - fun uu___ -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (36)) (Prims.of_int (17)) - (Prims.of_int (36)) (Prims.of_int (19))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (36)) (Prims.of_int (4)) - (Prims.of_int (44)) (Prims.of_int (7))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> px)) - (fun uu___1 -> - (fun uu___1 -> - match uu___1 with - | (uu___2, x) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (37)) - (Prims.of_int (15)) - (Prims.of_int (37)) - (Prims.of_int (33))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (38)) - (Prims.of_int (6)) - (Prims.of_int (44)) - (Prims.of_int (7))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - Pulse_Syntax_Base.st_comp_of_comp - c2)) - (fun uu___3 -> - (fun s2 -> - if - FStar_Set.mem x - (Pulse_Syntax_Naming.freevars - s2.Pulse_Syntax_Base.post) - then - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (39)) - (Prims.of_int (23)) - (Prims.of_int (39)) - (Prims.of_int (122))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (39)) - (Prims.of_int (11)) - (Prims.of_int (39)) - (Prims.of_int (122))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - ( - FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (39)) - (Prims.of_int (95)) - (Prims.of_int (39)) - (Prims.of_int (121))))) - (FStar_Sealed.seal - (Obj.magic - ( - FStar_Range.mk_range - "prims.fst" - (Prims.of_int (590)) - (Prims.of_int (19)) - (Prims.of_int (590)) - (Prims.of_int (31))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - s2.Pulse_Syntax_Base.post)) - (fun uu___3 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - Prims.strcat - (Prims.strcat - "Bound variable " - (Prims.strcat - (Prims.string_of_int - x) - " escapes scope in postcondition ")) - (Prims.strcat - uu___3 ""))))) - (fun uu___3 -> - (fun uu___3 -> - Obj.magic - (Pulse_Typing_Env.fail - g - FStar_Pervasives_Native.None - uu___3)) - uu___3)) - else - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (41)) - (Prims.of_int (38)) - (Prims.of_int (41)) - (Prims.of_int (79))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (40)) - (Prims.of_int (11)) - (Prims.of_int (44)) - (Prims.of_int (7))))) - (Obj.magic - (Pulse_Typing_Combinators.bind_res_and_post_typing - g s2 x - post_hint)) - (fun uu___4 -> - (fun uu___4 -> - match uu___4 - with - | (res_typing, - post_typing) - -> - Obj.magic - ( - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (42)) - (Prims.of_int (28)) - (Prims.of_int (42)) - (Prims.of_int (97))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (41)) - (Prims.of_int (83)) - (Prims.of_int (43)) - (Prims.of_int (21))))) - (Obj.magic - (Pulse_Typing_Combinators.mk_bind - g pre e1 - e2 c1 c2 - px d_e1 - () d_e2 - () ())) - (fun - uu___5 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___6 -> - match uu___5 - with - | - FStar_Pervasives.Mkdtuple3 - (t, c, d) - -> - FStar_Pervasives.Mkdtuple3 - (t, c, d))))) - uu___4))) uu___3))) - uu___1) +let coerce_eq : 'a 'b . 'a -> unit -> 'b = + fun uu___1 -> fun uu___ -> (fun x -> fun uu___ -> Obj.magic x) uu___1 uu___ let (check_bind : Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.term -> - unit -> - unit Pulse_Typing.post_hint_opt -> - Pulse_Checker_Common.check_t -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, - unit) FStar_Tactics_Effect.tac_repr) + Pulse_Syntax_Base.term -> + unit -> + unit Pulse_Typing.post_hint_opt -> + Pulse_Syntax_Base.ppname -> + Pulse_Syntax_Base.st_term -> + Pulse_Checker_Base.check_t -> + ((unit, unit, unit) Pulse_Checker_Base.checker_result_t, + unit) FStar_Tactics_Effect.tac_repr) = fun g -> - fun t -> - fun pre -> - fun pre_typing -> - fun post_hint -> - fun check -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (55)) (Prims.of_int (47)) - (Prims.of_int (55)) (Prims.of_int (53))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (54)) (Prims.of_int (46)) - (Prims.of_int (75)) (Prims.of_int (5))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> t.Pulse_Syntax_Base.term1)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | Pulse_Syntax_Base.Tm_Bind - { Pulse_Syntax_Base.binder = b; - Pulse_Syntax_Base.head1 = e1; - Pulse_Syntax_Base.body1 = e2;_} - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (56)) - (Prims.of_int (25)) - (Prims.of_int (56)) - (Prims.of_int (55))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (55)) - (Prims.of_int (56)) - (Prims.of_int (75)) - (Prims.of_int (5))))) - (Obj.magic - (check g e1 pre () - FStar_Pervasives_Native.None)) - (fun uu___1 -> - (fun uu___1 -> - match uu___1 with - | FStar_Pervasives.Mkdtuple3 - (e11, c1, d1) -> - if - Prims.op_Negation - (Pulse_Syntax_Base.stateful_comp - c1) + fun ctxt -> + fun ctxt_typing -> + fun post_hint -> + fun res_ppname -> + fun t -> + fun check -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Bind.fst" + (Prims.of_int (28)) (Prims.of_int (10)) + (Prims.of_int (28)) (Prims.of_int (62))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Bind.fst" + (Prims.of_int (30)) (Prims.of_int (2)) + (Prims.of_int (47)) (Prims.of_int (43))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing_Env.push_context g "check_bind" + t.Pulse_Syntax_Base.range2)) + (fun uu___ -> + (fun g1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Bind.fst" + (Prims.of_int (30)) (Prims.of_int (2)) + (Prims.of_int (31)) (Prims.of_int (66))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Bind.fst" + (Prims.of_int (33)) (Prims.of_int (2)) + (Prims.of_int (47)) (Prims.of_int (43))))) + (Obj.magic + (Pulse_Checker_Prover_Util.debug_prover g1 + (fun uu___ -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Bind.fst" + (Prims.of_int (31)) + (Prims.of_int (42)) + (Prims.of_int (31)) + (Prims.of_int (65))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (Pulse_Syntax_Printer.st_term_to_string + t)) + (fun uu___1 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + Prims.strcat + "checking bind:\n" + (Prims.strcat uu___1 "\n")))))) + (fun uu___ -> + (fun uu___ -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Bind.fst" + (Prims.of_int (33)) + (Prims.of_int (2)) + (Prims.of_int (34)) + (Prims.of_int (89))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Bind.fst" + (Prims.of_int (34)) + (Prims.of_int (90)) + (Prims.of_int (47)) + (Prims.of_int (43))))) + (if + FStar_Pervasives_Native.uu___is_None + post_hint then Obj.magic - (Pulse_Typing_Env.fail g - FStar_Pervasives_Native.None - "Bind: c1 is not st") + (Obj.repr + (Pulse_Typing_Env.fail g1 + (FStar_Pervasives_Native.Some + (t.Pulse_Syntax_Base.range2)) + "check_bind: post hint is not set, please add an annotation")) else Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (60)) - (Prims.of_int (13)) - (Prims.of_int (60)) - (Prims.of_int (31))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (60)) - (Prims.of_int (34)) - (Prims.of_int (75)) - (Prims.of_int (5))))) + (Obj.repr (FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - Pulse_Syntax_Base.st_comp_of_comp - c1)) - (fun uu___3 -> - (fun s1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (61)) - (Prims.of_int (12)) - (Prims.of_int (61)) - (Prims.of_int (18))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (61)) - (Prims.of_int (21)) - (Prims.of_int (75)) - (Prims.of_int (5))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - s1.Pulse_Syntax_Base.res)) - (fun uu___3 -> - (fun t1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal + (fun uu___2 -> ())))) + (fun uu___1 -> + (fun uu___1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Bind.fst" + (Prims.of_int (36)) + (Prims.of_int (44)) + (Prims.of_int (36)) + (Prims.of_int (50))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Bind.fst" + (Prims.of_int (34)) + (Prims.of_int (90)) + (Prims.of_int (47)) + (Prims.of_int (43))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + t.Pulse_Syntax_Base.term1)) + (fun uu___2 -> + (fun uu___2 -> + match uu___2 with + | Pulse_Syntax_Base.Tm_Bind + { + Pulse_Syntax_Base.binder + = binder; + Pulse_Syntax_Base.head1 + = e1; + Pulse_Syntax_Base.body1 + = e2;_} + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (63)) - (Prims.of_int (18)) - (Prims.of_int (63)) - (Prims.of_int (93))))) - (FStar_Sealed.seal + (Prims.of_int (39)) + (Prims.of_int (4)) + (Prims.of_int (39)) + (Prims.of_int (57))))) + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (61)) - (Prims.of_int (21)) - (Prims.of_int (75)) - (Prims.of_int (5))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - Pulse_Typing_Metatheory.st_comp_typing_inversion - g - (Pulse_Syntax_Base.st_comp_of_comp - c1) - (Pulse_Typing_Metatheory.comp_typing_inversion - g c1 - (Pulse_Typing_Metatheory.st_typing_correctness - g e11 c1 - d1)))) - (fun - uu___3 -> + (Prims.of_int (36)) + (Prims.of_int (53)) + (Prims.of_int (47)) + (Prims.of_int (43))))) + (Obj.magic + (check g1 + ctxt () + FStar_Pervasives_Native.None + binder.Pulse_Syntax_Base.binder_ppname + e1)) + (fun uu___3 + -> (fun uu___3 -> match uu___3 with | - FStar_Pervasives.Mkdtuple4 - (t_typing, + FStar_Pervasives.Mkdtuple5 + (x, g11, uu___4, - x, - next_pre_typing) - -> + Prims.Mkdtuple2 + (ctxt', + ctxt'_typing), + k1) -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (64)) - (Prims.of_int (13)) - (Prims.of_int (64)) - (Prims.of_int (31))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (64)) - (Prims.of_int (34)) - (Prims.of_int (75)) - (Prims.of_int (5))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___5 -> - ((b.Pulse_Syntax_Base.binder_ppname), - x))) - (fun - uu___5 -> - (fun px - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind + (Prims.of_int (40)) + (Prims.of_int (48)) + (Prims.of_int (44)) + (Prims.of_int (64))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (65)) - (Prims.of_int (19)) - (Prims.of_int (65)) - (Prims.of_int (42))))) - (FStar_Sealed.seal + (Prims.of_int (44)) + (Prims.of_int (67)) + (Prims.of_int (47)) + (Prims.of_int (43))))) (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (65)) - (Prims.of_int (45)) - (Prims.of_int (75)) - (Prims.of_int (5))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___5 -> - Pulse_Syntax_Naming.open_term_nv - s1.Pulse_Syntax_Base.post - px)) - (fun - uu___5 -> - (fun - next_pre - -> - Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (66)) - (Prims.of_int (13)) - (Prims.of_int (66)) - (Prims.of_int (52))))) + (Prims.of_int (41)) + (Prims.of_int (17)) + (Prims.of_int (41)) + (Prims.of_int (45))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (66)) - (Prims.of_int (55)) - (Prims.of_int (75)) - (Prims.of_int (5))))) + (Prims.of_int (41)) + (Prims.of_int (48)) + (Prims.of_int (44)) + (Prims.of_int (64))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___5 -> - Pulse_Typing_Env.push_binding - g x - b.Pulse_Syntax_Base.binder_ppname - s1.Pulse_Syntax_Base.res)) + Pulse_Syntax_Base.mk_ppname_no_range + "_bind_c")) (fun uu___5 -> - (fun g' - -> + (fun + ppname -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (67)) - (Prims.of_int (28)) - (Prims.of_int (67)) - (Prims.of_int (95))))) + (Prims.of_int (43)) + (Prims.of_int (6)) + (Prims.of_int (43)) + (Prims.of_int (97))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (66)) - (Prims.of_int (55)) - (Prims.of_int (75)) - (Prims.of_int (5))))) + (Prims.of_int (44)) + (Prims.of_int (6)) + (Prims.of_int (44)) + (Prims.of_int (64))))) (Obj.magic - (check g' - (Pulse_Syntax_Naming.open_st_term_nv - e2 px) - next_pre + (check + g11 ctxt' () - post_hint)) + post_hint + ppname + (Pulse_Syntax_Naming.open_st_term_nv + e2 + ((binder.Pulse_Syntax_Base.binder_ppname), + x)))) (fun uu___5 -> + (fun r -> + Obj.magic + (Pulse_Checker_Base.apply_checker_result_k + g11 ctxt' + (FStar_Pervasives_Native.__proj__Some__item__v + post_hint) + r ppname)) + uu___5))) + uu___5))) (fun uu___5 -> - match uu___5 - with - | - FStar_Pervasives.Mkdtuple3 - (e2', c2, - d2) -> - if - Prims.op_Negation - (Pulse_Syntax_Base.stateful_comp - c2) - then - Obj.magic - (Pulse_Typing_Env.fail - g - FStar_Pervasives_Native.None - "Bind: c2 is not st") - else + (fun d -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (72)) - (Prims.of_int (22)) - (Prims.of_int (72)) - (Prims.of_int (41))))) + (Prims.of_int (45)) + (Prims.of_int (47)) + (Prims.of_int (45)) + (Prims.of_int (61))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (74)) - (Prims.of_int (6)) - (Prims.of_int (74)) - (Prims.of_int (70))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___7 -> - Pulse_Syntax_Naming.close_st_term - e2' x)) - (fun - uu___7 -> + (Prims.of_int (47)) + (Prims.of_int (2)) + (Prims.of_int (47)) + (Prims.of_int (43))))) + (Obj.magic + (k1 + post_hint + d)) (fun - e2_closed + uu___5 -> + (fun d1 -> Obj.magic - (mk_bind' - g pre e11 - e2_closed - c1 c2 px - d1 () d2 + (Pulse_Checker_Base.checker_result_for_st_typing + g1 ctxt post_hint - ())) - uu___7))) - uu___5))) - uu___5))) + d1 + res_ppname)) uu___5))) uu___5))) uu___3))) - uu___3))) - uu___3))) uu___1))) - uu___) + uu___2))) uu___1))) + uu___))) uu___) let (check_tot_bind : Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.term -> - unit -> - unit Pulse_Typing.post_hint_opt -> - Pulse_Checker_Common.check_t -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, - unit) FStar_Tactics_Effect.tac_repr) + Pulse_Syntax_Base.term -> + unit -> + unit Pulse_Typing.post_hint_opt -> + Pulse_Syntax_Base.ppname -> + Pulse_Syntax_Base.st_term -> + Pulse_Checker_Base.check_t -> + ((unit, unit, unit) Pulse_Checker_Base.checker_result_t, + unit) FStar_Tactics_Effect.tac_repr) = fun g -> - fun t -> - fun pre -> - fun pre_typing -> - fun post_hint -> - fun check -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (81)) (Prims.of_int (40)) - (Prims.of_int (81)) (Prims.of_int (46))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (80)) (Prims.of_int (55)) - (Prims.of_int (122)) (Prims.of_int (63))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> t.Pulse_Syntax_Base.term1)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | Pulse_Syntax_Base.Tm_TotBind - { Pulse_Syntax_Base.head2 = e1; - Pulse_Syntax_Base.body2 = e2;_} - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (82)) - (Prims.of_int (48)) - (Prims.of_int (82)) - (Prims.of_int (72))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (81)) - (Prims.of_int (49)) - (Prims.of_int (122)) - (Prims.of_int (63))))) - (Obj.magic - (Pulse_Checker_Pure.check_term_and_type g - e1)) - (fun uu___1 -> - (fun uu___1 -> - match uu___1 with - | FStar_Pervasives.Mkdtuple5 - (e11, u1, t1, _t1_typing, e1_typing) - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (83)) - (Prims.of_int (10)) - (Prims.of_int (86)) - (Prims.of_int (21))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (86)) - (Prims.of_int (24)) - (Prims.of_int (122)) - (Prims.of_int (63))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - Pulse_Syntax_Pure.tm_refine - { - Pulse_Syntax_Base.binder_ty - = t1; - Pulse_Syntax_Base.binder_ppname - = - Pulse_Syntax_Base.ppname_default - } - (Pulse_Typing.mk_eq2 u1 - t1 - (Pulse_Syntax_Pure.null_bvar - Prims.int_zero) - e11))) - (fun uu___2 -> - (fun t11 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (88)) - (Prims.of_int (4)) - (Prims.of_int (88)) - (Prims.of_int (41))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (86)) - (Prims.of_int (24)) - (Prims.of_int (122)) - (Prims.of_int (63))))) - (Obj.magic - (Pulse_Checker_Pure.check_term_with_expected_type - g e11 t11)) - (fun uu___2 -> - (fun uu___2 -> - match uu___2 - with - | Prims.Mkdtuple2 - (e12, - e1_typing1) - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind + fun pre -> + fun pre_typing -> + fun post_hint -> + fun res_ppname -> + fun t -> + fun check -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Bind.fst" + (Prims.of_int (59)) (Prims.of_int (10)) + (Prims.of_int (59)) (Prims.of_int (62))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Bind.fst" + (Prims.of_int (61)) (Prims.of_int (2)) + (Prims.of_int (88)) (Prims.of_int (43))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing_Env.push_context g "check_bind" + t.Pulse_Syntax_Base.range2)) + (fun uu___ -> + (fun g1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Bind.fst" + (Prims.of_int (61)) (Prims.of_int (2)) + (Prims.of_int (62)) (Prims.of_int (93))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Bind.fst" + (Prims.of_int (62)) (Prims.of_int (94)) + (Prims.of_int (88)) (Prims.of_int (43))))) + (if + FStar_Pervasives_Native.uu___is_None + post_hint + then + Obj.magic + (Obj.repr + (Pulse_Typing_Env.fail g1 + (FStar_Pervasives_Native.Some + (t.Pulse_Syntax_Base.range2)) + "check_tot_bind: post hint is not set, please add an annotation")) + else + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> ())))) + (fun uu___ -> + (fun uu___ -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Bind.fst" + (Prims.of_int (64)) + (Prims.of_int (40)) + (Prims.of_int (64)) + (Prims.of_int (46))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Bind.fst" + (Prims.of_int (62)) + (Prims.of_int (94)) + (Prims.of_int (88)) + (Prims.of_int (43))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + t.Pulse_Syntax_Base.term1)) + (fun uu___1 -> + (fun uu___1 -> + match uu___1 with + | Pulse_Syntax_Base.Tm_TotBind + { + Pulse_Syntax_Base.head2 = + e1; + Pulse_Syntax_Base.body2 = + e2;_} + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Bind.fst" + (Prims.of_int (65)) + (Prims.of_int (48)) + (Prims.of_int (65)) + (Prims.of_int (72))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Bind.fst" + (Prims.of_int (64)) + (Prims.of_int (49)) + (Prims.of_int (88)) + (Prims.of_int (43))))) + (Obj.magic + (Pulse_Checker_Pure.check_term_and_type + g1 e1)) + (fun uu___2 -> + (fun uu___2 -> + match uu___2 + with + | FStar_Pervasives.Mkdtuple5 + (e11, u1, + t1, + _t1_typing, + e1_typing) + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (89)) + (Prims.of_int (66)) (Prims.of_int (10)) - (Prims.of_int (89)) - (Prims.of_int (17))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (89)) - (Prims.of_int (20)) - (Prims.of_int (122)) - (Prims.of_int (63))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - Pulse_Typing_Env.fresh - g)) - (fun - uu___3 -> - (fun x -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (90)) - (Prims.of_int (11)) - (Prims.of_int (90)) - (Prims.of_int (20))))) + (Prims.of_int (69)) + (Prims.of_int (21))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (90)) - (Prims.of_int (23)) - (Prims.of_int (122)) - (Prims.of_int (63))))) + (Prims.of_int (69)) + (Prims.of_int (24)) + (Prims.of_int (88)) + (Prims.of_int (43))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___3 -> - Pulse_Syntax_Base.v_as_nv - x)) - (fun - uu___3 -> - (fun px - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (91)) - (Prims.of_int (11)) - (Prims.of_int (91)) - (Prims.of_int (39))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (91)) - (Prims.of_int (42)) - (Prims.of_int (122)) - (Prims.of_int (63))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - Pulse_Typing_Env.push_binding - g x - (FStar_Pervasives_Native.fst - px) t11)) - (fun - uu___3 -> - (fun g' - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (96)) - (Prims.of_int (4)) - (Prims.of_int (96)) - (Prims.of_int (32))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (96)) - (Prims.of_int (35)) - (Prims.of_int (122)) - (Prims.of_int (63))))) - (Obj.magic - (Pulse_Checker_Pure.check_vprop_with_core - g' pre)) + Pulse_Syntax_Pure.tm_refine + { + Pulse_Syntax_Base.binder_ty + = t1; + Pulse_Syntax_Base.binder_ppname + = + Pulse_Syntax_Base.ppname_default + } + (Pulse_Typing.mk_eq2 + u1 t1 + (Pulse_Syntax_Pure.null_bvar + Prims.int_zero) + e11))) (fun uu___3 -> - (fun - pre_typing' + (fun t11 -> Obj.magic (FStar_Tactics_Effect.tac_bind @@ -789,24 +483,22 @@ let (check_tot_bind : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (98)) + (Prims.of_int (73)) (Prims.of_int (4)) - (Prims.of_int (98)) - (Prims.of_int (62))))) + (Prims.of_int (73)) + (Prims.of_int (41))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (96)) - (Prims.of_int (35)) - (Prims.of_int (122)) - (Prims.of_int (63))))) + (Prims.of_int (69)) + (Prims.of_int (24)) + (Prims.of_int (88)) + (Prims.of_int (43))))) (Obj.magic - (check g' - (Pulse_Syntax_Naming.open_st_term_nv - e2 px) - pre () - post_hint)) + (Pulse_Checker_Pure.check_term_with_expected_type + g1 e11 + t11)) (fun uu___3 -> (fun @@ -814,215 +506,28 @@ let (check_tot_bind : match uu___3 with | - FStar_Pervasives.Mkdtuple3 - (e21, c2, - e2_typing) - -> - if - Prims.op_Negation - (Pulse_Syntax_Base.stateful_comp - c2) - then - Obj.magic - (Obj.repr - (Pulse_Typing_Env.fail - g - (FStar_Pervasives_Native.Some - (e21.Pulse_Syntax_Base.range2)) - "Tm_TotBind: e2 is not a stateful computation")) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___5 -> - FStar_Pervasives.Mkdtuple3 - ((Pulse_Typing.wr - (Pulse_Syntax_Base.Tm_TotBind - { - Pulse_Syntax_Base.head2 - = e12; - Pulse_Syntax_Base.body2 - = - (Pulse_Syntax_Naming.close_st_term - e21 x) - })), - (Pulse_Syntax_Naming.open_comp_with - (Pulse_Syntax_Naming.close_comp - c2 x) e12), - (Pulse_Typing.T_TotBind - (g, e12, - (Pulse_Syntax_Naming.close_st_term - e21 x), - t11, c2, - x, (), - e2_typing))))))) - uu___3))) - uu___3))) - uu___3))) - uu___3))) - uu___3))) - uu___2))) - uu___2))) uu___1))) uu___) -let coerce_eq : 'a 'b . 'a -> unit -> 'b = - fun uu___1 -> fun uu___ -> (fun x -> fun uu___ -> Obj.magic x) uu___1 uu___ -let (check_stapp_no_ctxt : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - ((Pulse_Typing_Env.env, Pulse_Syntax_Base.st_term, - Pulse_Syntax_Base.comp_st, - (unit, unit, unit) Pulse_Typing.st_typing) FStar_Pervasives.dtuple4, - unit) FStar_Tactics_Effect.tac_repr) - = - fun uu___1 -> - fun uu___ -> - (fun g -> - fun t -> - Obj.magic - (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> Prims.magic ()))) - uu___1 uu___ -let (check_bindv2 : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.term -> - unit -> - unit Pulse_Typing.post_hint_opt -> - Pulse_Checker_Common.check_t -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, - unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun t -> - fun pre -> - fun pre_typing -> - fun post_hint -> - fun check -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (145)) (Prims.of_int (47)) - (Prims.of_int (145)) (Prims.of_int (53))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (143)) (Prims.of_int (46)) - (Prims.of_int (186)) (Prims.of_int (47))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> t.Pulse_Syntax_Base.term1)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | Pulse_Syntax_Base.Tm_Bind - { Pulse_Syntax_Base.binder = b; - Pulse_Syntax_Base.head1 = e1; - Pulse_Syntax_Base.body1 = e2;_} - -> - (match e1.Pulse_Syntax_Base.term1 with - | Pulse_Syntax_Base.Tm_STApp uu___1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (149)) - (Prims.of_int (32)) - (Prims.of_int (149)) - (Prims.of_int (56))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (148)) - (Prims.of_int (17)) - (Prims.of_int (185)) - (Prims.of_int (19))))) - (Obj.magic (check_stapp_no_ctxt g e1)) - (fun uu___2 -> - (fun uu___2 -> - match uu___2 with - | FStar_Pervasives.Mkdtuple4 - (uvs, e11, c1, d1) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (150)) - (Prims.of_int (14)) - (Prims.of_int (150)) - (Prims.of_int (16))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (150)) - (Prims.of_int (19)) - (Prims.of_int (185)) - (Prims.of_int (19))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> c1)) - (fun uu___3 -> - (fun c10 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - ( - FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (153)) - (Prims.of_int (6)) - (Prims.of_int (153)) - (Prims.of_int (52))))) - (FStar_Sealed.seal - (Obj.magic - ( - FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (150)) - (Prims.of_int (19)) - (Prims.of_int (185)) - (Prims.of_int (19))))) - (Obj.magic - (Pulse_Prover.prove - g pre () - uvs - ( - Pulse_Syntax_Base.comp_pre - c1) ())) - (fun uu___3 -> - (fun uu___3 + Prims.Mkdtuple2 + (e12, + e1_typing1) -> - match uu___3 - with - | - FStar_Pervasives.Mkdtuple5 - (g1, - uvs1, - ss1, - remaining_pre, - k) -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (154)) - (Prims.of_int (12)) - (Prims.of_int (154)) - (Prims.of_int (20))))) + (Prims.of_int (75)) + (Prims.of_int (10)) + (Prims.of_int (75)) + (Prims.of_int (17))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (154)) - (Prims.of_int (23)) - (Prims.of_int (185)) - (Prims.of_int (19))))) + (Prims.of_int (75)) + (Prims.of_int (20)) + (Prims.of_int (88)) + (Prims.of_int (43))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___4 -> @@ -1037,57 +542,54 @@ let (check_bindv2 : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (155)) - (Prims.of_int (13)) - (Prims.of_int (155)) - (Prims.of_int (31))))) + (Prims.of_int (77)) + (Prims.of_int (10)) + (Prims.of_int (77)) + (Prims.of_int (92))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (155)) - (Prims.of_int (34)) - (Prims.of_int (185)) - (Prims.of_int (19))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - ((b.Pulse_Syntax_Base.binder_ppname), + (Prims.of_int (77)) + (Prims.of_int (95)) + (Prims.of_int (88)) + (Prims.of_int (43))))) + (Obj.magic + (Pulse_Checker_Base.continuation_elaborator_with_tot_bind + g pre () + e12 t11 + () + (Pulse_Syntax_Base.ppname_default, x))) (fun uu___4 -> - (fun px - -> + (fun k -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (157)) - (Prims.of_int (13)) - (Prims.of_int (157)) - (Prims.of_int (83))))) + (Prims.of_int (79)) + (Prims.of_int (11)) + (Prims.of_int (79)) + (Prims.of_int (20))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (157)) - (Prims.of_int (86)) - (Prims.of_int (185)) - (Prims.of_int (19))))) + (Prims.of_int (79)) + (Prims.of_int (23)) + (Prims.of_int (88)) + (Prims.of_int (43))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___4 -> - Pulse_Typing_Env.push_binding - g1 x - b.Pulse_Syntax_Base.binder_ppname - (Pulse_Prover_Substs.nt_subst_term - (Pulse_Syntax_Base.comp_res - c1) ss1))) + Pulse_Syntax_Base.v_as_nv + x)) (fun uu___4 -> - (fun g2 + (fun px -> Obj.magic (FStar_Tactics_Effect.tac_bind @@ -1095,107 +597,55 @@ let (check_bindv2 : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (158)) - (Prims.of_int (17)) - (Prims.of_int (158)) - (Prims.of_int (86))))) + (Prims.of_int (80)) + (Prims.of_int (11)) + (Prims.of_int (80)) + (Prims.of_int (39))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (160)) - (Prims.of_int (32)) - (Prims.of_int (185)) - (Prims.of_int (19))))) + (Prims.of_int (80)) + (Prims.of_int (42)) + (Prims.of_int (88)) + (Prims.of_int (43))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___4 -> - Pulse_Prover_Common.op_Star - (Pulse_Syntax_Naming.open_term_nv - (Pulse_Prover_Substs.nt_subst_term - (Pulse_Syntax_Base.comp_post - c1) ss1) - px) - remaining_pre)) + Pulse_Typing_Env.push_binding + g1 x + (FStar_Pervasives_Native.fst + px) t11)) (fun uu___4 -> - (fun - pre_e2 -> + (fun g' + -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (165)) - (Prims.of_int (6)) - (Prims.of_int (165)) - (Prims.of_int (96))))) + (Prims.of_int (82)) + (Prims.of_int (4)) + (Prims.of_int (82)) + (Prims.of_int (58))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (160)) - (Prims.of_int (32)) - (Prims.of_int (185)) - (Prims.of_int (19))))) - (Obj.magic - (check g2 - (Pulse_Syntax_Naming.open_st_term_nv - e2 px) - pre_e2 () - (Pulse_Prover_Common.extend_post_hint_opt_g - g - post_hint - g2))) + (Prims.of_int (82)) + (Prims.of_int (61)) + (Prims.of_int (88)) + (Prims.of_int (43))))) + (FStar_Tactics_Effect.lift_div_tac (fun uu___4 -> + ())) (fun uu___4 -> - match uu___4 - with - | - FStar_Pervasives.Mkdtuple3 - (e21, c2, - d2) -> - if - Prims.op_Negation - (Pulse_Syntax_Base.stateful_comp - c2) - then - Obj.magic - (Pulse_Typing_Env.fail - g - FStar_Pervasives_Native.None - "Bind: c2 is not st") - else - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (170)) - (Prims.of_int (15)) - (Prims.of_int (170)) - (Prims.of_int (52))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (170)) - (Prims.of_int (55)) - (Prims.of_int (185)) - (Prims.of_int (19))))) - (FStar_Tactics_Effect.lift_div_tac (fun - uu___6 -> - Pulse_Prover_Common.st_typing_weakening - g uvs e11 - c1 d1 g1)) - (fun - uu___6 -> - (fun d11 + pre_typing' -> Obj.magic (FStar_Tactics_Effect.tac_bind @@ -1203,181 +653,124 @@ let (check_bindv2 : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (171)) - (Prims.of_int (15)) - (Prims.of_int (171)) - (Prims.of_int (59))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (171)) - (Prims.of_int (62)) - (Prims.of_int (185)) - (Prims.of_int (19))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___6 -> - Pulse_Prover_Common.st_typing_weakening_end - g1 uvs - e11 c1 - d11 uvs1)) - (fun - uu___6 -> - (fun d12 - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind + (Prims.of_int (83)) + (Prims.of_int (9)) + (Prims.of_int (86)) + (Prims.of_int (62))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (172)) - (Prims.of_int (15)) - (Prims.of_int (172)) - (Prims.of_int (68))))) - (FStar_Sealed.seal + (Prims.of_int (86)) + (Prims.of_int (65)) + (Prims.of_int (88)) + (Prims.of_int (43))))) (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Bind.fst" - (Prims.of_int (172)) - (Prims.of_int (71)) - (Prims.of_int (185)) - (Prims.of_int (19))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___6 -> - Pulse_Prover_Substs.st_typing_nt_substs_derived - g1 uvs1 - e11 c1 - d12 ss1)) - (fun - uu___6 -> - (fun d13 - -> - Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (173)) - (Prims.of_int (29)) - (Prims.of_int (173)) - (Prims.of_int (67))))) + (Prims.of_int (84)) + (Prims.of_int (17)) + (Prims.of_int (84)) + (Prims.of_int (46))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (172)) - (Prims.of_int (71)) - (Prims.of_int (185)) - (Prims.of_int (19))))) + (Prims.of_int (84)) + (Prims.of_int (49)) + (Prims.of_int (86)) + (Prims.of_int (62))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___6 -> - Pulse_Typing_Combinators.add_frame - g1 - (Pulse_Prover_Substs.nt_subst_st_term - e11 ss1) - (Pulse_Prover_Substs.nt_subst_comp - c1 ss1) - d13 - remaining_pre - ())) + uu___4 -> + Pulse_Syntax_Base.mk_ppname_no_range + "_tbind_c")) (fun - uu___6 -> + uu___4 -> (fun - uu___6 -> - match uu___6 - with - | - FStar_Pervasives.Mkdtuple3 - (e12, - c11, d14) - -> + ppname -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (181)) - (Prims.of_int (22)) - (Prims.of_int (181)) - (Prims.of_int (40))))) + (Prims.of_int (85)) + (Prims.of_int (12)) + (Prims.of_int (85)) + (Prims.of_int (77))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (182)) - (Prims.of_int (46)) - (Prims.of_int (185)) - (Prims.of_int (19))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___7 -> - Pulse_Syntax_Naming.close_st_term - e21 x)) + (Prims.of_int (86)) + (Prims.of_int (4)) + (Prims.of_int (86)) + (Prims.of_int (62))))) + (Obj.magic + (check g' + pre () + post_hint + ppname + (Pulse_Syntax_Naming.open_st_term_nv + e2 px))) (fun - uu___7 -> + uu___4 -> + (fun r -> + Obj.magic + (Pulse_Checker_Base.apply_checker_result_k + g' pre + (FStar_Pervasives_Native.__proj__Some__item__v + post_hint) + r ppname)) + uu___4))) + uu___4))) (fun - e2_closed - -> + uu___4 -> + (fun d -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (183)) - (Prims.of_int (14)) - (Prims.of_int (183)) - (Prims.of_int (121))))) + (Prims.of_int (87)) + (Prims.of_int (10)) + (Prims.of_int (87)) + (Prims.of_int (23))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Bind.fst" - (Prims.of_int (185)) - (Prims.of_int (6)) - (Prims.of_int (185)) - (Prims.of_int (19))))) + (Prims.of_int (88)) + (Prims.of_int (2)) + (Prims.of_int (88)) + (Prims.of_int (43))))) (Obj.magic - (mk_bind' - g1 - (Pulse_Syntax_Base.comp_pre - c11) e12 - e2_closed - c11 c2 px - (coerce_eq - d14 ()) - () - (coerce_eq - d2 ()) + (k post_hint - ())) + d)) (fun - uu___7 -> - (fun r -> + uu___4 -> + (fun d1 + -> Obj.magic - (k + (Pulse_Checker_Base.checker_result_for_st_typing + g pre post_hint - r)) - uu___7))) - uu___7))) - uu___6))) - uu___6))) - uu___6))) - uu___6))) + d1 + res_ppname)) + uu___4))) uu___4))) uu___4))) uu___4))) uu___4))) uu___4))) - uu___3))) - uu___3))) uu___2)) - | uu___1 -> - Obj.magic - (Pulse_Typing_Env.fail g - FStar_Pervasives_Native.None - "Bind: e1 is not an stapp"))) uu___) \ No newline at end of file + uu___4))) + uu___3))) + uu___3))) + uu___2))) uu___1))) + uu___))) uu___) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Checker_Comp.ml b/src/ocaml/plugin/generated/Pulse_Checker_Comp.ml index a8e317aa3..0a3d043c3 100644 --- a/src/ocaml/plugin/generated/Pulse_Checker_Comp.ml +++ b/src/ocaml/plugin/generated/Pulse_Checker_Comp.ml @@ -1,5 +1,5 @@ open Prims -let (check_comp : +let (check : Pulse_Typing_Env.env -> Pulse_Syntax_Base.comp_st -> unit -> @@ -13,135 +13,273 @@ let (check_comp : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Comp.fst" - (Prims.of_int (22)) (Prims.of_int (7)) (Prims.of_int (37)) - (Prims.of_int (9))))) + (Prims.of_int (14)) (Prims.of_int (12)) + (Prims.of_int (14)) (Prims.of_int (65))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Comp.fst" - (Prims.of_int (39)) (Prims.of_int (4)) (Prims.of_int (54)) - (Prims.of_int (44))))) + (Prims.of_int (14)) (Prims.of_int (69)) + (Prims.of_int (63)) (Prims.of_int (44))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> - fun st -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Comp.fst" - (Prims.of_int (22)) (Prims.of_int (27)) - (Prims.of_int (22)) (Prims.of_int (50))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Comp.fst" - (Prims.of_int (22)) (Prims.of_int (7)) - (Prims.of_int (37)) (Prims.of_int (9))))) - (Obj.magic - (Pulse_Checker_Pure.check_universe g - st.Pulse_Syntax_Base.res)) - (fun uu___1 -> - (fun uu___1 -> - match uu___1 with - | Prims.Mkdtuple2 (u, t_u) -> - if - Prims.op_Negation - (Pulse_Syntax_Base.eq_univ u - (Pulse_Syntax_Base.comp_u c)) - then - Obj.magic - (Pulse_Typing_Env.fail g - FStar_Pervasives_Native.None - "Unexpected universe") - else - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Comp.fst" - (Prims.of_int (26)) - (Prims.of_int (18)) - (Prims.of_int (26)) - (Prims.of_int (25))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Comp.fst" - (Prims.of_int (26)) - (Prims.of_int (28)) - (Prims.of_int (36)) - (Prims.of_int (11))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - Pulse_Typing_Env.fresh g)) - (fun uu___3 -> - (fun x -> + Pulse_Typing_Env.push_context_no_range g "check_comp")) + (fun uu___ -> + (fun g1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Comp.fst" + (Prims.of_int (21)) (Prims.of_int (7)) + (Prims.of_int (42)) (Prims.of_int (9))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Comp.fst" + (Prims.of_int (44)) (Prims.of_int (4)) + (Prims.of_int (63)) (Prims.of_int (44))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + fun st -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (21)) + (Prims.of_int (27)) + (Prims.of_int (21)) + (Prims.of_int (50))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (21)) + (Prims.of_int (7)) + (Prims.of_int (42)) + (Prims.of_int (9))))) + (Obj.magic + (Pulse_Checker_Pure.check_universe g1 + st.Pulse_Syntax_Base.res)) + (fun uu___1 -> + (fun uu___1 -> + match uu___1 with + | Prims.Mkdtuple2 (u, t_u) -> + if + Prims.op_Negation + (Pulse_Syntax_Base.eq_univ u + (Pulse_Syntax_Base.comp_u c)) + then Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Comp.fst" + (Prims.of_int (24)) + (Prims.of_int (14)) (Prims.of_int (27)) - (Prims.of_int (19)) + (Prims.of_int (47))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (23)) + (Prims.of_int (13)) (Prims.of_int (27)) - (Prims.of_int (28))))) + (Prims.of_int (47))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (24)) + (Prims.of_int (14)) + (Prims.of_int (27)) + (Prims.of_int (47))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (24)) + (Prims.of_int (14)) + (Prims.of_int (27)) + (Prims.of_int (47))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (24)) + (Prims.of_int (14)) + (Prims.of_int (27)) + (Prims.of_int (47))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (24)) + (Prims.of_int (14)) + (Prims.of_int (27)) + (Prims.of_int (47))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (25)) + (Prims.of_int (17)) + (Prims.of_int (25)) + (Prims.of_int (42))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + st.Pulse_Syntax_Base.res)) + (fun uu___2 + -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + fun x -> + fun x1 -> + Prims.strcat + (Prims.strcat + (Prims.strcat + "check_comp: computed universe of " + (Prims.strcat + uu___2 + " as ")) + (Prims.strcat + x + ", whereas annotated as ")) + (Prims.strcat + x1 ""))))) + (fun uu___2 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___3 + -> + uu___2 + (Pulse_Syntax_Printer.univ_to_string + u))))) + (fun uu___2 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___3 -> + uu___2 + (Pulse_Syntax_Printer.univ_to_string + (Pulse_Syntax_Base.comp_u + c)))))) + (fun uu___2 -> + (fun uu___2 -> + Obj.magic + (Pulse_Typing_Env.fail + g1 + FStar_Pervasives_Native.None + uu___2)) uu___2)) + else + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (30)) + (Prims.of_int (18)) + (Prims.of_int (30)) + (Prims.of_int (25))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Comp.fst" + (Prims.of_int (30)) (Prims.of_int (28)) - (Prims.of_int (57)) - (Prims.of_int (36)) + (Prims.of_int (41)) (Prims.of_int (11))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___3 -> - Pulse_Syntax_Base.v_as_nv - x)) + Pulse_Typing_Env.fresh + g1)) (fun uu___3 -> - (fun px -> + (fun x -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Comp.fst" - (Prims.of_int (29)) + (Prims.of_int (31)) (Prims.of_int (19)) - (Prims.of_int (29)) - (Prims.of_int (51))))) + (Prims.of_int (31)) + (Prims.of_int (28))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Comp.fst" - (Prims.of_int (29)) - (Prims.of_int (54)) - (Prims.of_int (36)) + (Prims.of_int (32)) + (Prims.of_int (57)) + (Prims.of_int (41)) (Prims.of_int (11))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___3 -> - Pulse_Typing_Env.push_binding - g x - (FStar_Pervasives_Native.fst - px) - st.Pulse_Syntax_Base.res)) + Pulse_Syntax_Base.v_as_nv + x)) (fun uu___3 -> - (fun gx -> + (fun px -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Comp.fst" - (Prims.of_int (30)) + (Prims.of_int (33)) + (Prims.of_int (19)) + (Prims.of_int (33)) + (Prims.of_int (51))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (33)) + (Prims.of_int (54)) + (Prims.of_int (41)) + (Prims.of_int (11))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + Pulse_Typing_Env.push_binding + g1 x + (FStar_Pervasives_Native.fst + px) + st.Pulse_Syntax_Base.res)) + (fun + uu___3 -> + (fun gx + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (34)) (Prims.of_int (38)) - (Prims.of_int (30)) + (Prims.of_int (34)) (Prims.of_int (88))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Comp.fst" - (Prims.of_int (29)) + (Prims.of_int (33)) (Prims.of_int (54)) - (Prims.of_int (36)) + (Prims.of_int (41)) (Prims.of_int (11))))) (Obj.magic (Pulse_Checker_Pure.core_check_term @@ -168,10 +306,64 @@ let (check_comp : then Obj.magic (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (37)) + (Prims.of_int (17)) + (Prims.of_int (37)) + (Prims.of_int (107))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (36)) + (Prims.of_int (15)) + (Prims.of_int (37)) + (Prims.of_int (107))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (37)) + (Prims.of_int (74)) + (Prims.of_int (37)) + (Prims.of_int (106))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + (Pulse_Syntax_Base.comp_post + c))) + (fun + uu___4 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___5 -> + Prims.strcat + "check_comp: ill-typed postcondition " + (Prims.strcat + uu___4 ""))))) + (fun + uu___4 -> + (fun + uu___4 -> + Obj.magic (Pulse_Typing_Env.fail - g + g1 FStar_Pervasives_Native.None - "Ill-typed postcondition")) + uu___4)) + uu___4))) else Obj.magic (Obj.repr @@ -179,150 +371,510 @@ let (check_comp : (fun uu___5 -> Pulse_Typing.STC - (g, st, + (g1, st, x, (), (), ()))))) uu___3))) + uu___3))) uu___3))) - uu___3))) uu___3))) - uu___1))) - (fun uu___ -> - (fun check_st_comp -> - match c with - | Pulse_Syntax_Base.C_ST st -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Comp.fst" - (Prims.of_int (41)) (Prims.of_int (16)) - (Prims.of_int (41)) (Prims.of_int (32))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Comp.fst" - (Prims.of_int (42)) (Prims.of_int (6)) - (Prims.of_int (42)) (Prims.of_int (19))))) - (Obj.magic (check_st_comp st)) - (fun stc -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> Pulse_Typing.CT_ST (g, st, stc)))) - | Pulse_Syntax_Base.C_STAtomic (i, st) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Comp.fst" - (Prims.of_int (44)) (Prims.of_int (16)) - (Prims.of_int (44)) (Prims.of_int (32))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Comp.fst" - (Prims.of_int (44)) (Prims.of_int (35)) - (Prims.of_int (48)) (Prims.of_int (45))))) - (Obj.magic (check_st_comp st)) - (fun uu___ -> - (fun stc -> + uu___3))) uu___1))) + (fun uu___ -> + (fun check_st_comp -> + match c with + | Pulse_Syntax_Base.C_ST st -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (46)) + (Prims.of_int (16)) + (Prims.of_int (46)) + (Prims.of_int (32))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (47)) + (Prims.of_int (6)) + (Prims.of_int (47)) + (Prims.of_int (19))))) + (Obj.magic (check_st_comp st)) + (fun stc -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing.CT_ST (g1, st, stc)))) + | Pulse_Syntax_Base.C_STAtomic (i, st) -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Comp.fst" - (Prims.of_int (45)) - (Prims.of_int (31)) - (Prims.of_int (45)) - (Prims.of_int (50))))) + (Prims.of_int (49)) + (Prims.of_int (16)) + (Prims.of_int (49)) + (Prims.of_int (32))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Comp.fst" - (Prims.of_int (44)) + (Prims.of_int (49)) (Prims.of_int (35)) - (Prims.of_int (48)) + (Prims.of_int (55)) (Prims.of_int (45))))) - (Obj.magic - (Pulse_Checker_Pure.core_check_term g - i)) + (Obj.magic (check_st_comp st)) (fun uu___ -> - (fun uu___ -> - match uu___ with - | Prims.Mkdtuple2 (ty, i_typing) -> - if - Prims.op_Negation - (Pulse_Syntax_Base.eq_tm ty - Pulse_Syntax_Base.tm_inames) - then - Obj.magic - (Obj.repr - (Pulse_Typing_Env.fail g - FStar_Pervasives_Native.None - "Ill-typed inames")) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - Pulse_Typing.CT_STAtomic - (g, i, st, (), - stc))))) uu___))) - uu___)) - | Pulse_Syntax_Base.C_STGhost (i, st) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Comp.fst" - (Prims.of_int (50)) (Prims.of_int (16)) - (Prims.of_int (50)) (Prims.of_int (32))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Comp.fst" - (Prims.of_int (50)) (Prims.of_int (35)) - (Prims.of_int (54)) (Prims.of_int (44))))) - (Obj.magic (check_st_comp st)) - (fun uu___ -> - (fun stc -> + (fun stc -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (50)) + (Prims.of_int (31)) + (Prims.of_int (50)) + (Prims.of_int (50))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (49)) + (Prims.of_int (35)) + (Prims.of_int (55)) + (Prims.of_int (45))))) + (Obj.magic + (Pulse_Checker_Pure.core_check_term + g1 i)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | Prims.Mkdtuple2 + (ty, i_typing) -> + if + Prims.op_Negation + (Pulse_Syntax_Base.eq_tm + ty + Pulse_Syntax_Base.tm_inames) + then + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (53)) + (Prims.of_int (13)) + (Prims.of_int (54)) + (Prims.of_int (88))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (52)) + (Prims.of_int (11)) + (Prims.of_int (54)) + (Prims.of_int (88))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (54)) + (Prims.of_int (59)) + (Prims.of_int (54)) + (Prims.of_int (87))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (53)) + (Prims.of_int (13)) + (Prims.of_int (54)) + (Prims.of_int (88))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + Pulse_Syntax_Base.tm_inames)) + (fun + uu___1 -> + (fun + uu___1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (53)) + (Prims.of_int (13)) + (Prims.of_int (54)) + (Prims.of_int (88))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (53)) + (Prims.of_int (13)) + (Prims.of_int (54)) + (Prims.of_int (88))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (54)) + (Prims.of_int (37)) + (Prims.of_int (54)) + (Prims.of_int (58))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (53)) + (Prims.of_int (13)) + (Prims.of_int (54)) + (Prims.of_int (88))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + ty)) + (fun + uu___2 -> + (fun + uu___2 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (53)) + (Prims.of_int (13)) + (Prims.of_int (54)) + (Prims.of_int (88))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (53)) + (Prims.of_int (13)) + (Prims.of_int (54)) + (Prims.of_int (88))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (54)) + (Prims.of_int (16)) + (Prims.of_int (54)) + (Prims.of_int (36))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + i)) + (fun + uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + fun x -> + fun x1 -> + Prims.strcat + (Prims.strcat + (Prims.strcat + "check_comp: type of inames term " + (Prims.strcat + uu___3 + " is ")) + (Prims.strcat + x + ", expected ")) + (Prims.strcat + x1 ""))))) + (fun + uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + uu___3 + uu___2)))) + uu___2))) + (fun + uu___2 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + uu___2 + uu___1)))) + uu___1))) + (fun + uu___1 -> + (fun + uu___1 -> + Obj.magic + (Pulse_Typing_Env.fail + g1 + FStar_Pervasives_Native.None + uu___1)) + uu___1))) + else + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___2 -> + Pulse_Typing.CT_STAtomic + (g1, i, + st, (), + stc))))) + uu___))) uu___)) + | Pulse_Syntax_Base.C_STGhost (i, st) -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Comp.fst" - (Prims.of_int (51)) - (Prims.of_int (31)) - (Prims.of_int (51)) - (Prims.of_int (50))))) + (Prims.of_int (57)) + (Prims.of_int (16)) + (Prims.of_int (57)) + (Prims.of_int (32))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Comp.fst" - (Prims.of_int (50)) + (Prims.of_int (57)) (Prims.of_int (35)) - (Prims.of_int (54)) + (Prims.of_int (63)) (Prims.of_int (44))))) - (Obj.magic - (Pulse_Checker_Pure.core_check_term g - i)) + (Obj.magic (check_st_comp st)) (fun uu___ -> - (fun uu___ -> - match uu___ with - | Prims.Mkdtuple2 (ty, i_typing) -> - if - Prims.op_Negation - (Pulse_Syntax_Base.eq_tm ty - Pulse_Syntax_Base.tm_inames) - then - Obj.magic - (Obj.repr - (Pulse_Typing_Env.fail g - FStar_Pervasives_Native.None - "Ill-typed inames")) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - Pulse_Typing.CT_STGhost - (g, i, st, (), - stc))))) uu___))) - uu___))) uu___) \ No newline at end of file + (fun stc -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (58)) + (Prims.of_int (31)) + (Prims.of_int (58)) + (Prims.of_int (50))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (57)) + (Prims.of_int (35)) + (Prims.of_int (63)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Checker_Pure.core_check_term + g1 i)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | Prims.Mkdtuple2 + (ty, i_typing) -> + if + Prims.op_Negation + (Pulse_Syntax_Base.eq_tm + ty + Pulse_Syntax_Base.tm_inames) + then + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (61)) + (Prims.of_int (13)) + (Prims.of_int (62)) + (Prims.of_int (88))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (60)) + (Prims.of_int (11)) + (Prims.of_int (62)) + (Prims.of_int (88))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (62)) + (Prims.of_int (59)) + (Prims.of_int (62)) + (Prims.of_int (87))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (61)) + (Prims.of_int (13)) + (Prims.of_int (62)) + (Prims.of_int (88))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + Pulse_Syntax_Base.tm_inames)) + (fun + uu___1 -> + (fun + uu___1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (61)) + (Prims.of_int (13)) + (Prims.of_int (62)) + (Prims.of_int (88))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (61)) + (Prims.of_int (13)) + (Prims.of_int (62)) + (Prims.of_int (88))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (62)) + (Prims.of_int (37)) + (Prims.of_int (62)) + (Prims.of_int (58))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (61)) + (Prims.of_int (13)) + (Prims.of_int (62)) + (Prims.of_int (88))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + ty)) + (fun + uu___2 -> + (fun + uu___2 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (61)) + (Prims.of_int (13)) + (Prims.of_int (62)) + (Prims.of_int (88))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (61)) + (Prims.of_int (13)) + (Prims.of_int (62)) + (Prims.of_int (88))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Comp.fst" + (Prims.of_int (62)) + (Prims.of_int (16)) + (Prims.of_int (62)) + (Prims.of_int (36))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + i)) + (fun + uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + fun x -> + fun x1 -> + Prims.strcat + (Prims.strcat + (Prims.strcat + "check_comp: type of inames term " + (Prims.strcat + uu___3 + " is ")) + (Prims.strcat + x + ", expected ")) + (Prims.strcat + x1 ""))))) + (fun + uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + uu___3 + uu___2)))) + uu___2))) + (fun + uu___2 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + uu___2 + uu___1)))) + uu___1))) + (fun + uu___1 -> + (fun + uu___1 -> + Obj.magic + (Pulse_Typing_Env.fail + g1 + FStar_Pervasives_Native.None + uu___1)) + uu___1))) + else + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___2 -> + Pulse_Typing.CT_STGhost + (g1, i, + st, (), + stc))))) + uu___))) uu___))) uu___))) + uu___) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Checker_Exists.ml b/src/ocaml/plugin/generated/Pulse_Checker_Exists.ml index 55bd199dd..163f54254 100644 --- a/src/ocaml/plugin/generated/Pulse_Checker_Exists.ml +++ b/src/ocaml/plugin/generated/Pulse_Checker_Exists.ml @@ -23,157 +23,189 @@ let (terms_to_string : (fun uu___1 -> FStar_String.concat "\n" uu___)) let (check_elim_exists : Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.term -> - unit -> - unit Pulse_Typing.post_hint_opt -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, - unit) FStar_Tactics_Effect.tac_repr) + Pulse_Syntax_Base.term -> + unit -> + unit Pulse_Typing.post_hint_opt -> + Pulse_Syntax_Base.ppname -> + Pulse_Syntax_Base.st_term -> + ((unit, unit, unit) Pulse_Checker_Base.checker_result_t, + unit) FStar_Tactics_Effect.tac_repr) = fun g -> - fun t -> - fun pre -> - fun pre_typing -> - fun post_hint -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (34)) (Prims.of_int (32)) - (Prims.of_int (34)) (Prims.of_int (38))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (33)) (Prims.of_int (46)) - (Prims.of_int (70)) (Prims.of_int (61))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> t.Pulse_Syntax_Base.term1)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | Pulse_Syntax_Base.Tm_ElimExists - { Pulse_Syntax_Base.p1 = t1;_} -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (36)) (Prims.of_int (6)) - (Prims.of_int (53)) (Prims.of_int (27))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (55)) (Prims.of_int (4)) - (Prims.of_int (70)) (Prims.of_int (61))))) - (match t1.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_Unknown -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (39)) - (Prims.of_int (17)) - (Prims.of_int (39)) - (Prims.of_int (34))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (39)) - (Prims.of_int (37)) - (Prims.of_int (48)) - (Prims.of_int (43))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - Pulse_Checker_VPropEquiv.vprop_as_list - pre)) - (fun uu___1 -> - (fun ts -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (40)) - (Prims.of_int (24)) - (Prims.of_int (40)) - (Prims.of_int (112))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (41)) - (Prims.of_int (8)) - (Prims.of_int (48)) - (Prims.of_int (43))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - FStar_List_Tot_Base.filter - (fun uu___2 -> - match uu___2 - with - | { - Pulse_Syntax_Base.t - = - Pulse_Syntax_Base.Tm_ExistsSL - (uu___3, + fun pre -> + fun pre_typing -> + fun post_hint -> + fun res_ppname -> + fun t -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Exists.fst" + (Prims.of_int (36)) (Prims.of_int (10)) + (Prims.of_int (36)) (Prims.of_int (69))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Exists.fst" + (Prims.of_int (36)) (Prims.of_int (72)) + (Prims.of_int (73)) (Prims.of_int (55))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing_Env.push_context g "check_elim_exists" + t.Pulse_Syntax_Base.range2)) + (fun uu___ -> + (fun g1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (38)) (Prims.of_int (32)) + (Prims.of_int (38)) (Prims.of_int (38))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (36)) (Prims.of_int (72)) + (Prims.of_int (73)) (Prims.of_int (55))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> t.Pulse_Syntax_Base.term1)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | Pulse_Syntax_Base.Tm_ElimExists + { Pulse_Syntax_Base.p1 = t1;_} -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (40)) + (Prims.of_int (4)) + (Prims.of_int (56)) + (Prims.of_int (21))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (38)) + (Prims.of_int (41)) + (Prims.of_int (73)) + (Prims.of_int (55))))) + (match t1.Pulse_Syntax_Base.t with + | Pulse_Syntax_Base.Tm_Unknown -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (43)) + (Prims.of_int (15)) + (Prims.of_int (43)) + (Prims.of_int (32))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (43)) + (Prims.of_int (35)) + (Prims.of_int (52)) + (Prims.of_int (41))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + Pulse_Typing_Combinators.vprop_as_list + pre)) + (fun uu___1 -> + (fun ts -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (44)) + (Prims.of_int (22)) + (Prims.of_int (44)) + (Prims.of_int (110))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (45)) + (Prims.of_int (6)) + (Prims.of_int (52)) + (Prims.of_int (41))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 + -> + FStar_List_Tot_Base.filter + (fun + uu___2 -> + match uu___2 + with + | + { + Pulse_Syntax_Base.t + = + Pulse_Syntax_Base.Tm_ExistsSL + (uu___3, uu___4, uu___5); - Pulse_Syntax_Base.range1 - = uu___6;_} - -> true - | uu___3 -> - false) ts)) - (fun uu___1 -> - (fun exist_tms -> - match exist_tms with - | one::[] -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - ( - fun + Pulse_Syntax_Base.range1 + = uu___6;_} + -> true + | + uu___3 -> + false) ts)) + (fun uu___1 -> + (fun + exist_tms + -> + match exist_tms + with + | + one::[] + -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> Prims.Mkdtuple2 (one, ())))) - | uu___1 -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - ( - FStar_Sealed.seal + | + uu___1 -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (47)) - (Prims.of_int (12)) - (Prims.of_int (48)) - (Prims.of_int (43))))) - ( - FStar_Sealed.seal + (Prims.of_int (51)) + (Prims.of_int (10)) + (Prims.of_int (52)) + (Prims.of_int (41))))) + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (46)) - (Prims.of_int (10)) - (Prims.of_int (48)) - (Prims.of_int (43))))) - ( - Obj.magic + (Prims.of_int (50)) + (Prims.of_int (8)) + (Prims.of_int (52)) + (Prims.of_int (41))))) + (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (48)) - (Prims.of_int (15)) - (Prims.of_int (48)) - (Prims.of_int (42))))) + (Prims.of_int (52)) + (Prims.of_int (13)) + (Prims.of_int (52)) + (Prims.of_int (40))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range @@ -194,110 +226,242 @@ let (check_elim_exists : "Could not decide which exists term to eliminate: choices are\n" (Prims.strcat uu___2 ""))))) - ( - fun + (fun uu___2 -> (fun uu___2 -> Obj.magic (Pulse_Typing_Env.fail - g - FStar_Pervasives_Native.None + g1 + (FStar_Pervasives_Native.Some + (t1.Pulse_Syntax_Base.range1)) uu___2)) uu___2)))) - uu___1))) uu___1)) - | uu___1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (51)) - (Prims.of_int (19)) - (Prims.of_int (51)) - (Prims.of_int (49))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (50)) - (Prims.of_int (12)) - (Prims.of_int (53)) - (Prims.of_int (27))))) - (Obj.magic - (Pulse_Checker_Pure.instantiate_term_implicits - g t1)) - (fun uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - match uu___2 with - | (t2, uu___4) -> - Prims.Mkdtuple2 (t2, ()))))) - (fun uu___1 -> - (fun t_t_typing -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (56)) - (Prims.of_int (26)) - (Prims.of_int (56)) - (Prims.of_int (36))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (55)) - (Prims.of_int (4)) - (Prims.of_int (70)) - (Prims.of_int (61))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> t_t_typing)) - (fun uu___1 -> - (fun uu___1 -> - match uu___1 with - | Prims.Mkdtuple2 - (t2, t_typing) -> - (match t2.Pulse_Syntax_Base.t - with - | Pulse_Syntax_Base.Tm_ExistsSL - (u, - { - Pulse_Syntax_Base.binder_ty - = ty; - Pulse_Syntax_Base.binder_ppname - = uu___2;_}, - p) - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range + uu___1))) + uu___1)) + | uu___1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (55)) + (Prims.of_int (17)) + (Prims.of_int (55)) + (Prims.of_int (47))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (54)) + (Prims.of_int (10)) + (Prims.of_int (56)) + (Prims.of_int (21))))) + (Obj.magic + (Pulse_Checker_Pure.instantiate_term_implicits + g1 t1)) + (fun uu___2 -> + (fun uu___2 -> + match uu___2 with + | (t2, uu___3) -> + Obj.magic + (Pulse_Checker_Pure.check_vprop + g1 t2)) + uu___2))) + (fun uu___1 -> + (fun uu___1 -> + match uu___1 with + | Prims.Mkdtuple2 + (t2, t_typing) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (59)) + (Prims.of_int (2)) + (Prims.of_int (73)) + (Prims.of_int (55))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (59)) + (Prims.of_int (2)) + (Prims.of_int (73)) + (Prims.of_int (55))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + uu___1)) + (fun uu___2 -> + (fun uu___2 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + ( + FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (59)) + (Prims.of_int (2)) + (Prims.of_int (62)) + (Prims.of_int (33))))) + ( + FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (62)) + (Prims.of_int (34)) + (Prims.of_int (73)) + (Prims.of_int (55))))) + ( + if + Prims.op_Negation + (Pulse_Syntax_Base.uu___is_Tm_ExistsSL + t2.Pulse_Syntax_Base.t) + then + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (61)) + (Prims.of_int (9)) + (Prims.of_int (62)) + (Prims.of_int (33))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (60)) + (Prims.of_int (7)) + (Prims.of_int (62)) + (Prims.of_int (33))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (62)) + (Prims.of_int (12)) + (Prims.of_int (62)) + (Prims.of_int (32))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + t2)) + (fun + uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + Prims.strcat + "check_elim_exists: elim_exists argument " + (Prims.strcat + uu___3 + " not an existential"))))) + (fun + uu___3 -> + (fun + uu___3 -> + Obj.magic + (Pulse_Typing_Env.fail + g1 + (FStar_Pervasives_Native.Some + (t2.Pulse_Syntax_Base.range1)) + uu___3)) + uu___3))) + else + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + ())))) + ( + fun + uu___3 -> + (fun + uu___3 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Exists.fst" (Prims.of_int (64)) - (Prims.of_int (30)) + (Prims.of_int (41)) (Prims.of_int (64)) - (Prims.of_int (49))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range + (Prims.of_int (44))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (59)) - (Prims.of_int (39)) - (Prims.of_int (69)) - (Prims.of_int (62))))) - (Obj.magic - (Pulse_Checker_Pure.check_universe - g ty)) - (fun uu___3 -> - (fun uu___3 -> - match uu___3 - with - | Prims.Mkdtuple2 + (Prims.of_int (62)) + (Prims.of_int (34)) + (Prims.of_int (73)) + (Prims.of_int (55))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + t2.Pulse_Syntax_Base.t)) + (fun + uu___4 -> + (fun + uu___4 -> + match uu___4 + with + | + Pulse_Syntax_Base.Tm_ExistsSL + (u, + { + Pulse_Syntax_Base.binder_ty + = ty; + Pulse_Syntax_Base.binder_ppname + = uu___5;_}, + p) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (66)) + (Prims.of_int (28)) + (Prims.of_int (66)) + (Prims.of_int (47))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (64)) + (Prims.of_int (47)) + (Prims.of_int (73)) + (Prims.of_int (55))))) + (Obj.magic + (Pulse_Checker_Pure.check_universe + g1 ty)) + (fun + uu___6 -> + (fun + uu___6 -> + match uu___6 + with + | + Prims.Mkdtuple2 (u', ty_typing) -> @@ -311,25 +475,25 @@ let (check_elim_exists : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (66)) - (Prims.of_int (17)) - (Prims.of_int (66)) - (Prims.of_int (24))))) + (Prims.of_int (68)) + (Prims.of_int (15)) + (Prims.of_int (68)) + (Prims.of_int (22))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (66)) - (Prims.of_int (27)) (Prims.of_int (68)) - (Prims.of_int (54))))) + (Prims.of_int (25)) + (Prims.of_int (70)) + (Prims.of_int (80))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___4 -> + uu___7 -> Pulse_Typing_Env.fresh - g)) + g1)) (fun - uu___4 -> + uu___7 -> (fun x -> Obj.magic (FStar_Tactics_Effect.tac_bind @@ -337,27 +501,27 @@ let (check_elim_exists : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (67)) - (Prims.of_int (17)) - (Prims.of_int (67)) - (Prims.of_int (59))))) + (Prims.of_int (69)) + (Prims.of_int (15)) + (Prims.of_int (69)) + (Prims.of_int (57))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (68)) - (Prims.of_int (9)) - (Prims.of_int (68)) - (Prims.of_int (54))))) + (Prims.of_int (70)) + (Prims.of_int (7)) + (Prims.of_int (70)) + (Prims.of_int (80))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___4 -> + uu___7 -> Pulse_Typing.T_ElimExists - (g, u, + (g1, u, ty, p, x, (), ()))) (fun - uu___4 -> + uu___7 -> (fun d -> Obj.magic (FStar_Tactics_Effect.tac_bind @@ -365,21 +529,21 @@ let (check_elim_exists : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (68)) - (Prims.of_int (16)) - (Prims.of_int (68)) - (Prims.of_int (44))))) + (Prims.of_int (70)) + (Prims.of_int (23)) + (Prims.of_int (70)) + (Prims.of_int (62))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (68)) - (Prims.of_int (9)) - (Prims.of_int (68)) - (Prims.of_int (54))))) + (Prims.of_int (70)) + (Prims.of_int (7)) + (Prims.of_int (70)) + (Prims.of_int (80))))) (Obj.magic - (Pulse_Checker_Common.try_frame_pre - g + (Pulse_Checker_Prover.try_frame_pre + g pre () (Pulse_Typing.wr (Pulse_Syntax_Base.Tm_ElimExists { @@ -389,56 +553,53 @@ let (check_elim_exists : u (Pulse_Typing.as_binder ty) p) - })) pre - () + })) (Pulse_Typing.comp_elim_exists u ty p (Pulse_Syntax_Base.v_as_nv - x)) d)) + x)) d + res_ppname)) (fun - uu___4 -> + uu___7 -> (fun - uu___4 -> + uu___7 -> Obj.magic - (Pulse_Checker_Common.repack + (Pulse_Checker_Prover.prove_post_hint g pre - (Pulse_Typing.wr - (Pulse_Syntax_Base.Tm_ElimExists - { - Pulse_Syntax_Base.p1 - = - (Pulse_Syntax_Base.tm_exists_sl - u - (Pulse_Typing.as_binder - ty) p) - })) - uu___4 - post_hint)) - uu___4))) - uu___4))) - uu___4)) + uu___7 + post_hint + t2.Pulse_Syntax_Base.range1)) + uu___7))) + uu___7))) + uu___7)) else Obj.magic (Pulse_Typing_Env.fail - g - FStar_Pervasives_Native.None - "Universe checking failed in elim_exists")) - uu___3)) - | uu___2 -> - Obj.magic - (Pulse_Typing_Env.fail - g - FStar_Pervasives_Native.None - "elim_exists argument not a Tm_ExistsSL"))) - uu___1))) uu___1))) uu___) + g1 + (FStar_Pervasives_Native.Some + (t2.Pulse_Syntax_Base.range1)) + (Prims.strcat + (Prims.strcat + "check_elim_exists: universe checking failed, computed " + (Prims.strcat + (Pulse_Syntax_Printer.univ_to_string + u') + ", expected ")) + (Prims.strcat + (Pulse_Syntax_Printer.univ_to_string + u) "")))) + uu___6))) + uu___4))) + uu___3))) + uu___2))) + uu___1))) uu___))) uu___) let (intro_exists_witness_singleton : Pulse_Syntax_Base.st_term -> Prims.bool) = fun st -> match st.Pulse_Syntax_Base.term1 with | Pulse_Syntax_Base.Tm_IntroExists { Pulse_Syntax_Base.erased = uu___; Pulse_Syntax_Base.p2 = uu___1; - Pulse_Syntax_Base.witnesses = uu___2::[]; - Pulse_Syntax_Base.should_check1 = uu___3;_} + Pulse_Syntax_Base.witnesses = uu___2::[];_} -> true | uu___ -> false let (intro_exists_vprop : @@ -447,211 +608,305 @@ let (intro_exists_vprop : match st.Pulse_Syntax_Base.term1 with | Pulse_Syntax_Base.Tm_IntroExists { Pulse_Syntax_Base.erased = uu___; Pulse_Syntax_Base.p2 = p; - Pulse_Syntax_Base.witnesses = uu___1; - Pulse_Syntax_Base.should_check1 = uu___2;_} + Pulse_Syntax_Base.witnesses = uu___1;_} -> p let (is_intro_exists_erased : Pulse_Syntax_Base.st_term -> Prims.bool) = fun st -> match st.Pulse_Syntax_Base.term1 with | Pulse_Syntax_Base.Tm_IntroExists { Pulse_Syntax_Base.erased = erased; Pulse_Syntax_Base.p2 = uu___; - Pulse_Syntax_Base.witnesses = uu___1; - Pulse_Syntax_Base.should_check1 = uu___2;_} + Pulse_Syntax_Base.witnesses = uu___1;_} -> erased | uu___ -> false let (check_intro_exists_erased : Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - unit FStar_Pervasives_Native.option -> - Pulse_Syntax_Base.term -> - unit -> - unit Pulse_Typing.post_hint_opt -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, - unit) FStar_Tactics_Effect.tac_repr) + Pulse_Syntax_Base.term -> + unit -> + unit Pulse_Typing.post_hint_opt -> + Pulse_Syntax_Base.ppname -> + Pulse_Syntax_Base.st_term -> + unit FStar_Pervasives_Native.option -> + ((unit, unit, unit) Pulse_Checker_Base.checker_result_t, + unit) FStar_Tactics_Effect.tac_repr) = fun g -> - fun st -> - fun vprop_typing -> - fun pre -> - fun pre_typing -> - fun post_hint -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (87)) (Prims.of_int (60)) - (Prims.of_int (87)) (Prims.of_int (67))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (85)) (Prims.of_int (46)) - (Prims.of_int (105)) (Prims.of_int (61))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> st.Pulse_Syntax_Base.term1)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | Pulse_Syntax_Base.Tm_IntroExists - { Pulse_Syntax_Base.erased = uu___1; - Pulse_Syntax_Base.p2 = t; - Pulse_Syntax_Base.witnesses = e::[]; - Pulse_Syntax_Base.should_check1 = should_check;_} - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (89)) - (Prims.of_int (4)) - (Prims.of_int (95)) - (Prims.of_int (28))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (87)) - (Prims.of_int (70)) - (Prims.of_int (105)) - (Prims.of_int (61))))) - (match vprop_typing with - | FStar_Pervasives_Native.Some typing -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - Prims.Mkdtuple2 (t, ())))) - | uu___2 -> - Obj.magic - (Obj.repr + fun pre -> + fun pre_typing -> + fun post_hint -> + fun res_ppname -> + fun st -> + fun vprop_typing -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Exists.fst" + (Prims.of_int (91)) (Prims.of_int (10)) + (Prims.of_int (91)) (Prims.of_int (78))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Exists.fst" + (Prims.of_int (91)) (Prims.of_int (81)) + (Prims.of_int (112)) (Prims.of_int (85))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing_Env.push_context g + "check_intro_exists_erased" + st.Pulse_Syntax_Base.range2)) + (fun uu___ -> + (fun g1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (93)) (Prims.of_int (46)) + (Prims.of_int (93)) (Prims.of_int (53))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (91)) (Prims.of_int (81)) + (Prims.of_int (112)) + (Prims.of_int (85))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> st.Pulse_Syntax_Base.term1)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | Pulse_Syntax_Base.Tm_IntroExists + { Pulse_Syntax_Base.erased = uu___1; + Pulse_Syntax_Base.p2 = t; + Pulse_Syntax_Base.witnesses = e::[];_} + -> + Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (92)) - (Prims.of_int (9)) - (Prims.of_int (92)) - (Prims.of_int (30))))) + (Prims.of_int (95)) + (Prims.of_int (4)) + (Prims.of_int (97)) + (Prims.of_int (26))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (92)) - (Prims.of_int (6)) - (Prims.of_int (95)) - (Prims.of_int (28))))) - (Obj.magic - (FStar_Tactics_Unseal.unseal - should_check)) - (fun uu___3 -> - (fun uu___3 -> - if uu___3 - then - Obj.magic + (Prims.of_int (93)) + (Prims.of_int (56)) + (Prims.of_int (112)) + (Prims.of_int (85))))) + (match vprop_typing with + | FStar_Pervasives_Native.Some + typing -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + Prims.Mkdtuple2 + (t, ())))) + | uu___2 -> + Obj.magic + (Obj.repr (Pulse_Checker_Pure.check_vprop - g t) - else - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (94)) - (Prims.of_int (22)) - (Prims.of_int (94)) - (Prims.of_int (71))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (94)) - (Prims.of_int (10)) - (Prims.of_int (95)) - (Prims.of_int (28))))) - (Obj.magic - (Pulse_Checker_Pure.instantiate_term_implicits - g t)) - (fun uu___5 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___6 -> - match uu___5 - with - | (t1, - uu___7) + g1 t))) + (fun uu___2 -> + (fun uu___2 -> + match uu___2 with + | Prims.Mkdtuple2 + (t1, t_typing) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (100)) + (Prims.of_int (2)) + (Prims.of_int (103)) + (Prims.of_int (33))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (103)) + (Prims.of_int (34)) + (Prims.of_int (112)) + (Prims.of_int (85))))) + (if + Prims.op_Negation + (Pulse_Syntax_Base.uu___is_Tm_ExistsSL + t1.Pulse_Syntax_Base.t) + then + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (102)) + (Prims.of_int (9)) + (Prims.of_int (103)) + (Prims.of_int (33))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (101)) + (Prims.of_int (7)) + (Prims.of_int (103)) + (Prims.of_int (33))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (103)) + (Prims.of_int (12)) + (Prims.of_int (103)) + (Prims.of_int (32))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + t1)) + (fun + uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + Prims.strcat + "check_intro_exists_erased: vprop " + (Prims.strcat + uu___3 + " is not an existential"))))) + (fun + uu___3 -> + (fun + uu___3 -> + Obj.magic + (Pulse_Typing_Env.fail + g1 + (FStar_Pervasives_Native.Some + (st.Pulse_Syntax_Base.range2)) + uu___3)) + uu___3))) + else + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + ())))) + (fun uu___3 -> + (fun uu___3 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (105)) + (Prims.of_int (26)) + (Prims.of_int (105)) + (Prims.of_int (39))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (103)) + (Prims.of_int (34)) + (Prims.of_int (112)) + (Prims.of_int (85))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + t1.Pulse_Syntax_Base.t)) + (fun + uu___4 -> + (fun + uu___4 -> + match uu___4 + with + | + Pulse_Syntax_Base.Tm_ExistsSL + (u, b, p) + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (108)) + (Prims.of_int (21)) + (Prims.of_int (108)) + (Prims.of_int (92))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (107)) + (Prims.of_int (47)) + (Prims.of_int (112)) + (Prims.of_int (85))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___5 -> + Pulse_Typing_Metatheory_Base.tm_exists_inversion + g1 u + b.Pulse_Syntax_Base.binder_ty + p () + (Pulse_Typing_Env.fresh + g1))) + (fun + uu___5 -> + (fun + uu___5 -> + match uu___5 + with + | + (ty_typing, + uu___6) -> - Prims.Mkdtuple2 - (t1, ()))))) - uu___3)))) - (fun uu___2 -> - (fun uu___2 -> - match uu___2 with - | Prims.Mkdtuple2 (t1, t_typing) -> - (match t1.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_ExistsSL - (u, b, p) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (100)) - (Prims.of_int (23)) - (Prims.of_int (100)) - (Prims.of_int (94))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (99)) - (Prims.of_int (49)) - (Prims.of_int (104)) - (Prims.of_int (49))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - Pulse_Typing_Metatheory.tm_exists_inversion - g u - b.Pulse_Syntax_Base.binder_ty - p () - (Pulse_Typing_Env.fresh - g))) - (fun uu___3 -> - (fun uu___3 -> - match uu___3 with - | (ty_typing, - uu___4) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (102)) - (Prims.of_int (8)) - (Prims.of_int (102)) - (Prims.of_int (67))))) - (FStar_Sealed.seal + (Prims.of_int (110)) + (Prims.of_int (4)) + (Prims.of_int (110)) + (Prims.of_int (63))))) + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (100)) - (Prims.of_int (97)) - (Prims.of_int (104)) - (Prims.of_int (49))))) - (Obj.magic + (Prims.of_int (108)) + (Prims.of_int (95)) + (Prims.of_int (112)) + (Prims.of_int (85))))) + (Obj.magic (Pulse_Checker_Pure.check_term_with_expected_type - g e + g1 e (Pulse_Typing.mk_erased u b.Pulse_Syntax_Base.binder_ty))) - (fun uu___5 - -> (fun - uu___5 -> - match uu___5 + uu___7 -> + (fun + uu___7 -> + match uu___7 with | Prims.Mkdtuple2 @@ -664,28 +919,28 @@ let (check_intro_exists_erased : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (103)) - (Prims.of_int (12)) - (Prims.of_int (103)) - (Prims.of_int (73))))) + (Prims.of_int (111)) + (Prims.of_int (10)) + (Prims.of_int (111)) + (Prims.of_int (71))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (104)) - (Prims.of_int (4)) - (Prims.of_int (104)) - (Prims.of_int (49))))) + (Prims.of_int (112)) + (Prims.of_int (2)) + (Prims.of_int (112)) + (Prims.of_int (85))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___6 -> + uu___8 -> Pulse_Typing.T_IntroExistsErased - (g, u, b, - p, e1, + (g1, u, + b, p, e1, (), (), ()))) (fun - uu___6 -> + uu___8 -> (fun d -> Obj.magic (FStar_Tactics_Effect.tac_bind @@ -693,21 +948,21 @@ let (check_intro_exists_erased : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (104)) - (Prims.of_int (11)) - (Prims.of_int (104)) - (Prims.of_int (39))))) + (Prims.of_int (112)) + (Prims.of_int (18)) + (Prims.of_int (112)) + (Prims.of_int (57))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (104)) - (Prims.of_int (4)) - (Prims.of_int (104)) - (Prims.of_int (49))))) + (Prims.of_int (112)) + (Prims.of_int (2)) + (Prims.of_int (112)) + (Prims.of_int (85))))) (Obj.magic - (Pulse_Checker_Common.try_frame_pre - g + (Pulse_Checker_Prover.try_frame_pre + g pre () (Pulse_Typing.wr (Pulse_Syntax_Base.Tm_IntroExists { @@ -718,242 +973,323 @@ let (check_intro_exists_erased : (Pulse_Syntax_Base.tm_exists_sl u b p); Pulse_Syntax_Base.witnesses - = [e1]; - Pulse_Syntax_Base.should_check1 - = - Pulse_Syntax_Base.should_check_true - })) pre - () + = [e1] + })) (Pulse_Typing.comp_intro_exists_erased u b p e1) - d)) + d + res_ppname)) (fun - uu___6 -> + uu___8 -> (fun - uu___6 -> + uu___8 -> Obj.magic - (Pulse_Checker_Common.repack + (Pulse_Checker_Prover.prove_post_hint g pre - (Pulse_Typing.wr - (Pulse_Syntax_Base.Tm_IntroExists - { - Pulse_Syntax_Base.erased - = true; - Pulse_Syntax_Base.p2 - = - (Pulse_Syntax_Base.tm_exists_sl - u b p); - Pulse_Syntax_Base.witnesses - = [e1]; - Pulse_Syntax_Base.should_check1 - = - Pulse_Syntax_Base.should_check_true - })) - uu___6 - post_hint)) - uu___6))) - uu___6))) + uu___8 + post_hint + t1.Pulse_Syntax_Base.range1)) + uu___8))) + uu___8))) + uu___7))) uu___5))) - uu___3)) - | uu___3 -> - Obj.magic - (Pulse_Typing_Env.fail g - FStar_Pervasives_Native.None - "elim_exists argument not a Tm_ExistsSL"))) - uu___2))) uu___) -let (check_intro_exists : + uu___4))) + uu___3))) + uu___2))) uu___))) uu___) +let (check_intro_exists_non_erased : Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - unit FStar_Pervasives_Native.option -> - Pulse_Syntax_Base.term -> - unit -> - unit Pulse_Typing.post_hint_opt -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, - unit) FStar_Tactics_Effect.tac_repr) + Pulse_Syntax_Base.term -> + unit -> + unit Pulse_Typing.post_hint_opt -> + Pulse_Syntax_Base.ppname -> + Pulse_Syntax_Base.st_term -> + unit FStar_Pervasives_Native.option -> + ((unit, unit, unit) Pulse_Checker_Base.checker_result_t, + unit) FStar_Tactics_Effect.tac_repr) = fun g -> - fun st -> - fun vprop_typing -> - fun pre -> - fun pre_typing -> - fun post_hint -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (117)) (Prims.of_int (66)) - (Prims.of_int (117)) (Prims.of_int (73))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (115)) (Prims.of_int (46)) - (Prims.of_int (136)) (Prims.of_int (61))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> st.Pulse_Syntax_Base.term1)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | Pulse_Syntax_Base.Tm_IntroExists - { Pulse_Syntax_Base.erased = uu___1; - Pulse_Syntax_Base.p2 = t; - Pulse_Syntax_Base.witnesses = witness::[]; - Pulse_Syntax_Base.should_check1 = should_check;_} - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (119)) - (Prims.of_int (4)) - (Prims.of_int (125)) - (Prims.of_int (28))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (117)) - (Prims.of_int (76)) - (Prims.of_int (136)) - (Prims.of_int (61))))) - (match vprop_typing with - | FStar_Pervasives_Native.Some typing -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - Prims.Mkdtuple2 (t, ())))) - | uu___2 -> - Obj.magic - (Obj.repr + fun pre -> + fun pre_typing -> + fun post_hint -> + fun res_ppname -> + fun st -> + fun vprop_typing -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Exists.fst" + (Prims.of_int (125)) (Prims.of_int (10)) + (Prims.of_int (125)) (Prims.of_int (82))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Exists.fst" + (Prims.of_int (125)) (Prims.of_int (85)) + (Prims.of_int (147)) (Prims.of_int (85))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing_Env.push_context g + "check_intro_exists_non_erased" + st.Pulse_Syntax_Base.range2)) + (fun uu___ -> + (fun g1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (127)) + (Prims.of_int (52)) + (Prims.of_int (127)) + (Prims.of_int (59))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (125)) + (Prims.of_int (85)) + (Prims.of_int (147)) + (Prims.of_int (85))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> st.Pulse_Syntax_Base.term1)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | Pulse_Syntax_Base.Tm_IntroExists + { Pulse_Syntax_Base.erased = uu___1; + Pulse_Syntax_Base.p2 = t; + Pulse_Syntax_Base.witnesses = + witness::[];_} + -> + Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (122)) - (Prims.of_int (9)) - (Prims.of_int (122)) - (Prims.of_int (30))))) + (Prims.of_int (129)) + (Prims.of_int (4)) + (Prims.of_int (131)) + (Prims.of_int (26))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (122)) - (Prims.of_int (6)) - (Prims.of_int (125)) - (Prims.of_int (28))))) - (Obj.magic - (FStar_Tactics_Unseal.unseal - should_check)) - (fun uu___3 -> - (fun uu___3 -> - if uu___3 - then - Obj.magic + (Prims.of_int (127)) + (Prims.of_int (62)) + (Prims.of_int (147)) + (Prims.of_int (85))))) + (match vprop_typing with + | FStar_Pervasives_Native.Some + typing -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + Prims.Mkdtuple2 + (t, ())))) + | uu___2 -> + Obj.magic + (Obj.repr (Pulse_Checker_Pure.check_vprop - g t) - else - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (124)) - (Prims.of_int (22)) - (Prims.of_int (124)) - (Prims.of_int (71))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (124)) - (Prims.of_int (10)) - (Prims.of_int (125)) - (Prims.of_int (28))))) - (Obj.magic - (Pulse_Checker_Pure.instantiate_term_implicits - g t)) - (fun uu___5 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___6 -> - match uu___5 - with - | (t1, - uu___7) - -> - Prims.Mkdtuple2 - (t1, ()))))) - uu___3)))) - (fun uu___2 -> - (fun uu___2 -> - match uu___2 with - | Prims.Mkdtuple2 (t1, t_typing) -> - (match t1.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_ExistsSL - (u, b, p) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (130)) - (Prims.of_int (23)) - (Prims.of_int (130)) - (Prims.of_int (94))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Exists.fst" - (Prims.of_int (129)) - (Prims.of_int (49)) - (Prims.of_int (135)) - (Prims.of_int (49))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - Pulse_Typing_Metatheory.tm_exists_inversion - g u - b.Pulse_Syntax_Base.binder_ty - p () - (Pulse_Typing_Env.fresh - g))) - (fun uu___3 -> - (fun uu___3 -> - match uu___3 with - | (ty_typing, - uu___4) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal + g1 t))) + (fun uu___2 -> + (fun uu___2 -> + match uu___2 with + | Prims.Mkdtuple2 + (t1, t_typing) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (134)) + (Prims.of_int (2)) + (Prims.of_int (137)) + (Prims.of_int (33))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (137)) + (Prims.of_int (34)) + (Prims.of_int (147)) + (Prims.of_int (85))))) + (if + Prims.op_Negation + (Pulse_Syntax_Base.uu___is_Tm_ExistsSL + t1.Pulse_Syntax_Base.t) + then + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (132)) - (Prims.of_int (8)) - (Prims.of_int (132)) - (Prims.of_int (59))))) - (FStar_Sealed.seal + (Prims.of_int (136)) + (Prims.of_int (9)) + (Prims.of_int (137)) + (Prims.of_int (33))))) + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (130)) - (Prims.of_int (97)) (Prims.of_int (135)) - (Prims.of_int (49))))) - (Obj.magic - (Pulse_Checker_Pure.check_term_with_expected_type - g witness - b.Pulse_Syntax_Base.binder_ty)) - (fun uu___5 + (Prims.of_int (7)) + (Prims.of_int (137)) + (Prims.of_int (33))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (137)) + (Prims.of_int (12)) + (Prims.of_int (137)) + (Prims.of_int (32))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + t1)) + (fun + uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + Prims.strcat + "check_intro_exists_non_erased: vprop " + (Prims.strcat + uu___3 + " is not an existential"))))) + (fun + uu___3 -> + (fun + uu___3 -> + Obj.magic + (Pulse_Typing_Env.fail + g1 + (FStar_Pervasives_Native.Some + (st.Pulse_Syntax_Base.range2)) + uu___3)) + uu___3))) + else + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + ())))) + (fun uu___3 -> + (fun uu___3 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (139)) + (Prims.of_int (26)) + (Prims.of_int (139)) + (Prims.of_int (39))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (137)) + (Prims.of_int (34)) + (Prims.of_int (147)) + (Prims.of_int (85))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + t1.Pulse_Syntax_Base.t)) + (fun + uu___4 -> + (fun + uu___4 -> + match uu___4 + with + | + Pulse_Syntax_Base.Tm_ExistsSL + (u, b, p) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (142)) + (Prims.of_int (21)) + (Prims.of_int (142)) + (Prims.of_int (92))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (141)) + (Prims.of_int (47)) + (Prims.of_int (147)) + (Prims.of_int (85))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___5 -> + Pulse_Typing_Metatheory_Base.tm_exists_inversion + g1 u + b.Pulse_Syntax_Base.binder_ty + p () + (Pulse_Typing_Env.fresh + g1))) + (fun + uu___5 -> (fun uu___5 -> match uu___5 with | + (ty_typing, + uu___6) + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (144)) + (Prims.of_int (4)) + (Prims.of_int (144)) + (Prims.of_int (55))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Exists.fst" + (Prims.of_int (142)) + (Prims.of_int (95)) + (Prims.of_int (147)) + (Prims.of_int (85))))) + (Obj.magic + (Pulse_Checker_Pure.check_term_with_expected_type + g1 + witness + b.Pulse_Syntax_Base.binder_ty)) + (fun + uu___7 -> + (fun + uu___7 -> + match uu___7 + with + | Prims.Mkdtuple2 (witness1, witness_typing) @@ -964,29 +1300,29 @@ let (check_intro_exists : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (133)) - (Prims.of_int (12)) - (Prims.of_int (133)) - (Prims.of_int (79))))) + (Prims.of_int (145)) + (Prims.of_int (10)) + (Prims.of_int (145)) + (Prims.of_int (77))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (133)) - (Prims.of_int (82)) - (Prims.of_int (135)) - (Prims.of_int (49))))) + (Prims.of_int (145)) + (Prims.of_int (80)) + (Prims.of_int (147)) + (Prims.of_int (85))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___6 -> + uu___8 -> Pulse_Typing.T_IntroExists - (g, u, b, - p, + (g1, u, + b, p, witness1, (), (), ()))) (fun - uu___6 -> + uu___8 -> (fun d -> Obj.magic (FStar_Tactics_Effect.tac_bind @@ -994,31 +1330,31 @@ let (check_intro_exists : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (134)) - (Prims.of_int (47)) - (Prims.of_int (134)) - (Prims.of_int (57))))) + (Prims.of_int (146)) + (Prims.of_int (45)) + (Prims.of_int (146)) + (Prims.of_int (55))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (133)) - (Prims.of_int (82)) - (Prims.of_int (135)) - (Prims.of_int (49))))) + (Prims.of_int (145)) + (Prims.of_int (80)) + (Prims.of_int (147)) + (Prims.of_int (85))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___6 -> + uu___8 -> Prims.Mkdtuple2 ((Pulse_Typing.comp_intro_exists u b p witness1), d))) (fun - uu___6 -> + uu___8 -> (fun - uu___6 -> - match uu___6 + uu___8 -> + match uu___8 with | Prims.Mkdtuple2 @@ -1030,47 +1366,47 @@ let (check_intro_exists : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (135)) - (Prims.of_int (4)) - (Prims.of_int (135)) - (Prims.of_int (49))))) + (Prims.of_int (147)) + (Prims.of_int (2)) + (Prims.of_int (147)) + (Prims.of_int (85))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (135)) - (Prims.of_int (4)) - (Prims.of_int (135)) - (Prims.of_int (49))))) + (Prims.of_int (147)) + (Prims.of_int (2)) + (Prims.of_int (147)) + (Prims.of_int (85))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___7 -> - uu___6)) + uu___9 -> + uu___8)) (fun - uu___7 -> + uu___9 -> (fun - uu___7 -> + uu___9 -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (135)) - (Prims.of_int (11)) - (Prims.of_int (135)) - (Prims.of_int (39))))) + (Prims.of_int (147)) + (Prims.of_int (18)) + (Prims.of_int (147)) + (Prims.of_int (57))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Exists.fst" - (Prims.of_int (135)) - (Prims.of_int (4)) - (Prims.of_int (135)) - (Prims.of_int (49))))) + (Prims.of_int (147)) + (Prims.of_int (2)) + (Prims.of_int (147)) + (Prims.of_int (85))))) (Obj.magic - (Pulse_Checker_Common.try_frame_pre - g + (Pulse_Checker_Prover.try_frame_pre + g pre () (Pulse_Typing.wr (Pulse_Syntax_Base.Tm_IntroExists { @@ -1082,66 +1418,52 @@ let (check_intro_exists : u b p); Pulse_Syntax_Base.witnesses = - [witness1]; - Pulse_Syntax_Base.should_check1 - = - Pulse_Syntax_Base.should_check_true - })) pre - () c d1)) + [witness1] + })) c d1 + res_ppname)) (fun - uu___8 -> + uu___10 + -> (fun - uu___8 -> + uu___10 + -> Obj.magic - (Pulse_Checker_Common.repack + (Pulse_Checker_Prover.prove_post_hint g pre - (Pulse_Typing.wr - (Pulse_Syntax_Base.Tm_IntroExists - { - Pulse_Syntax_Base.erased - = false; - Pulse_Syntax_Base.p2 - = - (Pulse_Syntax_Base.tm_exists_sl - u b p); - Pulse_Syntax_Base.witnesses - = - [witness1]; - Pulse_Syntax_Base.should_check1 - = - Pulse_Syntax_Base.should_check_true - })) - uu___8 - post_hint)) + uu___10 + post_hint + t1.Pulse_Syntax_Base.range1)) + uu___10))) + uu___9))) + uu___8))) uu___8))) uu___7))) - uu___6))) - uu___6))) uu___5))) - uu___3)) - | uu___3 -> - Obj.magic - (Pulse_Typing_Env.fail g - FStar_Pervasives_Native.None - "elim_exists argument not a Tm_ExistsSL"))) - uu___2))) uu___) -let (check_intro_exists_either : + uu___4))) + uu___3))) + uu___2))) uu___))) uu___) +let (check_intro_exists : Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - unit FStar_Pervasives_Native.option -> - Pulse_Syntax_Base.term -> - unit -> - unit Pulse_Typing.post_hint_opt -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, - unit) FStar_Tactics_Effect.tac_repr) + Pulse_Syntax_Base.term -> + unit -> + unit Pulse_Typing.post_hint_opt -> + Pulse_Syntax_Base.ppname -> + Pulse_Syntax_Base.st_term -> + unit FStar_Pervasives_Native.option -> + ((unit, unit, unit) Pulse_Checker_Base.checker_result_t, + unit) FStar_Tactics_Effect.tac_repr) = fun g -> - fun st -> - fun vprop_typing -> - fun pre -> - fun pre_typing -> - fun post_hint -> - if is_intro_exists_erased st - then - check_intro_exists_erased g st vprop_typing pre () post_hint - else check_intro_exists g st vprop_typing pre () post_hint \ No newline at end of file + fun pre -> + fun pre_typing -> + fun post_hint -> + fun res_ppname -> + fun st -> + fun vprop_typing -> + if is_intro_exists_erased st + then + check_intro_exists_erased g pre () post_hint res_ppname st + vprop_typing + else + check_intro_exists_non_erased g pre () post_hint res_ppname + st vprop_typing \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Checker_Framing.ml b/src/ocaml/plugin/generated/Pulse_Checker_Framing.ml deleted file mode 100644 index 0895ee5ff..000000000 --- a/src/ocaml/plugin/generated/Pulse_Checker_Framing.ml +++ /dev/null @@ -1,1937 +0,0 @@ -open Prims -type framing_failure = - { - unmatched_preconditions: Pulse_Syntax_Base.term Prims.list ; - remaining_context: Pulse_Syntax_Base.term Prims.list } -let (__proj__Mkframing_failure__item__unmatched_preconditions : - framing_failure -> Pulse_Syntax_Base.term Prims.list) = - fun projectee -> - match projectee with - | { unmatched_preconditions; remaining_context;_} -> - unmatched_preconditions -let (__proj__Mkframing_failure__item__remaining_context : - framing_failure -> Pulse_Syntax_Base.term Prims.list) = - fun projectee -> - match projectee with - | { unmatched_preconditions; remaining_context;_} -> remaining_context -let (debug_log : - Pulse_Typing_Env.env -> - (unit -> (Prims.string, unit) FStar_Tactics_Effect.tac_repr) -> - (unit, unit) FStar_Tactics_Effect.tac_repr) - = Pulse_Typing.debug_log "framing" -let (print_vprop_l : - Pulse_Syntax_Base.term Prims.list -> - (Prims.string, unit) FStar_Tactics_Effect.tac_repr) - = - fun vps -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Framing.fst" - (Prims.of_int (23)) (Prims.of_int (4)) (Prims.of_int (23)) - (Prims.of_int (55))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "prims.fst" (Prims.of_int (590)) - (Prims.of_int (19)) (Prims.of_int (590)) (Prims.of_int (31))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Framing.fst" - (Prims.of_int (23)) (Prims.of_int (26)) - (Prims.of_int (23)) (Prims.of_int (54))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Framing.fst" - (Prims.of_int (23)) (Prims.of_int (4)) - (Prims.of_int (23)) (Prims.of_int (55))))) - (Obj.magic - (FStar_Tactics_Util.map Pulse_Syntax_Printer.term_to_string - vps)) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> FStar_String.concat ";\n " uu___)))) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> Prims.strcat "[" (Prims.strcat uu___ "]"))) -let (print_framing_failure : - framing_failure -> (Prims.string, unit) FStar_Tactics_Effect.tac_repr) = - fun ff -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Framing.fst" - (Prims.of_int (28)) (Prims.of_int (4)) (Prims.of_int (28)) - (Prims.of_int (40))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Framing.fst" - (Prims.of_int (26)) (Prims.of_int (2)) (Prims.of_int (28)) - (Prims.of_int (40))))) - (Obj.magic (print_vprop_l ff.remaining_context)) - (fun uu___ -> - (fun uu___ -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Framing.fst" - (Prims.of_int (26)) (Prims.of_int (2)) - (Prims.of_int (28)) (Prims.of_int (40))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Framing.fst" - (Prims.of_int (26)) (Prims.of_int (2)) - (Prims.of_int (28)) (Prims.of_int (40))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (27)) (Prims.of_int (4)) - (Prims.of_int (27)) (Prims.of_int (46))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "FStar.Printf.fst" - (Prims.of_int (121)) (Prims.of_int (8)) - (Prims.of_int (123)) (Prims.of_int (44))))) - (Obj.magic (print_vprop_l ff.unmatched_preconditions)) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - fun x -> - Prims.strcat - (Prims.strcat - " { unmatched_preconditions = " - (Prims.strcat uu___1 - ";\n remaining_context = ")) - (Prims.strcat x "\n}"))))) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> uu___1 uu___)))) uu___) -type ('g, 'p, 'q) match_result = - { - matched: Pulse_Syntax_Base.vprop Prims.list ; - unmatched_p: Pulse_Syntax_Base.vprop Prims.list ; - unmatched_q: Pulse_Syntax_Base.vprop Prims.list ; - p_eq: unit ; - q_eq: unit } -let (__proj__Mkmatch_result__item__matched : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term Prims.list -> - Pulse_Syntax_Base.term Prims.list -> - (unit, unit, unit) match_result -> Pulse_Syntax_Base.vprop Prims.list) - = - fun g -> - fun p -> - fun q -> - fun projectee -> - match projectee with - | { matched; unmatched_p; unmatched_q; p_eq; q_eq;_} -> matched -let (__proj__Mkmatch_result__item__unmatched_p : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term Prims.list -> - Pulse_Syntax_Base.term Prims.list -> - (unit, unit, unit) match_result -> Pulse_Syntax_Base.vprop Prims.list) - = - fun g -> - fun p -> - fun q -> - fun projectee -> - match projectee with - | { matched; unmatched_p; unmatched_q; p_eq; q_eq;_} -> unmatched_p -let (__proj__Mkmatch_result__item__unmatched_q : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term Prims.list -> - Pulse_Syntax_Base.term Prims.list -> - (unit, unit, unit) match_result -> Pulse_Syntax_Base.vprop Prims.list) - = - fun g -> - fun p -> - fun q -> - fun projectee -> - match projectee with - | { matched; unmatched_p; unmatched_q; p_eq; q_eq;_} -> unmatched_q -let (equational : Pulse_Syntax_Base.term -> Prims.bool) = - fun t -> - match t.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_FStar host_term -> - (match FStar_Reflection_V2_Builtins.inspect_ln host_term with - | FStar_Reflection_V2_Data.Tv_Match (uu___, uu___1, uu___2) -> true - | uu___ -> false) - | uu___ -> false -let (type_of_fv : - Pulse_Typing_Env.env -> - FStar_Reflection_Types.fv -> - (FStar_Reflection_Types.term FStar_Pervasives_Native.option, unit) - FStar_Tactics_Effect.tac_repr) - = - fun uu___1 -> - fun uu___ -> - (fun g -> - fun fv -> - Obj.magic - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - match FStar_Reflection_V2_Builtins.lookup_typ - (Pulse_Typing_Env.fstar_env g) - (FStar_Reflection_V2_Builtins.inspect_fv fv) - with - | FStar_Pervasives_Native.None -> - FStar_Pervasives_Native.None - | FStar_Pervasives_Native.Some se -> - (match FStar_Reflection_V2_Builtins.inspect_sigelt se - with - | FStar_Reflection_V2_Data.Unk -> - FStar_Pervasives_Native.None - | FStar_Reflection_V2_Data.Sg_Let (uu___1, lbs) -> - FStar_List_Tot_Base.tryPick - (fun lb -> - if - (FStar_Reflection_V2_Builtins.inspect_fv - (FStar_Reflection_V2_Builtins.inspect_lb - lb).FStar_Reflection_V2_Data.lb_fv) - = - (FStar_Reflection_V2_Builtins.inspect_fv - fv) - then - FStar_Pervasives_Native.Some - ((FStar_Reflection_V2_Builtins.inspect_lb - lb).FStar_Reflection_V2_Data.lb_typ) - else FStar_Pervasives_Native.None) lbs - | FStar_Reflection_V2_Data.Sg_Val (uu___1, uu___2, t) - -> FStar_Pervasives_Native.Some t - | FStar_Reflection_V2_Data.Sg_Inductive - (_nm, _univs, params, typ, uu___1) -> - FStar_Pervasives_Native.None)))) uu___1 uu___ -let (is_smt_fallback : FStar_Reflection_Types.term -> Prims.bool) = - fun t -> - match FStar_Reflection_V2_Builtins.inspect_ln t with - | FStar_Reflection_V2_Data.Tv_FVar fv -> - let name = FStar_Reflection_V2_Builtins.inspect_fv fv in - name = ["Steel"; "Effect"; "Common"; "smt_fallback"] - | uu___ -> false -let (eligible_for_smt_equality : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun t0 -> - fun t1 -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Framing.fst" - (Prims.of_int (103)) (Prims.of_int (31)) - (Prims.of_int (103)) (Prims.of_int (61))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Framing.fst" - (Prims.of_int (103)) (Prims.of_int (64)) - (Prims.of_int (161)) (Prims.of_int (31))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> fun uu___1 -> (equational t0) || (equational t1))) - (fun uu___ -> - (fun either_equational -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Framing.fst" - (Prims.of_int (105)) (Prims.of_int (6)) - (Prims.of_int (108)) (Prims.of_int (18))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Framing.fst" - (Prims.of_int (110)) (Prims.of_int (4)) - (Prims.of_int (161)) (Prims.of_int (31))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - fun t01 -> - fun t11 -> - match ((FStar_Reflection_V2_Builtins.inspect_ln - t01), - (FStar_Reflection_V2_Builtins.inspect_ln - t11)) - with - | (FStar_Reflection_V2_Data.Tv_App - (h0, uu___1), - FStar_Reflection_V2_Data.Tv_App - (h1, uu___2)) -> - FStar_Reflection_V2_TermEq.term_eq h0 h1 - | uu___1 -> false)) - (fun uu___ -> - (fun head_eq -> - match ((t0.Pulse_Syntax_Base.t), - (t1.Pulse_Syntax_Base.t)) - with - | (Pulse_Syntax_Base.Tm_FStar t01, - Pulse_Syntax_Base.Tm_FStar t11) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (112)) - (Prims.of_int (22)) - (Prims.of_int (112)) - (Prims.of_int (41))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (111)) - (Prims.of_int (34)) - (Prims.of_int (160)) - (Prims.of_int (5))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - FStar_Reflection_V2_Derived.collect_app_ln - t01)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | (h0, args0) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (113)) - (Prims.of_int (22)) - (Prims.of_int (113)) - (Prims.of_int (41))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (112)) - (Prims.of_int (44)) - (Prims.of_int (159)) - (Prims.of_int (31))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - FStar_Reflection_V2_Derived.collect_app_ln - t11)) - (fun uu___1 -> - (fun uu___1 -> - match uu___1 with - | (h1, args1) -> - if - (FStar_Reflection_V2_TermEq.term_eq - h0 h1) && - ( - (FStar_List_Tot_Base.length - args0) = - (FStar_List_Tot_Base.length - args1)) - then - Obj.magic - ( - Obj.repr - (match - FStar_Reflection_V2_Builtins.inspect_ln - h0 - with - | - FStar_Reflection_V2_Data.Tv_FVar - fv -> - Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (119)) - (Prims.of_int (16)) - (Prims.of_int (119)) - (Prims.of_int (31))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (118)) - (Prims.of_int (29)) - (Prims.of_int (156)) - (Prims.of_int (9))))) - (Obj.magic - (type_of_fv - g fv)) - (fun - uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - match uu___2 - with - | - FStar_Pervasives_Native.None - -> - either_equational - () - | - FStar_Pervasives_Native.Some - t -> - (match - FStar_Reflection_V2_Derived.collect_arr_ln_bs - t - with - | - (bs, - uu___4) - -> - (match - FStar_List_Tot_Base.fold_right - (fun b -> - fun - uu___5 -> - match uu___5 - with - | - (some_fallbacks, - bs1) -> - if - FStar_List_Tot_Base.existsb - is_smt_fallback - (FStar_Reflection_V2_Builtins.inspect_binder - b).FStar_Reflection_V2_Data.attrs - then - (true, - (true :: - bs1)) - else - (some_fallbacks, - (false :: - bs1))) bs - (false, - []) - with - | - (some_fallbacks, - fallbacks) - -> - if - Prims.op_Negation - some_fallbacks - then - head_eq - t01 t11 - else - (let rec aux - args01 - args11 - fallbacks1 - = - match - (args01, - args11, - fallbacks1) - with - | - ((a0, - uu___6)::args02, - (a1, - uu___7)::args12, - b::fallbacks2) - -> - if b - then - aux - args02 - args12 - fallbacks2 - else - if - Prims.op_Negation - (FStar_Reflection_V2_TermEq.term_eq - a0 a1) - then - false - else - aux - args02 - args12 - fallbacks2 - | - ([], [], - []) -> - true - | - uu___6 -> - either_equational - () in - aux args0 - args1 - fallbacks)))))) - | - FStar_Reflection_V2_Data.Tv_UInst - (fv, - uu___2) - -> - Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (119)) - (Prims.of_int (16)) - (Prims.of_int (119)) - (Prims.of_int (31))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (118)) - (Prims.of_int (29)) - (Prims.of_int (156)) - (Prims.of_int (9))))) - (Obj.magic - (type_of_fv - g fv)) - (fun - uu___3 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - match uu___3 - with - | - FStar_Pervasives_Native.None - -> - either_equational - () - | - FStar_Pervasives_Native.Some - t -> - (match - FStar_Reflection_V2_Derived.collect_arr_ln_bs - t - with - | - (bs, - uu___5) - -> - (match - FStar_List_Tot_Base.fold_right - (fun b -> - fun - uu___6 -> - match uu___6 - with - | - (some_fallbacks, - bs1) -> - if - FStar_List_Tot_Base.existsb - is_smt_fallback - (FStar_Reflection_V2_Builtins.inspect_binder - b).FStar_Reflection_V2_Data.attrs - then - (true, - (true :: - bs1)) - else - (some_fallbacks, - (false :: - bs1))) bs - (false, - []) - with - | - (some_fallbacks, - fallbacks) - -> - if - Prims.op_Negation - some_fallbacks - then - head_eq - t01 t11 - else - (let rec aux - args01 - args11 - fallbacks1 - = - match - (args01, - args11, - fallbacks1) - with - | - ((a0, - uu___7)::args02, - (a1, - uu___8)::args12, - b::fallbacks2) - -> - if b - then - aux - args02 - args12 - fallbacks2 - else - if - Prims.op_Negation - (FStar_Reflection_V2_TermEq.term_eq - a0 a1) - then - false - else - aux - args02 - args12 - fallbacks2 - | - ([], [], - []) -> - true - | - uu___7 -> - either_equational - () in - aux args0 - args1 - fallbacks)))))) - | - uu___2 -> - Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - either_equational - ())))) - else - Obj.magic - ( - Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - either_equational - ())))) - uu___1))) uu___))) - | uu___ -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> either_equational ())))) - uu___))) uu___) -let (check_one_vprop : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - (unit FStar_Pervasives_Native.option, unit) - FStar_Tactics_Effect.tac_repr) - = - fun uu___2 -> - fun uu___1 -> - fun uu___ -> - (fun g -> - fun p -> - fun q -> - if Pulse_Syntax_Base.eq_tm p q - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> FStar_Pervasives_Native.Some ()))) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (168)) (Prims.of_int (7)) - (Prims.of_int (168)) (Prims.of_int (38))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (168)) (Prims.of_int (4)) - (Prims.of_int (175)) (Prims.of_int (13))))) - (Obj.magic (eligible_for_smt_equality g p q)) - (fun uu___1 -> - (fun uu___1 -> - if uu___1 - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (170)) - (Prims.of_int (15)) - (Prims.of_int (170)) - (Prims.of_int (26))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (170)) - (Prims.of_int (29)) - (Prims.of_int (174)) - (Prims.of_int (23))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - Pulse_Elaborate_Pure.elab_term - p)) - (fun uu___2 -> - (fun v0 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (171)) - (Prims.of_int (15)) - (Prims.of_int (171)) - (Prims.of_int (26))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (172)) - (Prims.of_int (6)) - (Prims.of_int (174)) - (Prims.of_int (23))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - Pulse_Elaborate_Pure.elab_term - q)) - (fun uu___2 -> - (fun v1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (172)) - (Prims.of_int (12)) - (Prims.of_int (172)) - (Prims.of_int (44))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (172)) - (Prims.of_int (6)) - (Prims.of_int (174)) - (Prims.of_int (23))))) - (Obj.magic - (FStar_Tactics_V2_Builtins.check_equiv - (Pulse_Typing.elab_env - g) v0 v1)) - (fun uu___2 -> - FStar_Tactics_Effect.lift_div_tac - ( - fun - uu___3 -> - match uu___2 - with - | - (FStar_Pervasives_Native.Some - token, - uu___4) - -> - FStar_Pervasives_Native.Some - () - | - (FStar_Pervasives_Native.None, - uu___4) - -> - FStar_Pervasives_Native.None)))) - uu___2))) uu___2))) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - FStar_Pervasives_Native.None)))) - uu___1)))) uu___2 uu___1 uu___ -type ('g, 'p, 'qs) split_one_vprop_res = - (Pulse_Syntax_Base.term Prims.list, Pulse_Syntax_Base.term, unit, - Pulse_Syntax_Base.term Prims.list) FStar_Pervasives.dtuple4 - FStar_Pervasives_Native.option -let rec (maybe_split_one_vprop : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term Prims.list -> - ((unit, unit, unit) split_one_vprop_res, unit) - FStar_Tactics_Effect.tac_repr) - = - fun uu___2 -> - fun uu___1 -> - fun uu___ -> - (fun g -> - fun p -> - fun qs -> - match qs with - | [] -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> FStar_Pervasives_Native.None))) - | q::qs1 -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (190)) (Prims.of_int (18)) - (Prims.of_int (190)) (Prims.of_int (39))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (191)) (Prims.of_int (6)) - (Prims.of_int (195)) (Prims.of_int (64))))) - (Obj.magic (check_one_vprop g p q)) - (fun uu___ -> - (fun d_opt -> - if - FStar_Pervasives_Native.uu___is_Some d_opt - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - FStar_Pervasives_Native.Some - (FStar_Pervasives.Mkdtuple4 - ([], q, (), qs1))))) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (193)) - (Prims.of_int (17)) - (Prims.of_int (193)) - (Prims.of_int (45))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (193)) - (Prims.of_int (11)) - (Prims.of_int (195)) - (Prims.of_int (64))))) - (Obj.magic - (maybe_split_one_vprop g p qs1)) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - match uu___1 with - | FStar_Pervasives_Native.None - -> - FStar_Pervasives_Native.None - | FStar_Pervasives_Native.Some - (FStar_Pervasives.Mkdtuple4 - (l, q', d, r)) -> - FStar_Pervasives_Native.Some - (FStar_Pervasives.Mkdtuple4 - ((q :: l), q', - (), r))))))) - uu___)))) uu___2 uu___1 uu___ -type ('g, 'req, 'ctxt) framing_success = - (Pulse_Syntax_Base.term Prims.list, unit) Prims.dtuple2 -type ('g, 'req, 'ctxt) try_frame_result = - ((unit, unit, unit) framing_success, framing_failure) - FStar_Pervasives.either -let (mk_framing_failure : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term Prims.list -> - Pulse_Syntax_Base.term Prims.list -> - Pulse_Syntax_Base.term Prims.list -> - Pulse_Syntax_Base.term Prims.list -> - Pulse_Syntax_Base.term -> - (unit, unit, unit) try_frame_result -> - (unit, unit, unit) try_frame_result) - = - fun g -> - fun req -> - fun req' -> - fun ctxt -> - fun ctxt' -> - fun unmatched_pre -> - fun res -> - match res with - | FStar_Pervasives.Inr failure -> - FStar_Pervasives.Inr - { - unmatched_preconditions = (unmatched_pre :: - (failure.unmatched_preconditions)); - remaining_context = (failure.remaining_context) - } - | FStar_Pervasives.Inl (Prims.Mkdtuple2 (frame, uu___)) -> - FStar_Pervasives.Inr - { - unmatched_preconditions = [unmatched_pre]; - remaining_context = frame - } -let rec (try_split_vprop : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term Prims.list -> - Pulse_Syntax_Base.term Prims.list -> - (((Pulse_Syntax_Base.term Prims.list, unit) Prims.dtuple2, - framing_failure) FStar_Pervasives.either, - unit) FStar_Tactics_Effect.tac_repr) - = - fun uu___2 -> - fun uu___1 -> - fun uu___ -> - (fun g -> - fun req -> - fun ctxt -> - match req with - | [] -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - FStar_Pervasives.Inl - (Prims.Mkdtuple2 (ctxt, ()))))) - | hd::tl -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (225)) (Prims.of_int (12)) - (Prims.of_int (225)) (Prims.of_int (43))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (225)) (Prims.of_int (6)) - (Prims.of_int (249)) (Prims.of_int (30))))) - (Obj.magic (maybe_split_one_vprop g hd ctxt)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | FStar_Pervasives_Native.None -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (227)) - (Prims.of_int (30)) - (Prims.of_int (227)) - (Prims.of_int (57))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (227)) - (Prims.of_int (8)) - (Prims.of_int (227)) - (Prims.of_int (57))))) - (Obj.magic - (try_split_vprop g tl ctxt)) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - mk_framing_failure g tl req - ctxt ctxt hd uu___1))) - | FStar_Pervasives_Native.Some - (FStar_Pervasives.Mkdtuple4 - (l, q, d, r)) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (233)) - (Prims.of_int (12)) - (Prims.of_int (233)) - (Prims.of_int (50))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (235)) - (Prims.of_int (8)) - (Prims.of_int (249)) - (Prims.of_int (30))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> ())) - (fun uu___1 -> - (fun d1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (235)) - (Prims.of_int (14)) - (Prims.of_int (235)) - (Prims.of_int (42))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (235)) - (Prims.of_int (8)) - (Prims.of_int (249)) - (Prims.of_int (30))))) - (Obj.magic - (try_split_vprop g tl - (FStar_List_Tot_Base.op_At - l r))) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - match uu___1 - with - | FStar_Pervasives.Inr - failure -> - FStar_Pervasives.Inr - failure - | FStar_Pervasives.Inl - (Prims.Mkdtuple2 - (frame, d2)) - -> - FStar_Pervasives.Inl - (Prims.Mkdtuple2 - (frame, - ())))))) - uu___1))) uu___)))) uu___2 - uu___1 uu___ -let (split_vprop : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - unit -> - Pulse_Syntax_Base.term -> - (((Pulse_Syntax_Base.term, unit, unit) FStar_Pervasives.dtuple3, - framing_failure) FStar_Pervasives.either, - unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun ctxt -> - fun ctxt_typing -> - fun req -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Framing.fst" - (Prims.of_int (260)) (Prims.of_int (18)) - (Prims.of_int (260)) (Prims.of_int (39))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Framing.fst" - (Prims.of_int (260)) (Prims.of_int (42)) - (Prims.of_int (272)) (Prims.of_int (50))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> Pulse_Checker_VPropEquiv.vprop_as_list ctxt)) - (fun uu___ -> - (fun ctxt_l -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (261)) (Prims.of_int (17)) - (Prims.of_int (261)) (Prims.of_int (37))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (262)) (Prims.of_int (5)) - (Prims.of_int (272)) (Prims.of_int (50))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - Pulse_Checker_VPropEquiv.vprop_as_list req)) - (fun uu___ -> - (fun req_l -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (262)) - (Prims.of_int (11)) - (Prims.of_int (262)) - (Prims.of_int (41))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (262)) - (Prims.of_int (5)) - (Prims.of_int (272)) - (Prims.of_int (50))))) - (Obj.magic (try_split_vprop g req_l ctxt_l)) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - match uu___ with - | FStar_Pervasives.Inr failure -> - FStar_Pervasives.Inr failure - | FStar_Pervasives.Inl - (Prims.Mkdtuple2 (frame, veq)) - -> - FStar_Pervasives.Inl - (FStar_Pervasives.Mkdtuple3 - ((Pulse_Checker_VPropEquiv.list_as_vprop - frame), (), ())))))) - uu___))) uu___) -let rec (all_matches : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.vprop Prims.list -> - Pulse_Syntax_Base.vprop Prims.list -> - ((unit, unit, unit) match_result, unit) FStar_Tactics_Effect.tac_repr) - = - fun uu___2 -> - fun uu___1 -> - fun uu___ -> - (fun g -> - fun p -> - fun q -> - match p with - | [] -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - { - matched = []; - unmatched_p = p; - unmatched_q = q; - p_eq = (); - q_eq = () - }))) - | hd::tl -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (283)) (Prims.of_int (12)) - (Prims.of_int (283)) (Prims.of_int (40))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (283)) (Prims.of_int (6)) - (Prims.of_int (311)) (Prims.of_int (25))))) - (Obj.magic (maybe_split_one_vprop g hd q)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | FStar_Pervasives_Native.None -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (285)) - (Prims.of_int (18)) - (Prims.of_int (285)) - (Prims.of_int (36))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (288)) - (Prims.of_int (10)) - (Prims.of_int (288)) - (Prims.of_int (58))))) - (Obj.magic (all_matches g tl q)) - (fun res -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - { - matched = (res.matched); - unmatched_p = (hd :: - (res.unmatched_p)); - unmatched_q = - (res.unmatched_q); - p_eq = (); - q_eq = () - }))) - | FStar_Pervasives_Native.Some res -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (291)) - (Prims.of_int (35)) - (Prims.of_int (291)) - (Prims.of_int (38))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (290)) - (Prims.of_int (19)) - (Prims.of_int (311)) - (Prims.of_int (25))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> res)) - (fun uu___1 -> - (fun uu___1 -> - match uu___1 with - | FStar_Pervasives.Mkdtuple4 - (l, found, v, r) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (293)) - (Prims.of_int (41)) - (Prims.of_int (293)) - (Prims.of_int (42))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (293)) - (Prims.of_int (45)) - (Prims.of_int (311)) - (Prims.of_int (25))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> ())) - (fun uu___2 -> - (fun v1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - ( - FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (294)) - (Prims.of_int (18)) - (Prims.of_int (294)) - (Prims.of_int (42))))) - ( - FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (309)) - (Prims.of_int (10)) - (Prims.of_int (311)) - (Prims.of_int (23))))) - ( - Obj.magic - (all_matches - g tl - (FStar_List_Tot_Base.op_At - l r))) - ( - fun res1 - -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___2 -> - { - matched = - (hd :: - (res1.matched)); - unmatched_p - = - (res1.unmatched_p); - unmatched_q - = - (res1.unmatched_q); - p_eq = (); - q_eq = () - })))) - uu___2))) - uu___1))) uu___)))) uu___2 - uu___1 uu___ -let rec (check_equiv_emp : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> unit FStar_Pervasives_Native.option) - = - fun g -> - fun vp -> - match vp.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_Emp -> FStar_Pervasives_Native.Some () - | Pulse_Syntax_Base.Tm_Star (vp1, vp2) -> - (match ((check_equiv_emp g vp1), (check_equiv_emp g vp2)) with - | (FStar_Pervasives_Native.Some d1, FStar_Pervasives_Native.Some - d2) -> FStar_Pervasives_Native.Some () - | (uu___, uu___1) -> FStar_Pervasives_Native.None) - | uu___ -> FStar_Pervasives_Native.None -let (check_vprop_equiv : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - unit -> (unit, unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun vp1 -> - fun vp2 -> - fun vp1_typing -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Framing.fst" - (Prims.of_int (337)) (Prims.of_int (8)) - (Prims.of_int (337)) (Prims.of_int (40))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Framing.fst" - (Prims.of_int (337)) (Prims.of_int (2)) - (Prims.of_int (363)) (Prims.of_int (54))))) - (Obj.magic (split_vprop g vp1 () vp2)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | FStar_Pervasives.Inr failure -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (339)) - (Prims.of_int (16)) - (Prims.of_int (343)) - (Prims.of_int (94))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (339)) - (Prims.of_int (4)) - (Prims.of_int (343)) - (Prims.of_int (94))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (343)) - (Prims.of_int (16)) - (Prims.of_int (343)) - (Prims.of_int (93))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (339)) - (Prims.of_int (16)) - (Prims.of_int (343)) - (Prims.of_int (94))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (343)) - (Prims.of_int (36)) - (Prims.of_int (343)) - (Prims.of_int (92))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (343)) - (Prims.of_int (16)) - (Prims.of_int (343)) - (Prims.of_int (93))))) - (Obj.magic - (FStar_Tactics_Util.map - Pulse_Syntax_Printer.term_to_string - failure.unmatched_preconditions)) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - FStar_String.concat "\n" - uu___1)))) - (fun uu___1 -> - (fun uu___1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (339)) - (Prims.of_int (16)) - (Prims.of_int (343)) - (Prims.of_int (94))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (339)) - (Prims.of_int (16)) - (Prims.of_int (343)) - (Prims.of_int (94))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (342)) - (Prims.of_int (16)) - (Prims.of_int (342)) - (Prims.of_int (38))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (339)) - (Prims.of_int (16)) - (Prims.of_int (343)) - (Prims.of_int (94))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - vp2)) - (fun uu___2 -> - (fun uu___2 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (339)) - (Prims.of_int (16)) - (Prims.of_int (343)) - (Prims.of_int (94))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (339)) - (Prims.of_int (16)) - (Prims.of_int (343)) - (Prims.of_int (94))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (341)) - (Prims.of_int (16)) - (Prims.of_int (341)) - (Prims.of_int (38))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "FStar.Printf.fst" - (Prims.of_int (121)) - (Prims.of_int (8)) - (Prims.of_int (123)) - (Prims.of_int (44))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - vp1)) - (fun - uu___3 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - fun x -> - fun x1 -> - Prims.strcat - (Prims.strcat - (Prims.strcat - "check_vprop_equiv: " - (Prims.strcat - uu___3 - " and ")) - (Prims.strcat - x - " are not equivalent; missing preconditions:\n")) - (Prims.strcat - x1 "\n"))))) - (fun uu___3 - -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - uu___3 - uu___2)))) - uu___2))) - (fun uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - uu___2 uu___1)))) - uu___1))) - (fun uu___1 -> - (fun uu___1 -> - Obj.magic - (Pulse_Typing_Env.fail g - FStar_Pervasives_Native.None uu___1)) - uu___1))) - | FStar_Pervasives.Inl (FStar_Pervasives.Mkdtuple3 - (frame, uu___1, d)) -> - Obj.magic - (Obj.repr - (match check_equiv_emp g frame with - | FStar_Pervasives_Native.Some d_frame_equiv_emp - -> - Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> ())) - | FStar_Pervasives_Native.None -> - Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (360)) - (Prims.of_int (18)) - (Prims.of_int (363)) - (Prims.of_int (54))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (360)) - (Prims.of_int (6)) - (Prims.of_int (363)) - (Prims.of_int (54))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (363)) - (Prims.of_int (29)) - (Prims.of_int (363)) - (Prims.of_int (53))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (360)) - (Prims.of_int (18)) - (Prims.of_int (363)) - (Prims.of_int (54))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - frame)) - (fun uu___2 -> - (fun uu___2 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (360)) - (Prims.of_int (18)) - (Prims.of_int (363)) - (Prims.of_int (54))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (360)) - (Prims.of_int (18)) - (Prims.of_int (363)) - (Prims.of_int (54))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (362)) - (Prims.of_int (29)) - (Prims.of_int (362)) - (Prims.of_int (51))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (360)) - (Prims.of_int (18)) - (Prims.of_int (363)) - (Prims.of_int (54))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - vp2)) - (fun uu___3 -> - (fun uu___3 -> - Obj.magic - ( - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (360)) - (Prims.of_int (18)) - (Prims.of_int (363)) - (Prims.of_int (54))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (360)) - (Prims.of_int (18)) - (Prims.of_int (363)) - (Prims.of_int (54))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Framing.fst" - (Prims.of_int (361)) - (Prims.of_int (29)) - (Prims.of_int (361)) - (Prims.of_int (51))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "FStar.Printf.fst" - (Prims.of_int (121)) - (Prims.of_int (8)) - (Prims.of_int (123)) - (Prims.of_int (44))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - vp1)) - (fun - uu___4 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___5 -> - fun x -> - fun x1 -> - Prims.strcat - (Prims.strcat - (Prims.strcat - "check_vprop_equiv: " - (Prims.strcat - uu___4 - " and ")) - (Prims.strcat - x - " are not equivalent, frame: ")) - (Prims.strcat - x1 "\n"))))) - (fun - uu___4 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___5 -> - uu___4 - uu___3)))) - uu___3))) - (fun uu___3 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___4 -> - uu___3 uu___2)))) - uu___2))) - (fun uu___2 -> - (fun uu___2 -> - Obj.magic - (Pulse_Typing_Env.fail g - FStar_Pervasives_Native.None - uu___2)) uu___2))))) uu___) -type ('g, 'ctxt, 'req) frame_for_req_in_ctxt = - (Pulse_Syntax_Base.term, unit, unit) FStar_Pervasives.dtuple3 -let (frame_of : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - (unit, unit, unit) frame_for_req_in_ctxt -> Pulse_Syntax_Base.term) - = - fun g -> - fun ctxt -> - fun req -> - fun f -> - let uu___ = f in - match uu___ with - | FStar_Pervasives.Mkdtuple3 (frame, uu___1, uu___2) -> frame -let (check_frameable : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - unit -> - Pulse_Syntax_Base.term -> - (((unit, unit, unit) frame_for_req_in_ctxt, framing_failure) - FStar_Pervasives.either, - unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun ctxt -> fun ctxt_typing -> fun req -> split_vprop g ctxt () req -let (apply_frame : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.term -> - unit -> - Pulse_Syntax_Base.comp -> - (unit, unit, unit) Pulse_Typing.st_typing -> - (unit, unit, unit) frame_for_req_in_ctxt -> - (Pulse_Syntax_Base.comp_st, - (unit, unit, unit) Pulse_Typing.st_typing) Prims.dtuple2) - = - fun g -> - fun t -> - fun ctxt -> - fun ctxt_typing -> - fun c -> - fun t_typing -> - fun frame_t -> - let s = Pulse_Syntax_Base.st_comp_of_comp c in - let uu___ = frame_t in - match uu___ with - | FStar_Pervasives.Mkdtuple3 (frame, frame_typing, ve) -> - let t_typing1 = - Pulse_Typing.T_Frame (g, t, c, frame, (), t_typing) in - let c' = Pulse_Typing.add_frame c frame in - let c'_typing = - Pulse_Typing_Metatheory.st_typing_correctness g t - (Pulse_Typing.add_frame c frame) t_typing1 in - let s' = Pulse_Syntax_Base.st_comp_of_comp c' in - let s'' = - { - Pulse_Syntax_Base.u = (s'.Pulse_Syntax_Base.u); - Pulse_Syntax_Base.res = (s'.Pulse_Syntax_Base.res); - Pulse_Syntax_Base.pre = ctxt; - Pulse_Syntax_Base.post = (s'.Pulse_Syntax_Base.post) - } in - let c'' = Pulse_Syntax_Base.with_st_comp c' s'' in - let st_typing = - Pulse_Typing_Metatheory.comp_typing_inversion g - (Pulse_Typing.add_frame c frame) c'_typing in - let uu___1 = - Pulse_Typing_Metatheory.st_comp_typing_inversion g - (Pulse_Syntax_Base.st_comp_of_comp - (Pulse_Typing.add_frame c frame)) st_typing in - (match uu___1 with - | FStar_Pervasives.Mkdtuple4 - (res_typing, pre_typing, x, post_typing) -> - let st_equiv = - Pulse_Typing.ST_VPropEquiv - (g, c', c'', x, (), (), (), (), ()) in - let t_typing2 = - Pulse_Typing.T_Equiv - (g, t, (Pulse_Typing.add_frame c frame), c'', - t_typing1, st_equiv) in - Prims.Mkdtuple2 (c'', t_typing2)) -let (try_frame_pre : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.term -> - unit -> - Pulse_Syntax_Base.comp_st -> - (unit, unit, unit) Pulse_Typing.st_typing -> - (((Pulse_Syntax_Base.comp_st, - (unit, unit, unit) Pulse_Typing.st_typing) Prims.dtuple2, - framing_failure) FStar_Pervasives.either, - unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun t -> - fun pre -> - fun pre_typing -> - fun c -> - fun t_typing -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Framing.fst" - (Prims.of_int (422)) (Prims.of_int (10)) - (Prims.of_int (422)) (Prims.of_int (49))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Framing.fst" - (Prims.of_int (422)) (Prims.of_int (4)) - (Prims.of_int (426)) (Prims.of_int (24))))) - (Obj.magic - (check_frameable g pre () (Pulse_Syntax_Base.comp_pre c))) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - match uu___ with - | FStar_Pervasives.Inr failure -> - FStar_Pervasives.Inr failure - | FStar_Pervasives.Inl frame_t -> - (match apply_frame g t pre () c t_typing frame_t - with - | Prims.Mkdtuple2 (c', st_d) -> - FStar_Pervasives.Inl - (Prims.Mkdtuple2 (c', st_d))))) -let (frame_empty : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - unit -> - Pulse_Syntax_Base.universe -> - Pulse_Syntax_Base.term -> - unit -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.comp_st -> - (unit, unit, unit) Pulse_Typing.st_typing -> - ((Pulse_Syntax_Base.comp_st, - (unit, unit, unit) Pulse_Typing.st_typing) - Prims.dtuple2, - unit) FStar_Tactics_Effect.tac_repr) - = - fun uu___8 -> - fun uu___7 -> - fun uu___6 -> - fun uu___5 -> - fun uu___4 -> - fun uu___3 -> - fun uu___2 -> - fun uu___1 -> - fun uu___ -> - (fun g -> - fun pre -> - fun pre_typing -> - fun u -> - fun ty -> - fun ut -> - fun t -> - fun c0 -> - fun d -> - Obj.magic - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - match Pulse_Typing_Metatheory.st_comp_typing_inversion - g - (Pulse_Syntax_Base.st_comp_of_comp - (Pulse_Typing.add_frame - c0 pre)) - (Pulse_Typing_Metatheory.comp_typing_inversion - g - (Pulse_Typing.add_frame - c0 pre) - (Pulse_Typing_Metatheory.st_typing_correctness - g t - (Pulse_Typing.add_frame - c0 pre) - (Pulse_Typing.T_Frame - (g, t, c0, - pre, (), d)))) - with - | FStar_Pervasives.Mkdtuple4 - (res_typing, pre_typing1, - x, post_typing) - -> - Prims.Mkdtuple2 - ((Pulse_Syntax_Base.with_st_comp - (Pulse_Typing.add_frame - c0 pre) - { - Pulse_Syntax_Base.u - = - ((Pulse_Syntax_Base.st_comp_of_comp - (Pulse_Typing.add_frame - c0 pre)).Pulse_Syntax_Base.u); - Pulse_Syntax_Base.res - = - ((Pulse_Syntax_Base.st_comp_of_comp - (Pulse_Typing.add_frame - c0 pre)).Pulse_Syntax_Base.res); - Pulse_Syntax_Base.pre - = pre; - Pulse_Syntax_Base.post - = - ((Pulse_Syntax_Base.st_comp_of_comp - (Pulse_Typing.add_frame - c0 pre)).Pulse_Syntax_Base.post) - }), - (Pulse_Typing.T_Equiv - (g, t, - (Pulse_Typing.add_frame - c0 pre), - (Pulse_Syntax_Base.with_st_comp - (Pulse_Typing.add_frame - c0 pre) - { - Pulse_Syntax_Base.u - = - ((Pulse_Syntax_Base.st_comp_of_comp - (Pulse_Typing.add_frame - c0 pre)).Pulse_Syntax_Base.u); - Pulse_Syntax_Base.res - = - ((Pulse_Syntax_Base.st_comp_of_comp - (Pulse_Typing.add_frame - c0 pre)).Pulse_Syntax_Base.res); - Pulse_Syntax_Base.pre - = pre; - Pulse_Syntax_Base.post - = - ((Pulse_Syntax_Base.st_comp_of_comp - (Pulse_Typing.add_frame - c0 pre)).Pulse_Syntax_Base.post) - }), - (Pulse_Typing.T_Frame - (g, t, c0, - pre, (), d)), - (Pulse_Typing.ST_VPropEquiv - (g, - (Pulse_Typing.add_frame - c0 pre), - (Pulse_Syntax_Base.with_st_comp - ( - Pulse_Typing.add_frame - c0 pre) - { - Pulse_Syntax_Base.u - = - ((Pulse_Syntax_Base.st_comp_of_comp - (Pulse_Typing.add_frame - c0 pre)).Pulse_Syntax_Base.u); - Pulse_Syntax_Base.res - = - ((Pulse_Syntax_Base.st_comp_of_comp - (Pulse_Typing.add_frame - c0 pre)).Pulse_Syntax_Base.res); - Pulse_Syntax_Base.pre - = pre; - Pulse_Syntax_Base.post - = - ((Pulse_Syntax_Base.st_comp_of_comp - (Pulse_Typing.add_frame - c0 pre)).Pulse_Syntax_Base.post) - }), x, - (), (), (), - (), ())))))))) - uu___8 uu___7 uu___6 uu___5 uu___4 uu___3 uu___2 uu___1 - uu___ \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Checker_If.ml b/src/ocaml/plugin/generated/Pulse_Checker_If.ml index eaa274845..2deb14622 100644 --- a/src/ocaml/plugin/generated/Pulse_Checker_If.ml +++ b/src/ocaml/plugin/generated/Pulse_Checker_If.ml @@ -32,7 +32,7 @@ let rec (combine_if_branches : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" (Prims.of_int (31)) (Prims.of_int (2)) - (Prims.of_int (72)) (Prims.of_int (78))))) + (Prims.of_int (83)) (Prims.of_int (78))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> g_then)) (fun uu___ -> (fun g -> @@ -69,9 +69,117 @@ let rec (combine_if_branches : e_else_typing))) else Obj.repr - (Pulse_Typing_Env.fail g - FStar_Pervasives_Native.None - "Cannot combine then and else branches (different inames)")) + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (40)) + (Prims.of_int (13)) + (Prims.of_int (42)) + (Prims.of_int (43))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (39)) + (Prims.of_int (11)) + (Prims.of_int (42)) + (Prims.of_int (43))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (42)) + (Prims.of_int (16)) + (Prims.of_int (42)) + (Prims.of_int (42))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (40)) + (Prims.of_int (13)) + (Prims.of_int (42)) + (Prims.of_int (43))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + inames2)) + (fun uu___3 -> + (fun uu___3 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + ( + Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (40)) + (Prims.of_int (13)) + (Prims.of_int (42)) + (Prims.of_int (43))))) + (FStar_Sealed.seal + ( + Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (40)) + (Prims.of_int (13)) + (Prims.of_int (42)) + (Prims.of_int (43))))) + (Obj.magic + ( + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (41)) + (Prims.of_int (16)) + (Prims.of_int (41)) + (Prims.of_int (42))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + inames1)) + (fun + uu___4 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___5 -> + fun x -> + Prims.strcat + (Prims.strcat + "Cannot combine then and else branches (different inames " + (Prims.strcat + uu___4 + " and ")) + (Prims.strcat + x ")"))))) + (fun uu___4 + -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___5 -> + uu___4 + uu___3)))) + uu___3))) + (fun uu___3 -> + (fun uu___3 -> + Obj.magic + (Pulse_Typing_Env.fail + g + FStar_Pervasives_Native.None + uu___3)) uu___3))) | (Pulse_Syntax_Base.C_STGhost (inames1, uu___), Pulse_Syntax_Base.C_STGhost @@ -89,9 +197,117 @@ let rec (combine_if_branches : e_else_typing))) else Obj.repr - (Pulse_Typing_Env.fail g - FStar_Pervasives_Native.None - "Cannot combine then and else branches (different inames)")) + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (40)) + (Prims.of_int (13)) + (Prims.of_int (42)) + (Prims.of_int (43))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (39)) + (Prims.of_int (11)) + (Prims.of_int (42)) + (Prims.of_int (43))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (42)) + (Prims.of_int (16)) + (Prims.of_int (42)) + (Prims.of_int (42))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (40)) + (Prims.of_int (13)) + (Prims.of_int (42)) + (Prims.of_int (43))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + inames2)) + (fun uu___3 -> + (fun uu___3 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + ( + Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (40)) + (Prims.of_int (13)) + (Prims.of_int (42)) + (Prims.of_int (43))))) + (FStar_Sealed.seal + ( + Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (40)) + (Prims.of_int (13)) + (Prims.of_int (42)) + (Prims.of_int (43))))) + (Obj.magic + ( + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (41)) + (Prims.of_int (16)) + (Prims.of_int (41)) + (Prims.of_int (42))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + inames1)) + (fun + uu___4 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___5 -> + fun x -> + Prims.strcat + (Prims.strcat + "Cannot combine then and else branches (different inames " + (Prims.strcat + uu___4 + " and ")) + (Prims.strcat + x ")"))))) + (fun uu___4 + -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___5 -> + uu___4 + uu___3)))) + uu___3))) + (fun uu___3 -> + (fun uu___3 -> + Obj.magic + (Pulse_Typing_Env.fail + g + FStar_Pervasives_Native.None + uu___3)) uu___3))) | (Pulse_Syntax_Base.C_ST uu___, Pulse_Syntax_Base.C_STAtomic (inames, uu___1)) -> @@ -114,9 +330,59 @@ let rec (combine_if_branches : c_else))))))) else Obj.repr - (Pulse_Typing_Env.fail g - FStar_Pervasives_Native.None - "Cannot lift STAtomic else branch to match then")) + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (52)) + (Prims.of_int (13)) + (Prims.of_int (53)) + (Prims.of_int (42))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (51)) + (Prims.of_int (11)) + (Prims.of_int (53)) + (Prims.of_int (42))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (53)) + (Prims.of_int (16)) + (Prims.of_int (53)) + (Prims.of_int (41))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + inames)) + (fun uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___4 -> + Prims.strcat + "Cannot lift STAtomic else branch to match ST then branch, inames " + (Prims.strcat + uu___3 + " not empty"))))) + (fun uu___3 -> + (fun uu___3 -> + Obj.magic + (Pulse_Typing_Env.fail + g + FStar_Pervasives_Native.None + uu___3)) uu___3))) | (Pulse_Syntax_Base.C_STAtomic (inames, uu___), Pulse_Syntax_Base.C_ST uu___1) -> @@ -140,9 +406,59 @@ let rec (combine_if_branches : e_else_typing))) else Obj.repr - (Pulse_Typing_Env.fail g - FStar_Pervasives_Native.None - "Cannot lift STAtomic else branch to match then")) + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (63)) + (Prims.of_int (13)) + (Prims.of_int (64)) + (Prims.of_int (42))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (62)) + (Prims.of_int (11)) + (Prims.of_int (64)) + (Prims.of_int (42))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (64)) + (Prims.of_int (16)) + (Prims.of_int (64)) + (Prims.of_int (41))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + inames)) + (fun uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___4 -> + Prims.strcat + "Cannot lift STAtomic then branch to match ST else branch, inames " + (Prims.strcat + uu___3 + " not empty"))))) + (fun uu___3 -> + (fun uu___3 -> + Obj.magic + (Pulse_Typing_Env.fail + g + FStar_Pervasives_Native.None + uu___3)) uu___3))) | (Pulse_Syntax_Base.C_STGhost (uu___, uu___1), uu___2) -> Obj.repr @@ -151,17 +467,17 @@ let rec (combine_if_branches : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (59)) + (Prims.of_int (66)) (Prims.of_int (14)) - (Prims.of_int (59)) + (Prims.of_int (66)) (Prims.of_int (82))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (59)) + (Prims.of_int (66)) (Prims.of_int (85)) - (Prims.of_int (64)) + (Prims.of_int (71)) (Prims.of_int (35))))) (Obj.magic (Pulse_Checker_Pure.get_non_informative_witness @@ -178,17 +494,17 @@ let rec (combine_if_branches : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (61)) + (Prims.of_int (68)) (Prims.of_int (8)) - (Prims.of_int (61)) + (Prims.of_int (68)) (Prims.of_int (66))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (61)) + (Prims.of_int (68)) (Prims.of_int (69)) - (Prims.of_int (64)) + (Prims.of_int (71)) (Prims.of_int (35))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___3 -> @@ -216,18 +532,18 @@ let rec (combine_if_branches : Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (63)) + (Prims.of_int (70)) (Prims.of_int (8)) - (Prims.of_int (63)) + (Prims.of_int (70)) (Prims.of_int (67))))) (FStar_Sealed.seal ( Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (61)) + (Prims.of_int (68)) (Prims.of_int (69)) - (Prims.of_int (64)) + (Prims.of_int (71)) (Prims.of_int (35))))) (Obj.magic ( @@ -270,17 +586,17 @@ let rec (combine_if_branches : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (66)) + (Prims.of_int (73)) (Prims.of_int (14)) - (Prims.of_int (66)) + (Prims.of_int (73)) (Prims.of_int (82))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (66)) + (Prims.of_int (73)) (Prims.of_int (85)) - (Prims.of_int (69)) + (Prims.of_int (76)) (Prims.of_int (65))))) (Obj.magic (Pulse_Checker_Pure.get_non_informative_witness @@ -297,17 +613,17 @@ let rec (combine_if_branches : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (68)) + (Prims.of_int (75)) (Prims.of_int (8)) - (Prims.of_int (68)) + (Prims.of_int (75)) (Prims.of_int (66))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (69)) + (Prims.of_int (76)) (Prims.of_int (6)) - (Prims.of_int (69)) + (Prims.of_int (76)) (Prims.of_int (65))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___3 -> @@ -347,7 +663,17 @@ let rec (combine_if_branches : Obj.repr (Pulse_Typing_Env.fail g FStar_Pervasives_Native.None - "Cannot combine then and else branches (incompatible effects)"))) + (Prims.strcat + (Prims.strcat + "Cannot combine then and else branches (incompatible effects " + (Prims.strcat + (Pulse_Syntax_Printer.ctag_to_string + (Pulse_Syntax_Base.ctag_of_comp_st + c_then)) " and ")) + (Prims.strcat + (Pulse_Syntax_Printer.ctag_to_string + (Pulse_Syntax_Base.ctag_of_comp_st + c_else)) " resp.)"))))) else Obj.magic (Obj.repr @@ -355,164 +681,197 @@ let rec (combine_if_branches : FStar_Pervasives_Native.None "Cannot combine then and else branches (different st_comp)"))) uu___) -let (check_if : +let (check : Pulse_Typing_Env.env -> Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.term -> - unit -> - unit Pulse_Typing.post_hint_for_env -> - Pulse_Checker_Common.check_t -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, - unit) FStar_Tactics_Effect.tac_repr) + unit -> + unit Pulse_Typing.post_hint_for_env -> + Pulse_Syntax_Base.ppname -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.st_term -> + Pulse_Syntax_Base.st_term -> + Pulse_Checker_Base.check_t -> + ((unit, unit, unit) Pulse_Checker_Base.checker_result_t, + unit) FStar_Tactics_Effect.tac_repr) = fun g -> - fun b -> - fun e1 -> - fun e2 -> - fun pre -> - fun pre_typing -> - fun post_hint -> - fun check -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (85)) (Prims.of_int (6)) - (Prims.of_int (85)) (Prims.of_int (47))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (84)) (Prims.of_int (3)) - (Prims.of_int (131)) (Prims.of_int (78))))) - (Obj.magic - (Pulse_Checker_Pure.check_term_with_expected_type g b - Pulse_Typing.tm_bool)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | Prims.Mkdtuple2 (b1, b_typing) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.If.fst" - (Prims.of_int (86)) - (Prims.of_int (15)) - (Prims.of_int (86)) - (Prims.of_int (29))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.If.fst" - (Prims.of_int (86)) - (Prims.of_int (32)) - (Prims.of_int (131)) - (Prims.of_int (78))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - post_hint.Pulse_Typing.post)) - (fun uu___1 -> - (fun post -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.If.fst" - (Prims.of_int (87)) - (Prims.of_int (14)) - (Prims.of_int (87)) - (Prims.of_int (21))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.If.fst" - (Prims.of_int (87)) - (Prims.of_int (24)) - (Prims.of_int (131)) - (Prims.of_int (78))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - Pulse_Typing_Env.fresh g)) - (fun uu___1 -> - (fun hyp -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.If.fst" - (Prims.of_int (89)) - (Prims.of_int (8)) - (Prims.of_int (89)) - (Prims.of_int (68))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.If.fst" - (Prims.of_int (90)) - (Prims.of_int (6)) - (Prims.of_int (131)) - (Prims.of_int (78))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - fun eq_v -> - Pulse_Typing_Env.push_binding - g hyp - Pulse_Syntax_Base.ppname_default - (Pulse_Typing.mk_eq2 + fun pre -> + fun pre_typing -> + fun post_hint -> + fun res_ppname -> + fun b -> + fun e1 -> + fun e2 -> + fun check1 -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.If.fst" + (Prims.of_int (98)) (Prims.of_int (10)) + (Prims.of_int (98)) (Prims.of_int (61))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.If.fst" + (Prims.of_int (98)) (Prims.of_int (64)) + (Prims.of_int (160)) (Prims.of_int (43))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing_Env.push_context g "check_if" + e1.Pulse_Syntax_Base.range2)) + (fun uu___ -> + (fun g1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (101)) + (Prims.of_int (4)) + (Prims.of_int (101)) + (Prims.of_int (45))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (98)) + (Prims.of_int (64)) + (Prims.of_int (160)) + (Prims.of_int (43))))) + (Obj.magic + (Pulse_Checker_Pure.check_term_with_expected_type + g1 b Pulse_Typing.tm_bool)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | Prims.Mkdtuple2 (b1, b_typing) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (103)) + (Prims.of_int (13)) + (Prims.of_int (103)) + (Prims.of_int (27))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (103)) + (Prims.of_int (30)) + (Prims.of_int (160)) + (Prims.of_int (43))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + post_hint.Pulse_Typing.post)) + (fun uu___1 -> + (fun post -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (104)) + (Prims.of_int (12)) + (Prims.of_int (104)) + (Prims.of_int (19))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (104)) + (Prims.of_int (22)) + (Prims.of_int (160)) + (Prims.of_int (43))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + Pulse_Typing_Env.fresh + g1)) + (fun uu___1 -> + (fun hyp -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (106)) + (Prims.of_int (4)) + (Prims.of_int (106)) + (Prims.of_int (80))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (107)) + (Prims.of_int (4)) + (Prims.of_int (160)) + (Prims.of_int (43))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___1 -> + fun eq_v + -> + Pulse_Typing_Env.push_binding + g1 hyp + (Pulse_Syntax_Base.mk_ppname_no_range + "_if_hyp") + (Pulse_Typing.mk_eq2 Pulse_Syntax_Pure.u0 Pulse_Typing.tm_bool b1 eq_v))) - (fun uu___1 -> - (fun g_with_eq -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - ( - FStar_Sealed.seal + (fun + uu___1 -> + (fun + g_with_eq + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (95)) - (Prims.of_int (7)) - (Prims.of_int (108)) - (Prims.of_int (35))))) - ( - FStar_Sealed.seal + (Prims.of_int (112)) + (Prims.of_int (47)) + (Prims.of_int (132)) + (Prims.of_int (23))))) + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (109)) - (Prims.of_int (6)) - (Prims.of_int (131)) - (Prims.of_int (78))))) - ( - FStar_Tactics_Effect.lift_div_tac + (Prims.of_int (133)) + (Prims.of_int (4)) + (Prims.of_int (160)) + (Prims.of_int (43))))) + (FStar_Tactics_Effect.lift_div_tac (fun uu___1 -> fun eq_v -> fun br -> + fun + is_then + -> FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (95)) - (Prims.of_int (24)) - (Prims.of_int (95)) - (Prims.of_int (38))))) + (Prims.of_int (113)) + (Prims.of_int (20)) + (Prims.of_int (113)) + (Prims.of_int (34))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (95)) - (Prims.of_int (41)) - (Prims.of_int (108)) - (Prims.of_int (35))))) + (Prims.of_int (113)) + (Prims.of_int (37)) + (Prims.of_int (132)) + (Prims.of_int (23))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___2 -> @@ -529,18 +888,18 @@ let (check_if : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (97)) - (Prims.of_int (12)) - (Prims.of_int (99)) - (Prims.of_int (54))))) + (Prims.of_int (115)) + (Prims.of_int (6)) + (Prims.of_int (118)) + (Prims.of_int (34))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (100)) - (Prims.of_int (10)) - (Prims.of_int (108)) - (Prims.of_int (35))))) + (Prims.of_int (119)) + (Prims.of_int (6)) + (Prims.of_int (132)) + (Prims.of_int (23))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___2 -> @@ -556,24 +915,81 @@ let (check_if : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (102)) - (Prims.of_int (12)) - (Prims.of_int (102)) - (Prims.of_int (62))))) + (Prims.of_int (121)) + (Prims.of_int (24)) + (Prims.of_int (125)) + (Prims.of_int (37))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (100)) - (Prims.of_int (10)) - (Prims.of_int (108)) - (Prims.of_int (35))))) + (Prims.of_int (119)) + (Prims.of_int (6)) + (Prims.of_int (132)) + (Prims.of_int (23))))) (Obj.magic - (check + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (122)) + (Prims.of_int (19)) + (Prims.of_int (122)) + (Prims.of_int (46))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (122)) + (Prims.of_int (49)) + (Prims.of_int (125)) + (Prims.of_int (37))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___2 -> + Pulse_Syntax_Base.mk_ppname_no_range + "_if_br")) + (fun + uu___2 -> + (fun + ppname -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (124)) + (Prims.of_int (8)) + (Prims.of_int (124)) + (Prims.of_int (65))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (125)) + (Prims.of_int (6)) + (Prims.of_int (125)) + (Prims.of_int (37))))) + (Obj.magic + (check1 g_with_eq1 - br pre () + pre () (FStar_Pervasives_Native.Some - post_hint))) + post_hint) + ppname br)) + (fun + uu___2 -> + (fun r -> + Obj.magic + (Pulse_Checker_Base.apply_checker_result_k + g_with_eq1 + pre + post_hint + r ppname)) + uu___2))) + uu___2))) (fun uu___2 -> (fun @@ -583,7 +999,38 @@ let (check_if : | FStar_Pervasives.Mkdtuple3 (br1, c, - br_typing) + d) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (127)) + (Prims.of_int (18)) + (Prims.of_int (127)) + (Prims.of_int (52))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (129)) + (Prims.of_int (4)) + (Prims.of_int (132)) + (Prims.of_int (23))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + if + is_then + then + "then" + else + "else")) + (fun + uu___3 -> + (fun + br_name -> if FStar_Set.mem @@ -594,37 +1041,28 @@ let (check_if : Obj.magic (Obj.repr (Pulse_Typing_Env.fail - g + g1 (FStar_Pervasives_Native.Some (br1.Pulse_Syntax_Base.range2)) - "Illegal use of control-flow hypothesis in branch")) + (Prims.strcat + "check_if: branch hypothesis is in freevars of checked " + (Prims.strcat + br_name + " branch")))) else Obj.magic (Obj.repr - (if - Prims.op_Negation - (Pulse_Syntax_Base.stateful_comp - c) - then - Obj.repr - (Pulse_Typing_Env.fail - g - (FStar_Pervasives_Native.Some - (br1.Pulse_Syntax_Base.range2)) - "Branch computation type not st") - else - Obj.repr (FStar_Tactics_Effect.lift_div_tac (fun - uu___5 -> + uu___4 -> FStar_Pervasives.Mkdtuple3 (br1, c, - br_typing)))))) + d))))) + uu___3))) uu___2))) uu___2))) uu___2))) - ( - fun + (fun uu___1 -> (fun check_branch @@ -635,22 +1073,22 @@ let (check_if : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (110)) - (Prims.of_int (34)) - (Prims.of_int (110)) - (Prims.of_int (57))))) + (Prims.of_int (135)) + (Prims.of_int (32)) + (Prims.of_int (135)) + (Prims.of_int (60))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (109)) - (Prims.of_int (6)) - (Prims.of_int (131)) - (Prims.of_int (78))))) + (Prims.of_int (133)) + (Prims.of_int (4)) + (Prims.of_int (160)) + (Prims.of_int (43))))) (Obj.magic (check_branch Pulse_Typing.tm_true - e1)) + e1 true)) (fun uu___1 -> (fun @@ -668,22 +1106,22 @@ let (check_if : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (111)) - (Prims.of_int (34)) - (Prims.of_int (111)) - (Prims.of_int (58))))) + (Prims.of_int (136)) + (Prims.of_int (32)) + (Prims.of_int (136)) + (Prims.of_int (62))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (110)) - (Prims.of_int (60)) - (Prims.of_int (131)) - (Prims.of_int (78))))) + (Prims.of_int (135)) + (Prims.of_int (63)) + (Prims.of_int (160)) + (Prims.of_int (43))))) (Obj.magic (check_branch Pulse_Typing.tm_false - e2)) + e2 false)) (fun uu___2 -> (fun @@ -701,18 +1139,18 @@ let (check_if : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (113)) - (Prims.of_int (6)) - (Prims.of_int (113)) - (Prims.of_int (57))))) + (Prims.of_int (138)) + (Prims.of_int (4)) + (Prims.of_int (138)) + (Prims.of_int (55))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (111)) - (Prims.of_int (61)) - (Prims.of_int (131)) - (Prims.of_int (78))))) + (Prims.of_int (136)) + (Prims.of_int (65)) + (Prims.of_int (160)) + (Prims.of_int (43))))) (Obj.magic (combine_if_branches (g_with_eq @@ -741,41 +1179,41 @@ let (check_if : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (114)) - (Prims.of_int (18)) - (Prims.of_int (127)) - (Prims.of_int (7))))) + (Prims.of_int (140)) + (Prims.of_int (16)) + (Prims.of_int (154)) + (Prims.of_int (88))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (129)) + (Prims.of_int (155)) (Prims.of_int (4)) - (Prims.of_int (131)) - (Prims.of_int (78))))) + (Prims.of_int (160)) + (Prims.of_int (43))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (115)) - (Prims.of_int (14)) - (Prims.of_int (115)) - (Prims.of_int (21))))) + (Prims.of_int (141)) + (Prims.of_int (12)) + (Prims.of_int (141)) + (Prims.of_int (19))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (116)) - (Prims.of_int (6)) - (Prims.of_int (127)) - (Prims.of_int (7))))) + (Prims.of_int (142)) + (Prims.of_int (4)) + (Prims.of_int (154)) + (Prims.of_int (88))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___4 -> Pulse_Typing_Env.fresh - g)) + g1)) (fun uu___4 -> (fun x -> @@ -787,9 +1225,9 @@ let (check_if : then Obj.magic (Pulse_Typing_Env.fail - g + g1 FStar_Pervasives_Native.None - "Unexpected name clash") + "Impossible: check_if: unexpected freevar in post, please file a bug-report") else if Prims.op_Negation @@ -809,10 +1247,267 @@ let (check_if : post_hint.Pulse_Typing.post)) then Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (148)) + (Prims.of_int (11)) + (Prims.of_int (151)) + (Prims.of_int (115))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (147)) + (Prims.of_int (9)) + (Prims.of_int (151)) + (Prims.of_int (115))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (151)) + (Prims.of_int (81)) + (Prims.of_int (151)) + (Prims.of_int (114))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (148)) + (Prims.of_int (11)) + (Prims.of_int (151)) + (Prims.of_int (115))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + post_hint.Pulse_Typing.post)) + (fun + uu___5 -> + (fun + uu___5 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (148)) + (Prims.of_int (11)) + (Prims.of_int (151)) + (Prims.of_int (115))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (148)) + (Prims.of_int (11)) + (Prims.of_int (151)) + (Prims.of_int (115))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (151)) + (Prims.of_int (45)) + (Prims.of_int (151)) + (Prims.of_int (80))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (148)) + (Prims.of_int (11)) + (Prims.of_int (151)) + (Prims.of_int (115))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + post_hint.Pulse_Typing.ret_ty)) + (fun + uu___6 -> + (fun + uu___6 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (148)) + (Prims.of_int (11)) + (Prims.of_int (151)) + (Prims.of_int (115))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (148)) + (Prims.of_int (11)) + (Prims.of_int (151)) + (Prims.of_int (115))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (148)) + (Prims.of_int (11)) + (Prims.of_int (151)) + (Prims.of_int (115))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (148)) + (Prims.of_int (11)) + (Prims.of_int (151)) + (Prims.of_int (115))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (150)) + (Prims.of_int (76)) + (Prims.of_int (150)) + (Prims.of_int (108))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (148)) + (Prims.of_int (11)) + (Prims.of_int (151)) + (Prims.of_int (115))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + (Pulse_Syntax_Base.comp_post + c))) + (fun + uu___7 -> + (fun + uu___7 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (148)) + (Prims.of_int (11)) + (Prims.of_int (151)) + (Prims.of_int (115))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (148)) + (Prims.of_int (11)) + (Prims.of_int (151)) + (Prims.of_int (115))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (150)) + (Prims.of_int (44)) + (Prims.of_int (150)) + (Prims.of_int (75))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + (Pulse_Syntax_Base.comp_res + c))) + (fun + uu___8 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___9 -> + fun x1 -> + fun x2 -> + fun x3 -> + fun x4 -> + Prims.strcat + (Prims.strcat + (Prims.strcat + (Prims.strcat + (Prims.strcat + (Prims.strcat + "check_if: computation type after combining branches does not match post hint,computed: (" + (Prims.strcat + (Pulse_Syntax_Printer.univ_to_string + (Pulse_Syntax_Base.comp_u + c)) ", ")) + (Prims.strcat + uu___8 + ", ")) + (Prims.strcat + x1 + "), expected (")) + (Prims.strcat + x2 ", ")) + (Prims.strcat + x3 ", ")) + (Prims.strcat + x4 ")"))))) + (fun + uu___8 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___9 -> + uu___8 + uu___7)))) + uu___7))) + (fun + uu___7 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___8 -> + uu___7 + (Pulse_Syntax_Printer.univ_to_string + post_hint.Pulse_Typing.u))))) + (fun + uu___7 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___8 -> + uu___7 + uu___6)))) + uu___6))) + (fun + uu___6 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___7 -> + uu___6 + uu___5)))) + uu___5))) + (fun + uu___5 -> + (fun + uu___5 -> + Obj.magic (Pulse_Typing_Env.fail - g + g1 FStar_Pervasives_Native.None - "Unexpected result type in branches") + uu___5)) + uu___5)) else Obj.magic (FStar_Tactics_Effect.tac_bind @@ -820,23 +1515,23 @@ let (check_if : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (125)) + (Prims.of_int (153)) (Prims.of_int (26)) - (Prims.of_int (125)) + (Prims.of_int (153)) (Prims.of_int (56))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.If.fst" - (Prims.of_int (126)) + (Prims.of_int (154)) (Prims.of_int (8)) - (Prims.of_int (126)) + (Prims.of_int (154)) (Prims.of_int (88))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___6 -> Pulse_Typing.post_hint_typing - g + g1 post_hint x)) (fun @@ -845,15 +1540,35 @@ let (check_if : post_typing -> Obj.magic - (Pulse_Checker_Common.intro_comp_typing - g c () () - x ())) + (Pulse_Checker_Base.intro_comp_typing + g1 c () + () x ())) uu___6))) uu___4))) (fun + uu___4 -> + (fun c_typing -> - FStar_Tactics_Effect.lift_div_tac + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (158)) + (Prims.of_int (4)) + (Prims.of_int (158)) + (Prims.of_int (84))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.If.fst" + (Prims.of_int (160)) + (Prims.of_int (2)) + (Prims.of_int (160)) + (Prims.of_int (43))))) + (FStar_Tactics_Effect.lift_div_tac (fun uu___4 -> FStar_Pervasives.Mkdtuple3 @@ -871,7 +1586,7 @@ let (check_if : FStar_Pervasives_Native.None })), c, (Pulse_Typing.T_If - (g, b1, + (g1, b1, e11, e21, c, (Pulse_Syntax_Base.comp_u @@ -879,10 +1594,23 @@ let (check_if : (), e1_typing1, e2_typing1, - ()))))))) + ()))))) + (fun + uu___4 -> + (fun d -> + Obj.magic + (Pulse_Checker_Base.checker_result_for_st_typing + g1 pre + (FStar_Pervasives_Native.Some + post_hint) + d + res_ppname)) + uu___4))) + uu___4))) uu___3))) uu___2))) uu___1))) uu___1))) - uu___1))) - uu___1))) uu___1))) uu___) \ No newline at end of file + uu___1))) + uu___1))) + uu___1))) uu___))) uu___) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Checker_Inference.ml b/src/ocaml/plugin/generated/Pulse_Checker_Inference.ml deleted file mode 100644 index fd9ed5dae..000000000 --- a/src/ocaml/plugin/generated/Pulse_Checker_Inference.ml +++ /dev/null @@ -1,2937 +0,0 @@ -open Prims -let (debug_log : - Pulse_Typing_Env.env -> - (unit -> (Prims.string, unit) FStar_Tactics_Effect.tac_repr) -> - (unit, unit) FStar_Tactics_Effect.tac_repr) - = Pulse_Typing.debug_log "inference" -type uvar_id = Prims.nat -type uvar = (uvar_id * Pulse_Syntax_Base.ppname) -let (uvar_eq : uvar -> uvar -> Prims.bool) = - fun u1 -> - fun u2 -> - (FStar_Pervasives_Native.fst u1) = (FStar_Pervasives_Native.fst u2) -type solution = (uvar * Pulse_Syntax_Base.term) Prims.list -let (uvar_to_string : - uvar -> (Prims.string, unit) FStar_Tactics_Effect.tac_repr) = - fun uu___ -> - match uu___ with - | (num, pp) -> - if Pulse_RuntimeUtils.debug_at_level_no_module "Pulse" - then - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (26)) (Prims.of_int (7)) - (Prims.of_int (26)) (Prims.of_int (60))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (26)) (Prims.of_int (7)) - (Prims.of_int (26)) (Prims.of_int (60))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (26)) (Prims.of_int (38)) - (Prims.of_int (26)) (Prims.of_int (56))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "FStar.Printf.fst" - (Prims.of_int (121)) (Prims.of_int (8)) - (Prims.of_int (123)) (Prims.of_int (44))))) - (Obj.magic - (FStar_Tactics_Unseal.unseal pp.Pulse_Syntax_Base.name)) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - fun x -> - Prims.strcat - (Prims.strcat "?." (Prims.strcat uu___1 "_")) - (Prims.strcat (Prims.string_of_int x) ""))))) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac (fun uu___2 -> uu___1 num)) - else - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (27)) (Prims.of_int (35)) - (Prims.of_int (27)) (Prims.of_int (53))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "prims.fst" (Prims.of_int (590)) - (Prims.of_int (19)) (Prims.of_int (590)) - (Prims.of_int (31))))) - (Obj.magic - (FStar_Tactics_Unseal.unseal pp.Pulse_Syntax_Base.name)) - (fun uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> Prims.strcat "?." (Prims.strcat uu___2 ""))) -let (range_of_uvar : uvar -> Pulse_Syntax_Base.range) = - fun u -> (FStar_Pervasives_Native.snd u).Pulse_Syntax_Base.range -let (embedded_uvar_prefix : Prims.string) = "?" -let (is_uvar_r : - FStar_Reflection_Types.term -> uvar FStar_Pervasives_Native.option) = - fun t -> - match FStar_Reflection_V2_Builtins.inspect_ln t with - | FStar_Reflection_V2_Data.Tv_UInst (fv, u::[]) -> - (match FStar_Reflection_V2_Builtins.inspect_fv fv with - | prefix::name::[] -> - if prefix = embedded_uvar_prefix - then - (match FStar_Reflection_V2_Builtins.inspect_universe u with - | FStar_Reflection_V2_Data.Uv_BVar n -> - FStar_Pervasives_Native.Some - (n, - (Pulse_Syntax_Base.mk_ppname (FStar_Sealed.seal name) - (FStar_Reflection_V2_Builtins.range_of_term t))) - | uu___ -> FStar_Pervasives_Native.None) - else FStar_Pervasives_Native.None - | uu___ -> FStar_Pervasives_Native.None) - | uu___ -> FStar_Pervasives_Native.None -let (is_uvar : Pulse_Syntax_Base.term -> uvar FStar_Pervasives_Native.option) - = - fun t -> - match t.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_FStar r -> is_uvar_r r - | uu___ -> FStar_Pervasives_Native.None -let (wrap_nat_to_uvar : - Prims.string -> - Pulse_Syntax_Base.range -> Prims.nat -> Pulse_Syntax_Base.term) - = - fun name -> - fun r -> - fun n -> - let tm = - FStar_Reflection_V2_Builtins.pack_ln - (FStar_Reflection_V2_Data.Tv_UInst - ((FStar_Reflection_V2_Builtins.pack_fv - [embedded_uvar_prefix; name]), - [FStar_Reflection_V2_Builtins.pack_universe - (FStar_Reflection_V2_Data.Uv_BVar n)])) in - Pulse_Syntax_Base.tm_fstar tm r -let (gen_uvar : - Pulse_Syntax_Base.ppname -> - ((uvar * Pulse_Syntax_Base.term), unit) FStar_Tactics_Effect.tac_repr) - = - fun name -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (57)) (Prims.of_int (10)) (Prims.of_int (57)) - (Prims.of_int (20))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (58)) (Prims.of_int (18)) (Prims.of_int (60)) - (Prims.of_int (45))))) - (Obj.magic (FStar_Tactics_V2_Builtins.fresh ())) - (fun uu___ -> - (fun n -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (59)) (Prims.of_int (11)) - (Prims.of_int (59)) (Prims.of_int (29))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (60)) (Prims.of_int (2)) - (Prims.of_int (60)) (Prims.of_int (45))))) - (Obj.magic - (FStar_Tactics_Unseal.unseal name.Pulse_Syntax_Base.name)) - (fun nm -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - ((n, name), - (wrap_nat_to_uvar nm name.Pulse_Syntax_Base.range - n)))))) uu___) -let rec (gen_uvars : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - ((uvar Prims.list * Pulse_Syntax_Base.comp), unit) - FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun t_head -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (63)) (Prims.of_int (13)) (Prims.of_int (63)) - (Prims.of_int (28))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (64)) (Prims.of_int (2)) (Prims.of_int (79)) - (Prims.of_int (60))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> Pulse_Syntax_Pure.is_arrow t_head)) - (fun uu___ -> - (fun ropt -> - match ropt with - | FStar_Pervasives_Native.Some - (b, FStar_Pervasives_Native.Some - (Pulse_Syntax_Base.Implicit), c_rest) - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (66)) (Prims.of_int (16)) - (Prims.of_int (66)) (Prims.of_int (40))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (65)) (Prims.of_int (39)) - (Prims.of_int (76)) (Prims.of_int (3))))) - (Obj.magic - (gen_uvar b.Pulse_Syntax_Base.binder_ppname)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | (n, tm) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (67)) - (Prims.of_int (17)) - (Prims.of_int (67)) - (Prims.of_int (41))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (68)) - (Prims.of_int (4)) - (Prims.of_int (75)) - (Prims.of_int (25))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - Pulse_Syntax_Naming.open_comp_with - c_rest tm)) - (fun uu___1 -> - (fun c_rest1 -> - match c_rest1 with - | Pulse_Syntax_Base.C_ST c -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - ([n], c_rest1)))) - | Pulse_Syntax_Base.C_STAtomic - (uu___1, c) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - ([n], c_rest1)))) - | Pulse_Syntax_Base.C_STGhost - (uu___1, c) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - ([n], c_rest1)))) - | Pulse_Syntax_Base.C_Tot t -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (74)) - (Prims.of_int (29)) - (Prims.of_int (74)) - (Prims.of_int (42))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (73)) - (Prims.of_int (16)) - (Prims.of_int (75)) - (Prims.of_int (25))))) - (Obj.magic - (gen_uvars g t)) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - match uu___1 - with - | (n_rest, - comp_typ) - -> - ((n :: - n_rest), - comp_typ)))))) - uu___1))) uu___)) - | uu___ -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (78)) (Prims.of_int (15)) - (Prims.of_int (79)) (Prims.of_int (60))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (78)) (Prims.of_int (3)) - (Prims.of_int (79)) (Prims.of_int (60))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (79)) (Prims.of_int (34)) - (Prims.of_int (79)) (Prims.of_int (59))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "prims.fst" - (Prims.of_int (590)) - (Prims.of_int (19)) - (Prims.of_int (590)) - (Prims.of_int (31))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string t_head)) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - Prims.strcat - "gen_uvars: unexpected t_head: " - (Prims.strcat uu___1 ""))))) - (fun uu___1 -> - (fun uu___1 -> - Obj.magic - (Pulse_Typing_Env.fail g - FStar_Pervasives_Native.None uu___1)) - uu___1))) uu___) -let rec (check_valid_solution : - Pulse_Typing_Env.env -> - uvar -> - Pulse_Syntax_Base.term -> - solution -> (solution, unit) FStar_Tactics_Effect.tac_repr) - = - fun uu___3 -> - fun uu___2 -> - fun uu___1 -> - fun uu___ -> - (fun g -> - fun n -> - fun t -> - fun uv_sols -> - match uv_sols with - | [] -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> [(n, t)]))) - | (n', t')::tl -> - Obj.magic - (Obj.repr - (if uvar_eq n n' - then - Obj.repr - (if Pulse_Syntax_Base.eq_tm t t' - then - Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> uv_sols)) - else - Obj.repr - (Pulse_Typing_Env.fail g - FStar_Pervasives_Native.None - "check_valid_solution failed")) - else - Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (90)) - (Prims.of_int (19)) - (Prims.of_int (90)) - (Prims.of_int (50))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (90)) - (Prims.of_int (9)) - (Prims.of_int (90)) - (Prims.of_int (50))))) - (Obj.magic - (check_valid_solution g n t tl)) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> (n', t') :: uu___1)))))) - uu___3 uu___2 uu___1 uu___ -let (uvar_index : Pulse_Syntax_Base.term -> uvar) = - fun t -> FStar_Pervasives_Native.__proj__Some__item__v (is_uvar t) -let (is_reveal_uvar : - Pulse_Syntax_Base.term -> - (Pulse_Syntax_Base.universe * Pulse_Syntax_Base.term * - Pulse_Syntax_Base.term) FStar_Pervasives_Native.option) - = - fun t -> - match Pulse_Syntax_Pure.is_pure_app t with - | FStar_Pervasives_Native.Some (hd, FStar_Pervasives_Native.None, arg) -> - (match Pulse_Syntax_Pure.is_pure_app hd with - | FStar_Pervasives_Native.Some - (hd1, FStar_Pervasives_Native.Some (Pulse_Syntax_Base.Implicit), - ty) - -> - if FStar_Pervasives_Native.uu___is_Some (is_uvar arg) - then - (match Pulse_Syntax_Pure.is_fvar hd1 with - | FStar_Pervasives_Native.Some (l, u::[]) -> - if l = Pulse_Reflection_Util.reveal_lid - then FStar_Pervasives_Native.Some (u, ty, arg) - else FStar_Pervasives_Native.None - | uu___ -> FStar_Pervasives_Native.None) - else FStar_Pervasives_Native.None - | uu___ -> FStar_Pervasives_Native.None) - | uu___ -> FStar_Pervasives_Native.None -let (is_reveal : Pulse_Syntax_Base.term -> Prims.bool) = - fun t -> - match Pulse_Syntax_Pure.leftmost_head t with - | FStar_Pervasives_Native.Some hd -> - (match Pulse_Syntax_Pure.is_fvar hd with - | FStar_Pervasives_Native.Some (l, uu___::[]) -> - l = Pulse_Reflection_Util.reveal_lid - | uu___ -> false) - | uu___ -> false -let rec (match_typ : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - solution -> (solution, unit) FStar_Tactics_Effect.tac_repr) - = - fun uu___3 -> - fun uu___2 -> - fun uu___1 -> - fun uu___ -> - (fun g -> - fun t1 -> - fun t2 -> - fun uv_sols -> - match ((is_reveal_uvar t1), (is_reveal t2)) with - | (FStar_Pervasives_Native.Some (u, ty, t), false) -> - Obj.magic - (Obj.repr - (check_valid_solution g (uvar_index t) - (Pulse_Typing.mk_hide u ty t2) uv_sols)) - | uu___ -> - Obj.magic - (Obj.repr - (if - FStar_Pervasives_Native.uu___is_Some - (is_uvar t1) - then - Obj.repr - (check_valid_solution g (uvar_index t1) t2 - uv_sols) - else - Obj.repr - (if - FStar_Pervasives_Native.uu___is_Some - (is_uvar t2) - then - Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (130)) - (Prims.of_int (16)) - (Prims.of_int (133)) - (Prims.of_int (42))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (129)) - (Prims.of_int (9)) - (Prims.of_int (133)) - (Prims.of_int (42))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (133)) - (Prims.of_int (20)) - (Prims.of_int (133)) - (Prims.of_int (41))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (130)) - (Prims.of_int (16)) - (Prims.of_int (133)) - (Prims.of_int (42))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - t1)) - (fun uu___2 -> - (fun uu___2 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (130)) - (Prims.of_int (16)) - (Prims.of_int (133)) - (Prims.of_int (42))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (130)) - (Prims.of_int (16)) - (Prims.of_int (133)) - (Prims.of_int (42))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (132)) - (Prims.of_int (20)) - (Prims.of_int (132)) - (Prims.of_int (41))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "FStar.Printf.fst" - (Prims.of_int (121)) - (Prims.of_int (8)) - (Prims.of_int (123)) - (Prims.of_int (44))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - t2)) - (fun uu___3 - -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - fun x -> - Prims.strcat - (Prims.strcat - "Could not match the term " - (Prims.strcat - uu___3 - " with ")) - (Prims.strcat - x - ", since the former contains a unification variable"))))) - (fun uu___3 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___4 -> - uu___3 - uu___2)))) - uu___2))) - (fun uu___2 -> - (fun uu___2 -> - Obj.magic - (Pulse_Typing_Env.fail g - (FStar_Pervasives_Native.Some - (t2.Pulse_Syntax_Base.range1)) - uu___2)) uu___2)) - else - Obj.repr - (match ((t1.Pulse_Syntax_Base.t), - (t2.Pulse_Syntax_Base.t)) - with - | (Pulse_Syntax_Base.Tm_Pure t11, - Pulse_Syntax_Base.Tm_Pure t21) -> - Obj.repr - (match_typ g t11 t21 uv_sols) - | (uu___3, uu___4) -> - Obj.repr - (match ((Pulse_Syntax_Pure.is_pure_app - t1), - (Pulse_Syntax_Pure.is_pure_app - t2)) - with - | (FStar_Pervasives_Native.Some - (head1, arg_qual1, arg1), - FStar_Pervasives_Native.Some - (head2, arg_qual2, arg2)) -> - Obj.repr - (if arg_qual1 = arg_qual2 - then - Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (142)) - (Prims.of_int (32)) - (Prims.of_int (142)) - (Prims.of_int (63))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (143)) - (Prims.of_int (18)) - (Prims.of_int (143)) - (Prims.of_int (47))))) - (Obj.magic - (match_typ g - head1 head2 - uv_sols)) - (fun uu___5 -> - (fun uv_sols1 - -> - Obj.magic - ( - match_typ - g arg1 - arg2 - uv_sols1)) - uu___5)) - else - Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___6 -> - uv_sols))) - | (uu___5, uu___6) -> - Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___7 -> uv_sols)))))))) - uu___3 uu___2 uu___1 uu___ -let rec (atomic_vprop_has_uvar : Pulse_Syntax_Base.term -> Prims.bool) = - fun t -> - if FStar_Pervasives_Native.uu___is_Some (is_uvar t) - then true - else - (match t.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_Pure arg -> atomic_vprop_has_uvar arg - | Pulse_Syntax_Base.Tm_Emp -> false - | uu___1 -> - (match Pulse_Syntax_Pure.is_pure_app t with - | FStar_Pervasives_Native.Some (head, uu___2, arg) -> - (atomic_vprop_has_uvar head) || (atomic_vprop_has_uvar arg) - | uu___2 -> false)) -let rec (atomic_vprops_may_match : - Pulse_Syntax_Base.term -> Pulse_Syntax_Base.term -> Prims.bool) = - fun t1 -> - fun t2 -> - if - (FStar_Pervasives_Native.uu___is_Some (is_reveal_uvar t1)) && - (Prims.op_Negation (is_reveal t2)) - then true - else - if FStar_Pervasives_Native.uu___is_Some (is_uvar t1) - then true - else - (match ((t1.Pulse_Syntax_Base.t), (t2.Pulse_Syntax_Base.t)) with - | (Pulse_Syntax_Base.Tm_Pure x, Pulse_Syntax_Base.Tm_Pure y) -> - atomic_vprops_may_match x y - | (uu___2, uu___3) -> - (match ((Pulse_Syntax_Pure.is_pure_app t1), - (Pulse_Syntax_Pure.is_pure_app t2)) - with - | (FStar_Pervasives_Native.Some (head1, q1, arg1), - FStar_Pervasives_Native.Some (head2, q2, arg2)) -> - ((atomic_vprops_may_match head1 head2) && (q1 = q2)) && - (atomic_vprops_may_match arg1 arg2) - | (uu___4, uu___5) -> Pulse_Syntax_Base.eq_tm t1 t2)) -let (infer_one_atomic_vprop : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term Prims.list -> - solution -> (solution, unit) FStar_Tactics_Effect.tac_repr) - = - fun uu___3 -> - fun uu___2 -> - fun uu___1 -> - fun uu___ -> - (fun g -> - fun t -> - fun ctxt -> - fun uv_sols -> - if atomic_vprop_has_uvar t - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (182)) - (Prims.of_int (24)) - (Prims.of_int (182)) - (Prims.of_int (95))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (183)) (Prims.of_int (4)) - (Prims.of_int (197)) - (Prims.of_int (16))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - FStar_List_Tot_Base.filter - (fun ctxt_vp -> - atomic_vprops_may_match t ctxt_vp) - ctxt)) - (fun uu___ -> - (fun matching_ctxt -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (183)) - (Prims.of_int (4)) - (Prims.of_int (185)) - (Prims.of_int (60))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (186)) - (Prims.of_int (4)) - (Prims.of_int (197)) - (Prims.of_int (16))))) - (Obj.magic - (debug_log g - (fun uu___ -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (183)) - (Prims.of_int (26)) - (Prims.of_int (185)) - (Prims.of_int (59))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (183)) - (Prims.of_int (26)) - (Prims.of_int (185)) - (Prims.of_int (59))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (184)) - (Prims.of_int (28)) - (Prims.of_int (184)) - (Prims.of_int (48))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "FStar.Printf.fst" - (Prims.of_int (121)) - (Prims.of_int (8)) - (Prims.of_int (123)) - (Prims.of_int (44))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - t)) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - fun x -> - Prims.strcat - (Prims.strcat - "infer_one_atomic_vprop " - (Prims.strcat - uu___1 - ", found ")) - (Prims.strcat - (Prims.string_of_int - x) - " matching candidates\n"))))) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - uu___1 - (FStar_List_Tot_Base.length - matching_ctxt)))))) - (fun uu___ -> - (fun uu___ -> - if - (FStar_List_Tot_Base.length - matching_ctxt) - = Prims.int_one - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (188)) - (Prims.of_int (6)) - (Prims.of_int (191)) - (Prims.of_int (60))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (191)) - (Prims.of_int (61)) - (Prims.of_int (195)) - (Prims.of_int (13))))) - (Obj.magic - (debug_log g - (fun uu___1 -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (188)) - (Prims.of_int (28)) - (Prims.of_int (191)) - (Prims.of_int (59))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (188)) - (Prims.of_int (28)) - (Prims.of_int (191)) - (Prims.of_int (59))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (190)) - (Prims.of_int (34)) - (Prims.of_int (190)) - (Prims.of_int (80))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (188)) - (Prims.of_int (28)) - (Prims.of_int (191)) - (Prims.of_int (59))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - (FStar_List_Tot_Base.hd - matching_ctxt))) - (fun - uu___2 -> - (fun - uu___2 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (188)) - (Prims.of_int (28)) - (Prims.of_int (191)) - (Prims.of_int (59))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (188)) - (Prims.of_int (28)) - (Prims.of_int (191)) - (Prims.of_int (59))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (189)) - (Prims.of_int (34)) - (Prims.of_int (189)) - (Prims.of_int (54))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "FStar.Printf.fst" - (Prims.of_int (121)) - (Prims.of_int (8)) - (Prims.of_int (123)) - (Prims.of_int (44))))) - (Obj.magic - (Pulse_Syntax_Printer.term_to_string - t)) - (fun - uu___3 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - fun x -> - fun x1 -> - Prims.strcat - (Prims.strcat - (Prims.strcat - "infer_one_atomic_vprop: matching " - (Prims.strcat - uu___3 - " and ")) - (Prims.strcat - x - " with ")) - (Prims.strcat - (Prims.string_of_int - x1) - " exisiting solutions\n"))))) - (fun - uu___3 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - uu___3 - uu___2)))) - uu___2))) - (fun - uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - uu___2 - (FStar_List_Tot_Base.length - uv_sols)))))) - (fun uu___1 -> - (fun uu___1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (192)) - (Prims.of_int (20)) - (Prims.of_int (192)) - (Prims.of_int (69))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (193)) - (Prims.of_int (6)) - (Prims.of_int (195)) - (Prims.of_int (13))))) - (Obj.magic - (match_typ - g t - (FStar_List_Tot_Base.hd - matching_ctxt) - uv_sols)) - (fun - uu___2 -> - (fun - uv_sols1 - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (193)) - (Prims.of_int (6)) - (Prims.of_int (194)) - (Prims.of_int (61))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (192)) - (Prims.of_int (10)) - (Prims.of_int (192)) - (Prims.of_int (17))))) - (Obj.magic - (debug_log - g - (fun - uu___2 -> - (fun - uu___2 -> - Obj.magic - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - Prims.strcat - "post matching, uv_sols has " - (Prims.strcat - (Prims.string_of_int - (FStar_List_Tot_Base.length - uv_sols1)) - " solutions\n")))) - uu___2))) - (fun - uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - uv_sols1)))) - uu___2))) - uu___1))) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - uv_sols)))) uu___))) - uu___))) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> uv_sols)))) uu___3 uu___2 uu___1 - uu___ -let (union_ranges : - Pulse_Syntax_Base.range -> - Pulse_Syntax_Base.range -> - (Pulse_Syntax_Base.range, unit) FStar_Tactics_Effect.tac_repr) - = - fun uu___1 -> - fun uu___ -> - (fun r0 -> - fun r1 -> - Obj.magic (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> r0))) - uu___1 uu___ -let (with_range : - Pulse_Syntax_Base.st_term' -> - Pulse_Syntax_Base.range -> Pulse_Syntax_Base.st_term) - = - fun t -> - fun r -> { Pulse_Syntax_Base.term1 = t; Pulse_Syntax_Base.range2 = r } -let rec (rebuild_head : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - uvar Prims.list -> - solution -> - Pulse_Syntax_Base.range -> - (Pulse_Syntax_Base.st_term, unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun head -> - fun uvs -> - fun uv_sols -> - fun r -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (206)) (Prims.of_int (15)) - (Prims.of_int (206)) (Prims.of_int (18))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (205)) (Prims.of_int (46)) - (Prims.of_int (220)) (Prims.of_int (42))))) - (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> uvs)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | hd::tl -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (207)) - (Prims.of_int (13)) - (Prims.of_int (207)) - (Prims.of_int (65))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (208)) (Prims.of_int (2)) - (Prims.of_int (220)) - (Prims.of_int (42))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - FStar_List_Tot_Base.find - (fun uu___2 -> - match uu___2 with - | (n1, uu___3) -> uvar_eq hd n1) - uv_sols)) - (fun uu___1 -> - (fun ropt -> - match ropt with - | FStar_Pervasives_Native.None -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (211)) - (Prims.of_int (11)) - (Prims.of_int (213)) - (Prims.of_int (34))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (210)) - (Prims.of_int (4)) - (Prims.of_int (213)) - (Prims.of_int (34))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (213)) - (Prims.of_int (14)) - (Prims.of_int (213)) - (Prims.of_int (33))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "prims.fst" - (Prims.of_int (590)) - (Prims.of_int (19)) - (Prims.of_int (590)) - (Prims.of_int (31))))) - (Obj.magic - (uvar_to_string hd)) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - Prims.strcat - "inference failed in building head, no solution for " - (Prims.strcat - uu___1 "\n"))))) - (fun uu___1 -> - (fun uu___1 -> - Obj.magic - (Pulse_Typing_Env.fail - g - (FStar_Pervasives_Native.Some - r) uu___1)) - uu___1))) - | FStar_Pervasives_Native.Some - (uu___1, t2) -> - Obj.magic - (Obj.repr - (match tl with - | [] -> - Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - with_range - (Pulse_Syntax_Base.Tm_STApp - { - Pulse_Syntax_Base.head - = head; - Pulse_Syntax_Base.arg_qual - = - (FStar_Pervasives_Native.Some - Pulse_Syntax_Base.Implicit); - Pulse_Syntax_Base.arg - = t2 - }) r)) - | uu___2 -> - Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (219)) - (Prims.of_int (21)) - (Prims.of_int (219)) - (Prims.of_int (55))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (220)) - (Prims.of_int (6)) - (Prims.of_int (220)) - (Prims.of_int (42))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - Pulse_Syntax_Pure.tm_pureapp - head - (FStar_Pervasives_Native.Some - Pulse_Syntax_Base.Implicit) - t2)) - (fun uu___3 -> - (fun app_node -> - Obj.magic - (rebuild_head g - app_node tl - uv_sols r)) - uu___3))))) uu___1))) - uu___) -let (print_solutions : - solution -> (Prims.string, unit) FStar_Tactics_Effect.tac_repr) = - fun l -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (226)) (Prims.of_int (6)) (Prims.of_int (231)) - (Prims.of_int (10))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (225)) (Prims.of_int (4)) (Prims.of_int (231)) - (Prims.of_int (10))))) - (Obj.magic - (FStar_Tactics_Util.map - (fun uu___ -> - match uu___ with - | (u, t) -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (230)) (Prims.of_int (23)) - (Prims.of_int (230)) (Prims.of_int (43))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (228)) (Prims.of_int (10)) - (Prims.of_int (230)) (Prims.of_int (43))))) - (Obj.magic (Pulse_Syntax_Printer.term_to_string t)) - (fun uu___1 -> - (fun uu___1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (228)) - (Prims.of_int (10)) - (Prims.of_int (230)) - (Prims.of_int (43))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (228)) - (Prims.of_int (10)) - (Prims.of_int (230)) - (Prims.of_int (43))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (229)) - (Prims.of_int (23)) - (Prims.of_int (229)) - (Prims.of_int (41))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "FStar.Printf.fst" - (Prims.of_int (121)) - (Prims.of_int (8)) - (Prims.of_int (123)) - (Prims.of_int (44))))) - (Obj.magic (uvar_to_string u)) - (fun uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - fun x -> - Prims.strcat - (Prims.strcat "" - (Prims.strcat uu___2 - " := ")) - (Prims.strcat x ""))))) - (fun uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> uu___2 uu___1)))) uu___1)) - l)) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> FStar_String.concat "\n" uu___)) -let (find_solution : - solution -> uvar -> Pulse_Syntax_Base.term FStar_Pervasives_Native.option) - = - fun sol -> - fun t -> - let r = - FStar_List_Tot_Base.find - (fun uu___ -> match uu___ with | (u, uu___1) -> uvar_eq u t) sol in - match r with - | FStar_Pervasives_Native.None -> FStar_Pervasives_Native.None - | FStar_Pervasives_Native.Some (uu___, t1) -> - FStar_Pervasives_Native.Some t1 -let (unsolved_uvs : - solution -> - uvar Prims.list -> uvar Prims.list FStar_Pervasives_Native.option) - = - fun sol -> - fun uvs -> - let unsolved = - FStar_List_Tot_Base.filter - (fun uv -> - FStar_Pervasives_Native.uu___is_None (find_solution sol uv)) uvs in - match unsolved with - | [] -> FStar_Pervasives_Native.None - | uu___ -> FStar_Pervasives_Native.Some unsolved -let (unsolved : - solution -> - (uvar * Pulse_Syntax_Base.term) Prims.list -> - (uvar * Pulse_Syntax_Base.term) Prims.list - FStar_Pervasives_Native.option) - = - fun sol -> - fun uvs -> - let unsolved1 = - FStar_List_Tot_Base.filter - (fun uu___ -> - match uu___ with - | (uv, uu___1) -> - FStar_Pervasives_Native.uu___is_None (find_solution sol uv)) - uvs in - match unsolved1 with - | [] -> FStar_Pervasives_Native.None - | uu___ -> FStar_Pervasives_Native.Some unsolved1 -let (try_inst_uvs_in_goal : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.vprop -> - (solution, unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun ctxt -> - fun goal -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (258)) (Prims.of_int (18)) - (Prims.of_int (258)) (Prims.of_int (20))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (258)) (Prims.of_int (23)) - (Prims.of_int (269)) (Prims.of_int (8))))) - (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> [])) - (fun uu___ -> - (fun uv_sols -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (259)) (Prims.of_int (20)) - (Prims.of_int (259)) (Prims.of_int (38))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (259)) (Prims.of_int (41)) - (Prims.of_int (269)) (Prims.of_int (8))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - Pulse_Checker_VPropEquiv.vprop_as_list goal)) - (fun uu___ -> - (fun goal_list -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (260)) - (Prims.of_int (20)) - (Prims.of_int (260)) - (Prims.of_int (38))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (260)) - (Prims.of_int (41)) - (Prims.of_int (269)) - (Prims.of_int (8))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - Pulse_Checker_VPropEquiv.vprop_as_list - ctxt)) - (fun uu___ -> - (fun ctxt_list -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (262)) - (Prims.of_int (6)) - (Prims.of_int (266)) - (Prims.of_int (17))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (261)) - (Prims.of_int (8)) - (Prims.of_int (261)) - (Prims.of_int (15))))) - (Obj.magic - (FStar_Tactics_Util.fold_left - (fun uv_sols1 -> - fun goal_vprop -> - infer_one_atomic_vprop - g goal_vprop - ctxt_list uv_sols1) - uv_sols goal_list)) - (fun uv_sols1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> uv_sols1)))) - uu___))) uu___))) uu___) -let (solutions_to_string : - solution -> (Prims.string, unit) FStar_Tactics_Effect.tac_repr) = - fun sol -> print_solutions sol -let (apply_sol : - solution -> - FStar_Reflection_Types.term -> - (FStar_Reflection_Types.term, unit) FStar_Tactics_Effect.tac_repr) - = - fun sol -> - fun t -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (277)) (Prims.of_int (4)) (Prims.of_int (283)) - (Prims.of_int (50))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (285)) (Prims.of_int (2)) (Prims.of_int (285)) - (Prims.of_int (43))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - fun uu___ -> - (fun uu___ -> - fun t1 -> - Obj.magic - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - match is_uvar_r t1 with - | FStar_Pervasives_Native.None -> t1 - | FStar_Pervasives_Native.Some n -> - (match find_solution sol n with - | FStar_Pervasives_Native.None -> t1 - | FStar_Pervasives_Native.Some - { - Pulse_Syntax_Base.t = - Pulse_Syntax_Base.Tm_FStar t2; - Pulse_Syntax_Base.range1 = uu___2;_} - -> t2 - | FStar_Pervasives_Native.Some t2 -> - Pulse_Elaborate_Pure.elab_term t2)))) - uu___1 uu___)) - (fun uu___ -> - (fun solve_uvar -> - Obj.magic (FStar_Tactics_Visit.visit_tm solve_uvar t)) uu___) -let rec (apply_solution : - solution -> - Pulse_Syntax_Base.term -> - (Pulse_Syntax_Base.term, unit) FStar_Tactics_Effect.tac_repr) - = - fun sol -> - fun t -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (289)) (Prims.of_int (30)) - (Prims.of_int (289)) (Prims.of_int (69))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (290)) (Prims.of_int (4)) (Prims.of_int (315)) - (Prims.of_int (49))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - fun t' -> - Pulse_Syntax_Base.with_range t' t.Pulse_Syntax_Base.range1)) - (fun uu___ -> - (fun w -> - match t.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_Emp -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> t))) - | Pulse_Syntax_Base.Tm_VProp -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> t))) - | Pulse_Syntax_Base.Tm_Inames -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> t))) - | Pulse_Syntax_Base.Tm_EmpInames -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> t))) - | Pulse_Syntax_Base.Tm_Unknown -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> t))) - | Pulse_Syntax_Base.Tm_FStar t1 -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (298)) (Prims.of_int (14)) - (Prims.of_int (298)) (Prims.of_int (29))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (300)) (Prims.of_int (6)) - (Prims.of_int (300)) (Prims.of_int (20))))) - (Obj.magic (apply_sol sol t1)) - (fun t2 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - w (Pulse_Syntax_Base.Tm_FStar t2))))) - | Pulse_Syntax_Base.Tm_Pure p -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (303)) (Prims.of_int (8)) - (Prims.of_int (303)) (Prims.of_int (40))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (303)) (Prims.of_int (6)) - (Prims.of_int (303)) (Prims.of_int (40))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (303)) - (Prims.of_int (17)) - (Prims.of_int (303)) - (Prims.of_int (39))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (303)) - (Prims.of_int (8)) - (Prims.of_int (303)) - (Prims.of_int (40))))) - (Obj.magic (apply_solution sol p)) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - Pulse_Syntax_Base.Tm_Pure uu___)))) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> w uu___)))) - | Pulse_Syntax_Base.Tm_Star (l, r) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (306)) (Prims.of_int (8)) - (Prims.of_int (307)) (Prims.of_int (40))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (306)) (Prims.of_int (6)) - (Prims.of_int (307)) (Prims.of_int (40))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (306)) - (Prims.of_int (17)) - (Prims.of_int (306)) - (Prims.of_int (39))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (306)) - (Prims.of_int (8)) - (Prims.of_int (307)) - (Prims.of_int (40))))) - (Obj.magic (apply_solution sol l)) - (fun uu___ -> - (fun uu___ -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (307)) - (Prims.of_int (17)) - (Prims.of_int (307)) - (Prims.of_int (39))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (306)) - (Prims.of_int (8)) - (Prims.of_int (307)) - (Prims.of_int (40))))) - (Obj.magic (apply_solution sol r)) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - Pulse_Syntax_Base.Tm_Star - (uu___, uu___1))))) - uu___))) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> w uu___)))) - | Pulse_Syntax_Base.Tm_ExistsSL (u, b, body) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (310)) (Prims.of_int (8)) - (Prims.of_int (311)) (Prims.of_int (49))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (310)) (Prims.of_int (6)) - (Prims.of_int (311)) (Prims.of_int (49))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (310)) - (Prims.of_int (25)) - (Prims.of_int (310)) - (Prims.of_int (74))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (310)) - (Prims.of_int (8)) - (Prims.of_int (311)) - (Prims.of_int (49))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (310)) - (Prims.of_int (44)) - (Prims.of_int (310)) - (Prims.of_int (74))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (310)) - (Prims.of_int (25)) - (Prims.of_int (310)) - (Prims.of_int (74))))) - (Obj.magic - (apply_solution sol - b.Pulse_Syntax_Base.binder_ty)) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - { - Pulse_Syntax_Base.binder_ty = - uu___; - Pulse_Syntax_Base.binder_ppname - = - (b.Pulse_Syntax_Base.binder_ppname) - })))) - (fun uu___ -> - (fun uu___ -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (311)) - (Prims.of_int (23)) - (Prims.of_int (311)) - (Prims.of_int (48))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (310)) - (Prims.of_int (8)) - (Prims.of_int (311)) - (Prims.of_int (49))))) - (Obj.magic - (apply_solution sol body)) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - Pulse_Syntax_Base.Tm_ExistsSL - (u, uu___, uu___1))))) - uu___))) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> w uu___)))) - | Pulse_Syntax_Base.Tm_ForallSL (u, b, body) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (314)) (Prims.of_int (8)) - (Prims.of_int (315)) (Prims.of_int (49))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (314)) (Prims.of_int (6)) - (Prims.of_int (315)) (Prims.of_int (49))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (314)) - (Prims.of_int (25)) - (Prims.of_int (314)) - (Prims.of_int (74))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (314)) - (Prims.of_int (8)) - (Prims.of_int (315)) - (Prims.of_int (49))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (314)) - (Prims.of_int (44)) - (Prims.of_int (314)) - (Prims.of_int (74))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (314)) - (Prims.of_int (25)) - (Prims.of_int (314)) - (Prims.of_int (74))))) - (Obj.magic - (apply_solution sol - b.Pulse_Syntax_Base.binder_ty)) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - { - Pulse_Syntax_Base.binder_ty = - uu___; - Pulse_Syntax_Base.binder_ppname - = - (b.Pulse_Syntax_Base.binder_ppname) - })))) - (fun uu___ -> - (fun uu___ -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (315)) - (Prims.of_int (23)) - (Prims.of_int (315)) - (Prims.of_int (48))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (314)) - (Prims.of_int (8)) - (Prims.of_int (315)) - (Prims.of_int (49))))) - (Obj.magic - (apply_solution sol body)) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - Pulse_Syntax_Base.Tm_ForallSL - (u, uu___, uu___1))))) - uu___))) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> w uu___))))) uu___) -let (filter_common_terms : - Pulse_Syntax_Base.term Prims.list -> - Pulse_Syntax_Base.term Prims.list -> - (Pulse_Syntax_Base.term Prims.list * Pulse_Syntax_Base.term Prims.list)) - = - fun goal -> - fun ctxt -> - let uu___ = - FStar_List_Tot_Base.partition - (fun g -> - FStar_List_Tot_Base.existsb (Pulse_Syntax_Base.eq_tm g) ctxt) - goal in - match uu___ with - | (matched, unsolved_goals) -> - let remaining_ctxt = - FStar_List_Tot_Base.filter - (fun g -> - Prims.op_Negation - (FStar_List_Tot_Base.existsb (Pulse_Syntax_Base.eq_tm g) - matched)) ctxt in - (unsolved_goals, remaining_ctxt) -let (infer : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.range -> - (Pulse_Syntax_Base.st_term, unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun head -> - fun t_head -> - fun ctxt_pre -> - fun r -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (329)) (Prims.of_int (10)) - (Prims.of_int (329)) (Prims.of_int (34))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (329)) (Prims.of_int (37)) - (Prims.of_int (364)) (Prims.of_int (5))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> Pulse_Typing_Env.push_context g "infer" r)) - (fun uu___ -> - (fun g1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (330)) (Prims.of_int (16)) - (Prims.of_int (336)) (Prims.of_int (55))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (329)) (Prims.of_int (37)) - (Prims.of_int (364)) (Prims.of_int (5))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (331)) - (Prims.of_int (20)) - (Prims.of_int (331)) - (Prims.of_int (38))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (330)) - (Prims.of_int (16)) - (Prims.of_int (336)) - (Prims.of_int (55))))) - (Obj.magic (gen_uvars g1 t_head)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | (uvs, comp) -> - (match comp with - | Pulse_Syntax_Base.C_ST st_comp -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - (uvs, - (st_comp.Pulse_Syntax_Base.pre))))) - | Pulse_Syntax_Base.C_STAtomic - (uu___1, st_comp) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - (uvs, - (st_comp.Pulse_Syntax_Base.pre))))) - | Pulse_Syntax_Base.C_STGhost - (uu___1, st_comp) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - (uvs, - (st_comp.Pulse_Syntax_Base.pre))))) - | uu___1 -> - Obj.magic - (Obj.repr - (Pulse_Typing_Env.fail g1 - (FStar_Pervasives_Native.Some - r) - "infer:unexpected comp type")))) - uu___))) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | (uvs, pre) -> - if - (FStar_List_Tot_Base.length uvs) = - Prims.int_zero - then - Obj.magic - (Pulse_Typing_Env.fail g1 - (FStar_Pervasives_Native.Some r) - "Inference did not find anything to infer") - else - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (342)) - (Prims.of_int (4)) - (Prims.of_int (348)) - (Prims.of_int (65))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (348)) - (Prims.of_int (66)) - (Prims.of_int (363)) - (Prims.of_int (71))))) - (Obj.magic - (debug_log g1 - (fun uu___2 -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (348)) - (Prims.of_int (16)) - (Prims.of_int (348)) - (Prims.of_int (64))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (343)) - (Prims.of_int (6)) - (Prims.of_int (348)) - (Prims.of_int (64))))) - (Obj.magic - (Pulse_Syntax_Printer.term_list_to_string - "\n" - (Pulse_Checker_VPropEquiv.vprop_as_list - pre))) - (fun uu___3 -> - (fun uu___3 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (343)) - (Prims.of_int (6)) - (Prims.of_int (348)) - (Prims.of_int (64))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (343)) - (Prims.of_int (6)) - (Prims.of_int (348)) - (Prims.of_int (64))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (347)) - (Prims.of_int (16)) - (Prims.of_int (347)) - (Prims.of_int (69))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "FStar.Printf.fst" - (Prims.of_int (121)) - (Prims.of_int (8)) - (Prims.of_int (123)) - (Prims.of_int (44))))) - (Obj.magic - (Pulse_Syntax_Printer.term_list_to_string - "\n" - (Pulse_Checker_VPropEquiv.vprop_as_list - ctxt_pre))) - (fun - uu___4 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___5 -> - fun x -> - Prims.strcat - (Prims.strcat - (Prims.strcat - "Generated " - (Prims.strcat - (Prims.string_of_int - (FStar_List_Tot_Base.length - uvs)) - " uvars,\nctx: {\n")) - (Prims.strcat - uu___4 - "\n}\nst_comp.pre:{\n")) - (Prims.strcat - x "\n}"))))) - (fun uu___4 - -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___5 -> - uu___4 - uu___3)))) - uu___3)))) - (fun uu___2 -> - (fun uu___2 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (349)) - (Prims.of_int (18)) - (Prims.of_int (349)) - (Prims.of_int (53))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (350)) - (Prims.of_int (4)) - (Prims.of_int (363)) - (Prims.of_int (71))))) - (Obj.magic - (try_inst_uvs_in_goal - g1 ctxt_pre pre)) - (fun uu___3 -> - (fun uv_sols -> - match unsolved_uvs - uv_sols - uvs - with - | FStar_Pervasives_Native.None - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - ( - FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (352)) - (Prims.of_int (6)) - (Prims.of_int (352)) - (Prims.of_int (95))))) - ( - FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (352)) - (Prims.of_int (96)) - (Prims.of_int (355)) - (Prims.of_int (10))))) - ( - Obj.magic - (debug_log - g1 - (fun - uu___3 -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (352)) - (Prims.of_int (69)) - (Prims.of_int (352)) - (Prims.of_int (94))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "prims.fst" - (Prims.of_int (590)) - (Prims.of_int (19)) - (Prims.of_int (590)) - (Prims.of_int (31))))) - (Obj.magic - (print_solutions - uv_sols)) - (fun - uu___4 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___5 -> - Prims.strcat - "Got solutions: {\n" - (Prims.strcat - uu___4 - "\\}")))))) - ( - fun - uu___3 -> - (fun - uu___3 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (353)) - (Prims.of_int (17)) - (Prims.of_int (353)) - (Prims.of_int (50))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (354)) - (Prims.of_int (6)) - (Prims.of_int (355)) - (Prims.of_int (10))))) - (Obj.magic - (rebuild_head - g1 head - uvs - uv_sols r)) - (fun - uu___4 -> - (fun - head1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (354)) - (Prims.of_int (6)) - (Prims.of_int (354)) - (Prims.of_int (89))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (353)) - (Prims.of_int (10)) - (Prims.of_int (353)) - (Prims.of_int (14))))) - (Obj.magic - (debug_log - g1 - (fun - uu___4 -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (354)) - (Prims.of_int (62)) - (Prims.of_int (354)) - (Prims.of_int (88))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "prims.fst" - (Prims.of_int (590)) - (Prims.of_int (19)) - (Prims.of_int (590)) - (Prims.of_int (31))))) - (Obj.magic - (Pulse_Syntax_Printer.st_term_to_string - head1)) - (fun - uu___5 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___6 -> - Prims.strcat - "Rebuilt head= " - (Prims.strcat - uu___5 "")))))) - (fun - uu___4 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___5 -> - head1)))) - uu___4))) - uu___3)) - | FStar_Pervasives_Native.Some - uvs1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - ( - FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (357)) - (Prims.of_int (18)) - (Prims.of_int (357)) - (Prims.of_int (60))))) - ( - FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (357)) - (Prims.of_int (63)) - (Prims.of_int (363)) - (Prims.of_int (71))))) - ( - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (357)) - (Prims.of_int (32)) - (Prims.of_int (357)) - (Prims.of_int (60))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (357)) - (Prims.of_int (18)) - (Prims.of_int (357)) - (Prims.of_int (60))))) - (Obj.magic - (apply_solution - uv_sols - pre)) - (fun - uu___3 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - Pulse_Checker_VPropEquiv.vprop_as_list - uu___3)))) - ( - fun - uu___3 -> - (fun - goals -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (358)) - (Prims.of_int (17)) - (Prims.of_int (358)) - (Prims.of_int (39))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (358)) - (Prims.of_int (42)) - (Prims.of_int (363)) - (Prims.of_int (71))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - Pulse_Checker_VPropEquiv.vprop_as_list - ctxt_pre)) - (fun - uu___3 -> - (fun ctxt - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (359)) - (Prims.of_int (24)) - (Prims.of_int (359)) - (Prims.of_int (54))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (358)) - (Prims.of_int (42)) - (Prims.of_int (363)) - (Prims.of_int (71))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - filter_common_terms - goals - ctxt)) - (fun - uu___3 -> - (fun - uu___3 -> - match uu___3 - with - | - (goals1, - ctxt1) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (361)) - (Prims.of_int (13)) - (Prims.of_int (363)) - (Prims.of_int (71))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (360)) - (Prims.of_int (6)) - (Prims.of_int (363)) - (Prims.of_int (71))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (363)) - (Prims.of_int (16)) - (Prims.of_int (363)) - (Prims.of_int (70))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (361)) - (Prims.of_int (13)) - (Prims.of_int (363)) - (Prims.of_int (71))))) - (Obj.magic - (Pulse_Checker_Common.format_failed_goal - g1 ctxt1 - goals1)) - (fun - uu___4 -> - (fun - uu___4 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (361)) - (Prims.of_int (13)) - (Prims.of_int (363)) - (Prims.of_int (71))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (361)) - (Prims.of_int (13)) - (Prims.of_int (363)) - (Prims.of_int (71))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (362)) - (Prims.of_int (16)) - (Prims.of_int (362)) - (Prims.of_int (63))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "FStar.Printf.fst" - (Prims.of_int (121)) - (Prims.of_int (8)) - (Prims.of_int (123)) - (Prims.of_int (44))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (362)) - (Prims.of_int (36)) - (Prims.of_int (362)) - (Prims.of_int (62))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (362)) - (Prims.of_int (16)) - (Prims.of_int (362)) - (Prims.of_int (63))))) - (Obj.magic - (FStar_Tactics_Util.map - uvar_to_string - uvs1)) - (fun - uu___5 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___6 -> - FStar_String.concat - ", " - uu___5)))) - (fun - uu___5 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___6 -> - fun x -> - Prims.strcat - (Prims.strcat - "Could not infer some implicit arguments: " - (Prims.strcat - uu___5 - ";\n")) - (Prims.strcat - x ""))))) - (fun - uu___5 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___6 -> - uu___5 - uu___4)))) - uu___4))) - (fun - uu___4 -> - (fun - uu___4 -> - Obj.magic - (Pulse_Typing_Env.fail - g1 - (FStar_Pervasives_Native.Some - r) uu___4)) - uu___4))) - uu___3))) - uu___3))) - uu___3))) - uu___3))) uu___2))) - uu___))) uu___) -let (contains_uvar_r : - FStar_Reflection_Types.term -> - (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) - = - fun t -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (368)) (Prims.of_int (6)) (Prims.of_int (370)) - (Prims.of_int (12))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (372)) (Prims.of_int (4)) (Prims.of_int (376)) - (Prims.of_int (21))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - fun uu___ -> - (fun uu___ -> - fun t1 -> - if FStar_Pervasives_Native.uu___is_Some (is_uvar_r t1) - then - Obj.magic (FStar_Tactics_V2_Derived.fail "found uvar") - else - Obj.magic - (FStar_Tactics_Effect.lift_div_tac (fun uu___2 -> t1))) - uu___1 uu___)) - (fun uu___ -> - (fun is_uvar1 -> - Obj.magic - (FStar_Tactics_V2_Derived.or_else - (fun uu___ -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (374)) (Prims.of_int (18)) - (Prims.of_int (374)) (Prims.of_int (38))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (375)) (Prims.of_int (10)) - (Prims.of_int (375)) (Prims.of_int (15))))) - (Obj.magic (FStar_Tactics_Visit.visit_tm is_uvar1 t)) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> false))) - (fun uu___ -> - (fun uu___ -> - Obj.magic - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> true))) uu___))) uu___) -let rec (contains_uvar : - Pulse_Syntax_Base.term -> (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) - = - fun uu___ -> - (fun t -> - match t.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_Emp -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> false))) - | Pulse_Syntax_Base.Tm_VProp -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> false))) - | Pulse_Syntax_Base.Tm_Inames -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> false))) - | Pulse_Syntax_Base.Tm_EmpInames -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> false))) - | Pulse_Syntax_Base.Tm_Unknown -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> false))) - | Pulse_Syntax_Base.Tm_Pure p -> - Obj.magic (Obj.repr (contains_uvar p)) - | Pulse_Syntax_Base.Tm_Star (l, r) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (392)) (Prims.of_int (9)) - (Prims.of_int (392)) (Prims.of_int (24))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (392)) (Prims.of_int (6)) - (Prims.of_int (393)) (Prims.of_int (26))))) - (Obj.magic (contains_uvar l)) - (fun uu___ -> - (fun uu___ -> - if uu___ - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> true))) - else Obj.magic (Obj.repr (contains_uvar r))) uu___))) - | Pulse_Syntax_Base.Tm_ExistsSL (u, t1, body) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (396)) (Prims.of_int (9)) - (Prims.of_int (396)) (Prims.of_int (34))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (396)) (Prims.of_int (6)) - (Prims.of_int (397)) (Prims.of_int (29))))) - (Obj.magic (contains_uvar t1.Pulse_Syntax_Base.binder_ty)) - (fun uu___ -> - (fun uu___ -> - if uu___ - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> true))) - else Obj.magic (Obj.repr (contains_uvar body))) - uu___))) - | Pulse_Syntax_Base.Tm_ForallSL (u, t1, body) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (400)) (Prims.of_int (9)) - (Prims.of_int (400)) (Prims.of_int (34))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (400)) (Prims.of_int (6)) - (Prims.of_int (401)) (Prims.of_int (29))))) - (Obj.magic (contains_uvar t1.Pulse_Syntax_Base.binder_ty)) - (fun uu___ -> - (fun uu___ -> - if uu___ - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> true))) - else Obj.magic (Obj.repr (contains_uvar body))) - uu___))) - | Pulse_Syntax_Base.Tm_FStar t1 -> - Obj.magic (Obj.repr (contains_uvar_r t1))) uu___ -let (try_unify : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - (solution, unit) FStar_Tactics_Effect.tac_repr) - = fun g -> fun l -> fun r -> match_typ g l r [] -let (is_eq2 : - FStar_Reflection_Types.term -> - (FStar_Reflection_Types.term * FStar_Reflection_Types.term) - FStar_Pervasives_Native.option) - = - fun t -> - let uu___ = FStar_Reflection_V2_Derived.collect_app_ln t in - match uu___ with - | (head, args) -> - (match ((FStar_Reflection_V2_Builtins.inspect_ln head), args) with - | (FStar_Reflection_V2_Data.Tv_FVar fv, - uu___1::(a1, uu___2)::(a2, uu___3)::[]) -> - let l = FStar_Reflection_V2_Builtins.inspect_fv fv in - if - (l = ["Pulse"; "Steel"; "Wrapper"; "eq2_prop"]) || - (l = ["Prims"; "eq2"]) - then FStar_Pervasives_Native.Some (a1, a2) - else FStar_Pervasives_Native.None - | (FStar_Reflection_V2_Data.Tv_UInst (fv, uu___1), - uu___2::(a1, uu___3)::(a2, uu___4)::[]) -> - let l = FStar_Reflection_V2_Builtins.inspect_fv fv in - if - (l = ["Pulse"; "Steel"; "Wrapper"; "eq2_prop"]) || - (l = ["Prims"; "eq2"]) - then FStar_Pervasives_Native.Some (a1, a2) - else FStar_Pervasives_Native.None - | uu___1 -> FStar_Pervasives_Native.None) -let (try_solve_pure_equalities : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> (solution, unit) FStar_Tactics_Effect.tac_repr) - = - fun uu___1 -> - fun uu___ -> - (fun g -> - fun p -> - let rec aux sol t = - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (425)) (Prims.of_int (12)) - (Prims.of_int (425)) (Prims.of_int (27))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Inference.fst" - (Prims.of_int (425)) (Prims.of_int (30)) - (Prims.of_int (444)) (Prims.of_int (16))))) - (Obj.magic (apply_sol sol t)) - (fun uu___ -> - (fun t1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (426)) (Prims.of_int (12)) - (Prims.of_int (426)) (Prims.of_int (33))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (426)) (Prims.of_int (36)) - (Prims.of_int (444)) (Prims.of_int (16))))) - (Obj.magic - (FStar_Reflection_V2_Formula.term_as_formula' t1)) - (fun uu___ -> - (fun f -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (427)) - (Prims.of_int (34)) - (Prims.of_int (436)) - (Prims.of_int (14))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (426)) - (Prims.of_int (8)) - (Prims.of_int (426)) - (Prims.of_int (9))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - fun t0 -> - fun t11 -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (428)) - (Prims.of_int (22)) - (Prims.of_int (428)) - (Prims.of_int (40))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (428)) - (Prims.of_int (43)) - (Prims.of_int (436)) - (Prims.of_int (14))))) - (Obj.magic - (contains_uvar_r t0)) - (fun uu___1 -> - (fun contains0 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (429)) - (Prims.of_int (22)) - (Prims.of_int (429)) - (Prims.of_int (40))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (430)) - (Prims.of_int (9)) - (Prims.of_int (430)) - (Prims.of_int (31))))) - (Obj.magic - (contains_uvar_r - t11)) - (fun uu___1 -> - (fun contains1 - -> - if - contains0 - || - contains1 - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (433)) - (Prims.of_int (8)) - (Prims.of_int (434)) - (Prims.of_int (53))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (433)) - (Prims.of_int (8)) - (Prims.of_int (434)) - (Prims.of_int (59))))) - (Obj.magic - (try_unify - g - (Pulse_Syntax_Base.tm_fstar - t0 - FStar_Range.range_0) - (Pulse_Syntax_Base.tm_fstar - t11 - FStar_Range.range_0))) - (fun - uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___2 -> - FStar_List_Tot_Base.op_At - uu___1 - sol)))) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___2 -> - sol)))) - uu___1))) - uu___1))) - (fun uu___ -> - (fun handle_eq -> - match f with - | FStar_Reflection_V2_Formula.Comp - (FStar_Reflection_V2_Formula.Eq - uu___, t0, t11) - -> - Obj.magic - (Obj.repr (handle_eq t0 t11)) - | FStar_Reflection_V2_Formula.And - (t0, t11) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (440)) - (Prims.of_int (23)) - (Prims.of_int (440)) - (Prims.of_int (35))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Inference.fst" - (Prims.of_int (440)) - (Prims.of_int (19)) - (Prims.of_int (440)) - (Prims.of_int (38))))) - (Obj.magic - (aux sol t0)) - (fun uu___ -> - (fun uu___ -> - Obj.magic - (aux uu___ t11)) - uu___))) - | uu___ -> - Obj.magic - (Obj.repr - (match is_eq2 t1 with - | FStar_Pervasives_Native.Some - (t0, t11) -> - Obj.repr - (handle_eq t0 t11) - | uu___1 -> - Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - sol))))) - uu___))) uu___))) uu___) in - match p.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_FStar t -> Obj.magic (Obj.repr (aux [] t)) - | uu___ -> Obj.magic (Obj.repr [])) uu___1 uu___ \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Checker_IntroPure.ml b/src/ocaml/plugin/generated/Pulse_Checker_IntroPure.ml index 208a912a7..feab46013 100644 --- a/src/ocaml/plugin/generated/Pulse_Checker_IntroPure.ml +++ b/src/ocaml/plugin/generated/Pulse_Checker_IntroPure.ml @@ -11,31 +11,157 @@ let (check_prop : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.IntroPure.fst" - (Prims.of_int (13)) (Prims.of_int (28)) (Prims.of_int (13)) - (Prims.of_int (72))))) + (Prims.of_int (14)) (Prims.of_int (11)) (Prims.of_int (14)) + (Prims.of_int (12))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.IntroPure.fst" - (Prims.of_int (13)) (Prims.of_int (3)) (Prims.of_int (18)) - (Prims.of_int (40))))) - (Obj.magic - (Pulse_Checker_Pure.check_vprop g (Pulse_Syntax_Base.tm_pure p))) + (Prims.of_int (14)) (Prims.of_int (15)) (Prims.of_int (25)) + (Prims.of_int (30))))) + (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> p)) (fun uu___ -> - (fun uu___ -> - match uu___ with - | Prims.Mkdtuple2 (p1, p_typing) -> - (match p1.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_Pure pp -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> Prims.Mkdtuple2 (pp, ())))) - | uu___1 -> - Obj.magic - (Obj.repr - (Pulse_Typing_Env.fail g - FStar_Pervasives_Native.None "Unexpected prop")))) - uu___) + (fun p0 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.IntroPure.fst" + (Prims.of_int (15)) (Prims.of_int (26)) + (Prims.of_int (15)) (Prims.of_int (70))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.IntroPure.fst" + (Prims.of_int (14)) (Prims.of_int (15)) + (Prims.of_int (25)) (Prims.of_int (30))))) + (Obj.magic + (Pulse_Checker_Pure.check_vprop g + (Pulse_Syntax_Base.tm_pure p))) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | Prims.Mkdtuple2 (p1, p_typing) -> + (match p1.Pulse_Syntax_Base.t with + | Pulse_Syntax_Base.Tm_Pure pp -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + Prims.Mkdtuple2 (pp, ())))) + | uu___1 -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.IntroPure.fst" + (Prims.of_int (22)) + (Prims.of_int (6)) + (Prims.of_int (25)) + (Prims.of_int (30))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.IntroPure.fst" + (Prims.of_int (21)) + (Prims.of_int (4)) + (Prims.of_int (25)) + (Prims.of_int (30))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.IntroPure.fst" + (Prims.of_int (25)) + (Prims.of_int (9)) + (Prims.of_int (25)) + (Prims.of_int (29))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.IntroPure.fst" + (Prims.of_int (22)) + (Prims.of_int (6)) + (Prims.of_int (25)) + (Prims.of_int (30))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + p1)) + (fun uu___2 -> + (fun uu___2 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.IntroPure.fst" + (Prims.of_int (22)) + (Prims.of_int (6)) + (Prims.of_int (25)) + (Prims.of_int (30))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.IntroPure.fst" + (Prims.of_int (22)) + (Prims.of_int (6)) + (Prims.of_int (25)) + (Prims.of_int (30))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + ( + Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.IntroPure.fst" + (Prims.of_int (24)) + (Prims.of_int (9)) + (Prims.of_int (24)) + (Prims.of_int (40))))) + (FStar_Sealed.seal + ( + Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + ( + Pulse_Syntax_Printer.term_to_string + (Pulse_Syntax_Base.tm_pure + p0))) + (fun uu___3 + -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + fun x -> + Prims.strcat + (Prims.strcat + "Impossible: check_intro_pure: checking a pure vprop " + (Prims.strcat + uu___3 + " returned a non-pure vprop ")) + (Prims.strcat + x + ",please file a bug-report"))))) + (fun uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___4 + -> + uu___3 + uu___2)))) + uu___2))) + (fun uu___2 -> + (fun uu___2 -> + Obj.magic + (Pulse_Typing_Env.fail g + FStar_Pervasives_Native.None + uu___2)) uu___2))))) + uu___))) uu___) let (check_prop_validity : Pulse_Typing_Env.env -> Pulse_Syntax_Base.term -> @@ -45,212 +171,182 @@ let (check_prop_validity : = fun g -> fun p -> fun typing -> Pulse_Checker_Pure.check_prop_validity g p () -let (check_intro_pure : +let (check : Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.term -> - unit -> - unit Pulse_Typing.post_hint_opt -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, - unit) FStar_Tactics_Effect.tac_repr) + Pulse_Syntax_Base.term -> + unit -> + unit Pulse_Typing.post_hint_opt -> + Pulse_Syntax_Base.ppname -> + Pulse_Syntax_Base.st_term -> + ((unit, unit, unit) Pulse_Checker_Base.checker_result_t, + unit) FStar_Tactics_Effect.tac_repr) = fun g -> - fun t -> - fun pre -> - fun pre_typing -> - fun post_hint -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.IntroPure.fst" - (Prims.of_int (30)) (Prims.of_int (43)) - (Prims.of_int (30)) (Prims.of_int (49))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.IntroPure.fst" - (Prims.of_int (30)) (Prims.of_int (3)) - (Prims.of_int (39)) (Prims.of_int (57))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> t.Pulse_Syntax_Base.term1)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | Pulse_Syntax_Base.Tm_IntroPure - { Pulse_Syntax_Base.p = p; - Pulse_Syntax_Base.should_check = should_check;_} - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.IntroPure.fst" - (Prims.of_int (32)) (Prims.of_int (8)) - (Prims.of_int (35)) (Prims.of_int (30))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.IntroPure.fst" - (Prims.of_int (30)) (Prims.of_int (52)) - (Prims.of_int (39)) (Prims.of_int (57))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.IntroPure.fst" - (Prims.of_int (32)) - (Prims.of_int (11)) - (Prims.of_int (32)) - (Prims.of_int (32))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.IntroPure.fst" - (Prims.of_int (32)) - (Prims.of_int (8)) - (Prims.of_int (35)) - (Prims.of_int (30))))) - (Obj.magic - (FStar_Tactics_Unseal.unseal - should_check)) - (fun uu___1 -> - (fun uu___1 -> - if uu___1 - then Obj.magic (check_prop g p) - else - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.IntroPure.fst" - (Prims.of_int (34)) - (Prims.of_int (24)) - (Prims.of_int (34)) - (Prims.of_int (73))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.IntroPure.fst" - (Prims.of_int (34)) - (Prims.of_int (12)) - (Prims.of_int (35)) - (Prims.of_int (30))))) - (Obj.magic - (Pulse_Checker_Pure.instantiate_term_implicits - g p)) - (fun uu___3 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___4 -> - match uu___3 with - | (p1, uu___5) -> - Prims.Mkdtuple2 - (p1, ()))))) - uu___1))) - (fun uu___1 -> - (fun uu___1 -> - match uu___1 with - | Prims.Mkdtuple2 (p1, p_typing) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.IntroPure.fst" - (Prims.of_int (37)) - (Prims.of_int (13)) - (Prims.of_int (37)) - (Prims.of_int (45))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.IntroPure.fst" - (Prims.of_int (37)) - (Prims.of_int (48)) - (Prims.of_int (39)) - (Prims.of_int (57))))) - (Obj.magic - (check_prop_validity g p1 ())) - (fun uu___2 -> - (fun pv -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.IntroPure.fst" - (Prims.of_int (38)) - (Prims.of_int (20)) - (Prims.of_int (38)) - (Prims.of_int (47))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.IntroPure.fst" - (Prims.of_int (39)) - (Prims.of_int (4)) - (Prims.of_int (39)) - (Prims.of_int (57))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - Pulse_Typing.T_IntroPure - (g, p1, (), - pv))) - (fun uu___2 -> - (fun st_typing -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal + fun pre -> + fun pre_typing -> + fun post_hint -> + fun res_ppname -> + fun t -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.IntroPure.fst" + (Prims.of_int (40)) (Prims.of_int (10)) + (Prims.of_int (40)) (Prims.of_int (68))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.IntroPure.fst" + (Prims.of_int (40)) (Prims.of_int (71)) + (Prims.of_int (46)) (Prims.of_int (83))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing_Env.push_context g "check_intro_pure" + t.Pulse_Syntax_Base.range2)) + (fun uu___ -> + (fun g1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.IntroPure.fst" + (Prims.of_int (42)) (Prims.of_int (27)) + (Prims.of_int (42)) (Prims.of_int (33))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.IntroPure.fst" + (Prims.of_int (40)) (Prims.of_int (71)) + (Prims.of_int (46)) (Prims.of_int (83))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> t.Pulse_Syntax_Base.term1)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | Pulse_Syntax_Base.Tm_IntroPure + { Pulse_Syntax_Base.p = p;_} -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.IntroPure.fst" + (Prims.of_int (43)) + (Prims.of_int (26)) + (Prims.of_int (43)) + (Prims.of_int (40))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.IntroPure.fst" + (Prims.of_int (42)) + (Prims.of_int (36)) + (Prims.of_int (46)) + (Prims.of_int (83))))) + (Obj.magic (check_prop g1 p)) + (fun uu___1 -> + (fun uu___1 -> + match uu___1 with + | Prims.Mkdtuple2 + (p1, p_typing) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.IntroPure.fst" + (Prims.of_int (44)) + (Prims.of_int (11)) + (Prims.of_int (44)) + (Prims.of_int (43))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.IntroPure.fst" + (Prims.of_int (44)) + (Prims.of_int (46)) + (Prims.of_int (46)) + (Prims.of_int (83))))) + (Obj.magic + (check_prop_validity + g1 p1 ())) + (fun uu___2 -> + (fun pv -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + ( + FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.IntroPure.fst" + (Prims.of_int (45)) + (Prims.of_int (18)) + (Prims.of_int (45)) + (Prims.of_int (45))))) + ( + FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.IntroPure.fst" + (Prims.of_int (46)) + (Prims.of_int (2)) + (Prims.of_int (46)) + (Prims.of_int (83))))) + ( + FStar_Tactics_Effect.lift_div_tac + (fun + uu___2 -> + Pulse_Typing.T_IntroPure + (g1, p1, + (), pv))) + ( + fun + uu___2 -> + (fun + st_typing + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.IntroPure.fst" - (Prims.of_int (39)) - (Prims.of_int (11)) - (Prims.of_int (39)) - (Prims.of_int (47))))) - (FStar_Sealed.seal + (Prims.of_int (46)) + (Prims.of_int (18)) + (Prims.of_int (46)) + (Prims.of_int (65))))) + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.IntroPure.fst" - (Prims.of_int (39)) - (Prims.of_int (4)) - (Prims.of_int (39)) - (Prims.of_int (57))))) - (Obj.magic - (Pulse_Checker_Common.try_frame_pre - g + (Prims.of_int (46)) + (Prims.of_int (2)) + (Prims.of_int (46)) + (Prims.of_int (83))))) + (Obj.magic + (Pulse_Checker_Prover.try_frame_pre + g pre () (Pulse_Typing.wr (Pulse_Syntax_Base.Tm_IntroPure { Pulse_Syntax_Base.p - = p1; - Pulse_Syntax_Base.should_check - = - Pulse_Syntax_Base.should_check_true - })) pre - () + = p1 + })) (Pulse_Typing.comp_intro_pure p1) - st_typing)) - (fun uu___2 - -> + st_typing + res_ppname)) + (fun + uu___2 -> (fun uu___2 -> Obj.magic - (Pulse_Checker_Common.repack + (Pulse_Checker_Prover.prove_post_hint g pre - (Pulse_Typing.wr - (Pulse_Syntax_Base.Tm_IntroPure - { - Pulse_Syntax_Base.p - = p1; - Pulse_Syntax_Base.should_check - = - Pulse_Syntax_Base.should_check_true - })) uu___2 - post_hint)) + post_hint + t.Pulse_Syntax_Base.range2)) + uu___2))) uu___2))) - uu___2))) uu___2))) - uu___1))) uu___) \ No newline at end of file + uu___2))) + uu___1))) uu___))) uu___) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Checker_Match.ml b/src/ocaml/plugin/generated/Pulse_Checker_Match.ml index 177c62aca..ce9f2e8bc 100644 --- a/src/ocaml/plugin/generated/Pulse_Checker_Match.ml +++ b/src/ocaml/plugin/generated/Pulse_Checker_Match.ml @@ -89,27 +89,27 @@ let rec (r_bindings_to_string : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (187)) (Prims.of_int (4)) - (Prims.of_int (187)) (Prims.of_int (90))))) + (Prims.of_int (188)) (Prims.of_int (4)) + (Prims.of_int (188)) (Prims.of_int (90))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (187)) (Prims.of_int (4)) - (Prims.of_int (187)) (Prims.of_int (116))))) + (Prims.of_int (188)) (Prims.of_int (4)) + (Prims.of_int (188)) (Prims.of_int (116))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (187)) (Prims.of_int (5)) - (Prims.of_int (187)) (Prims.of_int (22))))) + (Prims.of_int (188)) (Prims.of_int (5)) + (Prims.of_int (188)) (Prims.of_int (22))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (187)) (Prims.of_int (4)) - (Prims.of_int (187)) (Prims.of_int (90))))) + (Prims.of_int (188)) (Prims.of_int (4)) + (Prims.of_int (188)) (Prims.of_int (90))))) (Obj.magic (FStar_Tactics_Unseal.unseal b.FStar_Reflection_V2_Data.ppname3)) @@ -121,9 +121,9 @@ let rec (r_bindings_to_string : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (187)) + (Prims.of_int (188)) (Prims.of_int (25)) - (Prims.of_int (187)) + (Prims.of_int (188)) (Prims.of_int (89))))) (FStar_Sealed.seal (Obj.magic @@ -138,9 +138,9 @@ let rec (r_bindings_to_string : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (187)) + (Prims.of_int (188)) (Prims.of_int (31)) - (Prims.of_int (187)) + (Prims.of_int (188)) (Prims.of_int (89))))) (FStar_Sealed.seal (Obj.magic @@ -156,9 +156,9 @@ let rec (r_bindings_to_string : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (187)) + (Prims.of_int (188)) (Prims.of_int (54)) - (Prims.of_int (187)) + (Prims.of_int (188)) (Prims.of_int (89))))) (FStar_Sealed.seal (Obj.magic @@ -174,9 +174,9 @@ let rec (r_bindings_to_string : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (187)) + (Prims.of_int (188)) (Prims.of_int (60)) - (Prims.of_int (187)) + (Prims.of_int (188)) (Prims.of_int (89))))) (FStar_Sealed.seal (Obj.magic @@ -192,9 +192,9 @@ let rec (r_bindings_to_string : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (187)) + (Prims.of_int (188)) (Prims.of_int (60)) - (Prims.of_int (187)) + (Prims.of_int (188)) (Prims.of_int (83))))) (FStar_Sealed.seal (Obj.magic @@ -243,9 +243,9 @@ let rec (r_bindings_to_string : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (187)) + (Prims.of_int (188)) (Prims.of_int (93)) - (Prims.of_int (187)) + (Prims.of_int (188)) (Prims.of_int (116))))) (FStar_Sealed.seal (Obj.magic @@ -276,21 +276,21 @@ let rec (bindings_to_string : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (193)) (Prims.of_int (4)) - (Prims.of_int (193)) (Prims.of_int (85))))) + (Prims.of_int (194)) (Prims.of_int (4)) + (Prims.of_int (194)) (Prims.of_int (85))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (193)) (Prims.of_int (4)) - (Prims.of_int (193)) (Prims.of_int (109))))) + (Prims.of_int (194)) (Prims.of_int (4)) + (Prims.of_int (194)) (Prims.of_int (109))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (193)) (Prims.of_int (29)) - (Prims.of_int (193)) (Prims.of_int (84))))) + (Prims.of_int (194)) (Prims.of_int (29)) + (Prims.of_int (194)) (Prims.of_int (84))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "prims.fst" @@ -302,9 +302,9 @@ let rec (bindings_to_string : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (193)) + (Prims.of_int (194)) (Prims.of_int (35)) - (Prims.of_int (193)) + (Prims.of_int (194)) (Prims.of_int (84))))) (FStar_Sealed.seal (Obj.magic @@ -319,9 +319,9 @@ let rec (bindings_to_string : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (193)) + (Prims.of_int (194)) (Prims.of_int (35)) - (Prims.of_int (193)) + (Prims.of_int (194)) (Prims.of_int (78))))) (FStar_Sealed.seal (Obj.magic @@ -354,9 +354,9 @@ let rec (bindings_to_string : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (193)) + (Prims.of_int (194)) (Prims.of_int (88)) - (Prims.of_int (193)) + (Prims.of_int (194)) (Prims.of_int (109))))) (FStar_Sealed.seal (Obj.magic @@ -375,7 +375,7 @@ let (check_branch : Pulse_Syntax_Base.term -> unit -> unit Pulse_Typing.post_hint_for_env -> - Pulse_Checker_Common.check_t -> + Pulse_Checker_Base.check_t -> Pulse_Syntax_Base.universe -> Pulse_Syntax_Base.typ -> Pulse_Syntax_Base.term -> @@ -406,14 +406,14 @@ let (check_branch : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (214)) (Prims.of_int (10)) - (Prims.of_int (215)) (Prims.of_int (48))))) + (Prims.of_int (215)) (Prims.of_int (10)) + (Prims.of_int (216)) (Prims.of_int (48))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (217)) (Prims.of_int (27)) - (Prims.of_int (238)) (Prims.of_int (58))))) + (Prims.of_int (218)) (Prims.of_int (27)) + (Prims.of_int (241)) (Prims.of_int (58))))) (match readback_pat p0 with | FStar_Pervasives_Native.Some p -> Obj.magic @@ -435,17 +435,17 @@ let (check_branch : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (218)) + (Prims.of_int (219)) (Prims.of_int (17)) - (Prims.of_int (218)) + (Prims.of_int (219)) (Prims.of_int (42))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (220)) + (Prims.of_int (221)) (Prims.of_int (54)) - (Prims.of_int (238)) + (Prims.of_int (241)) (Prims.of_int (58))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> @@ -459,17 +459,17 @@ let (check_branch : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (221)) + (Prims.of_int (222)) (Prims.of_int (11)) - (Prims.of_int (221)) + (Prims.of_int (222)) (Prims.of_int (35))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (221)) + (Prims.of_int (222)) (Prims.of_int (38)) - (Prims.of_int (238)) + (Prims.of_int (241)) (Prims.of_int (58))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> @@ -483,17 +483,17 @@ let (check_branch : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (222)) + (Prims.of_int (223)) (Prims.of_int (16)) - (Prims.of_int (222)) + (Prims.of_int (223)) (Prims.of_int (24))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (222)) + (Prims.of_int (223)) (Prims.of_int (27)) - (Prims.of_int (238)) + (Prims.of_int (241)) (Prims.of_int (58))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> @@ -507,17 +507,17 @@ let (check_branch : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (223)) + (Prims.of_int (224)) (Prims.of_int (15)) - (Prims.of_int (223)) + (Prims.of_int (224)) (Prims.of_int (37))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (224)) + (Prims.of_int (225)) (Prims.of_int (2)) - (Prims.of_int (238)) + (Prims.of_int (241)) (Prims.of_int (58))))) (FStar_Tactics_Effect.lift_div_tac (fun @@ -534,17 +534,17 @@ let (check_branch : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (224)) - (Prims.of_int (2)) (Prims.of_int (225)) + (Prims.of_int (2)) + (Prims.of_int (226)) (Prims.of_int (60))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (226)) + (Prims.of_int (227)) (Prims.of_int (2)) - (Prims.of_int (238)) + (Prims.of_int (241)) (Prims.of_int (58))))) (if Prims.op_Negation @@ -575,17 +575,17 @@ let (check_branch : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (226)) - (Prims.of_int (2)) (Prims.of_int (227)) + (Prims.of_int (2)) + (Prims.of_int (228)) (Prims.of_int (79))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" (Prims.of_int (228)) - (Prims.of_int (2)) - (Prims.of_int (238)) + (Prims.of_int (80)) + (Prims.of_int (241)) (Prims.of_int (58))))) (if FStar_Reflection_V2_Data.uu___is_Tv_Unknown @@ -618,100 +618,21 @@ let (check_branch : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (228)) - (Prims.of_int (2)) - (Prims.of_int (228)) - (Prims.of_int (77))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Match.fst" - (Prims.of_int (228)) - (Prims.of_int (78)) - (Prims.of_int (238)) - (Prims.of_int (58))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Match.fst" - (Prims.of_int (228)) - (Prims.of_int (10)) - (Prims.of_int (228)) - (Prims.of_int (77))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Match.fst" - (Prims.of_int (228)) - (Prims.of_int (2)) - (Prims.of_int (228)) - (Prims.of_int (77))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Match.fst" - (Prims.of_int (228)) - (Prims.of_int (37)) - (Prims.of_int (228)) - (Prims.of_int (76))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "prims.fst" - (Prims.of_int (590)) - (Prims.of_int (19)) - (Prims.of_int (590)) - (Prims.of_int (31))))) - (Obj.magic - (FStar_Tactics_V2_Builtins.term_to_string - (FStar_Pervasives_Native.fst - (FStar_Pervasives_Native.__proj__Some__item__v - elab_p)))) - (fun - uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - Prims.strcat - "Elaborated pattern = " - uu___2)))) - (fun - uu___2 -> - (fun - uu___2 -> - Obj.magic - (FStar_Tactics_V2_Builtins.print - uu___2)) - uu___2))) - (fun - uu___2 -> - (fun - uu___2 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Match.fst" - (Prims.of_int (229)) + (Prims.of_int (230)) (Prims.of_int (15)) - (Prims.of_int (229)) + (Prims.of_int (230)) (Prims.of_int (86))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (229)) + (Prims.of_int (230)) (Prims.of_int (89)) - (Prims.of_int (238)) + (Prims.of_int (241)) (Prims.of_int (58))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___3 -> + uu___2 -> Pulse_Typing.mk_sq_eq2 sc_u sc_ty sc @@ -721,7 +642,7 @@ let (check_branch : elab_p)) FStar_Range.range_0))) (fun - uu___3 -> + uu___2 -> (fun eq_typ -> Obj.magic @@ -730,21 +651,21 @@ let (check_branch : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (230)) + (Prims.of_int (231)) (Prims.of_int (11)) - (Prims.of_int (230)) + (Prims.of_int (231)) (Prims.of_int (106))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (230)) + (Prims.of_int (231)) (Prims.of_int (109)) - (Prims.of_int (238)) + (Prims.of_int (241)) (Prims.of_int (58))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___3 -> + uu___2 -> Pulse_Typing_Env.push_binding g' hyp_var @@ -758,7 +679,7 @@ let (check_branch : FStar_Range.range_0 } eq_typ)) (fun - uu___3 -> + uu___2 -> (fun g'1 -> Obj.magic @@ -767,24 +688,24 @@ let (check_branch : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (231)) + (Prims.of_int (232)) (Prims.of_int (10)) - (Prims.of_int (231)) + (Prims.of_int (232)) (Prims.of_int (36))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (231)) + (Prims.of_int (232)) (Prims.of_int (39)) - (Prims.of_int (238)) + (Prims.of_int (241)) (Prims.of_int (58))))) (Obj.magic (open_st_term_bs e pulse_bs)) (fun - uu___3 -> + uu___2 -> (fun e1 -> Obj.magic @@ -793,24 +714,24 @@ let (check_branch : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (232)) + (Prims.of_int (233)) (Prims.of_int (19)) - (Prims.of_int (232)) + (Prims.of_int (233)) (Prims.of_int (61))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (232)) + (Prims.of_int (233)) (Prims.of_int (64)) - (Prims.of_int (238)) + (Prims.of_int (241)) (Prims.of_int (58))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___3 -> + uu___2 -> ())) (fun - uu___3 -> + uu___2 -> (fun pre_typing1 -> @@ -820,24 +741,24 @@ let (check_branch : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (233)) + (Prims.of_int (234)) (Prims.of_int (19)) - (Prims.of_int (233)) - (Prims.of_int (89))))) + (Prims.of_int (234)) + (Prims.of_int (96))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (233)) - (Prims.of_int (92)) - (Prims.of_int (238)) + (Prims.of_int (234)) + (Prims.of_int (99)) + (Prims.of_int (241)) (Prims.of_int (58))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___3 -> + uu___2 -> ())) (fun - uu___3 -> + uu___2 -> (fun pre_typing2 -> @@ -847,76 +768,91 @@ let (check_branch : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (234)) - (Prims.of_int (24)) - (Prims.of_int (234)) - (Prims.of_int (66))))) + (Prims.of_int (236)) + (Prims.of_int (23)) + (Prims.of_int (239)) + (Prims.of_int (35))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (233)) - (Prims.of_int (92)) - (Prims.of_int (238)) + (Prims.of_int (234)) + (Prims.of_int (99)) + (Prims.of_int (241)) (Prims.of_int (58))))) (Obj.magic - (check - g'1 e1 - pre () - (FStar_Pervasives_Native.Some - post_hint))) + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Match.fst" + (Prims.of_int (237)) + (Prims.of_int (17)) + (Prims.of_int (237)) + (Prims.of_int (41))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Match.fst" + (Prims.of_int (237)) + (Prims.of_int (44)) + (Prims.of_int (239)) + (Prims.of_int (35))))) + (FStar_Tactics_Effect.lift_div_tac (fun - uu___3 -> + uu___2 -> + Pulse_Syntax_Base.mk_ppname_no_range + "_br")) (fun - uu___3 -> - match uu___3 - with - | - FStar_Pervasives.Mkdtuple3 - (e2, c, - e_d) -> + uu___2 -> + (fun + ppname -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (235)) - (Prims.of_int (2)) - (Prims.of_int (236)) - (Prims.of_int (62))))) + (Prims.of_int (238)) + (Prims.of_int (12)) + (Prims.of_int (238)) + (Prims.of_int (61))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (238)) - (Prims.of_int (2)) - (Prims.of_int (238)) - (Prims.of_int (58))))) - (if - Prims.op_Negation - (Pulse_Syntax_Base.stateful_comp - c) - then - Obj.magic - (Obj.repr - (Pulse_Typing_Env.fail - g + (Prims.of_int (239)) + (Prims.of_int (4)) + (Prims.of_int (239)) + (Prims.of_int (35))))) + (Obj.magic + (check + g'1 pre + () (FStar_Pervasives_Native.Some - (e2.Pulse_Syntax_Base.range2)) - "Branch computation is not stateful")) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac + post_hint) + ppname e1)) (fun - uu___5 -> - ())))) + uu___2 -> + (fun r -> + Obj.magic + (Pulse_Checker_Base.apply_checker_result_k + g'1 pre + post_hint + r ppname)) + uu___2))) + uu___2))) (fun - uu___4 -> + uu___2 -> FStar_Tactics_Effect.lift_div_tac (fun - uu___5 -> + uu___3 -> + match uu___2 + with + | + FStar_Pervasives.Mkdtuple3 + (e2, c, + e_d) -> FStar_Pervasives.Mkdtuple4 (p, (Pulse_Syntax_Naming.close_st_term_n @@ -934,12 +870,10 @@ let (check_branch : (), hyp_var, e_d))))))) - uu___3))) - uu___3))) - uu___3))) - uu___3))) - uu___3))) - uu___3))) + uu___2))) + uu___2))) + uu___2))) + uu___2))) uu___2))) uu___1))) uu___))) @@ -951,7 +885,7 @@ let (check_branches : Pulse_Syntax_Base.term -> unit -> unit Pulse_Typing.post_hint_for_env -> - Pulse_Checker_Common.check_t -> + Pulse_Checker_Base.check_t -> Pulse_Syntax_Base.universe -> Pulse_Syntax_Base.typ -> Pulse_Syntax_Base.term -> @@ -980,13 +914,13 @@ let (check_branches : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (254)) (Prims.of_int (2)) - (Prims.of_int (254)) (Prims.of_int (50))))) + (Prims.of_int (257)) (Prims.of_int (2)) + (Prims.of_int (257)) (Prims.of_int (50))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (254)) (Prims.of_int (51)) - (Prims.of_int (287)) (Prims.of_int (18))))) + (Prims.of_int (257)) (Prims.of_int (51)) + (Prims.of_int (290)) (Prims.of_int (18))))) (if FStar_List_Tot_Base.isEmpty brs0 then Obj.magic @@ -1006,17 +940,17 @@ let (check_branches : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (255)) + (Prims.of_int (258)) (Prims.of_int (22)) - (Prims.of_int (255)) + (Prims.of_int (258)) (Prims.of_int (26))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (254)) + (Prims.of_int (257)) (Prims.of_int (51)) - (Prims.of_int (287)) + (Prims.of_int (290)) (Prims.of_int (18))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___1 -> brs0)) @@ -1030,17 +964,17 @@ let (check_branches : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (256)) + (Prims.of_int (259)) (Prims.of_int (26)) - (Prims.of_int (256)) + (Prims.of_int (259)) (Prims.of_int (30))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (255)) + (Prims.of_int (258)) (Prims.of_int (29)) - (Prims.of_int (287)) + (Prims.of_int (290)) (Prims.of_int (18))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___3 -> bnds)) @@ -1056,18 +990,18 @@ let (check_branches : Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (257)) + (Prims.of_int (260)) (Prims.of_int (29)) - (Prims.of_int (257)) + (Prims.of_int (260)) (Prims.of_int (100))))) (FStar_Sealed.seal ( Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (256)) + (Prims.of_int (259)) (Prims.of_int (33)) - (Prims.of_int (287)) + (Prims.of_int (290)) (Prims.of_int (18))))) (Obj.magic ( @@ -1096,17 +1030,17 @@ let (check_branches : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (260)) + (Prims.of_int (263)) (Prims.of_int (3)) - (Prims.of_int (272)) + (Prims.of_int (275)) (Prims.of_int (5))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (287)) + (Prims.of_int (290)) (Prims.of_int (2)) - (Prims.of_int (287)) + (Prims.of_int (290)) (Prims.of_int (18))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -1114,17 +1048,17 @@ let (check_branches : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (263)) + (Prims.of_int (266)) (Prims.of_int (5)) - (Prims.of_int (268)) + (Prims.of_int (271)) (Prims.of_int (20))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (269)) - (Prims.of_int (6)) (Prims.of_int (272)) + (Prims.of_int (6)) + (Prims.of_int (275)) (Prims.of_int (5))))) (FStar_Tactics_Effect.lift_div_tac (fun @@ -1137,17 +1071,17 @@ let (check_branches : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (264)) + (Prims.of_int (267)) (Prims.of_int (19)) - (Prims.of_int (264)) + (Prims.of_int (267)) (Prims.of_int (20))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (263)) + (Prims.of_int (266)) (Prims.of_int (5)) - (Prims.of_int (268)) + (Prims.of_int (271)) (Prims.of_int (20))))) (FStar_Tactics_Effect.lift_div_tac (fun @@ -1168,17 +1102,17 @@ let (check_branches : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (265)) + (Prims.of_int (268)) (Prims.of_int (20)) - (Prims.of_int (265)) + (Prims.of_int (268)) (Prims.of_int (23))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (264)) + (Prims.of_int (267)) (Prims.of_int (23)) - (Prims.of_int (268)) + (Prims.of_int (271)) (Prims.of_int (20))))) (FStar_Tactics_Effect.lift_div_tac (fun @@ -1199,17 +1133,17 @@ let (check_branches : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (266)) + (Prims.of_int (269)) (Prims.of_int (29)) - (Prims.of_int (266)) + (Prims.of_int (269)) (Prims.of_int (95))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (265)) - (Prims.of_int (26)) (Prims.of_int (268)) + (Prims.of_int (26)) + (Prims.of_int (271)) (Prims.of_int (20))))) (Obj.magic (check_branch @@ -1246,17 +1180,17 @@ let (check_branches : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (270)) + (Prims.of_int (273)) (Prims.of_int (12)) - (Prims.of_int (270)) + (Prims.of_int (273)) (Prims.of_int (33))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (270)) + (Prims.of_int (273)) (Prims.of_int (8)) - (Prims.of_int (270)) + (Prims.of_int (273)) (Prims.of_int (9))))) (Obj.magic (Pulse_Common.zipWith @@ -1303,133 +1237,164 @@ let (check_branches : uu___4))) uu___3))) uu___1))) uu___) -let (check_match : +let (check : Pulse_Typing_Env.env -> Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.branch Prims.list -> - Pulse_Syntax_Base.term -> - unit -> - unit Pulse_Typing.post_hint_for_env -> - Pulse_Checker_Common.check_t -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, - unit) FStar_Tactics_Effect.tac_repr) + unit -> + unit Pulse_Typing.post_hint_for_env -> + Pulse_Syntax_Base.ppname -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.branch Prims.list -> + Pulse_Checker_Base.check_t -> + ((unit, unit, unit) Pulse_Checker_Base.checker_result_t, + unit) FStar_Tactics_Effect.tac_repr) = fun g -> - fun sc -> - fun brs -> - fun pre -> - fun pre_typing -> - fun post_hint -> - fun check -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (299)) (Prims.of_int (17)) - (Prims.of_int (299)) (Prims.of_int (25))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (299)) (Prims.of_int (28)) - (Prims.of_int (346)) (Prims.of_int (81))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> sc.Pulse_Syntax_Base.range1)) - (fun uu___ -> - (fun sc_range -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Match.fst" - (Prims.of_int (300)) - (Prims.of_int (17)) - (Prims.of_int (300)) - (Prims.of_int (20))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Match.fst" - (Prims.of_int (300)) - (Prims.of_int (23)) - (Prims.of_int (346)) - (Prims.of_int (81))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> brs)) - (fun uu___ -> - (fun orig_brs -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Match.fst" - (Prims.of_int (301)) - (Prims.of_int (12)) - (Prims.of_int (301)) - (Prims.of_int (24))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Match.fst" - (Prims.of_int (301)) - (Prims.of_int (27)) - (Prims.of_int (346)) - (Prims.of_int (81))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - FStar_List_Tot_Base.length brs)) - (fun uu___ -> - (fun nbr -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Match.fst" - (Prims.of_int (303)) - (Prims.of_int (55)) - (Prims.of_int (303)) - (Prims.of_int (79))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Match.fst" - (Prims.of_int (301)) - (Prims.of_int (27)) - (Prims.of_int (346)) - (Prims.of_int (81))))) - (Obj.magic - (Pulse_Checker_Pure.check_term_and_type - g sc)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | FStar_Pervasives.Mkdtuple5 - (sc1, sc_u, - sc_ty, - sc_ty_typing, - sc_typing) - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal + fun pre -> + fun pre_typing -> + fun post_hint -> + fun res_ppname -> + fun sc -> + fun brs -> + fun check1 -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Match.fst" + (Prims.of_int (304)) (Prims.of_int (10)) + (Prims.of_int (304)) (Prims.of_int (64))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Match.fst" + (Prims.of_int (304)) (Prims.of_int (67)) + (Prims.of_int (352)) (Prims.of_int (55))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing_Env.push_context_no_range g + "check_match")) + (fun uu___ -> + (fun g1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Match.fst" + (Prims.of_int (306)) + (Prims.of_int (17)) + (Prims.of_int (306)) + (Prims.of_int (25))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Match.fst" + (Prims.of_int (306)) + (Prims.of_int (28)) + (Prims.of_int (352)) + (Prims.of_int (55))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> sc.Pulse_Syntax_Base.range1)) + (fun uu___ -> + (fun sc_range -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Match.fst" + (Prims.of_int (307)) + (Prims.of_int (17)) + (Prims.of_int (307)) + (Prims.of_int (20))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Match.fst" + (Prims.of_int (307)) + (Prims.of_int (23)) + (Prims.of_int (352)) + (Prims.of_int (55))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> brs)) + (fun uu___ -> + (fun orig_brs -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Match.fst" + (Prims.of_int (308)) + (Prims.of_int (12)) + (Prims.of_int (308)) + (Prims.of_int (24))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Match.fst" + (Prims.of_int (308)) + (Prims.of_int (27)) + (Prims.of_int (352)) + (Prims.of_int (55))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + FStar_List_Tot_Base.length + brs)) + (fun uu___ -> + (fun nbr -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Match.fst" + (Prims.of_int (310)) + (Prims.of_int (55)) + (Prims.of_int (310)) + (Prims.of_int (79))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Match.fst" + (Prims.of_int (308)) + (Prims.of_int (27)) + (Prims.of_int (352)) + (Prims.of_int (55))))) + (Obj.magic + (Pulse_Checker_Pure.check_term_and_type + g1 sc)) + (fun uu___ -> + (fun uu___ + -> + match uu___ + with + | + FStar_Pervasives.Mkdtuple5 + (sc1, + sc_u, + sc_ty, + sc_ty_typing, + sc_typing) + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (304)) + (Prims.of_int (311)) (Prims.of_int (18)) - (Prims.of_int (304)) + (Prims.of_int (311)) (Prims.of_int (48))))) - (FStar_Sealed.seal + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (309)) + (Prims.of_int (316)) (Prims.of_int (4)) - (Prims.of_int (346)) - (Prims.of_int (81))))) - (FStar_Tactics_Effect.lift_div_tac + (Prims.of_int (352)) + (Prims.of_int (55))))) + (FStar_Tactics_Effect.lift_div_tac (fun uu___1 -> FStar_List_Tot_Base.map @@ -1437,8 +1402,8 @@ let (check_match : (FStar_List_Tot_Base.map FStar_Pervasives_Native.fst brs))) - (fun uu___1 - -> + (fun + uu___1 -> (fun elab_pats -> @@ -1448,40 +1413,40 @@ let (check_match : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (316)) + (Prims.of_int (323)) (Prims.of_int (4)) - (Prims.of_int (319)) + (Prims.of_int (326)) (Prims.of_int (75))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (309)) + (Prims.of_int (316)) (Prims.of_int (4)) - (Prims.of_int (346)) - (Prims.of_int (81))))) + (Prims.of_int (352)) + (Prims.of_int (55))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (316)) + (Prims.of_int (323)) (Prims.of_int (10)) - (Prims.of_int (316)) + (Prims.of_int (323)) (Prims.of_int (88))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (316)) + (Prims.of_int (323)) (Prims.of_int (4)) - (Prims.of_int (319)) + (Prims.of_int (326)) (Prims.of_int (75))))) (Obj.magic (FStar_Tactics_V2_Builtins.check_match_complete (Pulse_Typing.elab_env - g) + g1) (Pulse_Elaborate_Pure.elab_term sc1) (Pulse_Elaborate_Pure.elab_term @@ -1499,7 +1464,7 @@ let (check_match : Obj.magic (Obj.repr (Pulse_Typing_Env.fail - g + g1 (FStar_Pervasives_Native.Some sc_range) "Could not check that match is correct/complete")) @@ -1516,13 +1481,13 @@ let (check_match : (elab_pats', bnds, (Pulse_Typing.PC_Elab - (g, sc1, + (g1, sc1, sc_ty, elab_pats', bnds, (FStar_Reflection_Typing.MC_Tok ((Pulse_Typing.elab_env - g), + g1), (Pulse_Elaborate_Pure.elab_term sc1), (Pulse_Elaborate_Pure.elab_term @@ -1548,18 +1513,18 @@ let (check_match : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (320)) + (Prims.of_int (327)) (Prims.of_int (4)) - (Prims.of_int (346)) - (Prims.of_int (81))))) + (Prims.of_int (352)) + (Prims.of_int (55))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (320)) + (Prims.of_int (327)) (Prims.of_int (4)) - (Prims.of_int (346)) - (Prims.of_int (81))))) + (Prims.of_int (352)) + (Prims.of_int (55))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___2 -> @@ -1574,18 +1539,18 @@ let (check_match : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (321)) + (Prims.of_int (328)) (Prims.of_int (17)) - (Prims.of_int (321)) + (Prims.of_int (328)) (Prims.of_int (48))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (322)) + (Prims.of_int (329)) (Prims.of_int (2)) - (Prims.of_int (346)) - (Prims.of_int (81))))) + (Prims.of_int (352)) + (Prims.of_int (55))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___3 -> @@ -1603,18 +1568,18 @@ let (check_match : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (322)) + (Prims.of_int (329)) (Prims.of_int (2)) - (Prims.of_int (323)) + (Prims.of_int (330)) (Prims.of_int (60))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (323)) + (Prims.of_int (330)) (Prims.of_int (61)) - (Prims.of_int (346)) - (Prims.of_int (81))))) + (Prims.of_int (352)) + (Prims.of_int (55))))) (if FStar_Pervasives_Native.uu___is_None new_pats @@ -1622,7 +1587,7 @@ let (check_match : Obj.magic (Obj.repr (Pulse_Typing_Env.fail - g + g1 (FStar_Pervasives_Native.Some sc_range) "failed to readback new patterns")) @@ -1643,18 +1608,18 @@ let (check_match : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (324)) + (Prims.of_int (331)) (Prims.of_int (12)) - (Prims.of_int (324)) + (Prims.of_int (331)) (Prims.of_int (66))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (337)) + (Prims.of_int (344)) (Prims.of_int (50)) - (Prims.of_int (346)) - (Prims.of_int (81))))) + (Prims.of_int (352)) + (Prims.of_int (55))))) (Obj.magic (Pulse_Common.zipWith (fun @@ -1689,23 +1654,23 @@ let (check_match : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (339)) + (Prims.of_int (346)) (Prims.of_int (28)) - (Prims.of_int (339)) + (Prims.of_int (346)) (Prims.of_int (116))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Match.fst" - (Prims.of_int (337)) + (Prims.of_int (344)) (Prims.of_int (50)) - (Prims.of_int (346)) - (Prims.of_int (81))))) + (Prims.of_int (352)) + (Prims.of_int (55))))) (Obj.magic (check_branches - g pre () + g1 pre () post_hint - check + check1 sc_u sc_ty sc1 brs1 @@ -1714,16 +1679,53 @@ let (check_match : bnds'))) (fun uu___4 -> - FStar_Tactics_Effect.lift_div_tac (fun - uu___5 -> + uu___4 -> match uu___4 with | FStar_Pervasives.Mkdtuple3 (brs2, c, brs_d) -> - FStar_Pervasives.Mkdtuple3 + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Match.fst" + (Prims.of_int (351)) + (Prims.of_int (10)) + (Prims.of_int (351)) + (Prims.of_int (83))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Match.fst" + (Prims.of_int (352)) + (Prims.of_int (2)) + (Prims.of_int (352)) + (Prims.of_int (55))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___5 -> + Pulse_Typing.T_Match + (g1, + sc_u, + sc_ty, + sc1, (), + (), c, + brs2, + brs_d, + complete_d))) + (fun + uu___5 -> + (fun d -> + Obj.magic + (Pulse_Checker_Base.checker_result_for_st_typing + g pre + (FStar_Pervasives_Native.Some + post_hint) + (FStar_Pervasives.Mkdtuple3 ((Pulse_Typing.wr (Pulse_Syntax_Base.Tm_Match { @@ -1735,19 +1737,16 @@ let (check_match : Pulse_Syntax_Base.brs = brs2 })), c, - (Pulse_Typing.T_Match - (g, sc_u, - sc_ty, - sc1, (), - (), c, - brs2, - brs_d, - complete_d))))))) + d)) + res_ppname)) + uu___5))) + uu___4))) uu___4))) uu___3))) uu___3))) uu___2))) uu___1))) uu___1))) - uu___))) uu___))) - uu___))) uu___) \ No newline at end of file + uu___))) + uu___))) uu___))) + uu___))) uu___) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Checker_Par.ml b/src/ocaml/plugin/generated/Pulse_Checker_Par.ml index aa9c6b08c..b31265ac4 100644 --- a/src/ocaml/plugin/generated/Pulse_Checker_Par.ml +++ b/src/ocaml/plugin/generated/Pulse_Checker_Par.ml @@ -1,33 +1,33 @@ open Prims -let (check_par : - Prims.bool -> - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.term -> - unit -> - unit Pulse_Typing.post_hint_opt -> - (Prims.bool -> Pulse_Checker_Common.check_t) -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, +let (check : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + unit -> + unit Pulse_Typing.post_hint_opt -> + Pulse_Syntax_Base.ppname -> + Pulse_Syntax_Base.st_term -> + Pulse_Checker_Base.check_t -> + ((unit, unit, unit) Pulse_Checker_Base.checker_result_t, unit) FStar_Tactics_Effect.tac_repr) = - fun allow_inst -> - fun g -> - fun t -> - fun pre -> - fun pre_typing -> - fun post_hint -> - fun check' -> + fun g -> + fun pre -> + fun pre_typing -> + fun post_hint -> + fun res_ppname -> + fun t -> + fun check1 -> FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (24)) (Prims.of_int (10)) - (Prims.of_int (24)) (Prims.of_int (44))))) + (Prims.of_int (25)) (Prims.of_int (10)) + (Prims.of_int (25)) (Prims.of_int (44))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (24)) (Prims.of_int (47)) - (Prims.of_int (50)) (Prims.of_int (50))))) + (Prims.of_int (25)) (Prims.of_int (47)) + (Prims.of_int (60)) (Prims.of_int (95))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> Pulse_Checker_Pure.push_context "check_par" @@ -40,14 +40,14 @@ let (check_par : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (26)) (Prims.of_int (50)) - (Prims.of_int (26)) (Prims.of_int (56))))) + (Prims.of_int (27)) (Prims.of_int (50)) + (Prims.of_int (27)) (Prims.of_int (56))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (24)) (Prims.of_int (47)) - (Prims.of_int (50)) (Prims.of_int (50))))) + (Prims.of_int (25)) (Prims.of_int (47)) + (Prims.of_int (60)) (Prims.of_int (95))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> t.Pulse_Syntax_Base.term1)) (fun uu___ -> @@ -67,18 +67,18 @@ let (check_par : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (28)) + (Prims.of_int (29)) (Prims.of_int (4)) - (Prims.of_int (28)) + (Prims.of_int (29)) (Prims.of_int (49))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (26)) + (Prims.of_int (27)) (Prims.of_int (59)) - (Prims.of_int (50)) - (Prims.of_int (50))))) + (Prims.of_int (60)) + (Prims.of_int (95))))) (Obj.magic (Pulse_Checker_Pure.check_term_with_expected_type g1 preL @@ -94,18 +94,18 @@ let (check_par : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (30)) + (Prims.of_int (31)) (Prims.of_int (4)) - (Prims.of_int (30)) + (Prims.of_int (31)) (Prims.of_int (49))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (28)) + (Prims.of_int (29)) (Prims.of_int (52)) - (Prims.of_int (50)) - (Prims.of_int (50))))) + (Prims.of_int (60)) + (Prims.of_int (95))))) (Obj.magic (Pulse_Checker_Pure.check_term_with_expected_type g1 preR @@ -124,22 +124,23 @@ let (check_par : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (32)) + (Prims.of_int (33)) (Prims.of_int (19)) - (Prims.of_int (32)) - (Prims.of_int (47))))) + (Prims.of_int (33)) + (Prims.of_int (52))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (32)) - (Prims.of_int (50)) - (Prims.of_int (50)) - (Prims.of_int (50))))) + (Prims.of_int (33)) + (Prims.of_int (55)) + (Prims.of_int (60)) + (Prims.of_int (95))))) (Obj.magic - (Pulse_Checker_Common.intro_post_hint + (Pulse_Checker_Base.intro_post_hint g1 FStar_Pervasives_Native.None + FStar_Pervasives_Native.None postL)) (fun uu___3 -> @@ -152,25 +153,80 @@ let (check_par : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (34)) - (Prims.of_int (4)) - (Prims.of_int (34)) - (Prims.of_int (65))))) + (Prims.of_int (35)) + (Prims.of_int (31)) + (Prims.of_int (39)) + (Prims.of_int (35))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Par.fst" + (Prims.of_int (33)) + (Prims.of_int (55)) + (Prims.of_int (60)) + (Prims.of_int (95))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Par.fst" + (Prims.of_int (36)) + (Prims.of_int (17)) + (Prims.of_int (36)) + (Prims.of_int (44))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Par.fst" + (Prims.of_int (36)) + (Prims.of_int (47)) + (Prims.of_int (39)) + (Prims.of_int (35))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + Pulse_Syntax_Base.mk_ppname_no_range + "_par_l")) + (fun + uu___3 -> + (fun + ppname -> + Obj.magic + (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (32)) - (Prims.of_int (50)) - (Prims.of_int (50)) - (Prims.of_int (50))))) + (Prims.of_int (38)) + (Prims.of_int (6)) + (Prims.of_int (38)) + (Prims.of_int (62))))) + (FStar_Sealed.seal (Obj.magic - (check' - allow_inst - g1 eL - preL1 () + (FStar_Range.mk_range + "Pulse.Checker.Par.fst" + (Prims.of_int (39)) + (Prims.of_int (4)) + (Prims.of_int (39)) + (Prims.of_int (35))))) + (Obj.magic + (check1 + g1 preL1 + () (FStar_Pervasives_Native.Some - postL_hint))) + postL_hint) + ppname eL)) + (fun + uu___3 -> + (fun r -> + Obj.magic + (Pulse_Checker_Base.apply_checker_result_k + g1 preL1 + postL_hint + r ppname)) + uu___3))) + uu___3))) (fun uu___3 -> (fun @@ -192,22 +248,22 @@ let (check_par : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (38)) + (Prims.of_int (43)) (Prims.of_int (20)) - (Prims.of_int (38)) + (Prims.of_int (43)) (Prims.of_int (54))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (38)) + (Prims.of_int (43)) (Prims.of_int (57)) - (Prims.of_int (49)) - (Prims.of_int (52))))) + (Prims.of_int (58)) + (Prims.of_int (96))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___4 -> - Pulse_Typing_Metatheory.st_typing_correctness + Pulse_Typing_Metatheory_Base.st_typing_correctness g1 eL1 cL eL_typing)) (fun @@ -221,22 +277,23 @@ let (check_par : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (39)) + (Prims.of_int (44)) (Prims.of_int (21)) - (Prims.of_int (39)) - (Prims.of_int (49))))) + (Prims.of_int (44)) + (Prims.of_int (54))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (39)) - (Prims.of_int (52)) - (Prims.of_int (49)) - (Prims.of_int (52))))) + (Prims.of_int (44)) + (Prims.of_int (57)) + (Prims.of_int (58)) + (Prims.of_int (96))))) (Obj.magic - (Pulse_Checker_Common.intro_post_hint + (Pulse_Checker_Base.intro_post_hint g1 FStar_Pervasives_Native.None + FStar_Pervasives_Native.None postR)) (fun uu___4 -> @@ -249,25 +306,80 @@ let (check_par : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (41)) - (Prims.of_int (6)) - (Prims.of_int (41)) - (Prims.of_int (67))))) + (Prims.of_int (45)) + (Prims.of_int (33)) + (Prims.of_int (49)) + (Prims.of_int (37))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (39)) - (Prims.of_int (52)) + (Prims.of_int (44)) + (Prims.of_int (57)) + (Prims.of_int (58)) + (Prims.of_int (96))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Par.fst" + (Prims.of_int (46)) + (Prims.of_int (19)) + (Prims.of_int (46)) + (Prims.of_int (46))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Par.fst" + (Prims.of_int (46)) (Prims.of_int (49)) - (Prims.of_int (52))))) + (Prims.of_int (49)) + (Prims.of_int (37))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + Pulse_Syntax_Base.mk_ppname_no_range + "_par_r")) + (fun + uu___4 -> + (fun + ppname -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal (Obj.magic - (check' - allow_inst - g1 eR - preR1 () + (FStar_Range.mk_range + "Pulse.Checker.Par.fst" + (Prims.of_int (48)) + (Prims.of_int (8)) + (Prims.of_int (48)) + (Prims.of_int (64))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Par.fst" + (Prims.of_int (49)) + (Prims.of_int (6)) + (Prims.of_int (49)) + (Prims.of_int (37))))) + (Obj.magic + (check1 + g1 preR1 + () (FStar_Pervasives_Native.Some - postR_hint))) + postR_hint) + ppname eR)) + (fun + uu___4 -> + (fun r -> + Obj.magic + (Pulse_Checker_Base.apply_checker_result_k + g1 preR1 + postR_hint + r ppname)) + uu___4))) + uu___4))) (fun uu___4 -> (fun @@ -294,22 +406,22 @@ let (check_par : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (45)) + (Prims.of_int (53)) (Prims.of_int (22)) - (Prims.of_int (45)) + (Prims.of_int (53)) (Prims.of_int (56))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (45)) + (Prims.of_int (53)) (Prims.of_int (59)) - (Prims.of_int (48)) - (Prims.of_int (51))))) + (Prims.of_int (56)) + (Prims.of_int (79))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___5 -> - Pulse_Typing_Metatheory.st_typing_correctness + Pulse_Typing_Metatheory_Base.st_typing_correctness g1 eR1 cR eR_typing)) (fun @@ -323,18 +435,18 @@ let (check_par : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (46)) + (Prims.of_int (54)) (Prims.of_int (14)) - (Prims.of_int (46)) + (Prims.of_int (54)) (Prims.of_int (21))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (46)) + (Prims.of_int (54)) (Prims.of_int (24)) - (Prims.of_int (48)) - (Prims.of_int (51))))) + (Prims.of_int (56)) + (Prims.of_int (79))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___5 -> @@ -349,18 +461,18 @@ let (check_par : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (47)) + (Prims.of_int (55)) (Prims.of_int (14)) - (Prims.of_int (47)) + (Prims.of_int (55)) (Prims.of_int (71))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (48)) + (Prims.of_int (56)) (Prims.of_int (6)) - (Prims.of_int (48)) - (Prims.of_int (51))))) + (Prims.of_int (56)) + (Prims.of_int (79))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___5 -> @@ -381,21 +493,21 @@ let (check_par : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (48)) - (Prims.of_int (13)) - (Prims.of_int (48)) - (Prims.of_int (41))))) + (Prims.of_int (56)) + (Prims.of_int (22)) + (Prims.of_int (56)) + (Prims.of_int (61))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Par.fst" - (Prims.of_int (48)) + (Prims.of_int (56)) (Prims.of_int (6)) - (Prims.of_int (48)) - (Prims.of_int (51))))) + (Prims.of_int (56)) + (Prims.of_int (79))))) (Obj.magic - (Pulse_Checker_Common.try_frame_pre - g + (Pulse_Checker_Prover.try_frame_pre + g pre () (Pulse_Typing.wr (Pulse_Syntax_Base.Tm_Par { @@ -415,61 +527,150 @@ let (check_par : Pulse_Syntax_Base.post2 = Pulse_Syntax_Base.tm_unknown - })) pre - () + })) (Pulse_Typing.comp_par cL cR x) - d)) + d + res_ppname)) (fun uu___5 -> (fun uu___5 -> Obj.magic - (Pulse_Checker_Common.repack + (Pulse_Checker_Prover.prove_post_hint g pre - (Pulse_Typing.wr - (Pulse_Syntax_Base.Tm_Par - { - Pulse_Syntax_Base.pre1 - = - Pulse_Syntax_Base.tm_unknown; - Pulse_Syntax_Base.body11 - = eL1; - Pulse_Syntax_Base.post11 - = - Pulse_Syntax_Base.tm_unknown; - Pulse_Syntax_Base.pre2 - = - Pulse_Syntax_Base.tm_unknown; - Pulse_Syntax_Base.body21 - = eR1; - Pulse_Syntax_Base.post2 - = - Pulse_Syntax_Base.tm_unknown - })) uu___5 - post_hint)) + post_hint + t.Pulse_Syntax_Base.range2)) uu___5))) uu___5))) uu___5))) uu___5)) else Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Par.fst" + (Prims.of_int (58)) + (Prims.of_int (11)) + (Prims.of_int (58)) + (Prims.of_int (96))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Par.fst" + (Prims.of_int (57)) + (Prims.of_int (9)) + (Prims.of_int (58)) + (Prims.of_int (96))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Par.fst" + (Prims.of_int (58)) + (Prims.of_int (74)) + (Prims.of_int (58)) + (Prims.of_int (95))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (Pulse_Syntax_Printer.comp_to_string + cR)) + (fun + uu___6 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___7 -> + Prims.strcat + "check_par: right computation is not stt (" + (Prims.strcat + uu___6 + ")"))))) + (fun + uu___6 -> + (fun + uu___6 -> + Obj.magic (Pulse_Typing_Env.fail g1 (FStar_Pervasives_Native.Some (eR1.Pulse_Syntax_Base.range2)) - "par: cR is not stt")) + uu___6)) + uu___6))) uu___4))) uu___4))) uu___4)) else Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Par.fst" + (Prims.of_int (60)) + (Prims.of_int (11)) + (Prims.of_int (60)) + (Prims.of_int (95))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Par.fst" + (Prims.of_int (59)) + (Prims.of_int (7)) + (Prims.of_int (60)) + (Prims.of_int (95))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Par.fst" + (Prims.of_int (60)) + (Prims.of_int (73)) + (Prims.of_int (60)) + (Prims.of_int (94))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (Pulse_Syntax_Printer.comp_to_string + cL)) + (fun + uu___5 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___6 -> + Prims.strcat + "check_par: left computation is not stt (" + (Prims.strcat + uu___5 + ")"))))) + (fun + uu___5 -> + (fun + uu___5 -> + Obj.magic (Pulse_Typing_Env.fail g1 (FStar_Pervasives_Native.Some (eL1.Pulse_Syntax_Base.range2)) - "par: cL is not stt")) + uu___5)) + uu___5))) uu___3))) uu___3))) uu___2))) diff --git a/src/ocaml/plugin/generated/Pulse_Checker_Prover.ml b/src/ocaml/plugin/generated/Pulse_Checker_Prover.ml new file mode 100644 index 000000000..95847c98b --- /dev/null +++ b/src/ocaml/plugin/generated/Pulse_Checker_Prover.ml @@ -0,0 +1,2641 @@ +open Prims +let coerce_eq : 'a 'b . 'a -> unit -> 'b = + fun uu___1 -> fun uu___ -> (fun x -> fun uu___ -> Obj.magic x) uu___1 uu___ +let (unsolved_equiv_pst : + Pulse_Checker_Prover_Base.preamble -> + unit Pulse_Checker_Prover_Base.prover_state -> + Pulse_Syntax_Base.vprop Prims.list -> + unit -> unit Pulse_Checker_Prover_Base.prover_state) + = + fun preamble -> + fun pst -> + fun unsolved' -> + fun d -> + { + Pulse_Checker_Prover_Base.pg = (pst.Pulse_Checker_Prover_Base.pg); + Pulse_Checker_Prover_Base.remaining_ctxt = + (pst.Pulse_Checker_Prover_Base.remaining_ctxt); + Pulse_Checker_Prover_Base.remaining_ctxt_frame_typing = (); + Pulse_Checker_Prover_Base.uvs = + (pst.Pulse_Checker_Prover_Base.uvs); + Pulse_Checker_Prover_Base.ss = (pst.Pulse_Checker_Prover_Base.ss); + Pulse_Checker_Prover_Base.solved = + (pst.Pulse_Checker_Prover_Base.solved); + Pulse_Checker_Prover_Base.unsolved = unsolved'; + Pulse_Checker_Prover_Base.k = (pst.Pulse_Checker_Prover_Base.k); + Pulse_Checker_Prover_Base.goals_inv = (); + Pulse_Checker_Prover_Base.solved_inv = () + } +let (remaining_ctxt_equiv_pst : + Pulse_Checker_Prover_Base.preamble -> + unit Pulse_Checker_Prover_Base.prover_state -> + Pulse_Syntax_Base.vprop Prims.list -> + unit -> unit Pulse_Checker_Prover_Base.prover_state) + = + fun preamble -> + fun pst -> + fun remaining_ctxt' -> + fun d -> + { + Pulse_Checker_Prover_Base.pg = (pst.Pulse_Checker_Prover_Base.pg); + Pulse_Checker_Prover_Base.remaining_ctxt = remaining_ctxt'; + Pulse_Checker_Prover_Base.remaining_ctxt_frame_typing = (); + Pulse_Checker_Prover_Base.uvs = + (pst.Pulse_Checker_Prover_Base.uvs); + Pulse_Checker_Prover_Base.ss = (pst.Pulse_Checker_Prover_Base.ss); + Pulse_Checker_Prover_Base.solved = + (pst.Pulse_Checker_Prover_Base.solved); + Pulse_Checker_Prover_Base.unsolved = + (pst.Pulse_Checker_Prover_Base.unsolved); + Pulse_Checker_Prover_Base.k = + (Pulse_Checker_Base.k_elab_equiv + preamble.Pulse_Checker_Prover_Base.g0 + (Pulse_Checker_Prover_Base.__proj__Mkprover_state__item__pg + preamble pst) + (Pulse_Checker_Prover_Base.op_Star + preamble.Pulse_Checker_Prover_Base.ctxt + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + preamble.Pulse_Checker_Prover_Base.ctxt + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + (Pulse_Checker_Prover_Base.__proj__Mkprover_state__item__remaining_ctxt + preamble pst)) + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + (Pulse_Checker_Prover_Base.__proj__Mkprover_state__item__ss + preamble pst) + (Pulse_Checker_Prover_Base.__proj__Mkprover_state__item__solved + preamble pst))) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + remaining_ctxt') + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst.Pulse_Checker_Prover_Base.ss + pst.Pulse_Checker_Prover_Base.solved)) + pst.Pulse_Checker_Prover_Base.k () ()); + Pulse_Checker_Prover_Base.goals_inv = (); + Pulse_Checker_Prover_Base.solved_inv = () + } +let rec (collect_exists : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.vprop Prims.list -> + (Pulse_Syntax_Base.vprop Prims.list, + Pulse_Syntax_Base.vprop Prims.list, unit) FStar_Pervasives.dtuple3) + = + fun g -> + fun l -> + match l with + | [] -> FStar_Pervasives.Mkdtuple3 ([], [], ()) + | hd::tl -> + let uu___ = collect_exists g tl in + (match uu___ with + | FStar_Pervasives.Mkdtuple3 (exs, rest, uu___1) -> + (match hd.Pulse_Syntax_Base.t with + | Pulse_Syntax_Base.Tm_ExistsSL (uu___2, uu___3, uu___4) -> + FStar_Pervasives.Mkdtuple3 ((hd :: exs), rest, ()) + | uu___2 -> + FStar_Pervasives.Mkdtuple3 (exs, (hd :: rest), ()))) +let rec (collect_pures : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.vprop Prims.list -> + (Pulse_Syntax_Base.vprop Prims.list, + Pulse_Syntax_Base.vprop Prims.list, unit) FStar_Pervasives.dtuple3) + = + fun g -> + fun l -> + match l with + | [] -> FStar_Pervasives.Mkdtuple3 ([], [], ()) + | hd::tl -> + let uu___ = collect_pures g tl in + (match uu___ with + | FStar_Pervasives.Mkdtuple3 (pures, rest, uu___1) -> + (match hd.Pulse_Syntax_Base.t with + | Pulse_Syntax_Base.Tm_Pure uu___2 -> + FStar_Pervasives.Mkdtuple3 ((hd :: pures), rest, ()) + | uu___2 -> + FStar_Pervasives.Mkdtuple3 (pures, (hd :: rest), ()))) +let rec (match_q : + Pulse_Checker_Prover_Base.preamble -> + unit Pulse_Checker_Prover_Base.prover_state -> + Pulse_Syntax_Base.vprop -> + Pulse_Syntax_Base.vprop Prims.list -> + unit -> + Prims.nat -> + (unit Pulse_Checker_Prover_Base.prover_state + FStar_Pervasives_Native.option, + unit) FStar_Tactics_Effect.tac_repr) + = + fun uu___5 -> + fun uu___4 -> + fun uu___3 -> + fun uu___2 -> + fun uu___1 -> + fun uu___ -> + (fun preamble -> + fun pst -> + fun q -> + fun unsolved' -> + fun uu___ -> + fun i -> + if + (FStar_List_Tot_Base.length + pst.Pulse_Checker_Prover_Base.remaining_ctxt) + = Prims.int_zero + then + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + FStar_Pervasives_Native.None))) + else + Obj.magic + (Obj.repr + (if + i = + (FStar_List_Tot_Base.length + pst.Pulse_Checker_Prover_Base.remaining_ctxt) + then + Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + FStar_Pervasives_Native.None)) + else + Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (77)) + (Prims.of_int (12)) + (Prims.of_int (77)) + (Prims.of_int (35))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (77)) + (Prims.of_int (38)) + (Prims.of_int (86)) + (Prims.of_int (38))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___3 -> + FStar_List_Tot_Base.hd + pst.Pulse_Checker_Prover_Base.remaining_ctxt)) + (fun uu___3 -> + (fun p -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (79)) + (Prims.of_int (6)) + (Prims.of_int (79)) + (Prims.of_int (69))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (80)) + (Prims.of_int (4)) + (Prims.of_int (86)) + (Prims.of_int (38))))) + (Obj.magic + (Pulse_Checker_Prover_Match.match_step + preamble pst p + (FStar_List_Tot_Base.tl + pst.Pulse_Checker_Prover_Base.remaining_ctxt) + q unsolved' ())) + (fun uu___3 -> + (fun pst_opt -> + match pst_opt with + | FStar_Pervasives_Native.Some + pst1 -> + Obj.magic + (Obj.repr + ( + FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + FStar_Pervasives_Native.Some + pst1))) + | FStar_Pervasives_Native.None + -> + Obj.magic + (Obj.repr + ( + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (84)) + (Prims.of_int (8)) + (Prims.of_int (85)) + (Prims.of_int (49))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (86)) + (Prims.of_int (6)) + (Prims.of_int (86)) + (Prims.of_int (38))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + remaining_ctxt_equiv_pst + preamble + pst + (FStar_List_Tot_Base.op_At + (FStar_List_Tot_Base.tl + pst.Pulse_Checker_Prover_Base.remaining_ctxt) + [ + FStar_List_Tot_Base.hd + pst.Pulse_Checker_Prover_Base.remaining_ctxt]) + ())) + (fun + uu___3 -> + (fun pst1 + -> + Obj.magic + (match_q + preamble + pst1 q + unsolved' + () + (i + + Prims.int_one))) + uu___3)))) + uu___3))) uu___3))))) + uu___5 uu___4 uu___3 uu___2 uu___1 uu___ +let rec (prove_pures : + Pulse_Checker_Prover_Base.preamble -> + unit Pulse_Checker_Prover_Base.prover_state -> + (unit Pulse_Checker_Prover_Base.prover_state, unit) + FStar_Tactics_Effect.tac_repr) + = + fun uu___1 -> + fun uu___ -> + (fun preamble -> + fun pst -> + match pst.Pulse_Checker_Prover_Base.unsolved with + | [] -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> pst))) + | { Pulse_Syntax_Base.t = Pulse_Syntax_Base.Tm_Pure p; + Pulse_Syntax_Base.range1 = uu___;_}::unsolved' -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.fst" + (Prims.of_int (95)) (Prims.of_int (18)) + (Prims.of_int (95)) (Prims.of_int (57))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.fst" + (Prims.of_int (96)) (Prims.of_int (4)) + (Prims.of_int (104)) (Prims.of_int (12))))) + (Obj.magic + (Pulse_Checker_Prover_IntroPure.intro_pure preamble + pst p unsolved' ())) + (fun uu___1 -> + (fun pst_opt -> + match pst_opt with + | FStar_Pervasives_Native.None -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (98)) + (Prims.of_int (24)) + (Prims.of_int (98)) + (Prims.of_int (100))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (98)) + (Prims.of_int (7)) + (Prims.of_int (98)) + (Prims.of_int (100))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (98)) + (Prims.of_int (79)) + (Prims.of_int (98)) + (Prims.of_int (99))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + p)) + (fun uu___1 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + Prims.strcat + "prover error: cannot prove pure " + (Prims.strcat uu___1 + "\n"))))) + (fun uu___1 -> + (fun uu___1 -> + Obj.magic + (Pulse_Typing_Env.fail + pst.Pulse_Checker_Prover_Base.pg + FStar_Pervasives_Native.None + uu___1)) uu___1)) + | FStar_Pervasives_Native.Some pst1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (100)) + (Prims.of_int (18)) + (Prims.of_int (100)) + (Prims.of_int (34))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (100)) + (Prims.of_int (11)) + (Prims.of_int (100)) + (Prims.of_int (15))))) + (Obj.magic (prove_pures preamble pst1)) + (fun pst2 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> pst2)))) uu___1))) + | uu___ -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.fst" + (Prims.of_int (107)) (Prims.of_int (6)) + (Prims.of_int (108)) (Prims.of_int (48))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.fst" + (Prims.of_int (106)) (Prims.of_int (4)) + (Prims.of_int (108)) (Prims.of_int (48))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (108)) (Prims.of_int (9)) + (Prims.of_int (108)) + (Prims.of_int (47))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + (FStar_List_Tot_Base.hd + pst.Pulse_Checker_Prover_Base.unsolved))) + (fun uu___1 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + Prims.strcat + "Impossible! prover.prove_pures: " + (Prims.strcat uu___1 + " is not a pure, please file a bug-report"))))) + (fun uu___1 -> + (fun uu___1 -> + Obj.magic + (Pulse_Typing_Env.fail + pst.Pulse_Checker_Prover_Base.pg + FStar_Pervasives_Native.None uu___1)) + uu___1)))) uu___1 uu___ +let rec (prover : + Pulse_Checker_Prover_Base.preamble -> + unit Pulse_Checker_Prover_Base.prover_state -> + (unit Pulse_Checker_Prover_Base.prover_state, unit) + FStar_Tactics_Effect.tac_repr) + = + fun preamble -> + fun pst0 -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.fst" + (Prims.of_int (117)) (Prims.of_int (2)) (Prims.of_int (120)) + (Prims.of_int (55))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.fst" + (Prims.of_int (122)) (Prims.of_int (2)) (Prims.of_int (168)) + (Prims.of_int (32))))) + (Obj.magic + (Pulse_Checker_Prover_Util.debug_prover + pst0.Pulse_Checker_Prover_Base.pg + (fun uu___ -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.fst" + (Prims.of_int (120)) (Prims.of_int (6)) + (Prims.of_int (120)) (Prims.of_int (54))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.fst" + (Prims.of_int (118)) (Prims.of_int (4)) + (Prims.of_int (120)) (Prims.of_int (54))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + (Pulse_Typing_Combinators.list_as_vprop + pst0.Pulse_Checker_Prover_Base.unsolved))) + (fun uu___1 -> + (fun uu___1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (118)) + (Prims.of_int (4)) + (Prims.of_int (120)) + (Prims.of_int (54))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (118)) + (Prims.of_int (4)) + (Prims.of_int (120)) + (Prims.of_int (54))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (119)) + (Prims.of_int (6)) + (Prims.of_int (119)) + (Prims.of_int (60))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + (Pulse_Typing_Combinators.list_as_vprop + pst0.Pulse_Checker_Prover_Base.remaining_ctxt))) + (fun uu___2 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___3 -> + fun x -> + Prims.strcat + (Prims.strcat + "At the prover top-level with remaining_ctxt: " + (Prims.strcat uu___2 + "\nunsolved: ")) + (Prims.strcat x ""))))) + (fun uu___2 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___3 -> uu___2 uu___1)))) uu___1)))) + (fun uu___ -> + (fun uu___ -> + match pst0.Pulse_Checker_Prover_Base.unsolved with + | [] -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> pst0))) + | uu___1 -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (125)) (Prims.of_int (14)) + (Prims.of_int (125)) (Prims.of_int (45))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (127)) (Prims.of_int (4)) + (Prims.of_int (168)) (Prims.of_int (32))))) + (Obj.magic + (Pulse_Checker_Prover_ElimExists.elim_exists_pst + preamble pst0)) + (fun uu___2 -> + (fun pst -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (127)) + (Prims.of_int (4)) + (Prims.of_int (129)) + (Prims.of_int (62))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (129)) + (Prims.of_int (63)) + (Prims.of_int (168)) + (Prims.of_int (32))))) + (Obj.magic + (Pulse_Checker_Prover_Util.debug_prover + pst.Pulse_Checker_Prover_Base.pg + (fun uu___2 -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (129)) + (Prims.of_int (8)) + (Prims.of_int (129)) + (Prims.of_int (61))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.remaining_ctxt))) + (fun uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___4 -> + Prims.strcat + "prover: remaining_ctxt after elim exists: " + (Prims.strcat + uu___3 "\n")))))) + (fun uu___2 -> + (fun uu___2 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (131)) + (Prims.of_int (14)) + (Prims.of_int (131)) + (Prims.of_int (40))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (133)) + (Prims.of_int (4)) + (Prims.of_int (168)) + (Prims.of_int (32))))) + (Obj.magic + (Pulse_Checker_Prover_ElimPure.elim_pure_pst + preamble pst)) + (fun uu___3 -> + (fun pst1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (133)) + (Prims.of_int (4)) + (Prims.of_int (135)) + (Prims.of_int (62))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (135)) + (Prims.of_int (63)) + (Prims.of_int (168)) + (Prims.of_int (32))))) + (Obj.magic + (Pulse_Checker_Prover_Util.debug_prover + pst1.Pulse_Checker_Prover_Base.pg + (fun uu___3 + -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (135)) + (Prims.of_int (8)) + (Prims.of_int (135)) + (Prims.of_int (61))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + (Pulse_Typing_Combinators.list_as_vprop + pst1.Pulse_Checker_Prover_Base.remaining_ctxt))) + (fun + uu___4 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___5 -> + Prims.strcat + "prover: remaining_ctxt after elim pure: " + (Prims.strcat + uu___4 + "\n")))))) + (fun uu___3 -> + (fun uu___3 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (137)) + (Prims.of_int (29)) + (Prims.of_int (137)) + (Prims.of_int (82))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (135)) + (Prims.of_int (63)) + (Prims.of_int (168)) + (Prims.of_int (32))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + collect_exists + (Pulse_Typing_Env.push_env + pst1.Pulse_Checker_Prover_Base.pg + pst1.Pulse_Checker_Prover_Base.uvs) + pst1.Pulse_Checker_Prover_Base.unsolved)) + (fun + uu___4 -> + (fun + uu___4 -> + match uu___4 + with + | + FStar_Pervasives.Mkdtuple3 + (exs, + rest, d) + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (139)) + (Prims.of_int (4)) + (Prims.of_int (141)) + (Prims.of_int (87))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (141)) + (Prims.of_int (88)) + (Prims.of_int (168)) + (Prims.of_int (32))))) + (Obj.magic + (Pulse_Checker_Prover_Util.debug_prover + pst1.Pulse_Checker_Prover_Base.pg + (fun + uu___5 -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (141)) + (Prims.of_int (47)) + (Prims.of_int (141)) + (Prims.of_int (86))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (140)) + (Prims.of_int (6)) + (Prims.of_int (141)) + (Prims.of_int (86))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + (Pulse_Typing_Combinators.list_as_vprop + rest))) + (fun + uu___6 -> + (fun + uu___6 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (140)) + (Prims.of_int (6)) + (Prims.of_int (141)) + (Prims.of_int (86))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (140)) + (Prims.of_int (6)) + (Prims.of_int (141)) + (Prims.of_int (86))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (141)) + (Prims.of_int (8)) + (Prims.of_int (141)) + (Prims.of_int (46))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + (Pulse_Typing_Combinators.list_as_vprop + exs))) + (fun + uu___7 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___8 -> + fun x -> + Prims.strcat + (Prims.strcat + "prover: tried to pull exists: exs: " + (Prims.strcat + uu___7 + " and rest: ")) + (Prims.strcat + x "\n"))))) + (fun + uu___7 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___8 -> + uu___7 + uu___6)))) + uu___6)))) + (fun + uu___5 -> + (fun + uu___5 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (143)) + (Prims.of_int (14)) + (Prims.of_int (143)) + (Prims.of_int (49))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (145)) + (Prims.of_int (4)) + (Prims.of_int (168)) + (Prims.of_int (32))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___6 -> + unsolved_equiv_pst + preamble + pst1 + (FStar_List_Tot_Base.op_At + exs rest) + ())) + (fun + uu___6 -> + (fun pst2 + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (145)) + (Prims.of_int (4)) + (Prims.of_int (147)) + (Prims.of_int (56))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (149)) + (Prims.of_int (4)) + (Prims.of_int (168)) + (Prims.of_int (32))))) + (Obj.magic + (Pulse_Checker_Prover_Util.debug_prover + pst2.Pulse_Checker_Prover_Base.pg + (fun + uu___6 -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (147)) + (Prims.of_int (8)) + (Prims.of_int (147)) + (Prims.of_int (55))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + (Pulse_Typing_Combinators.list_as_vprop + pst2.Pulse_Checker_Prover_Base.unsolved))) + (fun + uu___7 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___8 -> + Prims.strcat + "prover: unsolved after pulling exists at the top: " + (Prims.strcat + uu___7 + "\n")))))) + (fun + uu___6 -> + (fun + uu___6 -> + match + pst2.Pulse_Checker_Prover_Base.unsolved + with + | + { + Pulse_Syntax_Base.t + = + Pulse_Syntax_Base.Tm_ExistsSL + (u, b, + body); + Pulse_Syntax_Base.range1 + = uu___7;_}::unsolved' + -> + Obj.magic + (Pulse_Checker_Prover_IntroExists.intro_exists + preamble + pst2 u b + body + unsolved' + () prover) + | + uu___7 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (153)) + (Prims.of_int (33)) + (Prims.of_int (153)) + (Prims.of_int (85))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (152)) + (Prims.of_int (10)) + (Prims.of_int (168)) + (Prims.of_int (32))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___8 -> + collect_pures + (Pulse_Typing_Env.push_env + pst2.Pulse_Checker_Prover_Base.pg + pst2.Pulse_Checker_Prover_Base.uvs) + pst2.Pulse_Checker_Prover_Base.unsolved)) + (fun + uu___8 -> + (fun + uu___8 -> + match uu___8 + with + | + FStar_Pervasives.Mkdtuple3 + (pures, + rest1, + d1) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (154)) + (Prims.of_int (16)) + (Prims.of_int (154)) + (Prims.of_int (53))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (155)) + (Prims.of_int (6)) + (Prims.of_int (168)) + (Prims.of_int (32))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___9 -> + unsolved_equiv_pst + preamble + pst2 + (FStar_List_Tot_Base.op_At + rest1 + pures) ())) + (fun + uu___9 -> + (fun pst3 + -> + match + pst3.Pulse_Checker_Prover_Base.unsolved + with + | + { + Pulse_Syntax_Base.t + = + Pulse_Syntax_Base.Tm_Pure + uu___9; + Pulse_Syntax_Base.range1 + = uu___10;_}::tl + -> + Obj.magic + (prove_pures + preamble + pst3) + | + q::tl -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (158)) + (Prims.of_int (22)) + (Prims.of_int (158)) + (Prims.of_int (43))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (159)) + (Prims.of_int (8)) + (Prims.of_int (168)) + (Prims.of_int (32))))) + (Obj.magic + (match_q + preamble + pst3 q tl + () + Prims.int_zero)) + (fun + uu___9 -> + (fun + pst_opt + -> + match pst_opt + with + | + FStar_Pervasives_Native.None + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (161)) + (Prims.of_int (20)) + (Prims.of_int (166)) + (Prims.of_int (44))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (167)) + (Prims.of_int (10)) + (Prims.of_int (167)) + (Prims.of_int (30))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (166)) + (Prims.of_int (12)) + (Prims.of_int (166)) + (Prims.of_int (44))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (161)) + (Prims.of_int (20)) + (Prims.of_int (166)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + preamble.Pulse_Checker_Prover_Base.ctxt)) + (fun + uu___9 -> + (fun + uu___9 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (161)) + (Prims.of_int (20)) + (Prims.of_int (166)) + (Prims.of_int (44))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (161)) + (Prims.of_int (20)) + (Prims.of_int (166)) + (Prims.of_int (44))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (165)) + (Prims.of_int (12)) + (Prims.of_int (165)) + (Prims.of_int (45))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (161)) + (Prims.of_int (20)) + (Prims.of_int (166)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + preamble.Pulse_Checker_Prover_Base.goals)) + (fun + uu___10 + -> + (fun + uu___10 + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (161)) + (Prims.of_int (20)) + (Prims.of_int (166)) + (Prims.of_int (44))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (161)) + (Prims.of_int (20)) + (Prims.of_int (166)) + (Prims.of_int (44))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (164)) + (Prims.of_int (12)) + (Prims.of_int (164)) + (Prims.of_int (65))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (161)) + (Prims.of_int (20)) + (Prims.of_int (166)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + (Pulse_Typing_Combinators.list_as_vprop + pst3.Pulse_Checker_Prover_Base.remaining_ctxt))) + (fun + uu___11 + -> + (fun + uu___11 + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (161)) + (Prims.of_int (20)) + (Prims.of_int (166)) + (Prims.of_int (44))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (161)) + (Prims.of_int (20)) + (Prims.of_int (166)) + (Prims.of_int (44))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (163)) + (Prims.of_int (12)) + (Prims.of_int (163)) + (Prims.of_int (32))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + q)) + (fun + uu___12 + -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___13 + -> + fun x -> + fun x1 -> + fun x2 -> + Prims.strcat + (Prims.strcat + (Prims.strcat + (Prims.strcat + "cannot prove vprop " + (Prims.strcat + uu___12 + " in the context: ")) + (Prims.strcat + x + "\n(the prover was started with goal ")) + (Prims.strcat + x1 + " and initial context ")) + (Prims.strcat + x2 ")"))))) + (fun + uu___12 + -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___13 + -> + uu___12 + uu___11)))) + uu___11))) + (fun + uu___11 + -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___12 + -> + uu___11 + uu___10)))) + uu___10))) + (fun + uu___10 + -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___11 + -> + uu___10 + uu___9)))) + uu___9))) + (fun + uu___9 -> + (fun msg + -> + Obj.magic + (Pulse_Typing_Env.fail + pst3.Pulse_Checker_Prover_Base.pg + FStar_Pervasives_Native.None + msg)) + uu___9)) + | + FStar_Pervasives_Native.Some + pst4 -> + Obj.magic + (prover + preamble + pst4)) + uu___9))) + uu___9))) + uu___8))) + uu___6))) + uu___6))) + uu___5))) + uu___4))) + uu___3))) + uu___3))) uu___2))) + uu___2)))) uu___) +let rec (get_q_at_hd : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.vprop Prims.list -> + Pulse_Syntax_Base.vprop -> + (Pulse_Syntax_Base.vprop Prims.list, unit) Prims.dtuple2) + = + fun g -> + fun l -> + fun q -> + match l with + | hd::tl -> + if Pulse_Syntax_Base.eq_tm hd q + then Prims.Mkdtuple2 (tl, ()) + else + (let uu___1 = get_q_at_hd g tl q in + match uu___1 with + | Prims.Mkdtuple2 (tl', uu___2) -> + Prims.Mkdtuple2 ((hd :: tl'), ())) +let (prove : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.vprop -> + unit -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.vprop -> + unit -> + ((Pulse_Typing_Env.env, Pulse_Checker_Prover_Substs.nt_substs, + Pulse_Syntax_Base.vprop, + (unit, unit, unit, unit) + Pulse_Checker_Base.continuation_elaborator) + FStar_Pervasives.dtuple4, + unit) FStar_Tactics_Effect.tac_repr) + = + fun g -> + fun ctxt -> + fun ctxt_typing -> + fun uvs -> + fun goals -> + fun goals_typing -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.fst" + (Prims.of_int (192)) (Prims.of_int (2)) + (Prims.of_int (194)) (Prims.of_int (55))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.fst" + (Prims.of_int (194)) (Prims.of_int (56)) + (Prims.of_int (261)) (Prims.of_int (97))))) + (Obj.magic + (Pulse_Checker_Prover_Util.debug_prover g + (fun uu___ -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (194)) (Prims.of_int (30)) + (Prims.of_int (194)) (Prims.of_int (54))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (193)) (Prims.of_int (4)) + (Prims.of_int (194)) (Prims.of_int (54))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string goals)) + (fun uu___1 -> + (fun uu___1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (193)) + (Prims.of_int (4)) + (Prims.of_int (194)) + (Prims.of_int (54))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (193)) + (Prims.of_int (4)) + (Prims.of_int (194)) + (Prims.of_int (54))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (194)) + (Prims.of_int (6)) + (Prims.of_int (194)) + (Prims.of_int (29))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + ctxt)) + (fun uu___2 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___3 -> + fun x -> + Prims.strcat + (Prims.strcat + "\nEnter top-level prove with ctxt: " + (Prims.strcat + uu___2 + "\ngoals: ")) + (Prims.strcat x "\n"))))) + (fun uu___2 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___3 -> uu___2 uu___1)))) + uu___1)))) + (fun uu___ -> + (fun uu___ -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (196)) (Prims.of_int (15)) + (Prims.of_int (196)) (Prims.of_int (33))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (210)) (Prims.of_int (6)) + (Prims.of_int (261)) (Prims.of_int (97))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + Pulse_Typing_Combinators.vprop_as_list ctxt)) + (fun uu___1 -> + (fun ctxt_l -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (211)) + (Prims.of_int (61)) + (Prims.of_int (211)) + (Prims.of_int (69))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (211)) + (Prims.of_int (72)) + (Prims.of_int (261)) + (Prims.of_int (97))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> ())) + (fun uu___1 -> + (fun ctxt_frame_typing -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (213)) + (Prims.of_int (6)) + (Prims.of_int (217)) + (Prims.of_int (12))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (220)) + (Prims.of_int (43)) + (Prims.of_int (261)) + (Prims.of_int (97))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + { + Pulse_Checker_Prover_Base.g0 + = g; + Pulse_Checker_Prover_Base.ctxt + = ctxt; + Pulse_Checker_Prover_Base.frame + = + Pulse_Syntax_Base.tm_emp; + Pulse_Checker_Prover_Base.ctxt_frame_typing + = (); + Pulse_Checker_Prover_Base.goals + = goals + })) + (fun uu___1 -> + (fun preamble -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (222)) + (Prims.of_int (6)) + (Prims.of_int (231)) + (Prims.of_int (21))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (232)) + (Prims.of_int (8)) + (Prims.of_int (261)) + (Prims.of_int (97))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + { + Pulse_Checker_Prover_Base.pg + = g; + Pulse_Checker_Prover_Base.remaining_ctxt + = + (Pulse_Typing_Combinators.vprop_as_list + ctxt); + Pulse_Checker_Prover_Base.remaining_ctxt_frame_typing + = (); + Pulse_Checker_Prover_Base.uvs + = uvs; + Pulse_Checker_Prover_Base.ss + = + Pulse_Checker_Prover_Substs.empty; + Pulse_Checker_Prover_Base.solved + = + Pulse_Syntax_Base.tm_emp; + Pulse_Checker_Prover_Base.unsolved + = + (Pulse_Typing_Combinators.vprop_as_list + goals); + Pulse_Checker_Prover_Base.k + = + (Pulse_Checker_Base.k_elab_equiv + g g ctxt + (Pulse_Checker_Prover_Base.op_Star + preamble.Pulse_Checker_Prover_Base.ctxt + preamble.Pulse_Checker_Prover_Base.frame) + ctxt + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + (Pulse_Typing_Combinators.vprop_as_list + ctxt)) + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + Pulse_Checker_Prover_Substs.empty + Pulse_Syntax_Base.tm_emp)) + (Pulse_Checker_Base.k_elab_unit + g ctxt) + () ()); + Pulse_Checker_Prover_Base.goals_inv + = (); + Pulse_Checker_Prover_Base.solved_inv + = () + })) + (fun uu___1 -> + (fun pst0 -> + Obj.magic + ( + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (234)) + (Prims.of_int (14)) + (Prims.of_int (234)) + (Prims.of_int (25))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (234)) + (Prims.of_int (28)) + (Prims.of_int (261)) + (Prims.of_int (97))))) + (Obj.magic + (prover + preamble + pst0)) + (fun + uu___1 -> + (fun pst + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (237)) + (Prims.of_int (65)) + (Prims.of_int (243)) + (Prims.of_int (22))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (261)) + (Prims.of_int (4)) + (Prims.of_int (261)) + (Prims.of_int (97))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (238)) + (Prims.of_int (14)) + (Prims.of_int (238)) + (Prims.of_int (54))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (239)) + (Prims.of_int (6)) + (Prims.of_int (243)) + (Prims.of_int (22))))) + (Obj.magic + (Pulse_Checker_Prover_Substs.ss_to_nt_substs + pst.Pulse_Checker_Prover_Base.pg + pst.Pulse_Checker_Prover_Base.uvs + pst.Pulse_Checker_Prover_Base.ss)) + (fun + uu___1 -> + (fun r -> + match r + with + | + FStar_Pervasives.Inr + msg -> + Obj.magic + (Obj.repr + (Pulse_Typing_Env.fail + pst.Pulse_Checker_Prover_Base.pg + FStar_Pervasives_Native.None + (Prims.strcat + "prover error: ill-typed substitutions (" + (Prims.strcat + msg ")")))) + | + FStar_Pervasives.Inl + nts -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___1 -> + nts)))) + uu___1))) + (fun nts + -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___1 -> + FStar_Pervasives.Mkdtuple4 + ((pst.Pulse_Checker_Prover_Base.pg), + (Pulse_Checker_Prover_Substs.well_typed_nt_substs_prefix + pst.Pulse_Checker_Prover_Base.pg + pst.Pulse_Checker_Prover_Base.uvs + nts uvs), + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.remaining_ctxt), + (Pulse_Checker_Base.k_elab_equiv + g + pst.Pulse_Checker_Prover_Base.pg + (Pulse_Checker_Prover_Base.op_Star + ctxt + Pulse_Syntax_Base.tm_emp) + ctxt + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.remaining_ctxt) + Pulse_Syntax_Base.tm_emp) + (Pulse_Checker_Prover_Substs.nt_subst_term + pst.Pulse_Checker_Prover_Base.solved + nts)) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Substs.nt_subst_term + goals + (Pulse_Checker_Prover_Substs.well_typed_nt_substs_prefix + pst.Pulse_Checker_Prover_Base.pg + pst.Pulse_Checker_Prover_Base.uvs + nts uvs)) + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.remaining_ctxt)) + pst.Pulse_Checker_Prover_Base.k + () ())))))) + uu___1))) + uu___1))) + uu___1))) uu___1))) + uu___1))) uu___) +let (try_frame_pre_uvs : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.vprop -> + unit -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.st_term -> + Pulse_Syntax_Base.comp_st -> + (unit, unit, unit) Pulse_Typing.st_typing -> + Pulse_Syntax_Base.ppname -> + ((unit, unit, unit) Pulse_Checker_Base.checker_result_t, + unit) FStar_Tactics_Effect.tac_repr) + = + fun g -> + fun ctxt -> + fun ctxt_typing -> + fun uvs -> + fun t -> + fun c -> + fun d -> + fun res_ppname -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.fst" + (Prims.of_int (272)) (Prims.of_int (10)) + (Prims.of_int (272)) (Prims.of_int (48))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.fst" + (Prims.of_int (272)) (Prims.of_int (51)) + (Prims.of_int (328)) (Prims.of_int (65))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing_Env.push_context g "try_frame_pre" + t.Pulse_Syntax_Base.range2)) + (fun uu___ -> + (fun g1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (275)) + (Prims.of_int (4)) + (Prims.of_int (275)) + (Prims.of_int (56))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (272)) + (Prims.of_int (51)) + (Prims.of_int (328)) + (Prims.of_int (65))))) + (Obj.magic + (prove g1 ctxt () uvs + (Pulse_Syntax_Base.comp_pre c) ())) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | FStar_Pervasives.Mkdtuple4 + (g11, nts, remaining_ctxt, k_frame) + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (279)) + (Prims.of_int (4)) + (Prims.of_int (279)) + (Prims.of_int (49))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (281)) + (Prims.of_int (82)) + (Prims.of_int (328)) + (Prims.of_int (65))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + Pulse_Typing_Metatheory.st_typing_weakening + g1 uvs t c d g11)) + (fun uu___1 -> + (fun d1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (282)) + (Prims.of_int (10)) + (Prims.of_int (282)) + (Prims.of_int (35))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (282)) + (Prims.of_int (38)) + (Prims.of_int (328)) + (Prims.of_int (65))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + Pulse_Checker_Prover_Substs.nt_subst_st_term + t nts)) + (fun uu___1 -> + (fun t1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + ( + FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (283)) + (Prims.of_int (10)) + (Prims.of_int (283)) + (Prims.of_int (32))))) + ( + FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (283)) + (Prims.of_int (35)) + (Prims.of_int (328)) + (Prims.of_int (65))))) + ( + FStar_Tactics_Effect.lift_div_tac + (fun + uu___1 -> + Pulse_Checker_Prover_Substs.nt_subst_comp + c nts)) + ( + fun + uu___1 -> + (fun c1 + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (286)) + (Prims.of_int (4)) + (Prims.of_int (286)) + (Prims.of_int (47))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (286)) + (Prims.of_int (50)) + (Prims.of_int (328)) + (Prims.of_int (65))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___1 -> + Pulse_Checker_Prover_Substs.st_typing_nt_substs_derived + g11 uvs t + c d1 nts)) + (fun + uu___1 -> + (fun d2 + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (288)) + (Prims.of_int (82)) + (Prims.of_int (288)) + (Prims.of_int (102))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (288)) + (Prims.of_int (105)) + (Prims.of_int (328)) + (Prims.of_int (65))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___1 -> + coerce_eq + k_frame + ())) + (fun + uu___1 -> + (fun + k_frame1 + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (290)) + (Prims.of_int (10)) + (Prims.of_int (290)) + (Prims.of_int (18))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (290)) + (Prims.of_int (21)) + (Prims.of_int (328)) + (Prims.of_int (65))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___1 -> + Pulse_Typing_Env.fresh + g11)) + (fun + uu___1 -> + (fun x -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (291)) + (Prims.of_int (11)) + (Prims.of_int (291)) + (Prims.of_int (21))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (291)) + (Prims.of_int (24)) + (Prims.of_int (328)) + (Prims.of_int (65))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___1 -> + Pulse_Syntax_Base.comp_res + c1)) + (fun + uu___1 -> + (fun ty + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (292)) + (Prims.of_int (11)) + (Prims.of_int (292)) + (Prims.of_int (42))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (293)) + (Prims.of_int (31)) + (Prims.of_int (328)) + (Prims.of_int (65))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___1 -> + Pulse_Typing_Env.push_binding + g11 x + res_ppname + ty)) + (fun + uu___1 -> + (fun g2 + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (294)) + (Prims.of_int (14)) + (Prims.of_int (294)) + (Prims.of_int (75))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (294)) + (Prims.of_int (78)) + (Prims.of_int (328)) + (Prims.of_int (65))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___1 -> + Pulse_Checker_Prover_Base.op_Star + (Pulse_Syntax_Naming.open_term_nv + (Pulse_Syntax_Base.comp_post + c1) + (res_ppname, + x)) + remaining_ctxt)) + (fun + uu___1 -> + (fun + ctxt' -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (296)) + (Prims.of_int (29)) + (Prims.of_int (296)) + (Prims.of_int (73))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (296)) + (Prims.of_int (76)) + (Prims.of_int (328)) + (Prims.of_int (65))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___1 -> + Pulse_Typing_Metatheory.st_typing_weakening_standard + g11 t1 c1 + d2 g11)) + (fun + uu___1 -> + (fun d3 + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (301)) + (Prims.of_int (4)) + (Prims.of_int (301)) + (Prims.of_int (81))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (308)) + (Prims.of_int (35)) + (Prims.of_int (328)) + (Prims.of_int (65))))) + (Obj.magic + (Pulse_Checker_Base.continuation_elaborator_with_bind + g11 + remaining_ctxt + c1 t1 d3 + () + (res_ppname, + x))) + (fun k -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___1 -> + match + Pulse_Typing_Metatheory_Base.st_comp_typing_inversion_cofinite + g11 + (Pulse_Syntax_Base.st_comp_of_comp + c1) + (Pulse_Typing_Metatheory_Base.comp_typing_inversion + g11 c1 + (Pulse_Typing_Metatheory_Base.st_typing_correctness + g11 t1 c1 + d3)) + with + | + (comp_res_typing_in_g1, + uu___2, + f) -> + FStar_Pervasives.Mkdtuple5 + (x, g2, + (FStar_Pervasives.Mkdtuple3 + ((Pulse_Syntax_Base.comp_u + c1), ty, + ())), + (Prims.Mkdtuple2 + (ctxt', + ())), + (Pulse_Checker_Base.k_elab_trans + g1 g11 g2 + ctxt + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Syntax_Base.comp_pre + c1) + remaining_ctxt) + ctxt' + k_frame1 + (Pulse_Checker_Base.k_elab_equiv + g11 g2 + (Pulse_Checker_Prover_Base.op_Star + remaining_ctxt + (Pulse_Syntax_Base.comp_pre + c1)) + (Pulse_Syntax_Base.tm_star + (Pulse_Syntax_Base.comp_pre + c1) + remaining_ctxt) + ctxt' + ctxt' k + () ()))))))) + uu___1))) + uu___1))) + uu___1))) + uu___1))) + uu___1))) + uu___1))) + uu___1))) + uu___1))) + uu___1))) + uu___1))) uu___))) uu___) +let (try_frame_pre : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.vprop -> + unit -> + Pulse_Syntax_Base.st_term -> + Pulse_Syntax_Base.comp_st -> + (unit, unit, unit) Pulse_Typing.st_typing -> + Pulse_Syntax_Base.ppname -> + ((unit, unit, unit) Pulse_Checker_Base.checker_result_t, + unit) FStar_Tactics_Effect.tac_repr) + = + fun g -> + fun ctxt -> + fun ctxt_typing -> + fun t -> + fun c -> + fun d -> + fun res_ppname -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.fst" + (Prims.of_int (336)) (Prims.of_int (12)) + (Prims.of_int (336)) (Prims.of_int (32))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.fst" + (Prims.of_int (338)) (Prims.of_int (2)) + (Prims.of_int (338)) (Prims.of_int (48))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing_Env.mk_env + (Pulse_Typing_Env.fstar_env g))) + (fun uu___ -> + (fun uvs -> + Obj.magic + (try_frame_pre_uvs g ctxt () uvs t c d res_ppname)) + uu___) +let (prove_post_hint : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.vprop -> + (unit, unit, unit) Pulse_Checker_Base.checker_result_t -> + unit Pulse_Typing.post_hint_opt -> + Pulse_Syntax_Base.range -> + ((unit, unit, unit) Pulse_Checker_Base.checker_result_t, + unit) FStar_Tactics_Effect.tac_repr) + = + fun g -> + fun ctxt -> + fun r -> + fun post_hint -> + fun rng -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.fst" + (Prims.of_int (347)) (Prims.of_int (10)) + (Prims.of_int (347)) (Prims.of_int (46))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.fst" + (Prims.of_int (349)) (Prims.of_int (2)) + (Prims.of_int (393)) (Prims.of_int (102))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing_Env.push_context g "prove_post_hint" rng)) + (fun uu___ -> + (fun g1 -> + match post_hint with + | FStar_Pervasives_Native.None -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> r))) + | FStar_Pervasives_Native.Some post_hint1 -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (352)) + (Prims.of_int (79)) + (Prims.of_int (352)) + (Prims.of_int (80))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (351)) + (Prims.of_int (21)) + (Prims.of_int (393)) + (Prims.of_int (102))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> r)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | FStar_Pervasives.Mkdtuple5 + (x, g2, FStar_Pervasives.Mkdtuple3 + (u_ty, ty, ty_typing), + Prims.Mkdtuple2 + (ctxt', ctxt'_typing), k) + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (354)) + (Prims.of_int (17)) + (Prims.of_int (354)) + (Prims.of_int (44))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (354)) + (Prims.of_int (47)) + (Prims.of_int (393)) + (Prims.of_int (102))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + Pulse_Syntax_Base.mk_ppname_no_range + "_posth")) + (fun uu___1 -> + (fun ppname -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (355)) + (Prims.of_int (27)) + (Prims.of_int (355)) + (Prims.of_int (66))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (358)) + (Prims.of_int (4)) + (Prims.of_int (393)) + (Prims.of_int (102))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + Pulse_Syntax_Naming.open_term_nv + post_hint1.Pulse_Typing.post + (ppname, x))) + (fun uu___1 -> + (fun + post_hint_opened + -> + if + Prims.op_Negation + ( + Pulse_Syntax_Base.eq_tm + ty + post_hint1.Pulse_Typing.ret_ty) + then + Obj.magic + ( + Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (360)) + (Prims.of_int (11)) + (Prims.of_int (363)) + (Prims.of_int (50))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (359)) + (Prims.of_int (9)) + (Prims.of_int (363)) + (Prims.of_int (50))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (363)) + (Prims.of_int (14)) + (Prims.of_int (363)) + (Prims.of_int (49))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (360)) + (Prims.of_int (11)) + (Prims.of_int (363)) + (Prims.of_int (50))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + post_hint1.Pulse_Typing.ret_ty)) + (fun + uu___1 -> + (fun + uu___1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (360)) + (Prims.of_int (11)) + (Prims.of_int (363)) + (Prims.of_int (50))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (360)) + (Prims.of_int (11)) + (Prims.of_int (363)) + (Prims.of_int (50))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (362)) + (Prims.of_int (14)) + (Prims.of_int (362)) + (Prims.of_int (35))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + ty)) + (fun + uu___2 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + fun x1 -> + Prims.strcat + (Prims.strcat + "error in proving post hint:comp return type " + (Prims.strcat + uu___2 + " does not match the post hint ")) + (Prims.strcat + x1 ""))))) + (fun + uu___2 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + uu___2 + uu___1)))) + uu___1))) + (fun + uu___1 -> + (fun + uu___1 -> + Obj.magic + (Pulse_Typing_Env.fail + g1 + (FStar_Pervasives_Native.Some + rng) + uu___1)) + uu___1))) + else + Obj.magic + ( + Obj.repr + (if + Pulse_Syntax_Base.eq_tm + post_hint_opened + ctxt' + then + Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___2 -> + FStar_Pervasives.Mkdtuple5 + (x, g2, + (FStar_Pervasives.Mkdtuple3 + (u_ty, + ty, ())), + (Prims.Mkdtuple2 + (ctxt', + ())), k))) + else + Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (368)) + (Prims.of_int (8)) + (Prims.of_int (368)) + (Prims.of_int (90))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (366)) + (Prims.of_int (8)) + (Prims.of_int (393)) + (Prims.of_int (102))))) + (Obj.magic + (prove g2 + ctxt' () + (Pulse_Typing_Env.mk_env + (Pulse_Typing_Env.fstar_env + g2)) + post_hint_opened + ())) + (fun + uu___3 -> + (fun + uu___3 -> + match uu___3 + with + | + FStar_Pervasives.Mkdtuple4 + (g3, nts, + remaining_ctxt, + k_post) + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (373)) + (Prims.of_int (8)) + (Prims.of_int (373)) + (Prims.of_int (27))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (375)) + (Prims.of_int (6)) + (Prims.of_int (393)) + (Prims.of_int (102))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + coerce_eq + k_post ())) + (fun + uu___4 -> + (fun + k_post1 + -> + match + Pulse_Checker_Base.check_equiv_emp + g3 + remaining_ctxt + with + | + FStar_Pervasives_Native.None + -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (378)) + (Prims.of_int (10)) + (Prims.of_int (380)) + (Prims.of_int (47))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (377)) + (Prims.of_int (8)) + (Prims.of_int (380)) + (Prims.of_int (47))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.fst" + (Prims.of_int (380)) + (Prims.of_int (13)) + (Prims.of_int (380)) + (Prims.of_int (46))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + remaining_ctxt)) + (fun + uu___4 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___5 -> + Prims.strcat + "error in proving post hint:comp post contains extra vprops not matched in the post hint: " + (Prims.strcat + uu___4 + "\n"))))) + (fun + uu___4 -> + (fun + uu___4 -> + Obj.magic + (Pulse_Typing_Env.fail + g1 + (FStar_Pervasives_Native.Some + rng) + uu___4)) + uu___4))) + | + FStar_Pervasives_Native.Some + d -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + FStar_Pervasives.Mkdtuple5 + (x, g3, + (FStar_Pervasives.Mkdtuple3 + (u_ty, + ty, ())), + (Prims.Mkdtuple2 + (post_hint_opened, + ())), + (Pulse_Checker_Base.k_elab_trans + g g2 g3 + ctxt + (FStar_Pervasives.dfst + (Prims.Mkdtuple2 + (ctxt', + ()))) + post_hint_opened + k + (Pulse_Checker_Base.k_elab_equiv + g2 g3 + ctxt' + ctxt' + (Pulse_Checker_Prover_Base.op_Star + post_hint_opened + remaining_ctxt) + post_hint_opened + k_post1 + () ()))))))) + uu___4))) + uu___3))))) + uu___1))) + uu___1))) uu___)))) uu___) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Checker_Prover_Base.ml b/src/ocaml/plugin/generated/Pulse_Checker_Prover_Base.ml new file mode 100644 index 000000000..a9776ab3c --- /dev/null +++ b/src/ocaml/plugin/generated/Pulse_Checker_Prover_Base.ml @@ -0,0 +1,986 @@ +open Prims +type ('g, 't) vprop_typing = unit +type mk_t = + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.vprop -> + unit -> + ((Pulse_Syntax_Base.ppname, Pulse_Syntax_Base.st_term, + Pulse_Syntax_Base.comp, (unit, unit, unit) Pulse_Typing.st_typing) + FStar_Pervasives.dtuple4 FStar_Pervasives_Native.option, + unit) FStar_Tactics_Effect.tac_repr +let rec (list_as_vprop' : + Pulse_Syntax_Base.vprop -> + Pulse_Syntax_Base.vprop Prims.list -> Pulse_Syntax_Base.vprop) + = + fun vp -> + fun fvps -> + match fvps with + | [] -> vp + | hd::tl -> list_as_vprop' (Pulse_Syntax_Base.tm_star vp hd) tl +let rec (canon_right_aux : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.vprop Prims.list -> + (Pulse_Syntax_Base.vprop -> + (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) + -> + ((Pulse_Syntax_Base.vprop Prims.list, + Pulse_Syntax_Base.vprop Prims.list, unit) FStar_Pervasives.dtuple3, + unit) FStar_Tactics_Effect.tac_repr) + = + fun uu___2 -> + fun uu___1 -> + fun uu___ -> + (fun g -> + fun vps -> + fun f -> + match vps with + | [] -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + FStar_Pervasives.Mkdtuple3 ([], [], ())))) + | hd::rest -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (25)) (Prims.of_int (7)) + (Prims.of_int (25)) (Prims.of_int (11))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (25)) (Prims.of_int (4)) + (Prims.of_int (49)) (Prims.of_int (7))))) + (Obj.magic (f hd)) + (fun uu___ -> + (fun uu___ -> + if uu___ + then + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (27)) + (Prims.of_int (32)) + (Prims.of_int (27)) + (Prims.of_int (56))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (26)) + (Prims.of_int (14)) + (Prims.of_int (43)) + (Prims.of_int (34))))) + (Obj.magic (canon_right_aux g rest f)) + (fun uu___1 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + match uu___1 with + | FStar_Pervasives.Mkdtuple3 + (vps', fvps, uu___3) -> + FStar_Pervasives.Mkdtuple3 + (vps', (hd :: fvps), + ())))) + else + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (46)) + (Prims.of_int (33)) + (Prims.of_int (46)) + (Prims.of_int (57))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (45)) + (Prims.of_int (14)) + (Prims.of_int (48)) + (Prims.of_int (33))))) + (Obj.magic (canon_right_aux g rest f)) + (fun uu___2 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___3 -> + match uu___2 with + | FStar_Pervasives.Mkdtuple3 + (vps', pures, uu___4) -> + FStar_Pervasives.Mkdtuple3 + ((hd :: vps'), pures, + ()))))) uu___)))) + uu___2 uu___1 uu___ +let (canon_right : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.term -> + unit -> + (Pulse_Syntax_Base.vprop -> + (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) + -> + ((Pulse_Syntax_Base.term, unit, + (unit, unit, unit, unit) + Pulse_Checker_Base.continuation_elaborator) + FStar_Pervasives.dtuple3, + unit) FStar_Tactics_Effect.tac_repr) + = + fun g -> + fun ctxt -> + fun frame -> + fun ctxt_frame_typing -> + fun f -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (59)) (Prims.of_int (33)) + (Prims.of_int (59)) (Prims.of_int (73))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (59)) (Prims.of_int (3)) + (Prims.of_int (64)) (Prims.of_int (110))))) + (Obj.magic + (canon_right_aux g + (Pulse_Typing_Combinators.vprop_as_list ctxt) f)) + (fun uu___ -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + match uu___ with + | FStar_Pervasives.Mkdtuple3 (vps', pures, veq) -> + FStar_Pervasives.Mkdtuple3 + ((list_as_vprop' + (Pulse_Typing_Combinators.list_as_vprop vps') + pures), (), + (Pulse_Checker_Base.k_elab_equiv g g + (Pulse_Syntax_Base.tm_star ctxt frame) + (Pulse_Syntax_Base.tm_star ctxt frame) + (Pulse_Syntax_Base.tm_star ctxt frame) + (Pulse_Syntax_Base.tm_star + (list_as_vprop' + (Pulse_Typing_Combinators.list_as_vprop + vps') pures) frame) + (Pulse_Checker_Base.k_elab_unit g + (Pulse_Syntax_Base.tm_star ctxt frame)) + () ())))) +let (elim_one : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.vprop -> + Pulse_Syntax_Base.vprop -> + unit -> + Pulse_Syntax_Base.ppname -> + Pulse_Syntax_Base.st_term -> + Pulse_Syntax_Base.comp -> + (unit, unit, unit) Pulse_Typing.st_typing -> + Pulse_Typing_Env.env -> + ((Pulse_Typing_Env.env, Pulse_Syntax_Base.term, + unit, + (unit, unit, unit, unit) + Pulse_Checker_Base.continuation_elaborator) + FStar_Pervasives.dtuple4, + unit) FStar_Tactics_Effect.tac_repr) + = + fun g -> + fun ctxt -> + fun frame -> + fun p -> + fun ctxt_frame_p_typing -> + fun nx -> + fun e1 -> + fun c1 -> + fun e1_typing -> + fun uvs -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (78)) (Prims.of_int (26)) + (Prims.of_int (78)) (Prims.of_int (69))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (78)) (Prims.of_int (72)) + (Prims.of_int (102)) (Prims.of_int (40))))) + (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> ())) + (fun uu___ -> + (fun ctxt_frame_typing -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (79)) + (Prims.of_int (10)) + (Prims.of_int (79)) + (Prims.of_int (32))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (79)) + (Prims.of_int (35)) + (Prims.of_int (102)) + (Prims.of_int (40))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing_Env.fresh + (Pulse_Typing_Env.push_env g uvs))) + (fun uu___ -> + (fun x -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (80)) + (Prims.of_int (15)) + (Prims.of_int (80)) + (Prims.of_int (42))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (80)) + (Prims.of_int (45)) + (Prims.of_int (102)) + (Prims.of_int (40))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Syntax_Base.mk_ppname_no_range + "_pelim")) + (fun uu___ -> + (fun ppname -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (82)) + (Prims.of_int (4)) + (Prims.of_int (82)) + (Prims.of_int (100))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (102)) + (Prims.of_int (2)) + (Prims.of_int (102)) + (Prims.of_int (40))))) + (Obj.magic + (Pulse_Checker_Base.continuation_elaborator_with_bind + g + (Pulse_Syntax_Base.tm_star + ctxt frame) + c1 e1 + e1_typing () + (ppname, x))) + (fun k -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + FStar_Pervasives.Mkdtuple4 + ((Pulse_Typing_Env.push_binding + g x nx + (Pulse_Syntax_Base.comp_res + c1)), + (Pulse_Syntax_Base.tm_star + (Pulse_Syntax_Naming.open_term_nv + (Pulse_Syntax_Base.comp_post + c1) + (Pulse_Syntax_Base.v_as_nv + x)) ctxt), + (), + (Pulse_Checker_Base.k_elab_equiv + g + (Pulse_Typing_Env.push_binding + g x nx + (Pulse_Syntax_Base.comp_res + c1)) + (Pulse_Syntax_Base.tm_star + (Pulse_Syntax_Base.tm_star + ctxt + frame) p) + (Pulse_Syntax_Base.tm_star + (Pulse_Syntax_Base.tm_star + ctxt + frame) p) + (Pulse_Syntax_Base.tm_star + (Pulse_Syntax_Naming.open_term_nv + (Pulse_Syntax_Base.comp_post + c1) + (Pulse_Syntax_Base.v_as_nv + x)) + (Pulse_Syntax_Base.tm_star + ctxt + frame)) + (Pulse_Syntax_Base.tm_star + (Pulse_Syntax_Base.tm_star + (Pulse_Syntax_Naming.open_term_nv + (Pulse_Syntax_Base.comp_post + c1) + (Pulse_Syntax_Base.v_as_nv + x)) ctxt) + frame) k + () ())))))) + uu___))) uu___))) uu___) +let rec (elim_all : + Pulse_Typing_Env.env -> + (Pulse_Syntax_Base.vprop -> + (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) + -> + mk_t -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.term -> + unit -> + Pulse_Typing_Env.env -> + ((Prims.bool * (Pulse_Typing_Env.env, Pulse_Syntax_Base.term, + unit, + (unit, unit, unit, unit) + Pulse_Checker_Base.continuation_elaborator) + FStar_Pervasives.dtuple4), + unit) FStar_Tactics_Effect.tac_repr) + = + fun uu___6 -> + fun uu___5 -> + fun uu___4 -> + fun uu___3 -> + fun uu___2 -> + fun uu___1 -> + fun uu___ -> + (fun g -> + fun f -> + fun mk -> + fun ctxt -> + fun frame -> + fun ctxt_frame_typing -> + fun uvs -> + match ctxt.Pulse_Syntax_Base.t with + | Pulse_Syntax_Base.Tm_Star (ctxt', p) -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (117)) + (Prims.of_int (9)) + (Prims.of_int (117)) + (Prims.of_int (89))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (118)) + (Prims.of_int (7)) + (Prims.of_int (138)) + (Prims.of_int (10))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> ())) + (fun uu___ -> + (fun p_typing -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (118)) + (Prims.of_int (10)) + (Prims.of_int (118)) + (Prims.of_int (13))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (118)) + (Prims.of_int (7)) + (Prims.of_int (138)) + (Prims.of_int (10))))) + (Obj.magic (f p)) + (fun uu___ -> + (fun uu___ -> + if uu___ + then + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (119)) + (Prims.of_int (18)) + (Prims.of_int (119)) + (Prims.of_int (35))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (119)) + (Prims.of_int (12)) + (Prims.of_int (135)) + (Prims.of_int (70))))) + (Obj.magic + (mk g p + ())) + (fun + uu___1 -> + (fun + uu___1 -> + match uu___1 + with + | + FStar_Pervasives_Native.Some + (FStar_Pervasives.Mkdtuple4 + (nx, e1, + c1, + e1_typing)) + -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (122)) + (Prims.of_int (16)) + (Prims.of_int (122)) + (Prims.of_int (72))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (120)) + (Prims.of_int (49)) + (Prims.of_int (133)) + (Prims.of_int (71))))) + (Obj.magic + (elim_one + g ctxt' + frame p + () nx e1 + c1 + e1_typing + uvs)) + (fun + uu___2 -> + (fun + uu___2 -> + match uu___2 + with + | + FStar_Pervasives.Mkdtuple4 + (g', + uu___3, + ctxt_typing', + k) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (125)) + (Prims.of_int (65)) + (Prims.of_int (125)) + (Prims.of_int (66))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (125)) + (Prims.of_int (69)) + (Prims.of_int (133)) + (Prims.of_int (71))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + k)) + (fun + uu___4 -> + (fun k1 + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (129)) + (Prims.of_int (16)) + (Prims.of_int (130)) + (Prims.of_int (42))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (130)) + (Prims.of_int (45)) + (Prims.of_int (133)) + (Prims.of_int (71))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + Pulse_Checker_Base.k_elab_equiv + g g' + (Pulse_Syntax_Base.tm_star + (Pulse_Syntax_Base.tm_star + ctxt' + frame) p) + (Pulse_Syntax_Base.tm_star + (Pulse_Syntax_Base.tm_star + ctxt' p) + frame) + (Pulse_Syntax_Base.tm_star + uu___3 + frame) + (Pulse_Syntax_Base.tm_star + uu___3 + frame) k1 + () ())) + (fun + uu___4 -> + (fun k2 + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (132)) + (Prims.of_int (16)) + (Prims.of_int (132)) + (Prims.of_int (50))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (130)) + (Prims.of_int (45)) + (Prims.of_int (133)) + (Prims.of_int (71))))) + (Obj.magic + (elim_all + g' f mk + uu___3 + frame () + uvs)) + (fun + uu___4 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___5 -> + match uu___4 + with + | + (uu___6, + FStar_Pervasives.Mkdtuple4 + (g'', + ctxt'', + ctxt_typing'', + k')) -> + (true, + (FStar_Pervasives.Mkdtuple4 + (g'', + ctxt'', + (), + (Pulse_Checker_Base.k_elab_trans + g g' g'' + (Pulse_Syntax_Base.tm_star + (Pulse_Syntax_Base.tm_star + ctxt' p) + frame) + (Pulse_Syntax_Base.tm_star + uu___3 + frame) + (Pulse_Syntax_Base.tm_star + ctxt'' + frame) k2 + k')))))))) + uu___4))) + uu___4))) + uu___2))) + | + FStar_Pervasives_Native.None + -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___2 -> + (false, + (FStar_Pervasives.Mkdtuple4 + (g, ctxt, + (), + (Pulse_Checker_Base.k_elab_unit + g + (Pulse_Syntax_Base.tm_star + ctxt + frame))))))))) + uu___1))) + else + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___2 -> + (false, + (FStar_Pervasives.Mkdtuple4 + (g, ctxt, + (), + (Pulse_Checker_Base.k_elab_unit + g + (Pulse_Syntax_Base.tm_star + ctxt + frame))))))))) + uu___))) uu___))) + | uu___ -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + (false, + (FStar_Pervasives.Mkdtuple4 + (g, ctxt, (), + (Pulse_Checker_Base.k_elab_unit + g + (Pulse_Syntax_Base.tm_star + ctxt frame))))))))) + uu___6 uu___5 uu___4 uu___3 uu___2 uu___1 uu___ +let (add_elims_aux : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.term -> + (Pulse_Syntax_Base.vprop -> + (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) + -> + mk_t -> + unit -> + Pulse_Typing_Env.env -> + ((Prims.bool * (Pulse_Typing_Env.env, Pulse_Syntax_Base.term, + unit, + (unit, unit, unit, unit) + Pulse_Checker_Base.continuation_elaborator) + FStar_Pervasives.dtuple4), + unit) FStar_Tactics_Effect.tac_repr) + = + fun g -> + fun ctxt -> + fun frame -> + fun f -> + fun mk -> + fun ctxt_frame_typing -> + fun uvs -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (152)) (Prims.of_int (40)) + (Prims.of_int (152)) (Prims.of_int (71))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (152)) (Prims.of_int (4)) + (Prims.of_int (155)) (Prims.of_int (66))))) + (Obj.magic (canon_right g ctxt frame () f)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | FStar_Pervasives.Mkdtuple3 (ctxt', ctxt'_typing, k) + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (154)) + (Prims.of_int (9)) + (Prims.of_int (154)) + (Prims.of_int (39))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (152)) + (Prims.of_int (74)) + (Prims.of_int (155)) + (Prims.of_int (66))))) + (Obj.magic + (elim_all g f mk ctxt' frame () uvs)) + (fun uu___1 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + match uu___1 with + | (progress, + FStar_Pervasives.Mkdtuple4 + (g', ctxt'', ctxt''_typing, k')) + -> + (progress, + (FStar_Pervasives.Mkdtuple4 + (g', ctxt'', (), + (Pulse_Checker_Base.k_elab_trans + g g g' + (Pulse_Syntax_Base.tm_star + ctxt frame) + (Pulse_Syntax_Base.tm_star + ctxt' frame) + (Pulse_Syntax_Base.tm_star + ctxt'' frame) k k')))))))) + uu___) +let rec (add_elims : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.term -> + (Pulse_Syntax_Base.vprop -> + (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) + -> + mk_t -> + unit -> + Pulse_Typing_Env.env -> + ((Pulse_Typing_Env.env, Pulse_Syntax_Base.term, unit, + (unit, unit, unit, unit) + Pulse_Checker_Base.continuation_elaborator) + FStar_Pervasives.dtuple4, + unit) FStar_Tactics_Effect.tac_repr) + = + fun g -> + fun ctxt -> + fun frame -> + fun f -> + fun mk -> + fun ctxt_typing -> + fun uvs -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (166)) (Prims.of_int (25)) + (Prims.of_int (166)) (Prims.of_int (59))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (166)) (Prims.of_int (4)) + (Prims.of_int (173)) (Prims.of_int (6))))) + (Obj.magic (add_elims_aux g ctxt frame f mk () uvs)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | (progress, res) -> + if Prims.op_Negation progress + then + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> res))) + else + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (170)) + (Prims.of_int (45)) + (Prims.of_int (170)) + (Prims.of_int (48))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (169)) + (Prims.of_int (10)) + (Prims.of_int (173)) + (Prims.of_int (6))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> res)) + (fun uu___2 -> + (fun uu___2 -> + match uu___2 with + | FStar_Pervasives.Mkdtuple4 + (g', ctxt', ctxt'_typing, k) + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (171)) + (Prims.of_int (49)) + (Prims.of_int (171)) + (Prims.of_int (80))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Base.fst" + (Prims.of_int (170)) + (Prims.of_int (51)) + (Prims.of_int (172)) + (Prims.of_int (57))))) + (Obj.magic + (add_elims g' ctxt' + frame f mk () uvs)) + (fun uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___4 -> + match uu___3 + with + | FStar_Pervasives.Mkdtuple4 + (g'', + ctxt'', + ctxt''_typing, + k') + -> + FStar_Pervasives.Mkdtuple4 + (g'', + ctxt'', + (), + (Pulse_Checker_Base.k_elab_trans + g g' g'' + (Pulse_Syntax_Base.tm_star + ctxt + frame) + (Pulse_Syntax_Base.tm_star + ctxt' + frame) + (Pulse_Syntax_Base.tm_star + ctxt'' + frame) k + k')))))) + uu___2)))) uu___) +type preamble = + { + g0: Pulse_Typing_Env.env ; + ctxt: Pulse_Syntax_Base.vprop ; + frame: Pulse_Syntax_Base.vprop ; + ctxt_frame_typing: unit ; + goals: Pulse_Syntax_Base.vprop } +let (__proj__Mkpreamble__item__g0 : preamble -> Pulse_Typing_Env.env) = + fun projectee -> + match projectee with + | { g0; ctxt; frame; ctxt_frame_typing; goals;_} -> g0 +let (__proj__Mkpreamble__item__ctxt : preamble -> Pulse_Syntax_Base.vprop) = + fun projectee -> + match projectee with + | { g0; ctxt; frame; ctxt_frame_typing; goals;_} -> ctxt +let (__proj__Mkpreamble__item__frame : preamble -> Pulse_Syntax_Base.vprop) = + fun projectee -> + match projectee with + | { g0; ctxt; frame; ctxt_frame_typing; goals;_} -> frame + +let (__proj__Mkpreamble__item__goals : preamble -> Pulse_Syntax_Base.vprop) = + fun projectee -> + match projectee with + | { g0; ctxt; frame; ctxt_frame_typing; goals;_} -> goals +let (op_Array_Access : + Pulse_Checker_Prover_Substs.ss_t -> + Pulse_Syntax_Base.term -> Pulse_Syntax_Base.term) + = fun ss -> fun t -> Pulse_Checker_Prover_Substs.ss_term t ss +let (op_Star : + Pulse_Syntax_Base.vprop -> + Pulse_Syntax_Base.vprop -> Pulse_Syntax_Base.term) + = Pulse_Syntax_Base.tm_star +type 'preamble1 prover_state = + { + pg: Pulse_Typing_Env.env ; + remaining_ctxt: Pulse_Syntax_Base.vprop Prims.list ; + remaining_ctxt_frame_typing: unit ; + uvs: Pulse_Typing_Env.env ; + ss: Pulse_Checker_Prover_Substs.ss_t ; + solved: Pulse_Syntax_Base.vprop ; + unsolved: Pulse_Syntax_Base.vprop Prims.list ; + k: (unit, unit, unit, unit) Pulse_Checker_Base.continuation_elaborator ; + goals_inv: unit ; + solved_inv: unit } +let (__proj__Mkprover_state__item__pg : + preamble -> unit prover_state -> Pulse_Typing_Env.env) = + fun preamble1 -> + fun projectee -> + match projectee with + | { pg; remaining_ctxt; remaining_ctxt_frame_typing; uvs; ss; solved; + unsolved; k; goals_inv; solved_inv;_} -> pg +let (__proj__Mkprover_state__item__remaining_ctxt : + preamble -> unit prover_state -> Pulse_Syntax_Base.vprop Prims.list) = + fun preamble1 -> + fun projectee -> + match projectee with + | { pg; remaining_ctxt; remaining_ctxt_frame_typing; uvs; ss; solved; + unsolved; k; goals_inv; solved_inv;_} -> remaining_ctxt + +let (__proj__Mkprover_state__item__uvs : + preamble -> unit prover_state -> Pulse_Typing_Env.env) = + fun preamble1 -> + fun projectee -> + match projectee with + | { pg; remaining_ctxt; remaining_ctxt_frame_typing; uvs; ss; solved; + unsolved; k; goals_inv; solved_inv;_} -> uvs +let (__proj__Mkprover_state__item__ss : + preamble -> unit prover_state -> Pulse_Checker_Prover_Substs.ss_t) = + fun preamble1 -> + fun projectee -> + match projectee with + | { pg; remaining_ctxt; remaining_ctxt_frame_typing; uvs; ss; solved; + unsolved; k; goals_inv; solved_inv;_} -> ss +let (__proj__Mkprover_state__item__solved : + preamble -> unit prover_state -> Pulse_Syntax_Base.vprop) = + fun preamble1 -> + fun projectee -> + match projectee with + | { pg; remaining_ctxt; remaining_ctxt_frame_typing; uvs; ss; solved; + unsolved; k; goals_inv; solved_inv;_} -> solved +let (__proj__Mkprover_state__item__unsolved : + preamble -> unit prover_state -> Pulse_Syntax_Base.vprop Prims.list) = + fun preamble1 -> + fun projectee -> + match projectee with + | { pg; remaining_ctxt; remaining_ctxt_frame_typing; uvs; ss; solved; + unsolved; k; goals_inv; solved_inv;_} -> unsolved +let (__proj__Mkprover_state__item__k : + preamble -> + unit prover_state -> + (unit, unit, unit, unit) Pulse_Checker_Base.continuation_elaborator) + = + fun preamble1 -> + fun projectee -> + match projectee with + | { pg; remaining_ctxt; remaining_ctxt_frame_typing; uvs; ss; solved; + unsolved; k; goals_inv; solved_inv;_} -> k +type ('preamble1, 'st) is_terminal = unit +let (extend_post_hint_opt_g : + Pulse_Typing_Env.env -> + unit Pulse_Typing.post_hint_opt -> + Pulse_Typing_Env.env -> unit Pulse_Typing.post_hint_opt) + = + fun g -> + fun post_hint -> + fun g1 -> + match post_hint with + | FStar_Pervasives_Native.None -> FStar_Pervasives_Native.None + | FStar_Pervasives_Native.Some post_hint1 -> + FStar_Pervasives_Native.Some post_hint1 +type ('ss1, 'ss2) ss_extends = unit +type ('preamble1, 'pst1, 'pst2) pst_extends = unit +type prover_t = + preamble -> + unit prover_state -> + (unit prover_state, unit) FStar_Tactics_Effect.tac_repr \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Checker_Prover_ElimExists.ml b/src/ocaml/plugin/generated/Pulse_Checker_Prover_ElimExists.ml new file mode 100644 index 000000000..37f595dee --- /dev/null +++ b/src/ocaml/plugin/generated/Pulse_Checker_Prover_ElimExists.ml @@ -0,0 +1,257 @@ +open Prims +let (should_elim_exists : + Pulse_Syntax_Base.vprop -> (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) + = + fun uu___ -> + (fun v -> + Obj.magic + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + match v.Pulse_Syntax_Base.t with + | Pulse_Syntax_Base.Tm_ExistsSL (uu___1, uu___2, uu___3) -> + true + | uu___1 -> false))) uu___ +let (mk : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.vprop -> + unit -> + ((Pulse_Syntax_Base.ppname, Pulse_Syntax_Base.st_term, + Pulse_Syntax_Base.comp, (unit, unit, unit) Pulse_Typing.st_typing) + FStar_Pervasives.dtuple4 FStar_Pervasives_Native.option, + unit) FStar_Tactics_Effect.tac_repr) + = + fun uu___2 -> + fun uu___1 -> + fun uu___ -> + (fun g -> + fun v -> + fun v_typing -> + Obj.magic + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + match v.Pulse_Syntax_Base.t with + | Pulse_Syntax_Base.Tm_ExistsSL + (u, + { Pulse_Syntax_Base.binder_ty = t; + Pulse_Syntax_Base.binder_ppname = nm;_}, + p) + -> + FStar_Pervasives_Native.Some + (FStar_Pervasives.Mkdtuple4 + (nm, + (Pulse_Typing.wr + (Pulse_Syntax_Base.Tm_ElimExists + { + Pulse_Syntax_Base.p1 = + (Pulse_Syntax_Base.tm_exists_sl + (Pulse_Syntax_Base.comp_u + (Pulse_Typing.comp_elim_exists + u t p + (nm, + (Pulse_Typing_Env.fresh + g)))) + (Pulse_Typing.as_binder t) p) + })), + (Pulse_Typing.comp_elim_exists u t p + (nm, (Pulse_Typing_Env.fresh g))), + (Pulse_Typing.T_ElimExists + (g, + (Pulse_Syntax_Base.comp_u + (Pulse_Typing.comp_elim_exists u t + p + (nm, (Pulse_Typing_Env.fresh g)))), + t, p, (Pulse_Typing_Env.fresh g), (), + ())))) + | uu___1 -> FStar_Pervasives_Native.None))) uu___2 + uu___1 uu___ +let (elim_exists_frame : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.vprop -> + Pulse_Syntax_Base.vprop -> + unit -> + Pulse_Typing_Env.env -> + ((Pulse_Typing_Env.env, Pulse_Syntax_Base.term, unit, + (unit, unit, unit, unit) + Pulse_Checker_Base.continuation_elaborator) + FStar_Pervasives.dtuple4, + unit) FStar_Tactics_Effect.tac_repr) + = + fun g -> + fun ctxt -> + fun frame -> + fun ctxt_frame_typing -> + fun uvs -> + Pulse_Checker_Prover_Base.add_elims g ctxt frame + should_elim_exists mk () uvs +let (elim_exists : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + unit -> + ((Pulse_Typing_Env.env, Pulse_Syntax_Base.term, unit, + (unit, unit, unit, unit) + Pulse_Checker_Base.continuation_elaborator) + FStar_Pervasives.dtuple4, + unit) FStar_Tactics_Effect.tac_repr) + = + fun g -> + fun ctxt -> + fun ctxt_typing -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.ElimExists.fst" + (Prims.of_int (50)) (Prims.of_int (70)) + (Prims.of_int (50)) (Prims.of_int (78))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.ElimExists.fst" + (Prims.of_int (50)) (Prims.of_int (81)) + (Prims.of_int (55)) (Prims.of_int (62))))) + (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> ())) + (fun uu___ -> + (fun ctxt_emp_typing -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.ElimExists.fst" + (Prims.of_int (52)) (Prims.of_int (4)) + (Prims.of_int (52)) (Prims.of_int (60))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.ElimExists.fst" + (Prims.of_int (50)) (Prims.of_int (81)) + (Prims.of_int (55)) (Prims.of_int (62))))) + (Obj.magic + (elim_exists_frame g ctxt Pulse_Syntax_Base.tm_emp () + (Pulse_Typing_Env.mk_env + (Pulse_Typing_Env.fstar_env g)))) + (fun uu___ -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + match uu___ with + | FStar_Pervasives.Mkdtuple4 + (g', ctxt', ctxt'_emp_typing, k) -> + FStar_Pervasives.Mkdtuple4 + (g', ctxt', (), + (Pulse_Checker_Base.k_elab_equiv g g' + (Pulse_Checker_Prover_Base.op_Star + ctxt Pulse_Syntax_Base.tm_emp) + ctxt + (Pulse_Checker_Prover_Base.op_Star + ctxt' Pulse_Syntax_Base.tm_emp) + ctxt' k () ())))))) uu___) +let (elim_exists_pst : + Pulse_Checker_Prover_Base.preamble -> + unit Pulse_Checker_Prover_Base.prover_state -> + (unit Pulse_Checker_Prover_Base.prover_state, unit) + FStar_Tactics_Effect.tac_repr) + = + fun preamble -> + fun pst -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.ElimExists.fst" + (Prims.of_int (62)) (Prims.of_int (4)) (Prims.of_int (67)) + (Prims.of_int (13))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.ElimExists.fst" + (Prims.of_int (59)) (Prims.of_int (74)) (Prims.of_int (97)) + (Prims.of_int (3))))) + (Obj.magic + (elim_exists_frame pst.Pulse_Checker_Prover_Base.pg + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.remaining_ctxt) + (Pulse_Checker_Prover_Base.op_Star + preamble.Pulse_Checker_Prover_Base.frame + (Pulse_Checker_Prover_Base.op_Array_Access + pst.Pulse_Checker_Prover_Base.ss + pst.Pulse_Checker_Prover_Base.solved)) () + pst.Pulse_Checker_Prover_Base.uvs)) + (fun uu___ -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + match uu___ with + | FStar_Pervasives.Mkdtuple4 (g', remaining_ctxt', ty, k) -> + { + Pulse_Checker_Prover_Base.pg = g'; + Pulse_Checker_Prover_Base.remaining_ctxt = + (Pulse_Typing_Combinators.vprop_as_list + remaining_ctxt'); + Pulse_Checker_Prover_Base.remaining_ctxt_frame_typing = + (); + Pulse_Checker_Prover_Base.uvs = + (pst.Pulse_Checker_Prover_Base.uvs); + Pulse_Checker_Prover_Base.ss = + (pst.Pulse_Checker_Prover_Base.ss); + Pulse_Checker_Prover_Base.solved = + (pst.Pulse_Checker_Prover_Base.solved); + Pulse_Checker_Prover_Base.unsolved = + (pst.Pulse_Checker_Prover_Base.unsolved); + Pulse_Checker_Prover_Base.k = + (Pulse_Checker_Base.k_elab_trans + preamble.Pulse_Checker_Prover_Base.g0 + (Pulse_Checker_Prover_Base.__proj__Mkprover_state__item__pg + preamble pst) g' + (Pulse_Checker_Prover_Base.op_Star + preamble.Pulse_Checker_Prover_Base.ctxt + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + (Pulse_Checker_Prover_Base.__proj__Mkprover_state__item__remaining_ctxt + preamble pst)) + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + (Pulse_Checker_Prover_Base.__proj__Mkprover_state__item__ss + preamble pst) + (Pulse_Checker_Prover_Base.__proj__Mkprover_state__item__solved + preamble pst))) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + remaining_ctxt' + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst.Pulse_Checker_Prover_Base.ss + pst.Pulse_Checker_Prover_Base.solved)) + pst.Pulse_Checker_Prover_Base.k + (Pulse_Checker_Base.k_elab_equiv + pst.Pulse_Checker_Prover_Base.pg g' + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.remaining_ctxt) + (Pulse_Checker_Prover_Base.op_Star + preamble.Pulse_Checker_Prover_Base.frame + (Pulse_Checker_Prover_Base.op_Array_Access + pst.Pulse_Checker_Prover_Base.ss + pst.Pulse_Checker_Prover_Base.solved))) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst.Pulse_Checker_Prover_Base.ss + pst.Pulse_Checker_Prover_Base.solved)) + (Pulse_Checker_Prover_Base.op_Star + remaining_ctxt' + (Pulse_Checker_Prover_Base.op_Star + preamble.Pulse_Checker_Prover_Base.frame + (Pulse_Checker_Prover_Base.op_Array_Access + pst.Pulse_Checker_Prover_Base.ss + pst.Pulse_Checker_Prover_Base.solved))) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + remaining_ctxt' + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst.Pulse_Checker_Prover_Base.ss + pst.Pulse_Checker_Prover_Base.solved)) k + () ())); + Pulse_Checker_Prover_Base.goals_inv = (); + Pulse_Checker_Prover_Base.solved_inv = () + })) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Checker_Prover_ElimPure.ml b/src/ocaml/plugin/generated/Pulse_Checker_Prover_ElimPure.ml new file mode 100644 index 000000000..3994038e0 --- /dev/null +++ b/src/ocaml/plugin/generated/Pulse_Checker_Prover_ElimPure.ml @@ -0,0 +1,302 @@ +open Prims +let (elim_pure_head : Pulse_Syntax_Base.term) = + let elim_pure_explicit_lid = + Pulse_Reflection_Util.mk_steel_wrapper_lid "elim_pure_explicit" in + Pulse_Syntax_Pure.tm_fvar (Pulse_Syntax_Base.as_fv elim_pure_explicit_lid) +let (elim_pure_head_ty : FStar_Reflection_Types.term) = + let squash_p = + Pulse_Reflection_Util.mk_squash Pulse_Syntax_Pure.u0 + (FStar_Reflection_Typing.bound_var Prims.int_zero) in + let pure_p = + Pulse_Reflection_Util.mk_pure + (FStar_Reflection_Typing.bound_var Prims.int_zero) in + let post = + Pulse_Reflection_Util.mk_abs squash_p FStar_Reflection_V2_Data.Q_Explicit + (FStar_Reflection_V2_Builtins.pack_ln + (FStar_Reflection_V2_Data.Tv_FVar + (FStar_Reflection_V2_Builtins.pack_fv + Pulse_Reflection_Util.emp_lid))) in + let cod = + Pulse_Reflection_Util.mk_stt_ghost_comp Pulse_Syntax_Pure.u0 squash_p + Pulse_Reflection_Util.emp_inames_tm pure_p post in + Pulse_Reflection_Util.mk_arrow + ((FStar_Reflection_V2_Builtins.pack_ln + (FStar_Reflection_V2_Data.Tv_FVar + (FStar_Reflection_V2_Builtins.pack_fv + FStar_Reflection_Const.prop_qn))), + FStar_Reflection_V2_Data.Q_Explicit) cod +let (tm_fstar : Pulse_Syntax_Base.host_term -> Pulse_Syntax_Base.term) = + fun t -> Pulse_Syntax_Base.tm_fstar t FStar_Range.range_0 + +let (mk_elim_pure : Pulse_Syntax_Base.term -> Pulse_Syntax_Base.st_term) = + fun p -> + let t = + Pulse_Syntax_Base.Tm_STApp + { + Pulse_Syntax_Base.head = elim_pure_head; + Pulse_Syntax_Base.arg_qual = FStar_Pervasives_Native.None; + Pulse_Syntax_Base.arg = p + } in + Pulse_Typing.wr t +let (elim_pure_comp : Pulse_Syntax_Base.host_term -> Pulse_Syntax_Base.comp) + = + fun p -> + let st = + { + Pulse_Syntax_Base.u = Pulse_Syntax_Pure.u_zero; + Pulse_Syntax_Base.res = + (tm_fstar (Pulse_Reflection_Util.mk_squash Pulse_Syntax_Pure.u0 p)); + Pulse_Syntax_Base.pre = (Pulse_Syntax_Base.tm_pure (tm_fstar p)); + Pulse_Syntax_Base.post = Pulse_Syntax_Base.tm_emp + } in + Pulse_Syntax_Base.C_STGhost (Pulse_Syntax_Base.tm_emp_inames, st) +let (elim_pure_typing : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.host_term -> + unit -> (unit, unit, unit) Pulse_Typing.st_typing) + = + fun g -> + fun p -> + fun p_prop -> + Pulse_Typing.T_STApp + (g, elim_pure_head, (tm_fstar FStar_Reflection_Typing.tm_prop), + FStar_Pervasives_Native.None, (elim_pure_comp p), (tm_fstar p), + (), ()) +let (is_elim_pure : + Pulse_Syntax_Base.term -> (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) + = + fun uu___ -> + (fun vp -> + Obj.magic + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + match vp.Pulse_Syntax_Base.t with + | Pulse_Syntax_Base.Tm_Pure + { Pulse_Syntax_Base.t = Pulse_Syntax_Base.Tm_FStar uu___1; + Pulse_Syntax_Base.range1 = uu___2;_} + -> true + | uu___1 -> false))) uu___ +let (mk : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.vprop -> + unit -> + ((Pulse_Syntax_Base.ppname, Pulse_Syntax_Base.st_term, + Pulse_Syntax_Base.comp, (unit, unit, unit) Pulse_Typing.st_typing) + FStar_Pervasives.dtuple4 FStar_Pervasives_Native.option, + unit) FStar_Tactics_Effect.tac_repr) + = + fun uu___2 -> + fun uu___1 -> + fun uu___ -> + (fun g -> + fun v -> + fun v_typing -> + Obj.magic + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + match v.Pulse_Syntax_Base.t with + | Pulse_Syntax_Base.Tm_Pure + { + Pulse_Syntax_Base.t = Pulse_Syntax_Base.Tm_FStar + pp; + Pulse_Syntax_Base.range1 = uu___1;_} + -> + FStar_Pervasives_Native.Some + (FStar_Pervasives.Mkdtuple4 + (Pulse_Syntax_Base.ppname_default, + (mk_elim_pure (tm_fstar pp)), + (elim_pure_comp pp), + (elim_pure_typing g pp ()))) + | uu___1 -> FStar_Pervasives_Native.None))) uu___2 + uu___1 uu___ +let (elim_pure_frame : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.term -> + unit -> + Pulse_Typing_Env.env -> + ((Pulse_Typing_Env.env, Pulse_Syntax_Base.term, unit, + (unit, unit, unit, unit) + Pulse_Checker_Base.continuation_elaborator) + FStar_Pervasives.dtuple4, + unit) FStar_Tactics_Effect.tac_repr) + = + fun g -> + fun ctxt -> + fun frame -> + fun ctxt_frame_typing -> + fun uvs -> + Pulse_Checker_Prover_Base.add_elims g ctxt frame is_elim_pure mk + () uvs +let (elim_pure : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + unit -> + ((Pulse_Typing_Env.env, Pulse_Syntax_Base.term, unit, + (unit, unit, unit, unit) + Pulse_Checker_Base.continuation_elaborator) + FStar_Pervasives.dtuple4, + unit) FStar_Tactics_Effect.tac_repr) + = + fun g -> + fun ctxt -> + fun ctxt_typing -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.ElimPure.fst" + (Prims.of_int (104)) (Prims.of_int (70)) + (Prims.of_int (104)) (Prims.of_int (78))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.ElimPure.fst" + (Prims.of_int (104)) (Prims.of_int (81)) + (Prims.of_int (109)) (Prims.of_int (62))))) + (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> ())) + (fun uu___ -> + (fun ctxt_emp_typing -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.ElimPure.fst" + (Prims.of_int (106)) (Prims.of_int (4)) + (Prims.of_int (106)) (Prims.of_int (58))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.ElimPure.fst" + (Prims.of_int (104)) (Prims.of_int (81)) + (Prims.of_int (109)) (Prims.of_int (62))))) + (Obj.magic + (elim_pure_frame g ctxt Pulse_Syntax_Base.tm_emp () + (Pulse_Typing_Env.mk_env + (Pulse_Typing_Env.fstar_env g)))) + (fun uu___ -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + match uu___ with + | FStar_Pervasives.Mkdtuple4 + (g', ctxt', ctxt'_emp_typing, k) -> + FStar_Pervasives.Mkdtuple4 + (g', ctxt', (), + (Pulse_Checker_Base.k_elab_equiv g g' + (Pulse_Checker_Prover_Base.op_Star + ctxt Pulse_Syntax_Base.tm_emp) + ctxt + (Pulse_Checker_Prover_Base.op_Star + ctxt' Pulse_Syntax_Base.tm_emp) + ctxt' k () ())))))) uu___) +let (elim_pure_pst : + Pulse_Checker_Prover_Base.preamble -> + unit Pulse_Checker_Prover_Base.prover_state -> + (unit Pulse_Checker_Prover_Base.prover_state, unit) + FStar_Tactics_Effect.tac_repr) + = + fun preamble -> + fun pst -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.ElimPure.fst" + (Prims.of_int (118)) (Prims.of_int (4)) (Prims.of_int (123)) + (Prims.of_int (13))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.ElimPure.fst" + (Prims.of_int (115)) (Prims.of_int (74)) + (Prims.of_int (153)) (Prims.of_int (3))))) + (Obj.magic + (elim_pure_frame pst.Pulse_Checker_Prover_Base.pg + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.remaining_ctxt) + (Pulse_Checker_Prover_Base.op_Star + preamble.Pulse_Checker_Prover_Base.frame + (Pulse_Checker_Prover_Base.op_Array_Access + pst.Pulse_Checker_Prover_Base.ss + pst.Pulse_Checker_Prover_Base.solved)) () + pst.Pulse_Checker_Prover_Base.uvs)) + (fun uu___ -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + match uu___ with + | FStar_Pervasives.Mkdtuple4 (g', remaining_ctxt', ty, k) -> + { + Pulse_Checker_Prover_Base.pg = g'; + Pulse_Checker_Prover_Base.remaining_ctxt = + (Pulse_Typing_Combinators.vprop_as_list + remaining_ctxt'); + Pulse_Checker_Prover_Base.remaining_ctxt_frame_typing = + (); + Pulse_Checker_Prover_Base.uvs = + (pst.Pulse_Checker_Prover_Base.uvs); + Pulse_Checker_Prover_Base.ss = + (pst.Pulse_Checker_Prover_Base.ss); + Pulse_Checker_Prover_Base.solved = + (pst.Pulse_Checker_Prover_Base.solved); + Pulse_Checker_Prover_Base.unsolved = + (pst.Pulse_Checker_Prover_Base.unsolved); + Pulse_Checker_Prover_Base.k = + (Pulse_Checker_Base.k_elab_trans + preamble.Pulse_Checker_Prover_Base.g0 + (Pulse_Checker_Prover_Base.__proj__Mkprover_state__item__pg + preamble pst) g' + (Pulse_Checker_Prover_Base.op_Star + preamble.Pulse_Checker_Prover_Base.ctxt + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + (Pulse_Checker_Prover_Base.__proj__Mkprover_state__item__remaining_ctxt + preamble pst)) + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + (Pulse_Checker_Prover_Base.__proj__Mkprover_state__item__ss + preamble pst) + (Pulse_Checker_Prover_Base.__proj__Mkprover_state__item__solved + preamble pst))) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + remaining_ctxt' + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst.Pulse_Checker_Prover_Base.ss + pst.Pulse_Checker_Prover_Base.solved)) + pst.Pulse_Checker_Prover_Base.k + (Pulse_Checker_Base.k_elab_equiv + pst.Pulse_Checker_Prover_Base.pg g' + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.remaining_ctxt) + (Pulse_Checker_Prover_Base.op_Star + preamble.Pulse_Checker_Prover_Base.frame + (Pulse_Checker_Prover_Base.op_Array_Access + pst.Pulse_Checker_Prover_Base.ss + pst.Pulse_Checker_Prover_Base.solved))) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst.Pulse_Checker_Prover_Base.ss + pst.Pulse_Checker_Prover_Base.solved)) + (Pulse_Checker_Prover_Base.op_Star + remaining_ctxt' + (Pulse_Checker_Prover_Base.op_Star + preamble.Pulse_Checker_Prover_Base.frame + (Pulse_Checker_Prover_Base.op_Array_Access + pst.Pulse_Checker_Prover_Base.ss + pst.Pulse_Checker_Prover_Base.solved))) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + remaining_ctxt' + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst.Pulse_Checker_Prover_Base.ss + pst.Pulse_Checker_Prover_Base.solved)) k + () ())); + Pulse_Checker_Prover_Base.goals_inv = (); + Pulse_Checker_Prover_Base.solved_inv = () + })) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Prover_IntroExists.ml b/src/ocaml/plugin/generated/Pulse_Checker_Prover_IntroExists.ml similarity index 79% rename from src/ocaml/plugin/generated/Pulse_Prover_IntroExists.ml rename to src/ocaml/plugin/generated/Pulse_Checker_Prover_IntroExists.ml index 46ad52c35..67892515c 100644 --- a/src/ocaml/plugin/generated/Pulse_Prover_IntroExists.ml +++ b/src/ocaml/plugin/generated/Pulse_Checker_Prover_IntroExists.ml @@ -12,7 +12,7 @@ let (k_intro_exists : Pulse_Syntax_Base.vprop -> unit -> ((unit, unit, unit, unit) - Pulse_Prover_Common.continuation_elaborator, + Pulse_Checker_Base.continuation_elaborator, unit) FStar_Tactics_Effect.tac_repr) = fun g -> @@ -28,15 +28,15 @@ let (k_intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (24)) (Prims.of_int (10)) - (Prims.of_int (27)) (Prims.of_int (66))))) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (27)) (Prims.of_int (10)) + (Prims.of_int (29)) (Prims.of_int (49))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (27)) (Prims.of_int (69)) - (Prims.of_int (65)) (Prims.of_int (30))))) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (29)) (Prims.of_int (52)) + (Prims.of_int (68)) (Prims.of_int (30))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> Pulse_Typing.wr @@ -45,9 +45,7 @@ let (k_intro_exists : Pulse_Syntax_Base.erased = false; Pulse_Syntax_Base.p2 = (Pulse_Syntax_Base.tm_exists_sl u b p); - Pulse_Syntax_Base.witnesses = [e]; - Pulse_Syntax_Base.should_check1 = - Pulse_Syntax_Base.should_check_true + Pulse_Syntax_Base.witnesses = [e] }))) (fun uu___ -> (fun t -> @@ -56,18 +54,18 @@ let (k_intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (29)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (31)) (Prims.of_int (10)) - (Prims.of_int (29)) + (Prims.of_int (31)) (Prims.of_int (35))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (29)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (31)) (Prims.of_int (38)) - (Prims.of_int (65)) + (Prims.of_int (68)) (Prims.of_int (30))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> @@ -79,18 +77,18 @@ let (k_intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (31)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (33)) (Prims.of_int (17)) - (Prims.of_int (31)) + (Prims.of_int (33)) (Prims.of_int (70))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (34)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (36)) (Prims.of_int (45)) - (Prims.of_int (65)) + (Prims.of_int (68)) (Prims.of_int (30))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> @@ -104,18 +102,18 @@ let (k_intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (36)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (38)) (Prims.of_int (10)) - (Prims.of_int (36)) + (Prims.of_int (38)) (Prims.of_int (17))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (37)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (39)) (Prims.of_int (52)) - (Prims.of_int (65)) + (Prims.of_int (68)) (Prims.of_int (30))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> @@ -128,21 +126,48 @@ let (k_intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (43)) - (Prims.of_int (4)) - (Prims.of_int (43)) - (Prims.of_int (65))))) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (41)) + (Prims.of_int (15)) + (Prims.of_int (41)) + (Prims.of_int (44))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (51)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (41)) + (Prims.of_int (47)) + (Prims.of_int (68)) + (Prims.of_int (30))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___ -> + Pulse_Syntax_Base.mk_ppname_no_range + "_pintroe")) + (fun uu___ + -> + (fun + ppname -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (46)) + (Prims.of_int (4)) + (Prims.of_int (46)) + (Prims.of_int (75))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (54)) (Prims.of_int (20)) - (Prims.of_int (65)) + (Prims.of_int (68)) (Prims.of_int (30))))) - (Obj.magic - (Pulse_Prover_Common.continuation_elaborator_with_bind + (Obj.magic + (Pulse_Checker_Base.continuation_elaborator_with_bind g frame (Pulse_Typing.comp_intro_exists u b p e) @@ -156,14 +181,13 @@ let (k_intro_exists : (Pulse_Syntax_Base.tm_exists_sl u b p); Pulse_Syntax_Base.witnesses - = [e]; - Pulse_Syntax_Base.should_check1 - = - Pulse_Syntax_Base.should_check_true + = [e] })) t_typing - () x)) - (fun k -> + () + (ppname, + x))) + (fun k -> FStar_Tactics_Effect.lift_div_tac (fun uu___ -> @@ -175,18 +199,18 @@ let (k_intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (52)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (55)) (Prims.of_int (25)) - (Prims.of_int (52)) + (Prims.of_int (55)) (Prims.of_int (26))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (51)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (54)) (Prims.of_int (20)) - (Prims.of_int (65)) + (Prims.of_int (68)) (Prims.of_int (30))))) (FStar_Tactics_Effect.lift_div_tac (fun @@ -207,18 +231,18 @@ let (k_intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (53)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (56)) (Prims.of_int (31)) - (Prims.of_int (53)) + (Prims.of_int (56)) (Prims.of_int (33))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (53)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (56)) (Prims.of_int (36)) - (Prims.of_int (65)) + (Prims.of_int (68)) (Prims.of_int (30))))) (FStar_Tactics_Effect.lift_div_tac (fun @@ -233,18 +257,18 @@ let (k_intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (54)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (57)) (Prims.of_int (18)) - (Prims.of_int (54)) + (Prims.of_int (57)) (Prims.of_int (38))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (57)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (60)) (Prims.of_int (64)) - (Prims.of_int (65)) + (Prims.of_int (68)) (Prims.of_int (30))))) (FStar_Tactics_Effect.lift_div_tac (fun @@ -262,23 +286,23 @@ let (k_intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (59)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (62)) (Prims.of_int (4)) - (Prims.of_int (63)) + (Prims.of_int (66)) (Prims.of_int (52))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (65)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (68)) (Prims.of_int (2)) - (Prims.of_int (65)) + (Prims.of_int (68)) (Prims.of_int (30))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___2 -> - Pulse_Prover_Common.st_typing_weakening + Pulse_Typing_Metatheory.st_typing_weakening g empty_env t1 c1 d11 @@ -292,14 +316,14 @@ let (k_intro_exists : (fun d12 -> Obj.magic - (Pulse_Prover_Common.k_elab_equiv + (Pulse_Checker_Base.k_elab_equiv g (Pulse_Typing_Env.push_binding g x Pulse_Syntax_Base.ppname_default (Pulse_Syntax_Base.comp_res c)) - (Pulse_Prover_Common.op_Star + (Pulse_Checker_Prover_Base.op_Star frame (Pulse_Syntax_Naming.subst_term p @@ -307,7 +331,7 @@ let (k_intro_exists : Pulse_Syntax_Naming.DT (Prims.int_zero, e)])) - (Pulse_Prover_Common.op_Star + (Pulse_Checker_Prover_Base.op_Star frame (Pulse_Syntax_Naming.subst_term p @@ -315,7 +339,7 @@ let (k_intro_exists : Pulse_Syntax_Naming.DT (Prims.int_zero, e)])) - (Pulse_Prover_Common.op_Star + (Pulse_Checker_Prover_Base.op_Star (Pulse_Syntax_Base.tm_exists_sl u b p) frame) @@ -332,18 +356,19 @@ let (k_intro_exists : uu___2))) uu___2))) uu___1))))) + uu___))) uu___))) uu___))) uu___))) uu___) let (intro_exists : - Pulse_Prover_Common.preamble -> - unit Pulse_Prover_Common.prover_state -> + Pulse_Checker_Prover_Base.preamble -> + unit Pulse_Checker_Prover_Base.prover_state -> Pulse_Syntax_Base.universe -> Pulse_Syntax_Base.binder -> Pulse_Syntax_Base.vprop -> Pulse_Syntax_Base.vprop Prims.list -> unit -> - Pulse_Prover_Common.prover_t -> - (unit Pulse_Prover_Common.prover_state, unit) + Pulse_Checker_Prover_Base.prover_t -> + (unit Pulse_Checker_Prover_Base.prover_state, unit) FStar_Tactics_Effect.tac_repr) = fun preamble -> @@ -358,18 +383,21 @@ let (intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (76)) (Prims.of_int (10)) - (Prims.of_int (76)) (Prims.of_int (22))))) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (79)) (Prims.of_int (10)) + (Prims.of_int (79)) (Prims.of_int (41))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (76)) (Prims.of_int (25)) - (Prims.of_int (313)) (Prims.of_int (6))))) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (79)) (Prims.of_int (44)) + (Prims.of_int (324)) (Prims.of_int (6))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___1 -> - Pulse_Typing_Env.fresh pst.Pulse_Prover_Common.pg)) + Pulse_Typing_Env.fresh + (Pulse_Typing_Env.push_env + pst.Pulse_Checker_Prover_Base.pg + pst.Pulse_Checker_Prover_Base.uvs))) (fun uu___1 -> (fun x -> Obj.magic @@ -377,18 +405,18 @@ let (intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (77)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (80)) (Prims.of_int (11)) - (Prims.of_int (77)) + (Prims.of_int (80)) (Prims.of_int (29))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (77)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (80)) (Prims.of_int (32)) - (Prims.of_int (313)) + (Prims.of_int (324)) (Prims.of_int (6))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___1 -> @@ -400,40 +428,44 @@ let (intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (79)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (82)) (Prims.of_int (4)) - (Prims.of_int (83)) + (Prims.of_int (86)) (Prims.of_int (61))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (84)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (87)) (Prims.of_int (6)) - (Prims.of_int (313)) + (Prims.of_int (324)) (Prims.of_int (6))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___1 -> { - Pulse_Prover_Common.g0 = - (pst.Pulse_Prover_Common.pg); - Pulse_Prover_Common.ctxt = - (Pulse_Checker_VPropEquiv.list_as_vprop - pst.Pulse_Prover_Common.remaining_ctxt); - Pulse_Prover_Common.frame = - (Pulse_Prover_Common.op_Star - preamble.Pulse_Prover_Common.frame - (Pulse_Prover_Common.op_Array_Access - pst.Pulse_Prover_Common.ss - pst.Pulse_Prover_Common.solved)); - Pulse_Prover_Common.ctxt_frame_typing + Pulse_Checker_Prover_Base.g0 + = + (pst.Pulse_Checker_Prover_Base.pg); + Pulse_Checker_Prover_Base.ctxt + = + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.remaining_ctxt); + Pulse_Checker_Prover_Base.frame + = + (Pulse_Checker_Prover_Base.op_Star + preamble.Pulse_Checker_Prover_Base.frame + (Pulse_Checker_Prover_Base.op_Array_Access + pst.Pulse_Checker_Prover_Base.ss + pst.Pulse_Checker_Prover_Base.solved)); + Pulse_Checker_Prover_Base.ctxt_frame_typing = (); - Pulse_Prover_Common.goals = - (Pulse_Prover_Common.op_Star + Pulse_Checker_Prover_Base.goals + = + (Pulse_Checker_Prover_Base.op_Star (Pulse_Syntax_Naming.open_term_nv body px) - (Pulse_Checker_VPropEquiv.list_as_vprop + (Pulse_Typing_Combinators.list_as_vprop unsolved')) })) (fun uu___1 -> @@ -443,48 +475,48 @@ let (intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (88)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (91)) (Prims.of_int (105)) - (Prims.of_int (97)) + (Prims.of_int (100)) (Prims.of_int (18))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (99)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (102)) (Prims.of_int (37)) - (Prims.of_int (313)) + (Prims.of_int (324)) (Prims.of_int (6))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___1 -> coerce_eq - (Pulse_Prover_Common.k_elab_equiv - preamble_sub.Pulse_Prover_Common.g0 - preamble_sub.Pulse_Prover_Common.g0 - (Pulse_Prover_Common.op_Star - preamble_sub.Pulse_Prover_Common.ctxt - preamble_sub.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star - preamble_sub.Pulse_Prover_Common.ctxt - preamble_sub.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star - preamble_sub.Pulse_Prover_Common.ctxt - preamble_sub.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - (Pulse_Checker_VPropEquiv.vprop_as_list - preamble_sub.Pulse_Prover_Common.ctxt)) - preamble_sub.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst.Pulse_Prover_Common.ss + (Pulse_Checker_Base.k_elab_equiv + preamble_sub.Pulse_Checker_Prover_Base.g0 + preamble_sub.Pulse_Checker_Prover_Base.g0 + (Pulse_Checker_Prover_Base.op_Star + preamble_sub.Pulse_Checker_Prover_Base.ctxt + preamble_sub.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + preamble_sub.Pulse_Checker_Prover_Base.ctxt + preamble_sub.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + preamble_sub.Pulse_Checker_Prover_Base.ctxt + preamble_sub.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + (Pulse_Typing_Combinators.vprop_as_list + preamble_sub.Pulse_Checker_Prover_Base.ctxt)) + preamble_sub.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst.Pulse_Checker_Prover_Base.ss Pulse_Syntax_Base.tm_emp)) - (Pulse_Prover_Common.k_elab_unit - preamble_sub.Pulse_Prover_Common.g0 - (Pulse_Prover_Common.op_Star - preamble_sub.Pulse_Prover_Common.ctxt - preamble_sub.Pulse_Prover_Common.frame)) + (Pulse_Checker_Base.k_elab_unit + preamble_sub.Pulse_Checker_Prover_Base.g0 + (Pulse_Checker_Prover_Base.op_Star + preamble_sub.Pulse_Checker_Prover_Base.ctxt + preamble_sub.Pulse_Checker_Prover_Base.frame)) () ()) ())) (fun uu___1 -> (fun k_sub -> @@ -493,53 +525,57 @@ let (intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (101)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (104)) (Prims.of_int (4)) - (Prims.of_int (110)) + (Prims.of_int (113)) (Prims.of_int (20))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (111)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (114)) (Prims.of_int (6)) - (Prims.of_int (313)) + (Prims.of_int (324)) (Prims.of_int (6))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___1 -> { - Pulse_Prover_Common.pg + Pulse_Checker_Prover_Base.pg = - (pst.Pulse_Prover_Common.pg); - Pulse_Prover_Common.remaining_ctxt + (pst.Pulse_Checker_Prover_Base.pg); + Pulse_Checker_Prover_Base.remaining_ctxt = - (Pulse_Checker_VPropEquiv.vprop_as_list - preamble_sub.Pulse_Prover_Common.ctxt); - Pulse_Prover_Common.remaining_ctxt_frame_typing + (Pulse_Typing_Combinators.vprop_as_list + preamble_sub.Pulse_Checker_Prover_Base.ctxt); + Pulse_Checker_Prover_Base.remaining_ctxt_frame_typing = (); - Pulse_Prover_Common.uvs + Pulse_Checker_Prover_Base.uvs = - (pst.Pulse_Prover_Common.uvs); - Pulse_Prover_Common.ss + (Pulse_Typing_Env.push_binding + pst.Pulse_Checker_Prover_Base.uvs + x + b.Pulse_Syntax_Base.binder_ppname + b.Pulse_Syntax_Base.binder_ty); + Pulse_Checker_Prover_Base.ss = - (pst.Pulse_Prover_Common.ss); - Pulse_Prover_Common.solved + (pst.Pulse_Checker_Prover_Base.ss); + Pulse_Checker_Prover_Base.solved = Pulse_Syntax_Base.tm_emp; - Pulse_Prover_Common.unsolved + Pulse_Checker_Prover_Base.unsolved = (FStar_List_Tot_Base.append - [ - Pulse_Syntax_Naming.open_term_nv - body px] + (Pulse_Typing_Combinators.vprop_as_list + (Pulse_Syntax_Naming.open_term_nv + body px)) unsolved'); - Pulse_Prover_Common.k + Pulse_Checker_Prover_Base.k = k_sub; - Pulse_Prover_Common.goals_inv + Pulse_Checker_Prover_Base.goals_inv = (); - Pulse_Prover_Common.solved_inv + Pulse_Checker_Prover_Base.solved_inv = () })) (fun uu___1 @@ -552,18 +588,18 @@ let (intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (112)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (115)) (Prims.of_int (16)) - (Prims.of_int (112)) + (Prims.of_int (115)) (Prims.of_int (30))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (112)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (115)) (Prims.of_int (33)) - (Prims.of_int (313)) + (Prims.of_int (324)) (Prims.of_int (6))))) (Obj.magic (prover @@ -579,18 +615,18 @@ let (intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (116)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (119)) (Prims.of_int (56)) - (Prims.of_int (116)) + (Prims.of_int (119)) (Prims.of_int (73))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (116)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (119)) (Prims.of_int (76)) - (Prims.of_int (313)) + (Prims.of_int (324)) (Prims.of_int (6))))) (FStar_Tactics_Effect.lift_div_tac (fun @@ -606,122 +642,97 @@ let (intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (117)) - (Prims.of_int (13)) - (Prims.of_int (117)) - (Prims.of_int (65))))) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (121)) + (Prims.of_int (66)) + (Prims.of_int (129)) + (Prims.of_int (18))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (118)) - (Prims.of_int (2)) - (Prims.of_int (313)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (130)) + (Prims.of_int (61)) + (Prims.of_int (324)) (Prims.of_int (6))))) (Obj.magic - (Pulse_Prover_Substs.ss_to_nt_substs - pst_sub1.Pulse_Prover_Common.pg - pst_sub1.Pulse_Prover_Common.uvs - pst_sub1.Pulse_Prover_Common.ss)) - (fun - uu___1 -> - (fun ropt - -> - Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (118)) - (Prims.of_int (2)) - (Prims.of_int (118)) - (Prims.of_int (74))))) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (122)) + (Prims.of_int (12)) + (Prims.of_int (122)) + (Prims.of_int (64))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (118)) - (Prims.of_int (75)) - (Prims.of_int (313)) - (Prims.of_int (6))))) - (if - FStar_Pervasives_Native.uu___is_None - ropt - then + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (123)) + (Prims.of_int (4)) + (Prims.of_int (129)) + (Prims.of_int (18))))) + (Obj.magic + (Pulse_Checker_Prover_Substs.ss_to_nt_substs + pst_sub1.Pulse_Checker_Prover_Base.pg + pst_sub1.Pulse_Checker_Prover_Base.uvs + pst_sub1.Pulse_Checker_Prover_Base.ss)) + (fun + uu___1 -> + (fun r -> + match r + with + | + FStar_Pervasives.Inr + msg -> Obj.magic (Obj.repr (Pulse_Typing_Env.fail - pst_sub1.Pulse_Prover_Common.pg + pst_sub1.Pulse_Checker_Prover_Base.pg FStar_Pervasives_Native.None - "intro exists ss not well-typed")) - else + (Prims.strcat + "resulted substitution after intro exists protocol is not well-typed: " + (Prims.strcat + msg "")))) + | + FStar_Pervasives.Inl + nt -> Obj.magic (Obj.repr (FStar_Tactics_Effect.lift_div_tac (fun - uu___2 -> - ())))) - (fun uu___1 -> + nt)))) + uu___1))) (fun uu___1 -> + (fun nt + -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (121)) - (Prims.of_int (16)) - (Prims.of_int (121)) - (Prims.of_int (20))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (118)) - (Prims.of_int (75)) - (Prims.of_int (313)) - (Prims.of_int (6))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___2 -> - ropt)) - (fun - uu___2 -> - (fun - uu___2 -> - match uu___2 - with - | - FStar_Pervasives_Native.Some - nt -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (127)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (135)) (Prims.of_int (4)) - (Prims.of_int (127)) + (Prims.of_int (135)) (Prims.of_int (80))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (129)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (137)) (Prims.of_int (48)) - (Prims.of_int (313)) + (Prims.of_int (324)) (Prims.of_int (6))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___3 -> + uu___1 -> ())) (fun - uu___3 -> + uu___1 -> (fun pst_sub_goals_inv1 -> @@ -730,25 +741,25 @@ let (intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (133)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (141)) (Prims.of_int (59)) - (Prims.of_int (133)) + (Prims.of_int (141)) (Prims.of_int (89))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (133)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (141)) (Prims.of_int (92)) - (Prims.of_int (313)) + (Prims.of_int (324)) (Prims.of_int (6))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___3 -> + uu___1 -> ())) (fun - uu___3 -> + uu___1 -> (fun pst_sub_goals_inv2 -> @@ -757,25 +768,25 @@ let (intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (137)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (145)) (Prims.of_int (48)) - (Prims.of_int (137)) + (Prims.of_int (145)) (Prims.of_int (96))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (137)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (145)) (Prims.of_int (99)) - (Prims.of_int (313)) + (Prims.of_int (324)) (Prims.of_int (6))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___3 -> + uu___1 -> ())) (fun - uu___3 -> + uu___1 -> (fun pst_sub_goals_inv3 -> @@ -784,25 +795,25 @@ let (intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (142)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (150)) (Prims.of_int (4)) - (Prims.of_int (142)) + (Prims.of_int (150)) (Prims.of_int (13))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (142)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (150)) (Prims.of_int (16)) - (Prims.of_int (313)) + (Prims.of_int (324)) (Prims.of_int (6))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___3 -> - pst_sub1.Pulse_Prover_Common.k)) + uu___1 -> + pst_sub1.Pulse_Checker_Prover_Base.k)) (fun - uu___3 -> + uu___1 -> (fun k_sub1 -> Obj.magic @@ -810,51 +821,51 @@ let (intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (149)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (157)) (Prims.of_int (4)) - (Prims.of_int (149)) + (Prims.of_int (157)) (Prims.of_int (47))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (149)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (157)) (Prims.of_int (50)) - (Prims.of_int (313)) + (Prims.of_int (324)) (Prims.of_int (6))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___3 -> - Pulse_Prover_Common.k_elab_equiv - preamble_sub.Pulse_Prover_Common.g0 - pst_sub1.Pulse_Prover_Common.pg - (Pulse_Prover_Common.op_Star - preamble_sub.Pulse_Prover_Common.ctxt - preamble_sub.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star - preamble_sub.Pulse_Prover_Common.ctxt - preamble_sub.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst_sub1.Pulse_Prover_Common.remaining_ctxt) - preamble_sub.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss - pst_sub1.Pulse_Prover_Common.solved)) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst_sub1.Pulse_Prover_Common.remaining_ctxt) - preamble_sub.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss - preamble_sub.Pulse_Prover_Common.goals)) + uu___1 -> + Pulse_Checker_Base.k_elab_equiv + preamble_sub.Pulse_Checker_Prover_Base.g0 + pst_sub1.Pulse_Checker_Prover_Base.pg + (Pulse_Checker_Prover_Base.op_Star + preamble_sub.Pulse_Checker_Prover_Base.ctxt + preamble_sub.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + preamble_sub.Pulse_Checker_Prover_Base.ctxt + preamble_sub.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst_sub1.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble_sub.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss + pst_sub1.Pulse_Checker_Prover_Base.solved)) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst_sub1.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble_sub.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss + preamble_sub.Pulse_Checker_Prover_Base.goals)) k_sub1 () ())) (fun - uu___3 -> + uu___1 -> (fun k_sub2 -> Obj.magic @@ -862,26 +873,26 @@ let (intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (156)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (164)) (Prims.of_int (4)) - (Prims.of_int (156)) + (Prims.of_int (164)) (Prims.of_int (22))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (158)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (166)) (Prims.of_int (84)) - (Prims.of_int (313)) + (Prims.of_int (324)) (Prims.of_int (6))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___3 -> + uu___1 -> coerce_eq k_sub2 ())) (fun - uu___3 -> + uu___1 -> (fun k_sub3 -> Obj.magic @@ -889,28 +900,28 @@ let (intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (159)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (167)) (Prims.of_int (16)) - (Prims.of_int (159)) + (Prims.of_int (167)) (Prims.of_int (39))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (160)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (168)) (Prims.of_int (94)) - (Prims.of_int (313)) + (Prims.of_int (324)) (Prims.of_int (6))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___3 -> - Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss + uu___1 -> + Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss (Pulse_Syntax_Pure.null_var x))) (fun - uu___3 -> + uu___1 -> (fun witness -> @@ -919,26 +930,26 @@ let (intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (167)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (175)) (Prims.of_int (4)) - (Prims.of_int (167)) + (Prims.of_int (175)) (Prims.of_int (22))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (167)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (175)) (Prims.of_int (25)) - (Prims.of_int (313)) + (Prims.of_int (324)) (Prims.of_int (6))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___3 -> + uu___1 -> coerce_eq k_sub3 ())) (fun - uu___3 -> + uu___1 -> (fun k_sub4 -> Obj.magic @@ -946,62 +957,62 @@ let (intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (176)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (184)) (Prims.of_int (4)) - (Prims.of_int (176)) + (Prims.of_int (184)) (Prims.of_int (47))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (176)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (184)) (Prims.of_int (50)) - (Prims.of_int (313)) + (Prims.of_int (324)) (Prims.of_int (6))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___3 -> - Pulse_Prover_Common.k_elab_equiv - preamble_sub.Pulse_Prover_Common.g0 - pst_sub1.Pulse_Prover_Common.pg - (Pulse_Prover_Common.op_Star - preamble_sub.Pulse_Prover_Common.ctxt - preamble_sub.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star - preamble_sub.Pulse_Prover_Common.ctxt - preamble_sub.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst_sub1.Pulse_Prover_Common.remaining_ctxt) - preamble_sub.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star + uu___1 -> + Pulse_Checker_Base.k_elab_equiv + preamble_sub.Pulse_Checker_Prover_Base.g0 + pst_sub1.Pulse_Checker_Prover_Base.pg + (Pulse_Checker_Prover_Base.op_Star + preamble_sub.Pulse_Checker_Prover_Base.ctxt + preamble_sub.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + preamble_sub.Pulse_Checker_Prover_Base.ctxt + preamble_sub.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst_sub1.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble_sub.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star (Pulse_Syntax_Naming.subst_term - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss body) [ Pulse_Syntax_Naming.DT (Prims.int_zero, witness)]) - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss - (Pulse_Checker_VPropEquiv.list_as_vprop + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss + (Pulse_Typing_Combinators.list_as_vprop unsolved')))) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst_sub1.Pulse_Prover_Common.remaining_ctxt) - preamble_sub.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss - (Pulse_Checker_VPropEquiv.list_as_vprop + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst_sub1.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble_sub.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss + (Pulse_Typing_Combinators.list_as_vprop unsolved'))) (Pulse_Syntax_Naming.subst_term - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss body) [ Pulse_Syntax_Naming.DT @@ -1010,7 +1021,7 @@ let (intro_exists : k_sub4 () ())) (fun - uu___3 -> + uu___1 -> (fun k_sub5 -> Obj.magic @@ -1018,38 +1029,38 @@ let (intro_exists : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (186)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (194)) (Prims.of_int (4)) - (Prims.of_int (195)) + (Prims.of_int (203)) (Prims.of_int (16))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.IntroExists.fst" - (Prims.of_int (301)) + "Pulse.Checker.Prover.IntroExists.fst" + (Prims.of_int (312)) (Prims.of_int (4)) - (Prims.of_int (310)) + (Prims.of_int (321)) (Prims.of_int (26))))) (Obj.magic (k_intro_exists - pst_sub1.Pulse_Prover_Common.pg + pst_sub1.Pulse_Checker_Prover_Base.pg u - (Pulse_Prover_Substs.nt_subst_binder + (Pulse_Checker_Prover_Substs.nt_subst_binder b nt) - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss body) () witness () - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst_sub1.Pulse_Prover_Common.remaining_ctxt) - preamble_sub.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss - (Pulse_Checker_VPropEquiv.list_as_vprop + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst_sub1.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble_sub.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss + (Pulse_Typing_Combinators.list_as_vprop unsolved'))) ())) (fun @@ -1057,283 +1068,283 @@ let (intro_exists : -> FStar_Tactics_Effect.lift_div_tac (fun - uu___3 -> + uu___1 -> { - Pulse_Prover_Common.pg + Pulse_Checker_Prover_Base.pg = - (pst_sub1.Pulse_Prover_Common.pg); - Pulse_Prover_Common.remaining_ctxt + (pst_sub1.Pulse_Checker_Prover_Base.pg); + Pulse_Checker_Prover_Base.remaining_ctxt = - (pst_sub1.Pulse_Prover_Common.remaining_ctxt); - Pulse_Prover_Common.remaining_ctxt_frame_typing + (pst_sub1.Pulse_Checker_Prover_Base.remaining_ctxt); + Pulse_Checker_Prover_Base.remaining_ctxt_frame_typing = (); - Pulse_Prover_Common.uvs + Pulse_Checker_Prover_Base.uvs = - (pst_sub1.Pulse_Prover_Common.uvs); - Pulse_Prover_Common.ss + (pst_sub1.Pulse_Checker_Prover_Base.uvs); + Pulse_Checker_Prover_Base.ss = - (pst_sub1.Pulse_Prover_Common.ss); - Pulse_Prover_Common.solved + (pst_sub1.Pulse_Checker_Prover_Base.ss); + Pulse_Checker_Prover_Base.solved = - (preamble.Pulse_Prover_Common.goals); - Pulse_Prover_Common.unsolved + (preamble.Pulse_Checker_Prover_Base.goals); + Pulse_Checker_Prover_Base.unsolved = []; - Pulse_Prover_Common.k + Pulse_Checker_Prover_Base.k = - (Pulse_Prover_Common.k_elab_equiv - preamble.Pulse_Prover_Common.g0 - pst_sub1.Pulse_Prover_Common.pg - (Pulse_Prover_Common.op_Star - preamble.Pulse_Prover_Common.ctxt - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star - preamble.Pulse_Prover_Common.ctxt - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst_sub1.Pulse_Prover_Common.remaining_ctxt) - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss - (Pulse_Prover_Common.op_Star - pst.Pulse_Prover_Common.solved - (Pulse_Checker_VPropEquiv.list_as_vprop - pst.Pulse_Prover_Common.unsolved)))) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst_sub1.Pulse_Prover_Common.remaining_ctxt) - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss - preamble.Pulse_Prover_Common.goals)) - (Pulse_Prover_Common.k_elab_trans - preamble.Pulse_Prover_Common.g0 - (Pulse_Prover_Common.__proj__Mkprover_state__item__pg + (Pulse_Checker_Base.k_elab_equiv + preamble.Pulse_Checker_Prover_Base.g0 + pst_sub1.Pulse_Checker_Prover_Base.pg + (Pulse_Checker_Prover_Base.op_Star + preamble.Pulse_Checker_Prover_Base.ctxt + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + preamble.Pulse_Checker_Prover_Base.ctxt + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst_sub1.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss + (Pulse_Checker_Prover_Base.op_Star + pst.Pulse_Checker_Prover_Base.solved + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.unsolved)))) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst_sub1.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss + preamble.Pulse_Checker_Prover_Base.goals)) + (Pulse_Checker_Base.k_elab_trans + preamble.Pulse_Checker_Prover_Base.g0 + (Pulse_Checker_Prover_Base.__proj__Mkprover_state__item__pg preamble pst) - pst_sub1.Pulse_Prover_Common.pg - (Pulse_Prover_Common.op_Star - preamble.Pulse_Prover_Common.ctxt - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - (Pulse_Prover_Common.__proj__Mkprover_state__item__remaining_ctxt + pst_sub1.Pulse_Checker_Prover_Base.pg + (Pulse_Checker_Prover_Base.op_Star + preamble.Pulse_Checker_Prover_Base.ctxt + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + (Pulse_Checker_Prover_Base.__proj__Mkprover_state__item__remaining_ctxt preamble pst)) - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - (Pulse_Prover_Common.__proj__Mkprover_state__item__ss + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + (Pulse_Checker_Prover_Base.__proj__Mkprover_state__item__ss preamble pst) - (Pulse_Prover_Common.__proj__Mkprover_state__item__solved + (Pulse_Checker_Prover_Base.__proj__Mkprover_state__item__solved preamble pst))) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst_sub1.Pulse_Prover_Common.remaining_ctxt) - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss - (Pulse_Prover_Common.op_Star - pst.Pulse_Prover_Common.solved - (Pulse_Checker_VPropEquiv.list_as_vprop - pst.Pulse_Prover_Common.unsolved)))) - pst.Pulse_Prover_Common.k - (Pulse_Prover_Common.k_elab_equiv - pst.Pulse_Prover_Common.pg - pst_sub1.Pulse_Prover_Common.pg - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst.Pulse_Prover_Common.remaining_ctxt) - (Pulse_Prover_Common.op_Star - preamble.Pulse_Prover_Common.frame - (Pulse_Prover_Common.op_Array_Access - pst.Pulse_Prover_Common.ss - pst.Pulse_Prover_Common.solved))) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst.Pulse_Prover_Common.remaining_ctxt) - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst.Pulse_Prover_Common.ss - pst.Pulse_Prover_Common.solved)) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst_sub1.Pulse_Prover_Common.remaining_ctxt) - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss - (Pulse_Prover_Common.op_Star - pst.Pulse_Prover_Common.solved - (Pulse_Checker_VPropEquiv.list_as_vprop - pst.Pulse_Prover_Common.unsolved)))) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst_sub1.Pulse_Prover_Common.remaining_ctxt) - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss - (Pulse_Prover_Common.op_Star - pst.Pulse_Prover_Common.solved - (Pulse_Checker_VPropEquiv.list_as_vprop - pst.Pulse_Prover_Common.unsolved)))) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst_sub1.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss + (Pulse_Checker_Prover_Base.op_Star + pst.Pulse_Checker_Prover_Base.solved + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.unsolved)))) + pst.Pulse_Checker_Prover_Base.k + (Pulse_Checker_Base.k_elab_equiv + pst.Pulse_Checker_Prover_Base.pg + pst_sub1.Pulse_Checker_Prover_Base.pg + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.remaining_ctxt) + (Pulse_Checker_Prover_Base.op_Star + preamble.Pulse_Checker_Prover_Base.frame + (Pulse_Checker_Prover_Base.op_Array_Access + pst.Pulse_Checker_Prover_Base.ss + pst.Pulse_Checker_Prover_Base.solved))) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst.Pulse_Checker_Prover_Base.ss + pst.Pulse_Checker_Prover_Base.solved)) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst_sub1.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss + (Pulse_Checker_Prover_Base.op_Star + pst.Pulse_Checker_Prover_Base.solved + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.unsolved)))) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst_sub1.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss + (Pulse_Checker_Prover_Base.op_Star + pst.Pulse_Checker_Prover_Base.solved + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.unsolved)))) (coerce_eq - (Pulse_Prover_Common.k_elab_equiv - preamble_sub.Pulse_Prover_Common.g0 - pst_sub1.Pulse_Prover_Common.pg - (Pulse_Prover_Common.op_Star - preamble_sub.Pulse_Prover_Common.ctxt - preamble_sub.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star - preamble_sub.Pulse_Prover_Common.ctxt - preamble_sub.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst_sub1.Pulse_Prover_Common.remaining_ctxt) - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - pst.Pulse_Prover_Common.solved + (Pulse_Checker_Base.k_elab_equiv + preamble_sub.Pulse_Checker_Prover_Base.g0 + pst_sub1.Pulse_Checker_Prover_Base.pg + (Pulse_Checker_Prover_Base.op_Star + preamble_sub.Pulse_Checker_Prover_Base.ctxt + preamble_sub.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + preamble_sub.Pulse_Checker_Prover_Base.ctxt + preamble_sub.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst_sub1.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + pst.Pulse_Checker_Prover_Base.solved (Pulse_Syntax_Base.tm_exists_sl u b body)) - (Pulse_Checker_VPropEquiv.list_as_vprop + (Pulse_Typing_Combinators.list_as_vprop unsolved')))) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst_sub1.Pulse_Prover_Common.remaining_ctxt) - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss - (Pulse_Prover_Common.op_Star - pst.Pulse_Prover_Common.solved - (Pulse_Checker_VPropEquiv.list_as_vprop - pst.Pulse_Prover_Common.unsolved)))) - (Pulse_Prover_Common.k_elab_trans - preamble_sub.Pulse_Prover_Common.g0 - pst_sub1.Pulse_Prover_Common.pg - pst_sub1.Pulse_Prover_Common.pg - (Pulse_Prover_Common.op_Star - preamble_sub.Pulse_Prover_Common.ctxt - preamble_sub.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst_sub1.Pulse_Prover_Common.remaining_ctxt) - preamble_sub.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss - (Pulse_Checker_VPropEquiv.list_as_vprop + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst_sub1.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss + (Pulse_Checker_Prover_Base.op_Star + pst.Pulse_Checker_Prover_Base.solved + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.unsolved)))) + (Pulse_Checker_Base.k_elab_trans + preamble_sub.Pulse_Checker_Prover_Base.g0 + pst_sub1.Pulse_Checker_Prover_Base.pg + pst_sub1.Pulse_Checker_Prover_Base.pg + (Pulse_Checker_Prover_Base.op_Star + preamble_sub.Pulse_Checker_Prover_Base.ctxt + preamble_sub.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst_sub1.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble_sub.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss + (Pulse_Typing_Combinators.list_as_vprop unsolved'))) (Pulse_Syntax_Naming.subst_term - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss body) [ Pulse_Syntax_Naming.DT (Prims.int_zero, witness)])) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst_sub1.Pulse_Prover_Common.remaining_ctxt) - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - pst.Pulse_Prover_Common.solved + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst_sub1.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + pst.Pulse_Checker_Prover_Base.solved (Pulse_Syntax_Base.tm_exists_sl u b body)) - (Pulse_Checker_VPropEquiv.list_as_vprop + (Pulse_Typing_Combinators.list_as_vprop unsolved')))) k_sub5 (coerce_eq - (Pulse_Prover_Common.k_elab_equiv - pst_sub1.Pulse_Prover_Common.pg - pst_sub1.Pulse_Prover_Common.pg - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst_sub1.Pulse_Prover_Common.remaining_ctxt) - preamble_sub.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss - (Pulse_Checker_VPropEquiv.list_as_vprop + (Pulse_Checker_Base.k_elab_equiv + pst_sub1.Pulse_Checker_Prover_Base.pg + pst_sub1.Pulse_Checker_Prover_Base.pg + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst_sub1.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble_sub.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss + (Pulse_Typing_Combinators.list_as_vprop unsolved'))) (Pulse_Syntax_Naming.subst_term - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss body) [ Pulse_Syntax_Naming.DT (Prims.int_zero, witness)])) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst_sub1.Pulse_Prover_Common.remaining_ctxt) - preamble_sub.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss - (Pulse_Checker_VPropEquiv.list_as_vprop + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst_sub1.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble_sub.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss + (Pulse_Typing_Combinators.list_as_vprop unsolved'))) (Pulse_Syntax_Naming.subst_term - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss body) [ Pulse_Syntax_Naming.DT (Prims.int_zero, witness)])) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst_sub1.Pulse_Prover_Common.remaining_ctxt) - (Pulse_Prover_Common.op_Star - preamble.Pulse_Prover_Common.frame - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss - pst.Pulse_Prover_Common.solved))) - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss - (Pulse_Checker_VPropEquiv.list_as_vprop + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst_sub1.Pulse_Checker_Prover_Base.remaining_ctxt) + (Pulse_Checker_Prover_Base.op_Star + preamble.Pulse_Checker_Prover_Base.frame + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss + pst.Pulse_Checker_Prover_Base.solved))) + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss + (Pulse_Typing_Combinators.list_as_vprop unsolved'))) - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss (Pulse_Syntax_Base.tm_exists_sl u b body))) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst_sub1.Pulse_Prover_Common.remaining_ctxt) - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss - pst.Pulse_Prover_Common.solved) - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst_sub1.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss + pst.Pulse_Checker_Prover_Base.solved) + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss (Pulse_Syntax_Base.tm_exists_sl u b body))) - (Pulse_Prover_Common.op_Array_Access - pst_sub1.Pulse_Prover_Common.ss - (Pulse_Checker_VPropEquiv.list_as_vprop + (Pulse_Checker_Prover_Base.op_Array_Access + pst_sub1.Pulse_Checker_Prover_Base.ss + (Pulse_Typing_Combinators.list_as_vprop unsolved')))) (coerce_eq k_intro_exists1 @@ -1342,21 +1353,19 @@ let (intro_exists : ()) ()) () ())) () ()); - Pulse_Prover_Common.goals_inv + Pulse_Checker_Prover_Base.goals_inv = (); - Pulse_Prover_Common.solved_inv + Pulse_Checker_Prover_Base.solved_inv = () })))) - uu___3))) - uu___3))) - uu___3))) - uu___3))) - uu___3))) - uu___3))) - uu___3))) - uu___3))) - uu___3))) - uu___2))) + uu___1))) + uu___1))) + uu___1))) + uu___1))) + uu___1))) + uu___1))) + uu___1))) + uu___1))) uu___1))) uu___1))) uu___1))) diff --git a/src/ocaml/plugin/generated/Pulse_Checker_Prover_IntroPure.ml b/src/ocaml/plugin/generated/Pulse_Checker_Prover_IntroPure.ml new file mode 100644 index 000000000..0de07b2d0 --- /dev/null +++ b/src/ocaml/plugin/generated/Pulse_Checker_Prover_IntroPure.ml @@ -0,0 +1,987 @@ +open Prims +let coerce_eq : 'a 'b . 'a -> unit -> 'b = + fun uu___1 -> fun uu___ -> (fun x -> fun uu___ -> Obj.magic x) uu___1 uu___ +let (k_intro_pure : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + unit -> + (unit, unit) Pulse_Typing.prop_validity -> + Pulse_Syntax_Base.vprop -> + ((unit, unit, unit, unit) + Pulse_Checker_Base.continuation_elaborator, + unit) FStar_Tactics_Effect.tac_repr) + = + fun g -> + fun p -> + fun d -> + fun token -> + fun frame -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (25)) (Prims.of_int (10)) + (Prims.of_int (25)) (Prims.of_int (31))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (25)) (Prims.of_int (34)) + (Prims.of_int (59)) (Prims.of_int (30))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing.wr + (Pulse_Syntax_Base.Tm_IntroPure + { Pulse_Syntax_Base.p = p }))) + (fun uu___ -> + (fun t -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (26)) (Prims.of_int (10)) + (Prims.of_int (26)) (Prims.of_int (27))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (26)) (Prims.of_int (30)) + (Prims.of_int (59)) (Prims.of_int (30))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> Pulse_Typing.comp_intro_pure p)) + (fun uu___ -> + (fun c -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (27)) + (Prims.of_int (28)) + (Prims.of_int (27)) + (Prims.of_int (51))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (27)) + (Prims.of_int (54)) + (Prims.of_int (59)) + (Prims.of_int (30))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing.T_IntroPure + (g, p, (), token))) + (fun uu___ -> + (fun d1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (29)) + (Prims.of_int (10)) + (Prims.of_int (29)) + (Prims.of_int (17))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (32)) + (Prims.of_int (30)) + (Prims.of_int (59)) + (Prims.of_int (30))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing_Env.fresh g)) + (fun uu___ -> + (fun x -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (34)) + (Prims.of_int (15)) + (Prims.of_int (34)) + (Prims.of_int (44))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (34)) + (Prims.of_int (47)) + (Prims.of_int (59)) + (Prims.of_int (30))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Syntax_Base.mk_ppname_no_range + "_pintrop")) + (fun uu___ -> + (fun ppname -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (38)) + (Prims.of_int (4)) + (Prims.of_int (38)) + (Prims.of_int (68))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (45)) + (Prims.of_int (20)) + (Prims.of_int (59)) + (Prims.of_int (30))))) + (Obj.magic + (Pulse_Checker_Base.continuation_elaborator_with_bind + g frame c + t d1 () + (ppname, + x))) + (fun k -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___ -> + fun + post_hint + -> + fun r -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (46)) + (Prims.of_int (25)) + (Prims.of_int (46)) + (Prims.of_int (26))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (45)) + (Prims.of_int (20)) + (Prims.of_int (59)) + (Prims.of_int (30))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___1 -> + r)) + (fun + uu___1 -> + (fun + uu___1 -> + match uu___1 + with + | + FStar_Pervasives.Mkdtuple3 + (t1, c1, + d11) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (47)) + (Prims.of_int (31)) + (Prims.of_int (47)) + (Prims.of_int (33))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (47)) + (Prims.of_int (36)) + (Prims.of_int (59)) + (Prims.of_int (30))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___2 -> + d11)) + (fun + uu___2 -> + (fun d12 + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (48)) + (Prims.of_int (18)) + (Prims.of_int (48)) + (Prims.of_int (38))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (51)) + (Prims.of_int (59)) + (Prims.of_int (59)) + (Prims.of_int (30))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___2 -> + Pulse_Typing_Env.mk_env + (Pulse_Typing_Env.fstar_env + g))) + (fun + uu___2 -> + (fun + empty_env + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (53)) + (Prims.of_int (4)) + (Prims.of_int (57)) + (Prims.of_int (47))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (59)) + (Prims.of_int (2)) + (Prims.of_int (59)) + (Prims.of_int (30))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___2 -> + Pulse_Typing_Metatheory.st_typing_weakening + g + empty_env + t1 c1 d12 + (Pulse_Typing_Env.push_binding + g x + Pulse_Syntax_Base.ppname_default + Pulse_Typing.tm_unit))) + (fun + uu___2 -> + (fun d13 + -> + Obj.magic + (Pulse_Checker_Base.k_elab_equiv + g + (Pulse_Typing_Env.push_binding + g x + Pulse_Syntax_Base.ppname_default + Pulse_Typing.tm_unit) + (Pulse_Checker_Prover_Base.op_Star + frame + Pulse_Syntax_Base.tm_emp) + frame + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Syntax_Base.tm_pure + p) frame) + (Pulse_Checker_Prover_Base.op_Star + frame + (Pulse_Syntax_Base.tm_pure + p)) k () + () + post_hint + (FStar_Pervasives.Mkdtuple3 + (t1, c1, + d13)))) + uu___2))) + uu___2))) + uu___2))) + uu___1))))) + uu___))) uu___))) + uu___))) uu___))) uu___) +let (is_eq2_uvar : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + (Pulse_Syntax_Base.var, Pulse_Syntax_Base.term) Prims.dtuple2 + FStar_Pervasives_Native.option) + = + fun uvs -> + fun t -> + match Pulse_Syntax_Pure.is_eq2 t with + | FStar_Pervasives_Native.None -> FStar_Pervasives_Native.None + | FStar_Pervasives_Native.Some (l, r) -> + (match Pulse_Syntax_Pure.is_var l with + | FStar_Pervasives_Native.Some nm -> + if + FStar_Set.mem nm.Pulse_Syntax_Base.nm_index + (Pulse_Typing_Env.dom uvs) + then + FStar_Pervasives_Native.Some + (Prims.Mkdtuple2 ((nm.Pulse_Syntax_Base.nm_index), r)) + else FStar_Pervasives_Native.None + | FStar_Pervasives_Native.None -> + (match Pulse_Syntax_Pure.is_var r with + | FStar_Pervasives_Native.Some nm -> + if + FStar_Set.mem nm.Pulse_Syntax_Base.nm_index + (Pulse_Typing_Env.dom uvs) + then + FStar_Pervasives_Native.Some + (Prims.Mkdtuple2 ((nm.Pulse_Syntax_Base.nm_index), l)) + else FStar_Pervasives_Native.None + | uu___ -> FStar_Pervasives_Native.None)) +let rec (try_collect_substs : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + (Pulse_Checker_Prover_Substs.ss_t, unit) FStar_Tactics_Effect.tac_repr) + = + fun uu___1 -> + fun uu___ -> + (fun uvs -> + fun t -> + match t.Pulse_Syntax_Base.t with + | Pulse_Syntax_Base.Tm_FStar rt -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (100)) (Prims.of_int (12)) + (Prims.of_int (100)) (Prims.of_int (34))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (102)) (Prims.of_int (6)) + (Prims.of_int (119)) (Prims.of_int (26))))) + (Obj.magic + (FStar_Reflection_V2_Formula.term_as_formula' rt)) + (fun uu___ -> + (fun f -> + match f with + | FStar_Reflection_V2_Formula.And (rt0, rt1) -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (105)) + (Prims.of_int (18)) + (Prims.of_int (105)) + (Prims.of_int (75))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (105)) + (Prims.of_int (78)) + (Prims.of_int (111)) + (Prims.of_int (21))))) + (Obj.magic + (try_collect_substs uvs + (Pulse_Syntax_Base.tm_fstar + rt0 FStar_Range.range_0))) + (fun uu___ -> + (fun ss0 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (106)) + (Prims.of_int (18)) + (Prims.of_int (106)) + (Prims.of_int (75))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (107)) + (Prims.of_int (8)) + (Prims.of_int (111)) + (Prims.of_int (21))))) + (Obj.magic + (try_collect_substs + uvs + (Pulse_Syntax_Base.tm_fstar + rt1 + FStar_Range.range_0))) + (fun ss1 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + if + Pulse_Checker_Prover_Substs.check_disjoint + ss0 ss1 + then + Pulse_Checker_Prover_Substs.push_ss + ss0 ss1 + else + Pulse_Checker_Prover_Substs.empty)))) + uu___))) + | uu___ -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + match is_eq2_uvar uvs t with + | FStar_Pervasives_Native.Some + (Prims.Mkdtuple2 (uv, e)) -> + Pulse_Checker_Prover_Substs.push + Pulse_Checker_Prover_Substs.empty + uv e + | FStar_Pervasives_Native.None -> + Pulse_Checker_Prover_Substs.empty)))) + uu___))) + | uu___ -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> Pulse_Checker_Prover_Substs.empty)))) + uu___1 uu___ +let (intro_pure : + Pulse_Checker_Prover_Base.preamble -> + unit Pulse_Checker_Prover_Base.prover_state -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.vprop Prims.list -> + unit -> + (unit Pulse_Checker_Prover_Base.prover_state + FStar_Pervasives_Native.option, + unit) FStar_Tactics_Effect.tac_repr) + = + fun preamble -> + fun pst -> + fun t -> + fun unsolved' -> + fun uu___ -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (130)) (Prims.of_int (13)) + (Prims.of_int (130)) (Prims.of_int (23))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (132)) (Prims.of_int (2)) + (Prims.of_int (263)) (Prims.of_int (14))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + Pulse_Checker_Prover_Base.op_Array_Access + pst.Pulse_Checker_Prover_Base.ss t)) + (fun uu___1 -> + (fun t_ss -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (132)) (Prims.of_int (2)) + (Prims.of_int (135)) (Prims.of_int (30))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (135)) (Prims.of_int (31)) + (Prims.of_int (263)) (Prims.of_int (14))))) + (Obj.magic + (Pulse_Checker_Prover_Util.debug_prover + pst.Pulse_Checker_Prover_Base.pg + (fun uu___1 -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (135)) + (Prims.of_int (6)) + (Prims.of_int (135)) + (Prims.of_int (29))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (133)) + (Prims.of_int (4)) + (Prims.of_int (135)) + (Prims.of_int (29))))) + (Obj.magic + (Pulse_Typing_Env.env_to_string + pst.Pulse_Checker_Prover_Base.uvs)) + (fun uu___2 -> + (fun uu___2 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (133)) + (Prims.of_int (4)) + (Prims.of_int (135)) + (Prims.of_int (29))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (133)) + (Prims.of_int (4)) + (Prims.of_int (135)) + (Prims.of_int (29))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (134)) + (Prims.of_int (6)) + (Prims.of_int (134)) + (Prims.of_int (29))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + t_ss)) + (fun uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___4 -> + fun x -> + Prims.strcat + (Prims.strcat + "Intro pure trying to typecheck prop: " + ( + Prims.strcat + uu___3 + " with uvs: ")) + (Prims.strcat + x "\n"))))) + (fun uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___4 -> + uu___3 uu___2)))) + uu___2)))) + (fun uu___1 -> + (fun uu___1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (138)) + (Prims.of_int (12)) + (Prims.of_int (138)) + (Prims.of_int (43))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (139)) + (Prims.of_int (51)) + (Prims.of_int (263)) + (Prims.of_int (14))))) + (Obj.magic + (try_collect_substs + pst.Pulse_Checker_Prover_Base.uvs + t_ss)) + (fun uu___2 -> + (fun ss' -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (140)) + (Prims.of_int (15)) + (Prims.of_int (140)) + (Prims.of_int (36))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (141)) + (Prims.of_int (38)) + (Prims.of_int (263)) + (Prims.of_int (14))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + Pulse_Checker_Prover_Substs.push_ss + pst.Pulse_Checker_Prover_Base.ss + ss')) + (fun uu___2 -> + (fun ss_new -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (143)) + (Prims.of_int (13)) + (Prims.of_int (143)) + (Prims.of_int (23))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (143)) + (Prims.of_int (26)) + (Prims.of_int (263)) + (Prims.of_int (14))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + Pulse_Checker_Prover_Base.op_Array_Access + ss_new t)) + (fun uu___2 -> + (fun t_ss1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (144)) + (Prims.of_int (9)) + (Prims.of_int (146)) + (Prims.of_int (7))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (146)) + (Prims.of_int (10)) + (Prims.of_int (263)) + (Prims.of_int (14))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (145)) + (Prims.of_int (12)) + (Prims.of_int (145)) + (Prims.of_int (66))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (146)) + (Prims.of_int (4)) + (Prims.of_int (146)) + (Prims.of_int (7))))) + (Obj.magic + (Pulse_Checker_Pure.core_check_term_with_expected_type + pst.Pulse_Checker_Prover_Base.pg + t_ss1 + Pulse_Typing.tm_prop)) + (fun d -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___2 -> + ())))) + (fun + uu___2 -> + (fun d -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (147)) + (Prims.of_int (16)) + (Prims.of_int (147)) + (Prims.of_int (49))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (147)) + (Prims.of_int (52)) + (Prims.of_int (263)) + (Prims.of_int (14))))) + (Obj.magic + (Pulse_Checker_Pure.check_prop_validity + pst.Pulse_Checker_Prover_Base.pg + t_ss1 ())) + (fun + uu___2 -> + (fun + d_valid + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (180)) + (Prims.of_int (10)) + (Prims.of_int (180)) + (Prims.of_int (41))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (180)) + (Prims.of_int (44)) + (Prims.of_int (263)) + (Prims.of_int (14))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___2 -> + Pulse_Typing_Env.fresh + (Pulse_Typing_Env.push_env + pst.Pulse_Checker_Prover_Base.pg + pst.Pulse_Checker_Prover_Base.uvs))) + (fun + uu___2 -> + (fun x -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (182)) + (Prims.of_int (19)) + (Prims.of_int (182)) + (Prims.of_int (43))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (182)) + (Prims.of_int (46)) + (Prims.of_int (263)) + (Prims.of_int (14))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___2 -> + Pulse_Checker_Prover_Base.op_Star + (Pulse_Syntax_Base.tm_pure + t) + pst.Pulse_Checker_Prover_Base.solved)) + (fun + uu___2 -> + (fun + solved_new + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (183)) + (Prims.of_int (21)) + (Prims.of_int (183)) + (Prims.of_int (30))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (183)) + (Prims.of_int (33)) + (Prims.of_int (263)) + (Prims.of_int (14))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___2 -> + unsolved')) + (fun + uu___2 -> + (fun + unsolved_new + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (187)) + (Prims.of_int (96)) + (Prims.of_int (221)) + (Prims.of_int (29))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (263)) + (Prims.of_int (2)) + (Prims.of_int (263)) + (Prims.of_int (14))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (188)) + (Prims.of_int (16)) + (Prims.of_int (188)) + (Prims.of_int (89))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (188)) + (Prims.of_int (92)) + (Prims.of_int (221)) + (Prims.of_int (29))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___2 -> + Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + ss_new + pst.Pulse_Checker_Prover_Base.solved))) + (fun + uu___2 -> + (fun + frame -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (193)) + (Prims.of_int (6)) + (Prims.of_int (193)) + (Prims.of_int (38))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.IntroPure.fst" + (Prims.of_int (221)) + (Prims.of_int (4)) + (Prims.of_int (221)) + (Prims.of_int (29))))) + (Obj.magic + (k_intro_pure + pst.Pulse_Checker_Prover_Base.pg + t_ss1 () + d_valid + frame)) + (fun + k_pure -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___2 -> + Pulse_Checker_Base.k_elab_trans + preamble.Pulse_Checker_Prover_Base.g0 + pst.Pulse_Checker_Prover_Base.pg + pst.Pulse_Checker_Prover_Base.pg + (Pulse_Checker_Prover_Base.op_Star + preamble.Pulse_Checker_Prover_Base.ctxt + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + ss_new + pst.Pulse_Checker_Prover_Base.solved)) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + ss_new + solved_new)) + (coerce_eq + pst.Pulse_Checker_Prover_Base.k + ()) + (Pulse_Checker_Base.k_elab_equiv + pst.Pulse_Checker_Prover_Base.pg + pst.Pulse_Checker_Prover_Base.pg + frame + frame + (Pulse_Checker_Prover_Base.op_Star + frame + (Pulse_Syntax_Base.tm_pure + t_ss1)) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + pst.Pulse_Checker_Prover_Base.remaining_ctxt) + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Syntax_Base.tm_pure + t_ss1) + (Pulse_Checker_Prover_Base.op_Array_Access + ss_new + pst.Pulse_Checker_Prover_Base.solved))) + k_pure () + ()))))) + uu___2))) + (fun k -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___2 -> + FStar_Pervasives_Native.Some + { + Pulse_Checker_Prover_Base.pg + = + (pst.Pulse_Checker_Prover_Base.pg); + Pulse_Checker_Prover_Base.remaining_ctxt + = + (pst.Pulse_Checker_Prover_Base.remaining_ctxt); + Pulse_Checker_Prover_Base.remaining_ctxt_frame_typing + = (); + Pulse_Checker_Prover_Base.uvs + = + (pst.Pulse_Checker_Prover_Base.uvs); + Pulse_Checker_Prover_Base.ss + = ss_new; + Pulse_Checker_Prover_Base.solved + = + solved_new; + Pulse_Checker_Prover_Base.unsolved + = + unsolved_new; + Pulse_Checker_Prover_Base.k + = k; + Pulse_Checker_Prover_Base.goals_inv + = (); + Pulse_Checker_Prover_Base.solved_inv + = () + })))) + uu___2))) + uu___2))) + uu___2))) + uu___2))) + uu___2))) + uu___2))) + uu___2))) uu___2))) + uu___1))) uu___1) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Checker_Prover_Match.ml b/src/ocaml/plugin/generated/Pulse_Checker_Prover_Match.ml new file mode 100644 index 000000000..f91a41ba7 --- /dev/null +++ b/src/ocaml/plugin/generated/Pulse_Checker_Prover_Match.ml @@ -0,0 +1,2439 @@ +open Prims +let (equational : Pulse_Syntax_Base.term -> Prims.bool) = + fun t -> + match t.Pulse_Syntax_Base.t with + | Pulse_Syntax_Base.Tm_FStar host_term -> + (match FStar_Reflection_V2_Builtins.inspect_ln host_term with + | FStar_Reflection_V2_Data.Tv_Match (uu___, uu___1, uu___2) -> true + | uu___ -> false) + | uu___ -> false +let (type_of_fv : + Pulse_Typing_Env.env -> + FStar_Reflection_Types.fv -> + (FStar_Reflection_Types.term FStar_Pervasives_Native.option, unit) + FStar_Tactics_Effect.tac_repr) + = + fun uu___1 -> + fun uu___ -> + (fun g -> + fun fv -> + Obj.magic + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + match FStar_Reflection_V2_Builtins.lookup_typ + (Pulse_Typing_Env.fstar_env g) + (FStar_Reflection_V2_Builtins.inspect_fv fv) + with + | FStar_Pervasives_Native.None -> + FStar_Pervasives_Native.None + | FStar_Pervasives_Native.Some se -> + (match FStar_Reflection_V2_Builtins.inspect_sigelt se + with + | FStar_Reflection_V2_Data.Unk -> + FStar_Pervasives_Native.None + | FStar_Reflection_V2_Data.Sg_Let (uu___1, lbs) -> + FStar_List_Tot_Base.tryPick + (fun lb -> + if + (FStar_Reflection_V2_Builtins.inspect_fv + (FStar_Reflection_V2_Builtins.inspect_lb + lb).FStar_Reflection_V2_Data.lb_fv) + = + (FStar_Reflection_V2_Builtins.inspect_fv + fv) + then + FStar_Pervasives_Native.Some + ((FStar_Reflection_V2_Builtins.inspect_lb + lb).FStar_Reflection_V2_Data.lb_typ) + else FStar_Pervasives_Native.None) lbs + | FStar_Reflection_V2_Data.Sg_Val (uu___1, uu___2, t) + -> FStar_Pervasives_Native.Some t + | FStar_Reflection_V2_Data.Sg_Inductive + (_nm, _univs, params, typ, uu___1) -> + FStar_Pervasives_Native.None)))) uu___1 uu___ +let (is_smt_fallback : FStar_Reflection_Types.term -> Prims.bool) = + fun t -> + match FStar_Reflection_V2_Builtins.inspect_ln t with + | FStar_Reflection_V2_Data.Tv_FVar fv -> + let name = FStar_Reflection_V2_Builtins.inspect_fv fv in + name = ["Steel"; "Effect"; "Common"; "smt_fallback"] + | uu___ -> false +let (eligible_for_smt_equality : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.term -> + (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) + = + fun g -> + fun t0 -> + fun t1 -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (90)) (Prims.of_int (31)) + (Prims.of_int (90)) (Prims.of_int (61))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (90)) (Prims.of_int (64)) + (Prims.of_int (148)) (Prims.of_int (31))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> fun uu___1 -> (equational t0) || (equational t1))) + (fun uu___ -> + (fun either_equational -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (92)) (Prims.of_int (6)) + (Prims.of_int (95)) (Prims.of_int (18))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (97)) (Prims.of_int (4)) + (Prims.of_int (148)) (Prims.of_int (31))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + fun t01 -> + fun t11 -> + match ((FStar_Reflection_V2_Builtins.inspect_ln + t01), + (FStar_Reflection_V2_Builtins.inspect_ln + t11)) + with + | (FStar_Reflection_V2_Data.Tv_App + (h0, uu___1), + FStar_Reflection_V2_Data.Tv_App + (h1, uu___2)) -> + FStar_Reflection_V2_TermEq.term_eq h0 h1 + | uu___1 -> false)) + (fun uu___ -> + (fun head_eq -> + match ((t0.Pulse_Syntax_Base.t), + (t1.Pulse_Syntax_Base.t)) + with + | (Pulse_Syntax_Base.Tm_FStar t01, + Pulse_Syntax_Base.Tm_FStar t11) -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (99)) + (Prims.of_int (22)) + (Prims.of_int (99)) + (Prims.of_int (41))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (98)) + (Prims.of_int (34)) + (Prims.of_int (147)) + (Prims.of_int (5))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + FStar_Reflection_V2_Derived.collect_app_ln + t01)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | (h0, args0) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (100)) + (Prims.of_int (22)) + (Prims.of_int (100)) + (Prims.of_int (41))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (99)) + (Prims.of_int (44)) + (Prims.of_int (146)) + (Prims.of_int (31))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + FStar_Reflection_V2_Derived.collect_app_ln + t11)) + (fun uu___1 -> + (fun uu___1 -> + match uu___1 with + | (h1, args1) -> + if + (FStar_Reflection_V2_TermEq.term_eq + h0 h1) && + ( + (FStar_List_Tot_Base.length + args0) = + (FStar_List_Tot_Base.length + args1)) + then + Obj.magic + ( + Obj.repr + (match + FStar_Reflection_V2_Builtins.inspect_ln + h0 + with + | + FStar_Reflection_V2_Data.Tv_FVar + fv -> + Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (106)) + (Prims.of_int (16)) + (Prims.of_int (106)) + (Prims.of_int (31))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (105)) + (Prims.of_int (29)) + (Prims.of_int (143)) + (Prims.of_int (9))))) + (Obj.magic + (type_of_fv + g fv)) + (fun + uu___2 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + match uu___2 + with + | + FStar_Pervasives_Native.None + -> + either_equational + () + | + FStar_Pervasives_Native.Some + t -> + (match + FStar_Reflection_V2_Derived.collect_arr_ln_bs + t + with + | + (bs, + uu___4) + -> + (match + FStar_List_Tot_Base.fold_right + (fun b -> + fun + uu___5 -> + match uu___5 + with + | + (some_fallbacks, + bs1) -> + if + FStar_List_Tot_Base.existsb + is_smt_fallback + (FStar_Reflection_V2_Builtins.inspect_binder + b).FStar_Reflection_V2_Data.attrs + then + (true, + (true :: + bs1)) + else + (some_fallbacks, + (false :: + bs1))) bs + (false, + []) + with + | + (some_fallbacks, + fallbacks) + -> + if + Prims.op_Negation + some_fallbacks + then + head_eq + t01 t11 + else + (let rec aux + args01 + args11 + fallbacks1 + = + match + (args01, + args11, + fallbacks1) + with + | + ((a0, + uu___6)::args02, + (a1, + uu___7)::args12, + b::fallbacks2) + -> + if b + then + aux + args02 + args12 + fallbacks2 + else + if + Prims.op_Negation + (FStar_Reflection_V2_TermEq.term_eq + a0 a1) + then + false + else + aux + args02 + args12 + fallbacks2 + | + ([], [], + []) -> + true + | + uu___6 -> + either_equational + () in + aux args0 + args1 + fallbacks)))))) + | + FStar_Reflection_V2_Data.Tv_UInst + (fv, + uu___2) + -> + Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (106)) + (Prims.of_int (16)) + (Prims.of_int (106)) + (Prims.of_int (31))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (105)) + (Prims.of_int (29)) + (Prims.of_int (143)) + (Prims.of_int (9))))) + (Obj.magic + (type_of_fv + g fv)) + (fun + uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + match uu___3 + with + | + FStar_Pervasives_Native.None + -> + either_equational + () + | + FStar_Pervasives_Native.Some + t -> + (match + FStar_Reflection_V2_Derived.collect_arr_ln_bs + t + with + | + (bs, + uu___5) + -> + (match + FStar_List_Tot_Base.fold_right + (fun b -> + fun + uu___6 -> + match uu___6 + with + | + (some_fallbacks, + bs1) -> + if + FStar_List_Tot_Base.existsb + is_smt_fallback + (FStar_Reflection_V2_Builtins.inspect_binder + b).FStar_Reflection_V2_Data.attrs + then + (true, + (true :: + bs1)) + else + (some_fallbacks, + (false :: + bs1))) bs + (false, + []) + with + | + (some_fallbacks, + fallbacks) + -> + if + Prims.op_Negation + some_fallbacks + then + head_eq + t01 t11 + else + (let rec aux + args01 + args11 + fallbacks1 + = + match + (args01, + args11, + fallbacks1) + with + | + ((a0, + uu___7)::args02, + (a1, + uu___8)::args12, + b::fallbacks2) + -> + if b + then + aux + args02 + args12 + fallbacks2 + else + if + Prims.op_Negation + (FStar_Reflection_V2_TermEq.term_eq + a0 a1) + then + false + else + aux + args02 + args12 + fallbacks2 + | + ([], [], + []) -> + true + | + uu___7 -> + either_equational + () in + aux args0 + args1 + fallbacks)))))) + | + uu___2 -> + Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + either_equational + ())))) + else + Obj.magic + ( + Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + either_equational + ())))) + uu___1))) uu___))) + | uu___ -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> either_equational ())))) + uu___))) uu___) +let (refl_uvar : + FStar_Reflection_Types.term -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.var FStar_Pervasives_Native.option) + = + fun t -> + fun uvs -> + match FStar_Reflection_V2_Builtins.inspect_ln t with + | FStar_Reflection_V2_Data.Tv_Var v -> + let uu___ = FStar_Reflection_V2_Builtins.inspect_namedv v in + (match uu___ with + | { FStar_Reflection_V2_Data.uniq = n; + FStar_Reflection_V2_Data.sort = uu___1; + FStar_Reflection_V2_Data.ppname = uu___2;_} -> + if Pulse_Typing_Env.contains uvs n + then FStar_Pervasives_Native.Some n + else FStar_Pervasives_Native.None) + | uu___ -> FStar_Pervasives_Native.None +let (is_uvar : + Pulse_Syntax_Base.term -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.var FStar_Pervasives_Native.option) + = + fun t -> + fun uvs -> + match t.Pulse_Syntax_Base.t with + | Pulse_Syntax_Base.Tm_FStar t1 -> refl_uvar t1 uvs + | uu___ -> FStar_Pervasives_Native.None +let (contains_uvar : + Pulse_Syntax_Base.term -> + Pulse_Typing_Env.env -> + Pulse_Typing_Env.env -> + (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) + = + fun uu___2 -> + fun uu___1 -> + fun uu___ -> + (fun t -> + fun uvs -> + fun g -> + Obj.magic + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Prims.op_Negation + (Pulse_Typing_Env.check_disjoint uvs + (Pulse_Syntax_Naming.freevars t))))) uu___2 + uu___1 uu___ +let (is_reveal_uvar : + Pulse_Syntax_Base.term -> + Pulse_Typing_Env.env -> + (Pulse_Syntax_Base.universe * Pulse_Syntax_Base.term * + Pulse_Syntax_Base.var) FStar_Pervasives_Native.option) + = + fun t -> + fun uvs -> + match Pulse_Syntax_Pure.is_pure_app t with + | FStar_Pervasives_Native.Some (hd, FStar_Pervasives_Native.None, arg) + -> + (match Pulse_Syntax_Pure.is_pure_app hd with + | FStar_Pervasives_Native.Some + (hd1, FStar_Pervasives_Native.Some + (Pulse_Syntax_Base.Implicit), ty) + -> + let arg_uvar_index_opt = is_uvar arg uvs in + (match arg_uvar_index_opt with + | FStar_Pervasives_Native.Some n -> + (match Pulse_Syntax_Pure.is_fvar hd1 with + | FStar_Pervasives_Native.Some (l, u::[]) -> + if l = Pulse_Reflection_Util.reveal_lid + then FStar_Pervasives_Native.Some (u, ty, n) + else FStar_Pervasives_Native.None + | uu___ -> FStar_Pervasives_Native.None) + | uu___ -> FStar_Pervasives_Native.None) + | uu___ -> FStar_Pervasives_Native.None) + | uu___ -> FStar_Pervasives_Native.None +let (is_reveal : Pulse_Syntax_Base.term -> Prims.bool) = + fun t -> + match Pulse_Syntax_Pure.leftmost_head t with + | FStar_Pervasives_Native.Some hd -> + (match Pulse_Syntax_Pure.is_fvar hd with + | FStar_Pervasives_Native.Some (l, uu___::[]) -> + l = Pulse_Reflection_Util.reveal_lid + | uu___ -> false) + | uu___ -> false +let rec (unify : + Pulse_Typing_Env.env -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.term -> + Pulse_Checker_Prover_Substs.ss_t -> + ((Pulse_Checker_Prover_Substs.ss_t, + (unit, unit, unit) FStar_Reflection_Typing.equiv) + Prims.dtuple2 FStar_Pervasives_Native.option, + unit) FStar_Tactics_Effect.tac_repr) + = + fun g -> + fun uvs -> + fun p -> + fun q -> + fun ss -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (201)) (Prims.of_int (4)) + (Prims.of_int (202)) (Prims.of_int (18))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (203)) (Prims.of_int (4)) + (Prims.of_int (311)) (Prims.of_int (27))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + fun g1 -> + fun t1 -> + fun t2 -> FStar_Reflection_Typing.EQ_Refl (g1, t1))) + (fun uu___ -> + (fun rt_equiv -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (205)) (Prims.of_int (11)) + (Prims.of_int (205)) (Prims.of_int (12))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (205)) (Prims.of_int (15)) + (Prims.of_int (311)) (Prims.of_int (27))))) + (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> q)) + (fun uu___ -> + (fun q0 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (206)) + (Prims.of_int (10)) + (Prims.of_int (206)) + (Prims.of_int (16))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (209)) + (Prims.of_int (2)) + (Prims.of_int (311)) + (Prims.of_int (27))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Checker_Prover_Base.op_Array_Access + ss q)) + (fun uu___ -> + (fun q1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (209)) + (Prims.of_int (2)) + (Prims.of_int (210)) + (Prims.of_int (93))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (212)) + (Prims.of_int (2)) + (Prims.of_int (311)) + (Prims.of_int (27))))) + (Obj.magic + (Pulse_Checker_Prover_Util.debug_prover + g + (fun uu___ -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (210)) + (Prims.of_int (72)) + (Prims.of_int (210)) + (Prims.of_int (92))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (210)) + (Prims.of_int (4)) + (Prims.of_int (210)) + (Prims.of_int (92))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + q1)) + (fun uu___1 -> + (fun uu___1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (210)) + (Prims.of_int (4)) + (Prims.of_int (210)) + (Prims.of_int (92))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (210)) + (Prims.of_int (4)) + (Prims.of_int (210)) + (Prims.of_int (92))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (210)) + (Prims.of_int (51)) + (Prims.of_int (210)) + (Prims.of_int (71))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + p)) + (fun + uu___2 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + fun x -> + Prims.strcat + (Prims.strcat + "prover.match trying " + (Prims.strcat + uu___2 + " =?= ")) + (Prims.strcat + x ""))))) + (fun + uu___2 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + uu___2 + uu___1)))) + uu___1)))) + (fun uu___ -> + (fun uu___ -> + if + Pulse_Syntax_Base.eq_tm + p q1 + then + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (214)) + (Prims.of_int (4)) + (Prims.of_int (215)) + (Prims.of_int (102))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (218)) + (Prims.of_int (4)) + (Prims.of_int (218)) + (Prims.of_int (33))))) + (Obj.magic + (Pulse_Checker_Prover_Util.debug_prover + g + (fun uu___1 + -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (215)) + (Prims.of_int (81)) + (Prims.of_int (215)) + (Prims.of_int (101))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (215)) + (Prims.of_int (6)) + (Prims.of_int (215)) + (Prims.of_int (101))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + q1)) + (fun + uu___2 -> + (fun + uu___2 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (215)) + (Prims.of_int (6)) + (Prims.of_int (215)) + (Prims.of_int (101))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (215)) + (Prims.of_int (6)) + (Prims.of_int (215)) + (Prims.of_int (101))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (215)) + (Prims.of_int (60)) + (Prims.of_int (215)) + (Prims.of_int (80))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + p)) + (fun + uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + fun x -> + Prims.strcat + (Prims.strcat + "prover.match trying " + (Prims.strcat + uu___3 + " =?= ")) + (Prims.strcat + x + ", eq_tm"))))) + (fun + uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + uu___3 + uu___2)))) + uu___2)))) + (fun uu___1 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___2 + -> + FStar_Pervasives_Native.Some + (Prims.Mkdtuple2 + (ss, + (FStar_Reflection_Typing.EQ_Refl + ((Pulse_Typing.elab_env + g), + (Pulse_Elaborate_Pure.elab_term + p)))))))) + else + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (220)) + (Prims.of_int (10)) + (Prims.of_int (220)) + (Prims.of_int (37))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (220)) + (Prims.of_int (7)) + (Prims.of_int (311)) + (Prims.of_int (27))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (220)) + (Prims.of_int (14)) + (Prims.of_int (220)) + (Prims.of_int (37))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (220)) + (Prims.of_int (10)) + (Prims.of_int (220)) + (Prims.of_int (37))))) + (Obj.magic + (contains_uvar + q1 uvs g)) + (fun uu___2 + -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + Prims.op_Negation + uu___2)))) + (fun uu___2 -> + (fun uu___2 -> + if uu___2 + then + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (222)) + (Prims.of_int (7)) + (Prims.of_int (222)) + (Prims.of_int (38))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (222)) + (Prims.of_int (4)) + (Prims.of_int (237)) + (Prims.of_int (13))))) + (Obj.magic + (eligible_for_smt_equality + g p q1)) + (fun + uu___3 -> + (fun + uu___3 -> + if uu___3 + then + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (224)) + (Prims.of_int (11)) + (Prims.of_int (225)) + (Prims.of_int (146))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (227)) + (Prims.of_int (62)) + (Prims.of_int (232)) + (Prims.of_int (26))))) + (Obj.magic + (Pulse_Checker_Prover_Util.debug_prover + g + (fun + uu___4 -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (225)) + (Prims.of_int (125)) + (Prims.of_int (225)) + (Prims.of_int (145))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (225)) + (Prims.of_int (13)) + (Prims.of_int (225)) + (Prims.of_int (145))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + q1)) + (fun + uu___5 -> + (fun + uu___5 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (225)) + (Prims.of_int (13)) + (Prims.of_int (225)) + (Prims.of_int (145))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (225)) + (Prims.of_int (13)) + (Prims.of_int (225)) + (Prims.of_int (145))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (225)) + (Prims.of_int (104)) + (Prims.of_int (225)) + (Prims.of_int (124))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + p)) + (fun + uu___6 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___7 -> + fun x -> + Prims.strcat + (Prims.strcat + "prover.match trying " + (Prims.strcat + uu___6 + " =?= ")) + (Prims.strcat + x + ", not eq_tm, q has no uvar, eligible for smt"))))) + (fun + uu___6 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___7 -> + uu___6 + uu___5)))) + uu___5)))) + (fun + uu___4 -> + (fun + uu___4 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (228)) + (Prims.of_int (18)) + (Prims.of_int (228)) + (Prims.of_int (29))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (228)) + (Prims.of_int (32)) + (Prims.of_int (232)) + (Prims.of_int (26))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___5 -> + Pulse_Elaborate_Pure.elab_term + p)) + (fun + uu___5 -> + (fun v0 + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (229)) + (Prims.of_int (18)) + (Prims.of_int (229)) + (Prims.of_int (29))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (230)) + (Prims.of_int (9)) + (Prims.of_int (232)) + (Prims.of_int (26))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___5 -> + Pulse_Elaborate_Pure.elab_term + q1)) + (fun + uu___5 -> + (fun v1 + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (230)) + (Prims.of_int (15)) + (Prims.of_int (230)) + (Prims.of_int (47))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (230)) + (Prims.of_int (9)) + (Prims.of_int (232)) + (Prims.of_int (26))))) + (Obj.magic + (FStar_Tactics_V2_Builtins.check_equiv + (Pulse_Typing.elab_env + g) v0 v1)) + (fun + uu___5 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___6 -> + match uu___5 + with + | + (FStar_Pervasives_Native.Some + token, + uu___7) + -> + FStar_Pervasives_Native.Some + (Prims.Mkdtuple2 + (ss, + (FStar_Reflection_Typing.EQ_Token + ((Pulse_Typing.elab_env + g), v0, + v1, ())))) + | + (FStar_Pervasives_Native.None, + uu___7) + -> + FStar_Pervasives_Native.None)))) + uu___5))) + uu___5))) + uu___4)) + else + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (234)) + (Prims.of_int (11)) + (Prims.of_int (235)) + (Prims.of_int (150))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (237)) + (Prims.of_int (9)) + (Prims.of_int (237)) + (Prims.of_int (13))))) + (Obj.magic + (Pulse_Checker_Prover_Util.debug_prover + g + (fun + uu___5 -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (235)) + (Prims.of_int (129)) + (Prims.of_int (235)) + (Prims.of_int (149))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (235)) + (Prims.of_int (13)) + (Prims.of_int (235)) + (Prims.of_int (149))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + q1)) + (fun + uu___6 -> + (fun + uu___6 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (235)) + (Prims.of_int (13)) + (Prims.of_int (235)) + (Prims.of_int (149))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (235)) + (Prims.of_int (13)) + (Prims.of_int (235)) + (Prims.of_int (149))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (235)) + (Prims.of_int (108)) + (Prims.of_int (235)) + (Prims.of_int (128))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + p)) + (fun + uu___7 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___8 -> + fun x -> + Prims.strcat + (Prims.strcat + "prover.match trying " + (Prims.strcat + uu___7 + " =?= ")) + (Prims.strcat + x + ", not eq_tm, q has no uvar, not eligible for smt"))))) + (fun + uu___7 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___8 -> + uu___7 + uu___6)))) + uu___6)))) + (fun + uu___5 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___6 -> + FStar_Pervasives_Native.None)))) + uu___3))) + else + Obj.magic + (Obj.repr + (match + ((is_reveal_uvar + q1 uvs), + (is_reveal + p)) + with + | + (FStar_Pervasives_Native.Some + (u, ty, + n), + false) -> + Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (241)) + (Prims.of_int (9)) + (Prims.of_int (242)) + (Prims.of_int (151))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (242)) + (Prims.of_int (152)) + (Prims.of_int (259)) + (Prims.of_int (18))))) + (Obj.magic + (Pulse_Checker_Prover_Util.debug_prover + g + (fun + uu___4 -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (242)) + (Prims.of_int (130)) + (Prims.of_int (242)) + (Prims.of_int (150))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (242)) + (Prims.of_int (13)) + (Prims.of_int (242)) + (Prims.of_int (150))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + q1)) + (fun + uu___5 -> + (fun + uu___5 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (242)) + (Prims.of_int (13)) + (Prims.of_int (242)) + (Prims.of_int (150))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (242)) + (Prims.of_int (13)) + (Prims.of_int (242)) + (Prims.of_int (150))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (242)) + (Prims.of_int (109)) + (Prims.of_int (242)) + (Prims.of_int (129))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + p)) + (fun + uu___6 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___7 -> + fun x -> + Prims.strcat + (Prims.strcat + "prover.match trying " + (Prims.strcat + uu___6 + " =?= ")) + (Prims.strcat + x + ", not eq_tm, q is reveal of uvar, p is not reveal"))))) + (fun + uu___6 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___7 -> + uu___6 + uu___5)))) + uu___5)))) + (fun + uu___4 -> + (fun + uu___4 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (243)) + (Prims.of_int (17)) + (Prims.of_int (243)) + (Prims.of_int (31))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (246)) + (Prims.of_int (54)) + (Prims.of_int (259)) + (Prims.of_int (18))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___5 -> + Pulse_Typing.mk_hide + u ty p)) + (fun + uu___5 -> + (fun w -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (247)) + (Prims.of_int (22)) + (Prims.of_int (247)) + (Prims.of_int (42))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (250)) + (Prims.of_int (59)) + (Prims.of_int (259)) + (Prims.of_int (18))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___5 -> + Pulse_Checker_Prover_Substs.push + Pulse_Checker_Prover_Substs.empty + n w)) + (fun + uu___5 -> + (fun + ss_new -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (251)) + (Prims.of_int (19)) + (Prims.of_int (251)) + (Prims.of_int (39))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (254)) + (Prims.of_int (54)) + (Prims.of_int (259)) + (Prims.of_int (18))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___5 -> + Pulse_Checker_Prover_Substs.push_ss + ss ss_new)) + (fun + uu___5 -> + (fun ss' + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (255)) + (Prims.of_int (20)) + (Prims.of_int (255)) + (Prims.of_int (91))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (254)) + (Prims.of_int (54)) + (Prims.of_int (259)) + (Prims.of_int (18))))) + (Obj.magic + (FStar_Tactics_V2_Builtins.check_equiv + (Pulse_Typing.elab_env + g) + (Pulse_Elaborate_Pure.elab_term + (Pulse_Typing.mk_reveal + u ty w)) + (Pulse_Elaborate_Pure.elab_term + p))) + (fun + uu___5 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___6 -> + match uu___5 + with + | + (b, + uu___7) + -> + if + FStar_Pervasives_Native.uu___is_Some + b + then + FStar_Pervasives_Native.Some + (Prims.Mkdtuple2 + (ss', + (rt_equiv + (Pulse_Typing.elab_env + g) + (Pulse_Elaborate_Pure.elab_term + p) + (Pulse_Elaborate_Pure.elab_term + (Pulse_Checker_Prover_Base.op_Array_Access + ss' q0))))) + else + FStar_Pervasives_Native.None)))) + uu___5))) + uu___5))) + uu___5))) + uu___4)) + | + uu___4 -> + Obj.repr + (match + is_uvar + q1 uvs + with + | + FStar_Pervasives_Native.Some + n -> + Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (263)) + (Prims.of_int (11)) + (Prims.of_int (264)) + (Prims.of_int (124))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (275)) + (Prims.of_int (11)) + (Prims.of_int (275)) + (Prims.of_int (41))))) + (Obj.magic + (Pulse_Checker_Prover_Util.debug_prover + g + (fun + uu___5 -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (264)) + (Prims.of_int (103)) + (Prims.of_int (264)) + (Prims.of_int (123))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (264)) + (Prims.of_int (13)) + (Prims.of_int (264)) + (Prims.of_int (123))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + q1)) + (fun + uu___6 -> + (fun + uu___6 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (264)) + (Prims.of_int (13)) + (Prims.of_int (264)) + (Prims.of_int (123))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (264)) + (Prims.of_int (13)) + (Prims.of_int (264)) + (Prims.of_int (123))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (264)) + (Prims.of_int (82)) + (Prims.of_int (264)) + (Prims.of_int (102))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + p)) + (fun + uu___7 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___8 -> + fun x -> + Prims.strcat + (Prims.strcat + "prover.match trying " + (Prims.strcat + uu___7 + " =?= ")) + (Prims.strcat + x + ", not eq_tm, q is uvar"))))) + (fun + uu___7 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___8 -> + uu___7 + uu___6)))) + uu___6)))) + (fun + uu___5 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___6 -> + FStar_Pervasives_Native.Some + (Prims.Mkdtuple2 + ((Pulse_Checker_Prover_Substs.push_ss + ss + (Pulse_Checker_Prover_Substs.push + Pulse_Checker_Prover_Substs.empty + n p)), + (FStar_Reflection_Typing.EQ_Refl + ((Pulse_Typing.elab_env + g), + (Pulse_Elaborate_Pure.elab_term + p)))))))) + | + uu___5 -> + Obj.repr + (match + ((p.Pulse_Syntax_Base.t), + (q1.Pulse_Syntax_Base.t)) + with + | + (Pulse_Syntax_Base.Tm_Pure + p1, + Pulse_Syntax_Base.Tm_Pure + q11) -> + Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (279)) + (Prims.of_int (13)) + (Prims.of_int (280)) + (Prims.of_int (127))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (280)) + (Prims.of_int (128)) + (Prims.of_int (288)) + (Prims.of_int (29))))) + (Obj.magic + (Pulse_Checker_Prover_Util.debug_prover + g + (fun + uu___6 -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (280)) + (Prims.of_int (106)) + (Prims.of_int (280)) + (Prims.of_int (126))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (280)) + (Prims.of_int (15)) + (Prims.of_int (280)) + (Prims.of_int (126))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + q1)) + (fun + uu___7 -> + (fun + uu___7 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (280)) + (Prims.of_int (15)) + (Prims.of_int (280)) + (Prims.of_int (126))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (280)) + (Prims.of_int (15)) + (Prims.of_int (280)) + (Prims.of_int (126))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (280)) + (Prims.of_int (85)) + (Prims.of_int (280)) + (Prims.of_int (105))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + p)) + (fun + uu___8 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___9 -> + fun x -> + Prims.strcat + (Prims.strcat + "prover.match trying " + (Prims.strcat + uu___8 + " =?= ")) + (Prims.strcat + x + ", both p and q are pure"))))) + (fun + uu___8 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___9 -> + uu___8 + uu___7)))) + uu___7)))) + (fun + uu___6 -> + (fun + uu___6 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (281)) + (Prims.of_int (21)) + (Prims.of_int (281)) + (Prims.of_int (41))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (282)) + (Prims.of_int (13)) + (Prims.of_int (288)) + (Prims.of_int (29))))) + (Obj.magic + (unify g + uvs p1 + q11 ss)) + (fun r -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___7 -> + match r + with + | + FStar_Pervasives_Native.Some + (Prims.Mkdtuple2 + (ss', + uu___8)) + -> + FStar_Pervasives_Native.Some + (Prims.Mkdtuple2 + (ss', + (rt_equiv + (Pulse_Typing.elab_env + g) + (Pulse_Elaborate_Pure.elab_term + p) + (Pulse_Elaborate_Pure.elab_term + (Pulse_Checker_Prover_Base.op_Array_Access + ss' q))))) + | + FStar_Pervasives_Native.None + -> + FStar_Pervasives_Native.None)))) + uu___6)) + | + (uu___6, + uu___7) + -> + Obj.repr + (match + ((Pulse_Syntax_Pure.is_pure_app + p), + (Pulse_Syntax_Pure.is_pure_app + q1)) + with + | + (FStar_Pervasives_Native.Some + (head_p, + qual_p, + arg_p), + FStar_Pervasives_Native.Some + (head_q, + qual_q, + arg_q)) + -> + Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (293)) + (Prims.of_int (15)) + (Prims.of_int (294)) + (Prims.of_int (125))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (296)) + (Prims.of_int (15)) + (Prims.of_int (310)) + (Prims.of_int (18))))) + (Obj.magic + (Pulse_Checker_Prover_Util.debug_prover + g + (fun + uu___8 -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (294)) + (Prims.of_int (104)) + (Prims.of_int (294)) + (Prims.of_int (124))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (294)) + (Prims.of_int (17)) + (Prims.of_int (294)) + (Prims.of_int (124))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + q1)) + (fun + uu___9 -> + (fun + uu___9 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (294)) + (Prims.of_int (17)) + (Prims.of_int (294)) + (Prims.of_int (124))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (294)) + (Prims.of_int (17)) + (Prims.of_int (294)) + (Prims.of_int (124))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (294)) + (Prims.of_int (83)) + (Prims.of_int (294)) + (Prims.of_int (103))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + p)) + (fun + uu___10 + -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___11 + -> + fun x -> + Prims.strcat + (Prims.strcat + "prover.match trying " + (Prims.strcat + uu___10 + " =?= ")) + (Prims.strcat + x + ", both are pure app"))))) + (fun + uu___10 + -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___11 + -> + uu___10 + uu___9)))) + uu___9)))) + (fun + uu___8 -> + (fun + uu___8 -> + if + Prims.op_Negation + (qual_p = + qual_q) + then + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___9 -> + FStar_Pervasives_Native.None))) + else + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (298)) + (Prims.of_int (25)) + (Prims.of_int (298)) + (Prims.of_int (53))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (299)) + (Prims.of_int (17)) + (Prims.of_int (309)) + (Prims.of_int (28))))) + (Obj.magic + (unify g + uvs + head_p + head_q ss)) + (fun + uu___10 + -> + (fun r -> + match r + with + | + FStar_Pervasives_Native.Some + (Prims.Mkdtuple2 + (ss', + uu___10)) + -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (301)) + (Prims.of_int (27)) + (Prims.of_int (301)) + (Prims.of_int (54))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (302)) + (Prims.of_int (19)) + (Prims.of_int (308)) + (Prims.of_int (32))))) + (Obj.magic + (unify g + uvs arg_p + arg_q ss')) + (fun r1 + -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___11 + -> + match r1 + with + | + FStar_Pervasives_Native.Some + (Prims.Mkdtuple2 + (ss'1, + uu___12)) + -> + FStar_Pervasives_Native.Some + (Prims.Mkdtuple2 + (ss'1, + (rt_equiv + (Pulse_Typing.elab_env + g) + (Pulse_Elaborate_Pure.elab_term + p) + (Pulse_Elaborate_Pure.elab_term + (Pulse_Checker_Prover_Base.op_Array_Access + ss'1 q))))) + | + uu___12 + -> + FStar_Pervasives_Native.None)))) + | + uu___10 + -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___11 + -> + FStar_Pervasives_Native.None)))) + uu___10)))) + uu___8)) + | + (uu___8, + uu___9) + -> + Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___10 + -> + FStar_Pervasives_Native.None)))))))) + uu___2))) + uu___))) uu___))) uu___))) + uu___) +let (try_match_pq : + Pulse_Typing_Env.env -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.vprop -> + Pulse_Syntax_Base.vprop -> + ((Pulse_Checker_Prover_Substs.ss_t, unit) Prims.dtuple2 + FStar_Pervasives_Native.option, + unit) FStar_Tactics_Effect.tac_repr) + = + fun g -> + fun uvs -> + fun p -> + fun q -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (317)) (Prims.of_int (10)) + (Prims.of_int (317)) (Prims.of_int (34))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (318)) (Prims.of_int (2)) + (Prims.of_int (322)) (Prims.of_int (27))))) + (Obj.magic (unify g uvs p q Pulse_Checker_Prover_Substs.empty)) + (fun r -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + match r with + | FStar_Pervasives_Native.None -> + FStar_Pervasives_Native.None + | FStar_Pervasives_Native.Some (Prims.Mkdtuple2 + (ss, uu___1)) -> + FStar_Pervasives_Native.Some + (Prims.Mkdtuple2 (ss, ())))) +let coerce_eq : 'a 'b . 'a -> unit -> 'b = + fun uu___1 -> fun uu___ -> (fun x -> fun uu___ -> Obj.magic x) uu___1 uu___ +let (match_step : + Pulse_Checker_Prover_Base.preamble -> + unit Pulse_Checker_Prover_Base.prover_state -> + Pulse_Syntax_Base.vprop -> + Pulse_Syntax_Base.vprop Prims.list -> + Pulse_Syntax_Base.vprop -> + Pulse_Syntax_Base.vprop Prims.list -> + unit -> + (unit Pulse_Checker_Prover_Base.prover_state + FStar_Pervasives_Native.option, + unit) FStar_Tactics_Effect.tac_repr) + = + fun preamble -> + fun pst -> + fun p -> + fun remaining_ctxt' -> + fun q -> + fun unsolved' -> + fun uu___ -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (333)) (Prims.of_int (11)) + (Prims.of_int (333)) (Prims.of_int (21))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (334)) (Prims.of_int (52)) + (Prims.of_int (397)) (Prims.of_int (11))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + Pulse_Checker_Prover_Base.op_Array_Access + pst.Pulse_Checker_Prover_Base.ss q)) + (fun uu___1 -> + (fun q_ss -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (336)) + (Prims.of_int (11)) + (Prims.of_int (336)) + (Prims.of_int (45))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (338)) Prims.int_zero + (Prims.of_int (397)) + (Prims.of_int (11))))) + (Obj.magic + (try_match_pq + pst.Pulse_Checker_Prover_Base.pg + pst.Pulse_Checker_Prover_Base.uvs p q_ss)) + (fun uu___1 -> + (fun ropt -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (338)) + Prims.int_zero + (Prims.of_int (340)) + (Prims.of_int (92))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (342)) + Prims.int_zero + (Prims.of_int (397)) + (Prims.of_int (11))))) + (Obj.magic + (Pulse_Checker_Prover_Util.debug_prover + pst.Pulse_Checker_Prover_Base.pg + (fun uu___1 -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (339)) + (Prims.of_int (2)) + (Prims.of_int (340)) + (Prims.of_int (91))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (339)) + (Prims.of_int (2)) + (Prims.of_int (340)) + (Prims.of_int (91))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (340)) + (Prims.of_int (25)) + (Prims.of_int (340)) + (Prims.of_int (48))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (339)) + (Prims.of_int (2)) + (Prims.of_int (340)) + (Prims.of_int (91))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + q_ss)) + (fun uu___2 -> + (fun uu___2 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + ( + FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (339)) + (Prims.of_int (2)) + (Prims.of_int (340)) + (Prims.of_int (91))))) + ( + FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (339)) + (Prims.of_int (2)) + (Prims.of_int (340)) + (Prims.of_int (91))))) + ( + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Match.fst" + (Prims.of_int (340)) + (Prims.of_int (4)) + (Prims.of_int (340)) + (Prims.of_int (24))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + p)) + (fun + uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + fun x -> + fun x1 -> + Prims.strcat + (Prims.strcat + (Prims.strcat + "prover matcher: tried to match " + (Prims.strcat + uu___3 + " and ")) + (Prims.strcat + x + ", result: ")) + (Prims.strcat + x1 ""))))) + ( + fun + uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + uu___3 + uu___2)))) + uu___2))) + (fun uu___2 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___3 -> + uu___2 + (if + FStar_Pervasives_Native.uu___is_None + ropt + then "fail" + else "success")))))) + (fun uu___1 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + match ropt with + | FStar_Pervasives_Native.None + -> + FStar_Pervasives_Native.None + | FStar_Pervasives_Native.Some + (Prims.Mkdtuple2 + (ss_q, veq)) -> + FStar_Pervasives_Native.Some + { + Pulse_Checker_Prover_Base.pg + = + (pst.Pulse_Checker_Prover_Base.pg); + Pulse_Checker_Prover_Base.remaining_ctxt + = remaining_ctxt'; + Pulse_Checker_Prover_Base.remaining_ctxt_frame_typing + = (); + Pulse_Checker_Prover_Base.uvs + = + (pst.Pulse_Checker_Prover_Base.uvs); + Pulse_Checker_Prover_Base.ss + = + (Pulse_Checker_Prover_Substs.push_ss + pst.Pulse_Checker_Prover_Base.ss + ss_q); + Pulse_Checker_Prover_Base.solved + = + (Pulse_Checker_Prover_Base.op_Star + q + pst.Pulse_Checker_Prover_Base.solved); + Pulse_Checker_Prover_Base.unsolved + = unsolved'; + Pulse_Checker_Prover_Base.k + = + (coerce_eq + (Pulse_Checker_Base.k_elab_equiv + preamble.Pulse_Checker_Prover_Base.g0 + pst.Pulse_Checker_Prover_Base.pg + (Pulse_Checker_Prover_Base.op_Star + preamble.Pulse_Checker_Prover_Base.ctxt + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + preamble.Pulse_Checker_Prover_Base.ctxt + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + (p :: + remaining_ctxt')) + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Array_Access + (Pulse_Checker_Prover_Substs.push_ss + pst.Pulse_Checker_Prover_Base.ss + ss_q) + pst.Pulse_Checker_Prover_Base.solved)) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Typing_Combinators.list_as_vprop + remaining_ctxt') + preamble.Pulse_Checker_Prover_Base.frame) + (Pulse_Checker_Prover_Base.op_Star + (Pulse_Checker_Prover_Base.op_Array_Access + (Pulse_Checker_Prover_Substs.push_ss + pst.Pulse_Checker_Prover_Base.ss + ss_q) q) + (Pulse_Checker_Prover_Base.op_Array_Access + (Pulse_Checker_Prover_Substs.push_ss + pst.Pulse_Checker_Prover_Base.ss + ss_q) + pst.Pulse_Checker_Prover_Base.solved))) + (coerce_eq + pst.Pulse_Checker_Prover_Base.k + ()) () ()) + ()); + Pulse_Checker_Prover_Base.goals_inv + = (); + Pulse_Checker_Prover_Base.solved_inv + = () + })))) uu___1))) uu___1) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Prover_Substs.ml b/src/ocaml/plugin/generated/Pulse_Checker_Prover_Substs.ml similarity index 55% rename from src/ocaml/plugin/generated/Pulse_Prover_Substs.ml rename to src/ocaml/plugin/generated/Pulse_Checker_Prover_Substs.ml index 5fca096cc..d48ccfec2 100644 --- a/src/ocaml/plugin/generated/Pulse_Prover_Substs.ml +++ b/src/ocaml/plugin/generated/Pulse_Checker_Prover_Substs.ml @@ -52,6 +52,12 @@ let rec (push_ss : ss_t -> ss_t -> ss_t) = match ss2.l with | [] -> ss1 | x::tl -> push_ss (push ss1 x (FStar_Map.sel ss2.m x)) (tail ss2) +let (check_disjoint : ss_t -> ss_t -> Prims.bool) = + fun ss1 -> + fun ss2 -> + Prims.op_Negation + (FStar_List_Tot_Base.existsb + (fun v1 -> FStar_List_Tot_Base.mem v1 ss2.l) ss1.l) let rec (remove_l : ss_dom -> Pulse_Syntax_Base.var -> ss_dom) = fun l -> fun x -> @@ -120,7 +126,7 @@ let rec (ss_env : Pulse_Typing_Env.env -> ss_t -> Pulse_Typing_Env.env) = | [] -> g | y::tl -> ss_env - (Pulse_Typing_Metatheory.subst_env g + (Pulse_Typing_Env.subst_env g [Pulse_Syntax_Naming.NT (y, (FStar_Map.sel ss.m y))]) (tail ss) type nt_substs = Pulse_Syntax_Naming.subst_elt Prims.list @@ -162,8 +168,7 @@ let (nt_subst_env : fun ss -> let g' = FStar_List_Tot_Base.fold_left - (fun g1 -> fun elt -> Pulse_Typing_Metatheory.subst_env g1 [elt]) g - ss in + (fun g1 -> fun elt -> Pulse_Typing_Env.subst_env g1 [elt]) g ss in g' type ('g, 'uvs, 'nts) well_typed_nt_substs = Obj.t type ('nts, 'ss) is_permutation = Obj.t @@ -171,118 +176,151 @@ let rec (ss_to_nt_substs : Pulse_Typing_Env.env -> Pulse_Typing_Env.env -> ss_t -> - (nt_substs FStar_Pervasives_Native.option, unit) + ((nt_substs, Prims.string) FStar_Pervasives.either, unit) FStar_Tactics_Effect.tac_repr) = - fun uu___2 -> - fun uu___1 -> - fun uu___ -> - (fun g -> - fun uvs -> - fun ss -> - match Pulse_Typing_Env.bindings uvs with - | [] -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - match ss.l with - | [] -> FStar_Pervasives_Native.Some [] - | uu___1 -> FStar_Pervasives_Native.None))) - | uu___ -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Substs.fst" - (Prims.of_int (251)) (Prims.of_int (26)) - (Prims.of_int (251)) (Prims.of_int (44))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Substs.fst" - (Prims.of_int (250)) (Prims.of_int (8)) - (Prims.of_int (264)) (Prims.of_int (13))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - Pulse_Typing_Env.remove_binding uvs)) - (fun uu___1 -> - (fun uu___1 -> - match uu___1 with - | (x, ty, rest_uvs) -> - if FStar_Map.contains ss.m x - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Substs.fst" - (Prims.of_int (253)) - (Prims.of_int (17)) - (Prims.of_int (253)) - (Prims.of_int (31))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Substs.fst" - (Prims.of_int (253)) - (Prims.of_int (34)) - (Prims.of_int (263)) - (Prims.of_int (19))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - FStar_Map.sel ss.m x)) - (fun uu___2 -> - (fun t -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Substs.fst" - (Prims.of_int (254)) - (Prims.of_int (37)) - (Prims.of_int (254)) - (Prims.of_int (45))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Substs.fst" - (Prims.of_int (255)) - (Prims.of_int (48)) - (Prims.of_int (263)) - (Prims.of_int (19))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - ())) - (fun uu___2 -> - (fun d -> - Obj.magic - (FStar_Tactics_Effect.tac_bind + fun g -> + fun uvs -> + fun ss -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.Substs.fst" + (Prims.of_int (249)) (Prims.of_int (10)) + (Prims.of_int (249)) (Prims.of_int (59))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.Substs.fst" + (Prims.of_int (250)) (Prims.of_int (2)) + (Prims.of_int (277)) (Prims.of_int (66))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.Substs.fst" + (Prims.of_int (249)) (Prims.of_int (43)) + (Prims.of_int (249)) (Prims.of_int (59))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Prover.Substs.fst" + (Prims.of_int (249)) (Prims.of_int (10)) + (Prims.of_int (249)) (Prims.of_int (59))))) + (Obj.magic (Pulse_Typing_Env.range_of_env g)) + (fun uu___ -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + Pulse_Typing_Env.push_context g "ss_to_nt_substs" + uu___)))) + (fun uu___ -> + (fun g1 -> + match Pulse_Typing_Env.bindings uvs with + | [] -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + match ss.l with + | [] -> FStar_Pervasives.Inl [] + | x::uu___1 -> + FStar_Pervasives.Inr + (Prims.strcat + "extra uvars in the substitutions collected by the prover, e.g._#" + (Prims.strcat (Prims.string_of_int x) + ""))))) + | uu___ -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Substs.fst" + (Prims.of_int (257)) (Prims.of_int (26)) + (Prims.of_int (257)) (Prims.of_int (44))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Substs.fst" + (Prims.of_int (256)) (Prims.of_int (8)) + (Prims.of_int (277)) (Prims.of_int (66))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + Pulse_Typing_Env.remove_binding uvs)) + (fun uu___1 -> + (fun uu___1 -> + match uu___1 with + | (x, ty, rest_uvs) -> + if FStar_Map.contains ss.m x + then + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Substs.fst" + (Prims.of_int (259)) + (Prims.of_int (17)) + (Prims.of_int (259)) + (Prims.of_int (31))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Substs.fst" + (Prims.of_int (259)) + (Prims.of_int (34)) + (Prims.of_int (276)) + (Prims.of_int (18))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + FStar_Map.sel ss.m x)) + (fun uu___2 -> + (fun t -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Substs.fst" + (Prims.of_int (265)) + (Prims.of_int (37)) + (Prims.of_int (265)) + (Prims.of_int (45))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Substs.fst" + (Prims.of_int (268)) + (Prims.of_int (48)) + (Prims.of_int (276)) + (Prims.of_int (18))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + ())) + (fun uu___2 -> + (fun d -> + Obj.magic + (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.Substs.fst" - (Prims.of_int (257)) + "Pulse.Checker.Prover.Substs.fst" + (Prims.of_int (270)) (Prims.of_int (11)) - (Prims.of_int (258)) + (Prims.of_int (271)) (Prims.of_int (82))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "Pulse.Prover.Substs.fst" - (Prims.of_int (259)) + "Pulse.Checker.Prover.Substs.fst" + (Prims.of_int (272)) (Prims.of_int (9)) - (Prims.of_int (263)) - (Prims.of_int (19))))) + (Prims.of_int (276)) + (Prims.of_int (18))))) (Obj.magic (ss_to_nt_substs - g - (Pulse_Typing_Metatheory.subst_env + g1 + (Pulse_Typing_Env.subst_env rest_uvs [ Pulse_Syntax_Naming.NT @@ -304,25 +342,59 @@ let rec (ss_to_nt_substs : match nts_opt with | - FStar_Pervasives_Native.None - -> - FStar_Pervasives_Native.None + FStar_Pervasives.Inr + e -> + FStar_Pervasives.Inr + e | - FStar_Pervasives_Native.Some + FStar_Pervasives.Inl nts -> - FStar_Pervasives_Native.Some + FStar_Pervasives.Inl ((Pulse_Syntax_Naming.NT (x, t)) :: nts))))) - uu___2))) - uu___2))) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - FStar_Pervasives_Native.None)))) - uu___1)))) uu___2 uu___1 uu___ + uu___2))) + uu___2))) + else + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___3 -> + FStar_Pervasives.Inr + (Prims.strcat + "prover could not prove uvar _#" + (Prims.strcat + (Prims.string_of_int + x) "")))))) + uu___1)))) uu___) +let rec (well_typed_nt_substs_prefix : + Pulse_Typing_Env.env -> + Pulse_Typing_Env.env -> nt_substs -> Pulse_Typing_Env.env -> nt_substs) + = + fun g -> + fun uvs -> + fun nts -> + fun uvs1 -> + match ((Pulse_Typing_Env.bindings uvs1), + (Pulse_Typing_Env.bindings uvs)) + with + | ([], uu___) -> [] + | (uu___::uu___1, uu___2::uu___3) -> + let uu___4 = Pulse_Typing_Env.remove_binding uvs1 in + (match uu___4 with + | (x1, ty1, rest_uvs1) -> + let uu___5 = Pulse_Typing_Env.remove_binding uvs in + (match uu___5 with + | (x, ty, rest_uvs) -> + let uu___6 = nts in + (match uu___6 with + | (Pulse_Syntax_Naming.NT (y, e))::nts_rest -> + (Pulse_Syntax_Naming.NT (y, e)) :: + (well_typed_nt_substs_prefix g + (Pulse_Typing_Env.subst_env rest_uvs + [Pulse_Syntax_Naming.NT (y, e)]) nts_rest + (Pulse_Typing_Env.subst_env rest_uvs1 + [Pulse_Syntax_Naming.NT (y, e)]))))) let rec (st_typing_nt_substs : Pulse_Typing_Env.env -> Pulse_Typing_Env.env -> @@ -350,13 +422,14 @@ let rec (st_typing_nt_substs : | (Pulse_Syntax_Naming.NT (uu___3, e))::nts_rest -> let t_typing1 = coerce_eq t_typing () in let t_typing2 = - Pulse_Typing_Metatheory.st_typing_subst g x - ty (Pulse_Typing_Env.push_env uvs_rest g') - e () t c t_typing1 in + Pulse_Typing_Metatheory_Base.st_typing_subst + g x ty + (Pulse_Typing_Env.push_env uvs_rest g') e + () t c t_typing1 in st_typing_nt_substs g - (Pulse_Typing_Metatheory.subst_env uvs_rest + (Pulse_Typing_Env.subst_env uvs_rest [Pulse_Syntax_Naming.NT (x, e)]) - (Pulse_Typing_Metatheory.subst_env g' + (Pulse_Typing_Env.subst_env g' [Pulse_Syntax_Naming.NT (x, e)]) (Pulse_Syntax_Naming.subst_st_term t [Pulse_Syntax_Naming.NT (x, e)]) diff --git a/src/ocaml/plugin/generated/Pulse_Checker_Prover_Util.ml b/src/ocaml/plugin/generated/Pulse_Checker_Prover_Util.ml new file mode 100644 index 000000000..69bbd6f84 --- /dev/null +++ b/src/ocaml/plugin/generated/Pulse_Checker_Prover_Util.ml @@ -0,0 +1,39 @@ +open Prims +let (debug_prover : + Pulse_Typing_Env.env -> + (unit -> (Prims.string, unit) FStar_Tactics_Effect.tac_repr) -> + (unit, unit) FStar_Tactics_Effect.tac_repr) + = + fun uu___1 -> + fun uu___ -> + (fun g -> + fun s -> + if + Pulse_RuntimeUtils.debug_at_level (Pulse_Typing_Env.fstar_env g) + "prover" + then + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Util.fst" + (Prims.of_int (7)) (Prims.of_int (15)) + (Prims.of_int (7)) (Prims.of_int (21))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Prover.Util.fst" + (Prims.of_int (7)) (Prims.of_int (7)) + (Prims.of_int (7)) (Prims.of_int (21))))) + (Obj.magic (s ())) + (fun uu___ -> + (fun uu___ -> + Obj.magic (FStar_Tactics_V2_Builtins.print uu___)) + uu___))) + else + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac (fun uu___1 -> ())))) + uu___1 uu___ \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Checker_Return.ml b/src/ocaml/plugin/generated/Pulse_Checker_Return.ml index ac8ca5e93..25b51f859 100644 --- a/src/ocaml/plugin/generated/Pulse_Checker_Return.ml +++ b/src/ocaml/plugin/generated/Pulse_Checker_Return.ml @@ -1,31 +1,31 @@ open Prims -let (check_return : - Prims.bool -> - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.term -> - unit -> - unit Pulse_Typing.post_hint_opt -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, +let (check : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + unit -> + unit Pulse_Typing.post_hint_opt -> + Pulse_Syntax_Base.ppname -> + Pulse_Syntax_Base.st_term -> + ((unit, unit, unit) Pulse_Checker_Base.checker_result_t, unit) FStar_Tactics_Effect.tac_repr) = - fun allow_inst -> - fun g -> - fun st -> - fun pre -> - fun pre_typing -> - fun post_hint -> + fun g -> + fun ctxt -> + fun ctxt_typing -> + fun post_hint -> + fun res_ppname -> + fun st -> FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Return.fst" - (Prims.of_int (23)) (Prims.of_int (10)) - (Prims.of_int (23)) (Prims.of_int (48))))) + (Prims.of_int (22)) (Prims.of_int (10)) + (Prims.of_int (22)) (Prims.of_int (48))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Return.fst" - (Prims.of_int (23)) (Prims.of_int (51)) - (Prims.of_int (62)) (Prims.of_int (68))))) + (Prims.of_int (22)) (Prims.of_int (51)) + (Prims.of_int (64)) (Prims.of_int (76))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> Pulse_Checker_Pure.push_context "check_return" @@ -38,14 +38,14 @@ let (check_return : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Return.fst" - (Prims.of_int (24)) (Prims.of_int (53)) - (Prims.of_int (24)) (Prims.of_int (60))))) + (Prims.of_int (23)) (Prims.of_int (53)) + (Prims.of_int (23)) (Prims.of_int (60))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Return.fst" - (Prims.of_int (23)) (Prims.of_int (51)) - (Prims.of_int (62)) (Prims.of_int (68))))) + (Prims.of_int (22)) (Prims.of_int (51)) + (Prims.of_int (64)) (Prims.of_int (76))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> st.Pulse_Syntax_Base.term1)) (fun uu___ -> @@ -62,18 +62,18 @@ let (check_return : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Return.fst" - (Prims.of_int (31)) + (Prims.of_int (30)) (Prims.of_int (4)) - (Prims.of_int (40)) + (Prims.of_int (39)) (Prims.of_int (48))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Return.fst" - (Prims.of_int (24)) + (Prims.of_int (23)) (Prims.of_int (63)) - (Prims.of_int (62)) - (Prims.of_int (68))))) + (Prims.of_int (64)) + (Prims.of_int (76))))) (match post_hint with | FStar_Pervasives_Native.None -> Obj.magic @@ -87,17 +87,17 @@ let (check_return : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Return.fst" - (Prims.of_int (34)) + (Prims.of_int (33)) (Prims.of_int (23)) - (Prims.of_int (34)) + (Prims.of_int (33)) (Prims.of_int (68))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Return.fst" - (Prims.of_int (33)) + (Prims.of_int (32)) (Prims.of_int (18)) - (Prims.of_int (40)) + (Prims.of_int (39)) (Prims.of_int (48))))) (Obj.magic (Pulse_Checker_Pure.check_term_with_expected_type @@ -127,18 +127,18 @@ let (check_return : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Return.fst" - (Prims.of_int (41)) + (Prims.of_int (40)) (Prims.of_int (4)) - (Prims.of_int (62)) - (Prims.of_int (68))))) + (Prims.of_int (64)) + (Prims.of_int (76))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Return.fst" - (Prims.of_int (41)) + (Prims.of_int (40)) (Prims.of_int (4)) - (Prims.of_int (62)) - (Prims.of_int (68))))) + (Prims.of_int (64)) + (Prims.of_int (76))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___2 -> uu___1)) @@ -162,8 +162,8 @@ let (check_return : "Pulse.Checker.Return.fst" (Prims.of_int (42)) (Prims.of_int (20)) - (Prims.of_int (62)) - (Prims.of_int (68))))) + (Prims.of_int (64)) + (Prims.of_int (76))))) ( FStar_Tactics_Effect.lift_div_tac (fun @@ -183,20 +183,20 @@ let (check_return : (Prims.of_int (43)) (Prims.of_int (11)) (Prims.of_int (43)) - (Prims.of_int (20))))) + (Prims.of_int (24))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Return.fst" (Prims.of_int (43)) - (Prims.of_int (23)) - (Prims.of_int (62)) - (Prims.of_int (68))))) + (Prims.of_int (27)) + (Prims.of_int (64)) + (Prims.of_int (76))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___3 -> - Pulse_Syntax_Base.v_as_nv - x)) + (res_ppname, + x))) (fun uu___3 -> (fun px @@ -209,16 +209,16 @@ let (check_return : "Pulse.Checker.Return.fst" (Prims.of_int (45)) (Prims.of_int (6)) - (Prims.of_int (57)) + (Prims.of_int (59)) (Prims.of_int (60))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Return.fst" (Prims.of_int (43)) - (Prims.of_int (23)) - (Prims.of_int (62)) - (Prims.of_int (68))))) + (Prims.of_int (27)) + (Prims.of_int (64)) + (Prims.of_int (76))))) (match post_hint with | @@ -282,7 +282,7 @@ let (check_return : "Pulse.Checker.Return.fst" (Prims.of_int (53)) (Prims.of_int (8)) - (Prims.of_int (57)) + (Prims.of_int (59)) (Prims.of_int (60))))) (FStar_Tactics_Effect.lift_div_tac (fun @@ -303,7 +303,7 @@ let (check_return : (Pulse_Typing_Env.fail g1 FStar_Pervasives_Native.None - "Unexpected variable clash in return")) + "check_return: unexpected variable clash in return post,please file a bug report")) else Obj.magic (Obj.repr @@ -332,18 +332,18 @@ let (check_return : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Return.fst" - (Prims.of_int (59)) + (Prims.of_int (61)) (Prims.of_int (2)) - (Prims.of_int (62)) - (Prims.of_int (68))))) + (Prims.of_int (64)) + (Prims.of_int (76))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Return.fst" - (Prims.of_int (59)) + (Prims.of_int (61)) (Prims.of_int (65)) - (Prims.of_int (62)) - (Prims.of_int (68))))) + (Prims.of_int (64)) + (Prims.of_int (76))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___4 -> @@ -358,18 +358,18 @@ let (check_return : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Return.fst" - (Prims.of_int (60)) + (Prims.of_int (62)) (Prims.of_int (13)) - (Prims.of_int (60)) + (Prims.of_int (62)) (Prims.of_int (37))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Return.fst" - (Prims.of_int (60)) - (Prims.of_int (40)) (Prims.of_int (62)) - (Prims.of_int (68))))) + (Prims.of_int (40)) + (Prims.of_int (64)) + (Prims.of_int (76))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___5 -> @@ -386,18 +386,18 @@ let (check_return : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Return.fst" - (Prims.of_int (61)) + (Prims.of_int (63)) (Prims.of_int (10)) - (Prims.of_int (61)) + (Prims.of_int (63)) (Prims.of_int (65))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Return.fst" - (Prims.of_int (62)) + (Prims.of_int (64)) (Prims.of_int (2)) - (Prims.of_int (62)) - (Prims.of_int (68))))) + (Prims.of_int (64)) + (Prims.of_int (76))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___5 -> @@ -418,21 +418,21 @@ let (check_return : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Return.fst" - (Prims.of_int (62)) - (Prims.of_int (9)) - (Prims.of_int (62)) + (Prims.of_int (64)) + (Prims.of_int (18)) + (Prims.of_int (64)) (Prims.of_int (58))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Return.fst" - (Prims.of_int (62)) + (Prims.of_int (64)) (Prims.of_int (2)) - (Prims.of_int (62)) - (Prims.of_int (68))))) + (Prims.of_int (64)) + (Prims.of_int (76))))) (Obj.magic - (Pulse_Checker_Common.try_frame_pre - g + (Pulse_Checker_Prover.try_frame_pre + g ctxt () (Pulse_Typing.wr (Pulse_Syntax_Base.Tm_Return { @@ -442,32 +442,23 @@ let (check_return : = use_eq; Pulse_Syntax_Base.term = t1 - })) pre - () + })) (Pulse_Typing.comp_return c use_eq u ty t1 post x) - d1)) + d1 + res_ppname)) (fun uu___5 -> (fun uu___5 -> Obj.magic - (Pulse_Checker_Common.repack - g pre - (Pulse_Typing.wr - (Pulse_Syntax_Base.Tm_Return - { - Pulse_Syntax_Base.ctag - = c; - Pulse_Syntax_Base.insert_eq - = use_eq; - Pulse_Syntax_Base.term - = t1 - })) + (Pulse_Checker_Prover.prove_post_hint + g ctxt uu___5 - post_hint)) + post_hint + t1.Pulse_Syntax_Base.range1)) uu___5))) uu___5))) uu___5))) diff --git a/src/ocaml/plugin/generated/Pulse_Checker_Rewrite.ml b/src/ocaml/plugin/generated/Pulse_Checker_Rewrite.ml index 8bca4f0e4..020763ed9 100644 --- a/src/ocaml/plugin/generated/Pulse_Checker_Rewrite.ml +++ b/src/ocaml/plugin/generated/Pulse_Checker_Rewrite.ml @@ -1,131 +1,133 @@ open Prims -let (check_rewrite : +let (check : Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.term -> - unit -> - unit Pulse_Typing.post_hint_opt -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, - unit) FStar_Tactics_Effect.tac_repr) + Pulse_Syntax_Base.term -> + unit -> + unit Pulse_Typing.post_hint_opt -> + Pulse_Syntax_Base.ppname -> + Pulse_Syntax_Base.st_term -> + ((unit, unit, unit) Pulse_Checker_Base.checker_result_t, + unit) FStar_Tactics_Effect.tac_repr) = fun g -> - fun t -> - fun pre -> - fun pre_typing -> - fun post_hint -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (20)) (Prims.of_int (10)) - (Prims.of_int (20)) (Prims.of_int (48))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (20)) (Prims.of_int (51)) - (Prims.of_int (42)) (Prims.of_int (72))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - Pulse_Checker_Pure.push_context "check_rewrite" - t.Pulse_Syntax_Base.range2 g)) - (fun uu___ -> - (fun g1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Rewrite.fst" - (Prims.of_int (21)) (Prims.of_int (32)) - (Prims.of_int (21)) (Prims.of_int (38))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Rewrite.fst" - (Prims.of_int (20)) (Prims.of_int (51)) - (Prims.of_int (42)) (Prims.of_int (72))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> t.Pulse_Syntax_Base.term1)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | Pulse_Syntax_Base.Tm_Rewrite - { Pulse_Syntax_Base.t1 = p; - Pulse_Syntax_Base.t2 = q;_} - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Rewrite.fst" - (Prims.of_int (22)) - (Prims.of_int (26)) - (Prims.of_int (22)) - (Prims.of_int (41))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Rewrite.fst" - (Prims.of_int (21)) - (Prims.of_int (41)) - (Prims.of_int (42)) - (Prims.of_int (72))))) - (Obj.magic - (Pulse_Checker_Pure.check_vprop g1 - p)) - (fun uu___1 -> - (fun uu___1 -> - match uu___1 with - | Prims.Mkdtuple2 - (p1, p_typing) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Rewrite.fst" - (Prims.of_int (23)) - (Prims.of_int (26)) - (Prims.of_int (23)) - (Prims.of_int (41))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.Rewrite.fst" - (Prims.of_int (22)) - (Prims.of_int (44)) - (Prims.of_int (42)) - (Prims.of_int (72))))) - (Obj.magic - (Pulse_Checker_Pure.check_vprop - g1 q)) - (fun uu___2 -> - (fun uu___2 -> - match uu___2 - with - | Prims.Mkdtuple2 - (q1, - q_typing) - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind + fun pre -> + fun pre_typing -> + fun post_hint -> + fun res_ppname -> + fun t -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" + (Prims.of_int (22)) (Prims.of_int (10)) + (Prims.of_int (22)) (Prims.of_int (48))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" + (Prims.of_int (22)) (Prims.of_int (51)) + (Prims.of_int (44)) (Prims.of_int (74))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Checker_Pure.push_context "check_rewrite" + t.Pulse_Syntax_Base.range2 g)) + (fun uu___ -> + (fun g1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Rewrite.fst" + (Prims.of_int (23)) (Prims.of_int (32)) + (Prims.of_int (23)) (Prims.of_int (38))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Rewrite.fst" + (Prims.of_int (22)) (Prims.of_int (51)) + (Prims.of_int (44)) (Prims.of_int (74))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> t.Pulse_Syntax_Base.term1)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | Pulse_Syntax_Base.Tm_Rewrite + { Pulse_Syntax_Base.t1 = p; + Pulse_Syntax_Base.t2 = q;_} + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Rewrite.fst" + (Prims.of_int (24)) + (Prims.of_int (26)) + (Prims.of_int (24)) + (Prims.of_int (41))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Rewrite.fst" + (Prims.of_int (23)) + (Prims.of_int (41)) + (Prims.of_int (44)) + (Prims.of_int (74))))) + (Obj.magic + (Pulse_Checker_Pure.check_vprop + g1 p)) + (fun uu___1 -> + (fun uu___1 -> + match uu___1 with + | Prims.Mkdtuple2 + (p1, p_typing) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Rewrite.fst" + (Prims.of_int (25)) + (Prims.of_int (26)) + (Prims.of_int (25)) + (Prims.of_int (41))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.Rewrite.fst" + (Prims.of_int (24)) + (Prims.of_int (44)) + (Prims.of_int (44)) + (Prims.of_int (74))))) + (Obj.magic + (Pulse_Checker_Pure.check_vprop + g1 q)) + (fun uu___2 -> + (fun uu___2 -> + match uu___2 + with + | Prims.Mkdtuple2 + (q1, + q_typing) + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (25)) + (Prims.of_int (27)) (Prims.of_int (6)) - (Prims.of_int (40)) + (Prims.of_int (42)) (Prims.of_int (30))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (40)) - (Prims.of_int (33)) (Prims.of_int (42)) - (Prims.of_int (72))))) + (Prims.of_int (33)) + (Prims.of_int (44)) + (Prims.of_int (74))))) (if Pulse_Syntax_Base.eq_tm p1 q1 @@ -144,17 +146,17 @@ let (check_rewrite : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (27)) + (Prims.of_int (29)) (Prims.of_int (24)) - (Prims.of_int (27)) + (Prims.of_int (29)) (Prims.of_int (35))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (27)) + (Prims.of_int (29)) (Prims.of_int (38)) - (Prims.of_int (40)) + (Prims.of_int (42)) (Prims.of_int (30))))) (FStar_Tactics_Effect.lift_div_tac (fun @@ -171,17 +173,17 @@ let (check_rewrite : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (28)) + (Prims.of_int (30)) (Prims.of_int (24)) - (Prims.of_int (28)) + (Prims.of_int (30)) (Prims.of_int (35))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (28)) + (Prims.of_int (30)) (Prims.of_int (38)) - (Prims.of_int (40)) + (Prims.of_int (42)) (Prims.of_int (30))))) (FStar_Tactics_Effect.lift_div_tac (fun @@ -198,17 +200,17 @@ let (check_rewrite : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" + (Prims.of_int (31)) (Prims.of_int (29)) - (Prims.of_int (29)) - (Prims.of_int (29)) + (Prims.of_int (31)) (Prims.of_int (69))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (28)) + (Prims.of_int (30)) (Prims.of_int (38)) - (Prims.of_int (40)) + (Prims.of_int (42)) (Prims.of_int (30))))) (Obj.magic (FStar_Tactics_V2_Builtins.check_equiv @@ -232,17 +234,17 @@ let (check_rewrite : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (30)) + (Prims.of_int (32)) (Prims.of_int (11)) - (Prims.of_int (30)) + (Prims.of_int (32)) (Prims.of_int (30))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (31)) + (Prims.of_int (33)) (Prims.of_int (11)) - (Prims.of_int (40)) + (Prims.of_int (42)) (Prims.of_int (30))))) (Obj.magic (FStar_Tactics_V2_Builtins.log_issues @@ -263,17 +265,17 @@ let (check_rewrite : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (34)) + (Prims.of_int (36)) (Prims.of_int (20)) - (Prims.of_int (38)) + (Prims.of_int (40)) (Prims.of_int (53))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (33)) + (Prims.of_int (35)) (Prims.of_int (13)) - (Prims.of_int (38)) + (Prims.of_int (40)) (Prims.of_int (53))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -281,17 +283,17 @@ let (check_rewrite : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (38)) + (Prims.of_int (40)) (Prims.of_int (27)) - (Prims.of_int (38)) + (Prims.of_int (40)) (Prims.of_int (52))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (34)) + (Prims.of_int (36)) (Prims.of_int (20)) - (Prims.of_int (38)) + (Prims.of_int (40)) (Prims.of_int (53))))) (Obj.magic (FStar_Tactics_V2_Builtins.term_to_string @@ -306,17 +308,17 @@ let (check_rewrite : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (34)) + (Prims.of_int (36)) (Prims.of_int (20)) - (Prims.of_int (38)) + (Prims.of_int (40)) (Prims.of_int (53))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (34)) + (Prims.of_int (36)) (Prims.of_int (20)) - (Prims.of_int (38)) + (Prims.of_int (40)) (Prims.of_int (53))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -324,17 +326,17 @@ let (check_rewrite : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (37)) + (Prims.of_int (39)) (Prims.of_int (27)) - (Prims.of_int (37)) + (Prims.of_int (39)) (Prims.of_int (52))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (34)) + (Prims.of_int (36)) (Prims.of_int (20)) - (Prims.of_int (38)) + (Prims.of_int (40)) (Prims.of_int (53))))) (Obj.magic (FStar_Tactics_V2_Builtins.term_to_string @@ -349,17 +351,17 @@ let (check_rewrite : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (34)) + (Prims.of_int (36)) (Prims.of_int (20)) - (Prims.of_int (38)) + (Prims.of_int (40)) (Prims.of_int (53))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (34)) + (Prims.of_int (36)) (Prims.of_int (20)) - (Prims.of_int (38)) + (Prims.of_int (40)) (Prims.of_int (53))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -367,17 +369,17 @@ let (check_rewrite : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (36)) + (Prims.of_int (38)) (Prims.of_int (27)) - (Prims.of_int (36)) + (Prims.of_int (38)) (Prims.of_int (47))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (34)) + (Prims.of_int (36)) (Prims.of_int (20)) - (Prims.of_int (38)) + (Prims.of_int (40)) (Prims.of_int (53))))) (Obj.magic (Pulse_Syntax_Printer.term_to_string @@ -392,17 +394,17 @@ let (check_rewrite : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (34)) + (Prims.of_int (36)) (Prims.of_int (20)) - (Prims.of_int (38)) + (Prims.of_int (40)) (Prims.of_int (53))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (34)) + (Prims.of_int (36)) (Prims.of_int (20)) - (Prims.of_int (38)) + (Prims.of_int (40)) (Prims.of_int (53))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -410,9 +412,9 @@ let (check_rewrite : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (35)) + (Prims.of_int (37)) (Prims.of_int (27)) - (Prims.of_int (35)) + (Prims.of_int (37)) (Prims.of_int (47))))) (FStar_Sealed.seal (Obj.magic @@ -510,18 +512,18 @@ let (check_rewrite : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (41)) - (Prims.of_int (14)) - (Prims.of_int (41)) - (Prims.of_int (48))))) + (Prims.of_int (43)) + (Prims.of_int (9)) + (Prims.of_int (43)) + (Prims.of_int (43))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (42)) - (Prims.of_int (6)) - (Prims.of_int (42)) - (Prims.of_int (72))))) + (Prims.of_int (44)) + Prims.int_one + (Prims.of_int (44)) + (Prims.of_int (74))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___3 -> @@ -538,21 +540,21 @@ let (check_rewrite : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (42)) - (Prims.of_int (13)) - (Prims.of_int (42)) - (Prims.of_int (62))))) + (Prims.of_int (44)) + (Prims.of_int (17)) + (Prims.of_int (44)) + (Prims.of_int (56))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.Rewrite.fst" - (Prims.of_int (42)) - (Prims.of_int (6)) - (Prims.of_int (42)) - (Prims.of_int (72))))) + (Prims.of_int (44)) + Prims.int_one + (Prims.of_int (44)) + (Prims.of_int (74))))) (Obj.magic - (Pulse_Checker_Common.try_frame_pre - g + (Pulse_Checker_Prover.try_frame_pre + g pre () (Pulse_Typing.wr (Pulse_Syntax_Base.Tm_Rewrite { @@ -560,29 +562,22 @@ let (check_rewrite : = p1; Pulse_Syntax_Base.t2 = q1 - })) pre - () + })) (Pulse_Typing.comp_rewrite - p1 q1) d)) + p1 q1) d + res_ppname)) (fun uu___3 -> (fun uu___3 -> Obj.magic - (Pulse_Checker_Common.repack + (Pulse_Checker_Prover.prove_post_hint g pre - (Pulse_Typing.wr - (Pulse_Syntax_Base.Tm_Rewrite - { - Pulse_Syntax_Base.t1 - = p1; - Pulse_Syntax_Base.t2 - = q1 - })) uu___3 - post_hint)) + post_hint + t.Pulse_Syntax_Base.range2)) uu___3))) uu___3))) uu___3))) - uu___2))) uu___1))) - uu___))) uu___) \ No newline at end of file + uu___2))) + uu___1))) uu___))) uu___) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Checker_STApp.ml b/src/ocaml/plugin/generated/Pulse_Checker_STApp.ml index 4e040c56d..b3a65a837 100644 --- a/src/ocaml/plugin/generated/Pulse_Checker_STApp.ml +++ b/src/ocaml/plugin/generated/Pulse_Checker_STApp.ml @@ -40,139 +40,588 @@ let (canonicalize_st_typing : let st_eq = Pulse_Typing.ST_VPropEquiv (g, c, c', x, (), (), (), (), ()) in Pulse_Typing.T_Equiv (g, t, c, c', d, st_eq) -let (check_stapp : - Prims.bool -> +let coerce_eq : 'a 'b . 'a -> unit -> 'b = + fun uu___1 -> fun uu___ -> (fun x -> fun uu___ -> Obj.magic x) uu___1 uu___ +let rec (intro_uvars_for_logical_implicits : + Pulse_Typing_Env.env -> Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> + Pulse_Syntax_Base.term -> Pulse_Syntax_Base.term -> - unit -> - unit Pulse_Typing.post_hint_opt -> - (Prims.bool -> Pulse_Checker_Common.check_t) -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, - unit) FStar_Tactics_Effect.tac_repr) + ((Pulse_Typing_Env.env, Pulse_Typing_Env.env, + Pulse_Syntax_Base.st_term) FStar_Pervasives.dtuple3, + unit) FStar_Tactics_Effect.tac_repr) = - fun allow_inst -> - fun g -> + fun g -> + fun uvs -> fun t -> - fun pre -> - fun pre_typing -> - fun post_hint -> - fun check' -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (48)) (Prims.of_int (14)) - (Prims.of_int (48)) (Prims.of_int (21))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (48)) (Prims.of_int (24)) - (Prims.of_int (122)) (Prims.of_int (19))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> t.Pulse_Syntax_Base.range2)) - (fun uu___ -> - (fun range -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.STApp.fst" - (Prims.of_int (49)) (Prims.of_int (46)) - (Prims.of_int (49)) (Prims.of_int (52))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.STApp.fst" - (Prims.of_int (48)) (Prims.of_int (24)) - (Prims.of_int (122)) - (Prims.of_int (19))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> t.Pulse_Syntax_Base.term1)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | Pulse_Syntax_Base.Tm_STApp - { Pulse_Syntax_Base.head = head; - Pulse_Syntax_Base.arg_qual = qual; - Pulse_Syntax_Base.arg = arg;_} - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.STApp.fst" - (Prims.of_int (72)) - (Prims.of_int (67)) - (Prims.of_int (110)) - (Prims.of_int (126))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.STApp.fst" - (Prims.of_int (111)) - (Prims.of_int (4)) - (Prims.of_int (122)) - (Prims.of_int (19))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - fun uu___2 -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.STApp.fst" - (Prims.of_int (73)) - (Prims.of_int (12)) - (Prims.of_int (73)) - (Prims.of_int (43))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.STApp.fst" - (Prims.of_int (73)) - (Prims.of_int (46)) - (Prims.of_int (110)) - (Prims.of_int (126))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - Pulse_Checker_Pure.push_context - "st_app" - t.Pulse_Syntax_Base.range2 - g)) - (fun uu___3 -> - (fun g1 -> + fun ty -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.STApp.fst" + (Prims.of_int (44)) (Prims.of_int (13)) + (Prims.of_int (44)) (Prims.of_int (24))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.STApp.fst" + (Prims.of_int (45)) (Prims.of_int (2)) + (Prims.of_int (63)) (Prims.of_int (31))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> Pulse_Syntax_Pure.is_arrow ty)) + (fun uu___ -> + (fun ropt -> + match ropt with + | FStar_Pervasives_Native.Some + (b, FStar_Pervasives_Native.Some + (Pulse_Syntax_Base.Implicit), c_rest) + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (47)) (Prims.of_int (12)) + (Prims.of_int (47)) (Prims.of_int (34))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (47)) (Prims.of_int (37)) + (Prims.of_int (58)) (Prims.of_int (7))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing_Env.fresh + (Pulse_Typing_Env.push_env g uvs))) + (fun uu___ -> + (fun x -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (48)) + (Prims.of_int (15)) + (Prims.of_int (48)) + (Prims.of_int (60))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (50)) + (Prims.of_int (6)) + (Prims.of_int (57)) + (Prims.of_int (96))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Typing_Env.push_binding uvs + x + Pulse_Syntax_Base.ppname_default + b.Pulse_Syntax_Base.binder_ty)) + (fun uu___ -> + (fun uvs' -> + match c_rest with + | Pulse_Syntax_Base.C_ST uu___ -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + FStar_Pervasives.Mkdtuple3 + (uvs', + (Pulse_Typing_Env.push_env + g uvs'), + { + Pulse_Syntax_Base.term1 + = + (Pulse_Syntax_Base.Tm_STApp + { + Pulse_Syntax_Base.head + = t; + Pulse_Syntax_Base.arg_qual + = + (FStar_Pervasives_Native.Some + Pulse_Syntax_Base.Implicit); + Pulse_Syntax_Base.arg + = + (Pulse_Syntax_Pure.null_var + x) + }); + Pulse_Syntax_Base.range2 + = + (t.Pulse_Syntax_Base.range1) + })))) + | Pulse_Syntax_Base.C_STAtomic + (uu___, uu___1) -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + FStar_Pervasives.Mkdtuple3 + (uvs', + (Pulse_Typing_Env.push_env + g uvs'), + { + Pulse_Syntax_Base.term1 + = + (Pulse_Syntax_Base.Tm_STApp + { + Pulse_Syntax_Base.head + = t; + Pulse_Syntax_Base.arg_qual + = + (FStar_Pervasives_Native.Some + Pulse_Syntax_Base.Implicit); + Pulse_Syntax_Base.arg + = + (Pulse_Syntax_Pure.null_var + x) + }); + Pulse_Syntax_Base.range2 + = + (t.Pulse_Syntax_Base.range1) + })))) + | Pulse_Syntax_Base.C_STGhost + (uu___, uu___1) -> + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + FStar_Pervasives.Mkdtuple3 + (uvs', + (Pulse_Typing_Env.push_env + g uvs'), + { + Pulse_Syntax_Base.term1 + = + (Pulse_Syntax_Base.Tm_STApp + { + Pulse_Syntax_Base.head + = t; + Pulse_Syntax_Base.arg_qual + = + (FStar_Pervasives_Native.Some + Pulse_Syntax_Base.Implicit); + Pulse_Syntax_Base.arg + = + (Pulse_Syntax_Pure.null_var + x) + }); + Pulse_Syntax_Base.range2 + = + (t.Pulse_Syntax_Base.range1) + })))) + | Pulse_Syntax_Base.C_Tot ty1 -> + Obj.magic + (Obj.repr + (intro_uvars_for_logical_implicits + g uvs' + (Pulse_Syntax_Pure.tm_pureapp + t + (FStar_Pervasives_Native.Some + Pulse_Syntax_Base.Implicit) + (Pulse_Syntax_Pure.null_var + x)) ty1))) + uu___))) uu___)) + | uu___ -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (61)) (Prims.of_int (6)) + (Prims.of_int (63)) (Prims.of_int (31))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (60)) (Prims.of_int (4)) + (Prims.of_int (63)) (Prims.of_int (31))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (63)) + (Prims.of_int (9)) + (Prims.of_int (63)) + (Prims.of_int (30))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string ty)) + (fun uu___1 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> + Prims.strcat + "check_stapp.intro_uvars_for_logical_implicits: expected an arrow type,with an implicit parameter, found: " + (Prims.strcat uu___1 ""))))) + (fun uu___1 -> + (fun uu___1 -> + Obj.magic + (Pulse_Typing_Env.fail g + FStar_Pervasives_Native.None uu___1)) + uu___1))) uu___) +let (instantaite_implicits : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.st_term -> + ((Pulse_Typing_Env.env, Pulse_Typing_Env.env, + Pulse_Syntax_Base.st_term) FStar_Pervasives.dtuple3, + unit) FStar_Tactics_Effect.tac_repr) + = + fun g -> + fun t -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.STApp.fst" + (Prims.of_int (71)) (Prims.of_int (14)) (Prims.of_int (71)) + (Prims.of_int (21))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.STApp.fst" + (Prims.of_int (71)) (Prims.of_int (24)) (Prims.of_int (87)) + (Prims.of_int (32))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> t.Pulse_Syntax_Base.range2)) + (fun uu___ -> + (fun range -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.STApp.fst" + (Prims.of_int (72)) (Prims.of_int (46)) + (Prims.of_int (72)) (Prims.of_int (52))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.STApp.fst" + (Prims.of_int (71)) (Prims.of_int (24)) + (Prims.of_int (87)) (Prims.of_int (32))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> t.Pulse_Syntax_Base.term1)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | Pulse_Syntax_Base.Tm_STApp + { Pulse_Syntax_Base.head = head; + Pulse_Syntax_Base.arg_qual = qual; + Pulse_Syntax_Base.arg = arg;_} + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (73)) + (Prims.of_int (17)) + (Prims.of_int (73)) + (Prims.of_int (41))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (73)) + (Prims.of_int (44)) + (Prims.of_int (87)) + (Prims.of_int (32))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + Pulse_Syntax_Pure.tm_pureapp head + qual arg)) + (fun uu___1 -> + (fun pure_app -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (74)) + (Prims.of_int (14)) + (Prims.of_int (74)) + (Prims.of_int (51))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (73)) + (Prims.of_int (44)) + (Prims.of_int (87)) + (Prims.of_int (32))))) + (Obj.magic + (Pulse_Checker_Pure.instantiate_term_implicits + g pure_app)) + (fun uu___1 -> + (fun uu___1 -> + match uu___1 with + | (t1, ty) -> + (match Pulse_Syntax_Pure.is_arrow + ty + with + | FStar_Pervasives_Native.Some + (uu___2, + FStar_Pervasives_Native.Some + (Pulse_Syntax_Base.Implicit), + uu___3) + -> Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal + (Obj.repr + (intro_uvars_for_logical_implicits + g ( + Pulse_Typing_Env.mk_env + (Pulse_Typing_Env.fstar_env + g)) t1 ty)) + | uu___2 -> + Obj.magic + (Obj.repr + (match + Pulse_Syntax_Pure.is_pure_app + t1 + with + | FStar_Pervasives_Native.Some + (head1, + q, arg1) + -> + Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + FStar_Pervasives.Mkdtuple3 + ((Pulse_Typing_Env.mk_env + (Pulse_Typing_Env.fstar_env + g)), + (Pulse_Typing_Env.push_env + g + (Pulse_Typing_Env.mk_env + (Pulse_Typing_Env.fstar_env + g))), + { + Pulse_Syntax_Base.term1 + = + (Pulse_Syntax_Base.Tm_STApp + { + Pulse_Syntax_Base.head + = head1; + Pulse_Syntax_Base.arg_qual + = q; + Pulse_Syntax_Base.arg + = arg1 + }); + Pulse_Syntax_Base.range2 + = + (t1.Pulse_Syntax_Base.range1) + }))) + | uu___3 -> + Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (86)) + (Prims.of_int (8)) + (Prims.of_int (87)) + (Prims.of_int (32))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (85)) + (Prims.of_int (6)) + (Prims.of_int (87)) + (Prims.of_int (32))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (87)) + (Prims.of_int (11)) + (Prims.of_int (87)) + (Prims.of_int (31))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + t1)) + (fun + uu___4 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___5 -> + Prims.strcat + "check_stapp.instantiate_implicits: expected an application term, found: " + (Prims.strcat + uu___4 ""))))) + (fun + uu___4 -> + (fun + uu___4 -> Obj.magic + (Pulse_Typing_Env.fail + g + (FStar_Pervasives_Native.Some + (t1.Pulse_Syntax_Base.range1)) + uu___4)) + uu___4)))))) + uu___1))) uu___1))) uu___))) + uu___) +let (check : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + unit -> + unit Pulse_Typing.post_hint_opt -> + Pulse_Syntax_Base.ppname -> + Pulse_Syntax_Base.st_term -> + ((unit, unit, unit) Pulse_Checker_Base.checker_result_t, + unit) FStar_Tactics_Effect.tac_repr) + = + fun g0 -> + fun ctxt -> + fun ctxt_typing -> + fun post_hint -> + fun res_ppname -> + fun t -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.STApp.fst" + (Prims.of_int (99)) (Prims.of_int (11)) + (Prims.of_int (99)) (Prims.of_int (43))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Checker.STApp.fst" + (Prims.of_int (99)) (Prims.of_int (46)) + (Prims.of_int (144)) (Prims.of_int (123))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> + Pulse_Checker_Pure.push_context "st_app" + t.Pulse_Syntax_Base.range2 g0)) + (fun uu___ -> + (fun g01 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (100)) (Prims.of_int (14)) + (Prims.of_int (100)) (Prims.of_int (21))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (100)) (Prims.of_int (24)) + (Prims.of_int (144)) (Prims.of_int (123))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___ -> t.Pulse_Syntax_Base.range2)) + (fun uu___ -> + (fun range -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (102)) + (Prims.of_int (24)) + (Prims.of_int (102)) + (Prims.of_int (50))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (100)) + (Prims.of_int (24)) + (Prims.of_int (144)) + (Prims.of_int (123))))) + (Obj.magic + (instantaite_implicits g01 t)) + (fun uu___ -> + (fun uu___ -> + match uu___ with + | FStar_Pervasives.Mkdtuple3 + (uvs, g, t1) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (104)) + (Prims.of_int (46)) + (Prims.of_int (104)) + (Prims.of_int (52))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (102)) + (Prims.of_int (53)) + (Prims.of_int (144)) + (Prims.of_int (123))))) + (FStar_Tactics_Effect.lift_div_tac + (fun uu___1 -> + t1.Pulse_Syntax_Base.term1)) + (fun uu___1 -> + (fun uu___1 -> + match uu___1 with + | Pulse_Syntax_Base.Tm_STApp + { + Pulse_Syntax_Base.head + = head; + Pulse_Syntax_Base.arg_qual + = qual; + Pulse_Syntax_Base.arg + = arg;_} + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + ( + FStar_Sealed.seal + (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (74)) - (Prims.of_int (37)) - (Prims.of_int (74)) - (Prims.of_int (54))))) - (FStar_Sealed.seal + (Prims.of_int (105)) + (Prims.of_int (35)) + (Prims.of_int (105)) + (Prims.of_int (52))))) ( - Obj.magic + FStar_Sealed.seal + (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (73)) - (Prims.of_int (46)) - (Prims.of_int (110)) - (Prims.of_int (126))))) - (Obj.magic + (Prims.of_int (104)) + (Prims.of_int (55)) + (Prims.of_int (144)) + (Prims.of_int (123))))) ( - Pulse_Checker_Pure.check_term - g1 head)) - (fun uu___3 - -> + Obj.magic + (Pulse_Checker_Pure.check_term + g head)) + ( + fun + uu___2 -> (fun - uu___3 -> - match uu___3 + uu___2 -> + match uu___2 with | FStar_Pervasives.Mkdtuple3 @@ -185,93 +634,93 @@ let (check_stapp : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (75)) - (Prims.of_int (4)) - (Prims.of_int (78)) - (Prims.of_int (47))))) + (Prims.of_int (106)) + (Prims.of_int (2)) + (Prims.of_int (109)) + (Prims.of_int (43))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (79)) - (Prims.of_int (4)) - (Prims.of_int (110)) - (Prims.of_int (126))))) + (Prims.of_int (111)) + (Prims.of_int (2)) + (Prims.of_int (144)) + (Prims.of_int (123))))) (Obj.magic (debug_log - g1 + g (fun - uu___4 -> + uu___3 -> FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (76)) - (Prims.of_int (16)) - (Prims.of_int (78)) - (Prims.of_int (46))))) + (Prims.of_int (107)) + (Prims.of_int (12)) + (Prims.of_int (109)) + (Prims.of_int (42))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (76)) - (Prims.of_int (8)) - (Prims.of_int (78)) - (Prims.of_int (46))))) + (Prims.of_int (107)) + (Prims.of_int (4)) + (Prims.of_int (109)) + (Prims.of_int (42))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (78)) - (Prims.of_int (19)) - (Prims.of_int (78)) - (Prims.of_int (45))))) + (Prims.of_int (109)) + (Prims.of_int (15)) + (Prims.of_int (109)) + (Prims.of_int (41))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (76)) - (Prims.of_int (16)) - (Prims.of_int (78)) - (Prims.of_int (46))))) + (Prims.of_int (107)) + (Prims.of_int (12)) + (Prims.of_int (109)) + (Prims.of_int (42))))) (Obj.magic (Pulse_Syntax_Printer.term_to_string ty_head)) (fun - uu___5 -> + uu___4 -> (fun - uu___5 -> + uu___4 -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (76)) - (Prims.of_int (16)) - (Prims.of_int (78)) - (Prims.of_int (46))))) + (Prims.of_int (107)) + (Prims.of_int (12)) + (Prims.of_int (109)) + (Prims.of_int (42))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (76)) - (Prims.of_int (16)) - (Prims.of_int (78)) - (Prims.of_int (46))))) + (Prims.of_int (107)) + (Prims.of_int (12)) + (Prims.of_int (109)) + (Prims.of_int (42))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (77)) - (Prims.of_int (19)) - (Prims.of_int (77)) - (Prims.of_int (42))))) + (Prims.of_int (108)) + (Prims.of_int (15)) + (Prims.of_int (108)) + (Prims.of_int (38))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range @@ -284,39 +733,39 @@ let (check_stapp : (Pulse_Syntax_Printer.term_to_string head1)) (fun - uu___6 -> + uu___5 -> FStar_Tactics_Effect.lift_div_tac (fun - uu___7 -> + uu___6 -> fun x -> Prims.strcat (Prims.strcat "st_app: head = " (Prims.strcat - uu___6 + uu___5 ", ty_head = ")) (Prims.strcat x "\n"))))) (fun - uu___6 -> + uu___5 -> FStar_Tactics_Effect.lift_div_tac (fun - uu___7 -> - uu___6 - uu___5)))) - uu___5))) + uu___6 -> + uu___5 + uu___4)))) + uu___4))) (fun - uu___5 -> + uu___4 -> (fun - uu___5 -> + uu___4 -> Obj.magic (FStar_Tactics_V2_Builtins.print - uu___5)) - uu___5)))) + uu___4)) + uu___4)))) (fun - uu___4 -> + uu___3 -> (fun - uu___4 -> + uu___3 -> match Pulse_Syntax_Pure.is_arrow ty_head @@ -337,50 +786,50 @@ let (check_stapp : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (82)) - (Prims.of_int (8)) - (Prims.of_int (84)) - (Prims.of_int (48))))) + (Prims.of_int (114)) + (Prims.of_int (4)) + (Prims.of_int (116)) + (Prims.of_int (46))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (88)) - (Prims.of_int (8)) - (Prims.of_int (108)) - (Prims.of_int (57))))) + (Prims.of_int (121)) + (Prims.of_int (4)) + (Prims.of_int (142)) + (Prims.of_int (39))))) (Obj.magic (debug_log - g1 + g (fun - uu___5 -> + uu___4 -> FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (83)) - (Prims.of_int (17)) - (Prims.of_int (84)) - (Prims.of_int (47))))) + (Prims.of_int (115)) + (Prims.of_int (14)) + (Prims.of_int (116)) + (Prims.of_int (45))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (83)) - (Prims.of_int (9)) - (Prims.of_int (84)) - (Prims.of_int (47))))) + (Prims.of_int (115)) + (Prims.of_int (6)) + (Prims.of_int (116)) + (Prims.of_int (45))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (84)) - (Prims.of_int (19)) - (Prims.of_int (84)) - (Prims.of_int (46))))) + (Prims.of_int (116)) + (Prims.of_int (17)) + (Prims.of_int (116)) + (Prims.of_int (44))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range @@ -393,27 +842,27 @@ let (check_stapp : (Pulse_Syntax_Printer.comp_to_string comp_typ)) (fun - uu___6 -> + uu___5 -> FStar_Tactics_Effect.lift_div_tac (fun - uu___7 -> + uu___6 -> Prims.strcat "st_app, readback comp as " (Prims.strcat - uu___6 + uu___5 "\n"))))) (fun - uu___6 -> + uu___5 -> (fun - uu___6 -> + uu___5 -> Obj.magic (FStar_Tactics_V2_Builtins.print - uu___6)) - uu___6)))) + uu___5)) + uu___5)))) (fun - uu___5 -> + uu___4 -> (fun - uu___5 -> + uu___4 -> if qual = bqual @@ -424,27 +873,27 @@ let (check_stapp : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (90)) - (Prims.of_int (31)) - (Prims.of_int (90)) - (Prims.of_int (73))))) + (Prims.of_int (123)) + (Prims.of_int (28)) + (Prims.of_int (123)) + (Prims.of_int (70))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (89)) - (Prims.of_int (12)) - (Prims.of_int (103)) - (Prims.of_int (129))))) + (Prims.of_int (122)) + (Prims.of_int (8)) + (Prims.of_int (138)) + (Prims.of_int (126))))) (Obj.magic (Pulse_Checker_Pure.check_term_with_expected_type - g1 arg + g arg formal)) (fun - uu___6 -> + uu___5 -> (fun - uu___6 -> - match uu___6 + uu___5 -> + match uu___5 with | Prims.Mkdtuple2 @@ -461,23 +910,23 @@ let (check_stapp : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (96)) - (Prims.of_int (65)) - (Prims.of_int (96)) - (Prims.of_int (123))))) + (Prims.of_int (130)) + (Prims.of_int (10)) + (Prims.of_int (130)) + (Prims.of_int (68))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (96)) - (Prims.of_int (126)) - (Prims.of_int (101)) - (Prims.of_int (57))))) + (Prims.of_int (130)) + (Prims.of_int (71)) + (Prims.of_int (136)) + (Prims.of_int (104))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___7 -> + uu___6 -> Pulse_Typing.T_STApp - (g1, + (g, head1, formal, qual, @@ -485,7 +934,7 @@ let (check_stapp : arg1, (), ()))) (fun - uu___7 -> + uu___6 -> (fun d -> Obj.magic (FStar_Tactics_Effect.tac_bind @@ -493,23 +942,23 @@ let (check_stapp : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (97)) - (Prims.of_int (20)) - (Prims.of_int (97)) - (Prims.of_int (44))))) + (Prims.of_int (131)) + (Prims.of_int (16)) + (Prims.of_int (131)) + (Prims.of_int (40))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (101)) - (Prims.of_int (11)) - (Prims.of_int (101)) - (Prims.of_int (57))))) + (Prims.of_int (131)) + (Prims.of_int (43)) + (Prims.of_int (136)) + (Prims.of_int (104))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___7 -> + uu___6 -> canonicalize_st_typing - g1 + g (Pulse_Typing.wr (Pulse_Syntax_Base.Tm_STApp { @@ -524,8 +973,8 @@ let (check_stapp : comp_typ arg1) d)) (fun - uu___7 -> - (fun d' + uu___6 -> + (fun d1 -> Obj.magic (FStar_Tactics_Effect.tac_bind @@ -533,44 +982,24 @@ let (check_stapp : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (101)) + (Prims.of_int (132)) (Prims.of_int (18)) - (Prims.of_int (101)) - (Prims.of_int (47))))) + (Prims.of_int (132)) + (Prims.of_int (67))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (101)) - (Prims.of_int (11)) - (Prims.of_int (101)) - (Prims.of_int (57))))) - (Obj.magic - (Pulse_Checker_Common.try_frame_pre - g - (Pulse_Typing.wr - (Pulse_Syntax_Base.Tm_STApp - { - Pulse_Syntax_Base.head - = head1; - Pulse_Syntax_Base.arg_qual - = qual; - Pulse_Syntax_Base.arg - = arg1 - })) pre - () - (canon_comp - (Pulse_Syntax_Naming.open_comp_with - comp_typ - arg1)) d')) - (fun - uu___7 -> + (Prims.of_int (132)) + (Prims.of_int (72)) + (Prims.of_int (136)) + (Prims.of_int (104))))) + (FStar_Tactics_Effect.lift_div_tac (fun - uu___7 -> - Obj.magic - (Pulse_Checker_Common.repack - g pre - (Pulse_Typing.wr + uu___6 -> + { + Pulse_Syntax_Base.term1 + = (Pulse_Syntax_Base.Tm_STApp { Pulse_Syntax_Base.head @@ -579,15 +1008,111 @@ let (check_stapp : = qual; Pulse_Syntax_Base.arg = arg1 + }); + Pulse_Syntax_Base.range2 + = range })) - uu___7 - post_hint)) - uu___7))) - uu___7))) - uu___7)) + (fun + uu___6 -> + (fun t2 + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (133)) + (Prims.of_int (16)) + (Prims.of_int (133)) + (Prims.of_int (58))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (133)) + (Prims.of_int (61)) + (Prims.of_int (136)) + (Prims.of_int (104))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___6 -> + canon_comp + (Pulse_Syntax_Naming.open_comp_with + comp_typ + arg1))) + (fun + uu___6 -> + (fun c -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (134)) + (Prims.of_int (34)) + (Prims.of_int (134)) + (Prims.of_int (35))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (136)) + (Prims.of_int (8)) + (Prims.of_int (136)) + (Prims.of_int (104))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___6 -> + d1)) + (fun + uu___6 -> + (fun d2 + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (136)) + (Prims.of_int (31)) + (Prims.of_int (136)) + (Prims.of_int (86))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (136)) + (Prims.of_int (8)) + (Prims.of_int (136)) + (Prims.of_int (104))))) + (Obj.magic + (Pulse_Checker_Prover.try_frame_pre_uvs + g0 ctxt + () uvs t2 + c d2 + res_ppname)) + (fun + uu___6 -> + (fun + uu___6 -> + Obj.magic + (Pulse_Checker_Prover.prove_post_hint + g0 ctxt + uu___6 + post_hint + t2.Pulse_Syntax_Base.range2)) + uu___6))) + uu___6))) + uu___6))) + uu___6))) + uu___6))) + uu___6)) | Pulse_Syntax_Base.C_STAtomic - (uu___7, + (uu___6, res) -> Obj.magic (FStar_Tactics_Effect.tac_bind @@ -595,23 +1120,23 @@ let (check_stapp : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (96)) - (Prims.of_int (65)) - (Prims.of_int (96)) - (Prims.of_int (123))))) + (Prims.of_int (130)) + (Prims.of_int (10)) + (Prims.of_int (130)) + (Prims.of_int (68))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (96)) - (Prims.of_int (126)) - (Prims.of_int (101)) - (Prims.of_int (57))))) + (Prims.of_int (130)) + (Prims.of_int (71)) + (Prims.of_int (136)) + (Prims.of_int (104))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___8 -> + uu___7 -> Pulse_Typing.T_STApp - (g1, + (g, head1, formal, qual, @@ -619,7 +1144,7 @@ let (check_stapp : arg1, (), ()))) (fun - uu___8 -> + uu___7 -> (fun d -> Obj.magic (FStar_Tactics_Effect.tac_bind @@ -627,23 +1152,23 @@ let (check_stapp : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (97)) - (Prims.of_int (20)) - (Prims.of_int (97)) - (Prims.of_int (44))))) + (Prims.of_int (131)) + (Prims.of_int (16)) + (Prims.of_int (131)) + (Prims.of_int (40))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (101)) - (Prims.of_int (11)) - (Prims.of_int (101)) - (Prims.of_int (57))))) + (Prims.of_int (131)) + (Prims.of_int (43)) + (Prims.of_int (136)) + (Prims.of_int (104))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___8 -> + uu___7 -> canonicalize_st_typing - g1 + g (Pulse_Typing.wr (Pulse_Syntax_Base.Tm_STApp { @@ -658,8 +1183,8 @@ let (check_stapp : comp_typ arg1) d)) (fun - uu___8 -> - (fun d' + uu___7 -> + (fun d1 -> Obj.magic (FStar_Tactics_Effect.tac_bind @@ -667,22 +1192,24 @@ let (check_stapp : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (101)) + (Prims.of_int (132)) (Prims.of_int (18)) - (Prims.of_int (101)) - (Prims.of_int (47))))) + (Prims.of_int (132)) + (Prims.of_int (67))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (101)) - (Prims.of_int (11)) - (Prims.of_int (101)) - (Prims.of_int (57))))) - (Obj.magic - (Pulse_Checker_Common.try_frame_pre - g - (Pulse_Typing.wr + (Prims.of_int (132)) + (Prims.of_int (72)) + (Prims.of_int (136)) + (Prims.of_int (104))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___7 -> + { + Pulse_Syntax_Base.term1 + = (Pulse_Syntax_Base.Tm_STApp { Pulse_Syntax_Base.head @@ -691,37 +1218,111 @@ let (check_stapp : = qual; Pulse_Syntax_Base.arg = arg1 - })) pre - () - (canon_comp + }); + Pulse_Syntax_Base.range2 + = range + })) + (fun + uu___7 -> + (fun t2 + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (133)) + (Prims.of_int (16)) + (Prims.of_int (133)) + (Prims.of_int (58))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (133)) + (Prims.of_int (61)) + (Prims.of_int (136)) + (Prims.of_int (104))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___7 -> + canon_comp (Pulse_Syntax_Naming.open_comp_with comp_typ - arg1)) d')) + arg1))) (fun - uu___8 -> + uu___7 -> + (fun c -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (134)) + (Prims.of_int (34)) + (Prims.of_int (134)) + (Prims.of_int (35))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (136)) + (Prims.of_int (8)) + (Prims.of_int (136)) + (Prims.of_int (104))))) + (FStar_Tactics_Effect.lift_div_tac (fun - uu___8 -> + uu___7 -> + d1)) + (fun + uu___7 -> + (fun d2 + -> Obj.magic - (Pulse_Checker_Common.repack - g pre - (Pulse_Typing.wr - (Pulse_Syntax_Base.Tm_STApp - { - Pulse_Syntax_Base.head - = head1; - Pulse_Syntax_Base.arg_qual - = qual; - Pulse_Syntax_Base.arg - = arg1 - })) - uu___8 - post_hint)) - uu___8))) - uu___8))) - uu___8)) + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (136)) + (Prims.of_int (31)) + (Prims.of_int (136)) + (Prims.of_int (86))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (136)) + (Prims.of_int (8)) + (Prims.of_int (136)) + (Prims.of_int (104))))) + (Obj.magic + (Pulse_Checker_Prover.try_frame_pre_uvs + g0 ctxt + () uvs t2 + c d2 + res_ppname)) + (fun + uu___7 -> + (fun + uu___7 -> + Obj.magic + (Pulse_Checker_Prover.prove_post_hint + g0 ctxt + uu___7 + post_hint + t2.Pulse_Syntax_Base.range2)) + uu___7))) + uu___7))) + uu___7))) + uu___7))) + uu___7))) + uu___7)) | Pulse_Syntax_Base.C_STGhost - (uu___7, + (uu___6, res) -> Obj.magic (FStar_Tactics_Effect.tac_bind @@ -729,23 +1330,23 @@ let (check_stapp : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (96)) - (Prims.of_int (65)) - (Prims.of_int (96)) - (Prims.of_int (123))))) + (Prims.of_int (130)) + (Prims.of_int (10)) + (Prims.of_int (130)) + (Prims.of_int (68))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (96)) - (Prims.of_int (126)) - (Prims.of_int (101)) - (Prims.of_int (57))))) + (Prims.of_int (130)) + (Prims.of_int (71)) + (Prims.of_int (136)) + (Prims.of_int (104))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___8 -> + uu___7 -> Pulse_Typing.T_STApp - (g1, + (g, head1, formal, qual, @@ -753,7 +1354,7 @@ let (check_stapp : arg1, (), ()))) (fun - uu___8 -> + uu___7 -> (fun d -> Obj.magic (FStar_Tactics_Effect.tac_bind @@ -761,23 +1362,23 @@ let (check_stapp : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (97)) - (Prims.of_int (20)) - (Prims.of_int (97)) - (Prims.of_int (44))))) + (Prims.of_int (131)) + (Prims.of_int (16)) + (Prims.of_int (131)) + (Prims.of_int (40))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (101)) - (Prims.of_int (11)) - (Prims.of_int (101)) - (Prims.of_int (57))))) + (Prims.of_int (131)) + (Prims.of_int (43)) + (Prims.of_int (136)) + (Prims.of_int (104))))) (FStar_Tactics_Effect.lift_div_tac (fun - uu___8 -> + uu___7 -> canonicalize_st_typing - g1 + g (Pulse_Typing.wr (Pulse_Syntax_Base.Tm_STApp { @@ -792,8 +1393,8 @@ let (check_stapp : comp_typ arg1) d)) (fun - uu___8 -> - (fun d' + uu___7 -> + (fun d1 -> Obj.magic (FStar_Tactics_Effect.tac_bind @@ -801,22 +1402,24 @@ let (check_stapp : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (101)) + (Prims.of_int (132)) (Prims.of_int (18)) - (Prims.of_int (101)) - (Prims.of_int (47))))) + (Prims.of_int (132)) + (Prims.of_int (67))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (101)) - (Prims.of_int (11)) - (Prims.of_int (101)) - (Prims.of_int (57))))) - (Obj.magic - (Pulse_Checker_Common.try_frame_pre - g - (Pulse_Typing.wr + (Prims.of_int (132)) + (Prims.of_int (72)) + (Prims.of_int (136)) + (Prims.of_int (104))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___7 -> + { + Pulse_Syntax_Base.term1 + = (Pulse_Syntax_Base.Tm_STApp { Pulse_Syntax_Base.head @@ -825,43 +1428,117 @@ let (check_stapp : = qual; Pulse_Syntax_Base.arg = arg1 - })) pre - () - (canon_comp + }); + Pulse_Syntax_Base.range2 + = range + })) + (fun + uu___7 -> + (fun t2 + -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (133)) + (Prims.of_int (16)) + (Prims.of_int (133)) + (Prims.of_int (58))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (133)) + (Prims.of_int (61)) + (Prims.of_int (136)) + (Prims.of_int (104))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___7 -> + canon_comp (Pulse_Syntax_Naming.open_comp_with comp_typ - arg1)) d')) + arg1))) (fun - uu___8 -> + uu___7 -> + (fun c -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (134)) + (Prims.of_int (34)) + (Prims.of_int (134)) + (Prims.of_int (35))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (136)) + (Prims.of_int (8)) + (Prims.of_int (136)) + (Prims.of_int (104))))) + (FStar_Tactics_Effect.lift_div_tac (fun - uu___8 -> + uu___7 -> + d1)) + (fun + uu___7 -> + (fun d2 + -> Obj.magic - (Pulse_Checker_Common.repack - g pre - (Pulse_Typing.wr - (Pulse_Syntax_Base.Tm_STApp - { - Pulse_Syntax_Base.head - = head1; - Pulse_Syntax_Base.arg_qual - = qual; - Pulse_Syntax_Base.arg - = arg1 - })) - uu___8 - post_hint)) - uu___8))) - uu___8))) - uu___8)) - | + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (136)) + (Prims.of_int (31)) + (Prims.of_int (136)) + (Prims.of_int (86))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.STApp.fst" + (Prims.of_int (136)) + (Prims.of_int (8)) + (Prims.of_int (136)) + (Prims.of_int (104))))) + (Obj.magic + (Pulse_Checker_Prover.try_frame_pre_uvs + g0 ctxt + () uvs t2 + c d2 + res_ppname)) + (fun + uu___7 -> + (fun uu___7 -> Obj.magic + (Pulse_Checker_Prover.prove_post_hint + g0 ctxt + uu___7 + post_hint + t2.Pulse_Syntax_Base.range2)) + uu___7))) + uu___7))) + uu___7))) + uu___7))) + uu___7))) + uu___7)) + | + uu___6 -> + Obj.magic (Pulse_Typing_Env.fail - g1 + g (FStar_Pervasives_Native.Some - (t.Pulse_Syntax_Base.range2)) + (t1.Pulse_Syntax_Base.range2)) "Expected an effectful application; got a pure term (could it be partially applied by mistake?)"))) - uu___6)) + uu___5)) else Obj.magic (FStar_Tactics_Effect.tac_bind @@ -869,114 +1546,114 @@ let (check_stapp : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (105)) + (Prims.of_int (139)) (Prims.of_int (31)) - (Prims.of_int (108)) - (Prims.of_int (57))))) + (Prims.of_int (142)) + (Prims.of_int (39))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (105)) + (Prims.of_int (139)) (Prims.of_int (9)) - (Prims.of_int (108)) - (Prims.of_int (57))))) + (Prims.of_int (142)) + (Prims.of_int (39))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (108)) - (Prims.of_int (34)) - (Prims.of_int (108)) - (Prims.of_int (56))))) + (Prims.of_int (142)) + (Prims.of_int (16)) + (Prims.of_int (142)) + (Prims.of_int (38))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (105)) + (Prims.of_int (139)) (Prims.of_int (31)) - (Prims.of_int (108)) - (Prims.of_int (57))))) + (Prims.of_int (142)) + (Prims.of_int (39))))) (Obj.magic (Pulse_Syntax_Printer.term_to_string arg)) (fun - uu___7 -> + uu___6 -> (fun - uu___7 -> + uu___6 -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (105)) + (Prims.of_int (139)) (Prims.of_int (31)) - (Prims.of_int (108)) - (Prims.of_int (57))))) + (Prims.of_int (142)) + (Prims.of_int (39))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (105)) + (Prims.of_int (139)) (Prims.of_int (31)) - (Prims.of_int (108)) - (Prims.of_int (57))))) + (Prims.of_int (142)) + (Prims.of_int (39))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (107)) - (Prims.of_int (34)) - (Prims.of_int (107)) - (Prims.of_int (57))))) + (Prims.of_int (141)) + (Prims.of_int (16)) + (Prims.of_int (141)) + (Prims.of_int (39))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (105)) + (Prims.of_int (139)) (Prims.of_int (31)) - (Prims.of_int (108)) - (Prims.of_int (57))))) + (Prims.of_int (142)) + (Prims.of_int (39))))) (Obj.magic (Pulse_Syntax_Printer.term_to_string head1)) (fun - uu___8 -> + uu___7 -> (fun - uu___8 -> + uu___7 -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (105)) + (Prims.of_int (139)) (Prims.of_int (31)) - (Prims.of_int (108)) - (Prims.of_int (57))))) + (Prims.of_int (142)) + (Prims.of_int (39))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (105)) + (Prims.of_int (139)) (Prims.of_int (31)) - (Prims.of_int (108)) - (Prims.of_int (57))))) + (Prims.of_int (142)) + (Prims.of_int (39))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (106)) - (Prims.of_int (34)) - (Prims.of_int (106)) - (Prims.of_int (60))))) + (Prims.of_int (140)) + (Prims.of_int (16)) + (Prims.of_int (140)) + (Prims.of_int (42))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range @@ -989,11 +1666,10 @@ let (check_stapp : (Pulse_Syntax_Printer.term_to_string ty_head)) (fun - uu___9 -> + uu___8 -> FStar_Tactics_Effect.lift_div_tac (fun - uu___10 - -> + uu___9 -> fun x -> fun x1 -> Prims.strcat @@ -1001,7 +1677,7 @@ let (check_stapp : (Prims.strcat "Unexpected qualifier in head type " (Prims.strcat - uu___9 + uu___8 " of stateful application: head = ")) (Prims.strcat x @@ -1009,15 +1685,6 @@ let (check_stapp : (Prims.strcat x1 ""))))) (fun - uu___9 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___10 - -> - uu___9 - uu___8)))) - uu___8))) - (fun uu___8 -> FStar_Tactics_Effect.lift_div_tac (fun @@ -1027,46 +1694,54 @@ let (check_stapp : uu___7))) (fun uu___7 -> + FStar_Tactics_Effect.lift_div_tac (fun - uu___7 -> + uu___8 -> + uu___7 + uu___6)))) + uu___6))) + (fun + uu___6 -> + (fun + uu___6 -> Obj.magic (Pulse_Typing_Env.fail - g1 + g (FStar_Pervasives_Native.Some - (t.Pulse_Syntax_Base.range2)) - uu___7)) - uu___7))) - uu___5)) + (t1.Pulse_Syntax_Base.range2)) + uu___6)) + uu___6))) + uu___4)) | - uu___5 -> + uu___4 -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (110)) - (Prims.of_int (34)) - (Prims.of_int (110)) - (Prims.of_int (126))))) + (Prims.of_int (144)) + (Prims.of_int (31)) + (Prims.of_int (144)) + (Prims.of_int (123))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (110)) - (Prims.of_int (12)) - (Prims.of_int (110)) - (Prims.of_int (126))))) + (Prims.of_int (144)) + (Prims.of_int (9)) + (Prims.of_int (144)) + (Prims.of_int (123))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.STApp.fst" - (Prims.of_int (110)) - (Prims.of_int (99)) - (Prims.of_int (110)) - (Prims.of_int (125))))) + (Prims.of_int (144)) + (Prims.of_int (96)) + (Prims.of_int (144)) + (Prims.of_int (122))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range @@ -1079,165 +1754,26 @@ let (check_stapp : (Pulse_Syntax_Printer.term_to_string ty_head)) (fun - uu___6 -> + uu___5 -> FStar_Tactics_Effect.lift_div_tac (fun - uu___7 -> + uu___6 -> Prims.strcat "Unexpected head type in impure application: " (Prims.strcat - uu___6 ""))))) + uu___5 ""))))) (fun - uu___6 -> + uu___5 -> (fun - uu___6 -> + uu___5 -> Obj.magic (Pulse_Typing_Env.fail - g1 + g (FStar_Pervasives_Native.Some - (t.Pulse_Syntax_Base.range2)) - uu___6)) - uu___6))) - uu___4))) + (t1.Pulse_Syntax_Base.range2)) + uu___5)) + uu___5))) uu___3))) - uu___3))) - (fun uu___1 -> - (fun check_st_app -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.STApp.fst" - (Prims.of_int (113)) - (Prims.of_int (10)) - (Prims.of_int (113)) - (Prims.of_int (43))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.STApp.fst" - (Prims.of_int (113)) - (Prims.of_int (46)) - (Prims.of_int (122)) - (Prims.of_int (19))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - Pulse_Checker_Pure.push_context - "pure_app" - t.Pulse_Syntax_Base.range2 - g)) - (fun uu___1 -> - (fun g1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.STApp.fst" - (Prims.of_int (114)) - (Prims.of_int (17)) - (Prims.of_int (114)) - (Prims.of_int (41))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.STApp.fst" - (Prims.of_int (114)) - (Prims.of_int (44)) - (Prims.of_int (122)) - (Prims.of_int (19))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___1 -> - Pulse_Syntax_Pure.tm_pureapp - head qual - arg)) - (fun uu___1 - -> - (fun - pure_app - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.STApp.fst" - (Prims.of_int (115)) - (Prims.of_int (14)) - (Prims.of_int (115)) - (Prims.of_int (51))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.STApp.fst" - (Prims.of_int (114)) - (Prims.of_int (44)) - (Prims.of_int (122)) - (Prims.of_int (19))))) - (Obj.magic - (Pulse_Checker_Pure.instantiate_term_implicits - g1 - pure_app)) - (fun - uu___1 -> - (fun - uu___1 -> - match uu___1 - with - | - (t1, ty) - -> - (match - Pulse_Syntax_Pure.is_arrow - ty - with - | - FStar_Pervasives_Native.Some - (uu___2, - FStar_Pervasives_Native.Some - (Pulse_Syntax_Base.Implicit), - uu___3) - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.STApp.fst" - (Prims.of_int (119)) - (Prims.of_int (12)) - (Prims.of_int (119)) - (Prims.of_int (58))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Checker.STApp.fst" - (Prims.of_int (120)) - (Prims.of_int (4)) - (Prims.of_int (120)) - (Prims.of_int (45))))) - (Obj.magic - (Pulse_Checker_Inference.infer - g1 t1 ty - pre range)) - (fun - uu___4 -> - (fun t2 - -> - Obj.magic - (check' - false g1 - t2 pre () - post_hint)) - uu___4)) - | - uu___2 -> - Obj.magic - (check_st_app - ()))) - uu___1))) - uu___1))) - uu___1))) uu___1))) - uu___))) uu___) \ No newline at end of file + uu___2))) + uu___1))) uu___))) + uu___))) uu___) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Checker_VPropEquiv.ml b/src/ocaml/plugin/generated/Pulse_Checker_VPropEquiv.ml index f1ad85289..9ae5a3eca 100644 --- a/src/ocaml/plugin/generated/Pulse_Checker_VPropEquiv.ml +++ b/src/ocaml/plugin/generated/Pulse_Checker_VPropEquiv.ml @@ -1,18 +1,6 @@ open Prims -let rec (vprop_as_list : - Pulse_Syntax_Base.term -> Pulse_Syntax_Base.term Prims.list) = - fun vp -> - match vp.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_Emp -> [] - | Pulse_Syntax_Base.Tm_Star (vp0, vp1) -> - FStar_List_Tot_Base.op_At (vprop_as_list vp0) (vprop_as_list vp1) - | uu___ -> [vp] -let rec (list_as_vprop : - Pulse_Syntax_Base.term Prims.list -> Pulse_Syntax_Base.term) = - fun vps -> - match vps with - | [] -> Pulse_Syntax_Base.tm_emp - | hd::tl -> Pulse_Syntax_Base.tm_star hd (list_as_vprop tl) let (canon_vprop : Pulse_Syntax_Base.term -> Pulse_Syntax_Base.term) = - fun vp -> list_as_vprop (vprop_as_list vp) + fun vp -> + Pulse_Typing_Combinators.list_as_vprop + (Pulse_Typing_Combinators.vprop_as_list vp) diff --git a/src/ocaml/plugin/generated/Pulse_Checker_While.ml b/src/ocaml/plugin/generated/Pulse_Checker_While.ml index 1482fe383..351b8c601 100644 --- a/src/ocaml/plugin/generated/Pulse_Checker_While.ml +++ b/src/ocaml/plugin/generated/Pulse_Checker_While.ml @@ -5,7 +5,7 @@ let (while_cond_comp_typing : Pulse_Syntax_Base.ppname -> Pulse_Syntax_Base.term -> Pulse_Syntax_Base.term -> - unit -> (unit, unit) Pulse_Typing_Metatheory.comp_typing_u) + unit -> (unit, unit) Pulse_Typing_Metatheory_Base.comp_typing_u) = fun g -> fun u -> @@ -13,7 +13,7 @@ let (while_cond_comp_typing : fun ty -> fun inv_body -> fun inv_typing -> - Pulse_Typing_Metatheory.admit_comp_typing g + Pulse_Typing_Metatheory_Base.admit_comp_typing g (Pulse_Typing.comp_while_cond x inv_body) let (while_body_comp_typing : Pulse_Typing_Env.env -> @@ -21,7 +21,7 @@ let (while_body_comp_typing : Pulse_Syntax_Base.ppname -> Pulse_Syntax_Base.term -> Pulse_Syntax_Base.term -> - unit -> (unit, unit) Pulse_Typing_Metatheory.comp_typing_u) + unit -> (unit, unit) Pulse_Typing_Metatheory_Base.comp_typing_u) = fun g -> fun u -> @@ -29,37 +29,37 @@ let (while_body_comp_typing : fun ty -> fun inv_body -> fun inv_typing -> - Pulse_Typing_Metatheory.admit_comp_typing g + Pulse_Typing_Metatheory_Base.admit_comp_typing g (Pulse_Typing.comp_while_body x inv_body) -let (check_while : - Prims.bool -> - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.term -> - unit -> - unit Pulse_Typing.post_hint_opt -> - (Prims.bool -> Pulse_Checker_Common.check_t) -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, +let (check : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + unit -> + unit Pulse_Typing.post_hint_opt -> + Pulse_Syntax_Base.ppname -> + Pulse_Syntax_Base.st_term -> + Pulse_Checker_Base.check_t -> + ((unit, unit, unit) Pulse_Checker_Base.checker_result_t, unit) FStar_Tactics_Effect.tac_repr) = - fun allow_inst -> - fun g -> - fun t -> - fun pre -> - fun pre_typing -> - fun post_hint -> - fun check' -> + fun g -> + fun pre -> + fun pre_typing -> + fun post_hint -> + fun res_ppname -> + fun t -> + fun check1 -> FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (37)) (Prims.of_int (10)) - (Prims.of_int (37)) (Prims.of_int (45))))) + (Prims.of_int (34)) (Prims.of_int (10)) + (Prims.of_int (34)) (Prims.of_int (45))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (37)) (Prims.of_int (48)) - (Prims.of_int (109)) (Prims.of_int (64))))) + (Prims.of_int (34)) (Prims.of_int (48)) + (Prims.of_int (108)) (Prims.of_int (70))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> Pulse_Checker_Pure.push_context "while loop" @@ -72,15 +72,15 @@ let (check_while : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (38)) (Prims.of_int (72)) - (Prims.of_int (38)) (Prims.of_int (78))))) + (Prims.of_int (35)) (Prims.of_int (72)) + (Prims.of_int (35)) (Prims.of_int (78))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (37)) (Prims.of_int (48)) - (Prims.of_int (109)) - (Prims.of_int (64))))) + (Prims.of_int (34)) (Prims.of_int (48)) + (Prims.of_int (108)) + (Prims.of_int (70))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> t.Pulse_Syntax_Base.term1)) (fun uu___ -> @@ -99,18 +99,18 @@ let (check_while : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (40)) + (Prims.of_int (37)) (Prims.of_int (4)) - (Prims.of_int (41)) + (Prims.of_int (38)) (Prims.of_int (88))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (38)) + (Prims.of_int (35)) (Prims.of_int (81)) - (Prims.of_int (109)) - (Prims.of_int (64))))) + (Prims.of_int (108)) + (Prims.of_int (70))))) (Obj.magic (Pulse_Checker_Pure.check_vprop (Pulse_Checker_Pure.push_context @@ -137,23 +137,22 @@ let (check_while : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (43)) + (Prims.of_int (41)) (Prims.of_int (2)) - (Prims.of_int (46)) - (Prims.of_int (3))))) + (Prims.of_int (44)) + (Prims.of_int (38))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (47)) - (Prims.of_int (2)) - (Prims.of_int (109)) - (Prims.of_int (64))))) + (Prims.of_int (44)) + (Prims.of_int (39)) + (Prims.of_int (108)) + (Prims.of_int (70))))) (if - Pulse_RuntimeUtils.debug_at_level - (Pulse_Typing_Env.fstar_env - g1) - "inference" + Prims.op_Negation + (Pulse_Syntax_Base.uu___is_Tm_ExistsSL + ex_inv.Pulse_Syntax_Base.t) then Obj.magic (Obj.repr @@ -162,28 +161,28 @@ let (check_while : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (45)) - (Prims.of_int (12)) - (Prims.of_int (45)) - (Prims.of_int (98))))) + (Prims.of_int (43)) + (Prims.of_int (9)) + (Prims.of_int (44)) + (Prims.of_int (38))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (44)) + (Prims.of_int (42)) (Prims.of_int (7)) - (Prims.of_int (46)) - (Prims.of_int (3))))) + (Prims.of_int (44)) + (Prims.of_int (38))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (45)) - (Prims.of_int (72)) - (Prims.of_int (45)) - (Prims.of_int (97))))) + (Prims.of_int (44)) + (Prims.of_int (12)) + (Prims.of_int (44)) + (Prims.of_int (37))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range @@ -201,16 +200,19 @@ let (check_while : (fun uu___3 -> Prims.strcat - "Checking precondition of while loop: " + "check_while: typechecked invariant " (Prims.strcat uu___2 - "\n"))))) + " is not an existential"))))) (fun uu___2 -> (fun uu___2 -> Obj.magic - (FStar_Tactics_V2_Builtins.print + (Pulse_Typing_Env.fail + g1 + (FStar_Pervasives_Native.Some + (t.Pulse_Syntax_Base.range2)) uu___2)) uu___2))) else @@ -228,22 +230,22 @@ let (check_while : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (47)) - (Prims.of_int (8)) - (Prims.of_int (47)) - (Prims.of_int (49))))) + (Prims.of_int (46)) + (Prims.of_int (59)) + (Prims.of_int (46)) + (Prims.of_int (67))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (47)) - (Prims.of_int (2)) - (Prims.of_int (109)) - (Prims.of_int (64))))) - (Obj.magic - (Pulse_Checker_Framing.check_frameable - g pre () - ex_inv)) + (Prims.of_int (44)) + (Prims.of_int (39)) + (Prims.of_int (108)) + (Prims.of_int (70))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___3 -> + ex_inv.Pulse_Syntax_Base.t)) (fun uu___3 -> (fun @@ -251,23 +253,6 @@ let (check_while : match uu___3 with | - FStar_Pervasives.Inr - f -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.raise - (Pulse_Checker_Common.Framing_failure - f))) - | - FStar_Pervasives.Inl - framing_token - -> - Obj.magic - (Obj.repr - (match - ex_inv.Pulse_Syntax_Base.t - with - | Pulse_Syntax_Base.Tm_ExistsSL (u, { @@ -276,7 +261,25 @@ let (check_while : Pulse_Syntax_Base.binder_ppname = nm;_}, inv1) -> - if + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.While.fst" + (Prims.of_int (48)) + (Prims.of_int (2)) + (Prims.of_int (52)) + (Prims.of_int (34))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.While.fst" + (Prims.of_int (52)) + (Prims.of_int (35)) + (Prims.of_int (108)) + (Prims.of_int (70))))) + (if (Prims.op_Negation (Pulse_Syntax_Base.eq_tm ty @@ -287,29 +290,96 @@ let (check_while : u Pulse_Syntax_Pure.u0)) then - Pulse_Typing_Env.fail + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.While.fst" + (Prims.of_int (51)) + (Prims.of_int (9)) + (Prims.of_int (52)) + (Prims.of_int (34))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.While.fst" + (Prims.of_int (50)) + (Prims.of_int (7)) + (Prims.of_int (52)) + (Prims.of_int (34))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.While.fst" + (Prims.of_int (52)) + (Prims.of_int (12)) + (Prims.of_int (52)) + (Prims.of_int (33))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + ty)) + (fun + uu___4 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___5 -> + Prims.strcat + "While loop invariant exists but its witness type is " + (Prims.strcat + uu___4 + ", expected bool"))))) + (fun + uu___4 -> + (fun + uu___4 -> + Obj.magic + (Pulse_Typing_Env.fail g1 (FStar_Pervasives_Native.Some (nm.Pulse_Syntax_Base.range)) - "While loop invariant exists but its witness type is not bool" + uu___4)) + uu___4))) else - FStar_Tactics_Effect.tac_bind + Obj.magic + (Obj.repr + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___5 -> + ())))) + (fun + uu___4 -> + (fun + uu___4 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (56)) - (Prims.of_int (37)) - (Prims.of_int (56)) - (Prims.of_int (82))))) + (Prims.of_int (54)) + (Prims.of_int (31)) + (Prims.of_int (54)) + (Prims.of_int (76))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (56)) - (Prims.of_int (85)) - (Prims.of_int (107)) - (Prims.of_int (77))))) + (Prims.of_int (54)) + (Prims.of_int (79)) + (Prims.of_int (108)) + (Prims.of_int (70))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___5 -> @@ -331,22 +401,22 @@ let (check_while : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (58)) - (Prims.of_int (24)) - (Prims.of_int (58)) - (Prims.of_int (95))))) + (Prims.of_int (56)) + (Prims.of_int (16)) + (Prims.of_int (56)) + (Prims.of_int (87))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (56)) - (Prims.of_int (85)) - (Prims.of_int (107)) - (Prims.of_int (77))))) + (Prims.of_int (54)) + (Prims.of_int (79)) + (Prims.of_int (108)) + (Prims.of_int (70))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___5 -> - Pulse_Typing_Metatheory.st_comp_typing_inversion + Pulse_Typing_Metatheory_Base.st_comp_typing_inversion (Pulse_Checker_Pure.push_context "invariant" (Pulse_Syntax_Base.term_range @@ -354,7 +424,7 @@ let (check_while : (Pulse_Syntax_Base.st_comp_of_comp (Pulse_Typing.comp_while_cond nm inv1)) - (Pulse_Typing_Metatheory.comp_typing_inversion + (Pulse_Typing_Metatheory_Base.comp_typing_inversion (Pulse_Checker_Pure.push_context "invariant" (Pulse_Syntax_Base.term_range @@ -381,22 +451,22 @@ let (check_while : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (62)) - (Prims.of_int (12)) - (Prims.of_int (62)) - (Prims.of_int (61))))) + (Prims.of_int (59)) + (Prims.of_int (4)) + (Prims.of_int (59)) + (Prims.of_int (53))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (63)) - (Prims.of_int (10)) - (Prims.of_int (107)) - (Prims.of_int (77))))) + (Prims.of_int (60)) + (Prims.of_int (4)) + (Prims.of_int (108)) + (Prims.of_int (70))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___6 -> - Pulse_Checker_Common.post_hint_from_comp_typing + Pulse_Checker_Base.post_hint_from_comp_typing (Pulse_Checker_Pure.push_context "invariant" (Pulse_Syntax_Base.term_range @@ -415,31 +485,93 @@ let (check_while : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (65)) - (Prims.of_int (10)) - (Prims.of_int (70)) - (Prims.of_int (39))))) + (Prims.of_int (62)) + (Prims.of_int (42)) + (Prims.of_int (71)) + (Prims.of_int (35))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.While.fst" + (Prims.of_int (60)) + (Prims.of_int (4)) + (Prims.of_int (108)) + (Prims.of_int (70))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" (Prims.of_int (63)) - (Prims.of_int (10)) - (Prims.of_int (107)) - (Prims.of_int (77))))) + (Prims.of_int (17)) + (Prims.of_int (63)) + (Prims.of_int (46))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.While.fst" + (Prims.of_int (63)) + (Prims.of_int (49)) + (Prims.of_int (71)) + (Prims.of_int (35))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___6 -> + Pulse_Syntax_Base.mk_ppname_no_range + "_while_c")) + (fun + uu___6 -> + (fun + ppname -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.While.fst" + (Prims.of_int (64)) + (Prims.of_int (12)) + (Prims.of_int (70)) + (Prims.of_int (10))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.While.fst" + (Prims.of_int (71)) + (Prims.of_int (4)) + (Prims.of_int (71)) + (Prims.of_int (35))))) (Obj.magic - (check' - allow_inst + (check1 (Pulse_Checker_Pure.push_context - "while condition" + "check_while_condition" cond.Pulse_Syntax_Base.range2 - g1) cond + g1) (Pulse_Syntax_Base.comp_pre (Pulse_Typing.comp_while_cond nm inv1)) () (FStar_Pervasives_Native.Some - while_cond_hint))) + while_cond_hint) + ppname + cond)) + (fun + uu___6 -> + (fun r -> + Obj.magic + (Pulse_Checker_Base.apply_checker_result_k + (Pulse_Checker_Pure.push_context + "check_while_condition" + cond.Pulse_Syntax_Base.range2 + g1) + (Pulse_Syntax_Base.comp_pre + (Pulse_Typing.comp_while_cond + nm inv1)) + while_cond_hint + r ppname)) + uu___6))) + uu___6))) (fun uu___6 -> (fun @@ -464,18 +596,18 @@ let (check_while : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (74)) - (Prims.of_int (39)) - (Prims.of_int (74)) - (Prims.of_int (84))))) + (Prims.of_int (75)) + (Prims.of_int (33)) + (Prims.of_int (75)) + (Prims.of_int (78))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (74)) - (Prims.of_int (87)) - (Prims.of_int (100)) - (Prims.of_int (81))))) + (Prims.of_int (75)) + (Prims.of_int (81)) + (Prims.of_int (101)) + (Prims.of_int (71))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___7 -> @@ -497,22 +629,22 @@ let (check_while : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (76)) - (Prims.of_int (26)) - (Prims.of_int (76)) - (Prims.of_int (97))))) + (Prims.of_int (77)) + (Prims.of_int (18)) + (Prims.of_int (77)) + (Prims.of_int (89))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (74)) - (Prims.of_int (87)) - (Prims.of_int (100)) - (Prims.of_int (81))))) + (Prims.of_int (75)) + (Prims.of_int (81)) + (Prims.of_int (101)) + (Prims.of_int (71))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___7 -> - Pulse_Typing_Metatheory.st_comp_typing_inversion + Pulse_Typing_Metatheory_Base.st_comp_typing_inversion (Pulse_Checker_Pure.push_context "invariant" (Pulse_Syntax_Base.term_range @@ -520,7 +652,7 @@ let (check_while : (Pulse_Syntax_Base.st_comp_of_comp (Pulse_Typing.comp_while_body nm inv1)) - (Pulse_Typing_Metatheory.comp_typing_inversion + (Pulse_Typing_Metatheory_Base.comp_typing_inversion (Pulse_Checker_Pure.push_context "invariant" (Pulse_Syntax_Base.term_range @@ -548,21 +680,21 @@ let (check_while : (FStar_Range.mk_range "Pulse.Checker.While.fst" (Prims.of_int (80)) - (Prims.of_int (14)) + (Prims.of_int (6)) (Prims.of_int (80)) - (Prims.of_int (63))))) + (Prims.of_int (55))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" (Prims.of_int (81)) - (Prims.of_int (12)) - (Prims.of_int (100)) - (Prims.of_int (81))))) + (Prims.of_int (6)) + (Prims.of_int (101)) + (Prims.of_int (71))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___8 -> - Pulse_Checker_Common.post_hint_from_comp_typing + Pulse_Checker_Base.post_hint_from_comp_typing (Pulse_Checker_Pure.push_context "invariant" (Pulse_Syntax_Base.term_range @@ -581,31 +713,93 @@ let (check_while : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" + (Prims.of_int (82)) + (Prims.of_int (44)) + (Prims.of_int (91)) + (Prims.of_int (37))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.While.fst" + (Prims.of_int (81)) + (Prims.of_int (6)) + (Prims.of_int (101)) + (Prims.of_int (71))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.While.fst" + (Prims.of_int (83)) + (Prims.of_int (19)) + (Prims.of_int (83)) + (Prims.of_int (48))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.While.fst" (Prims.of_int (83)) + (Prims.of_int (51)) + (Prims.of_int (91)) + (Prims.of_int (37))))) + (FStar_Tactics_Effect.lift_div_tac + (fun + uu___8 -> + Pulse_Syntax_Base.mk_ppname_no_range + "_while_b")) + (fun + uu___8 -> + (fun + ppname -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.While.fst" + (Prims.of_int (84)) (Prims.of_int (14)) - (Prims.of_int (88)) - (Prims.of_int (43))))) + (Prims.of_int (90)) + (Prims.of_int (12))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (81)) - (Prims.of_int (12)) - (Prims.of_int (100)) - (Prims.of_int (81))))) + (Prims.of_int (91)) + (Prims.of_int (6)) + (Prims.of_int (91)) + (Prims.of_int (37))))) (Obj.magic - (check' - allow_inst + (check1 (Pulse_Checker_Pure.push_context - "while body" + "check_while_body" body.Pulse_Syntax_Base.range2 - g1) body + g1) (Pulse_Syntax_Base.comp_pre (Pulse_Typing.comp_while_body nm inv1)) () (FStar_Pervasives_Native.Some - while_post_hint))) + while_post_hint) + ppname + body)) + (fun + uu___8 -> + (fun r -> + Obj.magic + (Pulse_Checker_Base.apply_checker_result_k + (Pulse_Checker_Pure.push_context + "check_while_body" + body.Pulse_Syntax_Base.range2 + g1) + (Pulse_Syntax_Base.comp_pre + (Pulse_Typing.comp_while_body + nm inv1)) + while_post_hint + r ppname)) + uu___8))) + uu___8))) (fun uu___8 -> (fun @@ -630,18 +824,18 @@ let (check_while : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (91)) - (Prims.of_int (23)) - (Prims.of_int (91)) - (Prims.of_int (81))))) + (Prims.of_int (94)) + (Prims.of_int (14)) + (Prims.of_int (94)) + (Prims.of_int (72))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (91)) - (Prims.of_int (84)) - (Prims.of_int (93)) - (Prims.of_int (45))))) + (Prims.of_int (95)) + (Prims.of_int (6)) + (Prims.of_int (95)) + (Prims.of_int (79))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___9 -> @@ -662,23 +856,21 @@ let (check_while : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (92)) - (Prims.of_int (35)) - (Prims.of_int (92)) - (Prims.of_int (81))))) + (Prims.of_int (95)) + (Prims.of_int (22)) + (Prims.of_int (95)) + (Prims.of_int (61))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (91)) - (Prims.of_int (84)) - (Prims.of_int (93)) - (Prims.of_int (45))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___9 -> - Pulse_Checker_Framing.apply_frame - g + (Prims.of_int (95)) + (Prims.of_int (6)) + (Prims.of_int (95)) + (Prims.of_int (79))))) + (Obj.magic + (Pulse_Checker_Prover.try_frame_pre + g pre () (Pulse_Typing.wr (Pulse_Syntax_Base.Tm_While { @@ -691,41 +883,21 @@ let (check_while : Pulse_Syntax_Base.ppname_default; Pulse_Syntax_Base.body3 = body1 - })) pre - () + })) (Pulse_Typing.comp_while Pulse_Syntax_Base.ppname_default inv1) d - framing_token)) + res_ppname)) (fun uu___9 -> (fun uu___9 -> - match uu___9 - with - | - Prims.Mkdtuple2 - (c, st_d) - -> Obj.magic - (Pulse_Checker_Common.repack + (Pulse_Checker_Prover.prove_post_hint g pre - (Pulse_Typing.wr - (Pulse_Syntax_Base.Tm_While - { - Pulse_Syntax_Base.invariant - = inv1; - Pulse_Syntax_Base.condition - = cond1; - Pulse_Syntax_Base.condition_var - = - Pulse_Syntax_Base.ppname_default; - Pulse_Syntax_Base.body3 - = body1 - })) - (Prims.Mkdtuple2 - (c, st_d)) - post_hint)) + uu___9 + post_hint + t.Pulse_Syntax_Base.range2)) uu___9))) uu___9)) else @@ -735,36 +907,36 @@ let (check_while : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (96)) - (Prims.of_int (14)) - (Prims.of_int (100)) - (Prims.of_int (81))))) + (Prims.of_int (97)) + (Prims.of_int (10)) + (Prims.of_int (101)) + (Prims.of_int (71))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (95)) - (Prims.of_int (12)) - (Prims.of_int (100)) - (Prims.of_int (81))))) + (Prims.of_int (96)) + (Prims.of_int (9)) + (Prims.of_int (101)) + (Prims.of_int (71))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (100)) - (Prims.of_int (37)) - (Prims.of_int (100)) - (Prims.of_int (80))))) + (Prims.of_int (101)) + (Prims.of_int (27)) + (Prims.of_int (101)) + (Prims.of_int (70))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (96)) - (Prims.of_int (14)) - (Prims.of_int (100)) - (Prims.of_int (81))))) + (Prims.of_int (97)) + (Prims.of_int (10)) + (Prims.of_int (101)) + (Prims.of_int (71))))) (Obj.magic (Pulse_Syntax_Printer.comp_to_string (Pulse_Typing.comp_while_body @@ -781,28 +953,28 @@ let (check_while : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (96)) - (Prims.of_int (14)) - (Prims.of_int (100)) - (Prims.of_int (81))))) + (Prims.of_int (97)) + (Prims.of_int (10)) + (Prims.of_int (101)) + (Prims.of_int (71))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (96)) - (Prims.of_int (14)) - (Prims.of_int (100)) - (Prims.of_int (81))))) + (Prims.of_int (97)) + (Prims.of_int (10)) + (Prims.of_int (101)) + (Prims.of_int (71))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (99)) - (Prims.of_int (37)) - (Prims.of_int (99)) - (Prims.of_int (65))))) + (Prims.of_int (100)) + (Prims.of_int (27)) + (Prims.of_int (100)) + (Prims.of_int (55))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range @@ -863,36 +1035,36 @@ let (check_while : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (103)) - Prims.int_zero - (Prims.of_int (107)) - (Prims.of_int (77))))) + (Prims.of_int (104)) + (Prims.of_int (9)) + (Prims.of_int (108)) + (Prims.of_int (70))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (102)) - (Prims.of_int (11)) - (Prims.of_int (107)) - (Prims.of_int (77))))) + (Prims.of_int (103)) + (Prims.of_int (7)) + (Prims.of_int (108)) + (Prims.of_int (70))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (107)) - (Prims.of_int (33)) - (Prims.of_int (107)) - (Prims.of_int (76))))) + (Prims.of_int (108)) + (Prims.of_int (26)) + (Prims.of_int (108)) + (Prims.of_int (69))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (103)) - Prims.int_zero - (Prims.of_int (107)) - (Prims.of_int (77))))) + (Prims.of_int (104)) + (Prims.of_int (9)) + (Prims.of_int (108)) + (Prims.of_int (70))))) (Obj.magic (Pulse_Syntax_Printer.comp_to_string (Pulse_Typing.comp_while_cond @@ -907,28 +1079,28 @@ let (check_while : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (103)) - Prims.int_zero - (Prims.of_int (107)) - (Prims.of_int (77))))) + (Prims.of_int (104)) + (Prims.of_int (9)) + (Prims.of_int (108)) + (Prims.of_int (70))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (103)) - Prims.int_zero - (Prims.of_int (107)) - (Prims.of_int (77))))) + (Prims.of_int (104)) + (Prims.of_int (9)) + (Prims.of_int (108)) + (Prims.of_int (70))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.While.fst" - (Prims.of_int (106)) - (Prims.of_int (33)) - (Prims.of_int (106)) - (Prims.of_int (61))))) + (Prims.of_int (107)) + (Prims.of_int (26)) + (Prims.of_int (107)) + (Prims.of_int (54))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range @@ -977,13 +1149,8 @@ let (check_while : uu___6))) uu___6))) uu___5))) - uu___5) - | - uu___4 -> - Pulse_Typing_Env.fail - g1 - FStar_Pervasives_Native.None - "Typechecked invariant is not an exists"))) + uu___5))) + uu___4))) uu___3))) uu___2))) uu___1))) uu___))) uu___) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Checker_WithLocal.ml b/src/ocaml/plugin/generated/Pulse_Checker_WithLocal.ml index 603226148..1a4ee2400 100644 --- a/src/ocaml/plugin/generated/Pulse_Checker_WithLocal.ml +++ b/src/ocaml/plugin/generated/Pulse_Checker_WithLocal.ml @@ -11,6 +11,7 @@ let (extend_post_hint_for_local : fun x -> { Pulse_Typing.g = (p.Pulse_Typing.g); + Pulse_Typing.ctag_hint = (p.Pulse_Typing.ctag_hint); Pulse_Typing.ret_ty = (p.Pulse_Typing.ret_ty); Pulse_Typing.u = (p.Pulse_Typing.u); Pulse_Typing.ty_typing = (); @@ -20,35 +21,35 @@ let (extend_post_hint_for_local : Pulse_Typing.post_typing = () } -let (check_withlocal : - Prims.bool -> - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.term -> - unit -> - unit Pulse_Typing.post_hint_opt -> - (Prims.bool -> Pulse_Checker_Common.check_t) -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, +let (check : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + unit -> + unit Pulse_Typing.post_hint_opt -> + Pulse_Syntax_Base.ppname -> + Pulse_Syntax_Base.st_term -> + Pulse_Checker_Base.check_t -> + ((unit, unit, unit) Pulse_Checker_Base.checker_result_t, unit) FStar_Tactics_Effect.tac_repr) = - fun allow_inst -> - fun g -> - fun t -> - fun pre -> - fun pre_typing -> - fun post_hint -> - fun check' -> + fun g -> + fun pre -> + fun pre_typing -> + fun post_hint -> + fun res_ppname -> + fun t -> + fun check1 -> FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (38)) (Prims.of_int (10)) - (Prims.of_int (38)) (Prims.of_int (50))))) + (Prims.of_int (35)) (Prims.of_int (10)) + (Prims.of_int (35)) (Prims.of_int (50))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (38)) (Prims.of_int (53)) - (Prims.of_int (87)) (Prims.of_int (80))))) + (Prims.of_int (35)) (Prims.of_int (53)) + (Prims.of_int (92)) (Prims.of_int (38))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> Pulse_Checker_Pure.push_context "check_withlocal" @@ -61,14 +62,14 @@ let (check_withlocal : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (39)) (Prims.of_int (16)) - (Prims.of_int (39)) (Prims.of_int (42))))) + (Prims.of_int (36)) (Prims.of_int (16)) + (Prims.of_int (36)) (Prims.of_int (42))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (39)) (Prims.of_int (47)) - (Prims.of_int (87)) (Prims.of_int (80))))) + (Prims.of_int (36)) (Prims.of_int (47)) + (Prims.of_int (92)) (Prims.of_int (38))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> fun t0 -> @@ -85,18 +86,18 @@ let (check_withlocal : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (40)) + (Prims.of_int (37)) (Prims.of_int (54)) - (Prims.of_int (40)) + (Prims.of_int (37)) (Prims.of_int (60))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (39)) + (Prims.of_int (36)) (Prims.of_int (47)) - (Prims.of_int (87)) - (Prims.of_int (80))))) + (Prims.of_int (92)) + (Prims.of_int (38))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> t.Pulse_Syntax_Base.term1)) @@ -118,18 +119,18 @@ let (check_withlocal : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (42)) + (Prims.of_int (39)) (Prims.of_int (4)) - (Prims.of_int (42)) + (Prims.of_int (39)) (Prims.of_int (30))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (40)) + (Prims.of_int (37)) (Prims.of_int (63)) - (Prims.of_int (87)) - (Prims.of_int (80))))) + (Prims.of_int (92)) + (Prims.of_int (38))))) (Obj.magic (Pulse_Checker_Pure.check_term_and_type g1 init)) @@ -155,18 +156,18 @@ let (check_withlocal : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (44)) - (Prims.of_int (15)) - (Prims.of_int (44)) - (Prims.of_int (22))))) + (Prims.of_int (42)) + (Prims.of_int (12)) + (Prims.of_int (42)) + (Prims.of_int (19))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (44)) - (Prims.of_int (25)) - (Prims.of_int (86)) - (Prims.of_int (10))))) + (Prims.of_int (42)) + (Prims.of_int (22)) + (Prims.of_int (87)) + (Prims.of_int (63))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___2 -> @@ -181,18 +182,18 @@ let (check_withlocal : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (45)) - (Prims.of_int (16)) - (Prims.of_int (45)) - (Prims.of_int (39))))) + (Prims.of_int (43)) + (Prims.of_int (13)) + (Prims.of_int (43)) + (Prims.of_int (36))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (46)) - (Prims.of_int (7)) - (Prims.of_int (86)) - (Prims.of_int (10))))) + (Prims.of_int (44)) + (Prims.of_int (4)) + (Prims.of_int (87)) + (Prims.of_int (63))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___2 -> @@ -214,28 +215,28 @@ let (check_withlocal : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (47)) - (Prims.of_int (37)) - (Prims.of_int (47)) - (Prims.of_int (122))))) + (Prims.of_int (45)) + (Prims.of_int (34)) + (Prims.of_int (45)) + (Prims.of_int (119))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (47)) - (Prims.of_int (12)) - (Prims.of_int (47)) - (Prims.of_int (122))))) + (Prims.of_int (45)) + (Prims.of_int (9)) + (Prims.of_int (45)) + (Prims.of_int (119))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (47)) - (Prims.of_int (85)) - (Prims.of_int (47)) - (Prims.of_int (121))))) + (Prims.of_int (45)) + (Prims.of_int (82)) + (Prims.of_int (45)) + (Prims.of_int (118))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range @@ -275,18 +276,18 @@ let (check_withlocal : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (49)) - (Prims.of_int (20)) - (Prims.of_int (49)) - (Prims.of_int (35))))) + (Prims.of_int (47)) + (Prims.of_int (17)) + (Prims.of_int (47)) + (Prims.of_int (32))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (49)) - (Prims.of_int (38)) - (Prims.of_int (86)) - (Prims.of_int (10))))) + (Prims.of_int (47)) + (Prims.of_int (35)) + (Prims.of_int (87)) + (Prims.of_int (63))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___3 -> @@ -302,18 +303,18 @@ let (check_withlocal : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (50)) - (Prims.of_int (26)) - (Prims.of_int (50)) - (Prims.of_int (79))))) + (Prims.of_int (48)) + (Prims.of_int (23)) + (Prims.of_int (48)) + (Prims.of_int (76))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (50)) - (Prims.of_int (82)) - (Prims.of_int (86)) - (Prims.of_int (10))))) + (Prims.of_int (48)) + (Prims.of_int (79)) + (Prims.of_int (87)) + (Prims.of_int (63))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___3 -> @@ -333,18 +334,18 @@ let (check_withlocal : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (51)) - (Prims.of_int (24)) - (Prims.of_int (51)) - (Prims.of_int (68))))) + (Prims.of_int (49)) + (Prims.of_int (21)) + (Prims.of_int (49)) + (Prims.of_int (65))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (51)) - (Prims.of_int (71)) - (Prims.of_int (86)) - (Prims.of_int (10))))) + (Prims.of_int (49)) + (Prims.of_int (68)) + (Prims.of_int (87)) + (Prims.of_int (63))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___3 -> @@ -364,18 +365,18 @@ let (check_withlocal : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (52)) - (Prims.of_int (31)) - (Prims.of_int (52)) - (Prims.of_int (77))))) + (Prims.of_int (50)) + (Prims.of_int (28)) + (Prims.of_int (50)) + (Prims.of_int (74))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (52)) - (Prims.of_int (80)) - (Prims.of_int (86)) - (Prims.of_int (10))))) + (Prims.of_int (50)) + (Prims.of_int (77)) + (Prims.of_int (87)) + (Prims.of_int (63))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___3 -> @@ -391,18 +392,18 @@ let (check_withlocal : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (57)) - (Prims.of_int (13)) - (Prims.of_int (59)) - (Prims.of_int (108))))) + (Prims.of_int (54)) + (Prims.of_int (8)) + (Prims.of_int (56)) + (Prims.of_int (103))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (61)) - (Prims.of_int (9)) - (Prims.of_int (86)) - (Prims.of_int (10))))) + (Prims.of_int (58)) + (Prims.of_int (6)) + (Prims.of_int (87)) + (Prims.of_int (63))))) (match post_hint with | @@ -437,7 +438,7 @@ let (check_withlocal : (Pulse_Typing_Env.fail g1 FStar_Pervasives_Native.None - "Unexpected name clash in with_local") + "Impossible! check_withlocal: unexpected name clash in with_local,please file a bug-report") else Obj.magic (FStar_Tactics_Effect.tac_bind @@ -445,18 +446,18 @@ let (check_withlocal : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (64)) - (Prims.of_int (27)) - (Prims.of_int (64)) - (Prims.of_int (69))))) + (Prims.of_int (62)) + (Prims.of_int (24)) + (Prims.of_int (62)) + (Prims.of_int (66))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (64)) - (Prims.of_int (72)) - (Prims.of_int (85)) - (Prims.of_int (29))))) + (Prims.of_int (62)) + (Prims.of_int (69)) + (Prims.of_int (87)) + (Prims.of_int (63))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___4 -> @@ -474,28 +475,57 @@ let (check_withlocal : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" + (Prims.of_int (63)) + (Prims.of_int (52)) (Prims.of_int (66)) - (Prims.of_int (13)) - (Prims.of_int (66)) - (Prims.of_int (109))))) + (Prims.of_int (55))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (64)) - (Prims.of_int (72)) - (Prims.of_int (85)) - (Prims.of_int (29))))) + (Prims.of_int (62)) + (Prims.of_int (69)) + (Prims.of_int (87)) + (Prims.of_int (63))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.WithLocal.fst" + (Prims.of_int (65)) + (Prims.of_int (12)) + (Prims.of_int (65)) + (Prims.of_int (117))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.WithLocal.fst" + (Prims.of_int (66)) + (Prims.of_int (10)) + (Prims.of_int (66)) + (Prims.of_int (55))))) (Obj.magic - (check' - allow_inst + (check1 g_extended - (Pulse_Syntax_Naming.open_st_term_nv - body px) body_pre () (FStar_Pervasives_Native.Some - body_post))) + body_post) + binder.Pulse_Syntax_Base.binder_ppname + (Pulse_Syntax_Naming.open_st_term_nv + body px))) + (fun + uu___4 -> + (fun r -> + Obj.magic + (Pulse_Checker_Base.apply_checker_result_k + g_extended + body_pre + body_post + r + binder.Pulse_Syntax_Base.binder_ppname)) + uu___4))) (fun uu___4 -> (fun @@ -514,11 +544,65 @@ let (check_withlocal : c_body) then Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.WithLocal.fst" + (Prims.of_int (72)) + (Prims.of_int (15)) + (Prims.of_int (73)) + (Prims.of_int (44))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.WithLocal.fst" + (Prims.of_int (71)) + (Prims.of_int (13)) + (Prims.of_int (73)) + (Prims.of_int (44))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.WithLocal.fst" + (Prims.of_int (73)) + (Prims.of_int (18)) + (Prims.of_int (73)) + (Prims.of_int (43))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (Pulse_Syntax_Printer.comp_to_string + c_body)) + (fun + uu___5 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___6 -> + Prims.strcat + "check_withlocal: body computation type " + (Prims.strcat + uu___5 + " is not ST"))))) + (fun + uu___5 -> + (fun + uu___5 -> + Obj.magic (Pulse_Typing_Env.fail g1 (FStar_Pervasives_Native.Some (body.Pulse_Syntax_Base.range2)) - "withlocal: body is not stt or postcondition mismatch") + uu___5)) + uu___5)) else Obj.magic (FStar_Tactics_Effect.tac_bind @@ -526,18 +610,18 @@ let (check_withlocal : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (72)) - (Prims.of_int (27)) - (Prims.of_int (72)) - (Prims.of_int (54))))) + (Prims.of_int (75)) + (Prims.of_int (21)) + (Prims.of_int (75)) + (Prims.of_int (48))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (73)) - (Prims.of_int (85)) - (Prims.of_int (85)) - (Prims.of_int (29))))) + (Prims.of_int (76)) + (Prims.of_int (79)) + (Prims.of_int (87)) + (Prims.of_int (63))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___6 -> @@ -554,18 +638,18 @@ let (check_withlocal : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (74)) - (Prims.of_int (24)) - (Prims.of_int (74)) - (Prims.of_int (85))))) + (Prims.of_int (77)) + (Prims.of_int (18)) + (Prims.of_int (77)) + (Prims.of_int (79))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (74)) - (Prims.of_int (88)) - (Prims.of_int (85)) - (Prims.of_int (29))))) + (Prims.of_int (77)) + (Prims.of_int (82)) + (Prims.of_int (87)) + (Prims.of_int (63))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___6 -> @@ -594,36 +678,36 @@ let (check_withlocal : (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (75)) - (Prims.of_int (30)) - (Prims.of_int (77)) - (Prims.of_int (108))))) + (Prims.of_int (78)) + (Prims.of_int (24)) + (Prims.of_int (80)) + (Prims.of_int (100))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (85)) - (Prims.of_int (16)) - (Prims.of_int (85)) - (Prims.of_int (29))))) + (Prims.of_int (81)) + (Prims.of_int (12)) + (Prims.of_int (87)) + (Prims.of_int (63))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (76)) - (Prims.of_int (42)) - (Prims.of_int (76)) - (Prims.of_int (67))))) + (Prims.of_int (79)) + (Prims.of_int (34)) + (Prims.of_int (79)) + (Prims.of_int (59))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Checker.WithLocal.fst" - (Prims.of_int (77)) - (Prims.of_int (20)) - (Prims.of_int (77)) - (Prims.of_int (108))))) + (Prims.of_int (80)) + (Prims.of_int (12)) + (Prims.of_int (80)) + (Prims.of_int (100))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___6 -> @@ -635,17 +719,53 @@ let (check_withlocal : post_typing_rec -> Obj.magic - (Pulse_Checker_Common.intro_comp_typing + (Pulse_Checker_Base.intro_comp_typing g1 c () () x ())) uu___6))) (fun + uu___6 -> + (fun c_typing -> - FStar_Tactics_Effect.lift_div_tac + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.WithLocal.fst" + (Prims.of_int (82)) + (Prims.of_int (18)) + (Prims.of_int (86)) + (Prims.of_int (23))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.WithLocal.fst" + (Prims.of_int (87)) + (Prims.of_int (10)) + (Prims.of_int (87)) + (Prims.of_int (63))))) + (FStar_Tactics_Effect.lift_div_tac (fun uu___6 -> - FStar_Pervasives.Mkdtuple3 + Pulse_Typing.T_WithLocal + (g1, + init1, + body1, + init_t, + c, x, (), + (), + c_typing, + body_typing))) + (fun + uu___6 -> + (fun d -> + Obj.magic + (Pulse_Checker_Base.checker_result_for_st_typing + g pre + post_hint + (FStar_Pervasives.Mkdtuple3 ((Pulse_Typing.wr (Pulse_Syntax_Base.Tm_WithLocal { @@ -659,15 +779,10 @@ let (check_withlocal : Pulse_Syntax_Base.body4 = body1 })), c, - (Pulse_Typing.T_WithLocal - (g1, - init1, - body1, - init_t, - c, x, (), - (), - c_typing, - body_typing))))))) + d)) + res_ppname)) + uu___6))) + uu___6))) uu___6))) uu___6))) uu___4))) @@ -681,9 +796,94 @@ let (check_withlocal : uu___2)) else Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.WithLocal.fst" + (Prims.of_int (90)) + (Prims.of_int (9)) + (Prims.of_int (92)) + (Prims.of_int (38))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.WithLocal.fst" + (Prims.of_int (89)) + (Prims.of_int (7)) + (Prims.of_int (92)) + (Prims.of_int (38))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.WithLocal.fst" + (Prims.of_int (90)) + (Prims.of_int (9)) + (Prims.of_int (92)) + (Prims.of_int (38))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.WithLocal.fst" + (Prims.of_int (90)) + (Prims.of_int (9)) + (Prims.of_int (92)) + (Prims.of_int (38))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Checker.WithLocal.fst" + (Prims.of_int (91)) + (Prims.of_int (12)) + (Prims.of_int (91)) + (Prims.of_int (35))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (Pulse_Syntax_Printer.term_to_string + init1)) + (fun + uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + fun x -> + Prims.strcat + (Prims.strcat + "check_withlocal: allocating a local variable: type " + (Prims.strcat + uu___3 + " is not universe zero (computed ")) + (Prims.strcat + x ")"))))) + (fun + uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___4 -> + uu___3 + (Pulse_Syntax_Printer.univ_to_string + init_u))))) + (fun + uu___3 -> + (fun + uu___3 -> + Obj.magic (Pulse_Typing_Env.fail g1 - FStar_Pervasives_Native.None - "Allocating a local variable: init type is not universe zero")) + (FStar_Pervasives_Native.Some + (t.Pulse_Syntax_Base.range2)) + uu___3)) + uu___3))) uu___1))) uu___))) uu___))) uu___) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Main.ml b/src/ocaml/plugin/generated/Pulse_Main.ml index 8de1f88f1..38df4ad69 100644 --- a/src/ocaml/plugin/generated/Pulse_Main.ml +++ b/src/ocaml/plugin/generated/Pulse_Main.ml @@ -32,7 +32,7 @@ let (main' : (Obj.magic (FStar_Range.mk_range "Pulse.Main.fst" (Prims.of_int (25)) (Prims.of_int (8)) - (Prims.of_int (34)) (Prims.of_int (81))))) + (Prims.of_int (41)) (Prims.of_int (81))))) (if Pulse_RuntimeUtils.debug_at_level (Pulse_Typing_Env.fstar_env g1) "Pulse" @@ -112,7 +112,7 @@ let (main' : "Pulse.Main.fst" (Prims.of_int (25)) (Prims.of_int (8)) - (Prims.of_int (34)) + (Prims.of_int (41)) (Prims.of_int (81))))) (Obj.magic (Pulse_Checker_Pure.check_term g1 @@ -140,54 +140,122 @@ let (main' : (Obj.magic (FStar_Range.mk_range "Pulse.Main.fst" - (Prims.of_int (28)) - (Prims.of_int (71)) - (Prims.of_int (33)) - (Prims.of_int (27))))) + (Prims.of_int (29)) + (Prims.of_int (11)) + (Prims.of_int (40)) + (Prims.of_int (75))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___2 -> ())) (fun uu___2 -> (fun pre_typing1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal + match t.Pulse_Syntax_Base.term1 + with + | Pulse_Syntax_Base.Tm_Abs + uu___2 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Main.fst" - (Prims.of_int (29)) - (Prims.of_int (38)) - (Prims.of_int (29)) - (Prims.of_int (67))))) - (FStar_Sealed.seal + (Prims.of_int (31)) + (Prims.of_int (40)) + (Prims.of_int (31)) + (Prims.of_int (91))))) + (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Main.fst" - (Prims.of_int (28)) - (Prims.of_int (71)) - (Prims.of_int (33)) - (Prims.of_int (27))))) - (Obj.magic - (Pulse_Checker.check - g1 t pre1 - () - FStar_Pervasives_Native.None)) - (fun uu___2 - -> - FStar_Tactics_Effect.lift_div_tac + (Prims.of_int (30)) + (Prims.of_int (24)) + (Prims.of_int (39)) + (Prims.of_int (29))))) + (Obj.magic + (Pulse_Checker_Abs.check_abs + g1 t + Pulse_Checker.check)) + (fun + uu___3 -> (fun uu___3 -> - match uu___2 + match uu___3 with | FStar_Pervasives.Mkdtuple3 (t1, c, t_typing) -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Main.fst" + (Prims.of_int (33)) + (Prims.of_int (13)) + (Prims.of_int (35)) + (Prims.of_int (49))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Main.fst" + (Prims.of_int (39)) + (Prims.of_int (13)) + (Prims.of_int (39)) + (Prims.of_int (29))))) + (Obj.magic + (Pulse_Checker_Prover_Util.debug_prover + g1 + (fun + uu___4 -> + FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Main.fst" + (Prims.of_int (35)) + (Prims.of_int (25)) + (Prims.of_int (35)) + (Prims.of_int (48))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "prims.fst" + (Prims.of_int (590)) + (Prims.of_int (19)) + (Prims.of_int (590)) + (Prims.of_int (31))))) + (Obj.magic + (Pulse_Syntax_Printer.st_term_to_string + t1)) + (fun + uu___5 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___6 -> + Prims.strcat + "\ncheck call returned in main with:\n" + (Prims.strcat + uu___5 + "\n")))))) + (fun + uu___4 -> + FStar_Tactics_Effect.lift_div_tac + (fun + uu___5 -> ((Pulse_Elaborate_Core.elab_st_typing g1 t1 c t_typing), (Pulse_Elaborate_Pure.elab_comp c)))))) + uu___3)) + | uu___2 -> + Obj.magic + (Pulse_Typing_Env.fail + g1 + (FStar_Pervasives_Native.Some + (t.Pulse_Syntax_Base.range2)) + "main: top-level term not a Tm_Abs")) uu___2)) else Obj.magic @@ -219,13 +287,13 @@ let (check_pulse : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Main.fst" - (Prims.of_int (46)) (Prims.of_int (12)) - (Prims.of_int (46)) (Prims.of_int (97))))) + (Prims.of_int (53)) (Prims.of_int (12)) + (Prims.of_int (53)) (Prims.of_int (97))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Main.fst" - (Prims.of_int (46)) (Prims.of_int (6)) - (Prims.of_int (52)) (Prims.of_int (22))))) + (Prims.of_int (53)) (Prims.of_int (6)) + (Prims.of_int (59)) (Prims.of_int (22))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> Pulse_ASTBuilder.parse_pulse env namespaces @@ -242,16 +310,16 @@ let (check_pulse : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Main.fst" - (Prims.of_int (50)) + (Prims.of_int (57)) (Prims.of_int (15)) - (Prims.of_int (52)) + (Prims.of_int (59)) (Prims.of_int (22))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Main.fst" - (Prims.of_int (50)) + (Prims.of_int (57)) (Prims.of_int (8)) - (Prims.of_int (52)) + (Prims.of_int (59)) (Prims.of_int (22))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -259,17 +327,17 @@ let (check_pulse : (Obj.magic (FStar_Range.mk_range "Pulse.Main.fst" - (Prims.of_int (50)) + (Prims.of_int (57)) (Prims.of_int (15)) - (Prims.of_int (52)) + (Prims.of_int (59)) (Prims.of_int (22))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Main.fst" - (Prims.of_int (50)) + (Prims.of_int (57)) (Prims.of_int (15)) - (Prims.of_int (52)) + (Prims.of_int (59)) (Prims.of_int (22))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -277,9 +345,9 @@ let (check_pulse : (Obj.magic (FStar_Range.mk_range "Pulse.Main.fst" - (Prims.of_int (51)) + (Prims.of_int (58)) (Prims.of_int (18)) - (Prims.of_int (51)) + (Prims.of_int (58)) (Prims.of_int (43))))) (FStar_Sealed.seal (Obj.magic diff --git a/src/ocaml/plugin/generated/Pulse_Prover.ml b/src/ocaml/plugin/generated/Pulse_Prover.ml deleted file mode 100644 index 077d0801b..000000000 --- a/src/ocaml/plugin/generated/Pulse_Prover.ml +++ /dev/null @@ -1,788 +0,0 @@ -open Prims -let (unsolved_equiv_pst : - Pulse_Prover_Common.preamble -> - unit Pulse_Prover_Common.prover_state -> - Pulse_Syntax_Base.vprop Prims.list -> - unit -> unit Pulse_Prover_Common.prover_state) - = - fun preamble -> - fun pst -> - fun unsolved' -> - fun d -> - { - Pulse_Prover_Common.pg = (pst.Pulse_Prover_Common.pg); - Pulse_Prover_Common.remaining_ctxt = - (pst.Pulse_Prover_Common.remaining_ctxt); - Pulse_Prover_Common.remaining_ctxt_frame_typing = (); - Pulse_Prover_Common.uvs = (pst.Pulse_Prover_Common.uvs); - Pulse_Prover_Common.ss = (pst.Pulse_Prover_Common.ss); - Pulse_Prover_Common.solved = (pst.Pulse_Prover_Common.solved); - Pulse_Prover_Common.unsolved = unsolved'; - Pulse_Prover_Common.k = (pst.Pulse_Prover_Common.k); - Pulse_Prover_Common.goals_inv = (); - Pulse_Prover_Common.solved_inv = () - } -let (remaining_ctxt_equiv_pst : - Pulse_Prover_Common.preamble -> - unit Pulse_Prover_Common.prover_state -> - Pulse_Syntax_Base.vprop Prims.list -> - unit -> unit Pulse_Prover_Common.prover_state) - = - fun preamble -> - fun pst -> - fun remaining_ctxt' -> - fun d -> - { - Pulse_Prover_Common.pg = (pst.Pulse_Prover_Common.pg); - Pulse_Prover_Common.remaining_ctxt = remaining_ctxt'; - Pulse_Prover_Common.remaining_ctxt_frame_typing = (); - Pulse_Prover_Common.uvs = (pst.Pulse_Prover_Common.uvs); - Pulse_Prover_Common.ss = (pst.Pulse_Prover_Common.ss); - Pulse_Prover_Common.solved = (pst.Pulse_Prover_Common.solved); - Pulse_Prover_Common.unsolved = (pst.Pulse_Prover_Common.unsolved); - Pulse_Prover_Common.k = - (Pulse_Prover_Common.k_elab_equiv - preamble.Pulse_Prover_Common.g0 - (Pulse_Prover_Common.__proj__Mkprover_state__item__pg - preamble pst) - (Pulse_Prover_Common.op_Star - preamble.Pulse_Prover_Common.ctxt - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star - preamble.Pulse_Prover_Common.ctxt - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - (Pulse_Prover_Common.__proj__Mkprover_state__item__remaining_ctxt - preamble pst)) - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - (Pulse_Prover_Common.__proj__Mkprover_state__item__ss - preamble pst) - (Pulse_Prover_Common.__proj__Mkprover_state__item__solved - preamble pst))) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - remaining_ctxt') preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst.Pulse_Prover_Common.ss - pst.Pulse_Prover_Common.solved)) - pst.Pulse_Prover_Common.k () ()); - Pulse_Prover_Common.goals_inv = (); - Pulse_Prover_Common.solved_inv = () - } -let rec (collect_exists : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.vprop Prims.list -> - (Pulse_Syntax_Base.vprop Prims.list, - Pulse_Syntax_Base.vprop Prims.list, unit) FStar_Pervasives.dtuple3) - = - fun g -> - fun l -> - match l with - | [] -> FStar_Pervasives.Mkdtuple3 ([], [], ()) - | hd::tl -> - let uu___ = collect_exists g tl in - (match uu___ with - | FStar_Pervasives.Mkdtuple3 (exs, rest, uu___1) -> - (match hd.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_ExistsSL (uu___2, uu___3, uu___4) -> - FStar_Pervasives.Mkdtuple3 ((hd :: exs), rest, ()) - | uu___2 -> - FStar_Pervasives.Mkdtuple3 (exs, (hd :: rest), ()))) -let rec (collect_pures : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.vprop Prims.list -> - (Pulse_Syntax_Base.vprop Prims.list, - Pulse_Syntax_Base.vprop Prims.list, unit) FStar_Pervasives.dtuple3) - = - fun g -> - fun l -> - match l with - | [] -> FStar_Pervasives.Mkdtuple3 ([], [], ()) - | hd::tl -> - let uu___ = collect_pures g tl in - (match uu___ with - | FStar_Pervasives.Mkdtuple3 (pures, rest, uu___1) -> - (match hd.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_Pure uu___2 -> - FStar_Pervasives.Mkdtuple3 ((hd :: pures), rest, ()) - | uu___2 -> - FStar_Pervasives.Mkdtuple3 (pures, (hd :: rest), ()))) -let rec (match_q : - Pulse_Prover_Common.preamble -> - unit Pulse_Prover_Common.prover_state -> - Pulse_Syntax_Base.vprop -> - Pulse_Syntax_Base.vprop Prims.list -> - unit -> - Prims.nat -> - (unit Pulse_Prover_Common.prover_state - FStar_Pervasives_Native.option, - unit) FStar_Tactics_Effect.tac_repr) - = - fun uu___5 -> - fun uu___4 -> - fun uu___3 -> - fun uu___2 -> - fun uu___1 -> - fun uu___ -> - (fun preamble -> - fun pst -> - fun q -> - fun unsolved' -> - fun uu___ -> - fun i -> - if - (FStar_List_Tot_Base.length - pst.Pulse_Prover_Common.remaining_ctxt) - = Prims.int_zero - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - FStar_Pervasives_Native.None))) - else - Obj.magic - (Obj.repr - (if - i = - (FStar_List_Tot_Base.length - pst.Pulse_Prover_Common.remaining_ctxt) - then - Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - FStar_Pervasives_Native.None)) - else - Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (75)) - (Prims.of_int (12)) - (Prims.of_int (75)) - (Prims.of_int (35))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (75)) - (Prims.of_int (38)) - (Prims.of_int (84)) - (Prims.of_int (38))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - FStar_List_Tot_Base.hd - pst.Pulse_Prover_Common.remaining_ctxt)) - (fun uu___3 -> - (fun p -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (77)) - (Prims.of_int (6)) - (Prims.of_int (77)) - (Prims.of_int (69))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (78)) - (Prims.of_int (4)) - (Prims.of_int (84)) - (Prims.of_int (38))))) - (Obj.magic - (Pulse_Prover_Match.match_step - preamble pst p - (FStar_List_Tot_Base.tl - pst.Pulse_Prover_Common.remaining_ctxt) - q unsolved' ())) - (fun uu___3 -> - (fun pst_opt -> - match pst_opt with - | FStar_Pervasives_Native.Some - pst1 -> - Obj.magic - (Obj.repr - ( - FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - FStar_Pervasives_Native.Some - pst1))) - | FStar_Pervasives_Native.None - -> - Obj.magic - (Obj.repr - ( - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (82)) - (Prims.of_int (8)) - (Prims.of_int (83)) - (Prims.of_int (49))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (84)) - (Prims.of_int (6)) - (Prims.of_int (84)) - (Prims.of_int (38))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - remaining_ctxt_equiv_pst - preamble - pst - (FStar_List_Tot_Base.op_At - (FStar_List_Tot_Base.tl - pst.Pulse_Prover_Common.remaining_ctxt) - [ - FStar_List_Tot_Base.hd - pst.Pulse_Prover_Common.remaining_ctxt]) - ())) - (fun - uu___3 -> - (fun pst1 - -> - Obj.magic - (match_q - preamble - pst1 q - unsolved' - () - (i + - Prims.int_one))) - uu___3)))) - uu___3))) uu___3))))) - uu___5 uu___4 uu___3 uu___2 uu___1 uu___ -let rec (prover : - Pulse_Prover_Common.preamble -> - unit Pulse_Prover_Common.prover_state -> - (unit Pulse_Prover_Common.prover_state, unit) - FStar_Tactics_Effect.tac_repr) - = - fun uu___1 -> - fun uu___ -> - (fun preamble -> - fun pst0 -> - match pst0.Pulse_Prover_Common.unsolved with - | [] -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> pst0))) - | uu___ -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.fst" - (Prims.of_int (95)) (Prims.of_int (14)) - (Prims.of_int (95)) (Prims.of_int (45))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.fst" - (Prims.of_int (95)) (Prims.of_int (48)) - (Prims.of_int (113)) (Prims.of_int (32))))) - (Obj.magic - (Pulse_Prover_ElimExists.elim_exists_pst preamble - pst0)) - (fun uu___1 -> - (fun pst -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (96)) - (Prims.of_int (14)) - (Prims.of_int (96)) - (Prims.of_int (40))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (96)) - (Prims.of_int (43)) - (Prims.of_int (113)) - (Prims.of_int (32))))) - (Obj.magic - (Pulse_Prover_ElimPure.elim_pure_pst - preamble pst)) - (fun uu___1 -> - (fun pst1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (98)) - (Prims.of_int (29)) - (Prims.of_int (98)) - (Prims.of_int (82))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (96)) - (Prims.of_int (43)) - (Prims.of_int (113)) - (Prims.of_int (32))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - collect_exists - (Pulse_Typing_Env.push_env - pst1.Pulse_Prover_Common.pg - pst1.Pulse_Prover_Common.uvs) - pst1.Pulse_Prover_Common.unsolved)) - (fun uu___1 -> - (fun uu___1 -> - match uu___1 with - | FStar_Pervasives.Mkdtuple3 - (exs, rest, d) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (99)) - (Prims.of_int (14)) - (Prims.of_int (99)) - (Prims.of_int (49))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (101)) - (Prims.of_int (4)) - (Prims.of_int (113)) - (Prims.of_int (32))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - unsolved_equiv_pst - preamble - pst1 - ( - FStar_List_Tot_Base.op_At - exs rest) - ())) - (fun uu___2 -> - (fun pst2 -> - match - pst2.Pulse_Prover_Common.unsolved - with - | { - Pulse_Syntax_Base.t - = - Pulse_Syntax_Base.Tm_ExistsSL - (u, b, - body); - Pulse_Syntax_Base.range1 - = uu___2;_}::unsolved' - -> - Obj.magic - (Pulse_Prover_IntroExists.intro_exists - preamble - pst2 u b - body - unsolved' - () prover) - | uu___2 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (105)) - (Prims.of_int (33)) - (Prims.of_int (105)) - (Prims.of_int (85))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (104)) - (Prims.of_int (10)) - (Prims.of_int (113)) - (Prims.of_int (32))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - collect_pures - (Pulse_Typing_Env.push_env - pst2.Pulse_Prover_Common.pg - pst2.Pulse_Prover_Common.uvs) - pst2.Pulse_Prover_Common.unsolved)) - (fun - uu___3 -> - (fun - uu___3 -> - match uu___3 - with - | - FStar_Pervasives.Mkdtuple3 - (pures, - rest1, - d1) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (106)) - (Prims.of_int (16)) - (Prims.of_int (106)) - (Prims.of_int (53))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (107)) - (Prims.of_int (6)) - (Prims.of_int (113)) - (Prims.of_int (32))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - unsolved_equiv_pst - preamble - pst2 - (FStar_List_Tot_Base.op_At - rest1 - pures) ())) - (fun - uu___4 -> - (fun pst3 - -> - match - pst3.Pulse_Prover_Common.unsolved - with - | - { - Pulse_Syntax_Base.t - = - Pulse_Syntax_Base.Tm_Pure - uu___4; - Pulse_Syntax_Base.range1 - = uu___5;_}::tl - -> - Obj.magic - (Pulse_Typing_Env.fail - pst3.Pulse_Prover_Common.pg - FStar_Pervasives_Native.None - "intro pure not implemented yet") - | - q::tl -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (110)) - (Prims.of_int (22)) - (Prims.of_int (110)) - (Prims.of_int (43))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (111)) - (Prims.of_int (8)) - (Prims.of_int (113)) - (Prims.of_int (32))))) - (Obj.magic - (match_q - preamble - pst3 q tl - () - Prims.int_zero)) - (fun - uu___4 -> - (fun - pst_opt - -> - match pst_opt - with - | - FStar_Pervasives_Native.None - -> - Obj.magic - (Pulse_Typing_Env.fail - pst3.Pulse_Prover_Common.pg - FStar_Pervasives_Native.None - "cannot match a vprop") - | - FStar_Pervasives_Native.Some - pst4 -> - Obj.magic - (prover - preamble - pst4)) - uu___4))) - uu___4))) - uu___3))) - uu___2))) - uu___1))) uu___1))) uu___1)))) - uu___1 uu___ -let (prove : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.vprop -> - unit -> - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.vprop -> - unit -> - ((Pulse_Typing_Env.env, Pulse_Typing_Env.env, - Pulse_Prover_Substs.nt_substs, Pulse_Syntax_Base.vprop, - (unit, unit, unit, unit) - Pulse_Prover_Common.continuation_elaborator) - FStar_Pervasives.dtuple5, - unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun ctxt -> - fun ctxt_typing -> - fun uvs -> - fun goals -> - fun goals_typing -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.fst" - (Prims.of_int (127)) (Prims.of_int (59)) - (Prims.of_int (127)) (Prims.of_int (67))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.fst" - (Prims.of_int (127)) (Prims.of_int (70)) - (Prims.of_int (162)) (Prims.of_int (100))))) - (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> ())) - (fun uu___ -> - (fun ctxt_frame_typing -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.fst" - (Prims.of_int (129)) (Prims.of_int (4)) - (Prims.of_int (133)) (Prims.of_int (10))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.fst" - (Prims.of_int (136)) (Prims.of_int (41)) - (Prims.of_int (162)) (Prims.of_int (100))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - { - Pulse_Prover_Common.g0 = g; - Pulse_Prover_Common.ctxt = ctxt; - Pulse_Prover_Common.frame = - Pulse_Syntax_Base.tm_emp; - Pulse_Prover_Common.ctxt_frame_typing = (); - Pulse_Prover_Common.goals = goals - })) - (fun uu___ -> - (fun preamble -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (138)) - (Prims.of_int (4)) - (Prims.of_int (147)) - (Prims.of_int (19))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (148)) - (Prims.of_int (6)) - (Prims.of_int (162)) - (Prims.of_int (100))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - { - Pulse_Prover_Common.pg = g; - Pulse_Prover_Common.remaining_ctxt - = - (Pulse_Checker_VPropEquiv.vprop_as_list - ctxt); - Pulse_Prover_Common.remaining_ctxt_frame_typing - = (); - Pulse_Prover_Common.uvs = uvs; - Pulse_Prover_Common.ss = - Pulse_Prover_Substs.empty; - Pulse_Prover_Common.solved = - Pulse_Syntax_Base.tm_emp; - Pulse_Prover_Common.unsolved = - (Pulse_Checker_VPropEquiv.vprop_as_list - goals); - Pulse_Prover_Common.k = - (Pulse_Prover_Common.k_elab_equiv - g g ctxt - (Pulse_Prover_Common.op_Star - preamble.Pulse_Prover_Common.ctxt - preamble.Pulse_Prover_Common.frame) - ctxt - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - (Pulse_Checker_VPropEquiv.vprop_as_list - ctxt)) - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - Pulse_Prover_Substs.empty - Pulse_Syntax_Base.tm_emp)) - (Pulse_Prover_Common.k_elab_unit - g ctxt) () ()); - Pulse_Prover_Common.goals_inv = - (); - Pulse_Prover_Common.solved_inv - = () - })) - (fun uu___ -> - (fun pst -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (149)) - (Prims.of_int (12)) - (Prims.of_int (149)) - (Prims.of_int (22))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (149)) - (Prims.of_int (25)) - (Prims.of_int (162)) - (Prims.of_int (100))))) - (Obj.magic - (prover preamble pst)) - (fun uu___ -> - (fun pst1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (150)) - (Prims.of_int (13)) - (Prims.of_int (150)) - (Prims.of_int (53))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (151)) - (Prims.of_int (2)) - (Prims.of_int (162)) - (Prims.of_int (100))))) - (Obj.magic - (Pulse_Prover_Substs.ss_to_nt_substs - pst1.Pulse_Prover_Common.pg - pst1.Pulse_Prover_Common.uvs - pst1.Pulse_Prover_Common.ss)) - (fun uu___ -> - (fun ropt -> - Obj.magic - ( - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (151)) - (Prims.of_int (2)) - (Prims.of_int (151)) - (Prims.of_int (64))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.fst" - (Prims.of_int (151)) - (Prims.of_int (65)) - (Prims.of_int (162)) - (Prims.of_int (100))))) - (if - FStar_Pervasives_Native.uu___is_None - ropt - then - Obj.magic - (Obj.repr - (Pulse_Typing_Env.fail - pst1.Pulse_Prover_Common.pg - FStar_Pervasives_Native.None - "prove: ss not well-typed")) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___1 -> - ())))) - (fun - uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___1 -> - match ropt - with - | - FStar_Pervasives_Native.Some - nts -> - FStar_Pervasives.Mkdtuple5 - ((pst1.Pulse_Prover_Common.pg), - (pst1.Pulse_Prover_Common.uvs), - nts, - (Pulse_Checker_VPropEquiv.list_as_vprop - pst1.Pulse_Prover_Common.remaining_ctxt), - (Pulse_Prover_Common.k_elab_equiv - g - pst1.Pulse_Prover_Common.pg - (Pulse_Prover_Common.op_Star - ctxt - Pulse_Syntax_Base.tm_emp) - ctxt - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst1.Pulse_Prover_Common.remaining_ctxt) - Pulse_Syntax_Base.tm_emp) - (Pulse_Prover_Substs.nt_subst_term - pst1.Pulse_Prover_Common.solved - nts)) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Substs.nt_subst_term - goals nts) - (Pulse_Checker_VPropEquiv.list_as_vprop - pst1.Pulse_Prover_Common.remaining_ctxt)) - pst1.Pulse_Prover_Common.k - () ())))))) - uu___))) - uu___))) uu___))) uu___))) - uu___) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Prover_Common.ml b/src/ocaml/plugin/generated/Pulse_Prover_Common.ml deleted file mode 100644 index f4abe6eb1..000000000 --- a/src/ocaml/plugin/generated/Pulse_Prover_Common.ml +++ /dev/null @@ -1,1696 +0,0 @@ -open Prims -type ('g, 't) vprop_typing = unit -type ('g, 'ctxt, 'gu, 'ctxtu) continuation_elaborator = - unit Pulse_Typing.post_hint_opt -> - (unit, unit, unit) Pulse_Checker_Common.checker_result_t -> - ((unit, unit, unit) Pulse_Checker_Common.checker_result_t, unit) - FStar_Tactics_Effect.tac_repr -let (k_elab_unit : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - (unit, unit, unit, unit) continuation_elaborator) - = - fun uu___1 -> - fun uu___ -> - (fun g -> - fun ctxt -> - fun p -> - fun r -> - Obj.magic (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> r))) - uu___1 uu___ -let (k_elab_trans : - Pulse_Typing_Env.env -> - Pulse_Typing_Env.env -> - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - (unit, unit, unit, unit) continuation_elaborator -> - (unit, unit, unit, unit) continuation_elaborator -> - (unit, unit, unit, unit) continuation_elaborator) - = - fun g0 -> - fun g1 -> - fun g2 -> - fun ctxt0 -> - fun ctxt1 -> - fun ctxt2 -> - fun k0 -> - fun k1 -> - fun post_hint -> - fun res -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Common.fst" - (Prims.of_int (26)) (Prims.of_int (39)) - (Prims.of_int (26)) (Prims.of_int (57))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Common.fst" - (Prims.of_int (26)) (Prims.of_int (26)) - (Prims.of_int (26)) (Prims.of_int (57))))) - (Obj.magic (k1 post_hint res)) - (fun uu___ -> - (fun uu___ -> Obj.magic (k0 post_hint uu___)) - uu___) -let (comp_st_with_post : - Pulse_Syntax_Base.comp_st -> - Pulse_Syntax_Base.term -> Pulse_Syntax_Base.comp_st) - = - fun c -> - fun post -> - match c with - | Pulse_Syntax_Base.C_ST st -> - Pulse_Syntax_Base.C_ST - { - Pulse_Syntax_Base.u = (st.Pulse_Syntax_Base.u); - Pulse_Syntax_Base.res = (st.Pulse_Syntax_Base.res); - Pulse_Syntax_Base.pre = (st.Pulse_Syntax_Base.pre); - Pulse_Syntax_Base.post = post - } - | Pulse_Syntax_Base.C_STGhost (i, st) -> - Pulse_Syntax_Base.C_STGhost - (i, - { - Pulse_Syntax_Base.u = (st.Pulse_Syntax_Base.u); - Pulse_Syntax_Base.res = (st.Pulse_Syntax_Base.res); - Pulse_Syntax_Base.pre = (st.Pulse_Syntax_Base.pre); - Pulse_Syntax_Base.post = post - }) - | Pulse_Syntax_Base.C_STAtomic (i, st) -> - Pulse_Syntax_Base.C_STAtomic - (i, - { - Pulse_Syntax_Base.u = (st.Pulse_Syntax_Base.u); - Pulse_Syntax_Base.res = (st.Pulse_Syntax_Base.res); - Pulse_Syntax_Base.pre = (st.Pulse_Syntax_Base.pre); - Pulse_Syntax_Base.post = post - }) -let (st_equiv_post : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.comp_st -> - (unit, unit, unit) Pulse_Typing.st_typing -> - Pulse_Syntax_Base.term -> - unit -> (unit, unit, unit) Pulse_Typing.st_typing) - = - fun g -> - fun t -> - fun c -> - fun d -> - fun post -> - fun veq -> - let c' = comp_st_with_post c post in - let uu___ = - Pulse_Typing_Metatheory.st_comp_typing_inversion g - (Pulse_Syntax_Base.st_comp_of_comp c) - (Pulse_Typing_Metatheory.comp_typing_inversion g c - (Pulse_Typing_Metatheory.st_typing_correctness g t c d)) in - match uu___ with - | FStar_Pervasives.Mkdtuple4 (u_of, pre_typing, x, post_typing) - -> - let st_equiv = - Pulse_Typing.ST_VPropEquiv - (g, c, c', x, (), (), (), (), ()) in - Pulse_Typing.T_Equiv (g, t, c, c', d, st_equiv) -let (simplify_post : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.comp_st -> - (unit, unit, unit) Pulse_Typing.st_typing -> - Pulse_Syntax_Base.term -> (unit, unit, unit) Pulse_Typing.st_typing) - = - fun g -> - fun t -> fun c -> fun d -> fun post -> st_equiv_post g t c d post () -let (k_elab_equiv_continutation : - Pulse_Typing_Env.env -> - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - (unit, unit, unit, unit) continuation_elaborator -> - unit -> (unit, unit, unit, unit) continuation_elaborator) - = - fun g1 -> - fun g2 -> - fun ctxt -> - fun ctxt1 -> - fun ctxt2 -> - fun k -> - fun d -> - fun post_hint -> - fun res -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Common.fst" - (Prims.of_int (74)) (Prims.of_int (60)) - (Prims.of_int (77)) (Prims.of_int (33))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Common.fst" - (Prims.of_int (78)) (Prims.of_int (4)) - (Prims.of_int (88)) (Prims.of_int (34))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - FStar_Pervasives.Mkdtuple3 - (Pulse_Syntax_Base.tm_emp, (), ()))) - (fun uu___ -> - (fun framing_token -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (79)) - (Prims.of_int (26)) - (Prims.of_int (79)) - (Prims.of_int (29))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (78)) - (Prims.of_int (4)) - (Prims.of_int (88)) - (Prims.of_int (34))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> res)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | FStar_Pervasives.Mkdtuple3 - (st, c, st_d) -> - if - Prims.op_Negation - (Pulse_Syntax_Base.stateful_comp - c) - then - Obj.magic - (k post_hint - (FStar_Pervasives.Mkdtuple3 - (st, c, st_d))) - else - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (83)) - (Prims.of_int (18)) - (Prims.of_int (83)) - (Prims.of_int (95))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (81)) - (Prims.of_int (6)) - (Prims.of_int (88)) - (Prims.of_int (34))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - Pulse_Typing_Metatheory.st_comp_typing_inversion - g2 - (Pulse_Syntax_Base.st_comp_of_comp - c) - (Pulse_Typing_Metatheory.comp_typing_inversion - g2 c - (Pulse_Typing_Metatheory.st_typing_correctness - g2 st c st_d)))) - (fun uu___2 -> - (fun uu___2 -> - match uu___2 with - | FStar_Pervasives.Mkdtuple4 - (uu___3, - pre_typing, - uu___4, uu___5) - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - ( - Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (85)) - (Prims.of_int (6)) - (Prims.of_int (85)) - (Prims.of_int (95))))) - (FStar_Sealed.seal - ( - Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (83)) - (Prims.of_int (99)) - (Prims.of_int (88)) - (Prims.of_int (34))))) - (FStar_Tactics_Effect.lift_div_tac - ( - fun - uu___6 -> - Pulse_Checker_Framing.apply_frame - g2 st - ctxt1 () - c st_d - framing_token)) - (fun uu___6 - -> - (fun - uu___6 -> - match uu___6 - with - | - Prims.Mkdtuple2 - (c', - st_d') -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (87)) - (Prims.of_int (16)) - (Prims.of_int (87)) - (Prims.of_int (49))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (88)) - (Prims.of_int (4)) - (Prims.of_int (88)) - (Prims.of_int (34))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___7 -> - simplify_post - g2 st c' - st_d' - (Pulse_Syntax_Base.comp_post - c))) - (fun - uu___7 -> - (fun - st_d'1 -> - Obj.magic - (k - post_hint - (FStar_Pervasives.Mkdtuple3 - (st, - (comp_st_with_post - c' - (Pulse_Syntax_Base.comp_post - c)), - st_d'1)))) - uu___7))) - uu___6))) - uu___2))) uu___))) - uu___) -let (k_elab_equiv_prefix : - Pulse_Typing_Env.env -> - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - (unit, unit, unit, unit) continuation_elaborator -> - unit -> (unit, unit, unit, unit) continuation_elaborator) - = - fun g1 -> - fun g2 -> - fun ctxt1 -> - fun ctxt2 -> - fun ctxt -> - fun k -> - fun d -> - fun post_hint -> - fun res -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Common.fst" - (Prims.of_int (97)) (Prims.of_int (60)) - (Prims.of_int (99)) (Prims.of_int (31))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Common.fst" - (Prims.of_int (100)) (Prims.of_int (4)) - (Prims.of_int (115)) (Prims.of_int (11))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - FStar_Pervasives.Mkdtuple3 - (Pulse_Syntax_Base.tm_emp, (), ()))) - (fun uu___ -> - (fun framing_token -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (101)) - (Prims.of_int (12)) - (Prims.of_int (101)) - (Prims.of_int (27))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (101)) - (Prims.of_int (30)) - (Prims.of_int (115)) - (Prims.of_int (11))))) - (Obj.magic (k post_hint res)) - (fun res1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - match res1 with - | FStar_Pervasives.Mkdtuple3 - (st, c, st_d) -> - if - Prims.op_Negation - (Pulse_Syntax_Base.stateful_comp - c) - then - FStar_Pervasives.Mkdtuple3 - (st, c, st_d) - else - (match Pulse_Typing_Metatheory.st_comp_typing_inversion - g1 - (Pulse_Syntax_Base.st_comp_of_comp - c) - (Pulse_Typing_Metatheory.comp_typing_inversion - g1 c - (Pulse_Typing_Metatheory.st_typing_correctness - g1 st c st_d)) - with - | FStar_Pervasives.Mkdtuple4 - (uu___2, pre_typing, - uu___3, uu___4) - -> - (match Pulse_Checker_Framing.apply_frame - g1 st ctxt2 () c - st_d - framing_token - with - | Prims.Mkdtuple2 - (c', st_d') -> - FStar_Pervasives.Mkdtuple3 - (st, - (comp_st_with_post - c' - (Pulse_Syntax_Base.comp_post - c)), - (simplify_post - g1 st c' - st_d' - (Pulse_Syntax_Base.comp_post - c))))))))) - uu___) -let (k_elab_equiv : - Pulse_Typing_Env.env -> - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - (unit, unit, unit, unit) continuation_elaborator -> - unit -> - unit -> (unit, unit, unit, unit) continuation_elaborator) - = - fun g1 -> - fun g2 -> - fun ctxt1 -> - fun ctxt1' -> - fun ctxt2 -> - fun ctxt2' -> - fun k -> - fun d1 -> - fun d2 -> - let k1 = - k_elab_equiv_continutation g1 g2 ctxt1 ctxt2 ctxt2' k - () in - let k2 = - k_elab_equiv_prefix g1 g2 ctxt1 ctxt1' ctxt2' k1 () in - k2 -let rec (list_as_vprop' : - Pulse_Syntax_Base.vprop -> - Pulse_Syntax_Base.vprop Prims.list -> Pulse_Syntax_Base.vprop) - = - fun vp -> - fun fvps -> - match fvps with - | [] -> vp - | hd::tl -> list_as_vprop' (Pulse_Syntax_Base.tm_star vp hd) tl -let rec (canon_right_aux : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.vprop Prims.list -> - (Pulse_Syntax_Base.vprop -> - (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) - -> - ((Pulse_Syntax_Base.vprop Prims.list, - Pulse_Syntax_Base.vprop Prims.list, unit) FStar_Pervasives.dtuple3, - unit) FStar_Tactics_Effect.tac_repr) - = - fun uu___2 -> - fun uu___1 -> - fun uu___ -> - (fun g -> - fun vps -> - fun f -> - match vps with - | [] -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - FStar_Pervasives.Mkdtuple3 ([], [], ())))) - | hd::rest -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (144)) (Prims.of_int (7)) - (Prims.of_int (144)) (Prims.of_int (11))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (144)) (Prims.of_int (4)) - (Prims.of_int (168)) (Prims.of_int (7))))) - (Obj.magic (f hd)) - (fun uu___ -> - (fun uu___ -> - if uu___ - then - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (146)) - (Prims.of_int (32)) - (Prims.of_int (146)) - (Prims.of_int (56))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (145)) - (Prims.of_int (14)) - (Prims.of_int (162)) - (Prims.of_int (34))))) - (Obj.magic (canon_right_aux g rest f)) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - match uu___1 with - | FStar_Pervasives.Mkdtuple3 - (vps', fvps, uu___3) -> - FStar_Pervasives.Mkdtuple3 - (vps', (hd :: fvps), - ())))) - else - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (165)) - (Prims.of_int (33)) - (Prims.of_int (165)) - (Prims.of_int (57))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (164)) - (Prims.of_int (14)) - (Prims.of_int (167)) - (Prims.of_int (33))))) - (Obj.magic (canon_right_aux g rest f)) - (fun uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - match uu___2 with - | FStar_Pervasives.Mkdtuple3 - (vps', pures, uu___4) -> - FStar_Pervasives.Mkdtuple3 - ((hd :: vps'), pures, - ()))))) uu___)))) - uu___2 uu___1 uu___ -let (canon_right : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - unit -> - (Pulse_Syntax_Base.vprop -> - (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) - -> - ((Pulse_Syntax_Base.term, unit, - (unit, unit, unit, unit) continuation_elaborator) - FStar_Pervasives.dtuple3, - unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun ctxt -> - fun frame -> - fun ctxt_frame_typing -> - fun f -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Common.fst" - (Prims.of_int (179)) (Prims.of_int (33)) - (Prims.of_int (179)) (Prims.of_int (73))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Common.fst" - (Prims.of_int (179)) (Prims.of_int (3)) - (Prims.of_int (184)) (Prims.of_int (110))))) - (Obj.magic - (canon_right_aux g - (Pulse_Checker_VPropEquiv.vprop_as_list ctxt) f)) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - match uu___ with - | FStar_Pervasives.Mkdtuple3 (vps', pures, veq) -> - FStar_Pervasives.Mkdtuple3 - ((list_as_vprop' - (Pulse_Checker_VPropEquiv.list_as_vprop vps') - pures), (), - (k_elab_equiv g g - (Pulse_Syntax_Base.tm_star ctxt frame) - (Pulse_Syntax_Base.tm_star ctxt frame) - (Pulse_Syntax_Base.tm_star ctxt frame) - (Pulse_Syntax_Base.tm_star - (list_as_vprop' - (Pulse_Checker_VPropEquiv.list_as_vprop - vps') pures) frame) - (k_elab_unit g - (Pulse_Syntax_Base.tm_star ctxt frame)) - () ())))) -let (continuation_elaborator_with_bind : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.comp -> - Pulse_Syntax_Base.st_term -> - (unit, unit, unit) Pulse_Typing.st_typing -> - unit -> - Pulse_Syntax_Base.var -> - ((unit, unit, unit, unit) continuation_elaborator, unit) - FStar_Tactics_Effect.tac_repr) - = - fun uu___6 -> - fun uu___5 -> - fun uu___4 -> - fun uu___3 -> - fun uu___2 -> - fun uu___1 -> - fun uu___ -> - (fun g -> - fun ctxt -> - fun c1 -> - fun e1 -> - fun e1_typing -> - fun ctxt_pre1_typing -> - fun x -> - Obj.magic - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - match Pulse_Checker_Framing.apply_frame - g e1 - (Pulse_Syntax_Base.tm_star - ctxt - (Pulse_Syntax_Base.comp_pre - c1)) () c1 e1_typing - (FStar_Pervasives.Mkdtuple3 - (ctxt, (), ())) - with - | Prims.Mkdtuple2 (c11, e1_typing1) -> - (match Pulse_Typing_Metatheory.st_comp_typing_inversion - g - (Pulse_Syntax_Base.st_comp_of_comp - c11) - (Pulse_Typing_Metatheory.comp_typing_inversion - g c11 - (Pulse_Typing_Metatheory.st_typing_correctness - g e1 c11 e1_typing1)) - with - | FStar_Pervasives.Mkdtuple4 - (u_of_1, pre_typing, uu___1, - uu___2) - -> - (fun post_hint -> - fun res -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (216)) - (Prims.of_int (34)) - (Prims.of_int (216)) - (Prims.of_int (37))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (215)) - (Prims.of_int (24)) - (Prims.of_int (248)) - (Prims.of_int (5))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> res)) - (fun uu___3 -> - (fun uu___3 -> - match uu___3 - with - | FStar_Pervasives.Mkdtuple3 - (e2, c2, - e2_typing) - -> - if - Prims.op_Negation - (Pulse_Syntax_Base.stateful_comp - c2) - then - Obj.magic - (Obj.repr - (FStar_Tactics_V1_Derived.fail - "Unexpected non-stateful comp in continuation elaborate")) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (220)) - (Prims.of_int (43)) - (Prims.of_int (220)) - (Prims.of_int (52))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (220)) - (Prims.of_int (55)) - (Prims.of_int (247)) - (Prims.of_int (7))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___5 -> - e2_typing)) - (fun - uu___5 -> - (fun - e2_typing1 - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (221)) - (Prims.of_int (22)) - (Prims.of_int (221)) - (Prims.of_int (40))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (232)) - (Prims.of_int (6)) - (Prims.of_int (247)) - (Prims.of_int (7))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___5 -> - Pulse_Syntax_Naming.close_st_term - e2 x)) - (fun - uu___5 -> - (fun - e2_closed - -> - if - FStar_Set.mem - x - (Pulse_Syntax_Naming.freevars - (Pulse_Syntax_Base.comp_post - c2)) - then - Obj.magic - (Obj.repr - (FStar_Tactics_V1_Derived.fail - "Impossible")) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (236)) - (Prims.of_int (10)) - (Prims.of_int (236)) - (Prims.of_int (69))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (234)) - (Prims.of_int (11)) - (Prims.of_int (247)) - (Prims.of_int (7))))) - (Obj.magic - (Pulse_Typing_Combinators.bind_res_and_post_typing - g - (Pulse_Syntax_Base.st_comp_of_comp - c2) x - post_hint)) - (fun - uu___6 -> - (fun - uu___6 -> - match uu___6 - with - | - (t_typing, - post_typing) - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (238)) - (Prims.of_int (10)) - (Prims.of_int (244)) - (Prims.of_int (23))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (236)) - (Prims.of_int (72)) - (Prims.of_int (246)) - (Prims.of_int (28))))) - (Obj.magic - (Pulse_Typing_Combinators.mk_bind - g - (Pulse_Syntax_Base.tm_star - ctxt - (Pulse_Syntax_Base.comp_pre - c1)) e1 - e2_closed - c11 c2 - (Pulse_Syntax_Base.v_as_nv - x) - e1_typing1 - () - e2_typing1 - () ())) - (fun - uu___7 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___8 -> - match uu___7 - with - | - FStar_Pervasives.Mkdtuple3 - (e, c, - e_typing) - -> - FStar_Pervasives.Mkdtuple3 - (e, c, - e_typing))))) - uu___6)))) - uu___5))) - uu___5)))) - uu___3)))))) - uu___6 uu___5 uu___4 uu___3 uu___2 uu___1 uu___ -type mk_t = - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.vprop -> - unit -> - ((Pulse_Syntax_Base.ppname, Pulse_Syntax_Base.st_term, - Pulse_Syntax_Base.comp, (unit, unit, unit) Pulse_Typing.st_typing) - FStar_Pervasives.dtuple4 FStar_Pervasives_Native.option, - unit) FStar_Tactics_Effect.tac_repr -let (elim_one : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.vprop -> - Pulse_Syntax_Base.vprop -> - unit -> - Pulse_Syntax_Base.ppname -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.comp -> - (unit, unit, unit) Pulse_Typing.st_typing -> - Pulse_Typing_Env.env -> - ((Pulse_Typing_Env.env, Pulse_Syntax_Base.term, - unit, - (unit, unit, unit, unit) continuation_elaborator) - FStar_Pervasives.dtuple4, - unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun ctxt -> - fun frame -> - fun p -> - fun ctxt_frame_p_typing -> - fun nx -> - fun e1 -> - fun c1 -> - fun e1_typing -> - fun uvs -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Common.fst" - (Prims.of_int (265)) (Prims.of_int (26)) - (Prims.of_int (265)) (Prims.of_int (69))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Common.fst" - (Prims.of_int (265)) (Prims.of_int (72)) - (Prims.of_int (288)) (Prims.of_int (40))))) - (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> ())) - (fun uu___ -> - (fun ctxt_frame_typing -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (266)) - (Prims.of_int (10)) - (Prims.of_int (266)) - (Prims.of_int (32))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (266)) - (Prims.of_int (35)) - (Prims.of_int (288)) - (Prims.of_int (40))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - Pulse_Typing_Env.fresh - (Pulse_Typing_Env.push_env g uvs))) - (fun uu___ -> - (fun x -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (268)) - (Prims.of_int (4)) - (Prims.of_int (268)) - (Prims.of_int (90))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (288)) - (Prims.of_int (2)) - (Prims.of_int (288)) - (Prims.of_int (40))))) - (Obj.magic - (continuation_elaborator_with_bind - g - (Pulse_Syntax_Base.tm_star - ctxt frame) c1 e1 - e1_typing () x)) - (fun k -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - FStar_Pervasives.Mkdtuple4 - ((Pulse_Typing_Env.push_binding - g x nx - (Pulse_Syntax_Base.comp_res - c1)), - (Pulse_Syntax_Base.tm_star - (Pulse_Syntax_Naming.open_term_nv - (Pulse_Syntax_Base.comp_post - c1) - (Pulse_Syntax_Base.v_as_nv - x)) ctxt), - (), - (k_elab_equiv g - (Pulse_Typing_Env.push_binding - g x nx - (Pulse_Syntax_Base.comp_res - c1)) - (Pulse_Syntax_Base.tm_star - (Pulse_Syntax_Base.tm_star - ctxt frame) - p) - (Pulse_Syntax_Base.tm_star - (Pulse_Syntax_Base.tm_star - ctxt frame) - p) - (Pulse_Syntax_Base.tm_star - (Pulse_Syntax_Naming.open_term_nv - (Pulse_Syntax_Base.comp_post - c1) - (Pulse_Syntax_Base.v_as_nv - x)) - (Pulse_Syntax_Base.tm_star - ctxt frame)) - (Pulse_Syntax_Base.tm_star - (Pulse_Syntax_Base.tm_star - (Pulse_Syntax_Naming.open_term_nv - (Pulse_Syntax_Base.comp_post - c1) - (Pulse_Syntax_Base.v_as_nv - x)) ctxt) - frame) k () - ())))))) uu___))) - uu___) -let rec (elim_all : - Pulse_Typing_Env.env -> - (Pulse_Syntax_Base.vprop -> - (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) - -> - mk_t -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - unit -> - Pulse_Typing_Env.env -> - ((Prims.bool * (Pulse_Typing_Env.env, Pulse_Syntax_Base.term, - unit, (unit, unit, unit, unit) continuation_elaborator) - FStar_Pervasives.dtuple4), - unit) FStar_Tactics_Effect.tac_repr) - = - fun uu___6 -> - fun uu___5 -> - fun uu___4 -> - fun uu___3 -> - fun uu___2 -> - fun uu___1 -> - fun uu___ -> - (fun g -> - fun f -> - fun mk -> - fun ctxt -> - fun frame -> - fun ctxt_frame_typing -> - fun uvs -> - match ctxt.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_Star (ctxt', p) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (303)) - (Prims.of_int (9)) - (Prims.of_int (303)) - (Prims.of_int (89))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (304)) - (Prims.of_int (7)) - (Prims.of_int (324)) - (Prims.of_int (10))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> ())) - (fun uu___ -> - (fun p_typing -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (304)) - (Prims.of_int (10)) - (Prims.of_int (304)) - (Prims.of_int (13))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (304)) - (Prims.of_int (7)) - (Prims.of_int (324)) - (Prims.of_int (10))))) - (Obj.magic (f p)) - (fun uu___ -> - (fun uu___ -> - if uu___ - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (305)) - (Prims.of_int (18)) - (Prims.of_int (305)) - (Prims.of_int (35))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (305)) - (Prims.of_int (12)) - (Prims.of_int (321)) - (Prims.of_int (70))))) - (Obj.magic - (mk g p - ())) - (fun - uu___1 -> - (fun - uu___1 -> - match uu___1 - with - | - FStar_Pervasives_Native.Some - (FStar_Pervasives.Mkdtuple4 - (nx, e1, - c1, - e1_typing)) - -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (308)) - (Prims.of_int (16)) - (Prims.of_int (308)) - (Prims.of_int (72))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (306)) - (Prims.of_int (49)) - (Prims.of_int (319)) - (Prims.of_int (71))))) - (Obj.magic - (elim_one - g ctxt' - frame p - () nx e1 - c1 - e1_typing - uvs)) - (fun - uu___2 -> - (fun - uu___2 -> - match uu___2 - with - | - FStar_Pervasives.Mkdtuple4 - (g', - uu___3, - ctxt_typing', - k) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (311)) - (Prims.of_int (65)) - (Prims.of_int (311)) - (Prims.of_int (66))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (311)) - (Prims.of_int (69)) - (Prims.of_int (319)) - (Prims.of_int (71))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - k)) - (fun - uu___4 -> - (fun k1 - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (315)) - (Prims.of_int (16)) - (Prims.of_int (316)) - (Prims.of_int (42))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (316)) - (Prims.of_int (45)) - (Prims.of_int (319)) - (Prims.of_int (71))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - k_elab_equiv - g g' - (Pulse_Syntax_Base.tm_star - (Pulse_Syntax_Base.tm_star - ctxt' - frame) p) - (Pulse_Syntax_Base.tm_star - (Pulse_Syntax_Base.tm_star - ctxt' p) - frame) - (Pulse_Syntax_Base.tm_star - uu___3 - frame) - (Pulse_Syntax_Base.tm_star - uu___3 - frame) k1 - () ())) - (fun - uu___4 -> - (fun k2 - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (318)) - (Prims.of_int (16)) - (Prims.of_int (318)) - (Prims.of_int (50))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (316)) - (Prims.of_int (45)) - (Prims.of_int (319)) - (Prims.of_int (71))))) - (Obj.magic - (elim_all - g' f mk - uu___3 - frame () - uvs)) - (fun - uu___4 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___5 -> - match uu___4 - with - | - (uu___6, - FStar_Pervasives.Mkdtuple4 - (g'', - ctxt'', - ctxt_typing'', - k')) -> - (true, - (FStar_Pervasives.Mkdtuple4 - (g'', - ctxt'', - (), - (k_elab_trans - g g' g'' - (Pulse_Syntax_Base.tm_star - (Pulse_Syntax_Base.tm_star - ctxt' p) - frame) - (Pulse_Syntax_Base.tm_star - uu___3 - frame) - (Pulse_Syntax_Base.tm_star - ctxt'' - frame) k2 - k')))))))) - uu___4))) - uu___4))) - uu___2))) - | - FStar_Pervasives_Native.None - -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___2 -> - (false, - (FStar_Pervasives.Mkdtuple4 - (g, ctxt, - (), - (k_elab_unit - g - (Pulse_Syntax_Base.tm_star - ctxt - frame))))))))) - uu___1))) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___2 -> - (false, - (FStar_Pervasives.Mkdtuple4 - (g, ctxt, - (), - (k_elab_unit - g - (Pulse_Syntax_Base.tm_star - ctxt - frame))))))))) - uu___))) uu___))) - | uu___ -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - (false, - (FStar_Pervasives.Mkdtuple4 - (g, ctxt, (), - (k_elab_unit g - (Pulse_Syntax_Base.tm_star - ctxt frame))))))))) - uu___6 uu___5 uu___4 uu___3 uu___2 uu___1 uu___ -let (add_elims_aux : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - (Pulse_Syntax_Base.vprop -> - (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) - -> - mk_t -> - unit -> - Pulse_Typing_Env.env -> - ((Prims.bool * (Pulse_Typing_Env.env, Pulse_Syntax_Base.term, - unit, (unit, unit, unit, unit) continuation_elaborator) - FStar_Pervasives.dtuple4), - unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun ctxt -> - fun frame -> - fun f -> - fun mk -> - fun ctxt_frame_typing -> - fun uvs -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Common.fst" - (Prims.of_int (338)) (Prims.of_int (40)) - (Prims.of_int (338)) (Prims.of_int (71))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Common.fst" - (Prims.of_int (338)) (Prims.of_int (4)) - (Prims.of_int (341)) (Prims.of_int (66))))) - (Obj.magic (canon_right g ctxt frame () f)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | FStar_Pervasives.Mkdtuple3 (ctxt', ctxt'_typing, k) - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (340)) - (Prims.of_int (9)) - (Prims.of_int (340)) - (Prims.of_int (39))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (338)) - (Prims.of_int (74)) - (Prims.of_int (341)) - (Prims.of_int (66))))) - (Obj.magic - (elim_all g f mk ctxt' frame () uvs)) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - match uu___1 with - | (progress, - FStar_Pervasives.Mkdtuple4 - (g', ctxt'', ctxt''_typing, k')) - -> - (progress, - (FStar_Pervasives.Mkdtuple4 - (g', ctxt'', (), - (k_elab_trans g g g' - (Pulse_Syntax_Base.tm_star - ctxt frame) - (Pulse_Syntax_Base.tm_star - ctxt' frame) - (Pulse_Syntax_Base.tm_star - ctxt'' frame) k k')))))))) - uu___) -let rec (add_elims : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - (Pulse_Syntax_Base.vprop -> - (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) - -> - mk_t -> - unit -> - Pulse_Typing_Env.env -> - ((Pulse_Typing_Env.env, Pulse_Syntax_Base.term, unit, - (unit, unit, unit, unit) continuation_elaborator) - FStar_Pervasives.dtuple4, - unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun ctxt -> - fun frame -> - fun f -> - fun mk -> - fun ctxt_typing -> - fun uvs -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Common.fst" - (Prims.of_int (352)) (Prims.of_int (25)) - (Prims.of_int (352)) (Prims.of_int (59))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Common.fst" - (Prims.of_int (352)) (Prims.of_int (4)) - (Prims.of_int (359)) (Prims.of_int (6))))) - (Obj.magic (add_elims_aux g ctxt frame f mk () uvs)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | (progress, res) -> - if Prims.op_Negation progress - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> res))) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (356)) - (Prims.of_int (45)) - (Prims.of_int (356)) - (Prims.of_int (48))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (355)) - (Prims.of_int (10)) - (Prims.of_int (359)) - (Prims.of_int (6))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> res)) - (fun uu___2 -> - (fun uu___2 -> - match uu___2 with - | FStar_Pervasives.Mkdtuple4 - (g', ctxt', ctxt'_typing, k) - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (357)) - (Prims.of_int (49)) - (Prims.of_int (357)) - (Prims.of_int (80))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Common.fst" - (Prims.of_int (356)) - (Prims.of_int (51)) - (Prims.of_int (358)) - (Prims.of_int (57))))) - (Obj.magic - (add_elims g' ctxt' - frame f mk () uvs)) - (fun uu___3 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___4 -> - match uu___3 - with - | FStar_Pervasives.Mkdtuple4 - (g'', - ctxt'', - ctxt''_typing, - k') - -> - FStar_Pervasives.Mkdtuple4 - (g'', - ctxt'', - (), - (k_elab_trans - g g' g'' - (Pulse_Syntax_Base.tm_star - ctxt - frame) - (Pulse_Syntax_Base.tm_star - ctxt' - frame) - (Pulse_Syntax_Base.tm_star - ctxt'' - frame) k - k')))))) - uu___2)))) uu___) -type preamble = - { - g0: Pulse_Typing_Env.env ; - ctxt: Pulse_Syntax_Base.vprop ; - frame: Pulse_Syntax_Base.vprop ; - ctxt_frame_typing: unit ; - goals: Pulse_Syntax_Base.vprop } -let (__proj__Mkpreamble__item__g0 : preamble -> Pulse_Typing_Env.env) = - fun projectee -> - match projectee with - | { g0; ctxt; frame; ctxt_frame_typing; goals;_} -> g0 -let (__proj__Mkpreamble__item__ctxt : preamble -> Pulse_Syntax_Base.vprop) = - fun projectee -> - match projectee with - | { g0; ctxt; frame; ctxt_frame_typing; goals;_} -> ctxt -let (__proj__Mkpreamble__item__frame : preamble -> Pulse_Syntax_Base.vprop) = - fun projectee -> - match projectee with - | { g0; ctxt; frame; ctxt_frame_typing; goals;_} -> frame - -let (__proj__Mkpreamble__item__goals : preamble -> Pulse_Syntax_Base.vprop) = - fun projectee -> - match projectee with - | { g0; ctxt; frame; ctxt_frame_typing; goals;_} -> goals -let (op_Array_Access : - Pulse_Prover_Substs.ss_t -> - Pulse_Syntax_Base.term -> Pulse_Syntax_Base.term) - = fun ss -> fun t -> Pulse_Prover_Substs.ss_term t ss -let (op_Star : - Pulse_Syntax_Base.vprop -> - Pulse_Syntax_Base.vprop -> Pulse_Syntax_Base.term) - = Pulse_Syntax_Base.tm_star -type 'preamble1 prover_state = - { - pg: Pulse_Typing_Env.env ; - remaining_ctxt: Pulse_Syntax_Base.vprop Prims.list ; - remaining_ctxt_frame_typing: unit ; - uvs: Pulse_Typing_Env.env ; - ss: Pulse_Prover_Substs.ss_t ; - solved: Pulse_Syntax_Base.vprop ; - unsolved: Pulse_Syntax_Base.vprop Prims.list ; - k: (unit, unit, unit, unit) continuation_elaborator ; - goals_inv: unit ; - solved_inv: unit } -let (__proj__Mkprover_state__item__pg : - preamble -> unit prover_state -> Pulse_Typing_Env.env) = - fun preamble1 -> - fun projectee -> - match projectee with - | { pg; remaining_ctxt; remaining_ctxt_frame_typing; uvs; ss; solved; - unsolved; k; goals_inv; solved_inv;_} -> pg -let (__proj__Mkprover_state__item__remaining_ctxt : - preamble -> unit prover_state -> Pulse_Syntax_Base.vprop Prims.list) = - fun preamble1 -> - fun projectee -> - match projectee with - | { pg; remaining_ctxt; remaining_ctxt_frame_typing; uvs; ss; solved; - unsolved; k; goals_inv; solved_inv;_} -> remaining_ctxt - -let (__proj__Mkprover_state__item__uvs : - preamble -> unit prover_state -> Pulse_Typing_Env.env) = - fun preamble1 -> - fun projectee -> - match projectee with - | { pg; remaining_ctxt; remaining_ctxt_frame_typing; uvs; ss; solved; - unsolved; k; goals_inv; solved_inv;_} -> uvs -let (__proj__Mkprover_state__item__ss : - preamble -> unit prover_state -> Pulse_Prover_Substs.ss_t) = - fun preamble1 -> - fun projectee -> - match projectee with - | { pg; remaining_ctxt; remaining_ctxt_frame_typing; uvs; ss; solved; - unsolved; k; goals_inv; solved_inv;_} -> ss -let (__proj__Mkprover_state__item__solved : - preamble -> unit prover_state -> Pulse_Syntax_Base.vprop) = - fun preamble1 -> - fun projectee -> - match projectee with - | { pg; remaining_ctxt; remaining_ctxt_frame_typing; uvs; ss; solved; - unsolved; k; goals_inv; solved_inv;_} -> solved -let (__proj__Mkprover_state__item__unsolved : - preamble -> unit prover_state -> Pulse_Syntax_Base.vprop Prims.list) = - fun preamble1 -> - fun projectee -> - match projectee with - | { pg; remaining_ctxt; remaining_ctxt_frame_typing; uvs; ss; solved; - unsolved; k; goals_inv; solved_inv;_} -> unsolved -let (__proj__Mkprover_state__item__k : - preamble -> - unit prover_state -> (unit, unit, unit, unit) continuation_elaborator) - = - fun preamble1 -> - fun projectee -> - match projectee with - | { pg; remaining_ctxt; remaining_ctxt_frame_typing; uvs; ss; solved; - unsolved; k; goals_inv; solved_inv;_} -> k -type ('preamble1, 'st) is_terminal = unit -let (extend_post_hint_opt_g : - Pulse_Typing_Env.env -> - unit Pulse_Typing.post_hint_opt -> - Pulse_Typing_Env.env -> unit Pulse_Typing.post_hint_opt) - = - fun g -> - fun post_hint -> - fun g1 -> - match post_hint with - | FStar_Pervasives_Native.None -> FStar_Pervasives_Native.None - | FStar_Pervasives_Native.Some post_hint1 -> - FStar_Pervasives_Native.Some post_hint1 -let (st_typing_subst : - Pulse_Typing_Env.env -> - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.comp_st -> - (unit, unit, unit) Pulse_Typing.st_typing -> - Pulse_Prover_Substs.ss_t -> - ((unit, unit, unit) Pulse_Typing.st_typing - FStar_Pervasives_Native.option, - unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun uvs -> - fun t -> - fun c -> - fun d -> - fun ss -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Common.fsti" - (Prims.of_int (135)) (Prims.of_int (16)) - (Prims.of_int (135)) (Prims.of_int (43))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Common.fsti" - (Prims.of_int (136)) (Prims.of_int (2)) - (Prims.of_int (143)) (Prims.of_int (10))))) - (Obj.magic (Pulse_Prover_Substs.ss_to_nt_substs g uvs ss)) - (fun nts_opt -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - match nts_opt with - | FStar_Pervasives_Native.None -> - FStar_Pervasives_Native.None - | FStar_Pervasives_Native.Some nts -> - FStar_Pervasives_Native.Some - (Pulse_Prover_Substs.st_typing_nt_substs g uvs - (Pulse_Typing_Env.mk_env - (Pulse_Typing_Env.fstar_env g)) t c d nts))) -let (st_typing_weakening : - Pulse_Typing_Env.env -> - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.comp -> - (unit, unit, unit) Pulse_Typing.st_typing -> - Pulse_Typing_Env.env -> (unit, unit, unit) Pulse_Typing.st_typing) - = - fun g -> - fun g' -> - fun t -> - fun c -> - fun d -> - fun g1 -> - let g2 = Pulse_Typing_Env.diff g1 g in - let d1 = - Pulse_Typing_Metatheory.st_typing_weakening g g' t c d g2 in - d1 -let (st_typing_weakening_end : - Pulse_Typing_Env.env -> - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.comp -> - (unit, unit, unit) Pulse_Typing.st_typing -> - Pulse_Typing_Env.env -> (unit, unit, unit) Pulse_Typing.st_typing) - = fun g -> fun g' -> fun t -> fun c -> fun d -> fun g'' -> Prims.admit () -type ('ss1, 'ss2) ss_extends = unit -type ('preamble1, 'pst1, 'pst2) pst_extends = unit -type prover_t = - preamble -> - unit prover_state -> - (unit prover_state, unit) FStar_Tactics_Effect.tac_repr \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Prover_ElimExists.ml b/src/ocaml/plugin/generated/Pulse_Prover_ElimExists.ml deleted file mode 100644 index 70d78e578..000000000 --- a/src/ocaml/plugin/generated/Pulse_Prover_ElimExists.ml +++ /dev/null @@ -1,247 +0,0 @@ -open Prims -let (should_elim_exists : - Pulse_Syntax_Base.vprop -> (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) - = - fun uu___ -> - (fun v -> - Obj.magic - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - match v.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_ExistsSL (uu___1, uu___2, uu___3) -> - true - | uu___1 -> false))) uu___ -let (mk : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.vprop -> - unit -> - ((Pulse_Syntax_Base.ppname, Pulse_Syntax_Base.st_term, - Pulse_Syntax_Base.comp, (unit, unit, unit) Pulse_Typing.st_typing) - FStar_Pervasives.dtuple4 FStar_Pervasives_Native.option, - unit) FStar_Tactics_Effect.tac_repr) - = - fun uu___2 -> - fun uu___1 -> - fun uu___ -> - (fun g -> - fun v -> - fun v_typing -> - Obj.magic - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - match v.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_ExistsSL - (u, - { Pulse_Syntax_Base.binder_ty = t; - Pulse_Syntax_Base.binder_ppname = nm;_}, - p) - -> - FStar_Pervasives_Native.Some - (FStar_Pervasives.Mkdtuple4 - (nm, - (Pulse_Typing.wr - (Pulse_Syntax_Base.Tm_ElimExists - { - Pulse_Syntax_Base.p1 = - (Pulse_Syntax_Base.tm_exists_sl - (Pulse_Syntax_Base.comp_u - (Pulse_Typing.comp_elim_exists - u t p - (nm, - (Pulse_Typing_Env.fresh - g)))) - (Pulse_Typing.as_binder t) p) - })), - (Pulse_Typing.comp_elim_exists u t p - (nm, (Pulse_Typing_Env.fresh g))), - (Pulse_Typing.T_ElimExists - (g, - (Pulse_Syntax_Base.comp_u - (Pulse_Typing.comp_elim_exists u t - p - (nm, (Pulse_Typing_Env.fresh g)))), - t, p, (Pulse_Typing_Env.fresh g), (), - ())))) - | uu___1 -> FStar_Pervasives_Native.None))) uu___2 - uu___1 uu___ -let (elim_exists_frame : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.vprop -> - Pulse_Syntax_Base.vprop -> - unit -> - Pulse_Typing_Env.env -> - ((Pulse_Typing_Env.env, Pulse_Syntax_Base.term, unit, - (unit, unit, unit, unit) - Pulse_Prover_Common.continuation_elaborator) - FStar_Pervasives.dtuple4, - unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun ctxt -> - fun frame -> - fun ctxt_frame_typing -> - fun uvs -> - Pulse_Prover_Common.add_elims g ctxt frame should_elim_exists mk - () uvs -let (elim_exists : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - unit -> - ((Pulse_Typing_Env.env, Pulse_Syntax_Base.term, unit, - (unit, unit, unit, unit) - Pulse_Prover_Common.continuation_elaborator) - FStar_Pervasives.dtuple4, - unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun ctxt -> - fun ctxt_typing -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.ElimExists.fst" - (Prims.of_int (49)) (Prims.of_int (70)) - (Prims.of_int (49)) (Prims.of_int (78))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.ElimExists.fst" - (Prims.of_int (49)) (Prims.of_int (81)) - (Prims.of_int (54)) (Prims.of_int (62))))) - (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> ())) - (fun uu___ -> - (fun ctxt_emp_typing -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.ElimExists.fst" - (Prims.of_int (51)) (Prims.of_int (4)) - (Prims.of_int (51)) (Prims.of_int (60))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.ElimExists.fst" - (Prims.of_int (49)) (Prims.of_int (81)) - (Prims.of_int (54)) (Prims.of_int (62))))) - (Obj.magic - (elim_exists_frame g ctxt Pulse_Syntax_Base.tm_emp () - (Pulse_Typing_Env.mk_env - (Pulse_Typing_Env.fstar_env g)))) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - match uu___ with - | FStar_Pervasives.Mkdtuple4 - (g', ctxt', ctxt'_emp_typing, k) -> - FStar_Pervasives.Mkdtuple4 - (g', ctxt', (), - (Pulse_Prover_Common.k_elab_equiv g g' - (Pulse_Prover_Common.op_Star ctxt - Pulse_Syntax_Base.tm_emp) ctxt - (Pulse_Prover_Common.op_Star ctxt' - Pulse_Syntax_Base.tm_emp) ctxt' k - () ())))))) uu___) -let (elim_exists_pst : - Pulse_Prover_Common.preamble -> - unit Pulse_Prover_Common.prover_state -> - (unit Pulse_Prover_Common.prover_state, unit) - FStar_Tactics_Effect.tac_repr) - = - fun preamble -> - fun pst -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.ElimExists.fst" - (Prims.of_int (61)) (Prims.of_int (4)) (Prims.of_int (66)) - (Prims.of_int (13))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.ElimExists.fst" - (Prims.of_int (58)) (Prims.of_int (74)) (Prims.of_int (96)) - (Prims.of_int (3))))) - (Obj.magic - (elim_exists_frame pst.Pulse_Prover_Common.pg - (Pulse_Checker_VPropEquiv.list_as_vprop - pst.Pulse_Prover_Common.remaining_ctxt) - (Pulse_Prover_Common.op_Star preamble.Pulse_Prover_Common.frame - (Pulse_Prover_Common.op_Array_Access - pst.Pulse_Prover_Common.ss pst.Pulse_Prover_Common.solved)) - () pst.Pulse_Prover_Common.uvs)) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - match uu___ with - | FStar_Pervasives.Mkdtuple4 (g', remaining_ctxt', ty, k) -> - { - Pulse_Prover_Common.pg = g'; - Pulse_Prover_Common.remaining_ctxt = - (Pulse_Checker_VPropEquiv.vprop_as_list - remaining_ctxt'); - Pulse_Prover_Common.remaining_ctxt_frame_typing = (); - Pulse_Prover_Common.uvs = (pst.Pulse_Prover_Common.uvs); - Pulse_Prover_Common.ss = (pst.Pulse_Prover_Common.ss); - Pulse_Prover_Common.solved = - (pst.Pulse_Prover_Common.solved); - Pulse_Prover_Common.unsolved = - (pst.Pulse_Prover_Common.unsolved); - Pulse_Prover_Common.k = - (Pulse_Prover_Common.k_elab_trans - preamble.Pulse_Prover_Common.g0 - (Pulse_Prover_Common.__proj__Mkprover_state__item__pg - preamble pst) g' - (Pulse_Prover_Common.op_Star - preamble.Pulse_Prover_Common.ctxt - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - (Pulse_Prover_Common.__proj__Mkprover_state__item__remaining_ctxt - preamble pst)) - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - (Pulse_Prover_Common.__proj__Mkprover_state__item__ss - preamble pst) - (Pulse_Prover_Common.__proj__Mkprover_state__item__solved - preamble pst))) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star remaining_ctxt' - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst.Pulse_Prover_Common.ss - pst.Pulse_Prover_Common.solved)) - pst.Pulse_Prover_Common.k - (Pulse_Prover_Common.k_elab_equiv - pst.Pulse_Prover_Common.pg g' - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst.Pulse_Prover_Common.remaining_ctxt) - (Pulse_Prover_Common.op_Star - preamble.Pulse_Prover_Common.frame - (Pulse_Prover_Common.op_Array_Access - pst.Pulse_Prover_Common.ss - pst.Pulse_Prover_Common.solved))) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst.Pulse_Prover_Common.remaining_ctxt) - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst.Pulse_Prover_Common.ss - pst.Pulse_Prover_Common.solved)) - (Pulse_Prover_Common.op_Star remaining_ctxt' - (Pulse_Prover_Common.op_Star - preamble.Pulse_Prover_Common.frame - (Pulse_Prover_Common.op_Array_Access - pst.Pulse_Prover_Common.ss - pst.Pulse_Prover_Common.solved))) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star remaining_ctxt' - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst.Pulse_Prover_Common.ss - pst.Pulse_Prover_Common.solved)) k () ())); - Pulse_Prover_Common.goals_inv = (); - Pulse_Prover_Common.solved_inv = () - })) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Prover_ElimPure.ml b/src/ocaml/plugin/generated/Pulse_Prover_ElimPure.ml deleted file mode 100644 index d2bf70cb7..000000000 --- a/src/ocaml/plugin/generated/Pulse_Prover_ElimPure.ml +++ /dev/null @@ -1,289 +0,0 @@ -open Prims -let (elim_pure_head : Pulse_Syntax_Base.term) = - let elim_pure_explicit_lid = - Pulse_Reflection_Util.mk_steel_wrapper_lid "elim_pure_explicit" in - Pulse_Syntax_Pure.tm_fvar (Pulse_Syntax_Base.as_fv elim_pure_explicit_lid) -let (elim_pure_head_ty : FStar_Reflection_Types.term) = - let squash_p = - Pulse_Reflection_Util.mk_squash Pulse_Syntax_Pure.u0 - (FStar_Reflection_Typing.bound_var Prims.int_zero) in - let pure_p = - Pulse_Reflection_Util.mk_pure - (FStar_Reflection_Typing.bound_var Prims.int_zero) in - let post = - Pulse_Reflection_Util.mk_abs squash_p FStar_Reflection_V2_Data.Q_Explicit - (FStar_Reflection_V2_Builtins.pack_ln - (FStar_Reflection_V2_Data.Tv_FVar - (FStar_Reflection_V2_Builtins.pack_fv - Pulse_Reflection_Util.emp_lid))) in - let cod = - Pulse_Reflection_Util.mk_stt_ghost_comp Pulse_Syntax_Pure.u0 squash_p - Pulse_Reflection_Util.emp_inames_tm pure_p post in - Pulse_Reflection_Util.mk_arrow - ((FStar_Reflection_V2_Builtins.pack_ln - (FStar_Reflection_V2_Data.Tv_FVar - (FStar_Reflection_V2_Builtins.pack_fv - FStar_Reflection_Const.prop_qn))), - FStar_Reflection_V2_Data.Q_Explicit) cod -let (tm_fstar : Pulse_Syntax_Base.host_term -> Pulse_Syntax_Base.term) = - fun t -> Pulse_Syntax_Base.tm_fstar t FStar_Range.range_0 - -let (mk_elim_pure : Pulse_Syntax_Base.term -> Pulse_Syntax_Base.st_term) = - fun p -> - let t = - Pulse_Syntax_Base.Tm_STApp - { - Pulse_Syntax_Base.head = elim_pure_head; - Pulse_Syntax_Base.arg_qual = FStar_Pervasives_Native.None; - Pulse_Syntax_Base.arg = p - } in - Pulse_Typing.wr t -let (elim_pure_comp : Pulse_Syntax_Base.host_term -> Pulse_Syntax_Base.comp) - = - fun p -> - let st = - { - Pulse_Syntax_Base.u = Pulse_Syntax_Pure.u_zero; - Pulse_Syntax_Base.res = - (tm_fstar (Pulse_Reflection_Util.mk_squash Pulse_Syntax_Pure.u0 p)); - Pulse_Syntax_Base.pre = (Pulse_Syntax_Base.tm_pure (tm_fstar p)); - Pulse_Syntax_Base.post = Pulse_Syntax_Base.tm_emp - } in - Pulse_Syntax_Base.C_STGhost (Pulse_Syntax_Base.tm_emp_inames, st) -let (elim_pure_typing : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.host_term -> - unit -> (unit, unit, unit) Pulse_Typing.st_typing) - = - fun g -> - fun p -> - fun p_prop -> - Pulse_Typing.T_STApp - (g, elim_pure_head, (tm_fstar FStar_Reflection_Typing.tm_prop), - FStar_Pervasives_Native.None, (elim_pure_comp p), (tm_fstar p), - (), ()) -let (is_elim_pure : - Pulse_Syntax_Base.term -> (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) - = - fun uu___ -> - (fun vp -> - Obj.magic - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - match vp.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_Pure - { Pulse_Syntax_Base.t = Pulse_Syntax_Base.Tm_FStar uu___1; - Pulse_Syntax_Base.range1 = uu___2;_} - -> true - | uu___1 -> false))) uu___ -let (mk : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.vprop -> - unit -> - ((Pulse_Syntax_Base.ppname, Pulse_Syntax_Base.st_term, - Pulse_Syntax_Base.comp, (unit, unit, unit) Pulse_Typing.st_typing) - FStar_Pervasives.dtuple4 FStar_Pervasives_Native.option, - unit) FStar_Tactics_Effect.tac_repr) - = - fun uu___2 -> - fun uu___1 -> - fun uu___ -> - (fun g -> - fun v -> - fun v_typing -> - Obj.magic - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - match v.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_Pure - { - Pulse_Syntax_Base.t = Pulse_Syntax_Base.Tm_FStar - pp; - Pulse_Syntax_Base.range1 = uu___1;_} - -> - FStar_Pervasives_Native.Some - (FStar_Pervasives.Mkdtuple4 - (Pulse_Syntax_Base.ppname_default, - (mk_elim_pure (tm_fstar pp)), - (elim_pure_comp pp), - (elim_pure_typing g pp ()))) - | uu___1 -> FStar_Pervasives_Native.None))) uu___2 - uu___1 uu___ -let (elim_pure_frame : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - unit -> - Pulse_Typing_Env.env -> - ((Pulse_Typing_Env.env, Pulse_Syntax_Base.term, unit, - (unit, unit, unit, unit) - Pulse_Prover_Common.continuation_elaborator) - FStar_Pervasives.dtuple4, - unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun ctxt -> - fun frame -> - fun ctxt_frame_typing -> - fun uvs -> - Pulse_Prover_Common.add_elims g ctxt frame is_elim_pure mk () uvs -let (elim_pure : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - unit -> - ((Pulse_Typing_Env.env, Pulse_Syntax_Base.term, unit, - (unit, unit, unit, unit) - Pulse_Prover_Common.continuation_elaborator) - FStar_Pervasives.dtuple4, - unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun ctxt -> - fun ctxt_typing -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.ElimPure.fst" - (Prims.of_int (103)) (Prims.of_int (70)) - (Prims.of_int (103)) (Prims.of_int (78))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.ElimPure.fst" - (Prims.of_int (103)) (Prims.of_int (81)) - (Prims.of_int (108)) (Prims.of_int (62))))) - (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> ())) - (fun uu___ -> - (fun ctxt_emp_typing -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.ElimPure.fst" - (Prims.of_int (105)) (Prims.of_int (4)) - (Prims.of_int (105)) (Prims.of_int (58))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.ElimPure.fst" - (Prims.of_int (103)) (Prims.of_int (81)) - (Prims.of_int (108)) (Prims.of_int (62))))) - (Obj.magic - (elim_pure_frame g ctxt Pulse_Syntax_Base.tm_emp () - (Pulse_Typing_Env.mk_env - (Pulse_Typing_Env.fstar_env g)))) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - match uu___ with - | FStar_Pervasives.Mkdtuple4 - (g', ctxt', ctxt'_emp_typing, k) -> - FStar_Pervasives.Mkdtuple4 - (g', ctxt', (), - (Pulse_Prover_Common.k_elab_equiv g g' - (Pulse_Prover_Common.op_Star ctxt - Pulse_Syntax_Base.tm_emp) ctxt - (Pulse_Prover_Common.op_Star ctxt' - Pulse_Syntax_Base.tm_emp) ctxt' k - () ())))))) uu___) -let (elim_pure_pst : - Pulse_Prover_Common.preamble -> - unit Pulse_Prover_Common.prover_state -> - (unit Pulse_Prover_Common.prover_state, unit) - FStar_Tactics_Effect.tac_repr) - = - fun preamble -> - fun pst -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.ElimPure.fst" - (Prims.of_int (117)) (Prims.of_int (4)) (Prims.of_int (122)) - (Prims.of_int (13))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.ElimPure.fst" - (Prims.of_int (114)) (Prims.of_int (74)) - (Prims.of_int (152)) (Prims.of_int (3))))) - (Obj.magic - (elim_pure_frame pst.Pulse_Prover_Common.pg - (Pulse_Checker_VPropEquiv.list_as_vprop - pst.Pulse_Prover_Common.remaining_ctxt) - (Pulse_Prover_Common.op_Star preamble.Pulse_Prover_Common.frame - (Pulse_Prover_Common.op_Array_Access - pst.Pulse_Prover_Common.ss pst.Pulse_Prover_Common.solved)) - () pst.Pulse_Prover_Common.uvs)) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - match uu___ with - | FStar_Pervasives.Mkdtuple4 (g', remaining_ctxt', ty, k) -> - { - Pulse_Prover_Common.pg = g'; - Pulse_Prover_Common.remaining_ctxt = - (Pulse_Checker_VPropEquiv.vprop_as_list - remaining_ctxt'); - Pulse_Prover_Common.remaining_ctxt_frame_typing = (); - Pulse_Prover_Common.uvs = (pst.Pulse_Prover_Common.uvs); - Pulse_Prover_Common.ss = (pst.Pulse_Prover_Common.ss); - Pulse_Prover_Common.solved = - (pst.Pulse_Prover_Common.solved); - Pulse_Prover_Common.unsolved = - (pst.Pulse_Prover_Common.unsolved); - Pulse_Prover_Common.k = - (Pulse_Prover_Common.k_elab_trans - preamble.Pulse_Prover_Common.g0 - (Pulse_Prover_Common.__proj__Mkprover_state__item__pg - preamble pst) g' - (Pulse_Prover_Common.op_Star - preamble.Pulse_Prover_Common.ctxt - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - (Pulse_Prover_Common.__proj__Mkprover_state__item__remaining_ctxt - preamble pst)) - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - (Pulse_Prover_Common.__proj__Mkprover_state__item__ss - preamble pst) - (Pulse_Prover_Common.__proj__Mkprover_state__item__solved - preamble pst))) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star remaining_ctxt' - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst.Pulse_Prover_Common.ss - pst.Pulse_Prover_Common.solved)) - pst.Pulse_Prover_Common.k - (Pulse_Prover_Common.k_elab_equiv - pst.Pulse_Prover_Common.pg g' - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst.Pulse_Prover_Common.remaining_ctxt) - (Pulse_Prover_Common.op_Star - preamble.Pulse_Prover_Common.frame - (Pulse_Prover_Common.op_Array_Access - pst.Pulse_Prover_Common.ss - pst.Pulse_Prover_Common.solved))) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - pst.Pulse_Prover_Common.remaining_ctxt) - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst.Pulse_Prover_Common.ss - pst.Pulse_Prover_Common.solved)) - (Pulse_Prover_Common.op_Star remaining_ctxt' - (Pulse_Prover_Common.op_Star - preamble.Pulse_Prover_Common.frame - (Pulse_Prover_Common.op_Array_Access - pst.Pulse_Prover_Common.ss - pst.Pulse_Prover_Common.solved))) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star remaining_ctxt' - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - pst.Pulse_Prover_Common.ss - pst.Pulse_Prover_Common.solved)) k () ())); - Pulse_Prover_Common.goals_inv = (); - Pulse_Prover_Common.solved_inv = () - })) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Prover_Match.ml b/src/ocaml/plugin/generated/Pulse_Prover_Match.ml deleted file mode 100644 index 8f752282d..000000000 --- a/src/ocaml/plugin/generated/Pulse_Prover_Match.ml +++ /dev/null @@ -1,1566 +0,0 @@ -open Prims -let (equational : Pulse_Syntax_Base.term -> Prims.bool) = - fun t -> - match t.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_FStar host_term -> - (match FStar_Reflection_V2_Builtins.inspect_ln host_term with - | FStar_Reflection_V2_Data.Tv_Match (uu___, uu___1, uu___2) -> true - | uu___ -> false) - | uu___ -> false -let (type_of_fv : - Pulse_Typing_Env.env -> - FStar_Reflection_Types.fv -> - (FStar_Reflection_Types.term FStar_Pervasives_Native.option, unit) - FStar_Tactics_Effect.tac_repr) - = - fun uu___1 -> - fun uu___ -> - (fun g -> - fun fv -> - Obj.magic - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - match FStar_Reflection_V2_Builtins.lookup_typ - (Pulse_Typing_Env.fstar_env g) - (FStar_Reflection_V2_Builtins.inspect_fv fv) - with - | FStar_Pervasives_Native.None -> - FStar_Pervasives_Native.None - | FStar_Pervasives_Native.Some se -> - (match FStar_Reflection_V2_Builtins.inspect_sigelt se - with - | FStar_Reflection_V2_Data.Unk -> - FStar_Pervasives_Native.None - | FStar_Reflection_V2_Data.Sg_Let (uu___1, lbs) -> - FStar_List_Tot_Base.tryPick - (fun lb -> - if - (FStar_Reflection_V2_Builtins.inspect_fv - (FStar_Reflection_V2_Builtins.inspect_lb - lb).FStar_Reflection_V2_Data.lb_fv) - = - (FStar_Reflection_V2_Builtins.inspect_fv - fv) - then - FStar_Pervasives_Native.Some - ((FStar_Reflection_V2_Builtins.inspect_lb - lb).FStar_Reflection_V2_Data.lb_typ) - else FStar_Pervasives_Native.None) lbs - | FStar_Reflection_V2_Data.Sg_Val (uu___1, uu___2, t) - -> FStar_Pervasives_Native.Some t - | FStar_Reflection_V2_Data.Sg_Inductive - (_nm, _univs, params, typ, uu___1) -> - FStar_Pervasives_Native.None)))) uu___1 uu___ -let (is_smt_fallback : FStar_Reflection_Types.term -> Prims.bool) = - fun t -> - match FStar_Reflection_V2_Builtins.inspect_ln t with - | FStar_Reflection_V2_Data.Tv_FVar fv -> - let name = FStar_Reflection_V2_Builtins.inspect_fv fv in - name = ["Steel"; "Effect"; "Common"; "smt_fallback"] - | uu___ -> false -let (eligible_for_smt_equality : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun t0 -> - fun t1 -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Match.fst" - (Prims.of_int (87)) (Prims.of_int (31)) - (Prims.of_int (87)) (Prims.of_int (61))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Match.fst" - (Prims.of_int (87)) (Prims.of_int (64)) - (Prims.of_int (145)) (Prims.of_int (31))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> fun uu___1 -> (equational t0) || (equational t1))) - (fun uu___ -> - (fun either_equational -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Match.fst" - (Prims.of_int (89)) (Prims.of_int (6)) - (Prims.of_int (92)) (Prims.of_int (18))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Match.fst" - (Prims.of_int (94)) (Prims.of_int (4)) - (Prims.of_int (145)) (Prims.of_int (31))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - fun t01 -> - fun t11 -> - match ((FStar_Reflection_V2_Builtins.inspect_ln - t01), - (FStar_Reflection_V2_Builtins.inspect_ln - t11)) - with - | (FStar_Reflection_V2_Data.Tv_App - (h0, uu___1), - FStar_Reflection_V2_Data.Tv_App - (h1, uu___2)) -> - FStar_Reflection_V2_TermEq.term_eq h0 h1 - | uu___1 -> false)) - (fun uu___ -> - (fun head_eq -> - match ((t0.Pulse_Syntax_Base.t), - (t1.Pulse_Syntax_Base.t)) - with - | (Pulse_Syntax_Base.Tm_FStar t01, - Pulse_Syntax_Base.Tm_FStar t11) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (96)) - (Prims.of_int (22)) - (Prims.of_int (96)) - (Prims.of_int (41))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (95)) - (Prims.of_int (34)) - (Prims.of_int (144)) - (Prims.of_int (5))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - FStar_Reflection_V2_Derived.collect_app_ln - t01)) - (fun uu___ -> - (fun uu___ -> - match uu___ with - | (h0, args0) -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (97)) - (Prims.of_int (22)) - (Prims.of_int (97)) - (Prims.of_int (41))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (96)) - (Prims.of_int (44)) - (Prims.of_int (143)) - (Prims.of_int (31))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - FStar_Reflection_V2_Derived.collect_app_ln - t11)) - (fun uu___1 -> - (fun uu___1 -> - match uu___1 with - | (h1, args1) -> - if - (FStar_Reflection_V2_TermEq.term_eq - h0 h1) && - ( - (FStar_List_Tot_Base.length - args0) = - (FStar_List_Tot_Base.length - args1)) - then - Obj.magic - ( - Obj.repr - (match - FStar_Reflection_V2_Builtins.inspect_ln - h0 - with - | - FStar_Reflection_V2_Data.Tv_FVar - fv -> - Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (103)) - (Prims.of_int (16)) - (Prims.of_int (103)) - (Prims.of_int (31))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (102)) - (Prims.of_int (29)) - (Prims.of_int (140)) - (Prims.of_int (9))))) - (Obj.magic - (type_of_fv - g fv)) - (fun - uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - match uu___2 - with - | - FStar_Pervasives_Native.None - -> - either_equational - () - | - FStar_Pervasives_Native.Some - t -> - (match - FStar_Reflection_V2_Derived.collect_arr_ln_bs - t - with - | - (bs, - uu___4) - -> - (match - FStar_List_Tot_Base.fold_right - (fun b -> - fun - uu___5 -> - match uu___5 - with - | - (some_fallbacks, - bs1) -> - if - FStar_List_Tot_Base.existsb - is_smt_fallback - (FStar_Reflection_V2_Builtins.inspect_binder - b).FStar_Reflection_V2_Data.attrs - then - (true, - (true :: - bs1)) - else - (some_fallbacks, - (false :: - bs1))) bs - (false, - []) - with - | - (some_fallbacks, - fallbacks) - -> - if - Prims.op_Negation - some_fallbacks - then - head_eq - t01 t11 - else - (let rec aux - args01 - args11 - fallbacks1 - = - match - (args01, - args11, - fallbacks1) - with - | - ((a0, - uu___6)::args02, - (a1, - uu___7)::args12, - b::fallbacks2) - -> - if b - then - aux - args02 - args12 - fallbacks2 - else - if - Prims.op_Negation - (FStar_Reflection_V2_TermEq.term_eq - a0 a1) - then - false - else - aux - args02 - args12 - fallbacks2 - | - ([], [], - []) -> - true - | - uu___6 -> - either_equational - () in - aux args0 - args1 - fallbacks)))))) - | - FStar_Reflection_V2_Data.Tv_UInst - (fv, - uu___2) - -> - Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (103)) - (Prims.of_int (16)) - (Prims.of_int (103)) - (Prims.of_int (31))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (102)) - (Prims.of_int (29)) - (Prims.of_int (140)) - (Prims.of_int (9))))) - (Obj.magic - (type_of_fv - g fv)) - (fun - uu___3 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - match uu___3 - with - | - FStar_Pervasives_Native.None - -> - either_equational - () - | - FStar_Pervasives_Native.Some - t -> - (match - FStar_Reflection_V2_Derived.collect_arr_ln_bs - t - with - | - (bs, - uu___5) - -> - (match - FStar_List_Tot_Base.fold_right - (fun b -> - fun - uu___6 -> - match uu___6 - with - | - (some_fallbacks, - bs1) -> - if - FStar_List_Tot_Base.existsb - is_smt_fallback - (FStar_Reflection_V2_Builtins.inspect_binder - b).FStar_Reflection_V2_Data.attrs - then - (true, - (true :: - bs1)) - else - (some_fallbacks, - (false :: - bs1))) bs - (false, - []) - with - | - (some_fallbacks, - fallbacks) - -> - if - Prims.op_Negation - some_fallbacks - then - head_eq - t01 t11 - else - (let rec aux - args01 - args11 - fallbacks1 - = - match - (args01, - args11, - fallbacks1) - with - | - ((a0, - uu___7)::args02, - (a1, - uu___8)::args12, - b::fallbacks2) - -> - if b - then - aux - args02 - args12 - fallbacks2 - else - if - Prims.op_Negation - (FStar_Reflection_V2_TermEq.term_eq - a0 a1) - then - false - else - aux - args02 - args12 - fallbacks2 - | - ([], [], - []) -> - true - | - uu___7 -> - either_equational - () in - aux args0 - args1 - fallbacks)))))) - | - uu___2 -> - Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - either_equational - ())))) - else - Obj.magic - ( - Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - either_equational - ())))) - uu___1))) uu___))) - | uu___ -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> either_equational ())))) - uu___))) uu___) -let (refl_uvar : - FStar_Reflection_Types.term -> - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.var FStar_Pervasives_Native.option) - = - fun t -> - fun uvs -> - match FStar_Reflection_V2_Builtins.inspect_ln t with - | FStar_Reflection_V2_Data.Tv_Var v -> - let uu___ = FStar_Reflection_V2_Builtins.inspect_namedv v in - (match uu___ with - | { FStar_Reflection_V2_Data.uniq = n; - FStar_Reflection_V2_Data.sort = uu___1; - FStar_Reflection_V2_Data.ppname = uu___2;_} -> - if Pulse_Typing_Env.contains uvs n - then FStar_Pervasives_Native.Some n - else FStar_Pervasives_Native.None) - | uu___ -> FStar_Pervasives_Native.None -let rec (refl_contains_uvar : - FStar_Reflection_Types.term -> - Pulse_Typing_Env.env -> - Pulse_Typing_Env.env -> - (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) - = - fun uu___2 -> - fun uu___1 -> - fun uu___ -> - (fun t -> - fun uvs -> - fun g -> - match FStar_Reflection_V2_Builtins.inspect_ln t with - | FStar_Reflection_V2_Data.Tv_Var uu___ -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - FStar_Pervasives_Native.uu___is_Some - (refl_uvar t uvs)))) - | FStar_Reflection_V2_Data.Tv_BVar uu___ -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> false))) - | FStar_Reflection_V2_Data.Tv_FVar uu___ -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> false))) - | FStar_Reflection_V2_Data.Tv_UInst (uu___, uu___1) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> false))) - | FStar_Reflection_V2_Data.Tv_Const uu___ -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> false))) - | FStar_Reflection_V2_Data.Tv_Type uu___ -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> false))) - | FStar_Reflection_V2_Data.Tv_App (hd, (arg, uu___)) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (166)) (Prims.of_int (12)) - (Prims.of_int (166)) (Prims.of_int (39))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (167)) (Prims.of_int (4)) - (Prims.of_int (168)) (Prims.of_int (37))))) - (Obj.magic (refl_contains_uvar hd uvs g)) - (fun uu___1 -> - (fun b -> - if b - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> true))) - else - Obj.magic - (Obj.repr (refl_contains_uvar arg uvs g))) - uu___1))) - | uu___ -> - Obj.magic - (Obj.repr - (Pulse_Typing_Env.fail g FStar_Pervasives_Native.None - "refl_contains_uvar: unsupported reflection term"))) - uu___2 uu___1 uu___ -let (is_uvar : - Pulse_Syntax_Base.term -> - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.var FStar_Pervasives_Native.option) - = - fun t -> - fun uvs -> - match t.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_FStar t1 -> refl_uvar t1 uvs - | uu___ -> FStar_Pervasives_Native.None -let rec (contains_uvar : - Pulse_Syntax_Base.term -> - Pulse_Typing_Env.env -> - Pulse_Typing_Env.env -> - (Prims.bool, unit) FStar_Tactics_Effect.tac_repr) - = - fun uu___2 -> - fun uu___1 -> - fun uu___ -> - (fun t -> - fun uvs -> - fun g -> - match t.Pulse_Syntax_Base.t with - | Pulse_Syntax_Base.Tm_Emp -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> false))) - | Pulse_Syntax_Base.Tm_Pure p -> - Obj.magic (Obj.repr (contains_uvar p uvs g)) - | Pulse_Syntax_Base.Tm_Star (t1, t2) -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (183)) (Prims.of_int (12)) - (Prims.of_int (183)) (Prims.of_int (34))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (184)) (Prims.of_int (4)) - (Prims.of_int (185)) (Prims.of_int (31))))) - (Obj.magic (contains_uvar t1 uvs g)) - (fun uu___ -> - (fun b -> - if b - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> true))) - else - Obj.magic - (Obj.repr (contains_uvar t2 uvs g))) - uu___))) - | Pulse_Syntax_Base.Tm_ExistsSL - (uu___, - { Pulse_Syntax_Base.binder_ty = t1; - Pulse_Syntax_Base.binder_ppname = uu___1;_}, - t2) - -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (183)) (Prims.of_int (12)) - (Prims.of_int (183)) (Prims.of_int (34))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (184)) (Prims.of_int (4)) - (Prims.of_int (185)) (Prims.of_int (31))))) - (Obj.magic (contains_uvar t1 uvs g)) - (fun uu___2 -> - (fun b -> - if b - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> true))) - else - Obj.magic - (Obj.repr (contains_uvar t2 uvs g))) - uu___2))) - | Pulse_Syntax_Base.Tm_ForallSL - (uu___, - { Pulse_Syntax_Base.binder_ty = t1; - Pulse_Syntax_Base.binder_ppname = uu___1;_}, - t2) - -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (183)) (Prims.of_int (12)) - (Prims.of_int (183)) (Prims.of_int (34))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (184)) (Prims.of_int (4)) - (Prims.of_int (185)) (Prims.of_int (31))))) - (Obj.magic (contains_uvar t1 uvs g)) - (fun uu___2 -> - (fun b -> - if b - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> true))) - else - Obj.magic - (Obj.repr (contains_uvar t2 uvs g))) - uu___2))) - | Pulse_Syntax_Base.Tm_VProp -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> false))) - | Pulse_Syntax_Base.Tm_Inames -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> false))) - | Pulse_Syntax_Base.Tm_EmpInames -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> false))) - | Pulse_Syntax_Base.Tm_FStar t1 -> - Obj.magic (Obj.repr (refl_contains_uvar t1 uvs g)) - | Pulse_Syntax_Base.Tm_Unknown -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> false)))) uu___2 uu___1 uu___ -let (is_reveal_uvar : - Pulse_Syntax_Base.term -> - Pulse_Typing_Env.env -> - (Pulse_Syntax_Base.universe * Pulse_Syntax_Base.term * - Pulse_Syntax_Base.var) FStar_Pervasives_Native.option) - = - fun t -> - fun uvs -> - match Pulse_Syntax_Pure.is_pure_app t with - | FStar_Pervasives_Native.Some (hd, FStar_Pervasives_Native.None, arg) - -> - (match Pulse_Syntax_Pure.is_pure_app hd with - | FStar_Pervasives_Native.Some - (hd1, FStar_Pervasives_Native.Some - (Pulse_Syntax_Base.Implicit), ty) - -> - let arg_uvar_index_opt = is_uvar arg uvs in - (match arg_uvar_index_opt with - | FStar_Pervasives_Native.Some n -> - (match Pulse_Syntax_Pure.is_fvar hd1 with - | FStar_Pervasives_Native.Some (l, u::[]) -> - if l = Pulse_Reflection_Util.reveal_lid - then FStar_Pervasives_Native.Some (u, ty, n) - else FStar_Pervasives_Native.None - | uu___ -> FStar_Pervasives_Native.None) - | uu___ -> FStar_Pervasives_Native.None) - | uu___ -> FStar_Pervasives_Native.None) - | uu___ -> FStar_Pervasives_Native.None -let (is_reveal : Pulse_Syntax_Base.term -> Prims.bool) = - fun t -> - match Pulse_Syntax_Pure.leftmost_head t with - | FStar_Pervasives_Native.Some hd -> - (match Pulse_Syntax_Pure.is_fvar hd with - | FStar_Pervasives_Native.Some (l, uu___::[]) -> - l = Pulse_Reflection_Util.reveal_lid - | uu___ -> false) - | uu___ -> false -let rec (unify : - Pulse_Typing_Env.env -> - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - unit -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - unit -> - Pulse_Prover_Substs.ss_t -> - ((Pulse_Prover_Substs.ss_t, - (unit, unit, unit) FStar_Reflection_Typing.equiv) - Prims.dtuple2 FStar_Pervasives_Native.option, - unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun uvs -> - fun p -> - fun p_t -> - fun p_typing -> - fun q -> - fun q_t -> - fun q_typing -> - fun ss -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Match.fst" - (Prims.of_int (227)) (Prims.of_int (11)) - (Prims.of_int (227)) (Prims.of_int (12))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Match.fst" - (Prims.of_int (227)) (Prims.of_int (15)) - (Prims.of_int (319)) (Prims.of_int (27))))) - (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> q)) - (fun uu___ -> - (fun q0 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (228)) - (Prims.of_int (10)) - (Prims.of_int (228)) - (Prims.of_int (16))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (231)) - (Prims.of_int (2)) - (Prims.of_int (319)) - (Prims.of_int (27))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - Pulse_Prover_Common.op_Array_Access ss - q)) - (fun uu___ -> - (fun q1 -> - if Pulse_Syntax_Base.eq_tm p q1 - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - FStar_Pervasives_Native.Some - (Prims.Mkdtuple2 - (ss, - (FStar_Reflection_Typing.EQ_Refl - ((Pulse_Typing.elab_env - g), - (Pulse_Elaborate_Pure.elab_term - p)))))))) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (236)) - (Prims.of_int (10)) - (Prims.of_int (236)) - (Prims.of_int (37))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (236)) - (Prims.of_int (7)) - (Prims.of_int (319)) - (Prims.of_int (27))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (236)) - (Prims.of_int (14)) - (Prims.of_int (236)) - (Prims.of_int (37))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (236)) - (Prims.of_int (10)) - (Prims.of_int (236)) - (Prims.of_int (37))))) - (Obj.magic - (contains_uvar q1 - uvs g)) - (fun uu___1 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> - Prims.op_Negation - uu___1)))) - (fun uu___1 -> - (fun uu___1 -> - if uu___1 - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - ( - Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (238)) - (Prims.of_int (7)) - (Prims.of_int (238)) - (Prims.of_int (38))))) - (FStar_Sealed.seal - ( - Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (238)) - (Prims.of_int (4)) - (Prims.of_int (245)) - (Prims.of_int (13))))) - (Obj.magic - ( - eligible_for_smt_equality - g p q1)) - (fun uu___2 - -> - (fun - uu___2 -> - if uu___2 - then - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (240)) - (Prims.of_int (18)) - (Prims.of_int (240)) - (Prims.of_int (29))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (240)) - (Prims.of_int (32)) - (Prims.of_int (244)) - (Prims.of_int (26))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - Pulse_Elaborate_Pure.elab_term - p)) - (fun - uu___3 -> - (fun v0 - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (241)) - (Prims.of_int (18)) - (Prims.of_int (241)) - (Prims.of_int (29))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (242)) - (Prims.of_int (9)) - (Prims.of_int (244)) - (Prims.of_int (26))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - Pulse_Elaborate_Pure.elab_term - q1)) - (fun - uu___3 -> - (fun v1 - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (242)) - (Prims.of_int (15)) - (Prims.of_int (242)) - (Prims.of_int (47))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (242)) - (Prims.of_int (9)) - (Prims.of_int (244)) - (Prims.of_int (26))))) - (Obj.magic - (FStar_Tactics_V2_Builtins.check_equiv - (Pulse_Typing.elab_env - g) v0 v1)) - (fun - uu___3 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - match uu___3 - with - | - (FStar_Pervasives_Native.Some - token, - uu___5) - -> - FStar_Pervasives_Native.Some - (Prims.Mkdtuple2 - (ss, - (FStar_Reflection_Typing.EQ_Token - ((Pulse_Typing.elab_env - g), v0, - v1, ())))) - | - (FStar_Pervasives_Native.None, - uu___5) - -> - FStar_Pervasives_Native.None)))) - uu___3))) - uu___3))) - else - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - FStar_Pervasives_Native.None)))) - uu___2))) - else - Obj.magic - (Obj.repr - (match - ((is_reveal_uvar - q1 uvs), - (is_reveal - p)) - with - | (FStar_Pervasives_Native.Some - (u, ty, n), - false) -> - Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (249)) - (Prims.of_int (17)) - (Prims.of_int (249)) - (Prims.of_int (31))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (252)) - (Prims.of_int (54)) - (Prims.of_int (265)) - (Prims.of_int (18))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - Pulse_Typing.mk_hide - u ty p)) - (fun - uu___3 -> - (fun w -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (253)) - (Prims.of_int (22)) - (Prims.of_int (253)) - (Prims.of_int (42))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (256)) - (Prims.of_int (59)) - (Prims.of_int (265)) - (Prims.of_int (18))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - Pulse_Prover_Substs.push - Pulse_Prover_Substs.empty - n w)) - (fun - uu___3 -> - (fun - ss_new -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (257)) - (Prims.of_int (19)) - (Prims.of_int (257)) - (Prims.of_int (39))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (260)) - (Prims.of_int (54)) - (Prims.of_int (265)) - (Prims.of_int (18))))) - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___3 -> - Pulse_Prover_Substs.push_ss - ss ss_new)) - (fun - uu___3 -> - (fun ss' - -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (261)) - (Prims.of_int (20)) - (Prims.of_int (261)) - (Prims.of_int (91))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (260)) - (Prims.of_int (54)) - (Prims.of_int (265)) - (Prims.of_int (18))))) - (Obj.magic - (FStar_Tactics_V2_Builtins.check_equiv - (Pulse_Typing.elab_env - g) - (Pulse_Elaborate_Pure.elab_term - (Pulse_Typing.mk_reveal - u ty w)) - (Pulse_Elaborate_Pure.elab_term - p))) - (fun - uu___3 -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - match uu___3 - with - | - (b, - uu___5) - -> - if - FStar_Pervasives_Native.uu___is_Some - b - then - FStar_Pervasives_Native.Some - (Prims.Mkdtuple2 - (ss', - (Prims.magic - ()))) - else - FStar_Pervasives_Native.None)))) - uu___3))) - uu___3))) - uu___3)) - | uu___3 -> - Obj.repr - (match - is_uvar - q1 uvs - with - | - FStar_Pervasives_Native.Some - n -> - Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___4 -> - FStar_Pervasives_Native.Some - (Prims.Mkdtuple2 - ((Pulse_Prover_Substs.push_ss - ss - (Pulse_Prover_Substs.push - Pulse_Prover_Substs.empty - n p)), - (FStar_Reflection_Typing.EQ_Refl - ((Pulse_Typing.elab_env - g), - (Pulse_Elaborate_Pure.elab_term - p))))))) - | - uu___4 -> - Obj.repr - (match - ((p.Pulse_Syntax_Base.t), - (q1.Pulse_Syntax_Base.t)) - with - | - (Pulse_Syntax_Base.Tm_Pure - p1, - Pulse_Syntax_Base.Tm_Pure - q11) -> - Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (283)) - (Prims.of_int (21)) - (Prims.of_int (286)) - (Prims.of_int (17))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (287)) - (Prims.of_int (13)) - (Prims.of_int (293)) - (Prims.of_int (29))))) - (Obj.magic - (unify g - uvs p1 - (Prims.magic - ()) () - q11 - (Prims.magic - ()) () ss)) - (fun r -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___5 -> - match r - with - | - FStar_Pervasives_Native.Some - (Prims.Mkdtuple2 - (ss', - uu___6)) - -> - FStar_Pervasives_Native.Some - (Prims.Mkdtuple2 - (ss', - (Prims.magic - ()))) - | - FStar_Pervasives_Native.None - -> - FStar_Pervasives_Native.None))) - | - (uu___5, - uu___6) - -> - Obj.repr - (match - ((Pulse_Syntax_Pure.is_pure_app - p), - (Pulse_Syntax_Pure.is_pure_app - q1)) - with - | - (FStar_Pervasives_Native.Some - (head_p, - qual_p, - arg_p), - FStar_Pervasives_Native.Some - (head_q, - qual_q, - arg_q)) - -> - Obj.repr - (if - Prims.op_Negation - (qual_p = - qual_q) - then - Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___7 -> - FStar_Pervasives_Native.None)) - else - Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (300)) - (Prims.of_int (25)) - (Prims.of_int (303)) - (Prims.of_int (21))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (304)) - (Prims.of_int (17)) - (Prims.of_int (317)) - (Prims.of_int (28))))) - (Obj.magic - (unify g - uvs - head_p - (Prims.magic - ()) () - head_q - (Prims.magic - ()) () ss)) - (fun - uu___8 -> - (fun r -> - match r - with - | - FStar_Pervasives_Native.Some - (Prims.Mkdtuple2 - (ss', - uu___8)) - -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (306)) - (Prims.of_int (27)) - (Prims.of_int (309)) - (Prims.of_int (25))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (310)) - (Prims.of_int (19)) - (Prims.of_int (316)) - (Prims.of_int (32))))) - (Obj.magic - (unify g - uvs arg_p - (Prims.magic - ()) () - arg_q - (Prims.magic - ()) () - ss')) - (fun r1 - -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___9 -> - match r1 - with - | - FStar_Pervasives_Native.Some - (Prims.Mkdtuple2 - (ss'1, - uu___10)) - -> - FStar_Pervasives_Native.Some - (Prims.Mkdtuple2 - (ss'1, - (Prims.magic - ()))) - | - uu___10 - -> - FStar_Pervasives_Native.None)))) - | - uu___8 -> - Obj.magic - (Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___9 -> - FStar_Pervasives_Native.None)))) - uu___8))) - | - (uu___7, - uu___8) - -> - Obj.repr - (FStar_Tactics_Effect.lift_div_tac - (fun - uu___9 -> - FStar_Pervasives_Native.None)))))))) - uu___1)))) uu___))) - uu___) -let (try_match_pq : - Pulse_Typing_Env.env -> - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.vprop -> - unit -> - Pulse_Syntax_Base.vprop -> - unit -> - ((Pulse_Prover_Substs.ss_t, unit) Prims.dtuple2 - FStar_Pervasives_Native.option, - unit) FStar_Tactics_Effect.tac_repr) - = - fun g -> - fun uvs -> - fun p -> - fun p_typing -> - fun q -> - fun q_typing -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Match.fst" - (Prims.of_int (327)) (Prims.of_int (10)) - (Prims.of_int (327)) (Prims.of_int (48))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Match.fst" - (Prims.of_int (328)) (Prims.of_int (2)) - (Prims.of_int (332)) (Prims.of_int (27))))) - (Obj.magic - (unify g uvs p Pulse_Syntax_Base.tm_vprop () q - Pulse_Syntax_Base.tm_vprop () Pulse_Prover_Substs.empty)) - (fun r -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___ -> - match r with - | FStar_Pervasives_Native.None -> - FStar_Pervasives_Native.None - | FStar_Pervasives_Native.Some (Prims.Mkdtuple2 - (ss, uu___1)) -> - FStar_Pervasives_Native.Some - (Prims.Mkdtuple2 (ss, ())))) -let coerce_eq : 'a 'b . 'a -> unit -> 'b = - fun uu___1 -> fun uu___ -> (fun x -> fun uu___ -> Obj.magic x) uu___1 uu___ -let (match_step : - Pulse_Prover_Common.preamble -> - unit Pulse_Prover_Common.prover_state -> - Pulse_Syntax_Base.vprop -> - Pulse_Syntax_Base.vprop Prims.list -> - Pulse_Syntax_Base.vprop -> - Pulse_Syntax_Base.vprop Prims.list -> - unit -> - (unit Pulse_Prover_Common.prover_state - FStar_Pervasives_Native.option, - unit) FStar_Tactics_Effect.tac_repr) - = - fun preamble -> - fun pst -> - fun p -> - fun remaining_ctxt' -> - fun q -> - fun unsolved' -> - fun uu___ -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Match.fst" - (Prims.of_int (343)) (Prims.of_int (11)) - (Prims.of_int (343)) (Prims.of_int (21))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Prover.Match.fst" - (Prims.of_int (344)) (Prims.of_int (52)) - (Prims.of_int (401)) (Prims.of_int (11))))) - (FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - Pulse_Prover_Common.op_Array_Access - pst.Pulse_Prover_Common.ss q)) - (fun uu___1 -> - (fun q_ss -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (346)) - (Prims.of_int (11)) - (Prims.of_int (346)) - (Prims.of_int (69))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Prover.Match.fst" - (Prims.of_int (347)) Prims.int_zero - (Prims.of_int (401)) - (Prims.of_int (11))))) - (Obj.magic - (try_match_pq pst.Pulse_Prover_Common.pg - pst.Pulse_Prover_Common.uvs p () q_ss ())) - (fun ropt -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - match ropt with - | FStar_Pervasives_Native.None -> - FStar_Pervasives_Native.None - | FStar_Pervasives_Native.Some - (Prims.Mkdtuple2 (ss_q, veq)) -> - FStar_Pervasives_Native.Some - { - Pulse_Prover_Common.pg = - (pst.Pulse_Prover_Common.pg); - Pulse_Prover_Common.remaining_ctxt - = remaining_ctxt'; - Pulse_Prover_Common.remaining_ctxt_frame_typing - = (); - Pulse_Prover_Common.uvs = - (pst.Pulse_Prover_Common.uvs); - Pulse_Prover_Common.ss = - (Pulse_Prover_Substs.push_ss - pst.Pulse_Prover_Common.ss - ss_q); - Pulse_Prover_Common.solved = - (Pulse_Prover_Common.op_Star q - pst.Pulse_Prover_Common.solved); - Pulse_Prover_Common.unsolved = - unsolved'; - Pulse_Prover_Common.k = - (coerce_eq - (Pulse_Prover_Common.k_elab_equiv - preamble.Pulse_Prover_Common.g0 - pst.Pulse_Prover_Common.pg - (Pulse_Prover_Common.op_Star - preamble.Pulse_Prover_Common.ctxt - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star - preamble.Pulse_Prover_Common.ctxt - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - (p :: - remaining_ctxt')) - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Array_Access - (Pulse_Prover_Substs.push_ss - pst.Pulse_Prover_Common.ss - ss_q) - pst.Pulse_Prover_Common.solved)) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Star - (Pulse_Checker_VPropEquiv.list_as_vprop - remaining_ctxt') - preamble.Pulse_Prover_Common.frame) - (Pulse_Prover_Common.op_Star - (Pulse_Prover_Common.op_Array_Access - (Pulse_Prover_Substs.push_ss - pst.Pulse_Prover_Common.ss - ss_q) q) - (Pulse_Prover_Common.op_Array_Access - (Pulse_Prover_Substs.push_ss - pst.Pulse_Prover_Common.ss - ss_q) - pst.Pulse_Prover_Common.solved))) - (coerce_eq - pst.Pulse_Prover_Common.k - ()) () ()) ()); - Pulse_Prover_Common.goals_inv = - (); - Pulse_Prover_Common.solved_inv = - () - })))) uu___1) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Syntax_Base.ml b/src/ocaml/plugin/generated/Pulse_Syntax_Base.ml index 4b627e081..ba293735d 100644 --- a/src/ocaml/plugin/generated/Pulse_Syntax_Base.ml +++ b/src/ocaml/plugin/generated/Pulse_Syntax_Base.ml @@ -18,6 +18,8 @@ let (ppname_default : ppname) = let (mk_ppname : FStar_Reflection_Typing.pp_name_t -> FStar_Range.range -> ppname) = fun name -> fun range1 -> { name; range = range1 } +let (mk_ppname_no_range : Prims.string -> ppname) = + fun s -> { name = (FStar_Sealed.seal s); range = FStar_Range.range_0 } type bv = { bv_index: index ; bv_ppname: ppname } @@ -39,11 +41,6 @@ let (__proj__Mknm__item__nm_ppname : nm -> ppname) = type qualifier = | Implicit let (uu___is_Implicit : qualifier -> Prims.bool) = fun projectee -> true -type should_check_t = (Prims.bool, unit) FStar_Sealed_Inhabited.sealed -let (should_check_true : should_check_t) = - FStar_Sealed_Inhabited.seal false true -let (should_check_false : should_check_t) = - FStar_Sealed_Inhabited.seal false false type fv = { fv_name: FStar_Reflection_Types.name ; fv_range: range } @@ -208,6 +205,12 @@ let (uu___is_STT_Atomic : ctag -> Prims.bool) = fun projectee -> match projectee with | STT_Atomic -> true | uu___ -> false let (uu___is_STT_Ghost : ctag -> Prims.bool) = fun projectee -> match projectee with | STT_Ghost -> true | uu___ -> false +let (ctag_of_comp_st : comp_st -> ctag) = + fun c -> + match c with + | C_ST uu___ -> STT + | C_STAtomic (uu___, uu___1) -> STT_Atomic + | C_STGhost (uu___, uu___1) -> STT_Ghost type proof_hint_type = | ASSERT | FOLD of Prims.string Prims.list FStar_Pervasives_Native.option @@ -259,18 +262,15 @@ and st_term'__Tm_Match__payload = sc: term ; returns_: vprop FStar_Pervasives_Native.option ; brs: (pattern * st_term) Prims.list } -and st_term'__Tm_IntroPure__payload = - { - p: term ; - should_check: should_check_t } +and st_term'__Tm_IntroPure__payload = { + p: term } and st_term'__Tm_ElimExists__payload = { p1: vprop } and st_term'__Tm_IntroExists__payload = { erased: Prims.bool ; p2: vprop ; - witnesses: term Prims.list ; - should_check1: should_check_t } + witnesses: term Prims.list } and st_term'__Tm_While__payload = { invariant: term ; @@ -299,14 +299,12 @@ and st_term'__Tm_Admit__payload = u1: universe ; typ: term ; post3: term FStar_Pervasives_Native.option } -and st_term'__Tm_Protect__payload = { - t3: st_term } and st_term'__Tm_ProofHintWithBinders__payload = { hint_type: proof_hint_type ; binders: binder Prims.list ; v: vprop ; - t4: st_term } + t3: st_term } and st_term' = | Tm_Return of st_term'__Tm_Return__payload | Tm_Abs of st_term'__Tm_Abs__payload @@ -323,7 +321,6 @@ and st_term' = | Tm_WithLocal of st_term'__Tm_WithLocal__payload | Tm_Rewrite of st_term'__Tm_Rewrite__payload | Tm_Admit of st_term'__Tm_Admit__payload - | Tm_Protect of st_term'__Tm_Protect__payload | Tm_ProofHintWithBinders of st_term'__Tm_ProofHintWithBinders__payload and st_term = { term1: st_term' ; @@ -354,8 +351,6 @@ let uu___is_Tm_Rewrite uu___ = match uu___ with | Tm_Rewrite _ -> true | _ -> false let uu___is_Tm_Admit uu___ = match uu___ with | Tm_Admit _ -> true | _ -> false -let uu___is_Tm_Protect uu___ = - match uu___ with | Tm_Protect _ -> true | _ -> false let uu___is_Tm_ProofHintWithBinders uu___ = match uu___ with | Tm_ProofHintWithBinders _ -> true | _ -> false type branch = (pattern * st_term) @@ -510,12 +505,9 @@ let rec (eq_st_term : st_term -> st_term -> Prims.bool) = | (Tm_TotBind { head2 = t11; body2 = k1;_}, Tm_TotBind { head2 = t21; body2 = k2;_}) -> (eq_tm t11 t21) && (eq_st_term k1 k2) - | (Tm_IntroPure { p = p1; should_check = uu___;_}, Tm_IntroPure - { p = p2; should_check = uu___1;_}) -> eq_tm p1 p2 - | (Tm_IntroExists - { erased = b1; p2 = p1; witnesses = l1; should_check1 = uu___;_}, - Tm_IntroExists - { erased = b2; p2; witnesses = l2; should_check1 = uu___1;_}) -> + | (Tm_IntroPure { p = p1;_}, Tm_IntroPure { p = p2;_}) -> eq_tm p1 p2 + | (Tm_IntroExists { erased = b1; p2 = p1; witnesses = l1;_}, + Tm_IntroExists { erased = b2; p2; witnesses = l2;_}) -> ((b1 = b2) && (eq_tm p1 p2)) && (eq_tm_list l1 l2) | (Tm_ElimExists { p1;_}, Tm_ElimExists { p1 = p2;_}) -> eq_tm p1 p2 | (Tm_If { b1 = g1; then_ = ethen1; else_ = eelse1; post1 = p1;_}, @@ -558,12 +550,10 @@ let rec (eq_st_term : st_term -> st_term -> Prims.bool) = { ctag1 = c2; u1 = u2; typ = t21; post3 = post2;_}) -> (((c1 = c2) && (eq_univ u1 u2)) && (eq_tm t11 t21)) && (eq_tm_opt post1 post2) - | (Tm_Protect { t3 = t11;_}, Tm_Protect { t3 = t21;_}) -> - eq_st_term t11 t21 | (Tm_ProofHintWithBinders - { hint_type = ht1; binders = bs1; v = v1; t4 = t11;_}, + { hint_type = ht1; binders = bs1; v = v1; t3 = t11;_}, Tm_ProofHintWithBinders - { hint_type = ht2; binders = bs2; v = v2; t4 = t21;_}) -> + { hint_type = ht2; binders = bs2; v = v2; t3 = t21;_}) -> (((ht1 = ht2) && (eq_list eq_binder bs1 bs2)) && (eq_tm v1 v2)) && (eq_st_term t11 t21) | uu___ -> false diff --git a/src/ocaml/plugin/generated/Pulse_Syntax_Builder.ml b/src/ocaml/plugin/generated/Pulse_Syntax_Builder.ml index c648c3c72..9fc528410 100644 --- a/src/ocaml/plugin/generated/Pulse_Syntax_Builder.ml +++ b/src/ocaml/plugin/generated/Pulse_Syntax_Builder.ml @@ -125,9 +125,7 @@ let (tm_intro_exists : { Pulse_Syntax_Base.erased = erased; Pulse_Syntax_Base.p2 = p; - Pulse_Syntax_Base.witnesses = witnesses; - Pulse_Syntax_Base.should_check1 = - Pulse_Syntax_Base.should_check_true + Pulse_Syntax_Base.witnesses = witnesses } let (tm_while : Pulse_Syntax_Base.term -> @@ -209,8 +207,6 @@ let (tm_admit : Pulse_Syntax_Base.typ = typ; Pulse_Syntax_Base.post3 = post } -let (tm_protect : Pulse_Syntax_Base.st_term -> Pulse_Syntax_Base.st_term') = - fun t -> Pulse_Syntax_Base.Tm_Protect { Pulse_Syntax_Base.t3 = t } let (with_range : Pulse_Syntax_Base.st_term' -> Pulse_Syntax_Base.range -> Pulse_Syntax_Base.st_term) @@ -230,5 +226,5 @@ let (tm_assert_with_binders : Pulse_Syntax_Base.hint_type = Pulse_Syntax_Base.ASSERT; Pulse_Syntax_Base.binders = bs; Pulse_Syntax_Base.v = v; - Pulse_Syntax_Base.t4 = t + Pulse_Syntax_Base.t3 = t } \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Syntax_Naming.ml b/src/ocaml/plugin/generated/Pulse_Syntax_Naming.ml index 272c6e385..58c124092 100644 --- a/src/ocaml/plugin/generated/Pulse_Syntax_Naming.ml +++ b/src/ocaml/plugin/generated/Pulse_Syntax_Naming.ml @@ -99,15 +99,13 @@ let rec (freevars_st : let op_At_At = FStar_Set.union in op_At_At (freevars sc) (op_At_At (freevars_term_opt returns_) (freevars_branches brs)) - | Pulse_Syntax_Base.Tm_IntroPure - { Pulse_Syntax_Base.p = p; Pulse_Syntax_Base.should_check = uu___;_} - -> freevars p + | Pulse_Syntax_Base.Tm_IntroPure { Pulse_Syntax_Base.p = p;_} -> + freevars p | Pulse_Syntax_Base.Tm_ElimExists { Pulse_Syntax_Base.p1 = p;_} -> freevars p | Pulse_Syntax_Base.Tm_IntroExists { Pulse_Syntax_Base.erased = uu___; Pulse_Syntax_Base.p2 = p; - Pulse_Syntax_Base.witnesses = witnesses; - Pulse_Syntax_Base.should_check1 = uu___1;_} + Pulse_Syntax_Base.witnesses = witnesses;_} -> FStar_Set.union (freevars p) (freevars_list witnesses) | Pulse_Syntax_Base.Tm_While { Pulse_Syntax_Base.invariant = invariant; @@ -142,12 +140,10 @@ let rec (freevars_st : { Pulse_Syntax_Base.ctag1 = uu___; Pulse_Syntax_Base.u1 = uu___1; Pulse_Syntax_Base.typ = typ; Pulse_Syntax_Base.post3 = post;_} -> FStar_Set.union (freevars typ) (freevars_term_opt post) - | Pulse_Syntax_Base.Tm_Protect { Pulse_Syntax_Base.t3 = t1;_} -> - freevars_st t1 | Pulse_Syntax_Base.Tm_ProofHintWithBinders { Pulse_Syntax_Base.hint_type = uu___; Pulse_Syntax_Base.binders = binders; Pulse_Syntax_Base.v = v; - Pulse_Syntax_Base.t4 = t1;_} + Pulse_Syntax_Base.t3 = t1;_} -> FStar_Set.union (freevars v) (freevars_st t1) and (freevars_branches : (Pulse_Syntax_Base.pattern * Pulse_Syntax_Base.st_term) Prims.list -> @@ -247,16 +243,13 @@ let rec (ln_st' : Pulse_Syntax_Base.st_term -> Prims.int -> Prims.bool) = { Pulse_Syntax_Base.sc = sc; Pulse_Syntax_Base.returns_ = returns_; Pulse_Syntax_Base.brs = brs;_} -> ((ln' sc i) && (ln_opt' returns_ i)) && (ln_branches' t brs i) - | Pulse_Syntax_Base.Tm_IntroPure - { Pulse_Syntax_Base.p = p; - Pulse_Syntax_Base.should_check = uu___;_} - -> ln' p i + | Pulse_Syntax_Base.Tm_IntroPure { Pulse_Syntax_Base.p = p;_} -> + ln' p i | Pulse_Syntax_Base.Tm_ElimExists { Pulse_Syntax_Base.p1 = p;_} -> ln' p i | Pulse_Syntax_Base.Tm_IntroExists { Pulse_Syntax_Base.erased = uu___; Pulse_Syntax_Base.p2 = p; - Pulse_Syntax_Base.witnesses = witnesses; - Pulse_Syntax_Base.should_check1 = uu___1;_} + Pulse_Syntax_Base.witnesses = witnesses;_} -> (ln' p i) && (ln_list' witnesses i) | Pulse_Syntax_Base.Tm_While { Pulse_Syntax_Base.invariant = invariant; @@ -291,12 +284,10 @@ let rec (ln_st' : Pulse_Syntax_Base.st_term -> Prims.int -> Prims.bool) = { Pulse_Syntax_Base.ctag1 = uu___; Pulse_Syntax_Base.u1 = uu___1; Pulse_Syntax_Base.typ = typ; Pulse_Syntax_Base.post3 = post;_} -> (ln' typ i) && (ln_opt' post (i + Prims.int_one)) - | Pulse_Syntax_Base.Tm_Protect { Pulse_Syntax_Base.t3 = t1;_} -> - ln_st' t1 i | Pulse_Syntax_Base.Tm_ProofHintWithBinders { Pulse_Syntax_Base.hint_type = uu___; Pulse_Syntax_Base.binders = binders; Pulse_Syntax_Base.v = v; - Pulse_Syntax_Base.t4 = t1;_} + Pulse_Syntax_Base.t3 = t1;_} -> let n = FStar_List_Tot_Base.length binders in (ln' v (i + n)) && (ln_st' t1 (i + n)) @@ -602,29 +593,21 @@ let rec (subst_st_term : Pulse_Syntax_Base.returns_ = (subst_term_opt returns_ ss); Pulse_Syntax_Base.brs = (subst_branches t ss brs) } - | Pulse_Syntax_Base.Tm_IntroPure - { Pulse_Syntax_Base.p = p; - Pulse_Syntax_Base.should_check = should_check;_} - -> + | Pulse_Syntax_Base.Tm_IntroPure { Pulse_Syntax_Base.p = p;_} -> Pulse_Syntax_Base.Tm_IntroPure - { - Pulse_Syntax_Base.p = (subst_term p ss); - Pulse_Syntax_Base.should_check = should_check - } + { Pulse_Syntax_Base.p = (subst_term p ss) } | Pulse_Syntax_Base.Tm_ElimExists { Pulse_Syntax_Base.p1 = p;_} -> Pulse_Syntax_Base.Tm_ElimExists { Pulse_Syntax_Base.p1 = (subst_term p ss) } | Pulse_Syntax_Base.Tm_IntroExists { Pulse_Syntax_Base.erased = erased; Pulse_Syntax_Base.p2 = p; - Pulse_Syntax_Base.witnesses = witnesses; - Pulse_Syntax_Base.should_check1 = should_check;_} + Pulse_Syntax_Base.witnesses = witnesses;_} -> Pulse_Syntax_Base.Tm_IntroExists { Pulse_Syntax_Base.erased = erased; Pulse_Syntax_Base.p2 = (subst_term p ss); - Pulse_Syntax_Base.witnesses = (subst_term_list witnesses ss); - Pulse_Syntax_Base.should_check1 = should_check + Pulse_Syntax_Base.witnesses = (subst_term_list witnesses ss) } | Pulse_Syntax_Base.Tm_While { Pulse_Syntax_Base.invariant = invariant; @@ -689,13 +672,10 @@ let rec (subst_st_term : Pulse_Syntax_Base.post3 = (subst_term_opt post (shift_subst ss)) } - | Pulse_Syntax_Base.Tm_Protect { Pulse_Syntax_Base.t3 = t1;_} -> - Pulse_Syntax_Base.Tm_Protect - { Pulse_Syntax_Base.t3 = (subst_st_term t1 ss) } | Pulse_Syntax_Base.Tm_ProofHintWithBinders { Pulse_Syntax_Base.hint_type = hint_type; Pulse_Syntax_Base.binders = binders; Pulse_Syntax_Base.v = v; - Pulse_Syntax_Base.t4 = t1;_} + Pulse_Syntax_Base.t3 = t1;_} -> let n = FStar_List_Tot_Base.length binders in let ss1 = shift_subst_n n ss in @@ -704,7 +684,7 @@ let rec (subst_st_term : Pulse_Syntax_Base.hint_type = hint_type; Pulse_Syntax_Base.binders = binders; Pulse_Syntax_Base.v = (subst_term v ss1); - Pulse_Syntax_Base.t4 = (subst_st_term t1 ss1) + Pulse_Syntax_Base.t3 = (subst_st_term t1 ss1) } in { Pulse_Syntax_Base.term1 = t'; diff --git a/src/ocaml/plugin/generated/Pulse_Syntax_Printer.ml b/src/ocaml/plugin/generated/Pulse_Syntax_Printer.ml index 69a621f1e..9d0d220be 100644 --- a/src/ocaml/plugin/generated/Pulse_Syntax_Printer.ml +++ b/src/ocaml/plugin/generated/Pulse_Syntax_Printer.ml @@ -60,8 +60,8 @@ let rec (term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (46)) (Prims.of_int (8)) - (Prims.of_int (46)) (Prims.of_int (42))))) + (Prims.of_int (49)) (Prims.of_int (8)) + (Prims.of_int (49)) (Prims.of_int (42))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "prims.fst" @@ -82,13 +82,13 @@ let rec (term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (52)) (Prims.of_int (8)) - (Prims.of_int (52)) (Prims.of_int (34))))) + (Prims.of_int (55)) (Prims.of_int (8)) + (Prims.of_int (55)) (Prims.of_int (34))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (49)) (Prims.of_int (6)) - (Prims.of_int (52)) (Prims.of_int (34))))) + (Prims.of_int (52)) (Prims.of_int (6)) + (Prims.of_int (55)) (Prims.of_int (34))))) (Obj.magic (term_to_string' level p2)) (fun uu___ -> (fun uu___ -> @@ -98,17 +98,17 @@ let rec (term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (49)) - (Prims.of_int (6)) (Prims.of_int (52)) + (Prims.of_int (6)) + (Prims.of_int (55)) (Prims.of_int (34))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (49)) - (Prims.of_int (6)) (Prims.of_int (52)) + (Prims.of_int (6)) + (Prims.of_int (55)) (Prims.of_int (34))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -116,17 +116,17 @@ let rec (term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (49)) - (Prims.of_int (6)) (Prims.of_int (52)) + (Prims.of_int (6)) + (Prims.of_int (55)) (Prims.of_int (34))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (49)) - (Prims.of_int (6)) (Prims.of_int (52)) + (Prims.of_int (6)) + (Prims.of_int (55)) (Prims.of_int (34))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -134,9 +134,9 @@ let rec (term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (50)) + (Prims.of_int (53)) (Prims.of_int (8)) - (Prims.of_int (50)) + (Prims.of_int (53)) (Prims.of_int (34))))) (FStar_Sealed.seal (Obj.magic @@ -177,13 +177,13 @@ let rec (term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (59)) (Prims.of_int (14)) - (Prims.of_int (59)) (Prims.of_int (51))))) + (Prims.of_int (62)) (Prims.of_int (14)) + (Prims.of_int (62)) (Prims.of_int (51))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (55)) (Prims.of_int (6)) - (Prims.of_int (59)) (Prims.of_int (51))))) + (Prims.of_int (58)) (Prims.of_int (6)) + (Prims.of_int (62)) (Prims.of_int (51))))) (Obj.magic (term_to_string' (indent level) body)) (fun uu___1 -> (fun uu___1 -> @@ -193,17 +193,17 @@ let rec (term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (55)) + (Prims.of_int (58)) (Prims.of_int (6)) - (Prims.of_int (59)) + (Prims.of_int (62)) (Prims.of_int (51))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (55)) + (Prims.of_int (58)) (Prims.of_int (6)) - (Prims.of_int (59)) + (Prims.of_int (62)) (Prims.of_int (51))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -211,17 +211,17 @@ let rec (term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (55)) + (Prims.of_int (58)) (Prims.of_int (6)) - (Prims.of_int (59)) + (Prims.of_int (62)) (Prims.of_int (51))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (55)) + (Prims.of_int (58)) (Prims.of_int (6)) - (Prims.of_int (59)) + (Prims.of_int (62)) (Prims.of_int (51))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -229,17 +229,17 @@ let rec (term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (57)) + (Prims.of_int (60)) (Prims.of_int (14)) - (Prims.of_int (57)) + (Prims.of_int (60)) (Prims.of_int (58))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (55)) + (Prims.of_int (58)) (Prims.of_int (6)) - (Prims.of_int (59)) + (Prims.of_int (62)) (Prims.of_int (51))))) (Obj.magic (term_to_string' @@ -253,17 +253,17 @@ let rec (term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (55)) + (Prims.of_int (58)) (Prims.of_int (6)) - (Prims.of_int (59)) + (Prims.of_int (62)) (Prims.of_int (51))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (55)) + (Prims.of_int (58)) (Prims.of_int (6)) - (Prims.of_int (59)) + (Prims.of_int (62)) (Prims.of_int (51))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -271,9 +271,9 @@ let rec (term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (56)) + (Prims.of_int (59)) (Prims.of_int (14)) - (Prims.of_int (56)) + (Prims.of_int (59)) (Prims.of_int (45))))) (FStar_Sealed.seal (Obj.magic @@ -328,13 +328,13 @@ let rec (term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (66)) (Prims.of_int (14)) - (Prims.of_int (66)) (Prims.of_int (51))))) + (Prims.of_int (69)) (Prims.of_int (14)) + (Prims.of_int (69)) (Prims.of_int (51))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (62)) (Prims.of_int (6)) - (Prims.of_int (66)) (Prims.of_int (51))))) + (Prims.of_int (65)) (Prims.of_int (6)) + (Prims.of_int (69)) (Prims.of_int (51))))) (Obj.magic (term_to_string' (indent level) body)) (fun uu___ -> (fun uu___ -> @@ -344,17 +344,17 @@ let rec (term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (62)) + (Prims.of_int (65)) (Prims.of_int (6)) - (Prims.of_int (66)) + (Prims.of_int (69)) (Prims.of_int (51))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (62)) + (Prims.of_int (65)) (Prims.of_int (6)) - (Prims.of_int (66)) + (Prims.of_int (69)) (Prims.of_int (51))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -362,17 +362,17 @@ let rec (term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (62)) + (Prims.of_int (65)) (Prims.of_int (6)) - (Prims.of_int (66)) + (Prims.of_int (69)) (Prims.of_int (51))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (62)) + (Prims.of_int (65)) (Prims.of_int (6)) - (Prims.of_int (66)) + (Prims.of_int (69)) (Prims.of_int (51))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -380,17 +380,17 @@ let rec (term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (64)) + (Prims.of_int (67)) (Prims.of_int (14)) - (Prims.of_int (64)) + (Prims.of_int (67)) (Prims.of_int (58))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (62)) + (Prims.of_int (65)) (Prims.of_int (6)) - (Prims.of_int (66)) + (Prims.of_int (69)) (Prims.of_int (51))))) (Obj.magic (term_to_string' @@ -404,17 +404,17 @@ let rec (term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (62)) + (Prims.of_int (65)) (Prims.of_int (6)) - (Prims.of_int (66)) + (Prims.of_int (69)) (Prims.of_int (51))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (62)) + (Prims.of_int (65)) (Prims.of_int (6)) - (Prims.of_int (66)) + (Prims.of_int (69)) (Prims.of_int (51))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -422,9 +422,9 @@ let rec (term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (63)) + (Prims.of_int (66)) (Prims.of_int (14)) - (Prims.of_int (63)) + (Prims.of_int (66)) (Prims.of_int (45))))) (FStar_Sealed.seal (Obj.magic @@ -506,12 +506,12 @@ let (binder_to_string : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (80)) (Prims.of_int (12)) (Prims.of_int (80)) + (Prims.of_int (83)) (Prims.of_int (12)) (Prims.of_int (83)) (Prims.of_int (40))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (78)) (Prims.of_int (4)) (Prims.of_int (80)) + (Prims.of_int (81)) (Prims.of_int (4)) (Prims.of_int (83)) (Prims.of_int (40))))) (Obj.magic (term_to_string b.Pulse_Syntax_Base.binder_ty)) (fun uu___ -> @@ -521,20 +521,20 @@ let (binder_to_string : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (78)) (Prims.of_int (4)) - (Prims.of_int (80)) (Prims.of_int (40))))) + (Prims.of_int (81)) (Prims.of_int (4)) + (Prims.of_int (83)) (Prims.of_int (40))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (78)) (Prims.of_int (4)) - (Prims.of_int (80)) (Prims.of_int (40))))) + (Prims.of_int (81)) (Prims.of_int (4)) + (Prims.of_int (83)) (Prims.of_int (40))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (79)) (Prims.of_int (12)) - (Prims.of_int (79)) (Prims.of_int (43))))) + (Prims.of_int (82)) (Prims.of_int (12)) + (Prims.of_int (82)) (Prims.of_int (43))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "FStar.Printf.fst" @@ -553,6 +553,12 @@ let (binder_to_string : (fun uu___1 -> FStar_Tactics_Effect.lift_div_tac (fun uu___2 -> uu___1 uu___)))) uu___) +let (ctag_to_string : Pulse_Syntax_Base.ctag -> Prims.string) = + fun uu___ -> + match uu___ with + | Pulse_Syntax_Base.STT -> "ST" + | Pulse_Syntax_Base.STT_Atomic -> "STAtomic" + | Pulse_Syntax_Base.STT_Ghost -> "STGhost" let (comp_to_string : Pulse_Syntax_Base.comp -> (Prims.string, unit) FStar_Tactics_Effect.tac_repr) @@ -564,8 +570,8 @@ let (comp_to_string : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (86)) (Prims.of_int (23)) - (Prims.of_int (86)) (Prims.of_int (41))))) + (Prims.of_int (94)) (Prims.of_int (23)) + (Prims.of_int (94)) (Prims.of_int (41))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "prims.fst" (Prims.of_int (590)) @@ -579,13 +585,13 @@ let (comp_to_string : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (92)) (Prims.of_int (14)) - (Prims.of_int (92)) (Prims.of_int (37))))) + (Prims.of_int (100)) (Prims.of_int (14)) + (Prims.of_int (100)) (Prims.of_int (37))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (89)) (Prims.of_int (6)) (Prims.of_int (92)) - (Prims.of_int (37))))) + (Prims.of_int (97)) (Prims.of_int (6)) + (Prims.of_int (100)) (Prims.of_int (37))))) (Obj.magic (term_to_string s.Pulse_Syntax_Base.post)) (fun uu___ -> (fun uu___ -> @@ -594,27 +600,27 @@ let (comp_to_string : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (89)) (Prims.of_int (6)) - (Prims.of_int (92)) (Prims.of_int (37))))) + (Prims.of_int (97)) (Prims.of_int (6)) + (Prims.of_int (100)) (Prims.of_int (37))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (89)) (Prims.of_int (6)) - (Prims.of_int (92)) (Prims.of_int (37))))) + (Prims.of_int (97)) (Prims.of_int (6)) + (Prims.of_int (100)) (Prims.of_int (37))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (91)) (Prims.of_int (14)) - (Prims.of_int (91)) (Prims.of_int (36))))) + (Prims.of_int (99)) (Prims.of_int (14)) + (Prims.of_int (99)) (Prims.of_int (36))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (89)) (Prims.of_int (6)) - (Prims.of_int (92)) (Prims.of_int (37))))) + (Prims.of_int (97)) (Prims.of_int (6)) + (Prims.of_int (100)) (Prims.of_int (37))))) (Obj.magic (term_to_string s.Pulse_Syntax_Base.pre)) (fun uu___1 -> @@ -625,17 +631,17 @@ let (comp_to_string : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (89)) + (Prims.of_int (97)) (Prims.of_int (6)) - (Prims.of_int (92)) + (Prims.of_int (100)) (Prims.of_int (37))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (89)) + (Prims.of_int (97)) (Prims.of_int (6)) - (Prims.of_int (92)) + (Prims.of_int (100)) (Prims.of_int (37))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -643,9 +649,9 @@ let (comp_to_string : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (90)) + (Prims.of_int (98)) (Prims.of_int (14)) - (Prims.of_int (90)) + (Prims.of_int (98)) (Prims.of_int (36))))) (FStar_Sealed.seal (Obj.magic @@ -686,13 +692,13 @@ let (comp_to_string : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (99)) (Prims.of_int (14)) - (Prims.of_int (99)) (Prims.of_int (37))))) + (Prims.of_int (107)) (Prims.of_int (14)) + (Prims.of_int (107)) (Prims.of_int (37))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (95)) (Prims.of_int (6)) (Prims.of_int (99)) - (Prims.of_int (37))))) + (Prims.of_int (103)) (Prims.of_int (6)) + (Prims.of_int (107)) (Prims.of_int (37))))) (Obj.magic (term_to_string s.Pulse_Syntax_Base.post)) (fun uu___ -> (fun uu___ -> @@ -701,27 +707,27 @@ let (comp_to_string : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (95)) (Prims.of_int (6)) - (Prims.of_int (99)) (Prims.of_int (37))))) + (Prims.of_int (103)) (Prims.of_int (6)) + (Prims.of_int (107)) (Prims.of_int (37))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (95)) (Prims.of_int (6)) - (Prims.of_int (99)) (Prims.of_int (37))))) + (Prims.of_int (103)) (Prims.of_int (6)) + (Prims.of_int (107)) (Prims.of_int (37))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (98)) (Prims.of_int (14)) - (Prims.of_int (98)) (Prims.of_int (36))))) + (Prims.of_int (106)) (Prims.of_int (14)) + (Prims.of_int (106)) (Prims.of_int (36))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (95)) (Prims.of_int (6)) - (Prims.of_int (99)) (Prims.of_int (37))))) + (Prims.of_int (103)) (Prims.of_int (6)) + (Prims.of_int (107)) (Prims.of_int (37))))) (Obj.magic (term_to_string s.Pulse_Syntax_Base.pre)) (fun uu___1 -> @@ -732,17 +738,17 @@ let (comp_to_string : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (95)) + (Prims.of_int (103)) (Prims.of_int (6)) - (Prims.of_int (99)) + (Prims.of_int (107)) (Prims.of_int (37))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (95)) + (Prims.of_int (103)) (Prims.of_int (6)) - (Prims.of_int (99)) + (Prims.of_int (107)) (Prims.of_int (37))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -750,17 +756,17 @@ let (comp_to_string : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (97)) + (Prims.of_int (105)) (Prims.of_int (14)) - (Prims.of_int (97)) + (Prims.of_int (105)) (Prims.of_int (36))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (95)) + (Prims.of_int (103)) (Prims.of_int (6)) - (Prims.of_int (99)) + (Prims.of_int (107)) (Prims.of_int (37))))) (Obj.magic (term_to_string @@ -773,17 +779,17 @@ let (comp_to_string : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (95)) + (Prims.of_int (103)) (Prims.of_int (6)) - (Prims.of_int (99)) + (Prims.of_int (107)) (Prims.of_int (37))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (95)) + (Prims.of_int (103)) (Prims.of_int (6)) - (Prims.of_int (99)) + (Prims.of_int (107)) (Prims.of_int (37))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -791,9 +797,9 @@ let (comp_to_string : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (96)) + (Prims.of_int (104)) (Prims.of_int (14)) - (Prims.of_int (96)) + (Prims.of_int (104)) (Prims.of_int (37))))) (FStar_Sealed.seal (Obj.magic @@ -846,13 +852,13 @@ let (comp_to_string : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (106)) (Prims.of_int (14)) - (Prims.of_int (106)) (Prims.of_int (37))))) + (Prims.of_int (114)) (Prims.of_int (14)) + (Prims.of_int (114)) (Prims.of_int (37))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (102)) (Prims.of_int (6)) - (Prims.of_int (106)) (Prims.of_int (37))))) + (Prims.of_int (110)) (Prims.of_int (6)) + (Prims.of_int (114)) (Prims.of_int (37))))) (Obj.magic (term_to_string s.Pulse_Syntax_Base.post)) (fun uu___ -> (fun uu___ -> @@ -861,27 +867,27 @@ let (comp_to_string : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (102)) (Prims.of_int (6)) - (Prims.of_int (106)) (Prims.of_int (37))))) + (Prims.of_int (110)) (Prims.of_int (6)) + (Prims.of_int (114)) (Prims.of_int (37))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (102)) (Prims.of_int (6)) - (Prims.of_int (106)) (Prims.of_int (37))))) + (Prims.of_int (110)) (Prims.of_int (6)) + (Prims.of_int (114)) (Prims.of_int (37))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (105)) (Prims.of_int (14)) - (Prims.of_int (105)) (Prims.of_int (36))))) + (Prims.of_int (113)) (Prims.of_int (14)) + (Prims.of_int (113)) (Prims.of_int (36))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (102)) (Prims.of_int (6)) - (Prims.of_int (106)) (Prims.of_int (37))))) + (Prims.of_int (110)) (Prims.of_int (6)) + (Prims.of_int (114)) (Prims.of_int (37))))) (Obj.magic (term_to_string s.Pulse_Syntax_Base.pre)) (fun uu___1 -> @@ -892,17 +898,17 @@ let (comp_to_string : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (102)) + (Prims.of_int (110)) (Prims.of_int (6)) - (Prims.of_int (106)) + (Prims.of_int (114)) (Prims.of_int (37))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (102)) + (Prims.of_int (110)) (Prims.of_int (6)) - (Prims.of_int (106)) + (Prims.of_int (114)) (Prims.of_int (37))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -910,17 +916,17 @@ let (comp_to_string : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (104)) + (Prims.of_int (112)) (Prims.of_int (14)) - (Prims.of_int (104)) + (Prims.of_int (112)) (Prims.of_int (36))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (102)) + (Prims.of_int (110)) (Prims.of_int (6)) - (Prims.of_int (106)) + (Prims.of_int (114)) (Prims.of_int (37))))) (Obj.magic (term_to_string @@ -933,17 +939,17 @@ let (comp_to_string : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (102)) + (Prims.of_int (110)) (Prims.of_int (6)) - (Prims.of_int (106)) + (Prims.of_int (114)) (Prims.of_int (37))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (102)) + (Prims.of_int (110)) (Prims.of_int (6)) - (Prims.of_int (106)) + (Prims.of_int (114)) (Prims.of_int (37))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -951,9 +957,9 @@ let (comp_to_string : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (103)) + (Prims.of_int (111)) (Prims.of_int (14)) - (Prims.of_int (103)) + (Prims.of_int (111)) (Prims.of_int (37))))) (FStar_Sealed.seal (Obj.magic @@ -1024,12 +1030,12 @@ let (term_list_to_string : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (116)) (Prims.of_int (22)) - (Prims.of_int (116)) (Prims.of_int (46))))) + (Prims.of_int (124)) (Prims.of_int (22)) + (Prims.of_int (124)) (Prims.of_int (46))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (116)) (Prims.of_int (4)) (Prims.of_int (116)) + (Prims.of_int (124)) (Prims.of_int (4)) (Prims.of_int (124)) (Prims.of_int (46))))) (Obj.magic (FStar_Tactics_Util.map term_to_string t)) (fun uu___ -> @@ -1052,8 +1058,8 @@ let rec (st_term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (128)) (Prims.of_int (8)) - (Prims.of_int (128)) (Prims.of_int (29))))) + (Prims.of_int (136)) (Prims.of_int (8)) + (Prims.of_int (136)) (Prims.of_int (29))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "prims.fst" (Prims.of_int (590)) @@ -1083,13 +1089,13 @@ let rec (st_term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (135)) (Prims.of_int (8)) - (Prims.of_int (135)) (Prims.of_int (28))))) + (Prims.of_int (143)) (Prims.of_int (8)) + (Prims.of_int (143)) (Prims.of_int (28))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (131)) (Prims.of_int (6)) - (Prims.of_int (135)) (Prims.of_int (28))))) + (Prims.of_int (139)) (Prims.of_int (6)) + (Prims.of_int (143)) (Prims.of_int (28))))) (Obj.magic (term_to_string arg)) (fun uu___ -> (fun uu___ -> @@ -1098,28 +1104,28 @@ let rec (st_term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (131)) (Prims.of_int (6)) - (Prims.of_int (135)) (Prims.of_int (28))))) + (Prims.of_int (139)) (Prims.of_int (6)) + (Prims.of_int (143)) (Prims.of_int (28))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (131)) (Prims.of_int (6)) - (Prims.of_int (135)) (Prims.of_int (28))))) + (Prims.of_int (139)) (Prims.of_int (6)) + (Prims.of_int (143)) (Prims.of_int (28))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (131)) (Prims.of_int (6)) - (Prims.of_int (135)) + (Prims.of_int (139)) (Prims.of_int (6)) + (Prims.of_int (143)) (Prims.of_int (28))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (131)) (Prims.of_int (6)) - (Prims.of_int (135)) + (Prims.of_int (139)) (Prims.of_int (6)) + (Prims.of_int (143)) (Prims.of_int (28))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -1127,9 +1133,9 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (133)) + (Prims.of_int (141)) (Prims.of_int (8)) - (Prims.of_int (133)) + (Prims.of_int (141)) (Prims.of_int (29))))) (FStar_Sealed.seal (Obj.magic @@ -1172,288 +1178,137 @@ let rec (st_term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (138)) (Prims.of_int (9)) - (Prims.of_int (138)) (Prims.of_int (49))))) + (Prims.of_int (156)) (Prims.of_int (10)) + (Prims.of_int (156)) (Prims.of_int (41))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (138)) (Prims.of_int (6)) - (Prims.of_int (149)) (Prims.of_int (7))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (138)) (Prims.of_int (9)) - (Prims.of_int (138)) (Prims.of_int (43))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (138)) (Prims.of_int (9)) - (Prims.of_int (138)) (Prims.of_int (49))))) - (Obj.magic - (FStar_Tactics_Unseal.unseal - (binder.Pulse_Syntax_Base.binder_ppname).Pulse_Syntax_Base.name)) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> uu___ = "_")))) + (Prims.of_int (152)) (Prims.of_int (8)) + (Prims.of_int (156)) (Prims.of_int (41))))) + (Obj.magic (st_term_to_string' level body)) (fun uu___ -> (fun uu___ -> - if uu___ - then - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Syntax.Printer.fst" - (Prims.of_int (142)) (Prims.of_int (19)) - (Prims.of_int (142)) (Prims.of_int (50))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Syntax.Printer.fst" - (Prims.of_int (139)) (Prims.of_int (11)) - (Prims.of_int (142)) (Prims.of_int (50))))) - (Obj.magic (st_term_to_string' level body)) - (fun uu___1 -> - (fun uu___1 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Syntax.Printer.fst" - (Prims.of_int (139)) - (Prims.of_int (11)) - (Prims.of_int (142)) - (Prims.of_int (50))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Syntax.Printer.fst" - (Prims.of_int (139)) - (Prims.of_int (11)) - (Prims.of_int (142)) - (Prims.of_int (50))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Syntax.Printer.fst" - (Prims.of_int (139)) - (Prims.of_int (11)) - (Prims.of_int (142)) - (Prims.of_int (50))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Syntax.Printer.fst" - (Prims.of_int (139)) - (Prims.of_int (11)) - (Prims.of_int (142)) - (Prims.of_int (50))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Syntax.Printer.fst" - (Prims.of_int (140)) - (Prims.of_int (19)) - (Prims.of_int (140)) - (Prims.of_int (50))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "FStar.Printf.fst" - (Prims.of_int (121)) - (Prims.of_int (8)) - (Prims.of_int (123)) - (Prims.of_int (44))))) - (Obj.magic - (st_term_to_string' level - head)) - (fun uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> - fun x -> - fun x1 -> - Prims.strcat - (Prims.strcat - (Prims.strcat - "" - ( - Prims.strcat - uu___2 - ";\n")) - (Prims.strcat - x "")) - (Prims.strcat - x1 ""))))) - (fun uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> uu___2 level)))) - (fun uu___2 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> uu___2 uu___1)))) - uu___1)) - else - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Syntax.Printer.fst" - (Prims.of_int (148)) (Prims.of_int (10)) - (Prims.of_int (148)) (Prims.of_int (41))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Syntax.Printer.fst" - (Prims.of_int (143)) (Prims.of_int (11)) - (Prims.of_int (149)) (Prims.of_int (7))))) - (Obj.magic (st_term_to_string' level body)) - (fun uu___2 -> - (fun uu___2 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Syntax.Printer.fst" - (Prims.of_int (143)) - (Prims.of_int (11)) - (Prims.of_int (149)) - (Prims.of_int (7))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Syntax.Printer.fst" - (Prims.of_int (143)) - (Prims.of_int (11)) - (Prims.of_int (149)) - (Prims.of_int (7))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Syntax.Printer.fst" - (Prims.of_int (143)) - (Prims.of_int (11)) - (Prims.of_int (149)) - (Prims.of_int (7))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Syntax.Printer.fst" - (Prims.of_int (143)) - (Prims.of_int (11)) - (Prims.of_int (149)) - (Prims.of_int (7))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Syntax.Printer.fst" - (Prims.of_int (146)) - (Prims.of_int (10)) - (Prims.of_int (146)) - (Prims.of_int (41))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Syntax.Printer.fst" - (Prims.of_int (143)) - (Prims.of_int (11)) - (Prims.of_int (149)) - (Prims.of_int (7))))) - (Obj.magic - (st_term_to_string' level - head)) - (fun uu___3 -> - (fun uu___3 -> - Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Syntax.Printer.fst" - (Prims.of_int (143)) - (Prims.of_int (11)) - (Prims.of_int (149)) - (Prims.of_int (7))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range - "Pulse.Syntax.Printer.fst" - (Prims.of_int (143)) - (Prims.of_int (11)) - (Prims.of_int (149)) - (Prims.of_int (7))))) - (Obj.magic - (FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - ( - Obj.magic - (FStar_Range.mk_range - "Pulse.Syntax.Printer.fst" - (Prims.of_int (145)) - (Prims.of_int (10)) - (Prims.of_int (145)) - (Prims.of_int (35))))) - (FStar_Sealed.seal - ( - Obj.magic - (FStar_Range.mk_range - "FStar.Printf.fst" - (Prims.of_int (121)) - (Prims.of_int (8)) - (Prims.of_int (123)) - (Prims.of_int (44))))) - (Obj.magic + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" + (Prims.of_int (152)) (Prims.of_int (8)) + (Prims.of_int (156)) (Prims.of_int (41))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" + (Prims.of_int (152)) (Prims.of_int (8)) + (Prims.of_int (156)) (Prims.of_int (41))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Syntax.Printer.fst" + (Prims.of_int (152)) (Prims.of_int (8)) + (Prims.of_int (156)) + (Prims.of_int (41))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Syntax.Printer.fst" + (Prims.of_int (152)) (Prims.of_int (8)) + (Prims.of_int (156)) + (Prims.of_int (41))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Syntax.Printer.fst" + (Prims.of_int (154)) + (Prims.of_int (10)) + (Prims.of_int (154)) + (Prims.of_int (41))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Syntax.Printer.fst" + (Prims.of_int (152)) + (Prims.of_int (8)) + (Prims.of_int (156)) + (Prims.of_int (41))))) + (Obj.magic (st_term_to_string' level head)) + (fun uu___1 -> + (fun uu___1 -> + Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Syntax.Printer.fst" + (Prims.of_int (152)) + (Prims.of_int (8)) + (Prims.of_int (156)) + (Prims.of_int (41))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Syntax.Printer.fst" + (Prims.of_int (152)) + (Prims.of_int (8)) + (Prims.of_int (156)) + (Prims.of_int (41))))) + (Obj.magic + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Syntax.Printer.fst" + (Prims.of_int (153)) + (Prims.of_int (10)) + (Prims.of_int (153)) + (Prims.of_int (35))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (binder_to_string + binder)) + (fun uu___2 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___3 -> + fun x -> + fun x1 -> + fun x2 -> + Prims.strcat ( - binder_to_string - binder)) - (fun uu___4 - -> - FStar_Tactics_Effect.lift_div_tac - (fun - uu___5 -> - fun x -> - fun x1 -> - fun x2 -> Prims.strcat (Prims.strcat (Prims.strcat - (Prims.strcat "let " (Prims.strcat - uu___4 + uu___2 " = ")) (Prims.strcat x ";\n")) (Prims.strcat x1 "")) - (Prims.strcat + ( + Prims.strcat x2 ""))))) - (fun uu___4 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___5 - -> - uu___4 - uu___3)))) - uu___3))) - (fun uu___3 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___4 -> uu___3 level)))) - (fun uu___3 -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___4 -> uu___3 uu___2)))) - uu___2))) uu___) + (fun uu___2 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___3 -> + uu___2 uu___1)))) + uu___1))) + (fun uu___1 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> uu___1 level)))) + (fun uu___1 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___2 -> uu___1 uu___)))) uu___) | Pulse_Syntax_Base.Tm_TotBind { Pulse_Syntax_Base.head2 = head; Pulse_Syntax_Base.body2 = body;_} -> @@ -1461,13 +1316,13 @@ let rec (st_term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (155)) (Prims.of_int (8)) - (Prims.of_int (155)) (Prims.of_int (39))))) + (Prims.of_int (163)) (Prims.of_int (8)) + (Prims.of_int (163)) (Prims.of_int (39))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (152)) (Prims.of_int (6)) - (Prims.of_int (155)) (Prims.of_int (39))))) + (Prims.of_int (160)) (Prims.of_int (6)) + (Prims.of_int (163)) (Prims.of_int (39))))) (Obj.magic (st_term_to_string' level body)) (fun uu___ -> (fun uu___ -> @@ -1476,28 +1331,28 @@ let rec (st_term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (152)) (Prims.of_int (6)) - (Prims.of_int (155)) (Prims.of_int (39))))) + (Prims.of_int (160)) (Prims.of_int (6)) + (Prims.of_int (163)) (Prims.of_int (39))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (152)) (Prims.of_int (6)) - (Prims.of_int (155)) (Prims.of_int (39))))) + (Prims.of_int (160)) (Prims.of_int (6)) + (Prims.of_int (163)) (Prims.of_int (39))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (152)) (Prims.of_int (6)) - (Prims.of_int (155)) + (Prims.of_int (160)) (Prims.of_int (6)) + (Prims.of_int (163)) (Prims.of_int (39))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (152)) (Prims.of_int (6)) - (Prims.of_int (155)) + (Prims.of_int (160)) (Prims.of_int (6)) + (Prims.of_int (163)) (Prims.of_int (39))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -1505,9 +1360,9 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (153)) + (Prims.of_int (161)) (Prims.of_int (8)) - (Prims.of_int (153)) + (Prims.of_int (161)) (Prims.of_int (29))))) (FStar_Sealed.seal (Obj.magic @@ -1546,13 +1401,13 @@ let rec (st_term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (163)) (Prims.of_int (14)) - (Prims.of_int (163)) (Prims.of_int (54))))) + (Prims.of_int (171)) (Prims.of_int (14)) + (Prims.of_int (171)) (Prims.of_int (54))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (158)) (Prims.of_int (6)) - (Prims.of_int (163)) (Prims.of_int (54))))) + (Prims.of_int (166)) (Prims.of_int (6)) + (Prims.of_int (171)) (Prims.of_int (54))))) (Obj.magic (st_term_to_string' (indent level) body)) (fun uu___ -> (fun uu___ -> @@ -1561,28 +1416,28 @@ let rec (st_term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (158)) (Prims.of_int (6)) - (Prims.of_int (163)) (Prims.of_int (54))))) + (Prims.of_int (166)) (Prims.of_int (6)) + (Prims.of_int (171)) (Prims.of_int (54))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (158)) (Prims.of_int (6)) - (Prims.of_int (163)) (Prims.of_int (54))))) + (Prims.of_int (166)) (Prims.of_int (6)) + (Prims.of_int (171)) (Prims.of_int (54))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (158)) (Prims.of_int (6)) - (Prims.of_int (163)) + (Prims.of_int (166)) (Prims.of_int (6)) + (Prims.of_int (171)) (Prims.of_int (54))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (158)) (Prims.of_int (6)) - (Prims.of_int (163)) + (Prims.of_int (166)) (Prims.of_int (6)) + (Prims.of_int (171)) (Prims.of_int (54))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -1590,17 +1445,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (161)) + (Prims.of_int (169)) (Prims.of_int (14)) - (Prims.of_int (161)) + (Prims.of_int (169)) (Prims.of_int (32))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (158)) + (Prims.of_int (166)) (Prims.of_int (6)) - (Prims.of_int (163)) + (Prims.of_int (171)) (Prims.of_int (54))))) (Obj.magic (comp_to_string c)) (fun uu___1 -> @@ -1611,17 +1466,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (158)) + (Prims.of_int (166)) (Prims.of_int (6)) - (Prims.of_int (163)) + (Prims.of_int (171)) (Prims.of_int (54))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (158)) + (Prims.of_int (166)) (Prims.of_int (6)) - (Prims.of_int (163)) + (Prims.of_int (171)) (Prims.of_int (54))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -1629,9 +1484,9 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (160)) + (Prims.of_int (168)) (Prims.of_int (14)) - (Prims.of_int (160)) + (Prims.of_int (168)) (Prims.of_int (34))))) (FStar_Sealed.seal (Obj.magic @@ -1690,25 +1545,25 @@ let rec (st_term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (166)) (Prims.of_int (6)) - (Prims.of_int (176)) (Prims.of_int (13))))) + (Prims.of_int (174)) (Prims.of_int (6)) + (Prims.of_int (184)) (Prims.of_int (13))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (166)) (Prims.of_int (6)) - (Prims.of_int (176)) (Prims.of_int (13))))) + (Prims.of_int (174)) (Prims.of_int (6)) + (Prims.of_int (184)) (Prims.of_int (13))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (175)) (Prims.of_int (8)) - (Prims.of_int (175)) (Prims.of_int (49))))) + (Prims.of_int (183)) (Prims.of_int (8)) + (Prims.of_int (183)) (Prims.of_int (49))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (166)) (Prims.of_int (6)) - (Prims.of_int (176)) (Prims.of_int (13))))) + (Prims.of_int (174)) (Prims.of_int (6)) + (Prims.of_int (184)) (Prims.of_int (13))))) (Obj.magic (st_term_to_string' (indent level) else_)) (fun uu___1 -> (fun uu___1 -> @@ -1718,15 +1573,15 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (166)) (Prims.of_int (6)) - (Prims.of_int (176)) + (Prims.of_int (174)) (Prims.of_int (6)) + (Prims.of_int (184)) (Prims.of_int (13))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (166)) (Prims.of_int (6)) - (Prims.of_int (176)) + (Prims.of_int (174)) (Prims.of_int (6)) + (Prims.of_int (184)) (Prims.of_int (13))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -1734,17 +1589,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (166)) + (Prims.of_int (174)) (Prims.of_int (6)) - (Prims.of_int (176)) + (Prims.of_int (184)) (Prims.of_int (13))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (166)) + (Prims.of_int (174)) (Prims.of_int (6)) - (Prims.of_int (176)) + (Prims.of_int (184)) (Prims.of_int (13))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -1752,17 +1607,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (166)) + (Prims.of_int (174)) (Prims.of_int (6)) - (Prims.of_int (176)) + (Prims.of_int (184)) (Prims.of_int (13))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (166)) + (Prims.of_int (174)) (Prims.of_int (6)) - (Prims.of_int (176)) + (Prims.of_int (184)) (Prims.of_int (13))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -1770,17 +1625,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (166)) + (Prims.of_int (174)) (Prims.of_int (6)) - (Prims.of_int (176)) + (Prims.of_int (184)) (Prims.of_int (13))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (166)) + (Prims.of_int (174)) (Prims.of_int (6)) - (Prims.of_int (176)) + (Prims.of_int (184)) (Prims.of_int (13))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -1788,17 +1643,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (166)) + (Prims.of_int (174)) (Prims.of_int (6)) - (Prims.of_int (176)) + (Prims.of_int (184)) (Prims.of_int (13))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (166)) + (Prims.of_int (174)) (Prims.of_int (6)) - (Prims.of_int (176)) + (Prims.of_int (184)) (Prims.of_int (13))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -1806,17 +1661,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (170)) + (Prims.of_int (178)) (Prims.of_int (8)) - (Prims.of_int (170)) + (Prims.of_int (178)) (Prims.of_int (49))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (166)) + (Prims.of_int (174)) (Prims.of_int (6)) - (Prims.of_int (176)) + (Prims.of_int (184)) (Prims.of_int (13))))) (Obj.magic (st_term_to_string' @@ -1831,17 +1686,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (166)) + (Prims.of_int (174)) (Prims.of_int (6)) - (Prims.of_int (176)) + (Prims.of_int (184)) (Prims.of_int (13))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (166)) + (Prims.of_int (174)) (Prims.of_int (6)) - (Prims.of_int (176)) + (Prims.of_int (184)) (Prims.of_int (13))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -1849,17 +1704,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (166)) + (Prims.of_int (174)) (Prims.of_int (6)) - (Prims.of_int (176)) + (Prims.of_int (184)) (Prims.of_int (13))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (166)) + (Prims.of_int (174)) (Prims.of_int (6)) - (Prims.of_int (176)) + (Prims.of_int (184)) (Prims.of_int (13))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -1867,17 +1722,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (166)) + (Prims.of_int (174)) (Prims.of_int (6)) - (Prims.of_int (176)) + (Prims.of_int (184)) (Prims.of_int (13))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (166)) + (Prims.of_int (174)) (Prims.of_int (6)) - (Prims.of_int (176)) + (Prims.of_int (184)) (Prims.of_int (13))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -1885,9 +1740,9 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (167)) + (Prims.of_int (175)) (Prims.of_int (8)) - (Prims.of_int (167)) + (Prims.of_int (175)) (Prims.of_int (26))))) (FStar_Sealed.seal (Obj.magic @@ -1997,13 +1852,13 @@ let rec (st_term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (181)) (Prims.of_int (8)) - (Prims.of_int (181)) (Prims.of_int (32))))) + (Prims.of_int (189)) (Prims.of_int (8)) + (Prims.of_int (189)) (Prims.of_int (32))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (179)) (Prims.of_int (6)) - (Prims.of_int (181)) (Prims.of_int (32))))) + (Prims.of_int (187)) (Prims.of_int (6)) + (Prims.of_int (189)) (Prims.of_int (32))))) (Obj.magic (branches_to_string brs)) (fun uu___1 -> (fun uu___1 -> @@ -2012,21 +1867,21 @@ let rec (st_term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (179)) (Prims.of_int (6)) - (Prims.of_int (181)) (Prims.of_int (32))))) + (Prims.of_int (187)) (Prims.of_int (6)) + (Prims.of_int (189)) (Prims.of_int (32))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (179)) (Prims.of_int (6)) - (Prims.of_int (181)) (Prims.of_int (32))))) + (Prims.of_int (187)) (Prims.of_int (6)) + (Prims.of_int (189)) (Prims.of_int (32))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (180)) (Prims.of_int (8)) - (Prims.of_int (180)) + (Prims.of_int (188)) (Prims.of_int (8)) + (Prims.of_int (188)) (Prims.of_int (27))))) (FStar_Sealed.seal (Obj.magic @@ -2046,36 +1901,33 @@ let rec (st_term_to_string' : (fun uu___2 -> FStar_Tactics_Effect.lift_div_tac (fun uu___3 -> uu___2 uu___1)))) uu___1) - | Pulse_Syntax_Base.Tm_IntroPure - { Pulse_Syntax_Base.p = p; - Pulse_Syntax_Base.should_check = uu___;_} - -> + | Pulse_Syntax_Base.Tm_IntroPure { Pulse_Syntax_Base.p = p;_} -> FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (186)) (Prims.of_int (8)) - (Prims.of_int (186)) (Prims.of_int (42))))) + (Prims.of_int (194)) (Prims.of_int (8)) + (Prims.of_int (194)) (Prims.of_int (42))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "prims.fst" (Prims.of_int (590)) (Prims.of_int (19)) (Prims.of_int (590)) (Prims.of_int (31))))) (Obj.magic (term_to_string' (indent level) p)) - (fun uu___1 -> + (fun uu___ -> FStar_Tactics_Effect.lift_div_tac - (fun uu___2 -> + (fun uu___1 -> Prims.strcat (Prims.strcat "introduce pure (\n" (Prims.strcat (indent level) "")) - (Prims.strcat uu___1 ")"))) + (Prims.strcat uu___ ")"))) | Pulse_Syntax_Base.Tm_ElimExists { Pulse_Syntax_Base.p1 = p;_} -> FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (190)) (Prims.of_int (8)) - (Prims.of_int (190)) (Prims.of_int (26))))) + (Prims.of_int (198)) (Prims.of_int (8)) + (Prims.of_int (198)) (Prims.of_int (26))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "prims.fst" (Prims.of_int (590)) @@ -2087,50 +1939,49 @@ let rec (st_term_to_string' : Prims.strcat "elim_exists " (Prims.strcat uu___ ""))) | Pulse_Syntax_Base.Tm_IntroExists { Pulse_Syntax_Base.erased = false; Pulse_Syntax_Base.p2 = p; - Pulse_Syntax_Base.witnesses = witnesses; - Pulse_Syntax_Base.should_check1 = uu___;_} + Pulse_Syntax_Base.witnesses = witnesses;_} -> FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (197)) (Prims.of_int (8)) - (Prims.of_int (197)) (Prims.of_int (43))))) + (Prims.of_int (205)) (Prims.of_int (8)) + (Prims.of_int (205)) (Prims.of_int (43))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (193)) (Prims.of_int (6)) - (Prims.of_int (197)) (Prims.of_int (43))))) + (Prims.of_int (201)) (Prims.of_int (6)) + (Prims.of_int (205)) (Prims.of_int (43))))) (Obj.magic (term_list_to_string " " witnesses)) - (fun uu___1 -> - (fun uu___1 -> + (fun uu___ -> + (fun uu___ -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (193)) (Prims.of_int (6)) - (Prims.of_int (197)) (Prims.of_int (43))))) + (Prims.of_int (201)) (Prims.of_int (6)) + (Prims.of_int (205)) (Prims.of_int (43))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (193)) (Prims.of_int (6)) - (Prims.of_int (197)) (Prims.of_int (43))))) + (Prims.of_int (201)) (Prims.of_int (6)) + (Prims.of_int (205)) (Prims.of_int (43))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (193)) (Prims.of_int (6)) - (Prims.of_int (197)) + (Prims.of_int (201)) (Prims.of_int (6)) + (Prims.of_int (205)) (Prims.of_int (43))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (193)) (Prims.of_int (6)) - (Prims.of_int (197)) + (Prims.of_int (201)) (Prims.of_int (6)) + (Prims.of_int (205)) (Prims.of_int (43))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -2138,9 +1989,9 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (195)) + (Prims.of_int (203)) (Prims.of_int (8)) - (Prims.of_int (195)) + (Prims.of_int (203)) (Prims.of_int (42))))) (FStar_Sealed.seal (Obj.magic @@ -2152,9 +2003,9 @@ let rec (st_term_to_string' : (Prims.of_int (44))))) (Obj.magic (term_to_string' (indent level) p)) - (fun uu___2 -> + (fun uu___1 -> FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> + (fun uu___2 -> fun x -> fun x1 -> Prims.strcat @@ -2165,62 +2016,61 @@ let rec (st_term_to_string' : (Prims.strcat (indent level) "")) - (Prims.strcat uu___2 + (Prims.strcat uu___1 "\n")) (Prims.strcat x "with ")) (Prims.strcat x1 ""))))) - (fun uu___2 -> + (fun uu___1 -> FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> uu___2 level)))) - (fun uu___2 -> + (fun uu___2 -> uu___1 level)))) + (fun uu___1 -> FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> uu___2 uu___1)))) uu___1) + (fun uu___2 -> uu___1 uu___)))) uu___) | Pulse_Syntax_Base.Tm_IntroExists { Pulse_Syntax_Base.erased = true; Pulse_Syntax_Base.p2 = p; - Pulse_Syntax_Base.witnesses = witnesses; - Pulse_Syntax_Base.should_check1 = uu___;_} + Pulse_Syntax_Base.witnesses = witnesses;_} -> FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (204)) (Prims.of_int (8)) - (Prims.of_int (204)) (Prims.of_int (43))))) + (Prims.of_int (212)) (Prims.of_int (8)) + (Prims.of_int (212)) (Prims.of_int (43))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (200)) (Prims.of_int (6)) - (Prims.of_int (204)) (Prims.of_int (43))))) + (Prims.of_int (208)) (Prims.of_int (6)) + (Prims.of_int (212)) (Prims.of_int (43))))) (Obj.magic (term_list_to_string " " witnesses)) - (fun uu___1 -> - (fun uu___1 -> + (fun uu___ -> + (fun uu___ -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (200)) (Prims.of_int (6)) - (Prims.of_int (204)) (Prims.of_int (43))))) + (Prims.of_int (208)) (Prims.of_int (6)) + (Prims.of_int (212)) (Prims.of_int (43))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (200)) (Prims.of_int (6)) - (Prims.of_int (204)) (Prims.of_int (43))))) + (Prims.of_int (208)) (Prims.of_int (6)) + (Prims.of_int (212)) (Prims.of_int (43))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (200)) (Prims.of_int (6)) - (Prims.of_int (204)) + (Prims.of_int (208)) (Prims.of_int (6)) + (Prims.of_int (212)) (Prims.of_int (43))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (200)) (Prims.of_int (6)) - (Prims.of_int (204)) + (Prims.of_int (208)) (Prims.of_int (6)) + (Prims.of_int (212)) (Prims.of_int (43))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -2228,9 +2078,9 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (202)) + (Prims.of_int (210)) (Prims.of_int (8)) - (Prims.of_int (202)) + (Prims.of_int (210)) (Prims.of_int (42))))) (FStar_Sealed.seal (Obj.magic @@ -2242,9 +2092,9 @@ let rec (st_term_to_string' : (Prims.of_int (44))))) (Obj.magic (term_to_string' (indent level) p)) - (fun uu___2 -> + (fun uu___1 -> FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> + (fun uu___2 -> fun x -> fun x1 -> Prims.strcat @@ -2255,16 +2105,16 @@ let rec (st_term_to_string' : (Prims.strcat (indent level) "")) - (Prims.strcat uu___2 + (Prims.strcat uu___1 "\n")) (Prims.strcat x "with ")) (Prims.strcat x1 ""))))) - (fun uu___2 -> + (fun uu___1 -> FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> uu___2 level)))) - (fun uu___2 -> + (fun uu___2 -> uu___1 level)))) + (fun uu___1 -> FStar_Tactics_Effect.lift_div_tac - (fun uu___3 -> uu___2 uu___1)))) uu___1) + (fun uu___2 -> uu___1 uu___)))) uu___) | Pulse_Syntax_Base.Tm_While { Pulse_Syntax_Base.invariant = invariant; Pulse_Syntax_Base.condition = condition; @@ -2275,25 +2125,25 @@ let rec (st_term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (207)) (Prims.of_int (6)) - (Prims.of_int (214)) (Prims.of_int (13))))) + (Prims.of_int (215)) (Prims.of_int (6)) + (Prims.of_int (222)) (Prims.of_int (13))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (207)) (Prims.of_int (6)) - (Prims.of_int (214)) (Prims.of_int (13))))) + (Prims.of_int (215)) (Prims.of_int (6)) + (Prims.of_int (222)) (Prims.of_int (13))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (213)) (Prims.of_int (8)) - (Prims.of_int (213)) (Prims.of_int (48))))) + (Prims.of_int (221)) (Prims.of_int (8)) + (Prims.of_int (221)) (Prims.of_int (48))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (207)) (Prims.of_int (6)) - (Prims.of_int (214)) (Prims.of_int (13))))) + (Prims.of_int (215)) (Prims.of_int (6)) + (Prims.of_int (222)) (Prims.of_int (13))))) (Obj.magic (st_term_to_string' (indent level) body)) (fun uu___1 -> (fun uu___1 -> @@ -2303,15 +2153,15 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (207)) (Prims.of_int (6)) - (Prims.of_int (214)) + (Prims.of_int (215)) (Prims.of_int (6)) + (Prims.of_int (222)) (Prims.of_int (13))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (207)) (Prims.of_int (6)) - (Prims.of_int (214)) + (Prims.of_int (215)) (Prims.of_int (6)) + (Prims.of_int (222)) (Prims.of_int (13))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -2319,17 +2169,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (207)) + (Prims.of_int (215)) (Prims.of_int (6)) - (Prims.of_int (214)) + (Prims.of_int (222)) (Prims.of_int (13))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (207)) + (Prims.of_int (215)) (Prims.of_int (6)) - (Prims.of_int (214)) + (Prims.of_int (222)) (Prims.of_int (13))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -2337,17 +2187,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (207)) + (Prims.of_int (215)) (Prims.of_int (6)) - (Prims.of_int (214)) + (Prims.of_int (222)) (Prims.of_int (13))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (207)) + (Prims.of_int (215)) (Prims.of_int (6)) - (Prims.of_int (214)) + (Prims.of_int (222)) (Prims.of_int (13))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -2355,17 +2205,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (210)) + (Prims.of_int (218)) (Prims.of_int (8)) - (Prims.of_int (210)) + (Prims.of_int (218)) (Prims.of_int (34))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (207)) + (Prims.of_int (215)) (Prims.of_int (6)) - (Prims.of_int (214)) + (Prims.of_int (222)) (Prims.of_int (13))))) (Obj.magic (term_to_string invariant)) @@ -2377,17 +2227,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (207)) + (Prims.of_int (215)) (Prims.of_int (6)) - (Prims.of_int (214)) + (Prims.of_int (222)) (Prims.of_int (13))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (207)) + (Prims.of_int (215)) (Prims.of_int (6)) - (Prims.of_int (214)) + (Prims.of_int (222)) (Prims.of_int (13))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -2395,17 +2245,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (207)) + (Prims.of_int (215)) (Prims.of_int (6)) - (Prims.of_int (214)) + (Prims.of_int (222)) (Prims.of_int (13))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (207)) + (Prims.of_int (215)) (Prims.of_int (6)) - (Prims.of_int (214)) + (Prims.of_int (222)) (Prims.of_int (13))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -2413,9 +2263,9 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (208)) + (Prims.of_int (216)) (Prims.of_int (8)) - (Prims.of_int (208)) + (Prims.of_int (216)) (Prims.of_int (44))))) (FStar_Sealed.seal (Obj.magic @@ -2498,13 +2348,13 @@ let rec (st_term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (223)) (Prims.of_int (8)) - (Prims.of_int (223)) (Prims.of_int (30))))) + (Prims.of_int (231)) (Prims.of_int (8)) + (Prims.of_int (231)) (Prims.of_int (30))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (217)) (Prims.of_int (6)) - (Prims.of_int (223)) (Prims.of_int (30))))) + (Prims.of_int (225)) (Prims.of_int (6)) + (Prims.of_int (231)) (Prims.of_int (30))))) (Obj.magic (term_to_string post2)) (fun uu___ -> (fun uu___ -> @@ -2513,28 +2363,28 @@ let rec (st_term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (217)) (Prims.of_int (6)) - (Prims.of_int (223)) (Prims.of_int (30))))) + (Prims.of_int (225)) (Prims.of_int (6)) + (Prims.of_int (231)) (Prims.of_int (30))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (217)) (Prims.of_int (6)) - (Prims.of_int (223)) (Prims.of_int (30))))) + (Prims.of_int (225)) (Prims.of_int (6)) + (Prims.of_int (231)) (Prims.of_int (30))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (222)) (Prims.of_int (8)) - (Prims.of_int (222)) + (Prims.of_int (230)) (Prims.of_int (8)) + (Prims.of_int (230)) (Prims.of_int (40))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (217)) (Prims.of_int (6)) - (Prims.of_int (223)) + (Prims.of_int (225)) (Prims.of_int (6)) + (Prims.of_int (231)) (Prims.of_int (30))))) (Obj.magic (st_term_to_string' level body2)) (fun uu___1 -> @@ -2545,17 +2395,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (217)) + (Prims.of_int (225)) (Prims.of_int (6)) - (Prims.of_int (223)) + (Prims.of_int (231)) (Prims.of_int (30))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (217)) + (Prims.of_int (225)) (Prims.of_int (6)) - (Prims.of_int (223)) + (Prims.of_int (231)) (Prims.of_int (30))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -2563,17 +2413,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (221)) + (Prims.of_int (229)) (Prims.of_int (8)) - (Prims.of_int (221)) + (Prims.of_int (229)) (Prims.of_int (29))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (217)) + (Prims.of_int (225)) (Prims.of_int (6)) - (Prims.of_int (223)) + (Prims.of_int (231)) (Prims.of_int (30))))) (Obj.magic (term_to_string pre2)) @@ -2585,17 +2435,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (217)) + (Prims.of_int (225)) (Prims.of_int (6)) - (Prims.of_int (223)) + (Prims.of_int (231)) (Prims.of_int (30))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (217)) + (Prims.of_int (225)) (Prims.of_int (6)) - (Prims.of_int (223)) + (Prims.of_int (231)) (Prims.of_int (30))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -2603,17 +2453,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (220)) + (Prims.of_int (228)) (Prims.of_int (8)) - (Prims.of_int (220)) + (Prims.of_int (228)) (Prims.of_int (30))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (217)) + (Prims.of_int (225)) (Prims.of_int (6)) - (Prims.of_int (223)) + (Prims.of_int (231)) (Prims.of_int (30))))) (Obj.magic (term_to_string @@ -2627,17 +2477,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (217)) + (Prims.of_int (225)) (Prims.of_int (6)) - (Prims.of_int (223)) + (Prims.of_int (231)) (Prims.of_int (30))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (217)) + (Prims.of_int (225)) (Prims.of_int (6)) - (Prims.of_int (223)) + (Prims.of_int (231)) (Prims.of_int (30))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -2645,17 +2495,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (219)) + (Prims.of_int (227)) (Prims.of_int (8)) - (Prims.of_int (219)) + (Prims.of_int (227)) (Prims.of_int (40))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (217)) + (Prims.of_int (225)) (Prims.of_int (6)) - (Prims.of_int (223)) + (Prims.of_int (231)) (Prims.of_int (30))))) (Obj.magic (st_term_to_string' @@ -2671,17 +2521,17 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (217)) + (Prims.of_int (225)) (Prims.of_int (6)) - (Prims.of_int (223)) + (Prims.of_int (231)) (Prims.of_int (30))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (217)) + (Prims.of_int (225)) (Prims.of_int (6)) - (Prims.of_int (223)) + (Prims.of_int (231)) (Prims.of_int (30))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -2689,9 +2539,9 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (218)) + (Prims.of_int (226)) (Prims.of_int (8)) - (Prims.of_int (218)) + (Prims.of_int (226)) (Prims.of_int (29))))) (FStar_Sealed.seal (Obj.magic @@ -2769,13 +2619,13 @@ let rec (st_term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (228)) (Prims.of_int (15)) - (Prims.of_int (228)) (Prims.of_int (34))))) + (Prims.of_int (236)) (Prims.of_int (15)) + (Prims.of_int (236)) (Prims.of_int (34))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (226)) (Prims.of_int (7)) - (Prims.of_int (228)) (Prims.of_int (34))))) + (Prims.of_int (234)) (Prims.of_int (7)) + (Prims.of_int (236)) (Prims.of_int (34))))) (Obj.magic (term_to_string t2)) (fun uu___ -> (fun uu___ -> @@ -2784,21 +2634,21 @@ let rec (st_term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (226)) (Prims.of_int (7)) - (Prims.of_int (228)) (Prims.of_int (34))))) + (Prims.of_int (234)) (Prims.of_int (7)) + (Prims.of_int (236)) (Prims.of_int (34))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (226)) (Prims.of_int (7)) - (Prims.of_int (228)) (Prims.of_int (34))))) + (Prims.of_int (234)) (Prims.of_int (7)) + (Prims.of_int (236)) (Prims.of_int (34))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (227)) (Prims.of_int (8)) - (Prims.of_int (227)) + (Prims.of_int (235)) (Prims.of_int (8)) + (Prims.of_int (235)) (Prims.of_int (27))))) (FStar_Sealed.seal (Obj.magic @@ -2827,13 +2677,13 @@ let rec (st_term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (234)) (Prims.of_int (8)) - (Prims.of_int (234)) (Prims.of_int (39))))) + (Prims.of_int (242)) (Prims.of_int (8)) + (Prims.of_int (242)) (Prims.of_int (39))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (231)) (Prims.of_int (6)) - (Prims.of_int (234)) (Prims.of_int (39))))) + (Prims.of_int (239)) (Prims.of_int (6)) + (Prims.of_int (242)) (Prims.of_int (39))))) (Obj.magic (st_term_to_string' level body)) (fun uu___1 -> (fun uu___1 -> @@ -2842,28 +2692,28 @@ let rec (st_term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (231)) (Prims.of_int (6)) - (Prims.of_int (234)) (Prims.of_int (39))))) + (Prims.of_int (239)) (Prims.of_int (6)) + (Prims.of_int (242)) (Prims.of_int (39))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (231)) (Prims.of_int (6)) - (Prims.of_int (234)) (Prims.of_int (39))))) + (Prims.of_int (239)) (Prims.of_int (6)) + (Prims.of_int (242)) (Prims.of_int (39))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (231)) (Prims.of_int (6)) - (Prims.of_int (234)) + (Prims.of_int (239)) (Prims.of_int (6)) + (Prims.of_int (242)) (Prims.of_int (39))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (231)) (Prims.of_int (6)) - (Prims.of_int (234)) + (Prims.of_int (239)) (Prims.of_int (6)) + (Prims.of_int (242)) (Prims.of_int (39))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -2871,9 +2721,9 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (232)) + (Prims.of_int (240)) (Prims.of_int (8)) - (Prims.of_int (232)) + (Prims.of_int (240)) (Prims.of_int (36))))) (FStar_Sealed.seal (Obj.magic @@ -2911,13 +2761,13 @@ let rec (st_term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (244)) (Prims.of_int (8)) - (Prims.of_int (246)) (Prims.of_int (60))))) + (Prims.of_int (252)) (Prims.of_int (8)) + (Prims.of_int (254)) (Prims.of_int (60))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (237)) (Prims.of_int (6)) - (Prims.of_int (246)) (Prims.of_int (60))))) + (Prims.of_int (245)) (Prims.of_int (6)) + (Prims.of_int (254)) (Prims.of_int (60))))) (match post with | FStar_Pervasives_Native.None -> Obj.magic @@ -2931,8 +2781,8 @@ let rec (st_term_to_string' : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (246)) (Prims.of_int (38)) - (Prims.of_int (246)) (Prims.of_int (59))))) + (Prims.of_int (254)) (Prims.of_int (38)) + (Prims.of_int (254)) (Prims.of_int (59))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "prims.fst" @@ -2950,21 +2800,21 @@ let rec (st_term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (237)) (Prims.of_int (6)) - (Prims.of_int (246)) (Prims.of_int (60))))) + (Prims.of_int (245)) (Prims.of_int (6)) + (Prims.of_int (254)) (Prims.of_int (60))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (237)) (Prims.of_int (6)) - (Prims.of_int (246)) (Prims.of_int (60))))) + (Prims.of_int (245)) (Prims.of_int (6)) + (Prims.of_int (254)) (Prims.of_int (60))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (243)) (Prims.of_int (8)) - (Prims.of_int (243)) + (Prims.of_int (251)) (Prims.of_int (8)) + (Prims.of_int (251)) (Prims.of_int (28))))) (FStar_Sealed.seal (Obj.magic @@ -3000,41 +2850,22 @@ let rec (st_term_to_string' : (fun uu___1 -> FStar_Tactics_Effect.lift_div_tac (fun uu___2 -> uu___1 uu___)))) uu___) - | Pulse_Syntax_Base.Tm_Protect { Pulse_Syntax_Base.t3 = t1;_} -> - FStar_Tactics_Effect.tac_bind - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (251)) (Prims.of_int (6)) - (Prims.of_int (251)) (Prims.of_int (34))))) - (FStar_Sealed.seal - (Obj.magic - (FStar_Range.mk_range "prims.fst" (Prims.of_int (590)) - (Prims.of_int (19)) (Prims.of_int (590)) - (Prims.of_int (31))))) - (Obj.magic (st_term_to_string' level t1)) - (fun uu___ -> - FStar_Tactics_Effect.lift_div_tac - (fun uu___1 -> - Prims.strcat - (Prims.strcat "Protect(\n" (Prims.strcat level "")) - (Prims.strcat uu___ ")"))) | Pulse_Syntax_Base.Tm_ProofHintWithBinders { Pulse_Syntax_Base.hint_type = uu___; Pulse_Syntax_Base.binders = binders; Pulse_Syntax_Base.v = v; - Pulse_Syntax_Base.t4 = t1;_} + Pulse_Syntax_Base.t3 = t1;_} -> FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (256)) (Prims.of_int (8)) - (Prims.of_int (256)) (Prims.of_int (36))))) + (Prims.of_int (262)) (Prims.of_int (8)) + (Prims.of_int (262)) (Prims.of_int (36))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (254)) (Prims.of_int (6)) - (Prims.of_int (256)) (Prims.of_int (36))))) + (Prims.of_int (257)) (Prims.of_int (6)) + (Prims.of_int (262)) (Prims.of_int (36))))) (Obj.magic (st_term_to_string' level t1)) (fun uu___1 -> (fun uu___1 -> @@ -3043,21 +2874,21 @@ let rec (st_term_to_string' : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (254)) (Prims.of_int (6)) - (Prims.of_int (256)) (Prims.of_int (36))))) + (Prims.of_int (257)) (Prims.of_int (6)) + (Prims.of_int (262)) (Prims.of_int (36))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (254)) (Prims.of_int (6)) - (Prims.of_int (256)) (Prims.of_int (36))))) + (Prims.of_int (257)) (Prims.of_int (6)) + (Prims.of_int (262)) (Prims.of_int (36))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (255)) (Prims.of_int (8)) - (Prims.of_int (255)) + (Prims.of_int (261)) (Prims.of_int (8)) + (Prims.of_int (261)) (Prims.of_int (26))))) (FStar_Sealed.seal (Obj.magic @@ -3071,7 +2902,27 @@ let rec (st_term_to_string' : (fun uu___3 -> fun x -> Prims.strcat - (Prims.strcat "assert " + (Prims.strcat + (Prims.strcat "assert " + (Prims.strcat + (if + (FStar_List_Tot_Base.length + binders) + = Prims.int_zero + then "" + else + Prims.strcat "" + (Prims.strcat + (FStar_List_Tot_Base.fold_left + (fun s -> + fun _b -> + Prims.strcat + "" + ( + Prims.strcat + s " _")) + "" binders) ".")) + "")) (Prims.strcat uu___2 " in\n")) (Prims.strcat x ""))))) (fun uu___2 -> @@ -3094,13 +2945,13 @@ and (branches_to_string : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (261)) (Prims.of_int (13)) - (Prims.of_int (261)) (Prims.of_int (31))))) + (Prims.of_int (267)) (Prims.of_int (13)) + (Prims.of_int (267)) (Prims.of_int (31))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (261)) (Prims.of_int (13)) - (Prims.of_int (261)) (Prims.of_int (55))))) + (Prims.of_int (267)) (Prims.of_int (13)) + (Prims.of_int (267)) (Prims.of_int (55))))) (Obj.magic (branch_to_string b)) (fun uu___ -> (fun uu___ -> @@ -3110,9 +2961,9 @@ and (branches_to_string : (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (261)) + (Prims.of_int (267)) (Prims.of_int (34)) - (Prims.of_int (261)) + (Prims.of_int (267)) (Prims.of_int (55))))) (FStar_Sealed.seal (Obj.magic @@ -3135,12 +2986,12 @@ and (branch_to_string : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (264)) (Prims.of_int (17)) (Prims.of_int (264)) + (Prims.of_int (270)) (Prims.of_int (17)) (Prims.of_int (270)) (Prims.of_int (19))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (263)) (Prims.of_int (35)) (Prims.of_int (265)) + (Prims.of_int (269)) (Prims.of_int (35)) (Prims.of_int (271)) (Prims.of_int (25))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> br)) (fun uu___ -> @@ -3182,7 +3033,6 @@ let (tag_of_st_term : Pulse_Syntax_Base.st_term -> Prims.string) = | Pulse_Syntax_Base.Tm_WithLocal uu___ -> "Tm_WithLocal" | Pulse_Syntax_Base.Tm_Rewrite uu___ -> "Tm_Rewrite" | Pulse_Syntax_Base.Tm_Admit uu___ -> "Tm_Admit" - | Pulse_Syntax_Base.Tm_Protect uu___ -> "Tm_Protect" | Pulse_Syntax_Base.Tm_ProofHintWithBinders uu___ -> "Tm_ProofHintWithBinders" let (tag_of_comp : @@ -3207,8 +3057,8 @@ let (tag_of_comp : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (308)) (Prims.of_int (31)) - (Prims.of_int (308)) (Prims.of_int (49))))) + (Prims.of_int (312)) (Prims.of_int (31)) + (Prims.of_int (312)) (Prims.of_int (49))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "prims.fst" @@ -3226,8 +3076,8 @@ let (tag_of_comp : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Syntax.Printer.fst" - (Prims.of_int (310)) (Prims.of_int (30)) - (Prims.of_int (310)) (Prims.of_int (48))))) + (Prims.of_int (314)) (Prims.of_int (30)) + (Prims.of_int (314)) (Prims.of_int (48))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "prims.fst" @@ -3243,7 +3093,6 @@ let rec (print_st_head : Pulse_Syntax_Base.st_term -> Prims.string) = fun t -> match t.Pulse_Syntax_Base.term1 with | Pulse_Syntax_Base.Tm_Abs uu___ -> "Abs" - | Pulse_Syntax_Base.Tm_Protect p -> print_st_head p.Pulse_Syntax_Base.t3 | Pulse_Syntax_Base.Tm_Return p -> print_head p.Pulse_Syntax_Base.term | Pulse_Syntax_Base.Tm_Bind uu___ -> "Bind" | Pulse_Syntax_Base.Tm_TotBind uu___ -> "TotBind" @@ -3272,8 +3121,6 @@ let rec (print_skel : Pulse_Syntax_Base.st_term -> Prims.string) = Pulse_Syntax_Base.ascription = uu___2; Pulse_Syntax_Base.body = body;_} -> Prims.strcat "(fun _ -> " (Prims.strcat (print_skel body) ")") - | Pulse_Syntax_Base.Tm_Protect { Pulse_Syntax_Base.t3 = p;_} -> - Prims.strcat "(Protect " (Prims.strcat (print_skel p) ")") | Pulse_Syntax_Base.Tm_Return { Pulse_Syntax_Base.ctag = uu___; Pulse_Syntax_Base.insert_eq = uu___1; Pulse_Syntax_Base.term = p;_} diff --git a/src/ocaml/plugin/generated/Pulse_Syntax_Pure.ml b/src/ocaml/plugin/generated/Pulse_Syntax_Pure.ml index ec971226f..afe283701 100644 --- a/src/ocaml/plugin/generated/Pulse_Syntax_Pure.ml +++ b/src/ocaml/plugin/generated/Pulse_Syntax_Pure.ml @@ -373,7 +373,7 @@ let (unreveal : (Pulse_Syntax_Base.Implicit), uu___) -> (match is_fvar head1 with - | FStar_Pervasives_Native.Some (l, []) -> + | FStar_Pervasives_Native.Some (l, uu___1) -> if l = ["FStar"; "Ghost"; "reveal"] then FStar_Pervasives_Native.Some arg else FStar_Pervasives_Native.None diff --git a/src/ocaml/plugin/generated/Pulse_Typing.ml b/src/ocaml/plugin/generated/Pulse_Typing.ml index 8336d30ee..af88b5d4b 100644 --- a/src/ocaml/plugin/generated/Pulse_Typing.ml +++ b/src/ocaml/plugin/generated/Pulse_Typing.ml @@ -959,6 +959,7 @@ let uu___is_TBR uu___6 uu___5 uu___4 uu___3 uu___2 uu___1 uu___ uu___7 = type post_hint_t = { g: Pulse_Typing_Env.env ; + ctag_hint: Pulse_Syntax_Base.ctag FStar_Pervasives_Native.option ; ret_ty: Pulse_Syntax_Base.term ; u: Pulse_Syntax_Base.universe ; ty_typing: unit ; @@ -967,23 +968,28 @@ type post_hint_t = let (__proj__Mkpost_hint_t__item__g : post_hint_t -> Pulse_Typing_Env.env) = fun projectee -> match projectee with - | { g; ret_ty; u; ty_typing; post; post_typing;_} -> g + | { g; ctag_hint; ret_ty; u; ty_typing; post; post_typing;_} -> g +let (__proj__Mkpost_hint_t__item__ctag_hint : + post_hint_t -> Pulse_Syntax_Base.ctag FStar_Pervasives_Native.option) = + fun projectee -> + match projectee with + | { g; ctag_hint; ret_ty; u; ty_typing; post; post_typing;_} -> ctag_hint let (__proj__Mkpost_hint_t__item__ret_ty : post_hint_t -> Pulse_Syntax_Base.term) = fun projectee -> match projectee with - | { g; ret_ty; u; ty_typing; post; post_typing;_} -> ret_ty + | { g; ctag_hint; ret_ty; u; ty_typing; post; post_typing;_} -> ret_ty let (__proj__Mkpost_hint_t__item__u : post_hint_t -> Pulse_Syntax_Base.universe) = fun projectee -> match projectee with - | { g; ret_ty; u; ty_typing; post; post_typing;_} -> u + | { g; ctag_hint; ret_ty; u; ty_typing; post; post_typing;_} -> u let (__proj__Mkpost_hint_t__item__post : post_hint_t -> Pulse_Syntax_Base.term) = fun projectee -> match projectee with - | { g; ret_ty; u; ty_typing; post; post_typing;_} -> post + | { g; ctag_hint; ret_ty; u; ty_typing; post; post_typing;_} -> post type ('g, 'p) post_hint_for_env_p = unit type 'g post_hint_for_env = post_hint_t type 'g post_hint_opt = post_hint_t FStar_Pervasives_Native.option diff --git a/src/ocaml/plugin/generated/Pulse_Typing_Combinators.ml b/src/ocaml/plugin/generated/Pulse_Typing_Combinators.ml index b81e90c50..ab68e13d0 100644 --- a/src/ocaml/plugin/generated/Pulse_Typing_Combinators.ml +++ b/src/ocaml/plugin/generated/Pulse_Typing_Combinators.ml @@ -57,14 +57,14 @@ let rec (mk_bind : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (40)) (Prims.of_int (13)) - (Prims.of_int (40)) (Prims.of_int (15))))) + (Prims.of_int (121)) (Prims.of_int (13)) + (Prims.of_int (121)) (Prims.of_int (15))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (39)) (Prims.of_int (38)) - (Prims.of_int (121)) (Prims.of_int (82))))) + (Prims.of_int (120)) (Prims.of_int (38)) + (Prims.of_int (202)) (Prims.of_int (82))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> px)) (fun uu___ -> @@ -77,17 +77,17 @@ let rec (mk_bind : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (41)) + (Prims.of_int (122)) (Prims.of_int (10)) - (Prims.of_int (41)) + (Prims.of_int (122)) (Prims.of_int (41))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (42)) + (Prims.of_int (123)) (Prims.of_int (2)) - (Prims.of_int (121)) + (Prims.of_int (202)) (Prims.of_int (82))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___2 -> @@ -266,17 +266,17 @@ let rec (mk_bind : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (66)) + (Prims.of_int (147)) (Prims.of_int (14)) - (Prims.of_int (66)) + (Prims.of_int (147)) (Prims.of_int (69))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (68)) + (Prims.of_int (149)) (Prims.of_int (6)) - (Prims.of_int (68)) + (Prims.of_int (149)) (Prims.of_int (63))))) (Obj.magic (Pulse_Checker_Pure.get_non_informative_witness @@ -339,17 +339,17 @@ let rec (mk_bind : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (74)) + (Prims.of_int (155)) (Prims.of_int (14)) - (Prims.of_int (74)) + (Prims.of_int (155)) (Prims.of_int (69))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (76)) + (Prims.of_int (157)) (Prims.of_int (6)) - (Prims.of_int (76)) + (Prims.of_int (157)) (Prims.of_int (63))))) (Obj.magic (Pulse_Checker_Pure.get_non_informative_witness @@ -498,17 +498,17 @@ let rec (mk_bind : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (93)) + (Prims.of_int (174)) (Prims.of_int (14)) - (Prims.of_int (93)) + (Prims.of_int (174)) (Prims.of_int (69))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (93)) + (Prims.of_int (174)) (Prims.of_int (72)) - (Prims.of_int (97)) + (Prims.of_int (178)) (Prims.of_int (81))))) (Obj.magic (Pulse_Checker_Pure.get_non_informative_witness @@ -525,17 +525,17 @@ let rec (mk_bind : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (94)) + (Prims.of_int (175)) (Prims.of_int (21)) - (Prims.of_int (94)) + (Prims.of_int (175)) (Prims.of_int (59))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (94)) + (Prims.of_int (175)) (Prims.of_int (62)) - (Prims.of_int (97)) + (Prims.of_int (178)) (Prims.of_int (81))))) (FStar_Tactics_Effect.lift_div_tac (fun @@ -555,17 +555,17 @@ let rec (mk_bind : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (96)) + (Prims.of_int (177)) (Prims.of_int (8)) - (Prims.of_int (96)) + (Prims.of_int (177)) (Prims.of_int (65))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (97)) + (Prims.of_int (178)) (Prims.of_int (6)) - (Prims.of_int (97)) + (Prims.of_int (178)) (Prims.of_int (81))))) (FStar_Tactics_Effect.lift_div_tac (fun @@ -615,17 +615,17 @@ let rec (mk_bind : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (103)) + (Prims.of_int (184)) (Prims.of_int (15)) - (Prims.of_int (103)) + (Prims.of_int (184)) (Prims.of_int (54))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (103)) + (Prims.of_int (184)) (Prims.of_int (57)) - (Prims.of_int (109)) + (Prims.of_int (190)) (Prims.of_int (19))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___4 @@ -644,17 +644,17 @@ let rec (mk_bind : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (104)) + (Prims.of_int (185)) (Prims.of_int (14)) - (Prims.of_int (104)) + (Prims.of_int (185)) (Prims.of_int (70))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (104)) + (Prims.of_int (185)) (Prims.of_int (73)) - (Prims.of_int (109)) + (Prims.of_int (190)) (Prims.of_int (19))))) (Obj.magic (Pulse_Checker_Pure.get_non_informative_witness @@ -672,17 +672,17 @@ let rec (mk_bind : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (105)) + (Prims.of_int (186)) (Prims.of_int (21)) - (Prims.of_int (105)) + (Prims.of_int (186)) (Prims.of_int (59))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (105)) + (Prims.of_int (186)) (Prims.of_int (62)) - (Prims.of_int (109)) + (Prims.of_int (190)) (Prims.of_int (19))))) (FStar_Tactics_Effect.lift_div_tac (fun @@ -702,17 +702,17 @@ let rec (mk_bind : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (107)) + (Prims.of_int (188)) (Prims.of_int (8)) - (Prims.of_int (107)) + (Prims.of_int (188)) (Prims.of_int (66))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (107)) + (Prims.of_int (188)) (Prims.of_int (69)) - (Prims.of_int (109)) + (Prims.of_int (190)) (Prims.of_int (19))))) (FStar_Tactics_Effect.lift_div_tac (fun @@ -744,17 +744,17 @@ let rec (mk_bind : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (108)) + (Prims.of_int (189)) (Prims.of_int (26)) - (Prims.of_int (108)) + (Prims.of_int (189)) (Prims.of_int (101))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (107)) + (Prims.of_int (188)) (Prims.of_int (69)) - (Prims.of_int (109)) + (Prims.of_int (190)) (Prims.of_int (19))))) (Obj.magic (mk_bind @@ -802,17 +802,17 @@ let rec (mk_bind : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (115)) + (Prims.of_int (196)) (Prims.of_int (21)) - (Prims.of_int (115)) + (Prims.of_int (196)) (Prims.of_int (46))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (115)) + (Prims.of_int (196)) (Prims.of_int (49)) - (Prims.of_int (118)) + (Prims.of_int (199)) (Prims.of_int (81))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___5 @@ -830,17 +830,17 @@ let rec (mk_bind : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (117)) + (Prims.of_int (198)) (Prims.of_int (8)) - (Prims.of_int (117)) + (Prims.of_int (198)) (Prims.of_int (58))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (118)) + (Prims.of_int (199)) (Prims.of_int (6)) - (Prims.of_int (118)) + (Prims.of_int (199)) (Prims.of_int (81))))) (FStar_Tactics_Effect.lift_div_tac (fun @@ -904,17 +904,17 @@ let (bind_res_and_post_typing : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (133)) + (Prims.of_int (214)) (Prims.of_int (32)) - (Prims.of_int (133)) + (Prims.of_int (214)) (Prims.of_int (55))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (130)) + (Prims.of_int (211)) (Prims.of_int (13)) - (Prims.of_int (144)) + (Prims.of_int (225)) (Prims.of_int (7))))) (Obj.magic (Pulse_Checker_Pure.check_universe g @@ -944,17 +944,17 @@ let (bind_res_and_post_typing : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (137)) + (Prims.of_int (218)) (Prims.of_int (23)) - (Prims.of_int (137)) + (Prims.of_int (218)) (Prims.of_int (122))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (137)) + (Prims.of_int (218)) (Prims.of_int (11)) - (Prims.of_int (137)) + (Prims.of_int (218)) (Prims.of_int (122))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -962,9 +962,9 @@ let (bind_res_and_post_typing : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (137)) + (Prims.of_int (218)) (Prims.of_int (95)) - (Prims.of_int (137)) + (Prims.of_int (218)) (Prims.of_int (121))))) (FStar_Sealed.seal (Obj.magic @@ -1003,17 +1003,17 @@ let (bind_res_and_post_typing : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (139)) + (Prims.of_int (220)) (Prims.of_int (16)) - (Prims.of_int (139)) + (Prims.of_int (220)) (Prims.of_int (17))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (139)) + (Prims.of_int (220)) (Prims.of_int (20)) - (Prims.of_int (143)) + (Prims.of_int (224)) (Prims.of_int (31))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___3 -> x)) @@ -1025,17 +1025,17 @@ let (bind_res_and_post_typing : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (140)) + (Prims.of_int (221)) (Prims.of_int (29)) - (Prims.of_int (140)) + (Prims.of_int (221)) (Prims.of_int (61))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (140)) + (Prims.of_int (221)) (Prims.of_int (64)) - (Prims.of_int (143)) + (Prims.of_int (224)) (Prims.of_int (31))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___3 @@ -1054,17 +1054,17 @@ let (bind_res_and_post_typing : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (142)) + (Prims.of_int (223)) (Prims.of_int (10)) - (Prims.of_int (142)) + (Prims.of_int (223)) (Prims.of_int (87))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Combinators.fst" - (Prims.of_int (143)) + (Prims.of_int (224)) (Prims.of_int (8)) - (Prims.of_int (143)) + (Prims.of_int (224)) (Prims.of_int (31))))) (Obj.magic (Pulse_Checker_Pure.check_vprop_with_core @@ -1118,4 +1118,91 @@ let (add_frame : fun frame_typing -> FStar_Pervasives.Mkdtuple3 (t, (Pulse_Typing.add_frame c frame), - (Pulse_Typing.T_Frame (g, t, c, frame, (), t_typing))) \ No newline at end of file + (Pulse_Typing.T_Frame (g, t, c, frame, (), t_typing))) +type ('g, 'ctxt, 'req) frame_for_req_in_ctxt = + (Pulse_Syntax_Base.term, unit, unit) FStar_Pervasives.dtuple3 +let (frame_of : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.term -> + (unit, unit, unit) frame_for_req_in_ctxt -> Pulse_Syntax_Base.term) + = + fun g -> + fun ctxt -> + fun req -> + fun f -> + let uu___ = f in + match uu___ with + | FStar_Pervasives.Mkdtuple3 (frame, uu___1, uu___2) -> frame +let (apply_frame : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.st_term -> + Pulse_Syntax_Base.term -> + unit -> + Pulse_Syntax_Base.comp -> + (unit, unit, unit) Pulse_Typing.st_typing -> + (unit, unit, unit) frame_for_req_in_ctxt -> + (Pulse_Syntax_Base.comp_st, + (unit, unit, unit) Pulse_Typing.st_typing) Prims.dtuple2) + = + fun g -> + fun t -> + fun ctxt -> + fun ctxt_typing -> + fun c -> + fun t_typing -> + fun frame_t -> + let s = Pulse_Syntax_Base.st_comp_of_comp c in + let uu___ = frame_t in + match uu___ with + | FStar_Pervasives.Mkdtuple3 (frame, frame_typing, ve) -> + let t_typing1 = + Pulse_Typing.T_Frame (g, t, c, frame, (), t_typing) in + let c' = Pulse_Typing.add_frame c frame in + let c'_typing = + Pulse_Typing_Metatheory_Base.st_typing_correctness g t + (Pulse_Typing.add_frame c frame) t_typing1 in + let s' = Pulse_Syntax_Base.st_comp_of_comp c' in + let s'' = + { + Pulse_Syntax_Base.u = (s'.Pulse_Syntax_Base.u); + Pulse_Syntax_Base.res = (s'.Pulse_Syntax_Base.res); + Pulse_Syntax_Base.pre = ctxt; + Pulse_Syntax_Base.post = (s'.Pulse_Syntax_Base.post) + } in + let c'' = Pulse_Syntax_Base.with_st_comp c' s'' in + let st_typing = + Pulse_Typing_Metatheory_Base.comp_typing_inversion g + (Pulse_Typing.add_frame c frame) c'_typing in + let uu___1 = + Pulse_Typing_Metatheory_Base.st_comp_typing_inversion g + (Pulse_Syntax_Base.st_comp_of_comp + (Pulse_Typing.add_frame c frame)) st_typing in + (match uu___1 with + | FStar_Pervasives.Mkdtuple4 + (res_typing, pre_typing, x, post_typing) -> + let st_equiv = + Pulse_Typing.ST_VPropEquiv + (g, c', c'', x, (), (), (), (), ()) in + let t_typing2 = + Pulse_Typing.T_Equiv + (g, t, (Pulse_Typing.add_frame c frame), c'', + t_typing1, st_equiv) in + Prims.Mkdtuple2 (c'', t_typing2)) +type ('g, 'ctxt, 'postuhint) st_typing_in_ctxt = + (Pulse_Syntax_Base.st_term, Pulse_Syntax_Base.comp_st, + (unit, unit, unit) Pulse_Typing.st_typing) FStar_Pervasives.dtuple3 +let rec (vprop_as_list : + Pulse_Syntax_Base.term -> Pulse_Syntax_Base.term Prims.list) = + fun vp -> + match vp.Pulse_Syntax_Base.t with + | Pulse_Syntax_Base.Tm_Emp -> [] + | Pulse_Syntax_Base.Tm_Star (vp0, vp1) -> + FStar_List_Tot_Base.op_At (vprop_as_list vp0) (vprop_as_list vp1) + | uu___ -> [vp] +let rec (list_as_vprop : + Pulse_Syntax_Base.term Prims.list -> Pulse_Syntax_Base.term) = + fun vps -> + match vps with + | [] -> Pulse_Syntax_Base.tm_emp + | hd::tl -> Pulse_Syntax_Base.tm_star hd (list_as_vprop tl) \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Typing_Env.ml b/src/ocaml/plugin/generated/Pulse_Typing_Env.ml index ebf8533a8..a417111e9 100644 --- a/src/ocaml/plugin/generated/Pulse_Typing_Env.ml +++ b/src/ocaml/plugin/generated/Pulse_Typing_Env.ml @@ -52,6 +52,13 @@ let (push_binding : m = (FStar_Map.upd g.m x t); ctxt = (g.ctxt) } +let (singleton_env : + FStar_Reflection_Typing.fstar_top_env -> + Pulse_Syntax_Base.var -> Pulse_Syntax_Base.typ -> env) + = + fun f -> + fun x -> + fun t -> push_binding (mk_env f) x Pulse_Syntax_Base.ppname_default t let (push_binding_def : env -> Pulse_Syntax_Base.var -> Pulse_Syntax_Base.typ -> env) = fun g -> @@ -86,6 +93,7 @@ let (fresh : env -> Pulse_Syntax_Base.var) = let (contains : env -> Pulse_Syntax_Base.var -> Prims.bool) = fun g -> fun x -> FStar_Map.contains (as_map g) x type ('g1, 'g2) disjoint = unit +type ('g, 'gu, 'guu) pairwise_disjoint = unit let (push_env : env -> env -> env) = fun g1 -> fun g2 -> @@ -96,6 +104,14 @@ let (push_env : env -> env -> env) = m = (FStar_Map.concat g2.m g1.m); ctxt = (g1.ctxt) } +let (check_disjoint : + env -> Pulse_Syntax_Base.var FStar_Set.set -> Prims.bool) = + fun g -> + fun s -> + Prims.op_Negation + (FStar_List_Tot_Base.existsb + (fun uu___ -> match uu___ with | (x, uu___1) -> FStar_Set.mem x s) + g.bs) let rec (remove_binding_aux : env -> (Pulse_Syntax_Base.var * Pulse_Syntax_Base.typ) Prims.list -> @@ -188,6 +204,18 @@ let (diff : env -> env -> env) = let g31 = { f = (g1.f); bs = bs3; names = names3; m = m3; ctxt = (g1.ctxt) } in g31 +let rec (subst_env : env -> Pulse_Syntax_Naming.subst -> env) = + fun en -> + fun ss -> + match bindings en with + | [] -> en + | uu___ -> + let uu___1 = remove_latest_binding en in + (match uu___1 with + | (x, t, en1) -> + push_binding (subst_env en1 ss) x + Pulse_Syntax_Base.ppname_default + (Pulse_Syntax_Naming.subst_term t ss)) let (push_context : env -> Prims.string -> Pulse_Syntax_Base.range -> env) = fun g -> fun ctx -> @@ -220,12 +248,12 @@ let (range_of_env : FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic - (FStar_Range.mk_range "Pulse.Typing.Env.fst" (Prims.of_int (267)) - (Prims.of_int (14)) (Prims.of_int (267)) (Prims.of_int (29))))) + (FStar_Range.mk_range "Pulse.Typing.Env.fst" (Prims.of_int (282)) + (Prims.of_int (14)) (Prims.of_int (282)) (Prims.of_int (29))))) (FStar_Sealed.seal (Obj.magic - (FStar_Range.mk_range "Pulse.Typing.Env.fst" (Prims.of_int (268)) - (Prims.of_int (4)) (Prims.of_int (276)) (Prims.of_int (30))))) + (FStar_Range.mk_range "Pulse.Typing.Env.fst" (Prims.of_int (283)) + (Prims.of_int (4)) (Prims.of_int (291)) (Prims.of_int (30))))) (Obj.magic (FStar_Tactics_Unseal.unseal g.ctxt)) (fun uu___ -> (fun ctx -> @@ -234,13 +262,13 @@ let (range_of_env : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (269)) (Prims.of_int (6)) - (Prims.of_int (274)) (Prims.of_int (66))))) + (Prims.of_int (284)) (Prims.of_int (6)) + (Prims.of_int (289)) (Prims.of_int (66))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (268)) (Prims.of_int (4)) - (Prims.of_int (276)) (Prims.of_int (30))))) + (Prims.of_int (283)) (Prims.of_int (4)) + (Prims.of_int (291)) (Prims.of_int (30))))) (Obj.magic (FStar_Tactics_Util.tryPick (fun uu___ -> @@ -290,8 +318,8 @@ let (ctxt_elt_to_string : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (283)) (Prims.of_int (49)) - (Prims.of_int (283)) (Prims.of_int (70))))) + (Prims.of_int (298)) (Prims.of_int (49)) + (Prims.of_int (298)) (Prims.of_int (70))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "prims.fst" @@ -322,8 +350,8 @@ let (ctx_to_string : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (289)) (Prims.of_int (42)) - (Prims.of_int (289)) (Prims.of_int (93))))) + (Prims.of_int (304)) (Prims.of_int (42)) + (Prims.of_int (304)) (Prims.of_int (93))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "prims.fst" @@ -334,13 +362,13 @@ let (ctx_to_string : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (289)) (Prims.of_int (64)) - (Prims.of_int (289)) (Prims.of_int (92))))) + (Prims.of_int (304)) (Prims.of_int (64)) + (Prims.of_int (304)) (Prims.of_int (92))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (289)) (Prims.of_int (42)) - (Prims.of_int (289)) (Prims.of_int (93))))) + (Prims.of_int (304)) (Prims.of_int (42)) + (Prims.of_int (304)) (Prims.of_int (93))))) (Obj.magic (FStar_Tactics_Util.map ctxt_elt_to_string c)) (fun uu___1 -> @@ -358,12 +386,12 @@ let (ctxt_to_list : FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic - (FStar_Range.mk_range "Pulse.Typing.Env.fst" (Prims.of_int (292)) - (Prims.of_int (12)) (Prims.of_int (292)) (Prims.of_int (27))))) + (FStar_Range.mk_range "Pulse.Typing.Env.fst" (Prims.of_int (307)) + (Prims.of_int (12)) (Prims.of_int (307)) (Prims.of_int (27))))) (FStar_Sealed.seal (Obj.magic - (FStar_Range.mk_range "Pulse.Typing.Env.fst" (Prims.of_int (293)) - (Prims.of_int (2)) (Prims.of_int (293)) (Prims.of_int (30))))) + (FStar_Range.mk_range "Pulse.Typing.Env.fst" (Prims.of_int (308)) + (Prims.of_int (2)) (Prims.of_int (308)) (Prims.of_int (30))))) (Obj.magic (FStar_Tactics_Unseal.unseal g.ctxt)) (fun uu___ -> (fun ctx -> @@ -374,12 +402,12 @@ let (print_context : FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic - (FStar_Range.mk_range "Pulse.Typing.Env.fst" (Prims.of_int (296)) - (Prims.of_int (12)) (Prims.of_int (296)) (Prims.of_int (27))))) + (FStar_Range.mk_range "Pulse.Typing.Env.fst" (Prims.of_int (311)) + (Prims.of_int (12)) (Prims.of_int (311)) (Prims.of_int (27))))) (FStar_Sealed.seal (Obj.magic - (FStar_Range.mk_range "Pulse.Typing.Env.fst" (Prims.of_int (297)) - (Prims.of_int (2)) (Prims.of_int (300)) (Prims.of_int (79))))) + (FStar_Range.mk_range "Pulse.Typing.Env.fst" (Prims.of_int (312)) + (Prims.of_int (2)) (Prims.of_int (315)) (Prims.of_int (79))))) (Obj.magic (FStar_Tactics_Unseal.unseal g.ctxt)) (fun uu___ -> (fun ctx -> @@ -395,8 +423,8 @@ let (print_context : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (300)) (Prims.of_int (40)) - (Prims.of_int (300)) (Prims.of_int (79))))) + (Prims.of_int (315)) (Prims.of_int (40)) + (Prims.of_int (315)) (Prims.of_int (79))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "prims.fst" @@ -408,17 +436,17 @@ let (print_context : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (300)) + (Prims.of_int (315)) (Prims.of_int (62)) - (Prims.of_int (300)) + (Prims.of_int (315)) (Prims.of_int (78))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (300)) + (Prims.of_int (315)) (Prims.of_int (40)) - (Prims.of_int (300)) + (Prims.of_int (315)) (Prims.of_int (79))))) (Obj.magic (ctxt_to_list g)) (fun uu___1 -> @@ -440,12 +468,12 @@ let (print_issue : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (304)) (Prims.of_int (30)) - (Prims.of_int (306)) (Prims.of_int (37))))) + (Prims.of_int (319)) (Prims.of_int (30)) + (Prims.of_int (321)) (Prims.of_int (37))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (308)) (Prims.of_int (4)) (Prims.of_int (312)) + (Prims.of_int (323)) (Prims.of_int (4)) (Prims.of_int (327)) (Prims.of_int (101))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___1 -> @@ -470,42 +498,42 @@ let (print_issue : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (312)) (Prims.of_int (7)) - (Prims.of_int (312)) (Prims.of_int (101))))) + (Prims.of_int (327)) (Prims.of_int (7)) + (Prims.of_int (327)) (Prims.of_int (101))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (308)) (Prims.of_int (4)) - (Prims.of_int (312)) (Prims.of_int (101))))) + (Prims.of_int (323)) (Prims.of_int (4)) + (Prims.of_int (327)) (Prims.of_int (101))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (312)) (Prims.of_int (22)) - (Prims.of_int (312)) (Prims.of_int (100))))) + (Prims.of_int (327)) (Prims.of_int (22)) + (Prims.of_int (327)) (Prims.of_int (100))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (312)) (Prims.of_int (7)) - (Prims.of_int (312)) (Prims.of_int (101))))) + (Prims.of_int (327)) (Prims.of_int (7)) + (Prims.of_int (327)) (Prims.of_int (101))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (312)) + (Prims.of_int (327)) (Prims.of_int (23)) - (Prims.of_int (312)) + (Prims.of_int (327)) (Prims.of_int (47))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (312)) + (Prims.of_int (327)) (Prims.of_int (22)) - (Prims.of_int (312)) + (Prims.of_int (327)) (Prims.of_int (100))))) (Obj.magic (FStar_Tactics_Unseal.unseal @@ -518,17 +546,17 @@ let (print_issue : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (312)) + (Prims.of_int (327)) (Prims.of_int (50)) - (Prims.of_int (312)) + (Prims.of_int (327)) (Prims.of_int (99))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (312)) + (Prims.of_int (327)) (Prims.of_int (22)) - (Prims.of_int (312)) + (Prims.of_int (327)) (Prims.of_int (100))))) (Obj.magic (FStar_Tactics_Util.map @@ -558,17 +586,17 @@ let (print_issue : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (308)) + (Prims.of_int (323)) (Prims.of_int (4)) - (Prims.of_int (312)) + (Prims.of_int (327)) (Prims.of_int (101))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (308)) + (Prims.of_int (323)) (Prims.of_int (4)) - (Prims.of_int (312)) + (Prims.of_int (327)) (Prims.of_int (101))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -576,17 +604,17 @@ let (print_issue : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (308)) + (Prims.of_int (323)) (Prims.of_int (4)) - (Prims.of_int (312)) + (Prims.of_int (327)) (Prims.of_int (101))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (308)) + (Prims.of_int (323)) (Prims.of_int (4)) - (Prims.of_int (312)) + (Prims.of_int (327)) (Prims.of_int (101))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -594,17 +622,17 @@ let (print_issue : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (308)) + (Prims.of_int (323)) (Prims.of_int (4)) - (Prims.of_int (312)) + (Prims.of_int (327)) (Prims.of_int (101))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (308)) + (Prims.of_int (323)) (Prims.of_int (4)) - (Prims.of_int (312)) + (Prims.of_int (327)) (Prims.of_int (101))))) (Obj.magic (FStar_Tactics_Effect.tac_bind @@ -612,9 +640,9 @@ let (print_issue : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (309)) + (Prims.of_int (324)) (Prims.of_int (7)) - (Prims.of_int (309)) + (Prims.of_int (324)) (Prims.of_int (47))))) (FStar_Sealed.seal (Obj.magic @@ -674,12 +702,12 @@ let (print_issues : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (316)) (Prims.of_int (24)) - (Prims.of_int (316)) (Prims.of_int (49))))) + (Prims.of_int (331)) (Prims.of_int (24)) + (Prims.of_int (331)) (Prims.of_int (49))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (316)) (Prims.of_int (5)) (Prims.of_int (316)) + (Prims.of_int (331)) (Prims.of_int (5)) (Prims.of_int (331)) (Prims.of_int (49))))) (Obj.magic (FStar_Tactics_Util.map (print_issue g) i)) (fun uu___ -> @@ -691,24 +719,24 @@ let (env_to_string : FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic - (FStar_Range.mk_range "Pulse.Typing.Env.fst" (Prims.of_int (319)) - (Prims.of_int (11)) (Prims.of_int (321)) (Prims.of_int (24))))) + (FStar_Range.mk_range "Pulse.Typing.Env.fst" (Prims.of_int (334)) + (Prims.of_int (11)) (Prims.of_int (336)) (Prims.of_int (24))))) (FStar_Sealed.seal (Obj.magic - (FStar_Range.mk_range "Pulse.Typing.Env.fst" (Prims.of_int (322)) - (Prims.of_int (2)) (Prims.of_int (322)) (Prims.of_int (25))))) + (FStar_Range.mk_range "Pulse.Typing.Env.fst" (Prims.of_int (337)) + (Prims.of_int (2)) (Prims.of_int (337)) (Prims.of_int (25))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (321)) (Prims.of_int (4)) - (Prims.of_int (321)) (Prims.of_int (24))))) + (Prims.of_int (336)) (Prims.of_int (4)) + (Prims.of_int (336)) (Prims.of_int (24))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (319)) (Prims.of_int (11)) - (Prims.of_int (321)) (Prims.of_int (24))))) + (Prims.of_int (334)) (Prims.of_int (11)) + (Prims.of_int (336)) (Prims.of_int (24))))) (Obj.magic (FStar_Tactics_Util.zip e.bs e.names)) (fun uu___ -> (fun uu___ -> @@ -716,82 +744,109 @@ let (env_to_string : (FStar_Tactics_Util.map (fun uu___1 -> match uu___1 with - | ((uu___2, t), x) -> + | ((n, t), x) -> FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (320)) - (Prims.of_int (67)) - (Prims.of_int (320)) - (Prims.of_int (106))))) + (Prims.of_int (335)) + (Prims.of_int (72)) + (Prims.of_int (335)) + (Prims.of_int (111))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (320)) + (Prims.of_int (335)) (Prims.of_int (24)) - (Prims.of_int (320)) - (Prims.of_int (106))))) + (Prims.of_int (335)) + (Prims.of_int (111))))) (Obj.magic (Pulse_Syntax_Printer.term_to_string t)) - (fun uu___3 -> - (fun uu___3 -> + (fun uu___2 -> + (fun uu___2 -> Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (320)) + (Prims.of_int (335)) (Prims.of_int (24)) - (Prims.of_int (320)) - (Prims.of_int (106))))) + (Prims.of_int (335)) + (Prims.of_int (111))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (320)) + (Prims.of_int (335)) (Prims.of_int (24)) - (Prims.of_int (320)) - (Prims.of_int (106))))) + (Prims.of_int (335)) + (Prims.of_int (111))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (320)) - (Prims.of_int (49)) - (Prims.of_int (320)) - (Prims.of_int (66))))) + (Prims.of_int (335)) + (Prims.of_int (24)) + (Prims.of_int (335)) + (Prims.of_int (111))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range - "FStar.Printf.fst" - (Prims.of_int (121)) - (Prims.of_int (8)) - (Prims.of_int (123)) - (Prims.of_int (44))))) + "Pulse.Typing.Env.fst" + (Prims.of_int (335)) + (Prims.of_int (24)) + (Prims.of_int (335)) + (Prims.of_int (111))))) (Obj.magic - (FStar_Tactics_Unseal.unseal - x.Pulse_Syntax_Base.name)) - (fun uu___4 -> + (FStar_Tactics_Effect.tac_bind + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "Pulse.Typing.Env.fst" + (Prims.of_int (335)) + (Prims.of_int (52)) + (Prims.of_int (335)) + (Prims.of_int (69))))) + (FStar_Sealed.seal + (Obj.magic + (FStar_Range.mk_range + "FStar.Printf.fst" + (Prims.of_int (121)) + (Prims.of_int (8)) + (Prims.of_int (123)) + (Prims.of_int (44))))) + (Obj.magic + (FStar_Tactics_Unseal.unseal + x.Pulse_Syntax_Base.name)) + (fun uu___3 -> + FStar_Tactics_Effect.lift_div_tac + (fun uu___4 -> + fun x1 -> + fun x2 -> + Prims.strcat + (Prims.strcat + (Prims.strcat + "" + (Prims.strcat + uu___3 + "#")) + (Prims.strcat + (Prims.string_of_int + x1) " : ")) + (Prims.strcat + x2 ""))))) + (fun uu___3 -> FStar_Tactics_Effect.lift_div_tac - (fun uu___5 -> - fun x1 -> - Prims.strcat - (Prims.strcat "" - (Prims.strcat - uu___4 - " : ")) - (Prims.strcat x1 - ""))))) - (fun uu___4 -> + (fun uu___4 -> uu___3 n)))) + (fun uu___3 -> FStar_Tactics_Effect.lift_div_tac - (fun uu___5 -> uu___4 uu___3)))) - uu___3)) uu___)) uu___))) + (fun uu___4 -> uu___3 uu___2)))) + uu___2)) uu___)) uu___))) (fun bs -> FStar_Tactics_Effect.lift_div_tac (fun uu___ -> FStar_String.concat "\n " bs)) @@ -808,13 +863,13 @@ let fail : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (326)) (Prims.of_int (4)) - (Prims.of_int (331)) (Prims.of_int (12))))) + (Prims.of_int (341)) (Prims.of_int (4)) + (Prims.of_int (346)) (Prims.of_int (12))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (332)) (Prims.of_int (4)) - (Prims.of_int (335)) (Prims.of_int (31))))) + (Prims.of_int (347)) (Prims.of_int (4)) + (Prims.of_int (350)) (Prims.of_int (31))))) (match r with | FStar_Pervasives_Native.None -> Obj.magic (range_of_env g) | FStar_Pervasives_Native.Some r1 -> @@ -823,13 +878,13 @@ let fail : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (329)) (Prims.of_int (9)) - (Prims.of_int (329)) (Prims.of_int (27))))) + (Prims.of_int (344)) (Prims.of_int (9)) + (Prims.of_int (344)) (Prims.of_int (27))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (329)) (Prims.of_int (6)) - (Prims.of_int (331)) (Prims.of_int (12))))) + (Prims.of_int (344)) (Prims.of_int (6)) + (Prims.of_int (346)) (Prims.of_int (12))))) (FStar_Tactics_Effect.lift_div_tac (fun uu___ -> Pulse_RuntimeUtils.is_range_zero r1)) (fun uu___ -> @@ -848,25 +903,25 @@ let fail : (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (333)) (Prims.of_int (14)) - (Prims.of_int (333)) (Prims.of_int (77))))) + (Prims.of_int (348)) (Prims.of_int (14)) + (Prims.of_int (348)) (Prims.of_int (77))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (334)) (Prims.of_int (2)) - (Prims.of_int (335)) (Prims.of_int (31))))) + (Prims.of_int (349)) (Prims.of_int (2)) + (Prims.of_int (350)) (Prims.of_int (31))))) (Obj.magic (FStar_Tactics_Effect.tac_bind (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (333)) (Prims.of_int (61)) - (Prims.of_int (333)) (Prims.of_int (77))))) + (Prims.of_int (348)) (Prims.of_int (61)) + (Prims.of_int (348)) (Prims.of_int (77))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (333)) (Prims.of_int (14)) - (Prims.of_int (333)) (Prims.of_int (77))))) + (Prims.of_int (348)) (Prims.of_int (14)) + (Prims.of_int (348)) (Prims.of_int (77))))) (Obj.magic (ctxt_to_list g)) (fun uu___ -> FStar_Tactics_Effect.lift_div_tac @@ -882,17 +937,17 @@ let fail : (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (334)) + (Prims.of_int (349)) (Prims.of_int (2)) - (Prims.of_int (334)) + (Prims.of_int (349)) (Prims.of_int (34))))) (FStar_Sealed.seal (Obj.magic (FStar_Range.mk_range "Pulse.Typing.Env.fst" - (Prims.of_int (335)) + (Prims.of_int (350)) (Prims.of_int (2)) - (Prims.of_int (335)) + (Prims.of_int (350)) (Prims.of_int (31))))) (Obj.magic (FStar_Tactics_V1_Builtins.log_issues diff --git a/src/ocaml/plugin/generated/Pulse_Typing_Metatheory.ml b/src/ocaml/plugin/generated/Pulse_Typing_Metatheory.ml index 90f65bd07..699685049 100644 --- a/src/ocaml/plugin/generated/Pulse_Typing_Metatheory.ml +++ b/src/ocaml/plugin/generated/Pulse_Typing_Metatheory.ml @@ -1,151 +1,40 @@ open Prims -type ('g, 'c) comp_typing_u = (unit, unit, unit) Pulse_Typing.comp_typing -let (admit_st_comp_typing : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_comp -> (unit, unit) Pulse_Typing.st_comp_typing) - = - fun g -> - fun st -> - Pulse_Typing.STC (g, st, (Pulse_Typing_Env.fresh g), (), (), ()) -let (admit_comp_typing : + + +let (st_typing_weakening : Pulse_Typing_Env.env -> - Pulse_Syntax_Base.comp_st -> (unit, unit) comp_typing_u) + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.st_term -> + Pulse_Syntax_Base.comp -> + (unit, unit, unit) Pulse_Typing.st_typing -> + Pulse_Typing_Env.env -> (unit, unit, unit) Pulse_Typing.st_typing) = fun g -> - fun c -> - match c with - | Pulse_Syntax_Base.C_ST st -> - Pulse_Typing.CT_ST (g, st, (admit_st_comp_typing g st)) - | Pulse_Syntax_Base.C_STAtomic (inames, st) -> - Pulse_Typing.CT_STAtomic - (g, inames, st, (), (admit_st_comp_typing g st)) - | Pulse_Syntax_Base.C_STGhost (inames, st) -> - Pulse_Typing.CT_STGhost - (g, inames, st, (), (admit_st_comp_typing g st)) -let (st_typing_correctness : + fun g' -> + fun t -> + fun c -> + fun d -> + fun g1 -> + let g2 = Pulse_Typing_Env.diff g1 g in + let d1 = + Pulse_Typing_Metatheory_Base.st_typing_weakening g g' t c d + g2 in + d1 +let (st_typing_weakening_standard : Pulse_Typing_Env.env -> Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.comp_st -> + Pulse_Syntax_Base.comp -> (unit, unit, unit) Pulse_Typing.st_typing -> - (unit, unit) comp_typing_u) - = fun g -> fun t -> fun c -> fun uu___ -> admit_comp_typing g c -let (add_frame_well_typed : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.comp_st -> - (unit, unit) comp_typing_u -> - Pulse_Syntax_Base.term -> unit -> (unit, unit) comp_typing_u) - = - fun g -> - fun c -> - fun ct -> - fun f -> fun ft -> admit_comp_typing g (Pulse_Typing.add_frame c f) -let (comp_typing_inversion : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.comp_st -> - (unit, unit) comp_typing_u -> (unit, unit) Pulse_Typing.st_comp_typing) - = - fun g -> - fun c -> - fun ct -> - match ct with - | Pulse_Typing.CT_ST (uu___, uu___1, st) -> st - | Pulse_Typing.CT_STAtomic (uu___, uu___1, uu___2, uu___3, st) -> st - | Pulse_Typing.CT_STGhost (uu___, uu___1, uu___2, uu___3, st) -> st -let (st_comp_typing_inversion_cofinite : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_comp -> - (unit, unit) Pulse_Typing.st_comp_typing -> (unit * unit * unit)) - = fun g -> fun st -> fun ct -> ((), (), ()) -let (st_comp_typing_inversion : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.st_comp -> - (unit, unit) Pulse_Typing.st_comp_typing -> - (unit, unit, Pulse_Syntax_Base.var, unit) FStar_Pervasives.dtuple4) + Pulse_Typing_Env.env -> (unit, unit, unit) Pulse_Typing.st_typing) = fun g -> - fun st -> - fun ct -> - let uu___ = ct in - match uu___ with - | Pulse_Typing.STC (g1, st1, x, ty, pre, post) -> - FStar_Pervasives.Mkdtuple4 ((), (), x, ()) -let (tm_exists_inversion : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.universe -> - Pulse_Syntax_Base.term -> - Pulse_Syntax_Base.term -> - unit -> Pulse_Syntax_Base.var -> (unit * unit)) - = fun g -> fun u -> fun ty -> fun p -> fun uu___ -> fun x -> ((), ()) - - -let (comp_st_with_post : - Pulse_Syntax_Base.comp_st -> - Pulse_Syntax_Base.term -> Pulse_Syntax_Base.comp_st) - = - fun c -> - fun post -> - match c with - | Pulse_Syntax_Base.C_ST st -> - Pulse_Syntax_Base.C_ST - { - Pulse_Syntax_Base.u = (st.Pulse_Syntax_Base.u); - Pulse_Syntax_Base.res = (st.Pulse_Syntax_Base.res); - Pulse_Syntax_Base.pre = (st.Pulse_Syntax_Base.pre); - Pulse_Syntax_Base.post = post - } - | Pulse_Syntax_Base.C_STGhost (i, st) -> - Pulse_Syntax_Base.C_STGhost - (i, - { - Pulse_Syntax_Base.u = (st.Pulse_Syntax_Base.u); - Pulse_Syntax_Base.res = (st.Pulse_Syntax_Base.res); - Pulse_Syntax_Base.pre = (st.Pulse_Syntax_Base.pre); - Pulse_Syntax_Base.post = post - }) - | Pulse_Syntax_Base.C_STAtomic (i, st) -> - Pulse_Syntax_Base.C_STAtomic - (i, - { - Pulse_Syntax_Base.u = (st.Pulse_Syntax_Base.u); - Pulse_Syntax_Base.res = (st.Pulse_Syntax_Base.res); - Pulse_Syntax_Base.pre = (st.Pulse_Syntax_Base.pre); - Pulse_Syntax_Base.post = post - }) -let (comp_st_with_pre : - Pulse_Syntax_Base.comp_st -> - Pulse_Syntax_Base.term -> Pulse_Syntax_Base.comp_st) - = - fun c -> - fun pre -> - match c with - | Pulse_Syntax_Base.C_ST st -> - Pulse_Syntax_Base.C_ST - { - Pulse_Syntax_Base.u = (st.Pulse_Syntax_Base.u); - Pulse_Syntax_Base.res = (st.Pulse_Syntax_Base.res); - Pulse_Syntax_Base.pre = pre; - Pulse_Syntax_Base.post = (st.Pulse_Syntax_Base.post) - } - | Pulse_Syntax_Base.C_STGhost (i, st) -> - Pulse_Syntax_Base.C_STGhost - (i, - { - Pulse_Syntax_Base.u = (st.Pulse_Syntax_Base.u); - Pulse_Syntax_Base.res = (st.Pulse_Syntax_Base.res); - Pulse_Syntax_Base.pre = pre; - Pulse_Syntax_Base.post = (st.Pulse_Syntax_Base.post) - }) - | Pulse_Syntax_Base.C_STAtomic (i, st) -> - Pulse_Syntax_Base.C_STAtomic - (i, - { - Pulse_Syntax_Base.u = (st.Pulse_Syntax_Base.u); - Pulse_Syntax_Base.res = (st.Pulse_Syntax_Base.res); - Pulse_Syntax_Base.pre = pre; - Pulse_Syntax_Base.post = (st.Pulse_Syntax_Base.post) - }) -type ('g, 'gu, 'guu) pairwise_disjoint = unit -let (st_typing_weakening : + fun t -> + fun c -> + fun d -> + fun g1 -> + let g' = Pulse_Typing_Env.mk_env (Pulse_Typing_Env.fstar_env g) in + let d1 = st_typing_weakening g g' t c d g1 in d1 +let (st_typing_weakening_end : Pulse_Typing_Env.env -> Pulse_Typing_Env.env -> Pulse_Syntax_Base.st_term -> @@ -153,39 +42,17 @@ let (st_typing_weakening : (unit, unit, unit) Pulse_Typing.st_typing -> Pulse_Typing_Env.env -> (unit, unit, unit) Pulse_Typing.st_typing) = - fun g -> fun g' -> fun t -> fun c -> fun uu___ -> fun g1 -> Prims.magic () -let (singleton_env : - FStar_Reflection_Typing.fstar_top_env -> - Pulse_Syntax_Base.var -> Pulse_Syntax_Base.typ -> Pulse_Typing_Env.env) - = - fun f -> - fun x -> - fun t -> - Pulse_Typing_Env.push_binding (Pulse_Typing_Env.mk_env f) x - Pulse_Syntax_Base.ppname_default t -let (nt : - Pulse_Syntax_Base.var -> - Pulse_Syntax_Base.term -> Pulse_Syntax_Naming.subst_elt Prims.list) - = fun x -> fun t -> [Pulse_Syntax_Naming.NT (x, t)] -let (subst_env : - Pulse_Typing_Env.env -> Pulse_Syntax_Naming.subst -> Pulse_Typing_Env.env) - = fun en -> fun ss -> Prims.admit () -let (st_typing_subst : - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.var -> - Pulse_Syntax_Base.typ -> - Pulse_Typing_Env.env -> - Pulse_Syntax_Base.term -> - unit -> - Pulse_Syntax_Base.st_term -> - Pulse_Syntax_Base.comp_st -> - (unit, unit, unit) Pulse_Typing.st_typing -> - (unit, unit, unit) Pulse_Typing.st_typing) - = fun g -> - fun x -> + fun g' -> fun t -> - fun g' -> - fun e -> - fun e_typing -> - fun e1 -> fun c1 -> fun e1_typing -> Prims.admit () \ No newline at end of file + fun c -> + fun d -> + fun g'' -> + let g2 = Pulse_Typing_Env.diff g'' g' in + let emp_env = + Pulse_Typing_Env.mk_env (Pulse_Typing_Env.fstar_env g) in + let d1 = + Pulse_Typing_Metatheory_Base.st_typing_weakening + (Pulse_Typing_Env.push_env g g') emp_env t c + (FStar_Pervasives.coerce_eq () d) g2 in + FStar_Pervasives.coerce_eq () d1 \ No newline at end of file diff --git a/src/ocaml/plugin/generated/Pulse_Typing_Metatheory_Base.ml b/src/ocaml/plugin/generated/Pulse_Typing_Metatheory_Base.ml new file mode 100644 index 000000000..e831126f9 --- /dev/null +++ b/src/ocaml/plugin/generated/Pulse_Typing_Metatheory_Base.ml @@ -0,0 +1,986 @@ +open Prims +type ('g, 'c) comp_typing_u = (unit, unit, unit) Pulse_Typing.comp_typing +let (admit_st_comp_typing : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.st_comp -> (unit, unit) Pulse_Typing.st_comp_typing) + = + fun g -> + fun st -> + Pulse_Typing.STC (g, st, (Pulse_Typing_Env.fresh g), (), (), ()) +let (admit_comp_typing : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.comp_st -> (unit, unit) comp_typing_u) + = + fun g -> + fun c -> + match c with + | Pulse_Syntax_Base.C_ST st -> + Pulse_Typing.CT_ST (g, st, (admit_st_comp_typing g st)) + | Pulse_Syntax_Base.C_STAtomic (inames, st) -> + Pulse_Typing.CT_STAtomic + (g, inames, st, (), (admit_st_comp_typing g st)) + | Pulse_Syntax_Base.C_STGhost (inames, st) -> + Pulse_Typing.CT_STGhost + (g, inames, st, (), (admit_st_comp_typing g st)) +let (st_typing_correctness : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.st_term -> + Pulse_Syntax_Base.comp_st -> + (unit, unit, unit) Pulse_Typing.st_typing -> + (unit, unit) comp_typing_u) + = fun g -> fun t -> fun c -> fun uu___ -> admit_comp_typing g c +let (add_frame_well_typed : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.comp_st -> + (unit, unit) comp_typing_u -> + Pulse_Syntax_Base.term -> unit -> (unit, unit) comp_typing_u) + = + fun g -> + fun c -> + fun ct -> + fun f -> fun ft -> admit_comp_typing g (Pulse_Typing.add_frame c f) +let (comp_typing_inversion : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.comp_st -> + (unit, unit) comp_typing_u -> (unit, unit) Pulse_Typing.st_comp_typing) + = + fun g -> + fun c -> + fun ct -> + match ct with + | Pulse_Typing.CT_ST (uu___, uu___1, st) -> st + | Pulse_Typing.CT_STAtomic (uu___, uu___1, uu___2, uu___3, st) -> st + | Pulse_Typing.CT_STGhost (uu___, uu___1, uu___2, uu___3, st) -> st +let (st_comp_typing_inversion_cofinite : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.st_comp -> + (unit, unit) Pulse_Typing.st_comp_typing -> (unit * unit * unit)) + = fun g -> fun st -> fun ct -> ((), (), ()) +let (st_comp_typing_inversion : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.st_comp -> + (unit, unit) Pulse_Typing.st_comp_typing -> + (unit, unit, Pulse_Syntax_Base.var, unit) FStar_Pervasives.dtuple4) + = + fun g -> + fun st -> + fun ct -> + let uu___ = ct in + match uu___ with + | Pulse_Typing.STC (g1, st1, x, ty, pre, post) -> + FStar_Pervasives.Mkdtuple4 ((), (), x, ()) +let (tm_exists_inversion : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.universe -> + Pulse_Syntax_Base.term -> + Pulse_Syntax_Base.term -> + unit -> Pulse_Syntax_Base.var -> (unit * unit)) + = fun g -> fun u -> fun ty -> fun p -> fun uu___ -> fun x -> ((), ()) + + +let (non_informative_t_weakening : + Pulse_Typing_Env.env -> + Pulse_Typing_Env.env -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.universe -> + Pulse_Syntax_Base.term -> + (unit, unit, unit) Pulse_Typing.non_informative_t -> + (unit, unit, unit) Pulse_Typing.non_informative_t) + = + fun g -> + fun g' -> + fun g1 -> + fun u -> + fun t -> + fun d -> + let uu___ = d in + match uu___ with + | Prims.Mkdtuple2 (w, uu___1) -> Prims.Mkdtuple2 (w, ()) +let (non_informative_c_weakening : + Pulse_Typing_Env.env -> + Pulse_Typing_Env.env -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.comp_st -> + (unit, unit) Pulse_Typing.non_informative_c -> + (unit, unit) Pulse_Typing.non_informative_c) + = + fun g -> + fun g' -> + fun g1 -> + fun c -> + fun d -> + non_informative_t_weakening g g' g1 (Pulse_Syntax_Base.comp_u c) + (Pulse_Syntax_Base.comp_res c) d +let (bind_comp_weakening : + Pulse_Typing_Env.env -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.var -> + Pulse_Syntax_Base.comp -> + Pulse_Syntax_Base.comp -> + Pulse_Syntax_Base.comp -> + (unit, unit, unit, unit, unit) Pulse_Typing.bind_comp -> + Pulse_Typing_Env.env -> + (unit, unit, unit, unit, unit) Pulse_Typing.bind_comp) + = + fun g -> + fun g' -> + fun x -> + fun c1 -> + fun c2 -> + fun c3 -> + fun d -> + fun g1 -> + match d with + | Pulse_Typing.Bind_comp + (uu___, x1, c11, c21, uu___1, uu___2, uu___3) -> + let y = + Pulse_Typing_Env.fresh + (Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g') in + Pulse_Typing.Bind_comp + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), x1, c11, + c21, (), y, ()) + | Pulse_Typing.Bind_comp_ghost_l + (uu___, x1, c11, c21, n_d, uu___1, uu___2, uu___3) -> + let y = + Pulse_Typing_Env.fresh + (Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g') in + Pulse_Typing.Bind_comp_ghost_l + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), x1, c11, + c21, (non_informative_c_weakening g g' g1 c11 n_d), + (), y, ()) + | Pulse_Typing.Bind_comp_ghost_r + (uu___, x1, c11, c21, n_d, uu___1, uu___2, uu___3) -> + let y = + Pulse_Typing_Env.fresh + (Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g') in + Pulse_Typing.Bind_comp_ghost_r + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), x1, c11, + c21, (non_informative_c_weakening g g' g1 c21 n_d), + (), y, ()) +let (lift_comp_weakening : + Pulse_Typing_Env.env -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.comp -> + Pulse_Syntax_Base.comp -> + (unit, unit, unit) Pulse_Typing.lift_comp -> + Pulse_Typing_Env.env -> (unit, unit, unit) Pulse_Typing.lift_comp) + = + fun g -> + fun g' -> + fun c1 -> + fun c2 -> + fun d -> + fun g1 -> + match d with + | Pulse_Typing.Lift_STAtomic_ST (uu___, c) -> + Pulse_Typing.Lift_STAtomic_ST + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), c) + | Pulse_Typing.Lift_STGhost_STAtomic + (uu___, c, non_informative_c) -> + Pulse_Typing.Lift_STGhost_STAtomic + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), c, + (non_informative_c_weakening g g' g1 c + non_informative_c)) +let (st_equiv_weakening : + Pulse_Typing_Env.env -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.comp -> + Pulse_Syntax_Base.comp -> + (unit, unit, unit) Pulse_Typing.st_equiv -> + Pulse_Typing_Env.env -> (unit, unit, unit) Pulse_Typing.st_equiv) + = + fun g -> + fun g' -> + fun c1 -> + fun c2 -> + fun d -> + fun g1 -> + match d with + | Pulse_Typing.ST_VPropEquiv + (uu___, c11, c21, x, uu___1, uu___2, uu___3, uu___4, + uu___5) + -> + Pulse_Typing.ST_VPropEquiv + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), c11, c21, x, + (), (), (), (), ()) +let (st_comp_typing_weakening : + Pulse_Typing_Env.env -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.st_comp -> + (unit, unit) Pulse_Typing.st_comp_typing -> + Pulse_Typing_Env.env -> (unit, unit) Pulse_Typing.st_comp_typing) + = + fun g -> + fun g' -> + fun s -> + fun d -> + fun g1 -> + match d with + | Pulse_Typing.STC (uu___, st, x, uu___1, uu___2, uu___3) -> + Pulse_Typing.STC + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), st, x, (), (), + ()) +let (comp_typing_weakening : + Pulse_Typing_Env.env -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.comp -> + Pulse_Syntax_Base.universe -> + (unit, unit, unit) Pulse_Typing.comp_typing -> + Pulse_Typing_Env.env -> + (unit, unit, unit) Pulse_Typing.comp_typing) + = + fun g -> + fun g' -> + fun c -> + fun u -> + fun d -> + fun g1 -> + match d with + | Pulse_Typing.CT_Tot (uu___, t, u1, uu___1) -> + Pulse_Typing.CT_Tot + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), t, u1, ()) + | Pulse_Typing.CT_ST (uu___, uu___1, d1) -> + Pulse_Typing.CT_ST + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), uu___1, + (st_comp_typing_weakening g g' uu___1 d1 g1)) + | Pulse_Typing.CT_STAtomic (uu___, inames, uu___1, uu___2, d1) + -> + Pulse_Typing.CT_STAtomic + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), inames, uu___1, + (), (st_comp_typing_weakening g g' uu___1 d1 g1)) + | Pulse_Typing.CT_STGhost (uu___, inames, uu___1, uu___2, d1) + -> + Pulse_Typing.CT_STGhost + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), inames, uu___1, + (), (st_comp_typing_weakening g g' uu___1 d1 g1)) +let (prop_validity_token_weakening : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + (unit, unit) Pulse_Typing.prop_validity -> + Pulse_Typing_Env.env -> (unit, unit) Pulse_Typing.prop_validity) + = fun g -> fun t -> fun token -> fun g1 -> token +let rec (st_typing_weakening : + Pulse_Typing_Env.env -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.st_term -> + Pulse_Syntax_Base.comp -> + (unit, unit, unit) Pulse_Typing.st_typing -> + Pulse_Typing_Env.env -> (unit, unit, unit) Pulse_Typing.st_typing) + = + fun g -> + fun g' -> + fun t -> + fun c -> + fun d -> + fun g1 -> + match d with + | Pulse_Typing.T_Abs + (uu___, uu___1, uu___2, uu___3, uu___4, uu___5, uu___6, + uu___7, uu___8) + -> Prims.magic () + | Pulse_Typing.T_STApp + (uu___, head, ty, q, res, arg, uu___1, uu___2) -> + Pulse_Typing.T_STApp + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), head, ty, q, + res, arg, (), ()) + | Pulse_Typing.T_Return + (uu___, c1, use_eq, u, t1, e, post, x_old, uu___1, uu___2, + uu___3) + -> + let x = + Pulse_Typing_Env.fresh + (Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g') in + Pulse_Typing.T_Return + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), c1, use_eq, u, + t1, e, post, x, (), (), ()) + | Pulse_Typing.T_Lift (uu___, e, c1, c2, d_c1, d_lift) -> + Pulse_Typing.T_Lift + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), e, c1, c2, + (st_typing_weakening g g' e c1 d_c1 g1), + (lift_comp_weakening g g' c1 c2 d_lift g1)) + | Pulse_Typing.T_Bind + (uu___, e1, e2, c1, c2, b, x, c3, d_e1, uu___1, d_e2, d_bc) + -> + let d_e11 = st_typing_weakening g g' e1 c1 d_e1 g1 in + let d_e21 = d_e2 in + let d_e22 = d_e21 in + let d_e23 = + st_typing_weakening g + (Pulse_Typing_Env.push_binding g' x + Pulse_Syntax_Base.ppname_default + (Pulse_Syntax_Base.comp_res c1)) + (Pulse_Syntax_Naming.open_st_term_nv e2 + ((b.Pulse_Syntax_Base.binder_ppname), x)) c2 d_e22 + g1 in + let d_e24 = d_e23 in + let d_bc1 = bind_comp_weakening g g' x c1 c2 c3 d_bc g1 in + Pulse_Typing.T_Bind + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), e1, e2, c1, c2, + b, x, c3, d_e11, (), d_e24, d_bc1) + | Pulse_Typing.T_TotBind + (uu___, e1, e2, t1, c2, x, uu___1, d_e2) -> + let d_e21 = d_e2 in + let d_e22 = d_e21 in + let d_e23 = + st_typing_weakening g + (Pulse_Typing_Env.push_binding g' x + Pulse_Syntax_Base.ppname_default t1) + (Pulse_Syntax_Naming.open_st_term_nv e2 + (Pulse_Syntax_Base.v_as_nv x)) c2 d_e22 g1 in + let d_e24 = d_e23 in + Pulse_Typing.T_TotBind + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), e1, e2, t1, c2, + x, (), d_e24) + | Pulse_Typing.T_If + (uu___, b, e1, e2, c1, uc, hyp, uu___1, d_e1, d_e2, uu___2) + -> + let d_e11 = d_e1 in + let d_e12 = d_e11 in + let d_e13 = + st_typing_weakening g + (Pulse_Typing_Env.push_binding g' hyp + Pulse_Syntax_Base.ppname_default + (Pulse_Typing.mk_eq2 Pulse_Syntax_Pure.u0 + Pulse_Typing.tm_bool b Pulse_Typing.tm_true)) e1 + c1 d_e12 g1 in + let d_e14 = d_e13 in + let d_e21 = d_e2 in + let d_e22 = d_e21 in + let d_e23 = + st_typing_weakening g + (Pulse_Typing_Env.push_binding g' hyp + Pulse_Syntax_Base.ppname_default + (Pulse_Typing.mk_eq2 Pulse_Syntax_Pure.u0 + Pulse_Typing.tm_bool b Pulse_Typing.tm_false)) e2 + c1 d_e22 g1 in + let d_e24 = d_e23 in + Pulse_Typing.T_If + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), b, e1, e2, c1, + uc, hyp, (), d_e14, d_e24, ()) + | Pulse_Typing.T_Match + (uu___, sc_u, sc_ty, sc, d_sc_ty, d_sc, c1, brs, d_brs, + d_pats_complete) + -> Prims.magic () + | Pulse_Typing.T_Frame (uu___, e, c1, frame, uu___1, d_e) -> + Pulse_Typing.T_Frame + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), e, c1, frame, + (), (st_typing_weakening g g' e c1 d_e g1)) + | Pulse_Typing.T_Equiv (uu___, e, c1, c', d_e, d_eq) -> + Pulse_Typing.T_Equiv + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), e, c1, c', + (st_typing_weakening g g' e c1 d_e g1), + (st_equiv_weakening g g' c1 c' d_eq g1)) + | Pulse_Typing.T_IntroPure (uu___, p, uu___1, token) -> + Pulse_Typing.T_IntroPure + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), p, (), + (prop_validity_token_weakening uu___ p token + (Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'))) + | Pulse_Typing.T_ElimExists + (uu___, u, t1, p, x, uu___1, uu___2) -> + Pulse_Typing.T_ElimExists + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), u, t1, p, x, + (), ()) + | Pulse_Typing.T_IntroExists + (uu___, u, b, p, e, uu___1, uu___2, uu___3) -> + Pulse_Typing.T_IntroExists + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), u, b, p, e, (), + (), ()) + | Pulse_Typing.T_IntroExistsErased + (uu___, u, b, p, e, uu___1, uu___2, uu___3) -> + Pulse_Typing.T_IntroExistsErased + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), u, b, p, e, (), + (), ()) + | Pulse_Typing.T_While + (uu___, inv, cond, body, uu___1, cond_typing, body_typing) + -> + Pulse_Typing.T_While + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), inv, cond, + body, (), + (st_typing_weakening g g' cond + (Pulse_Typing.comp_while_cond + Pulse_Syntax_Base.ppname_default inv) cond_typing + g1), + (st_typing_weakening g g' body + (Pulse_Typing.comp_while_body + Pulse_Syntax_Base.ppname_default inv) body_typing + g1)) + | Pulse_Typing.T_Par + (uu___, eL, cL, eR, cR, x, cL_typing, cR_typing, eL_typing, + eR_typing) + -> + Pulse_Typing.T_Par + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), eL, cL, eR, cR, + x, + (comp_typing_weakening g g' cL + (Pulse_Syntax_Base.comp_u cL) cL_typing g1), + (comp_typing_weakening g g' cR + (Pulse_Syntax_Base.comp_u cR) cR_typing g1), + (st_typing_weakening g g' eL cL eL_typing g1), + (st_typing_weakening g g' eR cR eR_typing g1)) + | Pulse_Typing.T_WithLocal + (uu___, init, body, init_t, c1, x, uu___1, uu___2, d_c, + d_body) + -> + let d_body1 = d_body in + let d_body2 = d_body1 in + let d_body3 = + st_typing_weakening g + (Pulse_Typing_Env.push_binding g' x + Pulse_Syntax_Base.ppname_default + (Pulse_Typing.mk_ref init_t)) + (Pulse_Syntax_Naming.open_st_term_nv body + (Pulse_Syntax_Base.v_as_nv x)) + (Pulse_Typing.comp_withlocal_body x init_t init c1) + d_body2 g1 in + let d_body4 = d_body3 in + Pulse_Typing.T_WithLocal + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), init, body, + init_t, c1, x, (), (), + (comp_typing_weakening g g' c1 + (Pulse_Syntax_Base.comp_u c1) d_c g1), d_body4) + | Pulse_Typing.T_Rewrite (uu___, p, q, uu___1, uu___2) -> + Pulse_Typing.T_Rewrite + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), p, q, (), ()) + | Pulse_Typing.T_Admit (uu___, s, c1, d_s) -> + Pulse_Typing.T_Admit + ((Pulse_Typing_Env.push_env + (Pulse_Typing_Env.push_env g g1) g'), s, c1, + (st_comp_typing_weakening g g' s d_s g1)) +let (nt : + Pulse_Syntax_Base.var -> + Pulse_Syntax_Base.term -> Pulse_Syntax_Naming.subst_elt Prims.list) + = fun x -> fun t -> [Pulse_Syntax_Naming.NT (x, t)] +let (non_informative_t_subst : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.var -> + Pulse_Syntax_Base.typ -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + unit -> + Pulse_Syntax_Base.universe -> + Pulse_Syntax_Base.term -> + (unit, unit, unit) Pulse_Typing.non_informative_t -> + (unit, unit, unit) Pulse_Typing.non_informative_t) + = + fun g -> + fun x -> + fun t -> + fun g' -> + fun e -> + fun e_typing -> + fun u -> + fun t1 -> + fun d -> + let ss = nt x e in + let uu___ = d in + match uu___ with + | Prims.Mkdtuple2 (w, uu___1) -> + Prims.Mkdtuple2 + ((Pulse_Syntax_Naming.subst_term w ss), ()) +let (non_informative_c_subst : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.var -> + Pulse_Syntax_Base.typ -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + unit -> + Pulse_Syntax_Base.comp -> + (unit, unit) Pulse_Typing.non_informative_c -> + (unit, unit) Pulse_Typing.non_informative_c) + = + fun g -> + fun x -> + fun t -> + fun g' -> + fun e -> + fun e_typing -> + fun c -> + fun d -> + non_informative_t_subst g x t g' e () + (Pulse_Syntax_Base.comp_u c) + (Pulse_Syntax_Base.comp_res c) d +let (lift_comp_subst : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.var -> + Pulse_Syntax_Base.typ -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + unit -> + Pulse_Syntax_Base.comp -> + Pulse_Syntax_Base.comp -> + (unit, unit, unit) Pulse_Typing.lift_comp -> + (unit, unit, unit) Pulse_Typing.lift_comp) + = + fun g -> + fun x -> + fun t -> + fun g' -> + fun e -> + fun e_typing -> + fun c1 -> + fun c2 -> + fun d -> + let ss = nt x e in + match d with + | Pulse_Typing.Lift_STAtomic_ST (uu___, c) -> + Pulse_Typing.Lift_STAtomic_ST + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + (Pulse_Syntax_Naming.subst_comp c ss)) + | Pulse_Typing.Lift_STGhost_STAtomic + (uu___, c, d_non_informative) -> + Pulse_Typing.Lift_STGhost_STAtomic + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + (Pulse_Syntax_Naming.subst_comp c ss), + (non_informative_c_subst g x t g' e () c + d_non_informative)) +let (bind_comp_subst : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.var -> + Pulse_Syntax_Base.typ -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + unit -> + Pulse_Syntax_Base.var -> + Pulse_Syntax_Base.comp -> + Pulse_Syntax_Base.comp -> + Pulse_Syntax_Base.comp -> + (unit, unit, unit, unit, unit) Pulse_Typing.bind_comp + -> + (unit, unit, unit, unit, unit) Pulse_Typing.bind_comp) + = + fun g -> + fun x -> + fun t -> + fun g' -> + fun e -> + fun e_typing -> + fun y -> + fun c1 -> + fun c2 -> + fun c3 -> + fun d -> + let ss = nt x e in + match d with + | Pulse_Typing.Bind_comp + (uu___, y1, c11, c21, uu___1, z, uu___2) -> + Pulse_Typing.Bind_comp + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + y1, (Pulse_Syntax_Naming.subst_comp c11 ss), + (Pulse_Syntax_Naming.subst_comp c21 ss), (), + z, ()) + | Pulse_Typing.Bind_comp_ghost_l + (uu___, y1, c11, c21, d_non_informative, uu___1, + z, uu___2) + -> + Pulse_Typing.Bind_comp_ghost_l + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + y1, (Pulse_Syntax_Naming.subst_comp c11 ss), + (Pulse_Syntax_Naming.subst_comp c21 ss), + (non_informative_c_subst g x t g' e () c11 + d_non_informative), (), z, ()) + | Pulse_Typing.Bind_comp_ghost_r + (uu___, y1, c11, c21, d_non_informative, uu___1, + z, uu___2) + -> + Pulse_Typing.Bind_comp_ghost_r + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + y1, (Pulse_Syntax_Naming.subst_comp c11 ss), + (Pulse_Syntax_Naming.subst_comp c21 ss), + (non_informative_c_subst g x t g' e () c21 + d_non_informative), (), z, ()) +let (st_equiv_subst : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.var -> + Pulse_Syntax_Base.typ -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + unit -> + Pulse_Syntax_Base.comp -> + Pulse_Syntax_Base.comp -> + (unit, unit, unit) Pulse_Typing.st_equiv -> + (unit, unit, unit) Pulse_Typing.st_equiv) + = + fun g -> + fun x -> + fun t -> + fun g' -> + fun e -> + fun e_typing -> + fun c1 -> + fun c2 -> + fun d -> + match d with + | Pulse_Typing.ST_VPropEquiv + (uu___, c11, c21, y, uu___1, uu___2, uu___3, uu___4, + uu___5) + -> + Pulse_Typing.ST_VPropEquiv + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + (Pulse_Syntax_Naming.subst_comp c11 (nt x e)), + (Pulse_Syntax_Naming.subst_comp c21 (nt x e)), y, + (), (), (), (), ()) +let (st_comp_typing_subst : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.var -> + Pulse_Syntax_Base.typ -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + unit -> + Pulse_Syntax_Base.st_comp -> + (unit, unit) Pulse_Typing.st_comp_typing -> + (unit, unit) Pulse_Typing.st_comp_typing) + = + fun g -> + fun x -> + fun t -> + fun g' -> + fun e -> + fun e_typing -> + fun s -> + fun d -> + match d with + | Pulse_Typing.STC (uu___, s1, y, uu___1, uu___2, uu___3) + -> + Pulse_Typing.STC + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + (Pulse_Syntax_Naming.subst_st_comp s1 (nt x e)), y, + (), (), ()) +let (comp_typing_subst : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.var -> + Pulse_Syntax_Base.typ -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + unit -> + Pulse_Syntax_Base.comp -> + Pulse_Syntax_Base.universe -> + (unit, unit, unit) Pulse_Typing.comp_typing -> + (unit, unit, unit) Pulse_Typing.comp_typing) + = + fun g -> + fun x -> + fun t -> + fun g' -> + fun e -> + fun e_typing -> + fun c -> + fun u -> + fun d -> + match d with + | Pulse_Typing.CT_Tot (uu___, t1, u1, uu___1) -> + Pulse_Typing.CT_Tot + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + (Pulse_Syntax_Naming.subst_term t1 (nt x e)), u1, + ()) + | Pulse_Typing.CT_ST (uu___, s, d_s) -> + Pulse_Typing.CT_ST + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + (Pulse_Syntax_Naming.subst_st_comp s (nt x e)), + (st_comp_typing_subst g x t g' e () s d_s)) + | Pulse_Typing.CT_STAtomic + (uu___, inames, s, uu___1, d_s) -> + Pulse_Typing.CT_STAtomic + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + inames, + (Pulse_Syntax_Naming.subst_st_comp s (nt x e)), + (), (st_comp_typing_subst g x t g' e () s d_s)) + | Pulse_Typing.CT_STGhost (uu___, inames, s, uu___1, d_s) + -> + Pulse_Typing.CT_STGhost + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + inames, + (Pulse_Syntax_Naming.subst_st_comp s (nt x e)), + (), (st_comp_typing_subst g x t g' e () s d_s)) +let coerce_eq : 'a 'b . 'a -> unit -> 'b = + fun uu___1 -> fun uu___ -> (fun x -> fun uu___ -> Obj.magic x) uu___1 uu___ +let rec (st_typing_subst : + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.var -> + Pulse_Syntax_Base.typ -> + Pulse_Typing_Env.env -> + Pulse_Syntax_Base.term -> + unit -> + Pulse_Syntax_Base.st_term -> + Pulse_Syntax_Base.comp_st -> + (unit, unit, unit) Pulse_Typing.st_typing -> + (unit, unit, unit) Pulse_Typing.st_typing) + = + fun g -> + fun x -> + fun t -> + fun g' -> + fun e -> + fun e_typing -> + fun e1 -> + fun c1 -> + fun e1_typing -> + let ss = nt x e in + match e1_typing with + | Pulse_Typing.T_Abs + (uu___, uu___1, uu___2, uu___3, uu___4, uu___5, + uu___6, uu___7, uu___8) + -> Prims.magic () + | Pulse_Typing.T_STApp + (uu___, head, ty, q, res, arg, uu___1, uu___2) -> + Pulse_Typing.T_STApp + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + (Pulse_Syntax_Naming.subst_term head ss), + (Pulse_Syntax_Naming.subst_term ty ss), q, + (Pulse_Syntax_Naming.subst_comp res ss), + (Pulse_Syntax_Naming.subst_term arg ss), (), ()) + | Pulse_Typing.T_Return + (uu___, c, use_eq, u, t1, e2, post, x1, uu___1, + uu___2, uu___3) + -> + Pulse_Typing.T_Return + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), c, + use_eq, u, + (Pulse_Syntax_Naming.subst_term t1 ss), + (Pulse_Syntax_Naming.subst_term e2 ss), + (Pulse_Syntax_Naming.subst_term post ss), x1, (), + (), ()) + | Pulse_Typing.T_Lift (uu___, e2, c11, c2, d_e, d_lift) + -> + Pulse_Typing.T_Lift + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + (Pulse_Syntax_Naming.subst_st_term e2 ss), + (Pulse_Syntax_Naming.subst_comp c11 ss), + (Pulse_Syntax_Naming.subst_comp c2 ss), + (st_typing_subst g x t g' e () e2 c11 d_e), + (lift_comp_subst g x t g' e () c11 c2 d_lift)) + | Pulse_Typing.T_Bind + (uu___, e11, e2, c11, c2, b, y, c, d_e1, uu___1, + d_e2, d_bc) + -> + Pulse_Typing.T_Bind + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + (Pulse_Syntax_Naming.subst_st_term e11 ss), + (Pulse_Syntax_Naming.subst_st_term e2 ss), + (Pulse_Syntax_Naming.subst_comp c11 ss), + (Pulse_Syntax_Naming.subst_comp c2 ss), + (Pulse_Syntax_Naming.subst_binder b ss), y, + (Pulse_Syntax_Naming.subst_comp c ss), + (st_typing_subst g x t g' e () e11 c11 d_e1), (), + (coerce_eq + (st_typing_subst g x t + (Pulse_Typing_Env.push_binding g' y + Pulse_Syntax_Base.ppname_default + (Pulse_Syntax_Base.comp_res c11)) e () + (Pulse_Syntax_Naming.open_st_term_nv e2 + ((b.Pulse_Syntax_Base.binder_ppname), y)) + c2 d_e2) ()), + (bind_comp_subst g x t g' e () y c11 c2 c d_bc)) + | Pulse_Typing.T_TotBind + (uu___, e11, e2, t1, c2, y, uu___1, d_e2) -> + Pulse_Typing.T_TotBind + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + (Pulse_Syntax_Naming.subst_term e11 ss), + (Pulse_Syntax_Naming.subst_st_term e2 ss), + (Pulse_Syntax_Naming.subst_term t1 ss), + (Pulse_Syntax_Naming.subst_comp c2 ss), y, (), + (coerce_eq + (st_typing_subst g x t + (Pulse_Typing_Env.push_binding g' y + Pulse_Syntax_Base.ppname_default t1) e + () + (Pulse_Syntax_Naming.open_st_term_nv e2 + (Pulse_Syntax_Base.v_as_nv y)) c2 d_e2) + ())) + | Pulse_Typing.T_If + (uu___, b, e11, e2, c, uc, hyp, uu___1, d_e1, d_e2, + uu___2) + -> + Pulse_Typing.T_If + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + (Pulse_Syntax_Naming.subst_term b ss), + (Pulse_Syntax_Naming.subst_st_term e11 ss), + (Pulse_Syntax_Naming.subst_st_term e2 ss), + (Pulse_Syntax_Naming.subst_comp c ss), uc, hyp, + (), + (coerce_eq + (st_typing_subst g x t + (Pulse_Typing_Env.push_binding g' hyp + Pulse_Syntax_Base.ppname_default + (Pulse_Typing.mk_eq2 + Pulse_Syntax_Pure.u0 + Pulse_Typing.tm_bool b + Pulse_Typing.tm_true)) e () e11 c + d_e1) ()), + (coerce_eq + (st_typing_subst g x t + (Pulse_Typing_Env.push_binding g' hyp + Pulse_Syntax_Base.ppname_default + (Pulse_Typing.mk_eq2 + Pulse_Syntax_Pure.u0 + Pulse_Typing.tm_bool b + Pulse_Typing.tm_false)) e () e2 c + d_e2) ()), ()) + | Pulse_Typing.T_Match + (uu___, uu___1, uu___2, uu___3, uu___4, uu___5, + uu___6, uu___7, uu___8, uu___9) + -> Prims.magic () + | Pulse_Typing.T_Frame (uu___, e2, c, frame, uu___1, d_e) + -> + Pulse_Typing.T_Frame + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + (Pulse_Syntax_Naming.subst_st_term e2 ss), + (Pulse_Syntax_Naming.subst_comp c ss), + (Pulse_Syntax_Naming.subst_term frame ss), (), + (st_typing_subst g x t g' e () e2 c d_e)) + | Pulse_Typing.T_Equiv (uu___, e2, c, c', d_e, d_eq) -> + Pulse_Typing.T_Equiv + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + (Pulse_Syntax_Naming.subst_st_term e2 ss), + (Pulse_Syntax_Naming.subst_comp c ss), + (Pulse_Syntax_Naming.subst_comp c' ss), + (st_typing_subst g x t g' e () e2 c d_e), + (st_equiv_subst g x t g' e () c c' d_eq)) + | Pulse_Typing.T_IntroPure (uu___, p, uu___1, uu___2) -> + Pulse_Typing.T_IntroPure + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + (Pulse_Syntax_Naming.subst_term p ss), (), + (Prims.magic ())) + | Pulse_Typing.T_ElimExists + (uu___, u, t1, p, y, uu___1, uu___2) -> + Pulse_Typing.T_ElimExists + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), u, + (Pulse_Syntax_Naming.subst_term t1 ss), + (Pulse_Syntax_Naming.subst_term p ss), y, (), ()) + | Pulse_Typing.T_IntroExists + (uu___, u, b, p, e2, uu___1, uu___2, uu___3) -> + Pulse_Typing.T_IntroExists + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), u, + (Pulse_Syntax_Naming.subst_binder b ss), + (Pulse_Syntax_Naming.subst_term p ss), + (Pulse_Syntax_Naming.subst_term e2 ss), (), (), + ()) + | Pulse_Typing.T_IntroExistsErased + (uu___, u, b, p, e2, uu___1, uu___2, uu___3) -> + Pulse_Typing.T_IntroExistsErased + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), u, + (Pulse_Syntax_Naming.subst_binder b ss), + (Pulse_Syntax_Naming.subst_term p ss), + (Pulse_Syntax_Naming.subst_term e2 ss), (), (), + ()) + | Pulse_Typing.T_While + (uu___, inv, cond, body, uu___1, cond_typing, + body_typing) + -> + Pulse_Typing.T_While + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + (Pulse_Syntax_Naming.subst_term inv ss), + (Pulse_Syntax_Naming.subst_st_term cond ss), + (Pulse_Syntax_Naming.subst_st_term body ss), (), + (st_typing_subst g x t g' e () cond + (Pulse_Typing.comp_while_cond + Pulse_Syntax_Base.ppname_default inv) + cond_typing), + (st_typing_subst g x t g' e () body + (Pulse_Typing.comp_while_body + Pulse_Syntax_Base.ppname_default inv) + body_typing)) + | Pulse_Typing.T_Par + (uu___, eL, cL, eR, cR, y, d_cL, d_cR, d_eL, d_eR) -> + Pulse_Typing.T_Par + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + (Pulse_Syntax_Naming.subst_st_term eL ss), + (Pulse_Syntax_Naming.subst_comp cL ss), + (Pulse_Syntax_Naming.subst_st_term eR ss), + (Pulse_Syntax_Naming.subst_comp cR ss), y, + (comp_typing_subst g x t g' e () cL + (Pulse_Syntax_Base.comp_u cL) d_cL), + (comp_typing_subst g x t g' e () cR + (Pulse_Syntax_Base.comp_u cR) d_cR), + (st_typing_subst g x t g' e () eL cL d_eL), + (st_typing_subst g x t g' e () eR cR d_eR)) + | Pulse_Typing.T_WithLocal + (uu___, init, body, init_t, c, y, uu___1, uu___2, + d_c, d_body) + -> + Pulse_Typing.T_WithLocal + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + (Pulse_Syntax_Naming.subst_term init ss), + (Pulse_Syntax_Naming.subst_st_term body ss), + (Pulse_Syntax_Naming.subst_term init_t ss), + (Pulse_Syntax_Naming.subst_comp c ss), y, (), (), + (comp_typing_subst g x t g' e () c + (Pulse_Syntax_Base.comp_u c) d_c), + (coerce_eq + (st_typing_subst g x t + (Pulse_Typing_Env.push_binding g' y + Pulse_Syntax_Base.ppname_default + (Pulse_Typing.mk_ref init_t)) e () + (Pulse_Syntax_Naming.open_st_term_nv body + (Pulse_Syntax_Base.v_as_nv y)) + (Pulse_Typing.comp_withlocal_body y init_t + init c) d_body) ())) + | Pulse_Typing.T_Rewrite (uu___, p, q, uu___1, uu___2) -> + Pulse_Typing.T_Rewrite + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + (Pulse_Syntax_Naming.subst_term p ss), + (Pulse_Syntax_Naming.subst_term q ss), (), ()) + | Pulse_Typing.T_Admit (uu___, s, c, d_s) -> + Pulse_Typing.T_Admit + ((Pulse_Typing_Env.push_env g + (Pulse_Typing_Env.subst_env g' (nt x e))), + (Pulse_Syntax_Naming.subst_st_comp s ss), c, + (st_comp_typing_subst g x t g' e () s d_s)) \ No newline at end of file diff --git a/src/syntax_extension/PulseDesugar.fst b/src/syntax_extension/PulseDesugar.fst index 197752970..150e3a88e 100755 --- a/src/syntax_extension/PulseDesugar.fst +++ b/src/syntax_extension/PulseDesugar.fst @@ -282,9 +282,7 @@ let mk_totbind b s1 s2 r : SW.st_term = SW.tm_totbind b s1 s2 r let mk_bind b s1 s2 r : SW.st_term = - if SW.is_tm_intro_exists s1 - then SW.tm_bind b (SW.tm_protect s1) (SW.tm_protect s2) r - else SW.tm_bind b s1 s2 r + SW.tm_bind b s1 s2 r let explicit_rvalues (env:env_t) (s:Sugar.stmt) : Sugar.stmt