When we have PageRank, our forall iterates over A, operating on v which is an element of A. Within the loop, we do a write to v's field, v.pr_write.
Technically, this is a write to A. Our current analysis does not see this when the forall is of the form forall v in A. However, if we were to modify the loop to look like forall i in A.domain { ref v = A[i]; } then our invalid modification check would trigger for the write to v.pr_write.
This has become an issue when attempting to change the graph data structure in PageRank to be an array-of-structs rather than a struct-of-arrays (NOTE: we are not currently doing this, but this issue is still worth looking at).
We can write to A under these specific conditions:
A stores records
the field we write to is NOT one of the fields we replicated. This is something we can infer by looking at the gFieldPositions map that we built up during pre-folding (assuming it is still valid in post-resolution).
This may get a bit messy but it shouldn't be too hard.
This is a kinda nasty thing to handle. For now, we simply allow writes to A if it stores records. We will come back to this when it seems appropriate to actually handle it correctly.
When we have PageRank, our
forall
iterates overA
, operating onv
which is an element ofA
. Within the loop, we do a write tov
's field,v.pr_write
.Technically, this is a write to
A
. Our current analysis does not see this when theforall
is of the formforall v in A
. However, if we were to modify the loop to look likeforall i in A.domain { ref v = A[i]; }
then our invalid modification check would trigger for the write tov.pr_write
.This has become an issue when attempting to change the graph data structure in PageRank to be an array-of-structs rather than a struct-of-arrays (NOTE: we are not currently doing this, but this issue is still worth looking at).
We can write to
A
under these specific conditions:A
stores recordsgFieldPositions
map that we built up during pre-folding (assuming it is still valid in post-resolution).This may get a bit messy but it shouldn't be too hard.