From 0dc48a067202f9bc0469bb8bfc991673713712f1 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 21 Dec 2017 16:44:34 -0500 Subject: [PATCH] Rewrite the docs for converge. --- src/Analysis/Abstract/Caching.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Analysis/Abstract/Caching.hs b/src/Analysis/Abstract/Caching.hs index be6b51d95..c2c392d51 100644 --- a/src/Analysis/Abstract/Caching.hs +++ b/src/Analysis/Abstract/Caching.hs @@ -126,11 +126,9 @@ getConfiguration term = Configuration term <$> askRoots <*> askEnv <*> getStore scatter :: (Alternative m, Foldable t, MonadStore a m) => t (a, Store (LocationFor a) a) -> m a scatter = getAlt . foldMap (\ (value, store') -> Alt (putStore store' *> pure value)) --- | Compute the Kleene fixed-point theorem in a monadic context. +-- | Iterate a monadic action starting from some initial seed until the results converge. -- --- Repeatedly runs a monadic action starting from some initial seed and coinductively recurring until the action’s results converge. --- --- cf https://en.wikipedia.org/wiki/Kleene_fixed-point_theorem +-- This applies the Kleene fixed-point theorem to finitize a monotone action. cf https://en.wikipedia.org/wiki/Kleene_fixed-point_theorem converge :: (Eq a, Monad m) => (a -> m a) -- ^ A monadic action to perform at each iteration, starting from the result of the previous iteration or from the seed value for the first iteration. -> a -- ^ An initial seed value to iterate from.