Copyright | (c) Galois Inc 2015 |
---|---|
License | BSD3 |
Maintainer | Tristan Ravitch <tristan@galois.com> |
Stability | provisional |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Lang.Crucible.Analysis.Fixpoint.Components
Contents
Description
Compute a weak topological ordering over a control flow graph using Bourdoncle's algorithm (See Note [Bourdoncle Components]).
Synopsis
- weakTopologicalOrdering :: Ord n => (n -> [n]) -> n -> [WTOComponent n]
- data WTOComponent n
- data SCC n = SCCData {
- wtoHead :: n
- wtoComps :: [WTOComponent n]
- parentWTOComponent :: Ord n => [WTOComponent n] -> Map n n
- cfgWeakTopologicalOrdering :: CFG ext blocks init ret -> [WTOComponent (Some (BlockID blocks))]
- cfgSuccessors :: CFG ext blocks init ret -> Some (BlockID blocks) -> [Some (BlockID blocks)]
- cfgStart :: CFG ext blocks init ret -> Some (BlockID blocks)
Documentation
weakTopologicalOrdering :: Ord n => (n -> [n]) -> n -> [WTOComponent n] Source #
Compute a weak topological ordering over a control flow graph.
Weak topological orderings provide an efficient iteration order for chaotic iterations in abstract interpretation and dataflow analysis.
data WTOComponent n Source #
Instances
Constructors
SCCData | |
Fields
|
Instances
Foldable SCC Source # | |
Defined in Lang.Crucible.Analysis.Fixpoint.Components Methods fold :: Monoid m => SCC m -> m # foldMap :: Monoid m => (a -> m) -> SCC a -> m # foldMap' :: Monoid m => (a -> m) -> SCC a -> m # foldr :: (a -> b -> b) -> b -> SCC a -> b # foldr' :: (a -> b -> b) -> b -> SCC a -> b # foldl :: (b -> a -> b) -> b -> SCC a -> b # foldl' :: (b -> a -> b) -> b -> SCC a -> b # foldr1 :: (a -> a -> a) -> SCC a -> a # foldl1 :: (a -> a -> a) -> SCC a -> a # elem :: Eq a => a -> SCC a -> Bool # maximum :: Ord a => SCC a -> a # | |
Traversable SCC Source # | |
Functor SCC Source # | |
Show n => Show (SCC n) Source # | |
parentWTOComponent :: Ord n => [WTOComponent n] -> Map n n Source #
Construct a map from each vertex to the head of its parent WTO component. In particular, the head of a component is not in the map. The vertices that are not in any component are not in the map.
Special cases
cfgWeakTopologicalOrdering :: CFG ext blocks init ret -> [WTOComponent (Some (BlockID blocks))] Source #
Compute a weak topological order for the CFG.
cfgSuccessors :: CFG ext blocks init ret -> Some (BlockID blocks) -> [Some (BlockID blocks)] Source #
Useful for creating a first argument to weakTopologicalOrdering
. See
also cfgWeakTopologicalOrdering
.
cfgStart :: CFG ext blocks init ret -> Some (BlockID blocks) Source #
Useful for creating a second argument to weakTopologicalOrdering
. See
also cfgWeakTopologicalOrdering
.