doc MH and RG included
authorwneuper
Wed, 18 May 2005 17:33:56 +0200
changeset 2314fa36dc50b3f4
parent 2313 6be2c13f6199
child 2315 8e8fef0f38b7
doc MH and RG included
doc/bib/isac.bib
doc/expl-for-ref.tex
     1.1 --- a/doc/bib/isac.bib	Thu May 12 18:19:58 2005 +0200
     1.2 +++ b/doc/bib/isac.bib	Wed May 18 17:33:56 2005 +0200
     1.3 @@ -1,3 +1,5 @@
     1.4 +%for isac-docu.tex
     1.5 +
     1.6  @MastersThesis{AK04:thesis,
     1.7    author = 	 {Krempler, Alan},
     1.8    title = 	 {n.n },
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/doc/expl-for-ref.tex	Wed May 18 17:33:56 2005 +0200
     2.3 @@ -0,0 +1,1 @@
     2.4 +\chapter{The example for reference}\label{AK:APP:exref}
     2.5 
     2.6 This example intended to illustrate interaction with \isac{} is quoted from \cite{wn:matheng99}.
     2.7 
     2.8 \sisac{} features a new kind of calculations in applied mathematics, and it is an issue to make the novel functionality of this software as clear as possible. In order to meet this issue, an example is given to be referenced by the use-cases within this document. The example is taken from a calculus course at highschools; thus it should not pose problems to understand the underlying mathematics. Nevertheless the example covers all major features offered by \sisac.
     2.9 
    2.10 \section{Description, formalization and modeling phase}
    2.11 The {\bf description} of an {\bf example}\footnote{These {\bf terms} are defined in the appendix of \cite{isac:appendices} 'List of Terms used in the \sisac-project'} may consist of text, formulas and figures:
    2.12 \begin{center}\begin{minipage}{4.2in}\it 
    2.13 Given a circle with radius $r=7$, inscribe a rectangle with
    2.14 length~u and width~v. Determine u and v such that the rectangles area~A is a maximum.
    2.15 \end{minipage}\end{center}
    2.16 \begin{figure} [htb]
    2.17 \centerline{\includegraphics[width=5.0cm]{fig/coil-kernel-uv}}
    2.18 \caption{Figure for the maximum example}
    2.19 \label{fig.coil-kernel-uv}
    2.20 \end{figure}
    2.21 The inital step in solving such an example is, to construct a {\bf model} from the description. The respective model looks like this, if all items are input:\label{model}
    2.22 \begin{tabbing}
    2.23 1234,\=relate \=: \= \=\kill
    2.24 %\>Problem [maximum, calculus, optimization] \\
    2.25 \>given\>: $[$ Constants $\;$ \framebox{$r=7$} $]$\\
    2.26 \>where    \>: $\,0\leq 7$ \\
    2.27 \>find X \>: $[$ Maximum $\;$\framebox{$A$},\\
    2.28 \>       \>\>AdditionalValues $\;$\framebox{$[u,v]$} $]$\\
    2.29 \>with  \>:{\tiny  $\;A=2uv-u^2 \;\land\; (\frac{u}{2})^2+(\frac{v}{2})^2=r^2 \;\land$} \\
    2.30 \>\>\>{\tiny $\;\forall \;A^\prime\; u^\prime \;v^\prime.\;A^\prime=2u^\prime v^\prime-(u^\prime)^2 \land
    2.31 (\frac{u^\prime}{2})^2+(\frac{v^\prime}{2})^2=r^2 $\\
    2.32 \`$\Longrightarrow A^\prime \leq A$} \\
    2.33 \>relate\>: $[$ \framebox{$A=2uv-u^2,\;(\frac{u}{2})^2+(\frac{v}{2})^2=r^2$} $]$
    2.34 \end{tabbing}
    2.35 The boxes mark the items meant for input by the user, whereas the surrounding information is provided by the system and serves user guidance. If the model is perfect, \sisac{} can solve the example autonomously.
    2.36 
    2.37 In order to provide userguidance already in the model phase, each example is accompanied by a {\bf formalization} prepared by an author and normally hidden from the user:
    2.38 {\it
    2.39 \begin{tabbing}
    2.40 1234,\=$F_{III}$\=$\equiv\;\;(\;$\=\kill
    2.41 \>$F_I$\>$\equiv\;\;(\;$\>$\{r=7\},\;\; \{ A,[u,v]\},\;\;$\\
    2.42 \>\>\>$\{0\leq\frac{u}{2}\leq r,\;\; 
    2.43    \{A=2uv-u^2,\;(\frac{u}{2})^2+(\frac{v}{2})^2=r^2\}\;)$\\
    2.44 \\
    2.45 \>$F_{II}$\>$\equiv\;\;(\;\{r=7\},\;\; \{ A,[u,v]\},\;\;$\\
    2.46 \>\>\>$\{0\leq\frac{v}{2}\leq r,\;\; 
    2.47    \{A=2uv-u^2,\;(\frac{u}{2})^2+(\frac{v}{2})^2=r^2\}\;)$\\
    2.48 \\
    2.49 \>$F_{III}$            
    2.50 \>$\equiv\;\;(\;\{r=7\},\;\; \{ A,[u,v]\},\;\;$\\
    2.51 \>\>\>$\{0\leq\alpha\leq\frac{\pi}{2},\;
    2.52    \{A=2uv-u^2,\frac{u}{2}=r\sin\alpha,\frac{v}{2}=r\cos\alpha\})$
    2.53 \end{tabbing}}
    2.54 In this case the formalization comprises three variants, $F_I, F_{II}, F_{III}$, which presumerably cover all possibilities students would consider in a particular course. All of such formalizations for {\em one} example together are called 'formalization' in the sequel.
    2.55 
    2.56 Given such a formalization and a specification (see below) , \sisac{} can solve an example autonomously {\em and} in stepwise interaction down to the result.
    2.57 \\
    2.58 
    2.59 If \sisac{} is being used to solve an example unknown to the system (i.e. without a hidden specification and formalization prepared by an author) \sisac{} cannot provide user guidance at the beginning of this phase (see \ref{START:from_scratch}). In particular, the items {\it Constants}, {\it Maximum} and {\it AdditionalValues} have to be found in the theory {\it Descript.thy}.
    2.60 
    2.61 
    2.62 
    2.63 \section{Knowledgebase and specification phase}
    2.64 The knowledge base comprises three parts, theories, problems and methods.
    2.65 
    2.66 \paragraph{Theories} contain the knowledge deduced from axioms and definitions by formal proof (done by the interactive theorem prover Isabelle). For the example at hand knowledge is prepared like the following:
    2.67 \begin{verbatim}
    2.68 
    2.69    theory 'calculus'
    2.70 
    2.71    consts
    2.72      d_d         :: "[real, real]=> real"
    2.73                  
    2.74    rules         
    2.75      diff_sum    "d_d bdv (u + v) = d_d bdv u + d_d bdv v"
    2.76      diff_prod   "d_d bdv (u * v) = d_d bdv u * v + u * d_d bdv v"
    2.77      diff_quot   "Not (v = 0)     ==> (d_d bdv (u / v) =
    2.78                         (d_d bdv u * v - u * d_d bdv v) / v ^ 2)"
    2.79      ...
    2.80 \end{verbatim}
    2.81 
    2.82 \paragraph{Problems} capture the aspect of application of knowledge.
    2.83 {\it\begin{tabbing}
    2.84 123\=4512345\=\=4512345\kill
    2.85 \>\> $|$\\
    2.86 \>\> \nod e\=quation \\
    2.87 \>\> $|$\>\nod u\=nivariate\\
    2.88 \>\> $|$\>$|$   \>\nod linear \\
    2.89 \>\> $|$\>$|$   \>\nod p\=olynomial \\
    2.90 \>\> $|$\>$|$   \>\nod rational\\
    2.91 \>\> $|$\>$|$   \>\nod \dots\\
    2.92 \>\> \nod function \\
    2.93 \>\> $|$\>\nod make \\
    2.94 \>\> $|$\>      \>\nod by\_elimination \\
    2.95 \>\> $|$\>      \>\nod by\_new\_variable \\
    2.96 \>\> $|$\>\nod differentiate \\
    2.97 \>\> $|$\>$|$   \>\nod for\_maximum \\
    2.98 \>\> $|$\>$|$   \>$|$  \>\nod on\_interval\\
    2.99 \>\> $|$\>$|$   \>\nod \dots \\
   2.100 \>\> $|$\>\nod integrate \\
   2.101 \>\> $|$\>      \>\nod \dots \\
   2.102 \>\> \nod optimization \\
   2.103 \>\> $|$\>\nod linear \\
   2.104 \>\> $|$\>$|$   \>\nod \dots \\
   2.105 \>\> $|$\>\nod calculus \\
   2.106 \>\> $|$\>      \>\nod maximum \\
   2.107 \>\> $|$\>      \>$|$  \dots \\
   2.108 \end{tabbing}}
   2.109 The example at hand shall be described by the {\it problem [calculus, optimization]} (note the reverse order w.r.t. the hierarchy above, which seems more usual in many cases, e.g. {\it [linear, univariate, equation]}), and will be broken down into the subproblems {\it [make, function]}, {\it [on\_interval, for\_maximum, differentiate, function]} and {\it [tool, find\_values]}. The root-problem of the example looks like
   2.110 {\it 
   2.111 \begin{tabbing}
   2.112 1234,\=relate \=: $\equiv$\= ${\it let}\:$ \=$\exists m\_$\kill
   2.113 \>Solve\_problem [maximum, calculus, optimization] \\
   2.114 \>given\>: $[$ Constants fix\_ $]$\\
   2.115 \>where    \>: ${\it map}\;(\$\,0\leq\,\$)\; {\it fix\_}$ \\
   2.116 \>find  \>: $[$ Maximum m\_\\
   2.117 \>       \>\>AdditionalValues vs\_ $]$\\
   2.118 \>with  \>: ${\it let}\:x_1 = \{{\it m\_}\}\cup\{{\it vs\_}\}\cup({\it Vars}\:{\it rs\_});$\\
   2.119 \>\>\>\>$x_2 = {\it map}\:{\it primed}\:x_1;$\\
   2.120 \>\>\>$\:{\it in}\;\,{\it map}\:({\it op}\land)\:{\it rs\_}\:\$\: \land\:\$$ \\
   2.121 \>\>\>\>$\forall\,\$\,x_2\,\$.\,(\,\lambda\,\$\,x_1\,\$\,.\,\$\,{\it map}\,({\it op}\land)\,{\it rs\_}\,\$\,)\,\$\,x_2\,\$\, $ \\
   2.122 \>relate\>: rs\_
   2.123 \end{tabbing}}
   2.124 This problem is {\bf matched} with the formalization and yields the model shown above.
   2.125 
   2.126 \paragraph{Methods} describe the algorithms solving the problems. The method solving the example calls the subproblems mentioned:
   2.127 {\it\begin{tabbing}
   2.128 123\=123\=123\=123\=123\=123\=\kill
   2.129 \>  {\tt Script} Maximum\_value (fix\_::bool list) (m\_::real) (rs\_::bool list)     \\
   2.130 \>\>\>\>\>         (v\_::real) (itv\_::real set) (err\_::bool) =                       \\
   2.131 \>\>     ({\tt let}\\
   2.132 \>\>\>        e\_ = (hd o (filter (Testvar m\_))) rs\_;                        \\
   2.133 \>\>\>        t\_ = ({\tt if} \#1 $<$ Length rs\_                                        \\
   2.134 \>\>\>\>                {\tt then} (Subproblem (Reals,[make, funtion],no\_met) [m\_, v\_, rs\_]) \\
   2.135 \>\>\>\>                {\tt else} (hd rs\_));                                         \\
   2.136 \>\>\>        mx\_ = Subproblem (Reals,[on\_interval, for\_maximum, differentiate, \\
   2.137 \>\>\>\>\>                 function], maximum\_on\_interval) [ t\_, v\_, itv\_ ]   \\
   2.138 \>\>      {\tt in} (Subproblem (Reals,[tool,find\_values],find\_values)               \\
   2.139 \>\>\>\>\>              [ mx\_, (Rhs t\_), v\_, m\_, (dropWhile (ident e\_), rs\_])))\\
   2.140 \end{tabbing}}
   2.141 
   2.142 An example is given a {\bf specification} ('it is specified') by three pointers into each of the three parts of the knowledge base, i.e. a pointer to a theory, to a problem and to a method. For the example this is {\it (Differentiate, [calculus, optimization], Maximum\_value)}. 
   2.143 
   2.144 \section{Interaction on the worksheet and the browsers}
   2.145 Within a calculation the centre of interaction with the user is a so-called {\bf worksheet}. At certain points the user may want to view the knowledge base in a so-called {\bf browser-window} and/or select some knowledge, or the dialog presents such a window.
   2.146 
   2.147 \paragraph{In the modeling phase} the user inputs formulas on the worksheet, and on the worksheet they get most of the feedback. After a while the worksheet could look like this:
   2.148 {\it
   2.149 \begin{tabbing}
   2.150 123\=123\=123\=relate...\=123\=\kill
   2.151 \>Solve\_problem [maximum, calculus, optimization] \\
   2.152 \>\>Model\\
   2.153 \>\>\>given: \>$[$ Constants $r=7\;]$\\
   2.154 \>\>\>where: \>$\,0\leq r$\\
   2.155 \>\>\>find:  \>$[$ Maximum, AdditionalValues $[u,v]\;]$\\
   2.156 \>\>\>relate:\>$[A=2uv,\;(\frac{u}{2})^2+(\frac{v}{2})^2=r^2,\;\frac{u}{2}=r\sin{\alpha}\;]$
   2.157 \end{tabbing}}
   2.158 where {\it Solve\_problem [maximum, calculus, optimization]}, {\it Constants}, {\it Maximum}, {\it AdditionalValues}, and $0\leq r$ have been supplied by the system, and several items are marked: {\it Maximum} with 'missing', $A=2uv$ with 'incorrect', and $\frac{u}{2}=r\sin{\alpha}$ with 'superfluous'. Regarding this kind of feedback\label{model-feedback} users may successfully complete modeling; if they are not capable to do it, they just hit a 'go-on' button and \sisac{} gets the correct model from the hidden formalization and specification. For the following let us assume, that the model is completed correctly:
   2.159 {\it
   2.160 \begin{tabbing}
   2.161 123\=123\=123\=relate...\=123\=\kill
   2.162 \>Solve\_problem [maximum, calculus, optimization] \\
   2.163 \>\>Model\\
   2.164 \>\>\>given: \>$[$ Constants $r=7]$\\
   2.165 \>\>\>where: \>$\,0\leq r$\\
   2.166 \>\>\>find:  \>$[$ Maximum , AdditionalValues $[u,v]\;]$\\
   2.167 \>\>\>relate:\>$[A=2uv-u^2,\;(\frac{u}{2})^2+(\frac{v}{2})^2=r^2,\frac{u}{2}=r\sin{\alpha}]$\\
   2.168 \>\>Specification\\
   2.169 \>\>\>Theory: \>\>%Reals
   2.170 \\
   2.171 \>\>\>Problem:\>\>%[maximum, calculus, optimization]
   2.172 \\
   2.173 \>\>\>Method: \>\>%[make\_fun, by\_elimination]
   2.174 \end{tabbing}}
   2.175 The superfluous item $\frac{u}{2}=r\sin{\alpha}$ does not matter, below there are the {\bf specification-fields} to be determined (i.e. input by the user) within the specification phase.
   2.176 
   2.177 \paragraph{The specification phase} requires data from the knowledge base in general. In the case of the examples model above the decision is required, which kind of problem the given model can be matched with: {\it[linear, optimization]}, or {\it[calculus, optimization]}, or some other problem. The information necessary for this decision can be found in the hierarchy of problems.
   2.178 
   2.179 Learners can {\bf browse} the hierarchy of problems (theories, methods) and they can {\bf apply} the problem (theory, method); the latter transfers the problem (theory, method) to the respective field below the model on the worksheet.
   2.180 
   2.181 For instance, applying the problem {\it[linear, optimization]} would cause this display on the worksheet:
   2.182 {\it
   2.183 \begin{tabbing}
   2.184 123\=123\=123\=relate...\=123\=\kill
   2.185 \>Solve\_problem [maximum, calculus, optimization] \\
   2.186 \>\>Model\\
   2.187 \>\>\>given: \>$[$\underline{Constants $r=7$}$]$\\
   2.188 \>\>\>where: \>$\,0\leq r$\\
   2.189 \>\>\>find:  \>$[$Maximum , \underline{AdditionalValues $[u,v]$}$]$\\
   2.190 \>\>\>relate:\>$[\underline{A=2uv-u^2,\;(\frac{u}{2})^2+(\frac{v}{2})^2=r^2,\frac{u}{2}=r\sin{\alpha}}]$\\
   2.191 \>\>Specification\\
   2.192 \>\>\>Theory:\\
   2.193 \>\>\>Problem:\>\> [linear, optimization]\\
   2.194 \>\>\>Method:
   2.195 \end{tabbing}}
   2.196 \noindent where some items in the model would be marked with some\underline{ error-feedback}. For instance, applying a theory even might cause the feedback 'syntax-error' when the model contains function constants not defined in the theory or in one of the theories parents.
   2.197 
   2.198 Browsing problems (when started from a model on the worksheet) matches the problem selected with the model on the worksheet, i.e. on the browser-window the same feedbacks are given as for the model on the worksheet described on p.\pageref{model-feedback}.
   2.199 
   2.200 \section{The solving phase and subproblems}
   2.201 Before we describe \sisac s features for the solving phase, we fix one correct model and one specification (out of several possible ones) as follows:
   2.202 {\it
   2.203 \begin{tabbing}
   2.204 123\=123\=123\=relate...\=123\=\kill
   2.205 \>Solve\_problem [maximum, calculus, optimization] \\
   2.206 \>\>Model\\
   2.207 \>\>\>given: \>$[$Constants $r=7]$\\
   2.208 \>\>\>where: \>$\,0\leq r$\\
   2.209 \>\>\>find:  \>$[$Maximum $A$, AdditionalValues $[u,v]]$\\
   2.210 \>\>\>relate:\>$[A=2uv-u^2,\;(\frac{u}{2})^2+(\frac{v}{2})^2=r^2,\frac{u}{2}=r\sin{\alpha}]$\\
   2.211 \>\>Specification\\
   2.212 \>\>\>Theory: \>\>Reals\\
   2.213 \>\>\>Problem:\>\>[maximum, calculus, optimization]\\
   2.214 \>\>\>Method: \>\>[make\_fun, by\_elimination]
   2.215 \end{tabbing}}
   2.216 
   2.217 
   2.218 The following worksheet shows the whole calculation without the respective models and specifications; this short-presentation could stem from an interaction, where the user is merely interested in the result and let the system calculate autonomously:
   2.219 {\it\small 
   2.220 \begin{tabbing}
   2.221 1234\=123\=123\=123\=123\=123\=123\=123\=123\=\kill
   2.222 \>Solve\_problem [maximum, calculus, optimization] \\
   2.223 \>\>1.\>SubProblem (DiffAppl, [make, function]) \\
   2.224 \>\>\>1.\>${\it solve\_univariate}\;\left(\left(\frac{u}{2}\right)^2+\left(\frac{v}{2}\right)^2=r^2\right)\;u$\\
   2.225 \>\>\>1'.\>$L = \left[u=2\sqrt{r^2-\left(\frac{v}{2}\right)^2},\;u=-2\sqrt{r^2-\left(\frac{v}{2}\right)^2}\right]$\\
   2.226 \>\>\>2.\>$L_1= \left[u=2\sqrt{r^2-\left(\frac{v}{2}\right)^2}\right]$\\
   2.227 \>\>1'.\>$A_1= 2\cdot 2\sqrt{r^2-\left(\frac{v}{2}\right)^2}\cdot v - v^2$\\
   2.228 \>\>2.\>SubProblem (DiffAppl, [on\_interval, for\_maximum, differentiate, function])\\
   2.229 \>\>\>1.\>$\frac{d}{dv}\left( 2\cdot 2\sqrt{r^2-\left(\frac{v}{2}\right)^2}\cdot v - v^2 \right)=$\\
   2.230 \>\>\>1'.\>$A_1^\prime = 2\sqrt{r^2-\left(\frac{v}{2}\right)^2} - \frac{v^2}{2\sqrt{r^2-\left(\frac{v}{2}\right)^2}} - 2v$\\
   2.231 \>\>\>2.\>${\it solve\_univariate}\;\left(2\sqrt{r^2-\left(\frac{v}{2}\right)^2} - \frac{v^2}{2\sqrt{r^2-\left(\frac{v}{2}\right)^2}} - 2v =0\right)\;v$\\
   2.232 \>\>\>2'.\>$L = [v=234.567]$\\
   2.233 \>\>3.\>SubProblem (DiffAppl, [find\_values, tool])\\
   2.234 \>\>3'.\>$[u=123.456, v=234.567]$\\
   2.235 \>$[u=123.456, v=234.567]$
   2.236 \end{tabbing}}
   2.237 
   2.238 \ No newline at end of file