Like the title says. The post conditions of a routine must be a subset of the preconditions for the routine? The way I understand post-conditions is that they are entirely independent of preconditions, so my understanding leads me to think that they are not a subset of preconditions.Any input would be appreciated.
Are post conditions of a routine a subset of precondtions?
design
How about a concrete example:int x;// Preconditions: none (empty set)// Postconditions: x = yvoid assign_to_x(int y) { x = y; }If you allow any form of mutable state in your program, you can have postconditions that are not subsets of your preconditions.