[Swift-user] Re: [Swift-devel] Problem with iterate

Mihael Hategan hategan at mcs.anl.gov
Thu Feb 18 11:04:49 CST 2010


On Thu, 2010-02-18 at 08:46 +0000, Ben Clifford wrote:
> > Why was that flag 
> > set to "not partial writer"?
> 
> I think that was a bug rather than some deep reason.
> 
> > How did iterate ever work? What am I missing?
> 
> I think it may have only ever worked in the initialise-in-nested-if case
> (or fairly trivial test cases which don't run into this problem)
> 
> > Ideas?
> 
> I'm split between two minds:
> 
>  a) more static and runtime analysis can lead to some (informally 
>     provable?) correct behaviour here. It think it might be possible to at 
>     least detect deadlocks caused by this and more elegantly error out, by 
>     finding cycles in a graph of who is waiting for what, which is a 
>     better user experience than a deadlock (as in, you can type the 
>     deadlock message into google and get the beautiful documentation page 
>     all about resolving such problems)
> 
>  b) that having multiple writer arrays and foreach/iterate control 
>     structures in their present for are (informally provably?) inherently 
>     deadlock prone and no matter what is done, it will always be possible 
>     to contrive a deadlock; and so then to have a "correct" system, those 
>     structures need to fundamentally change.

I'm unsure. I have a feeling that static dealdock detection is
undecidable in swift. I need to think some more about that.

> 
> Even if b is the case, it might be that problems are sufficiently obscure 
> that it doesn't matter from the "lets run a bazillion protein folds" 
> perspective.
> 

Right. Which is what we've been doing so far.




More information about the Swift-user mailing list