datafix-0.0.0.2: Fixing data-flow problems

Copyright(c) Sebastian Graf 2018
LicenseISC
Maintainersgraf1337@gmail.com
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Datafix.Worklist.Graph

Description

Abstracts over the representation of the data-flow graph.

The contents of this module are more or less internal to the Datafix.Worklist implementation.

Synopsis

Documentation

data PointInfo domain Source #

The data associated with each point in the transfer function of a data-flow Node.

Constructors

PointInfo 

Fields

Instances

(Eq (ReturnType domain), Eq (IntArgsMonoSet (Products (ParamTypes domain)))) => Eq (PointInfo domain) Source # 

Methods

(==) :: PointInfo domain -> PointInfo domain -> Bool #

(/=) :: PointInfo domain -> PointInfo domain -> Bool #

(Show (ReturnType domain), Show (IntArgsMonoSet (Products (ParamTypes domain)))) => Show (PointInfo domain) Source # 

Methods

showsPrec :: Int -> PointInfo domain -> ShowS #

show :: PointInfo domain -> String #

showList :: [PointInfo domain] -> ShowS #

emptyPointInfo :: PointInfo domain Source #

The default PointInfo.

data Diff a Source #

Diff between two IntArgsMonoSets.

Constructors

Diff 

Fields

  • added :: !(IntArgsMonoSet a)
     
  • removed :: !(IntArgsMonoSet a)
     

computeDiff :: MonoMapKey k => IntArgsMonoSet k -> IntArgsMonoSet k -> Diff k Source #

Computes the diff between two IntArgsMonoSets.

class GraphRef (ref :: * -> *) where Source #

Abstracts over the concrete representation of the data-flow graph.

There are two instances: The default Ref for sparse graphs based on an IntMap and Ref for the dense case, storing the Node mapping in a IOVector.

Minimal complete definition

updatePoint, lookup, lookupLT

Methods

updatePoint :: MonoMapKey (Products (ParamTypes domain)) => Int -> Products (ParamTypes domain) -> ReturnType domain -> IntArgsMonoSet (Products (ParamTypes domain)) -> ReaderT (ref domain) IO (PointInfo domain) Source #

lookup :: MonoMapKey (Products (ParamTypes domain)) => Int -> Products (ParamTypes domain) -> ReaderT (ref domain) IO (Maybe (PointInfo domain)) Source #

lookupLT :: MonoMapKey (Products (ParamTypes domain)) => Int -> Products (ParamTypes domain) -> ReaderT (ref domain) IO [(Products (ParamTypes domain), PointInfo domain)] Source #

Instances

GraphRef Ref Source # 

Methods

updatePoint :: MonoMapKey (Products (ParamTypes domain)) => Int -> Products (ParamTypes domain) -> ReturnType domain -> IntArgsMonoSet (Products (ParamTypes domain)) -> ReaderT * (Ref domain) IO (PointInfo domain) Source #

lookup :: MonoMapKey (Products (ParamTypes domain)) => Int -> Products (ParamTypes domain) -> ReaderT * (Ref domain) IO (Maybe (PointInfo domain)) Source #

lookupLT :: MonoMapKey (Products (ParamTypes domain)) => Int -> Products (ParamTypes domain) -> ReaderT * (Ref domain) IO [(Products (ParamTypes domain), PointInfo domain)] Source #

GraphRef Ref Source # 

Methods

updatePoint :: MonoMapKey (Products (ParamTypes domain)) => Int -> Products (ParamTypes domain) -> ReturnType domain -> IntArgsMonoSet (Products (ParamTypes domain)) -> ReaderT * (Ref domain) IO (PointInfo domain) Source #

lookup :: MonoMapKey (Products (ParamTypes domain)) => Int -> Products (ParamTypes domain) -> ReaderT * (Ref domain) IO (Maybe (PointInfo domain)) Source #

lookupLT :: MonoMapKey (Products (ParamTypes domain)) => Int -> Products (ParamTypes domain) -> ReaderT * (Ref domain) IO [(Products (ParamTypes domain), PointInfo domain)] Source #