Barriers to Change Propagation

There are two types of barriers supported by FlowTracer: output barriers and input barriers.

Barrier Type Computed by: Used by Comments
Output barrier The clever tool, at runtime vovserver to control change propagation to outputs of job Has to be explicitly declared in flow (-md5 option) or by the clever tool. Commonly used barrier.
Input barrier vovserver, upon each input declaration the tool Always computed by vovserver. Rarely used in the tools.

Output Barriers

Output barriers are the most common type. They are implemented by the tools and used by the vovserver. Output barriers are associated with the outputs of a clever tool, which is represented by a hexagon rather than by a circle. In some representations, the output barrier is also shown as a dark horizontal line in a tool's output arcs.

Some tools can determine if one or more of their own outputs are significantly affected in a design run. If a clever tool computes that its output exists before the execution of the tool, and the current execution does not significantly modify that output, the tool informs the FlowTracer server. Thus, the tool is responsible for stopping the propagation of changes to one or more of its own outputs. FlowTracer recognizes this by adding a barrier to those outputs.

When an input of a clever tool is either modified or invalid, the outputs with a barrier do not become invalid. Only when the clever tool is executed again can the tool stop or propagate changes to its outputs.

The simplest way to add an output barrier to a flow is to use the -md5 flag in the 'O' (output) procedure in FDL. This is simpler than inserting a 'clevercopy' job in the middle of the flow.
# Example of output barrier.
T vw cp aa bb
O -md5 bb

The effect of the option -md5 is to add a property called MD5BARRIER to the output file 'bb'. If the property is present, then the wrapper (in this case vw) computes the MD5 sum upon completion of the job. If the MD5 sum does not change then the barrier is active and change propagation is stopped by the barrier. If the MD5 sum changes, the change propagates through the barrier and the new value of the MD5 sum is stored in the property.

Input Barriers

Input barriers are implemented by vovserver and used by the tools. Input barriers exist on all input arcs of each tool. In other words, the input barrier flag is one of the results of calling VovInput to declare an input dependency.

Whenever a tool declares an input, the FlowTracer server informs the tool whether the file has changed since the last successful invocation; if no change has occurred, then there is an input barrier on that input. Whether such type of information can save computation time, depends completely the tool.

Here you can see an example of how a script can use input barriers. The first code fragment shows a simple script without barriers, where a list of input files is being processed:
## Example without input barriers.
foreach input ( $listOfInputs )
    VovInput $input || exit 1
    doSomeProcessing $input
end
If we assume that doSomeProcessing implies a lot of work, it may be useful to try to short-cut that work whenever the script can determine that an input has not changed since the last successful run of same script:
## Example with input barrier.
foreach input ( $listOfInputs )
    set barrierInfo = `VovInput -show_barrier $input || exit 1`
    if ( "$barrierInfo" == "" ) then
        doSomeProcessing $input
    else
        echo "Skip processing of input $input because of input barrier"
    endif 
end

Another example of script with input barriers can be found in $VOVDIR/training/basic/script_with_input_barriers.csh