Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/scala/rules/QuantifiedChunkSupport.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ object quantifiedChunkSupporter extends QuantifiedChunkSupport {
codomainQVars,
relevantChunks,
v1,
optSmDomainDefinitionCondition = if (s2.smDomainNeeded) Some(True) else None,
optSmDomainDefinitionCondition = None,
optQVarsInstantiations = Some(arguments))
val permsTaken = result match {
case Complete() => rPerm
Expand Down Expand Up @@ -1332,7 +1332,7 @@ object quantifiedChunkSupporter extends QuantifiedChunkSupport {
resource = resource,
codomainQVars = codomainQVars,
relevantChunks = relevantChunks,
optSmDomainDefinitionCondition = if (s1.smDomainNeeded) Some(True) else None,
optSmDomainDefinitionCondition = None,
optQVarsInstantiations = Some(arguments),
v = v)
val s2 = s1.copy(functionRecorder = s1.functionRecorder.recordFvfAndDomain(smDef1),
Expand Down
5 changes: 4 additions & 1 deletion src/main/scala/state/SnapshotMapCache.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ case class SnapshotMapCache private (
: Option[SnapshotMapCache.Value] = {

cache.get(key) match {
case Some((smDef, totalPermissions, `optSmDomainDefinitionCondition`)) =>
case Some((smDef, totalPermissions, cachedSmDomainDefinitionCondition))
if cachedSmDomainDefinitionCondition == optSmDomainDefinitionCondition || // defined under the same condition
(cachedSmDomainDefinitionCondition.contains(terms.True) && optSmDomainDefinitionCondition.isEmpty) // cached is always defined and we don't need a domain
=>
Some((smDef, totalPermissions))

case _ =>
Expand Down