TODO.md
author wneuper <Walther.Neuper@jku.at>
Sun, 27 Aug 2023 16:48:03 +0200
changeset 60741 22586d7fedb0
parent 60729 43d11e7742e1
child 60743 fd390a6aa294
permissions -rw-r--r--
followup 3: rename Pre_Conds.* and I_Model.* (eliminate *_TEST as much as possible)
     1 * MW: implement ML toplevel spans in official Isabelle, e.g.
     2   with separator \<^medskip> and some tool support for automated
     3   update (in "isabelle update" and/or PIDE);
     4 
     5 * MW?: rename *.sml to *.ML, potentially with tool support;
     6 
     7 * MW: clarify/eliminate Isabelle/Scala add-ons (presently unused)
     8 
     9     diff -r /home/makarius/isabelle/repos-Isabelle2021/src/Pure/build-jars ./src/Pure/build-jars
    10     11a12
    11     >   src/Tools/isac/BridgeJEdit/isac.scala
    12 
    13     diff -r /home/makarius/isabelle/repos-Isabelle2021/src/Pure/Tools/scala_project.scala ./src/Pure/Tools/scala_project.scala
    14     76a77
    15     >       "src/Tools/isac/etc" -> Path.explode("isabelle.isac"),
    16 
    17 * MW: Skip_Proof.make_thm: theory -> term -> thm        ? could now change signature to
    18                          : Proof.context -> term -> thm
    19 * MW: Make $ISABELLE_ISAC_TEST work without sessions (please synchronise with WN)
    20 * MW: ? implement a template, inserted in a proof in the line of metis;
    21       hints are given in src/../BridgeJEdit/template.sml
    22       and in            test/../BridgeJEdit/template.sml
    23 
    24 ***** some items for discussion
    25 
    26 * Clarify symmetric rule: Thm.apply_attribute Calculation.symmetric thm context (!?);
    27     ??
    28 
    29 * "fun pr_ord" is not required if used with @{make_string}, @{print}, @{print tracing};
    30     takes only static arguments ----------------^^^^^^^^^^^^^^, not value of "hd_ord (f, g)"
    31     ? are there better approximations to old output of (*1*) than with (*2*)
    32     (*1*)val _ = tracing ("hd_ord (f, g)      = " ^ ((pr_ord o hd_ord) (f, g)) );
    33     (*2*)val _ = @{print tracing}{a = "hd_ord (f, g)      = ", z = hd_ord (f, g)}(**)
    34 
    35 
    36 ***** for the few items below WN asks MW for help
    37 
    38 * strange ?ML?-error WN230404 (= pointer to respective test): Test_Isac.thy runs without errors except 3 files
    39     "Knowledge/eqsystem-1.sml"
    40     "Knowledge/eqsystem-2.sml"
    41     "Knowledge/eqsystem-3.sml"
    42   This error is strange, since these 3 fiels use the same src as others; the error remains although the
    43   constructors of both functions, Pre_Conditionss.mk_env and I_Model.feedback_OLD_to_TEST, 
    44   have been made equal (Model_Def.Cor_TEST, etc).
    45 
    46 * postpone: ?How accomplish two user-requirements by Outer_Syntax.command \<^command_keyword>\<open>Example\<close>
    47    (1) start a Calculation with a CAS_Cmd
    48    (2) start an Example from scratch, i.e. with (Formalize.empty, References.empty)
    49    Proposals for a solution are in test/../Test_VSCode_Example.thy
    50    in subsubsection ‹Start Example with a CAS_Cmd›
    51 
    52 
    53 ***** priority of WN items is top down, most urgent/simple on top
    54 
    55 * WN: ---broken elementwise input to lists---
    56 * WN: undetected ERROR in autoCalculate --- due to Post_Conds.check? (_OLD .. dispels ?)
    57 * WN: "review (descriptor, ts)"; ts : term list, because this supports element-wise input of lists.
    58   ts = [_] is determined by <Model_Pattern.is_list_descr descriptor>.
    59   Thus, as long (descriptor, ts) is together, ts never contains <Const ("List.list.Cons", _)> --
    60   this holds for specify-phase internally, but not to the outside (presentation to user, transfer to solve-phase).
    61   TODO: shift this as comment to structure Model_Def, type o_model_single + referenced by datatype i_model_feedback.
    62   TODO: o_model, i_model etc
    63 * WN: type descriptor is defind 5 times !!!
    64 * WN: introduction of I_Model.T_TEST is a huge step, which is partitioned into smaller steps, starting with
    65    changeset cb44eefd3c7b "repare 1 PIDE turn 11: .." and continued with "repare 1..n".
    66    After changeset 94242a19b04c "prepare 4: narrow I_Model.T -- _TEST" it seems no more possible to make the test(s)
    67    in test/../Test_Theory.thy run without braking too many tests. Thus
    68       minimal code in src/* is changed and marked by (*T_TESTold*)xxx(*T_TEST* )xxx( *T_TESTnew*)
    69       while the outcommenting shown is used for commits (where Test_Isac_Shorts runs without errors,
    70       but Test_Theory.thy doen't work).
    71 * WN: ad CS "remove sep_variants_envs":
    72       test/../i-model.sml (*/----- reactivate with CS "remove sep_variants_envs"-----\* )
    73 * WN: DEL get_simplifier: is only used in test/*
    74 * WN: test/../pre-conditions.sml: there seems something wrong with env_subst-?-env_eval in check_TEST
    75       thus we introduced check_TEST', compare --- Minisubplb/200-start-method-NEXT_STEP.sml ---
    76 * WN: replace take in LibraryC with take from Library
    77 * WN: Syntax.read_term @{context} --> Syntax.read_term\<^context> , see I_Model "UnIqE_tErM"
    78 * WN: renaming in References
    79 * WN: shift code from libraryC.sml to designated destination (ThyC, etc)
    80 * WN: rename type Rule.rule -> Rule.T
    81 * WN: improve naming in refine.sml, m-match.sml
    82 * WN: review ?code ERROR? in Rewrite.eval_true, see WN230329
    83 
    84 * WN: consider redesign of Pre_Conds.mk_envs <-?- Pre_Conds.environment together with Model_Pattern.split_descriptor
    85       which could eliminate isalist2list and make handling of lists more convenient, see --- build Pre_Conds.check_TEST
    86       Pre_Conds.environment is called seriously only once, "check (Tactic.Apply_Method" for preconds
    87       !relate to instantiation of programs arguments!
    88 * WN: correct design flaw in fun eval_*, see aa8760e4d987
    89 * WN: unify get_ctxt in Solve_Step, Ctree (*DEPRECATED*)
    90 * WN: review Prog_Tac:
    91       (*+isa==isa2*)@{term "Substitution []"};               (*Free ("Subproblem",.. ALSO Subproblem, ?!*)
    92       (*+isa==isa2*)@{term "Rewrite_Set ''norm_Rational''"}; (*Const ("Prog_Tac.Rewrite_Set",..*)
    93 
    94 * WN: Step_Specify.initialise: remove hdl in return-value, replace Step_Specify.initialise' xxx'
    95       ? which uses initialise !?
    96 * WN: ? unify "no_met" with "empty_meth_id" from References.empty ?
    97 
    98 * WN: proper ML antiquotations for "Tactical.Try" etc. --- be careful about unclear situations,
    99   e.g. "Tactical.Try" vs. "Lucas_Interpreter.Try";
   100 
   101 * WN: ? Rational.Cancel_p; extend use of \<^theory> to \<^theory_context>
   102 
   103 * WN: Check/clarify Context.theory_name vs. Context.theory_long_name.
   104     Context.theory_name seems to suffice after elimination of sessions.
   105 
   106 * WN: more direct logical foundations wrt. Isabelle/HOL, eliminate many axiomatizations
   107     - quite often "axiomatization ..." can be turned into "lemma ... by auto"
   108       without further ado;
   109     - sometimes this requires to use more specific types / type classes;
   110     - sometimes this requires to use proper definitional mechanisms (e.g. 'primrec', 'fun');
   111     - a few "hard" cases will remain, to be reconsidered eventually (e.g. differentiation);
   112 
   113 * WN: rename Pos.* -- Pos.ints, Pos.spec, Pos.empty, Pos.ints_empty
   114 
   115 * WN: redesign transition from Specification to Solution: how relate 
   116     - Formalise.model with variants (e.g. VSCode_Example)
   117       reconsider separation of variants F_I, F_II, see MAWEN paper
   118     - !?! I_Model of MethodC          (fairly free sequence, dependent on Formalise.model)
   119     - !?! formal arguments of program (fixed sequence)
   120 
   121 * WN: avoid too many uses of "structure Data = Theory_Data", instead use approx. 1 data slot
   122   per ML module, with type T = ... record or tuple (e.g. see @{apply} ML antiquotation)
   123 
   124 * WN: rename *.sml to *.ML, potentially with tool support by MW;
   125 * WN: rename src/Tools/isac/ to main/ (or something else);
   126         rename  src/Tools/isac/BridgeJEdit and test/Tools/isac/BridgeJEdit to */Tools/isac/BridgePIDE