[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlaplus] Sets and arrays

I'd like to just add that sets are very natural in describing algorithms :-)
-- given a set e of edges and a set s of vertices, compute
-- set r of vertices reachable from vertices in s following edges in e:
r := s
while exists v in {v: (u,v) in e, u in r, v not in r}:
r := r + {v}
Hi Annie,
it's sure it is more synthetic.
I think Stephan has the answer below. In standard use sets, and if needed because your language
is low level, refine. That's what I will do.