src/Tools/isac/Build_Isac.thy
author Walther Neuper <wneuper@ist.tugraz.at>
Sat, 18 Jul 2015 15:27:35 +0200
changeset 59147 de324be059e7
parent 59146 4f4833d5e10b
child 59148 8cf9c6e0c160
permissions -rw-r--r--
PIDE: Protocol imports isac/Knowledge

cf. https://github.com/wneuper/libisabelle/commit/e7e6e78c834960aa4d0ce14628ed521cec273b88

Note: isac-java requires isac/Knowledge, not only Frontend
neuper@52061
     1
(*  Title:  build and test isac on Isabelle2013
neuper@38057
     2
    Author: Walther Neuper, TU Graz, 100808
neuper@38051
     3
   (c) due to copyright terms
neuper@38051
     4
neuper@52062
     5
For creating a heap image of isac see ~~/ROOT.
neuper@52062
     6
neuper@52062
     7
ATTENTION: no errors in this theory do not mean that there are no errors in Isac;
neuper@52062
     8
errors are rigorously detected when creating a heap.
neuper@37906
     9
*)
neuper@37906
    10
neuper@55276
    11
header {* Loading the isac mathengine;
neuper@55276
    12
  for debugging see text at begin (theory dependencies!) *}
neuper@37906
    13
neuper@48761
    14
theory Build_Isac 
neuper@48760
    15
imports Complex_Main
neuper@48761
    16
(* use    "library.sml"
wneuper@59106
    17
   use    "calcelems.sml"                                        
neuper@41905
    18
neuper@48761
    19
   use    "ProgLang/termC.sml"
neuper@41905
    20
   use    "ProgLang/calculate.sml"
neuper@41905
    21
   use    "ProgLang/rewrite.sml"
neuper@41905
    22
  "use_thy ProgLang/ListC"
neuper@48880
    23
  "use_thy ProgLang/Tools"                                                 
neuper@41905
    24
  "use_thy ProgLang/Script"
neuper@41905
    25
   use    "ProgLang/scrtools.sml"
neuper@52062
    26
*)        "ProgLang/ProgLang"
neuper@48761
    27
neuper@48763
    28
(* use    "Interpret/mstools.sml"
neuper@48763
    29
   use    "Interpret/ctree.sml"
neuper@48763
    30
   use    "Interpret/ptyps.sml"
wneuper@59106
    31
   use    "Interpret/generate.sml"                               
neuper@48763
    32
   use    "Interpret/calchead.sml"
neuper@48763
    33
   use    "Interpret/appl.sml"
neuper@48763
    34
   use    "Interpret/rewtools.sml"
neuper@48763
    35
   use    "Interpret/script.sml"
neuper@48763
    36
   use    "Interpret/solve.sml"
neuper@48763
    37
   use    "Interpret/inform.sml"
neuper@48763
    38
   use    "Interpret/mathengine.sml"
neuper@52062
    39
*)        "Interpret/Interpret"
neuper@48761
    40
neuper@52062
    41
(* use    "xmlsrc/mathml.sml"
neuper@48762
    42
   use    "xmlsrc/datatypes.sml"
neuper@41905
    43
   use    "xmlsrc/pbl-met-hierarchy.sml"
neuper@48895
    44
   use    "xmlsrc/thy-hierarchy.sml"                               
neuper@41905
    45
   use    "xmlsrc/interface-xml.sml"
neuper@52062
    46
*)        "xmlsrc/xmlsrc"
neuper@41905
    47
neuper@48763
    48
(* use     "Frontend/messages.sml"
neuper@41905
    49
   use     "Frontend/states.sml"
neuper@41905
    50
   use     "Frontend/interface.sml"
neuper@41905
    51
neuper@41905
    52
   use     "print_exn_G.sml"
neuper@52062
    53
*)         "Frontend/Frontend"
wneuper@59147
    54
wneuper@59147
    55
           "Knowledge/Build_Thydata" (*imports Isac.thy etc*)
wneuper@59147
    56
wneuper@59146
    57
           (* the Protocol for the connection isac-java -- Isabelle/Isac is built separately:
wneuper@59146
    58
              libisabelle$ /usr/local/isabisac/bin/isabelle build -D . -bv
wneuper@59146
    59
           here we partly check consistency libisabelle/Isac -- Isabelle/Isac: *)
wneuper@59139
    60
           "~/proto4/libisabelle/libisabelle/src/main/isabelle/Protocol/Protocol"
neuper@48763
    61
begin
neuper@48760
    62
neuper@55276
    63
text {* 
neuper@55276
    64
  show theory dependencies using the graph browser, 
neuper@55276
    65
  open "browser_info/HOL/Isac/session.graph"
neuper@55276
    66
  and proceed from the ancestors towards the siblings.
neuper@55276
    67
*}
neuper@55276
    68
neuper@55431
    69
section {*check presence of definitions from directories*}
neuper@48763
    70
neuper@41905
    71
