1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-27 09:32:18 +03:00
juvix/test/Core/Transformation.hs
Łukasz Czajka 55374ec96a
Recursion unrolling for functions (#1912)
* Depends on PR #1909 
* Closes #1750 
* Adds recursion unrolling tests on JuvixCore
* Adds a version of the mid-square hash example without the recursion
manually unrolled

For now, the recursion is always unrolled to a fixed depth (140). In the
future, we want to add a global option to override this depth, as well
as a mechanism to specify it on a per-function basis. In a more distant
future, we might want to try deriving the unrolling depth heuristically
for each function.
2023-03-24 15:05:37 +01:00

20 lines
555 B
Haskell

module Core.Transformation where
import Base
import Core.Transformation.Identity qualified as Identity
import Core.Transformation.Lifting qualified as Lifting
import Core.Transformation.Pipeline qualified as Pipeline
import Core.Transformation.TopEtaExpand qualified as TopEtaExpand
import Core.Transformation.Unrolling qualified as Unrolling
allTests :: TestTree
allTests =
testGroup
"JuvixCore transformations"
[ Identity.allTests,
TopEtaExpand.allTests,
Lifting.allTests,
Pipeline.allTests,
Unrolling.allTests
]