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