[Swift-commit] r3908 - text/parco10submission
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Sat Jan 8 16:45:15 CST 2011
Author: foster
Date: 2011-01-08 16:45:14 -0600 (Sat, 08 Jan 2011)
New Revision: 3908
Modified:
text/parco10submission/paper.tex
Log:
Various minor edits
Modified: text/parco10submission/paper.tex
===================================================================
--- text/parco10submission/paper.tex 2011-01-08 22:42:43 UTC (rev 3907)
+++ text/parco10submission/paper.tex 2011-01-08 22:45:14 UTC (rev 3908)
@@ -247,10 +247,10 @@
The remainder of this paper is organized as follows.
%Section~\ref{Rationale} explains the motivation for the Swift programming model.
-In Section~\ref{Language}, we present the major concepts and language
-structure of Swift. Section~\ref{Execution} provides details of the
+In Section~\ref{Language}, we present major concepts and language
+structures. Section~\ref{Execution} details the Swift
implementation, including the distributed architecture that enables
-Swift applications to run on distributed resources.
+applications to run on distributed resources.
Section~\ref{Applications} describes real-world applications using
Swift on scientific projects. Section~\ref{Related} relates Swift to
other systems. Section~\ref{Future} highlights
@@ -373,7 +373,7 @@
pipelines (or more generally, graphs) of sub-functions.
Unlike most other scripting languages, Swift expresses
-invocations of ``ordinary programs''--technically, POSIX {\tt exec()}
+invocations of ordinary programs--technically, POSIX {\tt exec()}
operations--in a manner that explicitly declares the files and command-line
arguments that are the inputs of each program
invocation. Swift scripts similarly declare all output files that results from program invocations.
@@ -385,45 +385,34 @@
The Swift parallel execution model is based on two concepts that are applied uniformly throughout the language. First, every Swift data element behaves like a \emph{future}. By ``data element'', we mean both the named variables within a function's environment, such as its local variables, parameters, and returns, and the individual elements of array and structure collections. Second, all expressions in a Swift program are conceptually executed in parallel. Expressions (including function evaluations) wait for input values when they are required, and then set their result values as their computation proceeds. These fundamental concepts of pervasive implicit parallelism and transparent location independence, along with natural manner in which Swift expresses the processing of files by applications as if they were ``in-memory'' objects, are the powerful aspects of Swift which make it unique among scripting tools. These aspects are elaborated in this section.
-\subsection{Data model}
+\subsection{Data model and types}
-%IAN: Hey, wait: surely we are mixing together different things when we talk about a queue of function invocations?? We are describing the implementation, it seems.
+Variables are used in Swift to name the local variables, arguments, and returns of a function.
+The outermost function in a Swift (akin to ``main'' in C) is only unique in that the variables in its environment
+can be declared ``global'' to make them accessible to every other function in the script.
-%IAN: I have a feeling that this text could be simplified.
+Each variable in a Swift script is declared to be of a specific (single) type. The Swift type model is simple, with no concepts of inheritance, abstraction, etc.
+There are three basic classes of data types: primitive, mapped, and collection.
-%IAN XX
-
-Every data object in Swift has a type that defines
-
-Every data object in Swift is built up from atomic data elements that contain three fields: a value, a state, and a queue of function invocations that are waiting for the value to be set.
-
-Variables are used in Swift to name the local variables, arguments, and returns of a function. Every Swift variable is assigned a concrete data type, based on a simple type model (with no concepts of inheritance, abstraction, etc). The outermost function in a Swift (akin to ``main'' in C) is only unique in that the variables in its environment can be declared ``global'' to make them accessible to every other function in the script.
-
-Swift data elements (atomic variables and array elements) are \emph{single-assignment}---
-they can be assigned at most one value during execution---and behave as futures.
-This semantic provides the
-basis for Swift's model of parallel function evaluation and chaining.
-While Swift collection types (arrays and structures) are not
-single-assignment, each of their elements is single-assignment.
-
-Each variable in a Swift script is declared to be of a specific (single) type.
-Swift provides three basic classes of data types:
-
-\emph{Primitive types} are provided for integer, float, string, and boolean values by the Swift runtime. Common operators are defined for
+\emph{Primitive types} are provided for integer, float, string, and boolean values. Common operators are defined for
primitive types, such as arithmetic, concatenation, and explicit conversion.
An additional primitive type ``external'' is provided for manual synchronization.
-\emph{Mapped types} are data elements that refer (through a process called``mapping'') to files external to the Swift script. These are the files that will be read and written by the external application programs called by Swift.
+\emph{Mapped types} are data elements that refer (through a process called``mapping'') to files external to the Swift script.
+These files can then be read and written by application programs called by Swift.
The mapping process can map single variables to single files, and structures and arrays to collections of files.
-Primitive and mapped types are called \emph{atomic types}.
\emph{Collection types} are \emph{arrays} and \emph{structures}.
Arrays contain values of only a single type; structure fields can be of any type. One
-array type is provided for every atomic type (integer, string, boolean, and mapped file).
+array type is provided for every scalar and mapped type.
Arrays use numeric indices, but are sparse.
-Both types of collections can contain members of atomic or collection types. Structures contain a finite number of elements. Arrays contain a varying number of elements. Structures and arrays can both recursively reference other structures and arrays in addition to atomic values. Arrays can be nested to provide multi-dimensional indexing.
+Both types of collections can contain members of primitive, mapped, or collection types;
+in particular, arrays can be nested to provide multi-dimensional indexing.
+Structures contain a declared number of elements. The number of elements in an array can be determined at run time.
-Due to the dynamic, highly parallel nature of Swift, its arrays have no notion of size. Array elements can be set as a script's execution progresses. The number of elements set increases monotonically. An array is considered ``closed'' when no further statements that set an element of the array can be executed. This state is recognized at run time by information obtained from compile-time analysis of the script's call graph.
+
+
+Due to the dynamic, parallel nature of Swift, its arrays have no notion of size. Array elements can be set as a script's execution progresses. The number of elements set increases monotonically. An array is considered ``closed'' when no further statements that set an element of the array can be executed. This state is recognized at run time by information obtained from compile-time analysis of the script's call graph.
%IAN: This last paragraph raises the issue of whether this state can always be determiend.
%Also, since all data elements have single-assignment semantics, no garbage collection issues arise. \katznote{does this follow? garbage collection removed variables that are no longer needed - I don't see how single assignment helps here.}
@@ -641,6 +630,16 @@
\subsection{Execution model: Implicit parallelism}
\label{ordering}
+Every data object in Swift is built up from atomic data elements that contain three fields: a value, a state, and a queue of function invocations that are waiting for the value to be set.
+
+Swift data elements (atomic variables and array elements) are \emph{single-assignment}---
+they can be assigned at most one value during execution---and behave as futures.
+This semantic provides the
+basis for Swift's model of parallel function evaluation and chaining.
+While Swift collection types (arrays and structures) are not
+single-assignment, each of their elements is single-assignment.
+
+
%\mikenote{Rename this as Parallelism model?; stress and show how highly parallel the model is - the idea that the workflow is fully expanded but throttled.}
We have described almost all of the Swift language. (Swift also provides conditional
More information about the Swift-commit
mailing list