Richard Harter's World
Site map
Mathcomp
San
September 2011
Email

Flow network description file

In 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:
This is an OS dependent section (might have platform sections but that is for another time) that specify where things can be found.

(2) Options:
This list available options and their default values:

(3) Processors:
Processors are the acting components - the boxes in the flow charts. In my view it is essential, and I repeat, essential that every processor, i.e., every box in the flow chart, have its own label. For a processor we need three kinds of information - the component type, its list of inports, and its list of outports. (note - in my work ports are implicit; I actually use typed connectors).

(4) Connections.
My view here is that each connection gets its own line. This simplifies life for tools. The function of the network description file is to provide a reference point from which both builds and visual layout can be generated.

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.

Richard Harter's World
Site map
Mathcomp
San
September 2011
Email