[m-rev.] for review: warn about unneeded initial and final state vars
Peter Wang
novalazy at gmail.com
Wed May 21 13:05:40 AEST 2025
On Tue, 20 May 2025 17:13:42 +1000 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> This means that this code cannot base its decisions on the answers
> to questions such as "what is the mode of this argument"; it has to
> fall back to questions "what are the *possible* modes of this argument".
> In this case, I think that still works. We could add a heuristic that says
> "do not generate an unneeded final statevar warning if either the initial
> or the final inst of the argument represented by that final statevar,
> in *any* of the declared modes of the predicate, involve either
> uniqueness, or its converse, being clobbered".
>
> Would that work to shut up the unwanted warnings for the cases
> you have seen? And can you think of any other heuristic that would help
> in other cases of false positives?
That would work. I can't think of anything else right now.
Peter
More information about the reviews
mailing list