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.

[1]  Elaine J. Weyuker,et al.  Evaluating Software Complexity Measures , 2010, IEEE Trans. Software Eng..

[2]  Shari Lawrence Pfleeger,et al.  Software Metrics : A Rigorous and Practical Approach , 1998 .

[3]  Michael Tiegelkamp,et al.  IEC 61131-3: Programming Industrial Automation Systems , 2001, Springer Berlin Heidelberg.

[4]  Anil Nair,et al.  Product metrics for IEC 61131-3 languages , 2012, Proceedings of 2012 IEEE 17th International Conference on Emerging Technologies & Factory Automation (ETFA 2012).

[5]  Jan Mendling,et al.  A Discourse on Complexity of Process Models , 2006, Business Process Management Workshops.

[6]  W. Gharieb,et al.  Software Quality in Ladder Programming , 2006, 2006 International Conference on Computer Engineering and Systems.

[7]  James M. Bieman,et al.  Software Metrics: A Rigorous and Practical Approach, Third Edition , 2014 .

[8]  Michael Tiegelkamp,et al.  IEC 61131-3: Programming Industrial Automation Systems: Concepts and Programming Languages, Requirements for Programming Systems, Decision-Making Aids , 2001 .

[9]  Volker Gruhn,et al.  Adopting the Cognitive Complexity Measure for Business Process Models , 2006, 2006 5th IEEE International Conference on Cognitive Informatics.

[10]  Sanjay Misra,et al.  Applicability of Weyuker's properties on OO metrics: Some misunderstandings , 2008, Comput. Sci. Inf. Syst..

[11]  C.J.H. Mann,et al.  Object-Oriented Metrics in Practice: Using Software Metrics to Characterize, Evaluate, and Improve the Design of Object-Oriented Systems , 2007 .

[12]  Dawn M. Tilbury,et al.  Methods of measuring the size and complexity of PLC programs in different logic control design methodologies , 2005 .

[13]  Ira D. Baxter,et al.  Calculating Software Metrics for Ladder Logic , 2008, ICINCO-RA.