6565 Mika Nystr\" om \\
6666 Neuromorphic Computing Laboratory \\
6767Intel Corporation}
68- \date {Version 0.0 \\
68+ \date {DRAFT Version 0.1 \\
6969\today }
7070
7171\begin {document }
@@ -585,6 +585,14 @@ \section{Acknowledgments}
585585borrowed from the Asynchronous Circuit Toolkit (ACT) of Rajit
586586Manohar's group at Yale.
587587
588+ Thanks are due to Andrew Lines, and Rajit Manohar for reviewing the
589+ early versions of the manuscript, and to Paul Katz, who suggested a
590+ multitude of changes to make the report more accessible to those with
591+ less prior exposure to CSP. Harry Liu helped at every turn by
592+ answering every possible and some impossible questions about the
593+ language.
594+
595+
588596\chapter {Language Definition }
589597% ========================================
590598% DEFINITIONS
@@ -758,7 +766,8 @@ \subsection{Array types}\label{sec:array-types}
758766its elements; the shape of a non-array is the empty sequence.
759767The {\em layout\/ } of a multi-dimensional array is the sequence of
760768its lengths and starting indexes in each dimension; the layout of a non-array
761- is the empty sequence.
769+ is the empty sequence. The {\em rank\/ } of a multi-dimensional array
770+ is the number of indexes of the array.
762771
763772All arrays are {\em fixed\/ } in CSP, meaning that the layout of every array is
764773determined before program startup.
@@ -927,8 +936,11 @@ \section{Functions}
927936
928937\item \verb !Name ! is an identifier that names the parameter.
929938
930- \item \verb !Layout ! specifies the array layout for an array parameter; if it is
931- omitted, the parameter is scalar.
939+ \item \verb !Layout ! specifies the array layout for an array parameter;
940+ if it is omitted, the parameter is scalar. If the layout is
941+ specified, only the rank is significant. That is, the starting and
942+ ending indexes of each dimension are ignored, and the actual layout of
943+ the array is copied from the caller.
932944
933945\item \verb !Initial ! specifies the initial value of a scalar parameter whose mode is \verb !+ !. \verb != Initial ! can be omitted.
934946\end {itemize }
@@ -1163,7 +1175,7 @@ \subsection{Function call}\label{sec:funccall}
11631175left-to-right,
11641176\begin {itemize }
11651177
1166- \item the formal parameters are assigned (the prolog)
1178+ \item the formal parameters are declared (at which time the layout of any array parameter is copied from the caller) and assigned (the prolog)
11671179
11681180\item the body of the procedure is executed
11691181
@@ -1629,12 +1641,17 @@ \subsubsection{Bit access}
16291641\begin {Verbatim }[samepage=true]
16301642 e { Range }
16311643\end {Verbatim }
1632- where \verb !Range ! is a range \verb !Hi : Lo ! where \verb !Hi ! and \verb !Lo !
1633- are of type \verb !int !, or a single number \verb !k !, which is interpreted as
1634- \verb !k : k !. If the range is empty (that is, if $ \verb !Hi! < \verb !Lo!$ ) then, the value of the expression is zero.
1635- The bit-access expression is a designator if \verb !e ! is a designator; it is
1636- a writable designator if \verb !e ! is a writable designator. The type of
1637- \verb !e { Range } ! is \verb !uint(Hi - Lo + 1) !.
1644+ where \verb !Range ! is a range \verb !Hi : Lo ! where \verb !Hi ! and
1645+ \verb !Lo ! are of type \verb !int !, or a single number \verb !k !, which
1646+ is interpreted as \verb !k : k !. If the range is empty (that is, if
1647+ $ \verb !Hi! < \verb !Lo!$ ) then, the value of the expression is zero.
1648+ The bit-access expression is a designator if \verb !e ! is a designator;
1649+ it is a writable designator if \verb !e ! is a writable designator. The
1650+ type of \verb !e { Range } ! is \verb !uint(Hi - Lo + 1) !. The value of
1651+ \verb !e {Range } ! is the referenced bits of the two's-complement
1652+ representation of \verb !e !. In particular, the high-order bits of a
1653+ positive \verb !e ! will be zero, whereas the high-order bits of a
1654+ negative \verb !e ! will be one.
16381655
16391656
16401657\subsubsection {Array access }
@@ -1665,6 +1682,9 @@ \subsubsection{Array access}
16651682declare arrays: this implies that `` partial array slices'' are not
16661683available in CSP.
16671684
1685+ It is a checked runtime error to activate the access of an array outside of
1686+ the declared bounds of the array, but it is not a static error to do so.
1687+
16681688\subsubsection {Struct field access }\label {sec:struct-field-access }
16691689If \verb !e ! is a struct, the expression
16701690\begin {Verbatim }[samepage=true]
@@ -1673,7 +1693,7 @@ \subsubsection{Struct field access}\label{sec:struct-field-access}
16731693where \verb !Field ! names a field of the structure type of \verb !e !, denotes
16741694the value of the corresponding field. The struct-access expression is a designator if \verb !e ! is a designator; it is
16751695a writable designator if \verb !e ! is a writable designator. The type of
1676- \verb ! e :: Field ! is the declared type of the field.
1696+ \verb ! e :: Field ! is the declared type of the field.
16771697
16781698
16791699\subsection {Arithmetic and string operators }
0 commit comments