doc-src/isac/CTP-userinterfaces.tex
author Walther Neuper <neuper@ist.tugraz.at>
Mon, 27 Dec 2010 10:38:49 +0100
branchdecompose-isar
changeset 38079 431344850e40
parent 38077 6f173c4caf79
child 38088 5d792dd2f947
child 38089 042b19985ea0
permissions -rw-r--r--
added CTP-userinterfaces.bib
neuper@38077
     1
\documentclass{article}
neuper@38077
     2
\usepackage{a4}
neuper@38077
     3
\usepackage{times}
neuper@38077
     4
\usepackage{latexsym}
neuper@38077
     5
\bibliographystyle{alpha}
neuper@38077
     6
\usepackage{graphicx}
neuper@38077
     7
neuper@38077
     8
\def\isac{${\cal I}\mkern-2mu{\cal S}\mkern-5mu{\cal AC}$}
neuper@38077
     9
\def\sisac{{\footnotesize${\cal I}\mkern-2mu{\cal S}\mkern-5mu{\cal AC}$}}
neuper@38077
    10
\def\Problem{ {\tt Problem }}
neuper@38077
    11
neuper@38077
    12
\title{Upcoming Userinterfaces for Computer Theorem Provers.\\
neuper@38077
    13
	The case of Isabelle
neuper@38077
    14
}
neuper@38077
    15
neuper@38077
    16
\author{G. Schafhauser, A. Schulhofer, M. Steger\\
neuper@38077
    17
Knowledge Management Institute (KMI)\\
neuper@38077
    18
TU Graz}
neuper@38077
    19
neuper@38077
    20
\begin{document}
neuper@38077
    21
\maketitle
neuper@38077
    22
\abstract{
neuper@38077
    23
TODO}
neuper@38077
    24
neuper@38077
    25
\section{Introduction}\label{intro} (WN)
neuper@38077
    26
 Computer theorem proving (CTP)\footnote{The term CTP is used to address two different things in this paper: (1) the academic discipline comprising respective theories as well as (2) the products developed within this discipline, the provers and the respective technology.}, 
neuper@38077
    27
neuper@38077
    28
graphical user interfaces (GUI)
neuper@38077
    29
neuper@38077
    30
%Georg
neuper@38077
    31
\section{State of the art in CTP Interfaces}
neuper@38077
    32
neuper@38077
    33
\subsection{A European technology: Coq and Isabelle}\label{ctp-techn}
neuper@38077
    34
     http://en.wikipedia.org/wiki/Coq\\
neuper@38077
    35
     http://coq.inria.fr/
neuper@38077
    36
neuper@38077
    37
     http://en.wikipedia.org/wiki/Isabelle\_(theorem\_prover)\\
neuper@38077
    38
     http://isabelle.in.tum.de/index.html
neuper@38077
    39
neuper@38077
    40
why math -- functional: some of the languages have been specifically designed for constructing software for symbolic computation (SC). 
neuper@38077
    41
%+ required for \ref{ml-users}
neuper@38077
    42
neuper@38077
    43
SC http://en.wikipedia.org/wiki/Symbolic\_computation
neuper@38077
    44
% mainly does not compute numerical values, but terms containing variables like functions (symbols)
neuper@38077
    45
neuper@38077
    46
The LCF project
neuper@38077
    47
http://hopl.murdoch.edu.au/showlanguage.prx?exp=8177
neuper@38077
    48
specifically designed a 'meta language' (ML)
neuper@38077
    49
http://en.wikipedia.org/wiki/ML\_(programming\_language)
neuper@38077
    50
\cite{pl:milner97}
neuper@38077
    51
for developing CTP
neuper@38077
    52
 
neuper@38077
    53
neuper@38077
    54
\subsection{Userinterfaces for CTP: Coq and Isabelle}\label{gui-coq-isa}
neuper@38077
    55
     CoqIDE, ..
neuper@38077
    56
         http://coq.inria.fr/what-is-coq?q=node/57\\
neuper@38077
    57
         earlier than Isabelle/jEdit
neuper@38077
    58
neuper@38077
    59
     ProofGeneral for Isabelle
neuper@38077
    60
         http://proofgeneral.inf.ed.ac.uk/\\
neuper@38077
    61
         emacs stone age ?
neuper@38077
    62
neuper@38077
    63
\subsection{Upcoming requirements for userinterfaces in CTP}\label{gui-requir}
neuper@38077
    64
     @ interaction close to tty (Telegraph)\\
neuper@38077
    65
       BUT: separate parts in {\em one} proof could be processed in parallel
neuper@38077
    66
