Abstract Definition
A stack is a basic computer science data structure and can be defined in an abstract, implementation-free manner, or it can be generally defined as a linear list of items in which all additions and deletion are restricted to one end that is Top.
This is a VDM (Vienna Development Method) description of a stack:
Function signatures:
init: -> Stack push: N x Stack -> Stack top: Stack -> (N U ERROR) remove: Stack -> Stack isempty: Stack -> Boolean(where N indicates an element (natural numbers in this case), and U indicates set union)
Semantics:
top(init) = ERROR top(push(i,s)) = i remove(init) = init remove(push(i, s)) = s isempty(init) = true isempty(push(i, s)) = falseRead more about this topic: Stack (abstract Data Type)
Famous quotes containing the words abstract and/or definition:
“The more abstract the truth you wish to teach, the more you need to seduce the senses to it.”
—Friedrich Nietzsche (18441900)
“... if, as women, we accept a philosophy of history that asserts that women are by definition assimilated into the male universal, that we can understand our past through a male lensif we are unaware that women even have a historywe live our lives similarly unanchored, drifting in response to a veering wind of myth and bias.”
—Adrienne Rich (b. 1929)