equal
deleted
inserted
replaced
161 in |
161 in |
162 Thm.mk_binop iff ct (if result then @{cprop "PROP Code_Generator.holds"} else ct) |
162 Thm.mk_binop iff ct (if result then @{cprop "PROP Code_Generator.holds"} else ct) |
163 end; |
163 end; |
164 |
164 |
165 val (_, raw_check_holds_oracle) = Context.>>> (Context.map_theory_result |
165 val (_, raw_check_holds_oracle) = Context.>>> (Context.map_theory_result |
166 (Thm.add_oracle (Binding.name "holds_by_evaluation", |
166 (Thm.add_oracle (@{binding holds_by_evaluation}, |
167 fn (thy, evaluator, vs_t, deps, ct) => check_holds thy evaluator vs_t deps ct))); |
167 fn (thy, evaluator, vs_t, deps, ct) => check_holds thy evaluator vs_t deps ct))); |
168 |
168 |
169 fun check_holds_oracle thy evaluator ((_, vs_ty), t) deps ct = |
169 fun check_holds_oracle thy evaluator ((_, vs_ty), t) deps ct = |
170 raw_check_holds_oracle (thy, evaluator, (vs_ty, t), deps, ct); |
170 raw_check_holds_oracle (thy, evaluator, (vs_ty, t), deps, ct); |
171 |
171 |
336 |
336 |
337 (** Isar setup **) |
337 (** Isar setup **) |
338 |
338 |
339 val _ = |
339 val _ = |
340 Context.>> (Context.map_theory |
340 Context.>> (Context.map_theory |
341 (ML_Context.add_antiq (Binding.name "code") (fn _ => Args.term >> ml_code_antiq))); |
341 (ML_Context.add_antiq @{binding code} (fn _ => Args.term >> ml_code_antiq))); |
342 |
342 |
343 local |
343 local |
344 |
344 |
345 val datatypesK = "datatypes"; |
345 val datatypesK = "datatypes"; |
346 val functionsK = "functions"; |
346 val functionsK = "functions"; |