1 : |
jhr |
16 |
\documentclass[11pt]{article}
|
2 : |
|
|
|
3 : |
|
|
\input{defs}
|
4 : |
|
|
|
5 : |
|
|
\setlength{\textwidth}{6in}
|
6 : |
|
|
\setlength{\oddsidemargin}{0.25in}
|
7 : |
|
|
\setlength{\evensidemargin}{0.25in}
|
8 : |
|
|
\setlength{\parskip}{5pt}
|
9 : |
|
|
|
10 : |
jhr |
17 |
\title{Diderot design}
|
11 : |
jhr |
16 |
\author{
|
12 : |
|
|
Gordon Kindlmann \\
|
13 : |
|
|
University of Chicago \\
|
14 : |
|
|
{\small\tt{}glk@cs.uchicago.edu} \\
|
15 : |
|
|
\and
|
16 : |
|
|
John Reppy \\
|
17 : |
|
|
University of Chicago \\
|
18 : |
|
|
{\small\tt{}jhr@cs.uchicago.edu} \\
|
19 : |
jhr |
17 |
\and
|
20 : |
|
|
Thomas Schultz \\
|
21 : |
|
|
University of Chicago \\
|
22 : |
|
|
{\small\tt{}t.schultz@uchicago.edu} \\
|
23 : |
jhr |
16 |
}
|
24 : |
|
|
\date{\today}
|
25 : |
|
|
|
26 : |
|
|
\begin{document}
|
27 : |
|
|
|
28 : |
|
|
\maketitle
|
29 : |
|
|
\thispagestyle{empty}
|
30 : |
|
|
|
31 : |
|
|
\section{Introduction}
|
32 : |
|
|
This document is a semi-formal design of Dedierot.
|
33 : |
|
|
|
34 : |
|
|
\section{Types}
|
35 : |
jhr |
17 |
The syntax of Diderot types is given in \figref{fig:types}.
|
36 : |
|
|
\begin{figure}[t]
|
37 : |
|
|
\begin{displaymath}
|
38 : |
|
|
\begin{array}{rclr}
|
39 : |
|
|
\rho & ::= & $\ldots$ & \text{NNRD types} \\[1em]
|
40 : |
|
|
\iota & ::= & \TYbool & \text{booleans} \\
|
41 : |
|
|
& \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} \\
|
46 : |
|
|
& \mid & \TYimage{d}{\rho} & \text{image of dimension $d$ and $\rho$ elements}\\
|
47 : |
|
|
& \mid & \TYkern{k} & \text{convolution kernel with $k$ derivatives} \\
|
48 : |
|
|
& \mid & \TYfield{k}{d}{\theta} & \text{$d$-dimension field of $\theta$ values and $k$ derivatives} \\
|
49 : |
|
|
\end{array}%
|
50 : |
|
|
\end{displaymath}%
|
51 : |
|
|
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.
|
53 : |
|
|
\caption{Diderot types}
|
54 : |
|
|
\label{fig:types}
|
55 : |
|
|
\end{figure}%
|
56 : |
|
|
We use some type abbreviations for common cases:
|
57 : |
jhr |
16 |
\begin{eqnarray*}
|
58 : |
|
|
\TYreal & = & \TYtensor{0}{d} \quad\text{for any $d$} \\
|
59 : |
|
|
\TYvec{d} & = & \TYtensor{1}{d}
|
60 : |
|
|
\end{eqnarray*}%
|
61 : |
|
|
|
62 : |
|
|
\section{Operations}
|
63 : |
|
|
|
64 : |
|
|
\subsection{Scalar operations}
|
65 : |
|
|
\noindent{}Arithmetic:
|
66 : |
|
|
\begin{displaymath}
|
67 : |
jhr |
17 |
\begin{array}{cl}
|
68 : |
|
|
\BinopTy{{\odot}}{\tau}{\tau}{\tau}
|
69 : |
|
|
& \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 : |
jhr |
16 |
\end{displaymath}%
|
74 : |
|
|
|
75 : |
|
|
\noindent{}Comparisons:
|
76 : |
|
|
\begin{displaymath}
|
77 : |
|
|
\BinopTy{{\odot}}{\tau}{\tau}{\TYbool}
|
78 : |
|
|
\qquad\text{for $\odot\in\SET{{<},{\leq},{=},{\neq}{>},{\geq}}$ and $\tau\in\SET{\TYint,\TYreal}$}
|
79 : |
|
|
\end{displaymath}%
|
80 : |
|
|
|
81 : |
|
|
|
82 : |
|
|
\subsection{Matrix operations}
|
83 : |
|
|
|
84 : |
|
|
\subsection{Tensor operations}
|
85 : |
|
|
|
86 : |
|
|
\noindent{}Scalar multiplication:
|
87 : |
|
|
\begin{displaymath}
|
88 : |
|
|
\begin{array}{c}
|
89 : |
|
|
\BinopTy{{*}}{\TYreal}{\TYtensor{o}{d}}{\TYtensor{o}{d}} \\
|
90 : |
|
|
\BinopTy{{*}}{\TYtensor{o}{d}}{\TYreal}{\TYtensor{o}{d}}
|
91 : |
|
|
\end{array}%
|
92 : |
|
|
\end{displaymath}%
|
93 : |
|
|
|
94 : |
jhr |
17 |
\noindent{}Scalar division:
|
95 : |
|
|
\begin{displaymath}
|
96 : |
|
|
\BinopTy{{/}}{\TYtensor{o}{d}}{\TYreal}{\TYtensor{o}{d}}
|
97 : |
|
|
\end{displaymath}%
|
98 : |
|
|
|
99 : |
jhr |
16 |
\noindent{}Addition:
|
100 : |
|
|
\begin{displaymath}
|
101 : |
|
|
\BinopTy{{\odot}}{\TYtensor{o}{d}}{\TYtensor{o}{d}}{\TYtensor{o}{d}}
|
102 : |
|
|
\qquad\text{for $\odot\in\SET{{+},{-}}$}
|
103 : |
|
|
\end{displaymath}%
|
104 : |
|
|
|
105 : |
jhr |
17 |
\noindent{}Negation:
|
106 : |
|
|
\begin{displaymath}
|
107 : |
|
|
\UnopTy{-}{\TYtensor{o}{d}}{\TYtensor{o}{d}}
|
108 : |
|
|
\end{displaymath}%
|
109 : |
|
|
|
110 : |
jhr |
16 |
\subsection{Field operations}
|
111 : |
|
|
|
112 : |
|
|
\noindent{}Creation from an image:
|
113 : |
|
|
\begin{displaymath}
|
114 : |
jhr |
17 |
\BinopTy{\OPsample}{\TYkern{k}}{\TYimage{d}{\rho}}{\TYfield{k}{d}{\theta}}
|
115 : |
|
|
\qquad\text{where $\theta$ is the real conversion of $\rho$.}
|
116 : |
jhr |
16 |
\end{displaymath}%
|
117 : |
|
|
|
118 : |
jhr |
17 |
\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}%
|
130 : |
|
|
|
131 : |
jhr |
16 |
\noindent{}Addition:
|
132 : |
|
|
\begin{displaymath}
|
133 : |
jhr |
17 |
\BinopTy{{\odot}}{\TYfield{k_1}{d}{\theta}}{\TYfield{k_2}{d}{\theta}}{\TYfield{\min(k_1,k_2)}{d}{\theta}}
|
134 : |
jhr |
16 |
\qquad\text{for $\odot\in\SET{{+},{-}}$}
|
135 : |
|
|
\end{displaymath}%
|
136 : |
|
|
|
137 : |
|
|
\noindent{}Differentiation:
|
138 : |
|
|
\begin{displaymath}
|
139 : |
jhr |
17 |
\UnopTy{\OPdiff}{\TYfield{k}{d}{\TYtensor{o}{d}}}{\TYfield{k-1}{d}{\TYtensor{o+1}{d}}}
|
140 : |
jhr |
16 |
\qquad\text{for $k > 0$}
|
141 : |
|
|
\end{displaymath}%
|
142 : |
|
|
|
143 : |
|
|
\noindent{}Probing:
|
144 : |
|
|
\begin{displaymath}
|
145 : |
jhr |
17 |
\BinopTy{@}{\TYfield{k}{d}{\theta}}{\TYvec{d}}{\theta}
|
146 : |
jhr |
16 |
\end{displaymath}%
|
147 : |
|
|
|
148 : |
|
|
\end{document}
|