CALCULATING SOFTWARE METRICS FOR LADDER LOGIC