You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, all statements do not support output patterns which depend both on the current grid state and the match position. The reason for this is that either the output patterns are computed just once each (so they must be valid for all match positions) or they are computed in the loop which applies rewrites (so the grid state may be different to the one for which they should be evaluated). The best solution is probably to allow a separate "write buffer" for the grid, so that the old grid state is still available.
Another possible solution, avoiding the extra buffer, is to defer the call to gridN_update until all writes are done - expressions which depend on the grid state don't depend on it directly, rather they depend on things derived from the grid state which, because gridN_update has not been called yet, will still represent the correct state for those expressions to be evaluated from.
That said, this may require calling gridN_update on a much larger area than necessary, if there are only a small number of rewrites, so it could be much slower; and there are probably other situations where the extra buffer is needed (so maybe the buffer will exist anyway).
Currently,
all
statements do not support output patterns which depend both on the current grid state and the match position. The reason for this is that either the output patterns are computed just once each (so they must be valid for all match positions) or they are computed in the loop which applies rewrites (so the grid state may be different to the one for which they should be evaluated). The best solution is probably to allow a separate "write buffer" for the grid, so that the old grid state is still available.Minimal example (playground link):
The text was updated successfully, but these errors were encountered: