diff --git a/src/EvalGraph.purs b/src/EvalGraph.purs index 06ef0bcaa..8886da40c 100644 --- a/src/EvalGraph.purs +++ b/src/EvalGraph.purs @@ -16,7 +16,7 @@ import Control.Monad.Error.Class (class MonadError) import Data.Array (range, singleton) as A import Data.Either (Either(..)) import Data.Exists (runExists) -import Data.List (List(..), (:), length, snoc, unzip, zip) +import Data.List (List(..), length, snoc, unzip, zip, (:)) import Data.Set (Set, empty, insert, intersection, singleton, union) import Data.Set as S import Data.Traversable (sequence, traverse) @@ -201,6 +201,6 @@ graphGC gconfig@{ g, n, γα } e = do (g' × _) × eα × vα <- evalWithConfig { g, n, γα } e let fwd αs = G.vertices (fwdSlice αs g') `intersection` vertices vα - -- TODO: (vertices eα `union` vertices γα) rather than sinks g' + -- TODO: want (vertices eα `union` foldMap vertices γα) rather than sinks g' here? bwd αs = G.vertices (bwdSlice αs g') `intersection` sinks g' pure { gconfig, eα, g: g', vα, fwd, bwd } diff --git a/src/Graph/Slice.purs b/src/Graph/Slice.purs index 601776e0c..24f3eb95a 100644 --- a/src/Graph/Slice.purs +++ b/src/Graph/Slice.purs @@ -27,6 +27,7 @@ bwdSlice αs0 g0 = fst $ runWithGraph $ tailRecM go (empty × L.fromFoldable αs extend α βs pure $ Loop ((visited # insert α) × (L.fromFoldable βs <> αs)) +-- Doesn't do the final negation. fwdSliceDeMorgan :: forall g. Graph g => Set Vertex -> g -> g fwdSliceDeMorgan αs_0 g_0 = bwdSlice (sinks g_0 `difference` αs_0) (op g_0)