doc-src/isac/CTP-userinterfaces.tex
branchdecompose-isar
changeset 38077 6f173c4caf79
child 38079 431344850e40
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/doc-src/isac/CTP-userinterfaces.tex	Wed Dec 15 11:00:32 2010 +0100
     1.3 @@ -0,0 +1,163 @@
     1.4 +\documentclass{article}
     1.5 +\usepackage{a4}
     1.6 +\usepackage{times}
     1.7 +\usepackage{latexsym}
     1.8 +\bibliographystyle{alpha}
     1.9 +\usepackage{graphicx}
    1.10 +
    1.11 +\def\isac{${\cal I}\mkern-2mu{\cal S}\mkern-5mu{\cal AC}$}
    1.12 +\def\sisac{{\footnotesize${\cal I}\mkern-2mu{\cal S}\mkern-5mu{\cal AC}$}}
    1.13 +\def\Problem{ {\tt Problem }}
    1.14 +
    1.15 +\title{Upcoming Userinterfaces for Computer Theorem Provers.\\
    1.16 +	The case of Isabelle
    1.17 +}
    1.18 +
    1.19 +\author{G. Schafhauser, A. Schulhofer, M. Steger\\
    1.20 +Knowledge Management Institute (KMI)\\
    1.21 +TU Graz}
    1.22 +
    1.23 +\begin{document}
    1.24 +\maketitle
    1.25 +\abstract{
    1.26 +TODO}
    1.27 +
    1.28 +\section{Introduction}\label{intro} (WN)
    1.29 + 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.}, 
    1.30 +
    1.31 +graphical user interfaces (GUI)
    1.32 +
    1.33 +%Georg
    1.34 +\section{State of the art in CTP Interfaces}
    1.35 +
    1.36 +\subsection{A European technology: Coq and Isabelle}\label{ctp-techn}
    1.37 +     http://en.wikipedia.org/wiki/Coq\\
    1.38 +     http://coq.inria.fr/
    1.39 +
    1.40 +     http://en.wikipedia.org/wiki/Isabelle\_(theorem\_prover)\\
    1.41 +     http://isabelle.in.tum.de/index.html
    1.42 +
    1.43 +why math -- functional: some of the languages have been specifically designed for constructing software for symbolic computation (SC). 
    1.44 +%+ required for \ref{ml-users}
    1.45 +
    1.46 +SC http://en.wikipedia.org/wiki/Symbolic\_computation
    1.47 +% mainly does not compute numerical values, but terms containing variables like functions (symbols)
    1.48 +
    1.49 +The LCF project
    1.50 +http://hopl.murdoch.edu.au/showlanguage.prx?exp=8177
    1.51 +specifically designed a 'meta language' (ML)
    1.52 +http://en.wikipedia.org/wiki/ML\_(programming\_language)
    1.53 +\cite{pl:milner97}
    1.54 +for developing CTP
    1.55 + 
    1.56 +
    1.57 +\subsection{Userinterfaces for CTP: Coq and Isabelle}\label{gui-coq-isa}
    1.58 +     CoqIDE, ..
    1.59 +         http://coq.inria.fr/what-is-coq?q=node/57\\
    1.60 +         earlier than Isabelle/jEdit
    1.61 +
    1.62 +     ProofGeneral for Isabelle
    1.63 +         http://proofgeneral.inf.ed.ac.uk/\\
    1.64 +         emacs stone age ?
    1.65 +
    1.66 +\subsection{Upcoming requirements for userinterfaces in CTP}\label{gui-requir}
    1.67 +     @ interaction close to tty (Telegraph)\\
    1.68 +       BUT: separate parts in {\em one} proof could be processed in parallel
    1.69 +
    1.70 +     @ http://www.informatik.uni-bremen.de/uitp/
    1.71 +
    1.72 +     @ ... see\\
    1.73 +       http://www4.in.tum.de/~wenzelm/papers/async-isabelle-scala.pdf,\\
    1.74 +       http://www4.in.tum.de/~wenzelm/papers/parallel-isabelle.pdf
    1.75 +
    1.76 +%Andreas
    1.77 +\section{Isabelle's plans for new user-interfaces}\label{gui-plans}
    1.78 +       http://www4.in.tum.de/~wenzelm/papers/async-isabelle-scala.pdf,\\
    1.79 +       http://www4.in.tum.de/~wenzelm/papers/parallel-isabelle.pdf
    1.80 +
    1.81 +theorem proving will be integrated into software development
    1.82 +
    1.83 +hundreds of proof obligations are generated during a software verification process 
    1.84 +
    1.85 +so the final goald of Isabelle's planning is integration with other software development tools in an integrated development environment (IDE).
    1.86 +
    1.87 +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.
    1.88 +
    1.89 +\subsection{Connect ML-world to the users' world via JVM}\label{ml-users}
    1.90 +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.
    1.91 +
    1.92 +\paragraph{Example: a functional mathematics engine} as the experimental one in the \sisac-project is given by the following signature:
    1.93 +{\it
    1.94 +\begin{tabbing}
    1.95 +\=xx\=xxxxxxxxxxxxxxxxxxxxxxxxx\=\kill
    1.96 +\>signature INTERPRETER =\\
    1.97 +\>sig\\
    1.98 +\>\>type calcstate\\
    1.99 +\>\>type step = formula * position * tactic\\
   1.100 +\>\> \\
   1.101 +\>\>val do\_next : program $\rightarrow$ calcstate $\rightarrow$ (calcstate * step)\\
   1.102 +\>\>val apply\_tactic : program $\rightarrow$ calcstate $\rightarrow$ position $\rightarrow$ tactic $\rightarrow$ (calcstate * step list)\\
   1.103 +\>\>val apply\_formula : program $\rightarrow$ calcstate $\rightarrow$ position $\rightarrow$ formula $\rightarrow$ (calcstate * step list)\\
   1.104 +%\\
   1.105 +%\>\>val get\_next : program $\rightarrow$ calcstate $\rightarrow$ step\\
   1.106 +%\>\>val get\_applicable\_tactics : program $\rightarrow$ calcstate $\rightarrow$ tactic list\\
   1.107 +%\>\>val get\_intermediate : program $\rightarrow$ calcstate $\rightarrow$ position * position $\rightarrow$ step list\\
   1.108 +\>end
   1.109 +\end{tabbing}}
   1.110 +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.
   1.111 +
   1.112 +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}.
   1.113 +
   1.114 +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.
   1.115 +
   1.116 +\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:
   1.117 +
   1.118 +TODO
   1.119 +
   1.120 +\subsection{Scala as a mediator between ML and JVM}\label{scala-medi}
   1.121 +{\em new} language --- what for, ideas ...
   1.122 +
   1.123 +\subsection{Support for parallel processing}\label{actors}
   1.124 +actors copied from erlang
   1.125 +
   1.126 +% Marco
   1.127 +\section{Planned contributions at TU Graz}
   1.128 +
   1.129 +\subsection{Make Isabelle process structured derivations}\label{struct-der}
   1.130 +Structured Derivations (SD) is a format for calculational reasoning, which has been established by \cite{back-grundy-wright-98}. This is an example calculation:
   1.131 +{\it\begin{tabbing}
   1.132 +123\=123\=123\=123\=123\=123\=123\=123\=123\=123\=123\=123\=\kill
   1.133 +\> $\bullet$\> \Problem [ maximum\_by, calculus ]\\
   1.134 +\>\> $\vdash$\> $A = 2\cdot u\cdot v - u^2$\\
   1.135 +\>\> $\bullet$\> \Problem [make, diffable, funtion]\\
   1.136 +\>\> \dots\> $\overline{A}(\alpha) = 8\cdot r^2\cdot\sin\alpha\cdot\cos\alpha - 4\cdot r^2\cdot(\sin\alpha)^2$\\
   1.137 +\>\> $\bullet$\> \Problem [on\_interval, for\_maximum, differentiate, function]\\
   1.138 +\>\>\> $\vdash$\> $\overline{A}(\alpha) = 8\cdot r^2\cdot\sin\alpha\cdot\cos\alpha - 4\cdot r^2\cdot(\sin\alpha)^2$\\
   1.139 +\>\>\> $\bullet$\> \Problem [differentiate, funtion]\\
   1.140 +\>\>\> \dots\> $\overline{A}^\prime(\alpha) = 8\cdot r^2\cdot(-(\sin\alpha)^2+(\cos\alpha)^2 - 2\cdot\sin\alpha\cdot\cos\alpha)$\\
   1.141 +\>\>\> $\bullet$\> \Problem [on\_interval, goniometric, equation]\\
   1.142 +\>\>\> \dots\> $\alpha = \tan^{-1}(-1+\sqrt{2})$\\
   1.143 +\>\> \dots\> $\alpha = \tan^{-1}(-1+\sqrt{2})$\\
   1.144 +\>\> $\bullet$\> \Problem [tool, find\_values]\\
   1.145 +\>\> \dots\> [ $u=0.23\cdot r, \:v=0.76\cdot r$ ]\\
   1.146 +\> \dots\> [ $u=0.23\cdot r, \:v=0.76\cdot r$ ] %TODO calculate !
   1.147 +\end{tabbing}}
   1.148 +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}.
   1.149 +
   1.150 +This plan involves the following details.
   1.151 +
   1.152 +\subsection{Add a plug-in to jEdit}\label{plugin}
   1.153 +     file structure, copied from example project ...
   1.154 +
   1.155 +\subsection{Details of NetBeans projects}\label{netbeans}
   1.156 +     Scala + Java: html project files
   1.157 +
   1.158 +\subsection{Use interfaces between Java and Scala}\label{java-scala}
   1.159 +     how are data exchanged between Scala and Java ...
   1.160 +
   1.161 +
   1.162 +\section{Conclusion and future work}
   1.163 +
   1.164 +
   1.165 +\bibliography{bib/math-eng,bib/bk,bib/RISC_2,bib/isac,bib/pl,bib/math,bib/pl}
   1.166 +\end{document}
   1.167 \ No newline at end of file