<Li> For any value x and any abstract variable V, the sequence of operations (push (S, x); V ← pop (S)) is equivalent to V ← x . </Li> <P> Since the assignment V ← x, by definition, cannot change the state of S, this condition implies that V ← pop (S) restores S to the state it had before the push (S, x). From this condition and from the properties of abstract variables, it follows, for example, that the sequence </P> <Dl> <Dd> (push (S, x); push (S, y); U ← pop (S); push (S, z); V ← pop (S); W ← pop (S)) </Dd> </Dl> <Dd> (push (S, x); push (S, y); U ← pop (S); push (S, z); V ← pop (S); W ← pop (S)) </Dd>

Abstract data type in data structure using c++