-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Milestone
Description
As mentioned in #42, in runEqualitySaturation, we seemingly stop after 30 iterations.
This both seems ad-hoc and would be useful if it were configurable, so users could iteratively experiment running a few iterations of rewrites and observing it afterwards without reaching saturation.
I was thinking we could implement this by adding a method "maxRewriteIterations" to the Scheduler class. We try reaching saturation up to maxRewriteIterations and there we simply exit.
Then, we could have some datatype + instance like
newtype WithMaxIterations (n :: Nat) a = WithMaxIterations a
instance (KnownNat a, Scheduler a) => Scheduler n a where
maxIterations (WithMaxIterations @n) = natVal (Proxy @n)
-- for other methods delegate to `Scheduler a`
From a user perspective, to run N iterations of equality saturation you'd now have:
- runEqualitySaturation defaultBackoffScheduler <rewrites>
+ runEqualitySaturation (WithMaxIterations @5 defaultBackoffScheduler) <rewrites>Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed