Source Code Metrics for Programmable Logic Controller (PLC) Ladder Diagram (LD) Visual Programming Language
暂无分享,去创建一个
The IEC 611131-3, an open international standard for Programmable Logic Controllers (PLC) defines several domain specific languages for industrial and process automation. Domain specific languages have several features, programming constructs and notations which are different than general purpose languages and hence the traditional source code metrics for general purpose programming languages cannot be directly applied to domain specific languages for writing control programs in the area of industrial automation. We propose source code level metrics to measure size, vocabulary, cognitive complexity and testing complexity of a visual Programmable Logic Controller (PLC) programming language. We present metrics for Ladder Diagram (LD) programming language which is one of the five languages defined in the IEC 61131-3 standard. The proposed metric is based on factors like number of distinct operators and operands, total number of operators and operands, number of rungs, weights of different basic control structures, structure of the program and control flow. We apply Weyukur's property to validate the metrics and evaluate the number of properties satisfied by the proposed metric.