CALCULATING SOFTWARE METRICS FOR LADDER LOGIC
Matthew Waters, Ken Young, Ira D. Baxter
2008
Abstract
Ladder logic is a graphical language widely used to program Programmable Logic Controllers (PLCs). PLCs are found at the heart of most industrial control systems used in automation because they are robust, they are relatively easy to program and because they are a proven technology. However there is currently no means to measure the intrinsic properties and qualities of the code produced. This paper details a method for creating tools to calculate software metrics for ladder logic, specifically Rockwell Automation’s implementation of ladder logic for its ControlLogix family of PLCs, Import-Export language version 2.6. Results obtained from these tools are briefly discussed also.
References
- IEEE Standard 610.12, 1990, IEEE Standard Glossary of Software Engineering Terminology
- A. Phukan, M. Kalava and V. Prabhu, 2005. Complexity metrics for manufacturing control architectures based on software and information flow. Computers & Industrial Engineering 49 1-20
- G. Frey, 2002, Software Quality in Logic Controller Programming, Proceedings of the IEEE SMC
- M. B. Younis and G. Frey, 2007. Software Quality Measures to Determine the Diagnosability of PLC Applications. Proceedings of the IEEE ETFA.
- Thomas McCabe, 1976, A Complexity Measure, IEEE Transactions on Software Engineering, Volume 2, No 4, pp 308-320
- F. Danielsson, P. Moore, P Eriksson, 2003, Validation, off-line programming and optimization of industrial control logic, Mechatronics 13 571-585
- I. D. Baxter, C. Pidgeon, M. Mehlich, 2004, DMS®: Program Transformations For Practical Scalable Software Evolution, Proceedings of the IEEE International Conference on Software Engineering
- A. Watson, T McCabe, 1996, Structured Testing: A Testing Methodology Using the Cyclomatic Complexity Metric, NIST Special Publication 500-235
- Halstead operator occurrence: 37222
- Halstead operand occurrence: 108478
- Halstead program length: 145700
- Halstead program vocabulary: 1918
- Halstead program volume: 1588914.89
- Halstead program difficulty: 1541.38
- Halstead program effort: 2449115919.79
- Halstead bug prediction: 529.64
- PROGRAM MainProgram @ line 59508
- lines and comments. 139 routines. Number of Rungs: 2713 Aggregate cyclomatic complexity: 4535 Mean cyclomatic complexity: 32.63 Median cyclomatic complexity: 4.00 Mean Cyclomatic complexity per rung:
- rung: 26 Position of rung with maximum
- rung: 81 Position of rung with maximum number
- of PrimitiveTests, occurs @ line: 59702 Decision density: 0.65 Halstead unique operators: 67 Halstead unique operands: 955 Halstead operator occurrence: 18365 Halstead operand occurrence: 56269 Halstead program length: 74634 Halstead program vocabulary: 1022 Halstead program volume: 746129.49 Halstead program difficulty: 1973.83 Halstead program effort:
- ROUTINE S_Dcu @ line 20278 410 lines of l5k code without blank
- lines and comments. Number of Rungs: 102 Number of Rungs with comments: 102 Cyclomatic complexity: 114 Cyclomatic complexity of the largest
- rung: 9 Position of rung with maximum
- a rung: 11 Position of rung with maximum number
- of PrimitiveTests, occurs @ line: 20675 Mean number PrimitiveTests per rung:
Paper Citation
in Harvard Style
Waters M., Young K. and D. Baxter I. (2008). CALCULATING SOFTWARE METRICS FOR LADDER LOGIC . In Proceedings of the Fifth International Conference on Informatics in Control, Automation and Robotics - Volume 4: ICINCO, ISBN 978-989-8111-31-9, pages 143-150. DOI: 10.5220/0001495901430150
in Bibtex Style
@conference{icinco08,
author={Matthew Waters and Ken Young and Ira D. Baxter},
title={CALCULATING SOFTWARE METRICS FOR LADDER LOGIC},
booktitle={Proceedings of the Fifth International Conference on Informatics in Control, Automation and Robotics - Volume 4: ICINCO,},
year={2008},
pages={143-150},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0001495901430150},
isbn={978-989-8111-31-9},
}
in EndNote Style
TY - CONF
JO - Proceedings of the Fifth International Conference on Informatics in Control, Automation and Robotics - Volume 4: ICINCO,
TI - CALCULATING SOFTWARE METRICS FOR LADDER LOGIC
SN - 978-989-8111-31-9
AU - Waters M.
AU - Young K.
AU - D. Baxter I.
PY - 2008
SP - 143
EP - 150
DO - 10.5220/0001495901430150