@@ -60,67 +60,9 @@ let rec get_rewrites_to_from_post (g: env) xres (post: slprop) : T.Tac (option R
6060 | _ -> None )
6161 | _ -> None
6262
63- let mk_uvar ( g : env ) ( ty : term ) : T. Tac term =
64- // FIXME
65- fst ( tc_term_phase1_with_type g tm_unknown ty )
66-
67- let prove_this ( g : env ) ( goal : slprop ) ( ctxt : list slprop ) : T. Tac ( option ( list slprop )) =
68- match inspect_term goal with
69- | Tm_Pure p ->
70- // TODO: pure (x == ?u)
71- Some []
72- | Tm_ExistsSL u b body ->
73- let uv = mk_uvar g b . binder_ty in
74- Some ( slprop_as_list ( open_term' body uv 0 ))
75- | Tm_WithPure p _ body ->
76- Some ( tm_pure p :: slprop_as_list ( open_term' body unit_const 0 ))
77- | Tm_Star a b ->
78- Some [ a ; b ]
79- | _ ->
80- let rec try_match ( ctxt : list slprop ) : Dv bool =
81- match ctxt with
82- | [] -> false
83- | c :: ctxt ->
84- if RU. teq_nosmt_force_phase1 ( elab_env g ) goal c then
85- true
86- else
87- try_match ctxt
88- in
89- if try_match ctxt then
90- Some []
91- else
92- None
93-
94- let rec prove_step ( g : env ) ( goals : list slprop ) ( ctxt : list slprop ) : T. Tac ( option ( list slprop )) =
95- match goals with
96- | [] -> None
97- | goal :: goals ->
98- match prove_this g goal ctxt with
99- | Some new_goals -> Some ( new_goals @ goals )
100- | None ->
101- match prove_step g goals ctxt with
102- | Some stepped -> Some ( goal :: stepped )
103- | None -> None
104-
105- let rec prove_loop ( g : env ) ( goals : list slprop ) ( ctxt : list slprop ) : T. Tac ( list slprop ) =
106- match prove_step g goals ctxt with
107- | Some new_goals -> prove_loop g new_goals ctxt
108- | None -> goals
109-
11063let prove ( g : env ) ( goal : slprop ) ( ctxt : slprop ) ( r : range ) : T. Tac unit =
111- let (| goal , _ |) = normalize_slprop g goal true in
112- let goal = slprop_as_list goal in
113- let (| ctxt , _ |) = normalize_slprop g ctxt true in
114- let ctxt = slprop_as_list ctxt in
115- match prove_loop g goal ctxt with
116- | [] -> ()
117- | unsolved_goals ->
118- T. fail_doc_at [
119- text " Cannot prove remaining precondition:" ;
120- separate hardline ( T. map pp unsolved_goals );
121- text " from context:" ;
122- separate hardline ( T. map pp ctxt );
123- ] ( Some r )
64+ let (| g' , ctxt' , _ |) = Pulse.Checker.Prover. prove r g ctxt goal false in
65+ ()
12466
12567let symb_eval_stateful_app ( g : env ) ( ctxt : slprop ) ( t : term ) : T. Tac R. term =
12668 let t , ty , _ = tc_term_phase1 g t in
0 commit comments