TODO.md
author wneuper <Walther.Neuper@jku.at>
Sun, 31 Jul 2022 16:35:33 +0200
changeset 60504 8cc1415b3530
parent 60500 59a3af532717
child 60505 137227934d2e
permissions -rw-r--r--
eliminate global flag Eval.trace_on
     1 * MW: make Outer_Syntax.command \<^command_keyword>\<open>problem\<close> a model for ..\<open>Example\<close>
     2   An ML syntax error should be indicated in place (in the string after \<^keyword>\<open>Given\<close> etc)
     3   and not on the definition as a whole. 
     4     - in MathEngBasic/problem "Outer_Syntax.command \<^command_keyword>\<open>problem\<close>" there are writeln
     5       and comments with testdata from "problem pbl_bieg : "Biegelinien"" in Biegelinie.thy
     6     - in MathEngBasic/problem there is guesswork ("TODO") how to reorganise "fun prep_input_PIDE"
     7       such that errors in "Given" etc are indicated WITHIN the term.
     8 
     9 * ?MW?: In Outer_Syntax.command \<^command_keyword>\<open>Example\<close> is there a quick fix
    10   for successfully replacing hacked Problem.parse_cas by parse_references_input?
    11     (a) In addition to replacing Problem.parse_cas: How implement the optional parser:
    12       - Example "Diff_App/No.123 a" + NONE
    13       - Example "Diff_App/No.123 a" + SOME (probl_id, model_input, refs_input)
    14         i.e. we expect ISAC to present an empty template "Problem..Solution", but as a whole, to the user;
    15         see VSCode_Example.thy subsubsection \<open>Specification step by step\<close>
    16     How get Token.src for testing purposes?
    17     How can Scan.* be traced?
    18     (Tracing should help understanding Problem.parse_cas, Problem.parse_model_input which involve Scan.*)
    19 
    20 * MW: check uses of Unsynchronized.ref vs. Synchronized.var;
    21 
    22 * MW: clarify/eliminate Isabelle/Scala add-ons (presently unused)
    23 
    24     diff -r /home/makarius/isabelle/repos-Isabelle2021/src/Pure/build-jars ./src/Pure/build-jars
    25     11a12
    26     >   src/Tools/isac/BridgeJEdit/isac.scala
    27 
    28     diff -r /home/makarius/isabelle/repos-Isabelle2021/src/Pure/Tools/scala_project.scala ./src/Pure/Tools/scala_project.scala
    29     76a77
    30     >       "src/Tools/isac/etc" -> Path.explode("isabelle.isac"),
    31 
    32 * Eliminate Thy_Info.get_theory eventually: should take theory from ancestory
    33   within current context.
    34     cf. e587c45cae0f note in Build_Thydata.thy
    35 
    36 * Clarify symmetric rule: Thm.apply_attribute Calculation.symmetric thm context (!?);
    37     ??
    38 
    39 * KEStore_Elems: Should we eliminate union_overwrite and use standard namespace merge?
    40   (Exception: rlss with its special cross-theory merge.)
    41     ? how adapt the different signatures ?
    42     union_overwrite: ('a * 'a -> bool) -> 'a list -> 'a list -> 'a list
    43     merge          : ('a * 'a -> bool) -> 'a list * 'a list -> 'a list
    44 
    45 * What is the purpose of "#numeral" instead of plain numeral?
    46     ??
    47 
    48 * Check/clarify Context.theory_name vs. Context.theory_long_name.
    49     present ISAC assumes 2 sessions in the MathEngine, Specify and Interpret, 
    50     and all Isac_Knowledge is in session Isac.
    51     So Context.theory_name suffices
    52 
    53 * Eliminate mutable Rewrite_Ord.rew_ord' (!?);
    54     shall be done in connection with cf. e587c45cae0f note in Build_Thydata.thy
    55 
    56 * What is the idea behind KEStore_Elems.add_thes? How to do it properly in current Isabelle?
    57     https://static.miraheze.org/isacwiki/0/04/Isac-docu.pdf distinguishes 
    58     several kinds of ISAC users, in particular "math author (Mathematik-Autor)" and
    59     "course designer (Kurs-Designer)". The latter just adds examples which re-use existing
    60     knowledge designed by the former. KEStore_Elems.add_thes is an interface for the latter.   
    61 
    62 * WN: proper ML antiquotations for "Tactical.Try" etc. --- be careful about unclear situations,
    63   e.g. "Tactical.Try" vs. "Lucas_Interpreter.Try";
    64 
    65 * WN: Avoid Thm.get_name_hint and use Global_Theory.get_thm instead, get theory from References.T
    66     and push theory through as argument of respective functions.
    67 
    68 * WN: more direct logical foundations wrt. Isabelle/HOL, eliminate many axiomatizations
    69     - quite often "axiomatization ..." can be turned into "lemma ... by auto"
    70       without further ado;
    71     - sometimes this requires to use more specific types / type classes;
    72     - sometimes this requires to use proper definitional mechanisms (e.g. 'primrec', 'fun');
    73     - a few "hard" cases will remain, to be reconsidered eventually (e.g. differentiation);
    74 
    75 * WN: "fun pr_ord" is not required if used with @{make_string}, @{print}, @{print tracing};
    76     takes only static arguments ----------------^^^^^^^^^^^^^^, not value of "hd_ord (f, g)"
    77     ? are there better approximations to old output of (*1*) than with (*2*)
    78     (*1*)val _ = tracing ("hd_ord (f, g)      = " ^ ((pr_ord o hd_ord) (f, g)) );
    79     (*2*)val _ = @{print tracing}{a = "hd_ord (f, g)      = ", z = hd_ord (f, g)}(**)
    80 
    81 
    82 * WN: eliminate global flags like "trace_on", replace Unsynchronized.ref by
    83 
    84 ML \<open>
    85   val rewrite_trace = Attrib.setup_config_bool \<^binding>\<open>rewrite_trace\<close> (K false);
    86 \<close>
    87 
    88 * WN: Calculate.the: add structure Calculate
    89 
    90 * WN: rewriting with ctxt not complete (cause errors hard to indentify later)
    91     - Prconditions.eval
    92     - Solve_Step.check ..Rewrite_Inst, Substitute, ..
    93     - Error_Pattern.check_for', fill_form
    94     - Derive.steps
    95     - Fetch_Tacs.specific_from_prog ?
    96     - Eval.adhoc_thm, adhoc_thm1_
    97     - ? LIST IS NOT COMPLETE
    98 
    99 * WN: ? Rational.Cancel_p; extend use of \<^theory> to \<^theory_context>
   100 
   101 * WN: redesign transition from Specification to Solution: how relate 
   102     - Formalise.model with variants (e.g. VSCode_Example)
   103       reconsider separation of variants F_I, F_II, see MAWEN paper
   104     - !?! I_Model of MethodC          (fairly free sequence, dependent on Formalise.model)
   105     - !?! formal arguments of program (fixed sequence)
   106 
   107 * WN: ?How represent items, which have not yet been input?
   108    Note: For the purpose of user-guidance the format of requested input should be indicated!
   109     - proposal for how to indicate requested input: in VSCode_Example.thy subsubsection \<open>Empty Specification>
   110     - the trial with <fun is_empty> in Calculation.thy makes the question more precise: 
   111       better hack parsers or better work on ML_Syntax?
   112 
   113 * WN: as soon as parsing in Outer_Syntax.command..‹Example› works, implement in Calculation
   114   - init_ctree, update_status, check_input
   115 
   116