Skip to content

Commit d4d2816

Browse files
authored
Merge pull request #822 from viperproject/meilers_mce_definite_alias_fix
Only considering definite aliases with non-zero permission
2 parents 6e97ee0 + 6612ddb commit d4d2816

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/main/scala/rules/MoreCompleteExhaleSupporter.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ object moreCompleteExhaleSupporter extends SymbolicExecutionRules {
8787
case None =>
8888
// We have not yet checked for a definite alias
8989
val id = ChunkIdentifier(resource, s.program)
90-
chunkSupporter.findChunk[NonQuantifiedChunk](relevantChunks, id, args, v).map(_.snap)
90+
val potentialAlias = chunkSupporter.findChunk[NonQuantifiedChunk](relevantChunks, id, args, v)
91+
potentialAlias.filter(c => v.decider.check(IsPositive(c.perm), Verifier.config.checkTimeout())).map(_.snap)
9192
case Some(v) =>
9293
// We have checked for a definite alias and may or may not have found one.
9394
v
@@ -253,7 +254,9 @@ object moreCompleteExhaleSupporter extends SymbolicExecutionRules {
253254
val newChunks = ListBuffer[NonQuantifiedChunk]()
254255
var moreNeeded = true
255256

256-
val definiteAlias = chunkSupporter.findChunk[NonQuantifiedChunk](relevantChunks, id, args, v)
257+
val definiteAlias = chunkSupporter.findChunk[NonQuantifiedChunk](relevantChunks, id, args, v).filter(c =>
258+
v.decider.check(IsPositive(c.perm), Verifier.config.checkTimeout())
259+
)
257260

258261
val sortFunction: (NonQuantifiedChunk, NonQuantifiedChunk) => Boolean = (ch1, ch2) => {
259262
// The definitive alias and syntactic aliases should get priority, since it is always

0 commit comments

Comments
 (0)