Cross-compilation support for Scala 3 (WIP)
Created by: gsps
This is a WIP branch to track the progress on making inox cross-compile on Scala 2 and Scala 3. So far, we can compile and manually run inox on test cases using the CLI and Z3.
The remaining tasks roughly comprise:
-
Fix the sbt build to support cross-compilation out of the box (currently fixed to dotc). -
Reactivate TipDebugger
and the core methods ofTimeoutSolver
(blocked by dotc bug aroundabstract override
). -
Reactivate Variable#copy
(blocked by dotc bug that raises denotation merge error). The synthetic copy method is still there, but doesn't preserve positions now. -
Reactivate BagEncoder
andSetEncoder
(blocked by dotc bug on vararg applications). As a result we can also fix up CVC4 and reactivate its code. -
Fix up Princess. -
Ideally, make some of the test suite work on dotc (scalatest is currently unavailable, since it relies on macros). -
Reactivate @inline
s, dotc's inliner just causes too much trouble at the moment.
This PR includes workarounds for several other dotc issues and also some fixes for things that are presumably (non-serious) bugs in inox.
We track the related dotc issues here:
-
https://github.com/lampepfl/dotty/issues/4520 Surprising synthesized _$n
selectors on case classes -
https://github.com/lampepfl/dotty/issues/4558 Missing adaptation from by-name to result type -
https://github.com/lampepfl/dotty/issues/4559 Unintended mixin initializer for overriden lazy val -
https://github.com/lampepfl/dotty/issues/4563 Erasure tries to box call to label def -
https://github.com/lampepfl/dotty/issues/4564 Overriding copy
of case class results in unhelpful error messages -
#??? https://github.com/epfl-lara/inox/pull/71/commits/8f50d7bf18b4a116b9bce1e9e6023c92f3c04b2a -
#??? https://github.com/epfl-lara/inox/pull/71/commits/96ccf5cfdba111f385e63bf60c105be6549ca0a3 -
#??? https://github.com/epfl-lara/inox/pull/71/commits/210295d58bfcb953ceb27175a156d16f4b3420ce -
#??? https://github.com/epfl-lara/inox/pull/71/commits/d8ca991c541bc6ed02a79a59caff01aa2e444637 -
#??? https://github.com/epfl-lara/inox/pull/71/commits/8450be02f8ef5b9311bd25d3b4b8f930e1d16feb -
#??? https://github.com/epfl-lara/inox/pull/71/commits/ea03b0679145b499c9558150d55a39d532112948