Safe Haskell | None |
---|
Untyped DF.
- data R_Id = R_Id Id
- data UDF
- udf_concise :: UDF -> String
- udf_k' :: UDF -> Maybe K
- udf_elem :: UDF -> [UDF]
- udf_typeOf :: UDF -> TypeRep
- udf_traverse :: (st -> UDF -> (st, UDF)) -> st -> UDF -> (st, UDF)
- type Port_Index = Int
- type Node = (Id, UDF)
- data Edge_Ty
- = Normal_Edge
- | Rec_Wr_Edge Id
- | Rec_Rd_Edge Id
- | Implicit_Edge Int
- edge_ty_concise :: Edge_Ty -> String
- type Edge = (Id, Id, (Port_Index, Edge_Ty))
- type Graph = ([Node], [Edge])
- type Analysis = [(Node, [Edge])]
- node_id :: Node -> Id
- node_udf :: Node -> UDF
- label :: [Node] -> UDF -> Id
- source :: [Node] -> UDF -> Id
- udf_edge_ty :: UDF -> Edge_Ty
- edges :: [Node] -> UDF -> [Edge]
- match_rec :: R_Id -> Node -> Bool
- implicit_edge :: [Node] -> Node -> Maybe Edge
- is_k_node :: Node -> Bool
- is_orphan_edge :: [Node] -> Edge -> Bool
- vgraph_impl :: Graph -> Graph
- find_in_edge_m :: [Edge] -> (Id, Port_Index) -> Maybe Edge
- find_in_edge :: [Edge] -> (Id, Port_Index) -> Edge
- solve_rec_edge :: Int -> [Edge] -> (Id, Port_Index) -> (Int, Id)
- implicit_edge' :: [Edge] -> Edge -> Maybe Edge
- is_rec_node :: Node -> Bool
- vgraph_direct :: Graph -> Graph
- analyse :: [UDF] -> Analysis
- graph :: UDF -> Graph
- type Gr = Gr UDF (Port_Index, Edge_Ty)
- type Gr' = Gr String (Port_Index, Edge_Ty)
- udf_gr :: Graph -> Gr
- udf_gr' :: Graph -> Gr'
- tsort :: UDF -> [UDF]
- node_vars :: Node -> [Var]
- node_c_call :: (Node, [Edge]) -> Maybe C_Call
- k_nodes :: [Node] -> [(Id, K)]
- udf_instructions :: UDF -> Instructions
- udf_dl_gen :: FilePath -> (Host, FilePath) -> UDF -> IO ()
- dot_ar :: [UDF] -> [Either Int K]
- dot_node :: Node -> String
- edge_ty_colour :: Edge_Ty -> String
- dot_edge :: Edge -> String
- dot_graph :: Graph -> [String]
- dot_draw :: String -> IO ()
- draw :: UDF -> IO ()
- draw' :: UDF -> IO ()
- gr_dot :: UDF -> String
- gr_dot' :: UDF -> String
- gr_draw :: UDF -> IO ()
- gr_draw' :: UDF -> IO ()
- audition :: [Message] -> UDF -> IO ()
- audition_sc3 :: [Message] -> UDF -> IO ()
- audition_text :: Int -> UDF -> IO ()
Documentation
Un-typed data-flow node.
udf_concise :: UDF -> StringSource
Concise pretty printer for UDF
.
udf_typeOf :: UDF -> TypeRepSource
Output type of UDF
.
udf_traverse :: (st -> UDF -> (st, UDF)) -> st -> UDF -> (st, UDF)Source
Traversal with state, signature as mapAccumL
.
Graph
type Port_Index = IntSource
Index for input port.
Enumeration of Edge
types.
Normal_Edge | |
Rec_Wr_Edge Id | Edge to recWr node |
Rec_Rd_Edge Id | Edge from recRd node |
Implicit_Edge Int | Edge to recRd node (from recWr) |
type Edge = (Id, Id, (Port_Index, Edge_Ty))Source
Edge from left hand side node to right hand side port.
type Analysis = [(Node, [Edge])]Source
A variant graph form associating the list of in edges with each
Node
.
udf_edge_ty :: UDF -> Edge_TySource
Type of out edge of UDF
.
is_orphan_edge :: [Node] -> Edge -> BoolSource
vgraph_impl :: Graph -> GraphSource
Transform the actual graph into a viewing graph by adding implicit edges from recWr to recRd nodes.
find_in_edge_m :: [Edge] -> (Id, Port_Index) -> Maybe EdgeSource
Find edge with indicated right hand side port.
find_in_edge :: [Edge] -> (Id, Port_Index) -> EdgeSource
Variant of find_in_edge_m
that error
s.
solve_rec_edge :: Int -> [Edge] -> (Id, Port_Index) -> (Int, Id)Source
Trace in edges until arrival at a Rec_Wr_Edge
that is not
proceeded by an Implicit_Edge
. This traces the depth of the
chain, however that is not currently drawn.
implicit_edge' :: [Edge] -> Edge -> Maybe EdgeSource
Transform Rec_Rd_Edge
to resolved Implicit_Edge
.
vgraph_direct :: Graph -> GraphSource
Transform the actual graph into a viewing graph by deleting recWr and recRd nodes and drawing a direct backward edge.
analyse :: [UDF] -> AnalysisSource
Label nodes and list incoming edges. Multiple-root nodes are erased.
analyse (udf_elem c)
Generate graph (node list and edge list).
import Sound.DF.Uniform.GADT import qualified Sound.DF.Uniform.UDF as U
let g = iir1 (0.0::Float) (+) 1 let c = df_erase g
map U.udf_concise (U.udf_elem c) > [recWr,df_add:Float,1.0,recRd:0.0,df_add:Float,1.0,recRd:0.0]
U.vgraph_direct (U.graph c) > ([(1,wR_1),(2,df_add:Float),(3,1.0),(4,rR_1:0.0)] > ,[(2,1,0),(3,2,0),(4,2,1)])
U.draw c
FGL Graph
Code Gen
udf_instructions :: UDF -> InstructionsSource
Generate Instructions
from UDF
.
Graph Drawing
edge_ty_colour :: Edge_Ty -> StringSource
Edges are coloured according to their type.
Draw graph, transformed by vgraph_direct
.
Draw graph, transformed by vgraph_impl
.
Gr Drawing
Audition
audition_sc3 :: [Message] -> UDF -> IO ()Source
Audition graph after sending initialisation messages.
audition_text :: Int -> UDF -> IO ()Source
Audition at text-dl
.