Lecture overview -- Keyboard shortcut: 'u'  Previous page: Specification with preconditions and postconditions [Section] -- Keyboard shortcut: 'p'  Next page: Examples of preconditions and postconditions -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Alphabetic index  Help page about these notes  Course home    Contracts and Assertions - slide 6 : 32

Logical expressions

A logical expression is an expression of type boolean

An assertion is a logical expression, which, if false, indicates an error [Foldoc]

A precondition of an operation is an assertion which must be true just before the operation is called

A postcondition of an operation is an assertion which must be true just after the operation has been completed