src/Pure/Tools/compute.ML
changeset 18708 4b3dadb4fe33
parent 17795 5b18c3343028
child 19482 9f11af8f7ef9
equal deleted inserted replaced
18707:9d6154f76476 18708:4b3dadb4fe33
   275       invoke_oracle_i thy "Pure.compute" (thy, Param (r, n, ct))
   275       invoke_oracle_i thy "Pure.compute" (thy, Param (r, n, ct))
   276     end
   276     end
   277 
   277 
   278 fun rewrite r ct = rewrite_param r default_naming ct
   278 fun rewrite r ct = rewrite_param r default_naming ct
   279 
   279 
   280 (* setup of the Pure.compute oracle *)
   280 
       
   281 (* theory setup *)
       
   282 
   281 fun compute_oracle (thy, Param (r, naming, ct)) =
   283 fun compute_oracle (thy, Param (r, naming, ct)) =
   282     let
   284     let
   283         val _ = Theory.assert_super (theory_of r) thy
   285         val _ = Theory.assert_super (theory_of r) thy
   284         val t' = compute r naming ct
   286         val t' = compute r naming ct
   285     in
   287     in
   286         Logic.mk_equals (term_of ct, t')
   288         Logic.mk_equals (term_of ct, t')
   287     end
   289     end
   288 
   290 
   289 val _ = Context.add_setup [Theory.add_oracle ("compute", compute_oracle)]
   291 val _ = Context.add_setup (Theory.add_oracle ("compute", compute_oracle))
   290 
   292 
   291 end
   293 end