Home My Page Projects Code Snippets Project Openings diderot

# SCM Repository

[diderot] Diff of /trunk/doc/typing/typing.tex
 [diderot] / trunk / doc / typing / typing.tex

# Diff of /trunk/doc/typing/typing.tex

revision 64, Thu May 13 17:32:28 2010 UTC revision 66, Thu May 13 23:12:28 2010 UTC
# Line 28  Line 28
28  This document looks at the rules for typechecking Diderot.  This document looks at the rules for typechecking Diderot.
29
30  \section{Types}  \section{Types}
31    \begin{displaymath}
32      \begin{array}{rclr}
33        \nu & ::= & n & \text{dimension ($n > 0$)} \\
34            & \mid & \phi & \text{dimension variable} \\
35        \sigma & ::= & \epsilon & \text{empty sequence of dimensions} \\[1em]
36            & \mid & \rho & \text{shape variable} \\
37            & \mid & \sigma,\nu & \text{shape extension} \\[1em]
38        \kappa & ::= & n & \text{$n$ levels of differentiation ($n \geq 0$)} \\
39            & \mid & \kappa-n & \text{}
40      \end{array}
41    \end{displaymath}%
42
43  The syntax of Diderot types is given in \figref{fig:types}.  The syntax of Diderot types is given in \figref{fig:types}.
44  \begin{figure}[t]  \begin{figure}[t]
45    \begin{displaymath}    \begin{displaymath}
46      \begin{array}{rclr}      \begin{array}{rclr}
47        \iota & ::= & \TYconst & \text{type constants} \\        \tau & ::= & \TYconst & \text{type constants} \\
& \mid & \TYint & \text{integers} \\[1em]
\tau & ::= & \iota \\
48             & \mid & \theta \\             & \mid & \theta \\
49             & \mid & \TYmatrix{n}{m} & \text{$n\times{}m$ matrix} \\  %           & \mid & \TYmatrix{n}{m} & \text{$n\times{}m$ matrix} \\
50             & \mid & \TYimage{d}{\mu} & \text{$d$-dimension image of $\mu$ values}\\             & \mid & \TYimage{\nu}{\sigma} & \text{$d$-dimension image of $\mu$ values}\\
51             & \mid & \TYkern{k} & \text{convolution kernel with $k$ derivatives} \\             & \mid & \TYkern{k} & \text{convolution kernel with $k$ derivatives} \\
52             & \mid & \TYfield{k}{d}{\theta} & \text{$d$-dimension field of $\theta$ values with $k$ derivatives} \\             & \mid & \TYfield{k}{\nu}{\sigma} & \text{field} \\
53        \sigma & ::= \        \sigma & ::= \
54      \end{array}%      \end{array}%
55    \end{displaymath}%    \end{displaymath}%

Legend:
 Removed from v.64 changed lines Added in v.66