AdaCore Blog

Abe Cohen

Abe Cohen is a Technical Account Manager at AdaCore based in the US. Before joining AdaCore, Abe earned a degree in Computer Engineering from Boston University and worked as an embedded software engineer specializing in the development of secure, low power, cloud-connected devices. At AdaCore, he is a technical resource for the sales team, working with customers to understand and solve their technical challenges.

1 entries written by Abe Cohen

by Abe Cohen

An Introduction to Contract-Based Programming in Ada

One of the most powerful features of Ada 2012* is the ability to specify contracts on your code. Contracts describe conditions that must be satisfied upon entry (preconditions) and upon exit (postconditions) of your subprogram. Preconditions describe the context in which the subprogram must be called, and postconditions describe conditions that will be adhered to by the subprogram’s implementation. If you think about it, contracts are a natural evolution of Ada’s core design principle. To encourage developers to be as explicit as possible with their expressions, putting both the compiler/toolchain and other developers in the best position to help them develop better code.