[Swift-commit] r3366 - text/parco10submission

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Tue Jun 15 16:27:52 CDT 2010


Author: wozniak
Date: 2010-06-15 16:27:52 -0500 (Tue, 15 Jun 2010)
New Revision: 3366

Modified:
   text/parco10submission/paper.tex
Log:
New mappers table


Modified: text/parco10submission/paper.tex
===================================================================
--- text/parco10submission/paper.tex	2010-06-15 20:44:14 UTC (rev 3365)
+++ text/parco10submission/paper.tex	2010-06-15 21:27:52 UTC (rev 3366)
@@ -103,16 +103,11 @@
 component programs on grids and other parallel platforms, providing
 automated site selection, data management, and reliability.
 
-% TODO: DECIDE: Drop SwiftScript, use Swift throughout to refer to the language?
-
 This paper goes into greater depth than prior publications
 \cite{SWIFTSWF08,SWIFTNNN} in describing the Swift language, how its
 implementation handles large-scale and distributed execution
 environments, and its contribution to distributed parallel computing.
 
-%TODO: Provide a compelling example here, perhaps with
-% a code segment, of the power of Swift, in a single paragraph.
-
 \subsection{Rationale}
 
 The emergence of large-scale production computing infrastructure such
@@ -208,7 +203,6 @@
 
 \subsection{Language basics}
 
-
 A Swift script describes data, application components, invocations
 of applications components, and the inter-relations (data flow)
 between those invocations, using a C-like syntax.
@@ -385,19 +379,16 @@
 
 In this fragment, execution of procedures \verb|p| and \verb|q| can
 happen in parallel:
-
- \begin{verbatim}
+\begin{verbatim}
  y=p(x);
  z=q(x);
- \end{verbatim}
-
+\end{verbatim}
 whilst in this fragment, execution is serialised by the variable
 \verb|y|, with procedure \verb|p| executing before \verb|q|:
-
- \begin{verbatim}
+\begin{verbatim}
  y=p(x);
  z=q(y);
- \end{verbatim}
+\end{verbatim}
 
 Arrays in SwiftScript are more generally
 \emph{monotonic}\cite{MONOTONICPHD}; that is, knowledge about the
@@ -411,8 +402,8 @@
 elements of an array as they become known. It will not wait until the
 array is closed.
 
-Consider this script:
- \begin{verbatim}
+Consider the script below:
+\begin{verbatim}
  file a[];
  file b[];
  foreach v,i in a {
@@ -420,8 +411,7 @@
  }
  a[0] = r();
  a[1] = s();
- \end{verbatim}
-
+\end{verbatim}
 Initially, the \verb|foreach| statement will have nothing to execute,
 as the array \verb|a| has not been assigned any values. The procedures
 \verb|r| and \verb|s| will execute. As soon as either of them is
@@ -472,8 +462,6 @@
 compound procedure \verb|A| does not have to have fully completed
 for its return values to be used by subsequent statements.
 
-TODO: talk about anonymous mapping somewhere - a mappers section...
-
 \subsection{More about types}
 \label{LanguageTypes}
 
@@ -559,24 +547,70 @@
 populateDatabase will always be run before analyseDatabase.
 
 \subsection{Swift mappers}
-Swift contains a number of built-in mappers. A representative sample
-of these is listed in table \ref{mappertable}.
 
-\begin{table}[htb]
-\begin{tabular}{|r|p{2in}|}
-\hline
-\verb|single_file_mapper| & maps a single explicitly named file \\
-\hline
-\verb|filesys_mapper| & maps files matching a pattern into an array \\
-\hline
-\verb|simple_mapper| & maps files to arbitrarily nested data types based on
-                components of the file name \\
-\hline
-\end{tabular}
-\caption{SwiftScript built-in mappers}
-\label{mappertable}
+The Swift programmer manipulate in-memory variables which are
+\emph{mapped} to files in the filesystem. This is coordinated by an
+extensible set of components called \emph{mappers}. Swift contains a
+number of built-in mappers. A representative sample of these is listed
+in Table~\ref{mappertable}.
+
+\begin{table}[t]
+  \begin{center}
+    \begin{tabular}{|l|p{3.5cm}|p{5cm}|}
+      \hline
+          {\bf Mapper name } &
+          {\bf Description} &
+          {\bf Example} \\\hline
+          \verb|single_file_mapper| &
+          maps single named file \vspace{5mm}&
+          \begin{minipage}{5cm}
+            \vspace{2mm}
+            \begin{center}
+              {\tt file f<"data.txt">;} \\
+              --- \\
+              $f \rightarrow {\tt file.txt}$
+              \vspace{2mm}
+            \end{center}
+          \end{minipage}
+          \\
+          \hline
+          \verb|filesys_mapper| &
+           maps directory contents into an array \vspace{5mm} &
+          \begin{minipage}{5cm}
+            \vspace{2mm}
+            \begin{center}
+              {\tt file f<filesys\_mapper;} \\
+              {\tt \ \ \ \ \ \ \ "file*.txt">;} \\
+              --- \\
+              $f_0 \rightarrow {\tt file2.txt}$
+            \end{center}
+          \end{minipage}
+          \\
+          \hline
+          \verb|simple_mapper| &
+          maps components of the variable name \vspace{5mm} &
+          \begin{minipage}{5cm}
+            \vspace{2mm}
+            \begin{center}
+              {\tt file f<simple\_mapper;} \\
+              {\tt \ \ \ \ \ \ \ "file.*.txt">;} \\
+              --- \\
+              $f.\textrm{red} \rightarrow {\tt file.red.txt}$
+            \end{center}
+          \end{minipage}
+          \\
+          \hline
+    \end{tabular}
+  \end{center}
+  \caption{SwiftScript built-in mappers: conceptual syntax}
+  \label{mappertable}
 \end{table}
 
+Mappers essentially define a function that translates a given variable
+name into a filename. Thus, a single mapper object, connected to a
+structured Swift variable, can represent a large, structured data
+set.
+
 \subsection{The execution environment for component programs}
 \label{LanguageEnvironment}
 




More information about the Swift-commit mailing list