There's been someone at Indiana working on semantics of monotonic variables, which is pretty much exactly what Ben described:<br>
<a href="http://www.cs.indiana.edu/~rrnewton/papers/2012-lambdapar-draft.pdf" target="_blank">http://www.cs.indiana.edu/~rrnewton/papers/2012-lambdapar-draft.pdf</a><br><br><div class="gmail_quote">On Sun, Mar 10, 2013 at 6:46 PM, Ben Clifford <span dir="ltr"><<a href="mailto:benc@hawaga.org.uk" target="_blank">benc@hawaga.org.uk</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br>
> Your example is a good one, in that it (and probably several others)<br>
> would be needed to understand the topic of array closing.  The current<br>
> Swift/T Guide says only "Arrays are part of Swift dataflow semantics. An<br>
> array is closed when all possible insertions to it are complete" but it<br>
> doesnt say how to understand that clause "...when all possible<br>
> insertions to it are complete", in particular what "all possible" means.<br>
> More examples are needed to understand it fully. Ideally, precise rules<br>
> and examples complement each other.<br>
<br>
</div>wrt this, one approach to array closing that I had before was regarding<br>
the state of the array as constrained to move on a directed graph of<br>
states until they reach an end state (the closed state) - that gives not<br>
really a state machine, but perhaps something a bit like it, onto which<br>
maybe you could say "this kind of Swift code moves an array into this<br>
state". I never wrote that more formally, and I don't think it lines up<br>
entirely with the way that Swift does things, but it might be interesting<br>
to pursue.<br>
<span><font color="#888888"><br>
--<br>
<br>
</font></span></blockquote></div><br>