UNBOUNDED STACK
Operations
NewStack : ® Stack
Push: Stack ´ Item ® Stack
Pop: Stack ® Stack
Top: Stack ® Item
IsEmpty: Stack ® Boolean
Equations s: Stack; i: Item
Pop(NewStack) = Error*
Pop(Push(s, i)) = s
Top(NewStack) = Error+
Top(Push(s, i)) = i
IsEmpty(NewStack) = true
IsEmpty(Push(s, i)) = false
* alternatively: Pop(NewStack) = NewStack
+ alternatively: Top(Newstack) = Null_Item