Skip to content

Commit

Permalink
Fix purification of exhale
Browse files Browse the repository at this point in the history
  • Loading branch information
fpoli committed Oct 24, 2023
1 parent cd66caf commit 78d6047
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions prusti-common/src/vir/optimizations/methods/purifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,19 @@ impl ast::StmtWalker for VarCollector {
}
self.is_pure_context = old_pure_context;
}
fn walk_exhale(
&mut self,
ast::Exhale {
expr,
..
}: &ast::Exhale,
) {
// When a field is fully exhaled, the purified encoding should havoc the purified variable.
// This pass currently does not generate such havoc statement, which is why we mark the
// variables used in an havoc as non-purifiable.
// See: https://github.com/viperproject/prusti-dev/pull/1464
self.walk_expr(expr);
}
}

struct VarPurifier {
Expand Down

0 comments on commit 78d6047

Please sign in to comment.