Stability | experimental |
---|---|
Maintainer | developer@flocc.net |
Safe Haskell | None |
For more information please see http://www.flocc.net/
- emptyGraphVars :: Map k a
- emptyGraph :: Graph
- modifyNodes :: (NodeEnv Node -> NodeEnv Node) -> Graph -> Graph
- nd :: NodeId -> [NodeId] -> [NodeId] -> NodeTy -> Node
- addNodeOut :: Node -> NodeId -> Node
- data GBuildSt = GBuildSt {}
- initGBuildSt :: GBuildSt
- type GraphBuilder m = StateT GBuildSt (StateT (NodeEnv Ty) (StateT IdxSet m))
- modifyGraph :: Monad m => (Graph -> Graph) -> GraphBuilder m ()
- addExpToNodeMapping :: Monad m => Idx -> Idx -> GraphBuilder m ()
- addNode :: Monad m => Node -> GraphBuilder m ()
- addVarBinding :: Monad m => Idx -> String -> Idx -> GraphBuilder m ()
- makeTupleAccessorNodes :: Monad m => Idx -> IdxTree -> GraphBuilder m ()
- addVarBindings :: Monad m => IdxTree -> Expr -> GraphBuilder m ()
- addIdxTreeBindingsR :: Monad m => Int -> Idx -> IdxTree -> GraphBuilder m ()
- addIdxTreeBindings :: Monad m => IdxTree -> GraphBuilder m Idx
- addVarNode :: Monad m => Idx -> Node -> GraphBuilder m Idx
- getGraphInputs :: Graph -> IntSet
- getEdgeType :: NodeEnv Ty -> Idx -> Ty
- toScalVal :: Val -> ScalVal
- exprToGraph :: Monad m => NodeEnv Ty -> Expr -> GraphBuilder m Idx
- graphFromExpr :: Monad m => NodeEnv Ty -> Expr -> IdxMonad m (Graph, NodeEnv Ty)
- mapNodeM :: Monad m => (Node -> m Node) -> Node -> m Node
- mapGraphM :: Monad m => (Node -> m Node) -> Graph -> m Graph
- encapFun :: Monad m => Node -> Ty -> StateT (NodeEnv Ty) (IdxMonad m) Node
- encapFuns :: Monad m => Node -> StateT (NodeEnv Ty) (IdxMonad m) Node
Documentation
emptyGraphVars :: Map k a
emptyGraph :: Graph
addNodeOut :: Node -> NodeId -> Node
data GBuildSt
GBuildSt | |
|
type GraphBuilder m = StateT GBuildSt (StateT (NodeEnv Ty) (StateT IdxSet m))
modifyGraph :: Monad m => (Graph -> Graph) -> GraphBuilder m ()
addExpToNodeMapping :: Monad m => Idx -> Idx -> GraphBuilder m ()
addExpToNodeMapping adds a mapping between the expression id and the node id |that supercedes it.
addNode :: Monad m => Node -> GraphBuilder m ()
addNode takes a node id and a list of input node ids, along with node and edge |information, within a state monad containing a map of var ids to node ids, and |the DFG, and adds this node to the DFG.
addVarBinding :: Monad m => Idx -> String -> Idx -> GraphBuilder m ()
addVarBinding takes a var id and an node id, and records a binding between |the two in the state.
makeTupleAccessorNodes :: Monad m => Idx -> IdxTree -> GraphBuilder m ()
makeTupleAccessorNodes takes an idx tree and input node id |and creates tuple accessor nodes for all nodes in the tree.
addVarBindings :: Monad m => IdxTree -> Expr -> GraphBuilder m ()
addVarBindings takes an idx tree and an expression and adds the maps |between var ids and expression ids to the bindings.
addIdxTreeBindingsR :: Monad m => Int -> Idx -> IdxTree -> GraphBuilder m ()
addIdxTreeBindings adds new VarNodes to the current graph |for all of the ids in the IdxTree
addIdxTreeBindingsR tupleOffset nodeId indexTree. Creates tuple accessor nodes |for the sub tree it, using nodeid as an input.
addIdxTreeBindings :: Monad m => IdxTree -> GraphBuilder m Idx
addIdxTreeBindings idxTree. Creates nodes for the idx tree pattern.
addVarNode :: Monad m => Idx -> Node -> GraphBuilder m Idx
addVarNode takes a var id and a node, and adds the node to the graph |and adds its id to the output list of the expression that its bound to.
getGraphInputs :: Graph -> IntSet
getDFG inputs takes a DFG and returns all the node id's that occur as inputs |that are not defined in the graph.
getEdgeType :: NodeEnv Ty -> Idx -> Ty
exprToGraph :: Monad m => NodeEnv Ty -> Expr -> GraphBuilder m Idx
exprToDFG takes an expression and creates a DFG in the state transformer, |returning the node id of the expression.
graphFromExpr :: Monad m => NodeEnv Ty -> Expr -> IdxMonad m (Graph, NodeEnv Ty)
graphFromExpr takes an expression and returns the corresponding |data flow graph.