In computer programming, an assertion is a predicate (i.e., a true?false statement) placed in a program to indicate that the developer thinks that the predicate is always true at that place.For example, the following code contains two assertions:x := 5;x := x + 1x > 0 and x > 1, and they are indeed true at the indicated points during execution.Assertions are used to help specify programs and to reason about program correctness. For example, a precondition ? an assertion placed at the beginning of a section of code ? determines the set of states under which the code is expected to be executed. A postcondition ? placed at the end ? describes the expected state at the end of execution.The example above uses the notation for including assertions used by C.A.R. Hoare in his 1969 paper "An axiomatic basis for computer programming". Because that notation cannot be used in existing programming languages, programmers generally include assertions using the comment feature of their programming la