© Andrew T. Shvets 2020
Andrew T. ShvetsBeginning Ada Programminghttps://doi.org/10.1007/978-1-4842-5428-8_14

14. Contracts and Proofs

Andrew T. Shvets
Providence, RI, USA

What You Will Get Out of This Chapter

This chapter will dive into a very powerful technique of “proving” that your code works. This is something very unique to Ada 2012. None of the previous versions have them. They are used to ensure that certain conditions are met before executing a method, and certain changes were made after the execution has stopped.
They are absolutely brilliant. Every time that you need to double-check that some conditional value is met before running that function, you would need to put it in an if statement. This can turn problematic if your logic ever ...

Get Beginning Ada Programming: From Novice to Professional now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.