Dafny Encounters internal translation error for nested quantifier expressions when a subtitute is required #5250
Labels
during 2: compilation of correct program
Dafny rejects a valid program during compilation
kind: bug
Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label
part: verifier
Translation from Dafny to Boogie (translator)
priority: next
Will consider working on this after in progress work is done
Dafny version
4.5.0.0
Code to produce this issue
Command to run and resulting output
What happened?
In the forallExpr, dafny chooses
s[i]
as selected trigger, and it next tries to substitute s[i+1] with _t#0 when calling PostCyclicityResolve function (dafny/Source/DafnyCore/Resolver/ModuleResolver.cs
Line 179 in 480758f
Some comments regarding this approach is mentioned here:
dafny/Source/DafnyCore/Triggers/SplitPartTriggerWriter.cs
Line 73 in 480758f
This eventually calls to the Substitute function in ExprSubstituter class and instead of adding this variable to the forallExpr, it is added to the nested existsExpr and causes an error in boogie because of undeclared identifier in the forallExpr body.
What type of operating system are you experiencing the problem on?
Linux
The text was updated successfully, but these errors were encountered: