doc-src/isac/jrocnik/eJMT-paper/jrocnik_eJMT.tex
changeset 48766 7132779e2ff4
parent 42516 461f6d9d5390
child 48767 582caed78c5f
equal deleted inserted replaced
48765:b18ff622ad05 48766:7132779e2ff4
   207 specific services. An important part of such services is called
   207 specific services. An important part of such services is called
   208 ``next-step-guidance'', generated by a specific kind of ``TP-based
   208 ``next-step-guidance'', generated by a specific kind of ``TP-based
   209 programming language''. In the
   209 programming language''. In the
   210 {\sisac}-project~\footnote{http://www.ist.tugraz.at/projects/isac/} such
   210 {\sisac}-project~\footnote{http://www.ist.tugraz.at/projects/isac/} such
   211 a language is prototyped in line with~\cite{plmms10} and built upon
   211 a language is prototyped in line with~\cite{plmms10} and built upon
   212 the theorem prover.
   212 the theorem prover Isabelle~\cite{Nipkow-Paulson-Wenzel:2002}
   213 Isabelle~\cite{Nipkow-Paulson-Wenzel:2002}\footnote{http://isabelle.in.tum.de/}.
   213 \footnote{http://isabelle.in.tum.de/}.
   214 The TP services are coordinated by a specific interpreter for the
   214 The TP services are coordinated by a specific interpreter for the
   215 programming language, called
   215 programming language, called
   216 Lucas-Interpreter~\cite{wn:lucas-interp-12}. The language and the
   216 Lucas-Interpreter~\cite{wn:lucas-interp-12}. The language and the
   217 interpreter will be briefly re-introduced in order to make the paper
   217 interpreter will be briefly re-introduced in order to make the paper
   218 self-contained.
   218 self-contained.
   222 in a case study by the author. The author was considered an ideal
   222 in a case study by the author. The author was considered an ideal
   223 candidate for this study for the following reasons: as a student in
   223 candidate for this study for the following reasons: as a student in
   224 Telematics (computer science with focus on Signal Processing) he had
   224 Telematics (computer science with focus on Signal Processing) he had
   225 general knowledge in programming as well as specific domain knowledge
   225 general knowledge in programming as well as specific domain knowledge
   226 in Signal Processing; and he was {\em not} involved in the development of
   226 in Signal Processing; and he was {\em not} involved in the development of
   227 {\sisac}'s programming language and interpreter, thus a novice to the
   227 {\sisac}'s programming language and interpreter, thus being a novice to the
   228 language.
   228 language.
   229 
   229 
   230 The goal of the case study was (1) some TP-based programs for
   230 The goals of the case study were: (1) to identify some TP-based programs for
   231 interactive course material for a specific ``Advanced Signal
   231 interactive course material for a specific ``Advanced Signal
   232 Processing Lab'' in a higher semester, (2) respective program
   232 Processing Lab'' in a higher semester, (2) respective program
   233 development with as little advice from the {\sisac}-team and (3) records
   233 development with as little advice as possible from the {\sisac}-team and (3) 
   234 and comments for the main steps of development in an Isabelle theory;
   234 to document records and comments for the main steps of development in an
   235 this theory should provide guidelines for future programmers. An
   235 Isabelle theory; this theory should provide guidelines for future programmers.
   236 excerpt from this theory is the main part of this paper.
   236 An excerpt from this theory is the main part of this paper.
   237 \par
   237 \par
   238 The paper will use the problem in Fig.\ref{fig-interactive} as a
   238 The paper will use the problem in Fig.\ref{fig-interactive} as a
   239 running example:
   239 running example:
   240 \begin{figure} [htb]
   240 \begin{figure} [htb]
   241 \begin{center}
   241 \begin{center}
   275 dialogue authors (in Java-based tools), using TP services provided by
   275 dialogue authors (in Java-based tools), using TP services provided by
   276 Lucas-Interpretation. The latter acts on programs developed by
   276 Lucas-Interpretation. The latter acts on programs developed by
   277 mathematics-authors (in Isabelle/ML); their task is concern of this
   277 mathematics-authors (in Isabelle/ML); their task is concern of this
   278 paper.
   278 paper.
   279 
   279 
   280 \paragraph{The paper is structured} as follows: The introduction
   280 The paper is structured as follows: The introduction
   281 \S\ref{intro} is followed by a brief re-introduction of the TP-based
   281 \S\ref{intro} is followed by a brief re-introduction of the TP-based
   282 programming language in \S\ref{PL}, which extends the executable
   282 programming language in \S\ref{PL}, which extends the executable
   283 fragment of Isabelle's language (\S\ref{PL-isab}) by tactics which
   283 fragment of Isabelle's language (\S\ref{PL-isab}) by tactics which
   284 play a specific role in Lucas-Interpretation and in providing the TP
   284 play a specific role in Lucas-Interpretation and in providing the TP
   285 services (\S\ref{PL-tacs}). The main part \S\ref{trial} describes
   285 services (\S\ref{PL-tacs}). The main part \S\ref{trial} describes
   299 Isabelle~\cite{Nipkow-Paulson-Wenzel:2002}\footnote{http://isabelle.in.tum.de/}.
   299 Isabelle~\cite{Nipkow-Paulson-Wenzel:2002}\footnote{http://isabelle.in.tum.de/}.
   300 
   300 
   301 \subsection{The Executable Fragment of Isabelle's Language}\label{PL-isab}
   301 \subsection{The Executable Fragment of Isabelle's Language}\label{PL-isab}
   302 The executable fragment consists of data-type and function
   302 The executable fragment consists of data-type and function
   303 definitions.  It's usability even suggests that fragment for
   303 definitions.  It's usability even suggests that fragment for
   304 introductory courses \cite{nipkow-prog-prove}. HOL is a typed logic
   304 introductory courses \cite{nipkow-prog-prove}. HOL (Higher-Order Logic)
   305 whose type system resembles that of functional programming
   305 is a typed logic whose type system resembles that of functional programming
   306 languages. Thus there are
   306 languages. Thus there are
   307 \begin{description}
   307 \begin{description}
   308 \item[base types,] in particular \textit{bool}, the type of truth
   308 \item[base types,] in particular \textit{bool}, the type of truth
   309 values, \textit{nat}, \textit{int}, \textit{complex}, and the types of
   309 values, \textit{nat}, \textit{int}, \textit{complex}, and the types of
   310 natural, integer and complex numbers respectively in mathematics.
   310 natural, integer and complex numbers respectively in mathematics.
   367 \;{\it if} \; \exists x.\;P \; {\it then} \; e_1 \; {\it else} \; e_2
   367 \;{\it if} \; \exists x.\;P \; {\it then} \; e_1 \; {\it else} \; e_2
   368 \;)$.
   368 \;)$.
   369 
   369 
   370 \subsection{\isac's Tactics for Lucas-Interpretation}\label{PL-tacs}
   370 \subsection{\isac's Tactics for Lucas-Interpretation}\label{PL-tacs}
   371 The prototype extends Isabelle's language by specific statements
   371 The prototype extends Isabelle's language by specific statements
   372 called tactics~\footnote{{\sisac}'s tactics are different from
   372 called tactics~\footnote{{\sisac}'s. This tactics are different from
   373 Isabelle's tactics: the former concern steps in a calculation, the
   373 Isabelle's tactics: the former concern steps in a calculation, the
   374 latter concern proofs.}  and tactics. For the programmer these
   374 latter concern proofs.}  and tactics. For the programmer these
   375 statements are functions with the following signatures:
   375 statements are functions with the following signatures:
   376 
   376 
   377 \begin{description}
   377 \begin{description}
   844 07         else NONE
   844 07         else NONE
   845 08     | eval_argument_in _ _ _ _ = NONE;
   845 08     | eval_argument_in _ _ _ _ = NONE;
   846 09   *}
   846 09   *}
   847 \end{verbatim}}
   847 \end{verbatim}}
   848 
   848 
   849 \noindent The function body creates either creates \texttt{NONE}
   849 \noindent The function body creates either \texttt{NONE}
   850 telling the rewrite-engine to search for the next redex, or creates an
   850 telling the rewrite-engine to search for the next redex, or creates an
   851 ad-hoc theorem for rewriting, thus the programmer needs to adopt many
   851 ad-hoc theorem for rewriting, thus the programmer needs to adopt many
   852 technicalities of Isabelle, for instance, the \textit{Trueprop}
   852 technicalities of Isabelle, for instance, the \textit{Trueprop}
   853 constant.
   853 constant.
   854 
   854 
  1271 interpreter, where control is handed over to the user in interactive
  1271 interpreter, where control is handed over to the user in interactive
  1272 tutoring.}. Line {\rm 11} contains tactical \textit{@@}.
  1272 tutoring.}. Line {\rm 11} contains tactical \textit{@@}.
  1273 
  1273 
  1274 \medskip The above program also indicates the dominant role of interactive
  1274 \medskip The above program also indicates the dominant role of interactive
  1275 selection of knowledge in the three-dimensional universe of
  1275 selection of knowledge in the three-dimensional universe of
  1276 mathematics as depicted in Fig.\ref{fig:mathuni} on
  1276 mathematics. The \texttt{SubProblem} in the above lines
  1277 p.\pageref{fig:mathuni}, The \texttt{SubProblem} in the above lines
       
  1278 {\rm 07..09} is more than a function call with the actual arguments
  1277 {\rm 07..09} is more than a function call with the actual arguments
  1279 \textit{[ (rhs X\_eq)::real, z::real ]}. The programmer has to determine
  1278 \textit{[ (rhs X\_eq)::real, z::real ]}. The programmer has to determine
  1280 three items:
  1279 three items:
  1281 
  1280 
  1282 \begin{enumerate}
  1281 \begin{enumerate}