Quantcast
Channel: Dafny: An Automatic Program Verifier for Functional Correctness
Viewing all articles
Browse latest Browse all 1106

Commented Unassigned: Feature request: Auto-triggers on forall statements [103]

$
0
0
Dafny's new auto-trigger feature is quite useful, but it leaves out a useful case: forall statements. In the attached file, no trigger is generated for the forall statement, even though there's a fairly obvious trigger (IsLessThanSuccessor(i)).

It would be nice if the auto-trigger feature could also work on forall statements. I had a more complicated instance in real code where a lemma's verification was timing out with no explanation as to why, and it was only via the axiom profiler that I learned it was due to a forall statement with no triggers.

predicate IsLessThanSuccesor(i:int)
{
i < i + 1
}

lemma LemmaWithoutTriggerOnForallStatement()
{
forall i
ensures IsLessThanSuccesor(i);
{
}
}

Comments: Sorry for the delay; indeed, this wasn't implemented because the generation happens too late in the pipeline. I too think it would be good to move it to the resolver (in fact to a rewriting pass).

Viewing all articles
Browse latest Browse all 1106

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>