src/Tools/isac/Doc/Specify_Phase/document/user-requirements.tex
author wneuper <Walther.Neuper@jku.at>
Mon, 07 Nov 2022 17:37:20 +0100
changeset 60586 007ef64dbb08
parent 60207 454a399ae576
permissions -rw-r--r--
rename fields in Method_Def.T
     1 %:wrap=soft:maxLineLen=78:
     2 
     3 \chapter{Preliminaries}
     4 %############################################################################
     5 
     6 \section{List of terms used in the \isac-project}\label{terms}
     7 %============================================================================
     8 This list follows the original one in \cite[Appendix D]{isac:all}. It is a 
     9 selection concerning the specify-phase. In particular, the terms used for this 
    10 phase underwent a considerable development since 2002 and are updated to the 
    11 current, more convenient notions.
    12 
    13 \begin{description}
    14 \item{\bf Calculation} is the document for interactive construction of a 
    15 result from given items according to some \see Problem definition. It is a 
    16 variant of ``structured derivations''~\cite{Back-SD09}.
    17 
    18 \item{\bf Descriptor} is the heading constant of a \see Model-Item in the 
    19 fields "Given", "Find" and "Relate" (and not in where_-conditions). It indicates 
    20 the kind of item and constrains the respective type.
    21 
    22 \item{\bf Example} specifies a particular \see Calculation. It comprises text 
    23 and/or figure for the student and a \see Formalisation.
    24 
    25 \item{\bf Formalisation} is the formal part of an \see Example and contains 
    26 data to complete a \see Specification as a prerequisite for automated 
    27 generation of user-guidance in a \see Calculation.
    28 
    29 \item{\bf \sisac-Knowledge} comprises collections of three kinds of knowledge:
    30   \begin{compactitem}
    31   \item {\bf RTheory}, an Isabelle theory
    32   \item {\bf RProblem} is a \see Model-Pattern.
    33   \item {\bf RMethod}: a program guarded by a \see Model serving 
    34     ``Lucas-Interpre-tation''~\cite{EPTCS-wn-20}.
    35   \end{compactitem}
    36   For simplicity reasons, a collection of \see Examples is subsumed to  
    37     \sisac-Knowledge, too.
    38 
    39 \item{\bf Method} is a program for a class of Problems. It consists of a   
    40 program to be exploited by Lucas-Interpretation \cite{EPTCS-wn-20} and a guard   
    41 with the structure of a \see Model.
    42 
    43 \item{\bf Model} comprises four fields of \see Model-Items in the line  
    44 of~\cite{gries}:
    45   \begin{compactitem}
    46   \item {\bf Given} for the input-items
    47   \item {\bf Where} for the where_-conditions constraining the input-items
    48   \item {\bf Find} for the output-items
    49   \item {\bf Relate} for a part of the post-condition capturing the essence of 
    50     a problem relating input and output
    51   \end{compactitem}
    52 
    53 \item{\bf Model-Item} is a mathematical term in a \see Model.
    54 
    55 \item{\bf Model-Pattern} comprises the same fields as a \see Model, but these 
    56 contain variables to be instanted by the \see Formalisation of an \see Example 
    57 in order to give \see Model.
    58 
    59 \item{\bf Problem} is the head of a \see Calculation. Calculations can 
    60 comprise several sub-problems, arbitrarily nested, with exactly the same 
    61 structure. A Problem consists of a \see Specification and a \see Solution.
    62 
    63 \item{\bf References} refer to three kinds of items in the \see 
    64 \sisac-Knowledge.
    65 
    66 \item{\bf Solution} are the steps form a \see Specification to a \see 
    67 Solution, where each step is justified by a \see Tactic. The final step 
    68 fulfills the post-condition of the \see Model.
    69 
    70 \item{\bf Specification} comprises data to specify a problem in the \see Model 
    71 and gives \see References into the \see \sisac-Knowledge.
    72 
    73 \item{\bf Tactic} transforms a term into another, frequently a rewrite-rule. 
    74 Since a \see Problem can occur recusively in a Solution as a sub-problem, this 
    75 is also a particular Tactic.
    76 
    77 \item{\bf User-Guide} supports a student during interactive \see Calculations. 
    78 This support is only possible if a \see Formalisation has been transferred 
    79 (invisibly for a student) from an \see Example.
    80 
    81 %\item{\bf TODO} xxx
    82 \end{description}
    83 
    84 
    85 \section{User Requirements}
    86 %============================================================================
    87 The User Requirements ({\bf UR}s) do not follow the lines of the original ones 
    88 in \cite[Part I]{isac:all}, but limit themselves to a student in the 
    89 specify-phase and use the updated terms from \S\ref{terms} (which are 
    90 indicated by initial capital letters).
    91 
    92 \subsection{General}
    93 %----------------------------------------------------------------------------
    94 {\bf\UR{The screen-reader superimposes the Braille display \label{sreader-braille}}} in the software hierarchy, i.e. the former determines output of the latter.
    95 
    96 {\bf\UR{Special keys can be defined by the user\label{def-spec-keys}}} for the Braille display.
    97 
    98 \subsection{Specify Phase}
    99 %----------------------------------------------------------------------------
   100 {\bf\UR{Examples are selected from 
   101 collections\label{example-coll}}}\footnote{The present test setup bypasses 
   102 this UR.}
   103 implemented on web-pages, which look like a text book. A specific link at an 
   104 Example starts an interactive Calculation for that Example. See 
   105 \url{http://www.ist.tugraz.at/projects/isac/www/kbase/exp/exp_Statics_Biegel_Timischl.html}.
   106 
   107 {\bf\UR{A Calculation is headed by the keyword Problem\label{yyy}}} and in 
   108 case of standard problems from Computer Algebra with a respective command like 
   109 ${\it simplify} (x + 1 + 2)$ or ${\it solve} (x + 1 = 2, \,x)$. An example is 
   110 Expl.\ref{tab:ca}. A Calculation can have sub-Problems with exactly the same 
   111 structure.
   112 
   113 {\bf\UR{A Calculation can be completed with one keystroke\label{yyy}}} and 
   114 sub-Problems as well, when allowed by the User-Guide. See 
   115 Expl.\ref{tab:calc-coll}.
   116 
   117 {\bf\UR{Switching between survey and detail\label{yyy}}} is supported by 
   118 collapsing and expanding a Calculation, see Expl.\ref{tab:calc-exp} \dots 
   119 Expl.\ref{tab:model-sub}
   120 
   121 {\bf\UR{A Calculation can be started from scratch\label{yyy}}}, that means 
   122 without a preceding Example. In this case an empty Specification is generated 
   123 by the system (see Expl.\ref{tab:mod-empty}) and the User-Guide cannot help 
   124 the student completing the Specification.
   125 
   126 {\bf\UR{Input to the Model is guided by Descriptors\label{yyy}}}, see 
   127 Expl.\ref{tab:model}, which are given by the Model-Pattern for the specific 
   128 kind of Problem.
   129 
   130 {\bf\UR{Feedback during input to the Model\label{yyy}}} is given as
   131 \begin{compactitem}
   132 \item ``correct''
   133 \item ``syntax-error'' or type error
   134 \item ``superfluous''
   135 \item ``incomplete'' in case of lists, sets, etc.
   136 \item ``missing''
   137 \item ``true'' or ``false'' for predicates in the field Where.
   138 \end{compactitem}
   139 
   140 {\bf\UR{Feedback during input to References\label{yyy}}} is given in the 
   141 Model:
   142 \begin{compactitem}
   143 \item Update RTheory: might cause ``syntax-error''
   144 \item Update RProblem: might cause ``superfluous'' or ``missing''
   145 \item Update RMethod: in this case the Model shows the guard with 
   146 ``superfluous'' or ``missing'' and the keyword Model is annotated with 
   147 ``(RMethod)''.
   148 \end{compactitem}
   149 
   150 {\bf\UR{The Model can be switched between RProblem and RMethod,\label{yyy}}} 
   151 where the latter is indicated by ``Model (RMethod)''< see Expl.\ref{tab:refs}.
   152 
   153 \subsection{Terms}
   154 %----------------------------------------------------------------------------
   155 {\bf\UR{Terms are presented as strings in Braille format\label{term-str}}} for 
   156 the blind user and as Isabelle strings for other users at the same time --- 
   157 for the purpose of inclusive learning in front of one and the same screen. 
   158 ?TODO is this reasonable?
   159 
   160 {\bf\UR{The Braille-format can be changed\label{braille-format}}} to different 
   161 standards.
   162 
   163 {\bf\UR{Braille-format can be displayed also in the standard frontend\label{braille-format-standard}}}, in particular for authoring purposes.
   164 
   165 {\bf\UR{Semantic information is available for all elements of 
   166 terms.\label{term-semantic}}} Such information is:
   167 \begin{compactenum}
   168 \item the type for constants and variables by a pop-up.
   169 \item the scope of a variable by (TODO ``internal'' and ``global'' seems to 
   170 coarse).
   171 \item the definition of constants and variables by jumping to the respective 
   172 location, probably in another file.
   173 \end{compactenum}
   174 
   175 {\bf\UR{On the Braille lines of pop-ups start with a special character\label{indicate-popup}}}, TODO? ``\#''.
   176 
   177 {\bf\UR{Sub-terms are presented as strings\label{sub-term-str}}} the same way 
   178 as whole terms. ?TODO? show location within the whole term.
   179 
   180 {\bf\UR{A term can be shown as a tree\label{term-tree}}} if requested by a 
   181 special key, TODO SK1. The key followed by an integer argument determines the 
   182 depth of the tree. For instance $<$SK1 2$>$ displays the term 
   183 $\frac{\frac{1}{x+2*y}}{\frac{3}{z}}$ 
   184 \begin{tabbing}
   185 123\=\#3.2 \=$/$ \=$/$ \=    \kill
   186    \>\#    \>$/$     \\
   187    \>\#1   \>\>$/$     \\
   188    \>\#1.1 \>\>\> 1    \\
   189    \>\#1.2 \>\>\> x + 2 * y\\
   190    \>\#2.  \>\>$/$     \\
   191    \>\#2.1 \>\>\> 3    \\
   192    \>\#2.2 \>\>\> z
   193 \end{tabbing}
   194 Note that there are operators with different arity, for instance arity one for $\sin$, arity two for $+$ and arity four for $\int^a_b\;f(x)\;dx{}$.
   195 
   196 {\bf\UR{Structure of the tree representation\label{yyy}}} of a term is (?TODO\dots) indicated by integer lists as shown in the example of UR\ref{term-tree}.
   197 
   198 {\bf\UR{Collapsing and expanding of the tree representation \label{term-coll-exp}}} for a term follow the rules established for file browsers.
   199 
   200 {\bf\UR{Special keys lead to the node at the deepest level\label{yyy}}} and ?TODO?
   201 
   202 {\bf\UR{Navigation through sub-terms is hierarchical\label{navi-sub-terms}}} 
   203 and supported by a special key combined with the arrow keys as follows:
   204 \begin{compactenum}
   205 \item $<$STRG$>$ $<\rightarrow>$ next element right on the same level; 
   206 acoustical indication at the end of the level.
   207 \item $<$STRG$>$ $<\leftarrow>$ next element left on the same level; 
   208 acoustical indication at the end of the level.
   209 \item $<$STRG$>$ $<\uparrow>$ next element on the higher level; acoustical 
   210 indication at the root.
   211 \item $<$STRG$>$ $<\downarrow>$ next element on the lower level; acoustical 
   212 indication at the bottom.
   213 \end{compactenum}
   214 
   215 %{\bf\UR{xxx.\label{yyy}}}
   216 
   217 
   218 \section{Example Calculations}
   219 %============================================================================
   220 Calculations at different stages of interactive steps towards a Solution and 
   221 with variants of collapsing and expanding.\\
   222 
   223 {\bf\Expl{Complete Calculation expanded (sub-Problems 
   224 collapsed).\label{tab:calc-exp}}}
   225 {\tiny \begin{tabbing}
   226 12\=12\=12\=12\=\kill
   227 Example $<$7.70 a$>$              \\
   228 Problem ("Biegelinie", \dots)     \\
   229 .\>Specification:                 \\
   230 .\>.\>Model:                      \\
   231 .\>.\>.\>Given: "Traeger L",      \\
   232 .\>.\>.\>Where: "q\_0 ist\dots    \\
   233 .\>.\>.\>Find: "Biegelinie y"     \\
   234 .\>.\>.\>Relate: "Rand\dots       \\
   235 .\>.\>References:                 \\
   236 .\>.\>.\>RTheory: "Bie\dots"      \\
   237 .\>.\>.\>RProblem: ["\dots]       \\
   238 .\>.\>.\>RMethod: ["Int\dots]     \\
   239 .\>Solution:                      \\
   240 .\>.\>Problem ("\dots")           \\
   241 .\>.\>"[Q x = c + -1 * \dots"     \\
   242 .\>\vdots                         \\
   243 .\>."y x = $-6 * q\_0 * *$\dots"  \\
   244 "y x = $-6 * q\_0 * L ^ 2 /$\dots"\\
   245 \end{tabbing}}
   246 
   247 {\bf\Expl{Complete Calculation collapsed.\label{tab:calc-coll}}}
   248 {\tiny \begin{tabbing}
   249 12\=12\=12\=12\=\kill
   250 Example $<$7.70 a$>$              \\
   251 Problem ("Biegelinie", \dots)     \\
   252 "y x = $-6 * q\_0 * L ^ 2 /$\dots"\\
   253 \end{tabbing}}
   254 
   255 \newpage %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   256 {\bf\Expl{Interactive Specification editing the Model\label{tab:model}}}, the 
   257 inital state with Descriptors, if given by the Example:
   258 {\tiny \begin{tabbing}
   259 12\=12\=12\=12\=\kill
   260 Example $<$7.70 a$>$                        \\
   261 Problem ("Biegelinie", \dots)               \\
   262 .\>Specification:                           \\
   263 .\>.\>Model:                                \\
   264 .\>.\>.\>Given: "Traeger ", "Streckenlast " \\
   265 .\>.\>.\>Where:                             \\
   266 .\>.\>.\>Find: "Biegelinie "                \\
   267 .\>.\>.\>Relate: "Randbedingungen [ ]"      \\
   268 .\>.\>References:                           \\
   269 .\>Solution:
   270 \end{tabbing}}
   271 
   272 {\bf\Expl{Interactive Specification from scratch\label{tab:mod-empty}}}, the 
   273 system presents an empty Specification:
   274 {\tiny \begin{tabbing}
   275 12\=12\=12\=12\=\kill
   276 Problem ("", [])            \\
   277 .\>Specification:           \\
   278 .\>.\>Model:                \\
   279 .\>.\>.\>Given: "", ""      \\
   280 .\>.\>.\>Where: "", ""      \\
   281 .\>.\>.\>Find:  ""          \\
   282 .\>.\>.\>Relate: "", ""     \\
   283 .\>.\>References:           \\
   284 .\>.\>.\>RTheory: ""        \\
   285 .\>.\>.\>RProblem: ["", ""] \\
   286 .\>.\>.\>RMethod: ["", ""]  \\
   287 .\>Solution:
   288 \end{tabbing}}
   289 
   290 {\bf\Expl{Interactive Specification editing References\label{tab:refs}}}, here 
   291 shown for RTheory and for RProblem; such editing is usually done after some 
   292 input to the Model:
   293 {\tiny \begin{tabbing}
   294 12\=12\=12\=12\=\kill
   295 Example $<$7.70 a$>$                        \\
   296 Problem ("Biegelinie", \dots)               \\
   297 .\>Specification:                           \\
   298 .\>.\>Model:                                \\
   299 .\>.\>.\>Given: "Traegerlaenge L", "Streckenlast $q_0$"                 \\
   300 .\>.\>.\>Where: "$q_0$ ist\_integrierbar\_auf $\{| 0, L |\}$", "$0 < L"$\\
   301 .\>.\>.\>Find: "Biegelinie y"               \\
   302 .\>.\>.\>Relate: "Randbedingungen $[ Q_0 = q_0 * L, M_b L = 0, y_0 = 0, d_d x 
   303                     y_0 = 0 ]$"             \\
   304 .\>.\>References:                           \\
   305 .\>.\>.\>RTheory: {\bf"Biegelinie"}         \\
   306 .\>.\>.\>RProblem: ["Biegelinien"]          \\
   307 .\>.\>.\>RMethod: ["Integrieren", "KonstanteBestimmen2"]             \\
   308 .\>Solution:
   309 \end{tabbing}}
   310 
   311 {\bf\Expl{Interactive Specification editing RMethod\label{tab:refs-met}}}. The 
   312 additional Given item "FunktionsVariable $x$" is usually provided behind the 
   313 scenes; but in case of editing RMethod the "Model (RMethod)" is shown and can 
   314 be edited as well.
   315 {\tiny \begin{tabbing}
   316 12\=12\=12\=12\=\kill
   317 Example $<$7.70 a$>$                        \\
   318 Problem ("Biegelinie", \dots)               \\
   319 .\>Specification:                           \\
   320 .\>.\>Model (RMethod):                      \\
   321 .\>.\>.\>Given: "Traegerlaenge L", "Streckenlast $q_0$", "FunktionsVariable 
   322                    $x$" \\
   323 .\>.\>.\>Where: "$q_0$ ist\_integrierbar\_auf $\{| 0, L |\}$", "$0 < L"$\\
   324 .\>.\>.\>Find: "Biegelinie y"               \\
   325 .\>.\>.\>Relate: "Randbedingungen $[ Q_0 = q_0 * L, M_b L = 0, y_0 = 0, d_d x 
   326                     y_0 = 0 ]$"             \\
   327 .\>.\>References:                           \\
   328 .\>.\>.\>RTheory: {\bf"Biegelinie"}         \\
   329 .\>.\>.\>RProblem: ["Biegelinien"]          \\
   330 .\>.\>.\>RMethod: ["Integrieren", "KonstanteBestimmen2"]             \\
   331 .\>Solution:
   332 \end{tabbing}}
   333 
   334 {\bf\Expl{Interactively solving the sub-Problem.\label{tab:model-sub}}}
   335 {\tiny \begin{tabbing}
   336 12\=12\=12\=12\=12\=\kill
   337 Example $<$7.70 a$>$             \\
   338 Problem ("Biegelinie", \dots)    \\
   339 .\>Specification:                \\
   340 .\>Solution:                     \\
   341 .\>.\>Problem ("\dots")          \\
   342 .\>.\>.\>Specification:          \\
   343 .\>.\>.\>.\>Model:               \\
   344 .\>.\>.\>.\>.\>Given: "\dots"    \\
   345 .\>.\>.\>.\>.\>Where: "\dots"    \\
   346 .\>.\>.\>.\>.\>Find: "\dots"     \\
   347 .\>.\>.\>.\>.\>Relate: "\dots    \\
   348 .\>.\>.\>.\>References:          \\
   349 .\>.\>.\>Solution:               \\
   350 \end{tabbing}}
   351 
   352 {\bf\Expl{Calculation like in Computer Algebra.\label{tab:ca}}}
   353 {\tiny \begin{tabbing}
   354 12\=12\=12\=12\=\kill
   355 Example $<$123 d$>$             \\
   356 ${\it solve} (x + 1 = 2, \,x)$  \\
   357 .\>Specification:               \\
   358 .\>Solution:                    \\
   359 .\>.\>"$x + 1 = 2$"             \\
   360 .\>.\>"$x = 2 - 1$"             \\
   361 .\>.\>"$x = 1$"                 \\
   362 "$x = 1$"
   363 \end{tabbing}}
   364 
   365 %\subsection{TODO}
   366 %\subsubsection{TODO}