Flow network description fileIn flow based programming program definition and construction is divided into two levels. One level is a flow graph. The nodes are mini-processors; the connections are data flow paths. The actual processing is the second level; it is done within the mini-processors. The network description describes the program superstructure. Below is a sample network description file. Here are some points about it that I want to make. The file has four sections, not counting comments. They are:
(1) Sources:
(2) Options:
(3) Processors:
(4) Connections. I like the format below but I could live with an xml type format if I had to (yuch). A useful feature is to always permit parentheses around a processor name. When a processor takes options just put parentheses around the whole mess. # Illustrative network description file. # # The program is a version of the telegraph problem. # The main flow path is: # # telegraph =>getfile =>getline # =>make_words =>(make_line width) =>print # # The subsididary paths are: # # (a) getfile opens input files and passes them to getline. # when there are no more input files it sends a message # to term. # (b) getline reads the current input file and extracts one # line at a time. When the current input file is # exhausted it sends a message to getfile asking for a # new file. Start and stop codes are included in the # getline output. # (c) make_line repackages the words into a new line of # specified length. The line is sent to the print # processor. When a stop code appears it sends a # message to getline asking for a new line. sources: default: end options: width: 30 file: stdin end processors: telegraph: default inputs: outputs: out getfile: default inputs: in outputs: out,done getline: default inputs: in,next outputs: out,more make_words: default inputs: in outputs: out make_line: default inputs: in outputs: out,next print: default inputs: in outputs: term: default inputs: in outputs: end connections: (telegraph -file).out => getfile.in getfile.out => getline.in getfile.done => term.in getline.out => (make_words width).in getline.more => getfile.in make_words.out => print.in make_words.more => getline.next make_line.out => print.in make_line.next => getline.next end This page was last updated September 8, 2011. |