1 (* Title: src/Tools/isac/BridgeJEdit/Demo_Example.thy
2 Author: Walther Neuper, JKU Linz
3 (c) due to copyright terms
5 Runnig example for developing Isabelle/Isac via Isabelle/PIDE in BridgeJEdit
12 section \<open>Boilerplate, the example from Isabelle Workshop 2022\<close>
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.
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.
35 subsubsection \<open>Complete Specification\<close>
37 Example \<open>No.123 a\<close>
38 Problem ''univariate_calculus/Optimisation''
41 Given: "Constants r = 7"
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"
47 x RProblem: ''univariate_calculus/Optimisation''
48 RMethod: ''Optimisation/by_univariate_calculus''
52 subsubsection \<open>Empty Specification\<close>
54 Example \<open>No.123 a\<close>
55 Problem ''univariate_calculus/Optimisation''
60 Find: "Maximum _" "AdditionalValues _"
61 Relate: "Extremum _ "SideCondition _"
69 section \<open>Stepwise Development\<close>
71 subsection \<open>Specification Phase\<close>
73 stepwise development to be inspected from
74 https://hg.risc.uni-linz.ac.at/wneuper/isa/rev/9d98791b4080
78 Example pbl_bieg : "Biegelinien" =
79 Method: "IntegrierenUndKonstanteBestimmen2"
80 Given: "Traegerlaenge l_l" "Streckenlast q_q"
81 (* Where: "0 < l_l" ...wait for < and handling Arbfix*)
82 Find: "Biegelinie b_b"
83 Relate: "Randbedingungen r_b"