303 | | * '''Description:''' Contract Programming (CP) is also known as Design by Contract (DbC) and it was first introduced by the Eiffel programming language. All Contract Programming features of the Eiffel programming language are supported by this library, among others: |
304 | | |
305 | | * Optional compilation and checking of invariants, preconditions, and postconditions. |
306 | | * Customizable actions on contract failure (terminate by default but it can throw, exit, etc). |
307 | | * Subcontracting for derived classes (with support for multiple inheritance). |
308 | | * Access to "old" variable values (before body execution) and return value "result" in postconditions. |
309 | | * Automatic contract documentation (integrated with Doxygen). |
310 | | |
311 | | In brief, Contract Programming allows to specify invariants, preconditions, and postconditions that are automatically checked when functions are called at run-time. These conditions are used to assert the function specifications within the code itself allowing to find bugs more quickly during testing and improving software quality. |
312 | | |
| 303 | * '''Description:''' Implement Contract Programming for C++. |
| 304 | |
| 305 | Contract Programming (CP) is also known as Design by Contract(TM)(DbC) and it was first introduced by the Eiffel programming language. |
| 306 | All Contract Programming features of the Eiffel programming language are supported by this library, among others: |
| 307 | |
| 308 | * Optional compilation and checking of invariants, preconditions, and postconditions. |
| 309 | * Customizable actions on contract failure (terminate by default but it can throw, exit, etc). |
| 310 | * Subcontracting for derived classes (with support for pure virtual functions and multiple inheritance). |
| 311 | * Access to "old" variable values (before body execution) and return value "result" in postconditions. |
| 312 | * Support block invariants and loop variants. |
| 313 | |
| 314 | In brief, Contract Programming allows to specify invariants, preconditions, and postconditions that are automatically checked when functions are called at run-time. |
| 315 | These conditions are used to assert the function specifications within the source code itself allowing to find bugs more quickly during testing and improving software quality. |