161 Thm.mk_binop iff ct (if result then @{cprop "PROP Code_Generator.holds"} else ct) |
161 Thm.mk_binop iff ct (if result then @{cprop "PROP Code_Generator.holds"} else ct) |
162 end; |
162 end; |
163 |
163 |
164 val (_, raw_check_holds_oracle) = Context.>>> (Context.map_theory_result |
164 val (_, raw_check_holds_oracle) = Context.>>> (Context.map_theory_result |
165 (Thm.add_oracle (Binding.name "holds_by_evaluation", |
165 (Thm.add_oracle (Binding.name "holds_by_evaluation", |
166 fn (serializer, naming, thy, program, vs_t, deps, ct) => check_holds serializer naming thy program vs_t deps ct))); |
166 fn (some_target, naming, thy, program, vs_t, deps, ct) => check_holds some_target naming thy program vs_t deps ct))); |
167 |
167 |
168 fun check_holds_oracle serializer naming thy program ((_, vs_ty), t) deps ct = |
168 fun check_holds_oracle some_target naming thy program ((_, vs_ty), t) deps ct = |
169 raw_check_holds_oracle (serializer, naming, thy, program, (vs_ty, t), deps, ct); |
169 raw_check_holds_oracle (some_target, naming, thy, program, (vs_ty, t), deps, ct); |
170 |
170 |
171 fun dynamic_holds_conv thy = Code_Thingol.dynamic_conv thy |
171 fun dynamic_holds_conv thy = Code_Thingol.dynamic_conv thy |
172 (fn naming => check_holds_oracle NONE naming thy) |
172 (fn naming => check_holds_oracle NONE naming thy) |
173 o reject_vars thy; |
173 o reject_vars thy; |
174 |
174 |