ML {* is_reall_dsc; (*from "ProgLang/scrtools.sml" *) *}
neuper@41905
    72
ML {* me; (*from "Interpret/mathengine.sml"*) *}
neuper@41905
    73
ML {* contextthyOK2xml; (*"xmlsrc/interface-xml.sml"*) *}
neuper@41905
    74
ML {* print_exn_unit *}
neuper@48880
    75
ML {* list_rls (*from Atools.thy WN130615??? or ProgLang???*) *}
neuper@48763
    76
neuper@41905
    77
ML {* eval_occurs_in (*from Atools.thy*) *}
neuper@41905
    78
ML {* @{thm last_thmI} (*from Atools.thy*) *}
neuper@41931
    79
ML {*@{thm Querkraft_Belastung}*}
neuper@41905
    80
neuper@38009
    81
ML {* check_guhs_unique := false; *}
neuper@48880
    82
ML {* writeln "**** isac kernel = math-engine + Knowledge complete ******" *}
neuper@41943
    83
ML {* @{theory "Isac"} *}
neuper@55454
    84
ML {* (*get_the ["IsacKnowledge", "Diff", "Theorems", "diff_sin_chain"]
neuper@55454
    85
  ERROR: app_py: not found: ["IsacKnowledge","Diff","Theorems","diff_sin_chain"]*) *}
neuper@42412
    86
neuper@55431
    87
section {* State of approaching Isabelle by Isac *}
neuper@55431
    88
text {* 
neuper@55431
    89
  Mathias Lehnfeld gives the following list in his thesis in section 
neuper@55431
    90
  4.2.3 Relation to Ongoing Isabelle Development.
neuper@55431
    91
*}
neuper@55431
    92
subsection {* (0) Survey on remaining Unsynchronized.ref *}
neuper@55433
    93
text {*
neuper@55433
    94
  REPLACE BY KEStore... (has been overlooked)
neuper@55433
    95
    calcelems.sml:val rew_ord' = Unsynchronized.ref ...
neuper@55433
    96
  KEEP FOR TRACING
neuper@55433
    97
    calcelems.sml:val trace_rewrite = Unsynchronized.ref false;
neuper@55433
    98
    calcelems.sml:val depth = Unsynchronized.ref 99999;
neuper@55433
    99
    calcelems.sml:val lim_rewrite = Unsynchronized.ref 99999;
neuper@55433
   100
    calcelems.sml:val lim_deriv = Unsynchronized.ref 100;
neuper@55433
   101
    Interpret/script.sml:val trace_script = Unsynchronized.ref false;
neuper@55433
   102
  KEEP FOR EASIER DEVELOPMENT
neuper@55433
   103
    calcelems.sml:val check_guhs_unique = Unsynchronized.ref true;
neuper@55433
   104
  KEEP FOR DEMOS
neuper@55433
   105
    Knowledge/GCD_Poly_ML.thy:  val trace_div = Unsynchronized.ref true;
neuper@55433
   106
    Knowledge/GCD_Poly_ML.thy:  val trace_div_invariant = Unsynchronized.ref false;
neuper@55433
   107
    Knowledge/GCD_Poly_ML.thy:  val trace_Euclid = Unsynchronized.ref true;
neuper@55433
   108
*}
neuper@55431
   109
subsection {* (1) Exploit parallelism for concurrent session management *}
neuper@55431
   110
subsection {* (2) Make Isac’s programming language usable *}
neuper@55431
   111
subsection {* (3) Adopt Isabelle’s numeral computation for Isac *}
neuper@55431
   112
text {* 
neuper@55431
   113
  In 2002 isac already strived for floating point numbers. Since that time
neuper@55431
   114
  isac represents numerals as "Free", see below (*1*). These experiments are
neuper@55431
   115
  unsatisfactory with respect to logical soundness.
neuper@55431
   116
  Since Isabelle now has started to care about floating point numbers, it is high 
neuper@55431
   117
  time to adopt these together with the other numerals. Isabelle2012/13's numerals
neuper@55431
   118
  are different from Isabelle2011, see "test/Tools/isac/ProgLang/termC.sml".
neuper@55431
   119
  
neuper@55431
   120
  The transition from "Free" to standard numerals is a task to be scheduled for 
neuper@55431
   121
  several weeks. The urgency of this task follows from the experience, 
neuper@55431
   122
  that (1.2) for "thehier" is very hard, because "num_str" seems to destroy 
neuper@55431
   123
  some of the long identifiers of theorems which would tremendously simplify
neuper@55431
   124
  building a hierarchy of theorems according to (1.2), see (*2*) below.
neuper@55431
   125
*}
neuper@55431
   126
ML {*(*1*) Free ("123.456", HOLogic.realT) *}
neuper@55484
   127
neuper@55431
   128
subsection {* (4) Improve the efficiency of Isac’s rewrite-engine *}
neuper@55431
   129
subsection {* (5) Adopt Isabelle/jEdit for Isac *}
neuper@55431
   130
neuper@37906
   131
end