Is there an upper limit to the number of errors contained in this program? If the number of instructions is known, can it be said that the program cannot contain more than "n" errors? For example, how many errors can the following function contain?
double calcInterest(double amount) { return -O.07 / amount; }
The parser will count four functions in a function, and I could count these errors:
- incorrect syntax
- Incorrect interest rate (business claim error)
- incorrect calculation (must be propagated)
- Potential Division by Zero
It is clear that the number of errors is not infinite, given the finite number of instructions. Alternatively, we can say that the function takes 2 ^ 64 inputs, and of these, how many produce the correct output. However, is there a way to formally prove the upper limit?
source share