\documentclass[11pt]{article} \input{defs} \setlength{\textwidth}{6in} \setlength{\oddsidemargin}{0.25in} \setlength{\evensidemargin}{0.25in} \setlength{\parskip}{5pt} \title{Diderot design} \author{ Gordon Kindlmann \\ University of Chicago \\ {\small\tt{}glk@cs.uchicago.edu} \\ \and John Reppy \\ University of Chicago \\ {\small\tt{}jhr@cs.uchicago.edu} \\ \and Thomas Schultz \\ University of Chicago \\ {\small\tt{}t.schultz@uchicago.edu} \\ } \date{\today} \begin{document} \maketitle \thispagestyle{empty} \section{Introduction} This document is a semi-formal design of Diderot. \section{Types} The syntax of Diderot types is given in \figref{fig:types}. \begin{figure}[t] \begin{displaymath} \begin{array}{rclr} \rho & ::= & $\ldots$ & \text{NRRD scalar types} \\[1em] \iota & ::= & \TYbool & \text{booleans} \\ & \mid & \TYint & \text{integers} \\[1em] % \mu for memory, where images of rawtensors will live (or on disk) \mu & ::= & \TYrawten{o}{d}{\rho} & \begin{minipage}[l]{3in}\begin{flushright} tensors of order $o$ and dimension $d$,\\with coefficients of type $\rho$ \end{flushright}\end{minipage}\\[1em] \theta & ::= & \TYtensor{o}{d} & \begin{minipage}[l]{3in}\begin{flushright} tensors of order $o$ and dimension $d$,\\with real coefficients \end{flushright}\end{minipage}\\[1em] \tau & ::= & \iota \\ & \mid & \theta \\ & \mid & \TYmatrix{n}{m} & \text{$n\times{}m$ matrix} \\ & \mid & \TYimage{d}{\mu} & \text{$d$-dimension image of $\mu$ values}\\ & \mid & \TYkern{k} & \text{convolution kernel with $k$ derivatives} \\ & \mid & \TYfield{k}{d}{\theta} & \text{$d$-dimension field of $\theta$ values with $k$ derivatives} \\ \end{array}% \end{displaymath}% where $o\in\Nat$ is the tensor order, $d,n,m\in\SET{2,3}$ are dimensions, and $k\in\Nat$ is the differentiability of a field. \caption{Diderot types} \label{fig:types} \end{figure}% We use some type abbreviations for common cases: \begin{eqnarray*} \TYreal & = & \TYtensor{0}{d} \quad\text{for any $d$} \\ \TYvec{d} & = & \TYtensor{1}{d} \end{eqnarray*}% \section{Operations} \subsection{Scalar operations} \noindent{}Arithmetic: \begin{displaymath} \begin{array}{cl} \BinopTy{{\odot}}{\tau}{\tau}{\tau} & \text{for $\odot\in\SET{{+},{-},{*},{/}}$ and $\tau\in\SET{\TYint,\TYreal}$} \\ \UnopTy{{-}}{\tau}{\tau} & \text{for $\tau\in\SET{\TYint,\TYreal}$} \end{array}% \end{displaymath}% \noindent{}Comparisons: \begin{displaymath} \BinopTy{{\odot}}{\tau}{\tau}{\TYbool} \qquad\text{for $\odot\in\SET{{<},{\leq},{=},{\neq}{>},{\geq}}$ and $\tau\in\SET{\TYint,\TYreal}$} \end{displaymath}% \subsection{Matrix operations} \subsection{Tensor operations} \noindent{}Scalar multiplication: \begin{displaymath} \begin{array}{c} \BinopTy{{*}}{\TYreal}{\TYtensor{o}{d}}{\TYtensor{o}{d}} \\ \BinopTy{{*}}{\TYtensor{o}{d}}{\TYreal}{\TYtensor{o}{d}} \end{array}% \end{displaymath}% \noindent{}Scalar division: \begin{displaymath} \BinopTy{{/}}{\TYtensor{o}{d}}{\TYreal}{\TYtensor{o}{d}} \end{displaymath}% \noindent{}Addition: \begin{displaymath} \BinopTy{{\odot}}{\TYtensor{o}{d}}{\TYtensor{o}{d}}{\TYtensor{o}{d}} \qquad\text{for $\odot\in\SET{{+},{-}}$} \end{displaymath}% \noindent{}Negation: \begin{displaymath} \UnopTy{-}{\TYtensor{o}{d}}{\TYtensor{o}{d}} \end{displaymath}% \subsection{Field operations} \noindent{}Creation from an image: \begin{displaymath} \BinopTy{\OPconvolve}{\TYkern{k}}{\TYimage{d}{\mu}}{\TYfield{k}{d}{\theta}} \qquad\text{where $\theta$ is the real conversion of $\mu$.} \end{displaymath}% \noindent{}Scalar multiplication: \begin{displaymath} \begin{array}{c} \BinopTy{{*}}{\TYreal}{\TYfield{k}{d}{\theta}}{\TYfield{k}{d}{\theta}} \\ \BinopTy{{*}}{\TYfield{k}{d}{\theta}}{\TYreal}{\TYfield{k}{d}{\theta}} \end{array}% \end{displaymath}% \noindent{}Scalar division: \begin{displaymath} \BinopTy{{/}}{\TYfield{k}{d}{\theta}}{\TYreal}{\TYfield{k}{d}{\theta}} \end{displaymath}% \noindent{}Negation: \begin{displaymath} \UnopTy{-}{\TYfield{k}{d}{\theta}}{\TYfield{k}{d}{\theta}} \end{displaymath}% \noindent{}Addition: \begin{displaymath} \begin{array}{c} \BinopTy{{\odot}}{\TYfield{k}{d}{\theta}}{\theta}{\TYfield{k}{d}{\theta}} \\ \BinopTy{{\odot}}{\theta}{\TYfield{k}{d}{\theta}}{\TYfield{k}{d}{\theta}} \\ \BinopTy{{\odot}}{\TYfield{k_1}{d}{\theta}}{\TYfield{k_2}{d}{\theta}}{\TYfield{\min(k_1,k_2)}{d}{\theta}} \end{array}% \qquad\text{for $\odot\in\SET{{+},{-}}$} \end{displaymath}% \noindent{}Differentiation: \begin{displaymath} \UnopTy{\OPdiff}{\TYfield{k}{d}{\TYtensor{o}{d}}}{\TYfield{k-1}{d}{\TYtensor{o+1}{d}}} \qquad\text{for $k > 0$} \end{displaymath}% \noindent{}Probing: \begin{displaymath} \BinopTy{@}{\TYfield{k}{d}{\theta}}{\TYvec{d}}{\theta} \end{displaymath}% \end{document}
Click to toggle
does not end with </html> tag
does not end with </body> tag
The output has ended thus: laymath} \BinopTy{@}{\TYfield{k}{d}{\theta}}{\TYvec{d}}{\theta} \end{displaymath}% \end{document}