intro slide

This commit is contained in:
Michael Sippel 2024-09-24 10:10:25 +02:00
parent e0f467c848
commit 7f45198cd1
2 changed files with 33 additions and 27 deletions

View file

@ -40,36 +40,40 @@
\begin{frame} \begin{frame}[t, fragile]
\frametitle{Type Systems} \frametitle{Type Systems}
\framesubtitle{Safety <> Flexibility} \framesubtitle{Safety <> Flexibility}
\begin{itemize} \centering
\item<1-> Goal: eliminate undefined behaviour, \includegraphics[width=0.9\textwidth]{intro.pdf}
facilitate abstract code
\item<2-> simple types are overly restrictive,
loss of low level control
\item<3-|alert@3> polymorphism \pause
(regain flexibility in type-safe way) \begin{block}{type information in comments}
\begin{itemize} \begin{lstlisting}
\item<4-> parametric polymorphism (generics)
\item<4-> subtype polymorphism (inheritance / coercions)
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}[t, fragile]{Type Systems}
\framesubtitle{Safety <> Flexibility}
\begin{lstlisting}
/* this is an angle in degrees */ /* this is an angle in degrees */
double hue = 156.4; double hue = 156.4;
\end{lstlisting} \end{lstlisting}
\end{block}
\end{frame} \end{frame}
\begin{frame}[t, fragile]{Example - Image Processing}
\begin{lstlisting}
image-read :: FilePath -> [Color]
image-write :: FilePath -> [Color] -> ()
image-mix :: $\mathbb{R}$ -> [Color] -> [Color] -> [Color]
image-saturate :: $\mathbb{R}$ -> [Color] -> [Color]
let im1 = image-read "in1.png"
let im2 = image-read "in2.png"
let im3 = image-mix 0.5
im1
(image-saturate 0.8 im2)
image-write "out.png" im3
\end{lstlisting}
\end{frame}
\begin{frame}{Performance Checklist} \begin{frame}{Performance Checklist}
@ -124,7 +128,6 @@ image-write "out.png" im3
\end{lstlisting} \end{lstlisting}
\end{frame} \end{frame}
\begin{frame}{Example - Image Processing} \begin{frame}{Example - Image Processing}
\framesubtitle{More Types} \framesubtitle{More Types}
@ -180,7 +183,7 @@ image-write "out.png" im3
\end{frame} \end{frame}
\begin{frame}{Abstract Concept - Multiple Representations} \begin{frame}{Example - Image Processing}
\framesubtitle{OpenGL Image Formats} \framesubtitle{OpenGL Image Formats}
\begin{itemize} \begin{itemize}
@ -340,7 +343,7 @@ image-write "out.png" im3
\begin{frame}{Morphisms} \begin{frame}{Morphisms}
\framesubtitle{Coherence} \framesubtitle{Coherence}
\begin{block}{Coherence Condition} \begin{block}{Morphism Condition}
Assume\\ Assume\\
\(\metavariable{m_\sigma} : \typeterminal{\metavariable{\sigma} \sim \metavariable{\sigma_1} \rightarrow_\text{morph} \metavariable{\sigma} \sim \metavariable{\sigma_2}}\)\\ \(\metavariable{m_\sigma} : \typeterminal{\metavariable{\sigma} \sim \metavariable{\sigma_1} \rightarrow_\text{morph} \metavariable{\sigma} \sim \metavariable{\sigma_2}}\)\\
\(\metavariable{m_\tau} : \typeterminal{\metavariable{\tau} \sim \metavariable{\tau_1} \rightarrow_\text{morph} \metavariable{\tau} \sim \metavariable{\tau_2}}\)\\ \(\metavariable{m_\tau} : \typeterminal{\metavariable{\tau} \sim \metavariable{\tau_1} \rightarrow_\text{morph} \metavariable{\tau} \sim \metavariable{\tau_2}}\)\\
@ -688,8 +691,11 @@ D :: \Gamma \vdash \metavariable{e} : \metavariable{\tau}\\
\begin{frame}{Summary} \begin{frame}[t, fragile]{Summary}
todo
%\begin{tabular*}[h]{p{0.5\textwidth}|p{0.5\textwidth}}
%\end{tabular*}
\end{frame} \end{frame}

BIN
beamer/lc-beamer/intro.pdf Normal file

Binary file not shown.