Saturday, November 10, 2012

Pre and Post-Conditions

     Last week we have learned about program correctness and how to prove precondition and post-condition after each iteration.

     I find this very helpful and would benefit us in the future, especially for those who will be programming, not for only a specific program language but any (python, java, C+) it is a general knowledge to know if the code you wrote should run or stop somewhere in the middle. But with these proofs you should know for sure if the program will continue on running or stop.

     Here is an example from my last year’s lecture that made it easier for me to understand pre and post conditions and how to prove them:

No comments:

Post a Comment