\documentclass{beamer} %include lhs2TeX.fmt %include polycode.fmt \usetheme{uucs} \usepackage{tikz} \usepackage{textpos} \usetikzlibrary{trees,arrows,decorations,shapes,fit,backgrounds} \pgfdeclarelayer{background} \pgfsetlayers{background,main} \author{Arie Middelkoop} \title{First Class Traversal Idioms with Nested Attribute Grammars} \institute{% Dept.\ of Information and Computing Sciences, Utrecht University\\% P.O.\ Box 80.089, 3508 TB Utrecht, The Netherlands\\% Web pages: \url{http://www.cs.uu.nl/wiki/Center}} \date{15 April 2010 \& Software Technology Colloquium} %format attr = "\mathbf{attr}" %format data = "\mathbf{data}" %format sem = "\mathbf{sem}" %format itf = "\mathbf{itf}" %format inh = "\mathbf{inh}" %format syn = "\mathbf{syn}" %format tail = "\mathbf{tail}" %format match = "\mathbf{match}" %format eval = "\mathbf{eval}" %format child = "\mathbf{child}" %format visit = "\mathbf{visit}" %format order = "\mathbf{order}" %format huse = "\mathbf{use}" %format . = "." %format ^^ = "\;" %format ^^^ = "\hspace{1cm}" %format bf x = "\emph{" x "}" %format v1 %format v2 %format ast %format ty = "\tau" %format ty1 %format ty2 %format ty3 %format ty4 %format subst = "\sigma" %format emptyset = "\emptyset" %format e1 %format e2 %format <|> = | %format <*> = * %format <$> = $ %format alpha = "\alpha" \newcommand\comment[1]{} \begin{document} \frontmatter \begin{frame} \titlepage \end{frame} \mainmatter \section*{Introduction} \begin{frame} \frametitle{Main Question} Software component for name analysis? \pause Why? \begin{itemize} \item Pattern that occurs often in compilers \item Software engineering practice (e.g. elimination of code duplication) \end{itemize} \pause Actual question: mechanism for any traversal idiom? More intriguing idiom: damas-milner inference \end{frame} \begin{frame} \begin{center} \includegraphics[width=6cm]{package.jpg} \end{center} \end{frame} \begin{frame} \frametitle{Warning!} \begin{center} \includegraphics[width=2cm]{skull.jpg} \end{center} Work in progress! Controversial/not a silver bullet. I hope this talk leads to: \begin{itemize} \item References to related material \item Improvements to the concepts \item Improvements to understanding and explanation \item Ideas for a nicer implementation \end{itemize} \end{frame} \begin{frame} \frametitle{Related Work} This talk is related to attribute grammars: \begin{itemize} \item Higher-order Attribute Grammars \item Remote Attributes / Reference Attributes \end{itemize} ... and probably many other formalisms/technologies \end{frame} %include background.lhs %include component.lhs %include extend.lhs %include order.lhs \section*{Conclusions} \begin{frame} \frametitle{Type Check Idiom} \begin{center} \begin{tikzpicture} [ comp/.style={rectangle, minimum size=13mm, very thick, draw=blue!50!black!50, top color=white, bottom color=blue!50!black!20,font=\footnotesize} , gen/.style={->>,thick} , ext/.style={->,thick} , annot/.style={font=\footnotesize} , node distance=25mm ] \node[comp] (tpsig) {type + sig}; \node[comp, left of=tpsig] (main) {main}; \node[comp, above of=tpsig] (name) {name}; \node[comp, right of=tpsig] (kind) {kind}; \node[comp, below of=tpsig] (type) {type}; \node[comp, right of=type] (tpkind) {type+kind}; \draw[gen] (main) to node[annot,auto]{gen} (name); \draw[gen] (main) to node[annot,auto]{gen} (tpsig); \draw[gen] (tpsig) to node[annot,auto]{gen} (kind); \draw[gen] (kind) to node[annot,auto]{gen} (name); \draw[gen] (kind) to node[annot,auto]{gen} (tpkind); \draw[ext] (tpsig) to node[annot,auto]{extends} (type); \draw[ext] (tpkind) to node[annot,auto]{extends} (type); \end{tikzpicture} \end{center} \end{frame} \begin{frame} \frametitle{Discussion} \Large{ \begin{verbatim} performance views idioms generics proofs functional backend examples UUAG tradeoffs validation usability \end{verbatim}} \end{frame} \begin{frame} \frametitle{Conclusion} Traversal components: \begin{itemize} \item Produce an attributed tree \item Interface with nodes of this attributed tree \item Extend functionality with filter nodes \end{itemize} \end{frame} \end{document}