A method for checking the functional equivalence of two pieces of 
software of a 
control system, in particular a 
programmable logic controller based 
control system designed from a 
function block diagram (120, 196) having a plurality of interconnected function blocks, the  The method comprises the steps of: a) generating a first instance of compilable 
source code from a first plurality of functional block diagrams (70, 74, 78) by means of a first code generator following a first set of 
serialization rules; b  ) parses the first instance of said 
source code and identifies groups of all function block I / O ports and nodes (nodes) and all connections between all function block I / O ports and nodes (arcs) of the data flow  c) using the information from step b) to reconstruct in the upstream direction a first 
dataflow graph (86) of a first instance of said 
source code; d) by means of the first code following the first set of 
serialization rules  generator or a second code generator following a second set of 
serialization rules to generate a second instance of compilable source code from a second plurality of function block diagrams (90, 94, 98); e) 
parsing said source code  The second instance and identifies the set of all functional block I / O ports and nodes (nodes) and the set of all connections between all functional block I / O ports and nodes (arcs) of the 
data stream; f) use the set from step  e) information to reconstruct in the upstream direction a second 
dataflow graph (106) of a second instance of said source code; g) combining said first identified 
dataflow graph (86) with said second identified  The dataflow graphs (106) are compared with each other node by node, thereby checking whether the transitive closure up to the input of a node is the same in the second instance of the source code as in the first instance of the source code.