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