[icfp] update teaser, after M.meeting

This commit is contained in:
ben 2016-03-01 19:57:16 -05:00
parent 72d40fcfd4
commit 2a46d38539

View File

@ -1,4 +1,6 @@
\documentclass{article} \documentclass{article}
\usepackage{amsmath}
\usepackage{mathpartir}
\usepackage{palatino} \usepackage{palatino}
\begin{document} \begin{document}
\begin{abstract} \begin{abstract}
@ -15,30 +17,70 @@
give a nice experience. give a nice experience.
\end{abstract} \end{abstract}
\subsection*{Outline}
Technique works by identifying common properties of a set of Technique works by identifying common properties of a set of
values and using these properties in a macro transformation. values and using these properties in a macro transformation.
\subsubsection*{Key Functions}
\begin{itemize} \begin{itemize}
\item Context-free, syntactic, curry-style ``type'' checking. \item Context-free, syntactic way of associating a Curry-style ``type'' to a value.
\subitem {\texttt{typeof : (-> Syntax (TypeTag x MetaData))}} \subitem $\mathsf{typeof} : Syntax \rightarrow TypeTag$
\item Operations using the type tag \& metadata. \item (Optional) Propogate metadata to future references of an identifier
\subitem {\texttt{transformations : (-> TypeTag (Set (-> Syntax Syntax)))}} \subitem $\mathsf{attach} : Syntax \times Meta \rightarrow Syntax$
\item Tag-indexed family of functions that extract data from a syntactic value.
\subitem $\mathsf{analyze} : TypeTag \rightarrow (Syntax \rightarrow Meta$
\item Transform a context based on metadata-augmented syntax for the hole.
\subitem $\mathsf{transform : (-> Context (Syntax x Meta) Syntax$
\end{itemize} \end{itemize}
\subsubsection*{Correctness}
Suppose {\tt transform} $E~e = e'$.
A correct transformation should only catch bugs in $e$.
% Is this novel at all?
\begin{mathpar}
\inferrule*{
\vdash e : \tau
\\
\vdash e' : \tau'
}{
\tau' <: \tau
\\
e \Uparrow \iff e' \Uparrow
\\
e \Downarrow v \iff e' \Downarrow v
}
\inferrule*{
\vdash e : \tau
\\
\not\vdash e' : \tau'
}{
e \Uparrow
}
\inferrule*{
\not\vdash e : \tau
}{
\not\vdash e' : \tau'
}
\end{mathpar}
\subsubsection*{Examples}
Table defines type tags and related \texttt{transformations}. Table defines type tags and related \texttt{transformations}.
\vspace{0.4cm} \vspace{0.4cm}
\begin{center} \begin{center}
\hspace{-4cm}\begin{tabular}{l l l l l} \hspace{-3cm}\begin{tabular}{l l l l l}
Type & Syntax Category & Metadata & Applications \\\hline\hline Type & Syntax Category & Metadata & Applications \\\hline\hline
\\Format String & {\tt string} & \#/$\tau$ of fmt chars & Check args to {\tt printf} \\Format String & {\tt string} & \#/$\tau$ of fmt chars & Check args to {\tt printf}
\\Regexp & {\tt string} / {\tt bytes} & \# groups & Check paren-matching${}^*$, smarter return type \\Regexp & {\tt string} / {\tt bytes} & \# groups & Check paren-matching${}^*$, smarter return type
\\Query String & {\tt string} & \# of {\tt \$} vars & Check arity \\Query String & {\tt string} & \# of {\tt \$} vars & Check arity
\\Function & {\tt (lambda ...)} & Arity & Compile-time arity check for {\tt apply} \\Function & {\tt (lambda ...)} & Arity & Compile-time arity check for {\tt apply}
\\Numbers & {\tt number} & Value & Constant folding, accurate types \\Numbers & {\tt number} & Value & Constant folding, accurate types
\\Vectors & {\tt `\#( ... )} & Length & Access, size, fast operations \\Vectors & {\tt `\#( ... )} & Length & Access, size, fast operations
\end{tabular} \end{tabular}
\end{center} \end{center}
@ -54,8 +96,21 @@ Table defines type tags and related \texttt{transformations}.
\subitem $\circ~$ Write macro that looks for \& uses tags {\tt equal?} \subitem $\circ~$ Write macro that looks for \& uses tags {\tt equal?}
\end{itemize} \end{itemize}
P.S. Our goal is not to discourage dependent types, but rather to advertise macros. ~
P.P.S. Jack Firth might be using the library. Email him? \\P.S. Our goal is not to discourage dependent types, but rather to advertise macros.
P.P.P.S Should work in other languages, hard part will be rename transformers \\P.P.S. Jack Firth might be using the library. Email him?
\\P.P.P.S Should work in other languages, hard part will be rename transformers
\subsubsection*{Outline}
\begin{itemize}
\item Examples of ``syntactically obvious'' dependent types.
\item Not-so-obvious examples, i.e. regular expressions \& vector operations.
\item High-level solution
\item Racket implementation, brief correctness argument
\subitem (Cool things like {\tt set!-transformer})
\item Limitations \& near misses
\item Experience report?
\end{itemize}
\end{document} \end{document}