[Swift-devel] more data-ordered execution

Mihael Hategan hategan at mcs.anl.gov
Thu Oct 30 20:55:24 CDT 2008


On Fri, 2008-10-31 at 00:34 +0000, Ben Clifford wrote:
[...]
> I done some work to fix that, though I'm still a little hazy on what the 
> correct semantics should be for complex data structures involving files.

Right. That seems to always have caused problems when we thought about
it. However, and I think what you say below expresses this fairly well,
the correct model is something on the following lines:

A Swift variable is a mapper, value tuple:
V = (M, X)

where both M and X are futures. The current model, only treats X as
future, but not M (hence the need to deal with M in a different way).

A declaration should not bind either M or X. Instead V.M =
SomeMapperInstance(parameters*) and V.X should happen concurrently
(whereas only V.X does at present).

[...]
> 
> For mapper parameters, I make a variable for each mapper parameter, which 
> is then initialized (as with any variable now) in proper data-dependant 
> order; and modify data node handling so that mappers are not initialized 
> until all their parameter variables are closed.

Right. You can think of a mapper as a function of parameters of which
all can be futures. In principle, this is a generalized function with
futures as arguments, which only fully evaluates when all (required)
parameters are bound.

>  This is perhaps not the 
> most efficient way to do things - at the moment I'm interested in getting 
> correct behaviour rather than efficiency.




More information about the Swift-devel mailing list