e0726734@42027
|
1 |
% $Header: /cvsroot/latex-beamer/latex-beamer/solutions/conference-talks/conference-ornate-20min.en.tex,v 1.7 2007/01/28 20:48:23 tantau Exp $
|
e0726734@42027
|
2 |
|
e0726734@42027
|
3 |
\documentclass{beamer}
|
e0726734@42027
|
4 |
|
e0726734@42027
|
5 |
% This file is a solution template for:
|
e0726734@42027
|
6 |
|
e0726734@42027
|
7 |
% - Talk at a conference/colloquium.
|
e0726734@42027
|
8 |
% - Talk length is about 20min.
|
e0726734@42027
|
9 |
% - Style is ornate.
|
e0726734@42027
|
10 |
|
e0726734@42027
|
11 |
|
e0726734@42027
|
12 |
|
e0726734@42027
|
13 |
% Copyright 2004 by Till Tantau <tantau@users.sourceforge.net>.
|
e0726734@42027
|
14 |
%
|
e0726734@42027
|
15 |
% In principle, this file can be redistributed and/or modified under
|
e0726734@42027
|
16 |
% the terms of the GNU Public License, version 2.
|
e0726734@42027
|
17 |
%
|
e0726734@42027
|
18 |
% However, this file is supposed to be a template to be modified
|
e0726734@42027
|
19 |
% for your own needs. For this reason, if you use this file as a
|
e0726734@42027
|
20 |
% template and not specifically distribute it as part of a another
|
e0726734@42027
|
21 |
% package/program, I grant the extra permission to freely copy and
|
e0726734@42027
|
22 |
% modify this file as you see fit and even to delete this copyright
|
e0726734@42027
|
23 |
% notice.
|
e0726734@42027
|
24 |
|
e0726734@42027
|
25 |
|
e0726734@42027
|
26 |
\mode<presentation>
|
e0726734@42027
|
27 |
{
|
e0726734@42027
|
28 |
\usetheme{Hannover}
|
e0726734@42027
|
29 |
% or ...
|
e0726734@42027
|
30 |
|
e0726734@42027
|
31 |
\setbeamercovered{transparent}
|
e0726734@42027
|
32 |
% or whatever (possibly just delete it)
|
e0726734@42027
|
33 |
}
|
e0726734@42027
|
34 |
|
neuper@42029
|
35 |
%\usepackage{setspace} %for "\begin{onehalfspace}"
|
e0726734@42027
|
36 |
\usepackage[english]{babel}
|
e0726734@42027
|
37 |
% or whatever
|
e0726734@42027
|
38 |
|
e0726734@42027
|
39 |
\usepackage[utf8]{inputenc}
|
e0726734@42027
|
40 |
% or whatever
|
e0726734@42027
|
41 |
|
e0726734@42027
|
42 |
\usepackage{times}
|
e0726734@42027
|
43 |
\usepackage[T1]{fontenc}
|
e0726734@42027
|
44 |
% Or whatever. Note that the encoding and the font should match. If T1
|
e0726734@42027
|
45 |
% does not look nice, try deleting the line with the fontenc.
|
e0726734@42027
|
46 |
|
e0726734@42027
|
47 |
\def\isac{${\cal I}\mkern-2mu{\cal S}\mkern-5mu{\cal AC}$}
|
e0726734@42027
|
48 |
\def\sisac{{\footnotesize${\cal I}\mkern-2mu{\cal S}\mkern-5mu{\cal AC}$}}
|
e0726734@42027
|
49 |
|
e0726734@42027
|
50 |
\title[\isac: Computation \& Deduction] % (optional, use only with long paper titles)
|
e0726734@42027
|
51 |
{Integrating Computation and Deduction\\
|
e0726734@42027
|
52 |
in the \isac-System}
|
e0726734@42027
|
53 |
|
e0726734@42027
|
54 |
\subtitle{Projektpraktikum: Introducing Isabelle's Contexts}
|
e0726734@42027
|
55 |
|
e0726734@42030
|
56 |
\author[Lehnfeld] % (optional, use only with lots of authors)
|
e0726734@42030
|
57 |
{Mathias~Lehnfeld}
|
e0726734@42027
|
58 |
% - Give the names in the same order as the appear in the paper.
|
e0726734@42027
|
59 |
% - Use the \inst{?} command only if the authors have different
|
e0726734@42027
|
60 |
% affiliation.
|
e0726734@42027
|
61 |
|
e0726734@42027
|
62 |
\institute % (optional, but mostly needed)
|
e0726734@42027
|
63 |
{
|
e0726734@42030
|
64 |
Vienna University of Technology\\
|
e0726734@42030
|
65 |
Institute of Computer Languages
|
e0726734@42027
|
66 |
}
|
e0726734@42027
|
67 |
% - Use the \inst command only if there are several affiliations.
|
e0726734@42027
|
68 |
% - Keep it simple, no one is interested in your street address.
|
e0726734@42027
|
69 |
|
e0726734@42027
|
70 |
% \date[CFP 2003] % (optional, should be abbreviation of conference name)
|
e0726734@42027
|
71 |
% {Conference on Fabulous Presentations, 2003}
|
e0726734@42027
|
72 |
% - Either use conference name or its abbreviation.
|
e0726734@42027
|
73 |
% - Not really informative to the audience, more for people (including
|
e0726734@42027
|
74 |
% yourself) who are reading the slides online
|
e0726734@42027
|
75 |
|
e0726734@42027
|
76 |
% \subject{Theoretical Computer Science}
|
e0726734@42027
|
77 |
% This is only inserted into the PDF information catalog. Can be left
|
e0726734@42027
|
78 |
% out.
|
e0726734@42027
|
79 |
|
e0726734@42027
|
80 |
|
e0726734@42027
|
81 |
|
e0726734@42027
|
82 |
% If you have a file called "university-logo-filename.xxx", where xxx
|
e0726734@42027
|
83 |
% is a graphic format that can be processed by latex or pdflatex,
|
e0726734@42027
|
84 |
% resp., then you can add a logo as follows:
|
e0726734@42027
|
85 |
|
e0726734@42027
|
86 |
% \pgfdeclareimage[height=0.5cm]{university-logo}{university-logo-filename}
|
e0726734@42027
|
87 |
% \logo{\pgfuseimage{university-logo}}
|
e0726734@42027
|
88 |
|
e0726734@42027
|
89 |
|
e0726734@42027
|
90 |
|
e0726734@42027
|
91 |
% Delete this, if you do not want the table of contents to pop up at
|
e0726734@42027
|
92 |
% the beginning of each subsection:
|
e0726734@42027
|
93 |
\AtBeginSubsection[]
|
e0726734@42027
|
94 |
{
|
e0726734@42027
|
95 |
\begin{frame}<beamer>{Outline}
|
e0726734@42027
|
96 |
\tableofcontents[currentsection,currentsubsection]
|
e0726734@42027
|
97 |
\end{frame}
|
e0726734@42027
|
98 |
}
|
e0726734@42027
|
99 |
|
e0726734@42027
|
100 |
|
e0726734@42027
|
101 |
% If you wish to uncover everything in a step-wise fashion, uncomment
|
e0726734@42027
|
102 |
% the following command:
|
e0726734@42027
|
103 |
|
e0726734@42027
|
104 |
%\beamerdefaultoverlayspecification{<+->}
|
e0726734@42027
|
105 |
|
e0726734@42027
|
106 |
|
e0726734@42027
|
107 |
\begin{document}
|
e0726734@42027
|
108 |
|
e0726734@42027
|
109 |
\begin{frame}
|
e0726734@42027
|
110 |
\titlepage
|
e0726734@42027
|
111 |
\end{frame}
|
e0726734@42027
|
112 |
|
e0726734@42027
|
113 |
\begin{frame}{Outline}
|
e0726734@42027
|
114 |
\tableofcontents
|
e0726734@42027
|
115 |
% You might wish to add the option [pausesections]
|
e0726734@42027
|
116 |
\end{frame}
|
e0726734@42027
|
117 |
|
e0726734@42027
|
118 |
|
e0726734@42027
|
119 |
% Structuring a talk is a difficult task and the following structure
|
e0726734@42027
|
120 |
% may not be suitable. Here are some rules that apply for this
|
e0726734@42027
|
121 |
% solution:
|
e0726734@42027
|
122 |
|
e0726734@42027
|
123 |
% - Exactly two or three sections (other than the summary).
|
e0726734@42027
|
124 |
% - At *most* three subsections per section.
|
e0726734@42027
|
125 |
% - Talk about 30s to 2min per frame. So there should be between about
|
e0726734@42027
|
126 |
% 15 and 30 frames, all told.
|
e0726734@42027
|
127 |
|
e0726734@42027
|
128 |
% - A conference audience is likely to know very little of what you
|
e0726734@42027
|
129 |
% are going to talk about. So *simplify*!
|
e0726734@42027
|
130 |
% - In a 20min talk, getting the main ideas across is hard
|
e0726734@42027
|
131 |
% enough. Leave out details, even if it means being less precise than
|
e0726734@42027
|
132 |
% you think necessary.
|
e0726734@42027
|
133 |
% - If you omit details that are vital to the proof/implementation,
|
e0726734@42027
|
134 |
% just say so once. Everybody will be happy with that.
|
e0726734@42027
|
135 |
|
neuper@42033
|
136 |
\section[Introduction]{Introduction: Isabelle and \isac}
|
neuper@42033
|
137 |
%\subsection[Isabelle \& \isac]{Isabelle and \isac}
|
neuper@42028
|
138 |
\begin{frame}
|
neuper@42028
|
139 |
\frametitle{Isabelle and \isac}
|
neuper@42033
|
140 |
The task of this ``Projektpraktikum'' (6 ECTS) was to
|
neuper@42033
|
141 |
\begin{itemize}
|
neuper@42033
|
142 |
\item study the concept of ``context'' in the theorem prover \textbf{Isabelle} from TU Munich
|
neuper@42033
|
143 |
\item study basic concepts of the math assistant \sisac{} from TU Graz
|
neuper@42033
|
144 |
\pause
|
neuper@42033
|
145 |
\item redesign \sisac{} with respect to contexts
|
neuper@42033
|
146 |
\begin{itemize}
|
neuper@42033
|
147 |
\item use contexts for type inference of user input
|
neuper@42033
|
148 |
\item handle preconditions of specifications
|
neuper@42033
|
149 |
\item clarify the transfer of context data from sub-programs to the calling program
|
neuper@42033
|
150 |
\end{itemize}
|
neuper@42033
|
151 |
\pause
|
neuper@42033
|
152 |
\item introduce contexts to \sisac{} according to the new design
|
neuper@42033
|
153 |
\item use the coding standards of Isabelle2011 for new code.
|
neuper@42033
|
154 |
\end{itemize}
|
e0726734@42027
|
155 |
\end{frame}
|
e0726734@42027
|
156 |
|
neuper@42033
|
157 |
%\subsection[Computation \& Deduction]{Computation and Deduction in a Lucas-Interpreter}
|
neuper@42028
|
158 |
\begin{frame}
|
e0726734@42030
|
159 |
\frametitle{Computation and Deduction in a Lucas-Interpreter}
|
e0726734@42030
|
160 |
\includegraphics[width=100mm]{overview.pdf}
|
e0726734@42027
|
161 |
\end{frame}
|
e0726734@42027
|
162 |
|
neuper@42033
|
163 |
\section[Contributions]{Contributions of the project to \isac}
|
neuper@42033
|
164 |
\subsection[Contexts]{Isabelle's Contexts, advantages and use}
|
neuper@42028
|
165 |
\begin{frame}
|
neuper@42033
|
166 |
\frametitle{Advantages of Isabelle's Contexts}
|
neuper@42033
|
167 |
Isabelle's context replaced theories because \dots:
|
neuper@42033
|
168 |
\begin{itemize}
|
neuper@42033
|
169 |
\item theories are static containers of \textit{all} logical data
|
neuper@42033
|
170 |
\item contexts are \textit{dynamic} containers of logical data:
|
neuper@42033
|
171 |
\begin{itemize}
|
neuper@42033
|
172 |
\item functions for storing and retrieving various logical data
|
neuper@42033
|
173 |
\item functions for type inference
|
neuper@42033
|
174 |
\item provide data for Isabelle's automated provers
|
neuper@42033
|
175 |
\end{itemize}
|
neuper@42033
|
176 |
%\item e.g. theories have no direct functions for type inference
|
Walther@60658
|
177 |
%\item replace function \texttt{parse}
|
neuper@42033
|
178 |
%\item assumptions \& environment $\rightarrow$ context
|
neuper@42033
|
179 |
\item allow to conform with scopes for subprograms.
|
neuper@42033
|
180 |
\end{itemize}
|
e0726734@42027
|
181 |
\end{frame}
|
e0726734@42027
|
182 |
|
neuper@42028
|
183 |
\begin{frame}
|
neuper@42033
|
184 |
\frametitle{Isabelle's context mechanism}
|
neuper@42033
|
185 |
\texttt{\small{
|
e0726734@42030
|
186 |
\begin{tabbing}
|
neuper@42033
|
187 |
xx\=xx\=in\=\kill
|
neuper@42033
|
188 |
%xx\=xx\=xx\=xx\=\kill
|
neuper@42033
|
189 |
%datatype Isac\_Ctxt =\\
|
neuper@42033
|
190 |
%\>\>Env of term * term\\
|
neuper@42033
|
191 |
%\>| Asm of term;\\
|
neuper@42033
|
192 |
%\\
|
neuper@42033
|
193 |
structure ContextData = \alert{Proof\_Data}\\
|
neuper@42033
|
194 |
\>~(\alert{type T} = term list\\
|
neuper@42033
|
195 |
\>\>\alert{fun init \_} = []);\\
|
neuper@42033
|
196 |
\\
|
neuper@42033
|
197 |
%local\\
|
neuper@42033
|
198 |
%\>fun insert\_ctxt data = ContextData\alert{.map} (fn xs => distinct (data@xs));\\
|
neuper@42033
|
199 |
%in\\
|
neuper@42033
|
200 |
%\>fun insert\_assumptions asms = map (fn t => Asm t) asms |> insert\_ctxt;\\
|
neuper@42033
|
201 |
%\>fun insert\_environments envs = map (fn t => Env t) envs |> insert\_ctxt;\\
|
neuper@42033
|
202 |
%end\\
|
neuper@42033
|
203 |
fun insert\_assumptions asms = \\
|
e0726734@42037
|
204 |
\>\>\>ContextData\alert{.map} (fn xs => distinct (asms@xs));\\
|
neuper@42033
|
205 |
\\
|
neuper@42033
|
206 |
%local\\
|
neuper@42033
|
207 |
%\>fun unpack\_asms (Asm t::ts) = t::(unpack\_asms ts)\\
|
neuper@42033
|
208 |
%\>\>| unpack\_asms (Env \_::ts) = unpack\_asms ts\\
|
neuper@42033
|
209 |
%\>\>| unpack\_asms [] = [];\\
|
neuper@42033
|
210 |
%\>fun unpack\_envs (Env t::ts) = t::(unpack\_envs ts)\\
|
neuper@42033
|
211 |
%\>\>| unpack\_envs (Asm \_::ts) = unpack\_envs ts\\
|
neuper@42033
|
212 |
%\>\>| unpack\_envs [] = [];\\
|
neuper@42033
|
213 |
%in\\
|
neuper@42033
|
214 |
%\>fun get\_assumptions ctxt = ContextData.get ctxt |> unpack\_asms;\\
|
neuper@42033
|
215 |
%\>fun get\_environments ctxt = ContextData.get ctxt |> unpack\_envs;\\
|
neuper@42033
|
216 |
%end
|
neuper@42033
|
217 |
fun get\_assumptions ctxt = ContextData\alert{.get} ctxt;\\
|
neuper@42033
|
218 |
\\
|
neuper@42033
|
219 |
\\
|
neuper@42033
|
220 |
val declare\_constraints : \\
|
neuper@42033
|
221 |
\>\>\>term -> Proof.context -> Proof.context
|
e0726734@42031
|
222 |
\end{tabbing}
|
e0726734@42031
|
223 |
}}
|
e0726734@42031
|
224 |
\end{frame}
|
e0726734@42031
|
225 |
|
e0726734@42031
|
226 |
\begin{frame}
|
neuper@42033
|
227 |
\frametitle{Usage of Contexts}
|
neuper@42033
|
228 |
\texttt{\footnotesize{
|
e0726734@42031
|
229 |
\begin{tabbing}
|
neuper@42033
|
230 |
xx\=xx\=xx\=xx\=xx\=\kill
|
neuper@42033
|
231 |
fun transfer\_asms\_from\_to from\_ctxt to\_ctxt =\\
|
neuper@42033
|
232 |
\> let\\
|
neuper@42033
|
233 |
\>\> val to\_vars = get\_assumptions to\_ctxt |> map vars |> flat\\
|
neuper@42033
|
234 |
\>\> fun transfer [] to\_ctxt = to\_ctxt\\
|
neuper@42033
|
235 |
\>\>\> | transfer (from\_asm::fas) to\_ctxt =\\
|
neuper@42033
|
236 |
\>\>\>\>\> if inter op = (vars from\_asm) to\_vars = []\\
|
neuper@42033
|
237 |
\>\>\>\>\> then transfer fas to\_ctxt\\
|
neuper@42033
|
238 |
\>\>\>\>\> else transfer fas (insert\_assumptions [from\_asm] to\_ctxt)\\
|
neuper@42033
|
239 |
\> in transfer (get\_assumptions from\_ctxt) to\_ctxt end\\
|
e0726734@42031
|
240 |
\\
|
neuper@42033
|
241 |
fun parse thy str =\\
|
neuper@42033
|
242 |
\>(let val t = (\alert{typ\_a2real} o numbers\_to\_string)\\
|
neuper@42033
|
243 |
\>\>\>\>(\alert{Syntax.read\_term\_global thy} str)\\
|
neuper@42033
|
244 |
\>\>in SOME (cterm\_of thy t) end)\\
|
neuper@42033
|
245 |
\>\>\>handle \_ => NONE;\\
|
e0726734@42031
|
246 |
\\
|
Walther@60658
|
247 |
fun parse ctxt str = \\
|
Walther@60658
|
248 |
\>\>\>(\alert{Syntax.read\_term ctxt} str |> numbers\_to\_string)\\
|
neuper@42033
|
249 |
\>\>\>handle \_ => NONE;
|
e0726734@42030
|
250 |
\end{tabbing}
|
e0726734@42030
|
251 |
}}
|
neuper@42033
|
252 |
|
neuper@42033
|
253 |
|
e0726734@42027
|
254 |
\end{frame}
|
e0726734@42027
|
255 |
|
neuper@42033
|
256 |
\subsection[Redesign]{Redesign of \isac{} using contexts}
|
neuper@42028
|
257 |
\begin{frame}
|
neuper@42033
|
258 |
\frametitle{Redesign of \isac{} using contexts}
|
neuper@42033
|
259 |
\begin{center} DEMO \end{center}
|
e0726734@42030
|
260 |
\end{frame}
|
e0726734@42030
|
261 |
|
e0726734@42031
|
262 |
\begin{frame}
|
neuper@42033
|
263 |
\frametitle{Deduction simplifies computation}
|
neuper@42033
|
264 |
\small{
|
neuper@42033
|
265 |
%\begin{onehalfspace}
|
neuper@42033
|
266 |
\begin{tabbing}
|
neuper@42033
|
267 |
xxx\=xxx\=\kill
|
neuper@42033
|
268 |
\`$\mathit{(some)}\;\mathit{assumptions}$\\
|
neuper@42033
|
269 |
$\mathit{solve}\;(\frac{x}{x ^ 2 - 6 * x + 9} - \frac{1}{x ^ 2 - 3 * x} = \frac{1}{x}, x)$\\
|
neuper@42033
|
270 |
% \`$x ^ 2 - 6 * x + 9\not=0\land x ^ 2 - 3 * x\not=0$\\
|
neuper@42033
|
271 |
%\>$\frac{x}{x ^ 2 - 6 * x + 9} - \frac{1}{x ^ 2 - 3 * x} = \frac{1}{x}$ \\ \\
|
neuper@42033
|
272 |
%\>$\frac{x}{x ^ 2 + -1 * (6 * x) + 9} + \frac{-1 * 1}{x ^ 2 + -1 * (3 * x)} = \frac{1}{x}$ \\ \\
|
neuper@42033
|
273 |
\>$\frac{3 + -1 * x + x ^ 2}{9 * x + -6 * x ^ 2 + x ^ 3} = \frac{1}{x}$ \\
|
neuper@42033
|
274 |
\`$x\not=3\land x\not=0$\\
|
neuper@42033
|
275 |
\>$(3 + -1 * x + x ^ 2) * x = 1 * (9 * x + -6 * x ^ 2 + x ^ 3)$ \\
|
neuper@42033
|
276 |
\>$\mathit{solve}\;((3 + -1 * x + x ^ 2) * x = 1 * (9 * x + -6 * x ^ 2 + x ^ 3), x)$ \\
|
neuper@42033
|
277 |
%\>\>$(3 + -1 * x + x ^ 2) * x = 1 * (9 * x + -6 * x ^ 2 + x ^ 3)$ \\
|
neuper@42033
|
278 |
%\>\>$(3 + -1 * x + x ^ 2) * x - 1 * (9 * x + -6 * x ^ 2 + x ^ 3) = 0$ \\
|
neuper@42033
|
279 |
\>\>$(3 + -1 * x + x ^ 2) * x - (9 * x + -6 * x ^ 2 + x ^ 3) = 0$ \\
|
neuper@42033
|
280 |
\>\>$-6 * x + 5 * x ^ 2 = 0$ \\
|
neuper@42033
|
281 |
\>\>$\mathit{solve}\;(-6 * x + 5 * x ^ 2 = 0, x)$ \\
|
neuper@42033
|
282 |
\>\>$[x = 0, x = \frac{6}{5}]$ \\
|
neuper@42033
|
283 |
\`$x = 0\land x = \frac{6}{5}$\\
|
neuper@42033
|
284 |
\>$[\alert{x = 0}, x = \frac{6}{5}]$ \\
|
neuper@42033
|
285 |
\`\alert{$\mathit{Check\_Elementwise}\;\mathit{Assumptions}:x\not=0\land x = 0$}\\
|
neuper@42033
|
286 |
\>$[x = \frac{6}{5}]$ \\
|
neuper@42033
|
287 |
$[x = \frac{6}{5}]$
|
neuper@42033
|
288 |
\end{tabbing}
|
neuper@42033
|
289 |
}
|
neuper@42033
|
290 |
%\end{onehalfspace}
|
e0726734@42031
|
291 |
\end{frame}
|
e0726734@42031
|
292 |
|
neuper@42033
|
293 |
\begin{frame}
|
neuper@42033
|
294 |
\frametitle{More ``deduction'', \\less ``computation''}
|
neuper@42033
|
295 |
\footnotesize{\tt
|
neuper@42033
|
296 |
\begin{tabbing}
|
neuper@42033
|
297 |
xx\=xx\=xx\=xx\=xx\=xx\=\kill
|
neuper@42033
|
298 |
Script Solve\_root\_equation (e\_e::bool) (v\_v::real) = \\
|
neuper@42033
|
299 |
\> (let e\_e = ((Try (Rewrite\_Set norm\_equation False)) \@\@ \\
|
neuper@42033
|
300 |
\>\>\> (Try (Rewrite\_Set Test\_simplify False))) e\_e; \\
|
neuper@42033
|
301 |
\>\> (L\_L::bool list) = \\
|
neuper@42033
|
302 |
\>\>\> (SubProblem (Test', \\
|
neuper@42033
|
303 |
\>\>\>\> [linear,univariate,equation,test]\\
|
neuper@42033
|
304 |
\>\>\>\> [Test,solve\_linear]) \\
|
neuper@42033
|
305 |
\>\>\>\> [BOOL e\_e, REAL v\_v]) \\
|
neuper@42033
|
306 |
\> in \alert{Check\_elementwise L\_L \{(v\_v::real). Assumptions\}})\\
|
neuper@42033
|
307 |
\end{tabbing}
|
neuper@42033
|
308 |
}
|
neuper@42033
|
309 |
\small{
|
neuper@42033
|
310 |
``Deductive'' part of Lucas-Interpretation relives the ``computational'' part: \alert{one statement becomes obsolete~!}
|
neuper@42033
|
311 |
}
|
neuper@42033
|
312 |
\end{frame}
|
neuper@42033
|
313 |
|
neuper@42033
|
314 |
|
neuper@42033
|
315 |
\begin{frame}
|
neuper@42033
|
316 |
\frametitle{Redesign of \isac{} using contexts}
|
neuper@42033
|
317 |
Advantages of the redesign:
|
neuper@42033
|
318 |
\begin{itemize}
|
neuper@42033
|
319 |
\item type inference by \textit{local} contexts\\
|
neuper@42033
|
320 |
\pause
|
neuper@42033
|
321 |
\alert{now user-input without type constraints~!}
|
neuper@42033
|
322 |
\pause
|
neuper@42033
|
323 |
\item consistent handling of logical data
|
neuper@42033
|
324 |
\begin{itemize}
|
neuper@42033
|
325 |
\item preconditions and partiality conditions in contexts
|
neuper@42033
|
326 |
\item transfer of context data into subprograms clarified
|
neuper@42033
|
327 |
\item transfer of context data from subprograms clarified
|
neuper@42033
|
328 |
\end{itemize}
|
neuper@42033
|
329 |
\pause
|
neuper@42033
|
330 |
\alert{now some statements become obsolete.}\\
|
neuper@42033
|
331 |
\end{itemize}
|
neuper@42033
|
332 |
\pause
|
neuper@42033
|
333 |
Now Lucas-interpretation shifts efforts from ``computation'' further to ``deduction''.
|
neuper@42033
|
334 |
\end{frame}
|
neuper@42033
|
335 |
|
neuper@42033
|
336 |
|
neuper@42033
|
337 |
|
e0726734@42030
|
338 |
\subsection[Code Improvement]{Improvement of functional code}
|
e0726734@42030
|
339 |
\begin{frame}
|
e0726734@42030
|
340 |
\frametitle{Improvement of functional code}
|
e0726734@42030
|
341 |
\begin{itemize}
|
neuper@42033
|
342 |
\item \textbf{code conventions}: Isabelle2011 published coding standards first time
|
neuper@42033
|
343 |
\item \textbf{combinators}: Isabelle2011 introduced a library containing the following combinators:
|
neuper@42033
|
344 |
\\\vspace{0.2cm}
|
neuper@42033
|
345 |
\tiny{\tt%
|
neuper@42033
|
346 |
val |$>$ : 'a * ('a -$>$ 'b) -$>$ 'b\\
|
neuper@42033
|
347 |
val |-$>$ : ('c * 'a) * ('c -$>$ 'a -$>$ 'b) -$>$ 'b\\
|
neuper@42033
|
348 |
val |$>>$ : ('a * 'c) * ('a -$>$ 'b) -$>$ 'b * 'c\\
|
neuper@42033
|
349 |
val ||$>$ : ('c * 'a) * ('a -$>$ 'b) -$>$ 'c * 'b\\
|
neuper@42033
|
350 |
val ||$>>$ : ('c * 'a) * ('a -$>$ 'd * 'b) -$>$ ('c * 'd) * 'b\\
|
neuper@42033
|
351 |
val \#$>$ : ('a -$>$ 'b) * ('b -$>$ 'c) -$>$ 'a -$>$ 'c\\
|
neuper@42033
|
352 |
val \#-$>$ : ('a -$>$ 'c * 'b) * ('c -$>$ 'b -$>$ 'd) -$>$ 'a -$>$ 'd\\
|
neuper@42033
|
353 |
val \#$>>$ : ('a -$>$ 'c * 'b) * ('c -$>$ 'd) -$>$ 'a -$>$ 'd * 'b\\
|
neuper@42033
|
354 |
val \#\#$>$ : ('a -$>$ 'c * 'b) * ('b -$>$ 'd) -$>$ 'a -$>$ 'c * 'd\\
|
neuper@42033
|
355 |
val \#\#$>>$ : ('a -$>$ 'c * 'b) * ('b -$>$ 'e * 'd) -$>$ 'a -$>$ ('c * 'e) * 'd\\
|
neuper@42033
|
356 |
}
|
e0726734@42030
|
357 |
\end{itemize}
|
e0726734@42030
|
358 |
\end{frame}
|
e0726734@42030
|
359 |
|
e0726734@42030
|
360 |
\begin{frame}
|
neuper@42033
|
361 |
\frametitle{Example with combinators}
|
neuper@42033
|
362 |
\texttt{\footnotesize{
|
e0726734@42030
|
363 |
\begin{tabbing}
|
neuper@42033
|
364 |
xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=\kill
|
e0726734@42030
|
365 |
fun prep\_ori [] \_ \_ = ([], e\_ctxt)\\
|
e0726734@42030
|
366 |
\>| prep\_ori fmz thy pbt =\\
|
e0726734@42030
|
367 |
\>\>\>let\\
|
neuper@42033
|
368 |
\>\>\>\>val ctxt = ProofContext.init\_global thy \\
|
neuper@42033
|
369 |
\>\>\>\>\> |> fold declare\_constraints fmz\\
|
neuper@42033
|
370 |
\>\>\>\>val ori = \\
|
Walther@60658
|
371 |
\>\>\>\>\> map (add\_field thy pbt o split\_dts o (parse ctxt)) fmz\\
|
neuper@42033
|
372 |
\>\>\>\>\>\> |> add\_variants\\
|
e0726734@42030
|
373 |
\>\>\>\>val maxv = map fst ori |> max\\
|
e0726734@42030
|
374 |
\>\>\>\>val maxv = if maxv = 0 then 1 else maxv\\
|
e0726734@42030
|
375 |
\>\>\>\>val oris = coll\_variants ori\\
|
neuper@42033
|
376 |
\>\>\>\>\> |> map (replace\_0 maxv |> apfst)\\
|
neuper@42033
|
377 |
\>\>\>\>\> |> add\_id\\
|
neuper@42033
|
378 |
\>\>\>\>\> |> map flattup\\
|
e0726734@42030
|
379 |
\>\>\>in (oris, ctxt) end;
|
e0726734@42030
|
380 |
\end{tabbing}
|
e0726734@42030
|
381 |
}}
|
neuper@42033
|
382 |
\dots which probably can be further polished.
|
e0726734@42030
|
383 |
\end{frame}
|
e0726734@42030
|
384 |
|
neuper@42033
|
385 |
%\subsection[Future Development]{Preparation of Future Development}
|
neuper@42033
|
386 |
%\begin{frame}
|
neuper@42033
|
387 |
% \frametitle{Preparation of Future Development}
|
neuper@42033
|
388 |
%
|
neuper@42033
|
389 |
%% "Script Solve_root_equation (e_e::bool) (v_v::real) = " ^
|
neuper@42033
|
390 |
%% " (let e_e = ((Try (Rewrite_Set norm_equation False)) @@ " ^
|
neuper@42033
|
391 |
%% " (Try (Rewrite_Set Test_simplify False))) e_e; " ^
|
neuper@42033
|
392 |
%% " (L_L::bool list) = " ^
|
neuper@42033
|
393 |
%% " (SubProblem (Test', " ^
|
neuper@42033
|
394 |
%% " [linear,univariate,equation,test]," ^
|
neuper@42033
|
395 |
%% " [Test,solve_linear]) " ^
|
neuper@42033
|
396 |
%% " [BOOL e_e, REAL v_v]) " ^
|
neuper@42033
|
397 |
%% " in Check_elementwise L_L {(v_v::real). Assumptions}) "
|
neuper@42033
|
398 |
%\end{frame}
|
neuper@42033
|
399 |
%
|
neuper@42033
|
400 |
%\begin{frame}
|
neuper@42033
|
401 |
% \frametitle{Preparation of Future Development}
|
neuper@42033
|
402 |
% \begin{itemize}
|
neuper@42033
|
403 |
% \item logical data for Isabelle provers in contexts
|
neuper@42033
|
404 |
% \item \isac{} programming language more compact\\
|
neuper@42033
|
405 |
% $\rightarrow$ context built automatically
|
neuper@42033
|
406 |
% \end{itemize}
|
neuper@42033
|
407 |
%\end{frame}
|
neuper@42029
|
408 |
|
e0726734@42031
|
409 |
|
neuper@42028
|
410 |
\section[Problems]{Problems encountered in the project}
|
neuper@42028
|
411 |
\begin{frame}
|
e0726734@42030
|
412 |
\frametitle{Problems encountered in the project}
|
e0726734@42030
|
413 |
\begin{itemize}
|
neuper@42033
|
414 |
\item new Isabelle release in February 2011: update \sisac{} first
|
neuper@42033
|
415 |
\pause
|
neuper@42033
|
416 |
\item lines of code (LOC) in Isabelle and \sisac{}\\ \vspace{0.2cm}
|
neuper@42033
|
417 |
\textit{
|
neuper@42033
|
418 |
\begin{tabular}{lrl}
|
neuper@42033
|
419 |
src/ & 1700 & $\,$k LOC\\
|
neuper@42033
|
420 |
src/Pure/ & 70 & k LOC\\
|
neuper@42033
|
421 |
src/Provers/ & 8 & k LOC\\
|
neuper@42033
|
422 |
src/Tools/ & 800 & k LOC\\
|
neuper@42033
|
423 |
src/Tools/isac/ & 37 & k LOC\\
|
neuper@42033
|
424 |
src/Tools/isac/Knowledge & 16 & k LOC
|
neuper@42033
|
425 |
\end{tabular}
|
neuper@42033
|
426 |
}
|
neuper@42033
|
427 |
\pause
|
e0726734@42031
|
428 |
\item changes scattered throughout the code ($\rightarrow$ grep)
|
neuper@42033
|
429 |
\pause
|
neuper@42033
|
430 |
\item documentation of Isabelle very ``technical'' (no API)
|
neuper@42033
|
431 |
\pause
|
neuper@42033
|
432 |
\item documentation of \sisac{} not up to date
|
e0726734@42030
|
433 |
\end{itemize}
|
e0726734@42027
|
434 |
\end{frame}
|
e0726734@42027
|
435 |
|
neuper@42033
|
436 |
%\begin{frame}
|
neuper@42033
|
437 |
% \frametitle{Lines of Code}
|
neuper@42033
|
438 |
% \begin{tabular}{lr}
|
neuper@42033
|
439 |
% src/ & 1700 k \\
|
neuper@42033
|
440 |
% src/Pure/ & 70 k \\
|
neuper@42033
|
441 |
% src/Provers/ & 8 k \\
|
neuper@42033
|
442 |
% src/Tools/ & 800 k \\
|
neuper@42033
|
443 |
% src/Tools/isac/ & 37 k \\
|
neuper@42033
|
444 |
% src/Tools/isac/Knowledge & 16 k \\
|
neuper@42033
|
445 |
% \end{tabular}
|
neuper@42033
|
446 |
%\end{frame}
|
neuper@42033
|
447 |
|
neuper@42028
|
448 |
\section{Summary}
|
neuper@42028
|
449 |
\begin{frame}
|
e0726734@42030
|
450 |
\frametitle{Summary}
|
neuper@42033
|
451 |
The project succeeded in all goals:
|
neuper@42033
|
452 |
\begin{itemize}
|
neuper@42033
|
453 |
\item implemented Isabelle's contexts in \sisac{} such that
|
neuper@42033
|
454 |
\item user input requires no type constraints anymore
|
neuper@42033
|
455 |
\item consistent logical data is prepared for Isabelle's provers
|
neuper@42033
|
456 |
\end{itemize}
|
neuper@42033
|
457 |
\pause
|
neuper@42033
|
458 |
The course of the project was close to the plan:
|
neuper@42033
|
459 |
\begin{itemize}
|
neuper@42033
|
460 |
\item faster in writing new code
|
neuper@42033
|
461 |
\item slower in integrating the code into \sisac
|
neuper@42033
|
462 |
\end{itemize}
|
neuper@42033
|
463 |
\pause
|
neuper@42033
|
464 |
The project provided essential prerequisites for further development of the Lucas-interpreter.
|
e0726734@42027
|
465 |
\end{frame}
|
e0726734@42027
|
466 |
|
e0726734@42027
|
467 |
\end{document}
|
e0726734@42027
|
468 |
|
e0726734@42027
|
469 |
|