src/Tools/isac/BridgeJEdit/Demo_Example.thy
author wneuper <Walther.Neuper@jku.at>
Tue, 31 May 2022 16:21:22 +0200
changeset 60441 9488084c3441
parent 60439 848667c5dd56
child 60443 7883b82b8af5
permissions -rw-r--r--
cleanup
     1 (*  Title:      src/Tools/isac/BridgeJEdit/Demo_Example.thy
     2     Author:     Walther Neuper, JKU Linz
     3     (c) due to copyright terms
     4 
     5 Runnig example for developing Isabelle/Isac via Isabelle/PIDE in BridgeJEdit
     6 *)
     7 
     8 theory Demo_Example 
     9   imports Calculation
    10 begin
    11 
    12 section \<open>Boilerplate, the example from Isabelle Workshop 2022\<close>
    13 
    14 subsection \<open>Specification Phase\<close>
    15 text \<open>Goal for Isabelle Workshop 2022: this part of the example should be ready for demonstration:
    16   1. The keyword \<open>Example\<close> inserts the template underneath
    17   2. The template is filled from a (hidden) formalisation with the following items in the
    18     2.1. \<open>Model\<close>:
    19         * Constants _  ("_" indicates some kind of place holder for input)
    20         * the complete Where-field (the pre-condition), items marked as True | False
    21         * Maximum _, AdditionalValues _
    22         * Extremum _, SideCondition _
    23     2.2 \<open>References\<close>:
    24         * place holders "_" for input
    25         * The toggle switch before \<open>RProblem\<close> | \<open>RMethod\<close> is set to \<open>RProblem\<close>
    26           This might be postponed after the Isabelle Workshop.
    27   3. Input to 2.1 is 
    28     * type checked and marked as Type-Error
    29     * marked as Correct | Superfluous | Incomplete | Unknown (compare Specify/p-model.sml)
    30   4. Input to 2.2 by selection from a list / tree
    31   5. On update of \<open>RProblem\<close> (in the root problem) also \<open>Problem\<close> is updated;
    32      The argument of \<open>Problem\<close> comes with the template and is read-only.
    33 \<close>
    34 
    35 subsubsection \<open>Complete Specification\<close>
    36 text \<open>
    37 Example \<open>No.123 a\<close>
    38   Problem ''univariate_calculus/Optimisation''
    39     Specification:
    40       Model:
    41         Given: "Constants r = 7"
    42         Where: "0 < r"
    43         Find:  "Maximum A" "AdditionalValues u, v"
    44         Relate: "Extremum A = 2 \<sqdot> u \<sqdot> v − u \<up> 2" "SideCondition (u / 2) \<up> 2 + (2 / v) \<up> 2 = r \<up> 2"
    45       References:
    46         RTheory: ''Diff_App''
    47       x RProblem: ''univariate_calculus/Optimisation''
    48         RMethod: ''Optimisation/by_univariate_calculus''
    49     Solution:
    50 \<close>
    51 
    52 subsubsection \<open>Empty Specification\<close>
    53 text \<open>
    54 Example \<open>No.123 a\<close>
    55   Problem ''univariate_calculus/Optimisation''
    56     Specification:
    57       Model:
    58         Given: "Constants _"
    59         Where: "_"
    60         Find:  "Maximum _" "AdditionalValues _"
    61         Relate: "Extremum _ "SideCondition _"
    62       References:
    63         RTheory: ''_''
    64       x RProblem: ''_''
    65         RMethod: ''_''
    66     Solution:
    67 \<close>
    68 
    69 section \<open>Stepwise Development\<close>
    70 
    71 subsection \<open>Specification Phase\<close>
    72 text \<open> 
    73   stepwise development to be inspected from
    74   https://hg.risc.uni-linz.ac.at/wneuper/isa/rev/9d98791b4080
    75   onwards.
    76 \<close>
    77 
    78 Example pbl_bieg : "Biegelinien" =
    79   Method: "IntegrierenUndKonstanteBestimmen2"
    80   Given: "Traegerlaenge l_l" "Streckenlast q_q"
    81   (* Where: "0 < l_l" ...wait for &lt; and handling Arbfix*)
    82   Find: "Biegelinie b_b"
    83   Relate: "Randbedingungen r_b"
    84 
    85 ML \<open>
    86 \<close> ML \<open>
    87 \<close> ML \<open>
    88 \<close> ML \<open>
    89 \<close> ML \<open>
    90 \<close> ML \<open>
    91 \<close>
    92 
    93 end