
Dataflow Process Networks ~ ~~~ _____ ~____ EDWARD A. LEE, FELLOW, IEEE, AND THOMAS M. PARKS We review a model of computation used in industrial practice graph where the nodes represent computations and the in signal processing software environments and experimentally in arcs represent streams of data. The graphs are typically other contexts. We give this model the name “dataflow process hierarchical, in that a node in a graph may represent networks,” and study its formal properties as well as its utility as a basis for programming language design. Variants of this model another directed graph. The nodes in the graph can be either are used in commercial visual programming systems such as SPW language primitives or subprograms specified in another from the Alta Group of Cadence (formerly Comdisco Systems), language, such as C or FORTRAN. COSSAP from Synopsys (formerly Cadis), the DSP Station from It is common in the signal processing community to use Mentor Graphics, and Hypersignal from Hyperception. They are also used in research sofhyare such as Khoros from the University a visual syntax to specify such graphs, in which case the of New Mexico and Ptolemy from the University of California at model is often called “visual dataflow programming.” But Berkeley, among many others. it is by no means essential to use a visual syntax. A few Dataflow process networks are shown to be a special case of graphical programming environments allow an arbitrary Kahn process networks, a model of computation where a number mixture of visual and textual specification, both based on of concurrent processes communicate through unidirectional FIFO channels, where writes to the channel are nonblocking, and reads the same language. For example, the Signal [12], [68], are blocking. In dataflow process networks, each process consists Lustre [46], and Silage [50] languages all have a visual of repeated “jirings” of a dataflow “actor.” An actor defines a and a textual syntax, the latter available in the commercial (oftenfunctional) quantum of computation. By dividing processes Mentor Graphics DSP Station as DFL. Other languages into actor jirings, the considerable overhead of context switching incurred in most implementations of Kahn process networks is with related semantics, such as Sisal [73], are used primarily avoided. or exclusively with textual syntax. The language Lucid We relate dataflow process networks to other dataflow models, [92], [96], while primarily used with textual syntax, has including those used in dataflow machines, such as static dataflow experimental visual forms [ 101. and the tagged-token model. We also relate dataflow process networks to functional languages such as Haskell, and show that Hierarchy in graphical program structure can be viewed modem language concepts such as higher-order functions and as an alternative to the more usual abstraction of subpro- polymorphism can be used effectively in dataflow process net- grams via procedures, functions, or objects. It is better works. A number of programming examples using a visual syntax suited than any of these to a visual syntax, and also better are given. suited to signal processing. Some examples of graphical dataflow programming en- I. MOTIVATION vironments intended for signal processing (including image processing) are Khoros, from the University of New Mexico This paper concerns programming methodologies com- [84] (now distributed by Khoral Research, Inc.), Ptolemy, monly called “graphical dataflow programming” that are from the University of California at Berkeley [25], the used extensively for signal processing and experimentally signal processing worksystem (SPW), from the Alta Group for other applications. In this paper, “graphical” means at Cadence (formerly Comdisco Systems), COSSAP, from simply that the program is explicitly specified by a directed Synopsys (formerly Cadis), and the DSP Station, from Manuscript received August 29, 1994; revised January 30, 1995. This Mentor Graphics (formerly EDC). MATLAB from The work is part of the Ptolemy project, which is supported by the Advanced Mathworks, which is popular for signal processing and Research Projects Agency and the US Air Force under the RASSP other applications, has a visual interface called SIMULINK. program contract number F33615-93-C-1317, Semiconductor Research Corp. project number 94-DC-008, National Science Foundation contract A survey of graphical dataflow languages for other applica- number MIP-9201605, Office of Naval Technology (via Naval Research tions is given by Hills [51]. These software environments all Laboratories), the State of California, and the following companies: Bell Northern Research, Dolby, Hitachi, Mentor Graphics, Mitsubishi, NEC, claim variants of dataflow semantics, but a word of caution Pacific Bell, Philips, Rockwell, Sony, and Synopsys. is in order. The term “dataflow” is often used loosely for The authors are with the Department of Electrical Engineering and semantics that bear little resemblance to those outlined Computer Sciences, The University of Califomia, Berkeley, CA 94720 USA. by Dennis in 1975 [38] or Davis in 1978 [35]. A major IEEE Log Number 9409997. motivation of this paper is to point out a rigorous formal 0018-9219/95$04.00 0 1995 IEEE PROCEEDINGS OF THE IEEE, VOL. 83, NO. 5, MAY 1995 173 -- ~ underpinning for dataflow graphical languages, to establish x; is an atomic data object, or token drawn from some precisely the relationship between such languages and func- set. Each token is written (produced) exactly once, and tional languages, and to show that such languages benefit read (consumed) exactly once. Writes to the channels are significantly from such modem programming concepts as nonblocking (they always succeed immediately), but reads polymorphism, strong typing, and higher-order functions. are blocking. This means that a process that attempts to Although it has been rarely exploited in visual dataflow read from an empty input channel stalls until the buffer has programming, we also show that such languages can make sufficient tokens to satisfy the read. Lest the reader protest, effective use of recursion. we will show that this model of computation does not Most graphical signal processing environments do not actually require either multitasking or parallelism, although define a language in any strict sense. In fact, some designers it is certainly capable of exploiting both. It also usually does of such environments advocate minimal semantics [76], ar- not require infinite queues, and indeed can be much more guing that the graphical organization by itself is sufficient to efficient in its use of memory than comparable methods in be useful. The semantics of a program in such environments functional languages, as we will see. is determined by the contents of the graph nodes, either A process in the Kahn model is a mapping from one subgraphs or subprograms. Subprograms are usually spec- or more input sequences to one or more output sequences. ified in a conventional programming language such as C. The process is usually constrained to be continuous in a Most such environments, however, including Khoros, SPW, rather technical sense. To develop this idea, we need a and COSSAP, take a middle ground, permitting the nodes little notation. in a graph or subgraph to contain arbitrary subprograms, Consider a prejix ordering of sequences, where the se- but defining precise semantics for the interaction between quence X precedes the sequence Y (written X C Y) nodes. Following Halbwachs [47], we call the language if X is a prefix of (or is equal to) Y. For example, used to define the subprograms in nodes the host language. [x1,x2] 5 [z1,x2,x3].If X & Y, it is common to say that Following Jagannathan, we call the language defining the X approximates Y, since it provides partial information interaction between nodes the coordination language [56]. about Y. The empty sequence is denoted I (bottom), Many possibilities have been explored for precise se- and is obviously a prefix of any other sequence. Consider mantics of coordination languages, including for example a (possibly infinite) increasing chain of sequences x = the computation graphs of Karp and Miller [61], the syn- { XO,XI, . .}, where XOL XI . Such an increasing chronous dataflow graphs of Lee and Messerschmitt [66], chain of sequences has one or more upper bounds Y,where the cyclostatic dataflow of Lauwereins et al. [17], [63], the Xi L for all X; E x. The least upper bound nx processing graph method (PGM) of Kaplan et al. [60], gran- Y is an upper bound such that for any other upper bound ular lucid [56], and others [3], [28], [33], [56], [94]. Many Y,nx E The least upper bound may be an infinite of these limit expressiveness in exchange for considerable Y. sequence. advantages such as compile-time predictability. Let S denote the set of finite and infinite sequences. Graphical programs can be either interpreted or compiled. This set is a complete partial order (cpo) with the prefix It is common in signal processing environments to provide order defining the ordering. The “complete” simply means both options. The output of compilation can be a standard that every increasing chain has a least upper bound in procedural language, such as C, assembly code for pro- grammable DSP processors [80], or even specifications of S. Let SP denote the set of p-tuples of sequences as silicon implementations [37]. Often, considerable effort is in X = {X1,X2,...,Xp} E SP. The set LE SP is understood to be the set of empty sequences. put into optimized compilation (see for example [15], [41], Such sets of sequences can be ordered as well; we write [811, [881). X C X’ if X; X,l for each i,1 5 i 5 p. A set of p-tuples of sequences x = {Xo,X,,...}always has a 11. FORMALUNDERPINNINGS greatest lower bound Ux (possibly I),but it may or may not have a least upper bound nx. If it is an increasing In most graphical programming environments, the nodes chain, x = {Xo,XI,.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages27 Page
-
File Size-