Semantic Analysis of Application Programs Developed Using Graphical PLC Language
摘要
Reactor Control Division of BARC has developed a Programmable Logic Controller (known as TPLC-32) for development of safety C&I applications in nuclear reactors. It uses an indigenously developed software tool “Application Development Environment (ADE)” that facilitates graphical programming of application logic using Function Block Diagram (FBD) language. The application developed using ADE undergo rigorous syntax and semantic checks. This is required in order to ensure that there is no ambiguity in the logic during run time execution. Few of the important checks incorporated in ADE are analysing the application for proper initialization, single static assignment and causality analysis. In this paper we focus on the technique used for ensuring the causality of application. An application is said to be causal if any output at a given cycle can be computed purely based on the present and past inputs only. Causality check requires analysing the dependency between the output variables in the application, such that no output depends directly or indirectly on itself. Application logic in ADE consist of network of various function blocks. The basic approach to find whether the application is causal is to check that no loop exists (no self-dependency) in the application. This can be achieved by applying suitable loop detection algorithm. However, naively applying such an algorithm on each block may take inordinately longer time, especially when there are very large number of function blocks present in the application. In order to reduce the analysis time a new methodology was devised in which the list of blocks undergoing loop detection was shortened. This shortened list was derived by subtracting blocks which are not part of any loop, from the total blocks present in the application. If the shortened list is empty, then application is declared as causal and no further analysis is required to be carried out. If shorted list is non-empty, then loop detection algorithm is applied on the blocks present in this shortened list to find out the list of blocks causing the loop.