next up previous contents index
Next: Translating subrange expressions Up: Basic translation Previous: Translating other statement expressions   Contents   Index

Translating group restriction

The scheme is illustrated in Figure A.37.

If $e_{\mbox{\small loc}}$ is a range element of the form $e_{\mbox{\small rng}}\verb$[$n\verb$]$$, the macro RESTRICT_GROUP is defined as

\begin{displaymath}
\begin{minipage}[t]{\linewidth}\begin{tabbing}
$\mbox{\it RE...
...\small rng}}'$\verb$, $$n'$\verb$)$
\end{tabbing}\end{minipage}\end{displaymath}

where $e_{\mbox{\small rng}}' = {\bf T}^V_{s}\left[{e_{\mbox{\small rng}}}\right]$, and $n' = {\bf T}\left[{n}\right]$. Otherwise, if $e_{\mbox{\small loc}}$ is a distributed index $i$ or a shifted index $i \pm d$, it is defined as

\begin{displaymath}
\begin{minipage}[t]{\linewidth}\begin{tabbing}
$\mbox{\it RE...
....restrict($$\mbox{\it dim}$\verb$)$
\end{tabbing}\end{minipage}\end{displaymath}

where in this case $\mbox{\it dim}$ is the dimension associated with $i$.

Figure A.38: Translation of subrange expressions.
\begin{figure}\textbf{SOURCE:}
\begin{eqnarray*}
e & \equiv & x \verb$ [[$ e_{\m...
...expressions in the source program.} \\
\end{array}\end{displaymath}\end{figure}



Bryan Carpenter 2003-04-15