1 (* Title: Interpret/Interpret.thy
2 Author: Walther Neuper 110226
3 (c) due to copyright terms
5 Collect all defitions for the Lucas-Interpreter
9 imports Specify.Specify
12 ML_file "sub-problem.sml"
13 ML_file "thy-read.sml"
15 ML_file "solve-step.sml"
16 ML_file "error-pattern.sml"
18 ML_file "lucas-interpreter.sml"
19 ML_file "step-solve.sml"
23 val thys_known_sofar = Theory.nodes_of @{theory}
24 val isac_thys_known_sofar = take (
25 find_index (curry Context.eq_thy ThyC.last_isabelle_thy) thys_known_sofar,
27 val isac_names_known_sofar = map Context.theory_name isac_thys_known_sofar
29 val compare_dependencies__ThyC =
30 if isac_names_known_sofar = ThyC.session_interpret_names @ ThyC.session_specify_names then ()
31 else raise ERROR "theory dependencies not as anticipated in ThyC"
36 fun tac_from_prog _ thy (Const (\<^const_name>\<open>Prog_Tac.Rewrite_Inst\<close>, _) $ sub $ thmID $ _) =
38 val tid = HOLogic.dest_string thmID
39 val sub' = (**)Subst.program_to_input(** )Prog_Tac.Rewrite_Inst_adapt_to_type thy( **) sub
40 in (Tactic.Rewrite_Inst (sub', (tid, ThmC.thm_from_thy thy tid))) end
41 | tac_from_prog _ _ (Const (\<^const_name>\<open>Prog_Tac.Rewrite_Set\<close>,_) $ rls $ _) =
42 (Tactic.Rewrite_Set (HOLogic.dest_string rls))
43 | tac_from_prog _ thy (Const (\<^const_name>\<open>Prog_Tac.Rewrite_Set_Inst\<close>, _) $ sub $ rls $ _) =
45 val sub' = (**)Subst.program_to_input(** )Prog_Tac.Rewrite_Inst_adapt_to_type thy( **) sub
46 in (Tactic.Rewrite_Set_Inst (sub', HOLogic.dest_string rls)) end