7 |
\setlength{\evensidemargin}{0.25in} |
\setlength{\evensidemargin}{0.25in} |
8 |
\setlength{\parskip}{5pt} |
\setlength{\parskip}{5pt} |
9 |
|
|
10 |
\title{Diderot} |
\title{Diderot design} |
11 |
\author{ |
\author{ |
12 |
Gordon Kindlmann \\ |
Gordon Kindlmann \\ |
13 |
University of Chicago \\ |
University of Chicago \\ |
16 |
John Reppy \\ |
John Reppy \\ |
17 |
University of Chicago \\ |
University of Chicago \\ |
18 |
{\small\tt{}jhr@cs.uchicago.edu} \\ |
{\small\tt{}jhr@cs.uchicago.edu} \\ |
19 |
|
\and |
20 |
|
Thomas Schultz \\ |
21 |
|
University of Chicago \\ |
22 |
|
{\small\tt{}t.schultz@uchicago.edu} \\ |
23 |
} |
} |
24 |
\date{\today} |
\date{\today} |
25 |
|
|
32 |
This document is a semi-formal design of Dedierot. |
This document is a semi-formal design of Dedierot. |
33 |
|
|
34 |
\section{Types} |
\section{Types} |
35 |
The syntax of Diderot types is as follows: |
The syntax of Diderot types is given in \figref{fig:types}. |
36 |
|
\begin{figure}[t] |
37 |
\begin{displaymath} |
\begin{displaymath} |
38 |
\begin{array}{rclr} |
\begin{array}{rclr} |
39 |
\tau & ::= & \TYbool & \text{booleans} \\ |
\rho & ::= & $\ldots$ & \text{NNRD types} \\[1em] |
40 |
& \mid & \TYint & \text{integers} \\ |
\iota & ::= & \TYbool & \text{booleans} \\ |
41 |
& \mid & \TYtensor{o}{d} & \text{tensors of order $o$ and dimension $d$} \\ |
& \mid & \TYint & \text{integers} \\[1em] |
42 |
|
\theta & ::= & \TYtensor{o}{d} & \text{tensors of order $o$ and dimension $d$} \\[1em] |
43 |
|
\tau & ::= & \iota \\ |
44 |
|
& \mid & \theta \\ |
45 |
& \mid & \TYmatrix{n}{m} & \text{$n\times{}m$ matrix} \\ |
& \mid & \TYmatrix{n}{m} & \text{$n\times{}m$ matrix} \\ |
46 |
& \mid & \TYimage{d}{\tau} & \text{image of dimension $d$ and $\tau$ elements}\\ |
& \mid & \TYimage{d}{\rho} & \text{image of dimension $d$ and $\rho$ elements}\\ |
47 |
& \mid & \TYkern{k} & \text{convolution kernel with $k$ derivatives} \\ |
& \mid & \TYkern{k} & \text{convolution kernel with $k$ derivatives} \\ |
48 |
& \mid & \TYfield{k}{d}{\tau} & \text{$d$-dimension field of $\tau$ values and $k$ derivatives} \\ |
& \mid & \TYfield{k}{d}{\theta} & \text{$d$-dimension field of $\theta$ values and $k$ derivatives} \\ |
49 |
\end{array}% |
\end{array}% |
50 |
\end{displaymath}% |
\end{displaymath}% |
51 |
where $o\in\Nat$ is the tensor order, $d,n,m\in\SET{2,3}$ are dimensions, |
where $o\in\Nat$ is the tensor order, $d,n,m\in\SET{2,3}$ are dimensions, |
52 |
and $k\in\Nat$ is the differentiability of a field. |
and $k\in\Nat$ is the differentiability of a field. |
53 |
|
\caption{Diderot types} |
54 |
Some type abbreviations: |
\label{fig:types} |
55 |
|
\end{figure}% |
56 |
|
We use some type abbreviations for common cases: |
57 |
\begin{eqnarray*} |
\begin{eqnarray*} |
58 |
\TYreal & = & \TYtensor{0}{d} \quad\text{for any $d$} \\ |
\TYreal & = & \TYtensor{0}{d} \quad\text{for any $d$} \\ |
59 |
\TYvec{d} & = & \TYtensor{1}{d} |
\TYvec{d} & = & \TYtensor{1}{d} |
64 |
\subsection{Scalar operations} |
\subsection{Scalar operations} |
65 |
\noindent{}Arithmetic: |
\noindent{}Arithmetic: |
66 |
\begin{displaymath} |
\begin{displaymath} |
67 |
|
\begin{array}{cl} |
68 |
\BinopTy{{\odot}}{\tau}{\tau}{\tau} |
\BinopTy{{\odot}}{\tau}{\tau}{\tau} |
69 |
\qquad\text{for $\odot\in\SET{{+},{-},{*},{/}}$ and $\tau\in\SET{\TYint,\TYreal}$} |
& \text{for $\odot\in\SET{{+},{-},{*},{/}}$ and $\tau\in\SET{\TYint,\TYreal}$} \\ |
70 |
|
\UnopTy{{-}}{\tau}{\tau} |
71 |
|
& \text{for $\tau\in\SET{\TYint,\TYreal}$} |
72 |
|
\end{array}% |
73 |
\end{displaymath}% |
\end{displaymath}% |
74 |
|
|
75 |
\noindent{}Comparisons: |
\noindent{}Comparisons: |
91 |
\end{array}% |
\end{array}% |
92 |
\end{displaymath}% |
\end{displaymath}% |
93 |
|
|
94 |
|
\noindent{}Scalar division: |
95 |
|
\begin{displaymath} |
96 |
|
\BinopTy{{/}}{\TYtensor{o}{d}}{\TYreal}{\TYtensor{o}{d}} |
97 |
|
\end{displaymath}% |
98 |
|
|
99 |
\noindent{}Addition: |
\noindent{}Addition: |
100 |
\begin{displaymath} |
\begin{displaymath} |
101 |
\BinopTy{{\odot}}{\TYtensor{o}{d}}{\TYtensor{o}{d}}{\TYtensor{o}{d}} |
\BinopTy{{\odot}}{\TYtensor{o}{d}}{\TYtensor{o}{d}}{\TYtensor{o}{d}} |
102 |
\qquad\text{for $\odot\in\SET{{+},{-}}$} |
\qquad\text{for $\odot\in\SET{{+},{-}}$} |
103 |
\end{displaymath}% |
\end{displaymath}% |
104 |
|
|
105 |
|
\noindent{}Negation: |
106 |
|
\begin{displaymath} |
107 |
|
\UnopTy{-}{\TYtensor{o}{d}}{\TYtensor{o}{d}} |
108 |
|
\end{displaymath}% |
109 |
|
|
110 |
\subsection{Field operations} |
\subsection{Field operations} |
111 |
|
|
112 |
\noindent{}Creation from an image: |
\noindent{}Creation from an image: |
113 |
\begin{displaymath} |
\begin{displaymath} |
114 |
\BinopTy{\OPsample}{\TYkern{k}}{\TYimage{d}{\tau}}{\TYfield{k}{d}{\hat{\tau}}} |
\BinopTy{\OPsample}{\TYkern{k}}{\TYimage{d}{\rho}}{\TYfield{k}{d}{\theta}} |
115 |
\qquad\text{where $\hat{\tau}$ is the real conversion of $\tau$.} |
\qquad\text{where $\theta$ is the real conversion of $\rho$.} |
116 |
|
\end{displaymath}% |
117 |
|
|
118 |
|
\noindent{}Scalar multiplication: |
119 |
|
\begin{displaymath} |
120 |
|
\begin{array}{c} |
121 |
|
\BinopTy{{*}}{\TYreal}{\TYfield{k}{d}{\theta}}{\TYfield{k}{d}{\theta}} \\ |
122 |
|
\BinopTy{{*}}{\TYfield{k}{d}{\theta}}{\TYreal}{\TYfield{k}{d}{\theta}} |
123 |
|
\end{array}% |
124 |
|
\end{displaymath}% |
125 |
|
|
126 |
|
\noindent{}Scalar division: |
127 |
|
\begin{displaymath} |
128 |
|
\BinopTy{{/}}{\TYfield{k}{d}{\theta}}{\TYreal}{\TYfield{k}{d}{\theta}} |
129 |
\end{displaymath}% |
\end{displaymath}% |
130 |
|
|
131 |
\noindent{}Addition: |
\noindent{}Addition: |
132 |
\begin{displaymath} |
\begin{displaymath} |
133 |
\BinopTy{{\odot}}{\TYfield{k_1}{d}{\tau}}{\TYfield{k_2}{d}{\tau}}{\TYfield{\min(k_1,k_2)}{d}{\tau}} |
\BinopTy{{\odot}}{\TYfield{k_1}{d}{\theta}}{\TYfield{k_2}{d}{\theta}}{\TYfield{\min(k_1,k_2)}{d}{\theta}} |
134 |
\qquad\text{for $\odot\in\SET{{+},{-}}$} |
\qquad\text{for $\odot\in\SET{{+},{-}}$} |
135 |
\end{displaymath}% |
\end{displaymath}% |
136 |
|
|
137 |
\noindent{}Differentiation: |
\noindent{}Differentiation: |
138 |
\begin{displaymath} |
\begin{displaymath} |
139 |
\UnopTy{\OPdiff}{\TYfield{k}{d}{\tau}}{\TYfield{k-1}{d}{\tau}} |
\UnopTy{\OPdiff}{\TYfield{k}{d}{\TYtensor{o}{d}}}{\TYfield{k-1}{d}{\TYtensor{o+1}{d}}} |
140 |
\qquad\text{for $k > 0$} |
\qquad\text{for $k > 0$} |
141 |
\end{displaymath}% |
\end{displaymath}% |
142 |
|
|
143 |
\noindent{}Probing: |
\noindent{}Probing: |
144 |
\begin{displaymath} |
\begin{displaymath} |
145 |
\BinopTy{@}{\TYfield{k}{d}{\tau}}{\TYvec{d}}{\tau} |
\BinopTy{@}{\TYfield{k}{d}{\theta}}{\TYvec{d}}{\theta} |
146 |
\end{displaymath}% |
\end{displaymath}% |
147 |
|
|
148 |
\end{document} |
\end{document} |