neuper@38077
    67
     @ http://www.informatik.uni-bremen.de/uitp/
neuper@38077
    68
neuper@38077
    69
     @ ... see\\
neuper@38077
    70
       http://www4.in.tum.de/~wenzelm/papers/async-isabelle-scala.pdf,\\
neuper@38077
    71
       http://www4.in.tum.de/~wenzelm/papers/parallel-isabelle.pdf
neuper@38077
    72
neuper@38077
    73
%Andreas
neuper@38077
    74
\section{Isabelle's plans for new user-interfaces}\label{gui-plans}
neuper@38077
    75
       http://www4.in.tum.de/~wenzelm/papers/async-isabelle-scala.pdf,\\
neuper@38077
    76
       http://www4.in.tum.de/~wenzelm/papers/parallel-isabelle.pdf
neuper@38077
    77
neuper@38077
    78
theorem proving will be integrated into software development
neuper@38077
    79
neuper@38077
    80
hundreds of proof obligations are generated during a software verification process 
neuper@38077
    81
neuper@38077
    82
so the final goald of Isabelle's planning is integration with other software development tools in an integrated development environment (IDE).
neuper@38077
    83
neuper@38077
    84
still many principal issues need to be clarified with respect to integration of CTP and other development tools. So engaging into details makes no sense at the present, and Isabelle will approach the final goal via experimental intermediate steps of integration.
neuper@38077
    85
neuper@38077
    86
\subsection{Connect ML-world to the users' world via JVM}\label{ml-users}
neuper@38077
    87
In Sect.\ref{ctp-techn} reasons have been given, why mathematics software at the state-of-the-art cannot be written in Java or the like. On the other side, Sect.\ref{gui-requir} stated requirements for mathematical user interfaces, which cannot be accomplished by ML-like languages. These requirements can be best accomplished by languages like Java, which have powerful libraries available for convenient assembly of GUIs.
neuper@38077
    88
neuper@38077
    89
\paragraph{Example: a functional mathematics engine} as the experimental one in the \sisac-project is given by the following signature:
neuper@38077
    90
{\it
neuper@38077
    91
\begin{tabbing}
neuper@38077
    92
\=xx\=xxxxxxxxxxxxxxxxxxxxxxxxx\=\kill
neuper@38077
    93
\>signature INTERPRETER =\\
neuper@38077
    94
\>sig\\
neuper@38077
    95
\>\>type calcstate\\
neuper@38077
    96
\>\>type step = formula * position * tactic\\
neuper@38077
    97
\>\> \\
neuper@38077
    98
\>\>val do\_next : program $\rightarrow$ calcstate $\rightarrow$ (calcstate * step)\\
neuper@38077
    99
\>\>val apply\_tactic : program $\rightarrow$ calcstate $\rightarrow$ position $\rightarrow$ tactic $\rightarrow$ (calcstate * step list)\\
neuper@38077
   100
\>\>val apply\_formula : program $\rightarrow$ calcstate $\rightarrow$ position $\rightarrow$ formula $\rightarrow$ (calcstate * step list)\\
neuper@38077
   101
%\\
neuper@38077
   102
%\>\>val get\_next : program $\rightarrow$ calcstate $\rightarrow$ step\\
neuper@38077
   103
%\>\>val get\_applicable\_tactics : program $\rightarrow$ calcstate $\rightarrow$ tactic list\\
neuper@38077
   104
%\>\>val get\_intermediate : program $\rightarrow$ calcstate $\rightarrow$ position * position $\rightarrow$ step list\\
neuper@38077
   105
\>end
neuper@38077
   106
\end{tabbing}}
neuper@38077
   107
The three essential functions are \textit{do\_next}, which reads a \textit{program} for determining the next \textit{step} in a calculation, the function \textit{apply\_tactic}, which applies a \textit{tactic} input by the user to the current \textit{position} in a calculation and thus may produce a list of \textit{step}s and the function \textit{apply\_formula}, which applies an input \textit{formula} accordingly.
neuper@38077
   108
neuper@38077
   109
Now, the point with functional programming is, that the functions do {\em not} cause persistent updates in some memory, rather: all three functions above take the current state of the calculation, \textit{calcstate}, as an argument and after they have done they work return the updated \textit{calcstate}.
neuper@38077
   110
neuper@38077
   111
There are several advantages of this kind of programming: more straight forward verification, which is not discussed here, and other features. For instance, given the three functions above, it is easy to undo steps of calculations, or go back to an earlier step of calculations: one just needs to store the \textit{calcstate}s (in a list), even without knowing the details of the \textit{calcstate}, which thus can be encapsulated for internal access only.
neuper@38077
   112
neuper@38077
   113
\paragraph{Example: an object-oriented wrapper} as required for embedding the above mathematics engine into an object-oriented system. Such a wrapper looks like this:
neuper@38077
   114
neuper@38077
   115
TODO
neuper@38077
   116
neuper@38077
   117
\subsection{Scala as a mediator between ML and JVM}\label{scala-medi}
neuper@38077
   118
{\em new} language --- what for, ideas ...
neuper@38077
   119
neuper@38077
   120
\subsection{Support for parallel processing}\label{actors}
neuper@38077
   121
actors copied from erlang
neuper@38077
   122
neuper@38077
   123
% Marco
neuper@38077
   124
\section{Planned contributions at TU Graz}
neuper@38077
   125
neuper@38077
   126
\subsection{Make Isabelle process structured derivations}\label{struct-der}
neuper@38077
   127
Structured Derivations (SD) is a format for calculational reasoning, which has been established by \cite{back-grundy-wright-98}. This is an example calculation:
neuper@38077
   128
{\it\begin{tabbing}
neuper@38077
   129
123\=123\=123\=123\=123\=123\=123\=123\=123\=123\=123\=123\=\kill
neuper@38077
   130
\> $\bullet$\> \Problem [ maximum\_by, calculus ]\\
neuper@38077
   131
\>\> $\vdash$\> $A = 2\cdot u\cdot v - u^2$\\
neuper@38077
   132
\>\> $\bullet$\> \Problem [make, diffable, funtion]\\
neuper@38077
   133
\>\> \dots\> $\overline{A}(\alpha) = 8\cdot r^2\cdot\sin\alpha\cdot\cos\alpha - 4\cdot r^2\cdot(\sin\alpha)^2$\\
neuper@38077
   134
\>\> $\bullet$\> \Problem [on\_interval, for\_maximum, differentiate, function]\\
neuper@38077
   135
\>\>\> $\vdash$\> $\overline{A}(\alpha) = 8\cdot r^2\cdot\sin\alpha\cdot\cos\alpha - 4\cdot r^2\cdot(\sin\alpha)^2$\\
neuper@38077
   136
\>\>\> $\bullet$\> \Problem [differentiate, funtion]\\
neuper@38077
   137
\>\>\> \dots\> $\overline{A}^\prime(\alpha) = 8\cdot r^2\cdot(-(\sin\alpha)^2+(\cos\alpha)^2 - 2\cdot\sin\alpha\cdot\cos\alpha)$\\
neuper@38077
   138
\>\>\> $\bullet$\> \Problem [on\_interval, goniometric, equation]\\
neuper@38077
   139
\>\>\> \dots\> $\alpha = \tan^{-1}(-1+\sqrt{2})$\\
neuper@38077
   140
\>\> \dots\> $\alpha = \tan^{-1}(-1+\sqrt{2})$\\
neuper@38077
   141
\>\> $\bullet$\> \Problem [tool, find\_values]\\
neuper@38077
   142
\>\> \dots\> [ $u=0.23\cdot r, \:v=0.76\cdot r$ ]\\
neuper@38077
   143
\> \dots\> [ $u=0.23\cdot r, \:v=0.76\cdot r$ ] %TODO calculate !
neuper@38077
   144
\end{tabbing}}
neuper@38077
   145
The plan is to use the machinery provided Isabelle/Isar as a 'logical operating system' ~\cite{isar-impl} and adapt the machinery such that is accepts SC in parallel to the Isar proof language~\cite{wenzel:isar}.
neuper@38077
   146
neuper@38077
   147
This plan involves the following details.
neuper@38077
   148
neuper@38077
   149
\subsection{Add a plug-in to jEdit}\label{plugin}
neuper@38077
   150
     file structure, copied from example project ...
neuper@38077
   151
neuper@38077
   152
\subsection{Details of NetBeans projects}\label{netbeans}
neuper@38077
   153
     Scala + Java: html project files
neuper@38077
   154
neuper@38077
   155
\subsection{Use interfaces between Java and Scala}\label{java-scala}
neuper@38077
   156
     how are data exchanged between Scala and Java ...
neuper@38077
   157
neuper@38077
   158
neuper@38077
   159
\section{Conclusion and future work}
neuper@38077
   160
neuper@38077
   161
neuper@38079
   162
\bibliography{CTP-userinterfaces}
neuper@38079
   163
%\bibliography{bib/math-eng,bib/bk,bib/RISC_2,bib/isac,bib/pl,bib/math,bib/pl}
neuper@38077
   164
\end{document}