Skip to content

Commit

Permalink
AntiAliasing: restore var binding in mapApplication
Browse files Browse the repository at this point in the history
  • Loading branch information
mario-bucev committed Apr 22, 2024
1 parent c4b33d1 commit f75c49c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .larabot.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
commands = [
"sbt -batch -Dtestsuite-parallelism=5 test"
"sbt -batch -Dtestsuite-parallelism=3 -Dtestcase-parallelism=5 \"stainless-dotty / IntegrationTest / testOnly stainless.GhostRewriteSuite stainless.GenCSuite stainless.LibrarySuite stainless.verification.VerificationSuite stainless.verification.UncheckedSuite stainless.verification.TerminationVerificationSuite stainless.verification.ImperativeSuite stainless.verification.FullImperativeSuite stainless.verification.StrictArithmeticSuite stainless.termination.TerminationSuite stainless.evaluators.EvaluatorComponentTest\""
"sbt -batch -Dtestsuite-parallelism=3 -Dtestcase-parallelism=5 \"stainless-dotty / IntegrationTest / testOnly stainless.DottyExtractionSuite stainless.GhostRewriteSuite stainless.GenCSuite stainless.LibrarySuite stainless.verification.VerificationSuite stainless.verification.UncheckedSuite stainless.verification.TerminationVerificationSuite stainless.verification.ImperativeSuite stainless.verification.FullImperativeSuite stainless.verification.StrictArithmeticSuite stainless.termination.TerminationSuite stainless.evaluators.EvaluatorComponentTest\""
]

nightly {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,14 @@ class AntiAliasing(override val s: Trees)(override val t: s.type)(using override
}

val extractResults = Block(assgns, TupleSelect(freshRes.toVariable, 1))
Let(freshRes, nfi, extractResults)
// FIXME: This should be `Let` and not `LetVar`, however doing so will cause a crash in e.g. `MapAliasing1`
// because `getAllTargetsDealiased` in the `Let` case will result in an invalid target due to
// this function not supporting targets computation on function application *post-transformation*.
if (isMutableType(nfiType)) {
LetVar(freshRes, nfi, extractResults)
} else {
Let(freshRes, nfi, extractResults)
}
} else {
nfi
}
Expand Down

0 comments on commit f75c49c

Please sign in to comment.