Origins[ edit ] Thinking in abstractions is considered by anthropologistsarchaeologistsand sociologists to be one of the key traits in modern human behaviourwhich is believed to have developed between 50, andyears ago. Its development is likely to have been closely connected with the development of human languagewhich whether spoken or written appears to both involve and facilitate abstract thinking. History[ edit ] Abstraction involves induction of ideas or the synthesis of particular facts into one general theory about something. It is the opposite of specification, which is the analysis or breaking-down of a general idea or abstraction into concrete facts.
History[ edit ] Stacks entered the computer science literature inwhen Alan M. Turing used the terms "bury" and "unbury" as a means of calling and returning from subroutines.
Klaus Samelson and Friedrich L. Bauer of Technical University Munich proposed the idea in and filed a patent in and in March Bauer received the Computer Pioneer Award for the invention of the stack principle. When a plate is removed from the stack, the one below it pops up to become the new top.
Non-essential operations[ edit ] In many implementations, a stack has more operations than "push" and "pop". An example is "top of stack", or "peek", which observes the top-most element without removing it from the stack. An underflow condition can occur in the "stack top" operation if the stack is empty, the same as "pop".
Also, implementations often have a function which just returns whether the stack is empty. Implementation[ edit ] A stack can be easily implemented either through an array or a linked list.
What identifies the data structure as a stack in either case is not the implementation but the interface: The following will demonstrate both implementations, using pseudocode. Array[ edit ] An array can be used to implement a bounded stack, as follows. The first element usually at the zero offset is the bottom, resulting in array being the first element pushed onto the stack and the last element popped off.
The program must keep track of the size length of the stack, using a variable top that records the number of items pushed so far, therefore pointing to the place in the array where the next element is to be inserted assuming a zero-based index convention.
Thus, the stack itself can be effectively implemented as a three-element structure: The size of the stack is simply the size of the dynamic array, which is a very efficient implementation of a stack since adding items to or removing items from the end of a dynamic array requires amortized O 1 time.
Linked list[ edit ] Another option for implementing stacks is to use a singly linked list. A stack is then a pointer to the "head" of the list, with perhaps a counter to keep track of the size of the list: Some languages, notably those in the Forth family including PostScriptare designed around language-defined stacks that are directly visible to and manipulated by the programmer.
PHP has an SplStack class. Java's library contains a Stack class that is a specialization of Vector.
Following is an example program in Java language, using that class. Basic architecture of a stack[ edit ] A typical stack, storing local data and call information for nested procedure calls not necessarily nested procedures. This stack grows downward from its origin.
The stack pointer points to the current topmost datum on the stack. A push operation decrements the pointer and copies the data to the stack; a pop operation copies data from the stack and then increments the pointer.
Each procedure called in the program stores procedure return information in yellow and local data in other colors by pushing them onto the stack. This type of stack implementation is extremely common, but it is vulnerable to buffer overflow attacks see the text.
A typical stack is an area of computer memory with a fixed origin and a variable size. Initially the size of the stack is zero.
A stack pointer, usually in the form of a hardware register, points to the most recently referenced location on the stack; when the stack has a size of zero, the stack pointer points to the origin of the stack.
The two operations applicable to all stacks are: There are many variations on the basic principle of stack operations. Every stack has a fixed location in memory at which it begins. As data items are added to the stack, the stack pointer is displaced to indicate the current extent of the stack, which expands away from the origin.
Stack pointers may point to the origin of a stack or to a limited range of addresses either above or below the origin depending on the direction in which the stack grows ; however, the stack pointer cannot cross the origin of the stack.
In other words, if the origin of the stack is at address and the stack grows downwards towards addresses, and so onthe stack pointer must never be incremented beyond to, etc. If a pop operation on the stack causes the stack pointer to move past the origin of the stack, a stack underflow occurs.
If a push operation causes the stack pointer to increment or decrement beyond the maximum extent of the stack, a stack overflow occurs.Slick Write is a powerful, FREE application that makes it easy to check your writing for grammar errors, potential stylistic mistakes, and other features of interest.
Whether you're a blogger, novelist, SEO professional, or student writing an essay for school, Slick Write can .
RILM International Center • Fifth Avenue, Suite • New York, NY – • PHONE • FAX 9 • urbanagricultureinitiative.com and remained there for nearly a decade; his activities there included painstak-ing .
Blogging is a battle. A war to get your ideas the attention they deserve. Your enemy? The dizzying array of online distractions that devour your readers. Affordable Papers is an online writing service which has helped students from the UK, US, and Europe for more than 10 years.
Our great experience enables us to provide papers of the best quality. The main secrets of our good reputation are trustful relationships with customers and talented academic writers who always create first-chop papers from scratch. HOW TO WRITE AN ABSTRACT: Tips and Samples Leah Carroll, Ph.D., Director, Office of Undergraduate Research An abstract is a short summary of your completed research.
Expert Reviewed. How to Write an Abstract. Three Parts: Getting Your Abstract Started Writing Your Abstract Formatting Your Abstract Community Q&A If you need to write an abstract for an academic or scientific paper, don't panic!
Your abstract is simply a short, stand-alone summary of the work or paper that others can use as an overview. An abstract .