Unified Control-Data Flow Diagrams (UCDF) Reference
Modules and
interweaving control and data flows
Flows interweave
The smallest unit of control is a processor instruction
which itself is data (information). It is located in a memory
location 1, 2, 3 or more words in size. This memory location is its
dataholder. It was placed there by a loader software (data flow).
The processor picks up the instruction and starts execution (control
flow is passed to this instruction). It takes time.
During the execution of this instruction, the processor
may read other data (data flow), modify the data, update other data
(data flow), load the next instruction (data flow), and pass the control
to it (control flow is passed to the next instruction).
Here we can see that data flows and control flows are tightly
interweaved even within the smallest units of code.
On any structural level up, from a simple operator expressed in
computer language, to more complex operators, expressions, to blocks,
and functions, and up, larger and larger number of data and control
flows transform into each other. "If" statements transform a data
flow into control flows, assignment statements transform a control
flow into a data flow.
Essentially, everywhere a data flow is found, there is a control flow,
and if there is a control flow, there are data flows accompanying it.
In the documentation we should be able, but do not have to show it all.
We have to show essential flows.
Complex flows made simple
Thus any sequence of data and control flow transformations ending in
essential update of a dataholder may be called a data flow and shown
with an appropriate arrow. Any sequence of data and control flows
ending in a call to a code block or affecting another control flow
may be called a control flow.
Module responsibility
As complex units, modules usually have multiple flows in and out.
To simplify presentation, when the main responsibility of the module
is control, a single control line is sufficient. We should assume that
there could be accompanying data flows as well.
When the main responsibility is the data processing and update, then
the line is the data one, but we keep in mind that additional control
flows might exist.
User
XYZ SDK
XYZ,
ActiveX control
Rapid application
development tools:
Visual Basic, VB.NET,
Visual C++, C#, Java,
Delphi, Python, Matlab, etc.
GigE Vision™ 1.x and 2.x
compliant cameras
GigE network adapter,
preferrably Gigabit Ethernet
Network Interface Controller
XYZ software,
C++
Property Window or
property pages
Program
Video
Example. This is a general structure of XYZ SDK application.
If more details are required, they can be shown on separate diagrams.
1. Main output of the XYZ ActiveX control to the User's program
is video. Obviously, there are numerous control functions and
other data flows in and out, but the main responsibility of the
ActiveX is video presentation.
2. Property pages allow the programming environment conveniently
set the properties of the XYZ within the program during development.
This is described by the control flow arrow.
3. XYZ ActiveX as a shell is built upon and calls into the XYZ software
library. It is worth to show as a control line. The data line reflects
uninterrupted passage of the main data flow of the system, namely video
from cameras into the consumer user program.
4. XYZ software does a lot of control and data exchange with the cameras
But main responsibilities are obtaining the video and adjusting the camera.
And that is shown with a data line and a control line.
5. Control goes to the cameras through the GigE network.
Here you can see the graphical device used to decouple the control flow
line form the video data flow which also goes through the GigE network.
1
2
3
4
5
Dependency
between flows
When a module or a control block receives
multiple data flows and exerts multiple
data flows or accepts and exerts multiple
control flows, and the structure of the module
is unknown or cannot be shown (it is treated
as a black box), intermediate control blocks
can be used to emphasize dependency among flows.
Again, as described, control and data flows
can be transformed into each other within the
software.
MyModule
C
B
D
E
MyModule
C
B
D
E
The intermediate blocks can contain descriptions,
formulas, etc., or show more complex logical
structure. This is not a module's structure.
This is how it presents itself to the outside.
F
A
A
F
Data flow as
a control flow
In some situations,
when the informational content of a data flow is
used in an if-like statement, i.e. is converted
into control flow, the original data flow can
be shown as control flow (more about it later).
In this case,
the diagram may become less intricate, more
abstract, but less precise.
b==1
b==0
b
F()
1
0
F()
1 or 0
Control flow as
a data flow
A control flow branch carries information about
the condition originated this branch.
The informational content may be show as this.
A()
B()
if (b==1) A();
else
if (b==0) B();
b==1
b==0
b
Next
has
Control
create
has
has
has