Software Failure Avoidance Using Discrete Control Theory. Software Failure Avoidance Using Discrete Control Theory