Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Data.CFG
Synopsis
- data CFG = CFG {
- cfg_blocks :: IntMap [Int]
- cfg_edges :: IntMap IntSet
- cfg_addr_to_blockID :: IntMap Int
- cfg_fresh :: Int
- cfg_instrs :: IntMap [Instruction]
- num_of_instructions :: CFG -> Int
- init_cfg :: Integral a => a -> CFG
- is_end_node :: CFG -> Int -> Bool
- post :: CFG -> Int -> IntSet
- fetch_block :: CFG -> Int -> [Instruction]
Documentation
A control flow graph with blocks and edges.
A blockID (represented as an Int
) is a unique identifier of a basic block.
We store basic blocks twice: once as addresses, and once as instructions.
Constructors
CFG | |
Fields
|
Instances
Generic CFG Source # | |
Show CFG Source # | |
Serialize CFG Source # | |
NFData CFG Source # | |
IntGraph CFG Source # | |
Defined in WithAbstractPredicates.ControlFlow | |
Eq CFG Source # | |
type Rep CFG Source # | |
Defined in Data.CFG type Rep CFG = D1 ('MetaData "CFG" "Data.CFG" "foxdec-0.1.0.0-DGuc5MMkhbvOBLAebyTd5" 'False) (C1 ('MetaCons "CFG" 'PrefixI 'True) ((S1 ('MetaSel ('Just "cfg_blocks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IntMap [Int])) :*: S1 ('MetaSel ('Just "cfg_edges") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IntMap IntSet))) :*: (S1 ('MetaSel ('Just "cfg_addr_to_blockID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IntMap Int)) :*: (S1 ('MetaSel ('Just "cfg_fresh") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "cfg_instrs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IntMap [Instruction])))))) |
num_of_instructions :: CFG -> Int Source #
Returns true if the given blockID is a leaf-node in the given CFG.
Arguments
:: CFG | The CFG |
-> Int | The blockID |
-> [Instruction] |
Fetching an instruction list given a block ID