Nepedia
Back to Discover
Advanced Reader
💻

Abstraction (computer science)

technology Maturity 9-11 war conflict Next article →

This article covers sensitive topics: war_conflict. Parents can manage visibility in Parental Controls.

{

"text": "In computer science, abstraction is a fundamental method used to manage complexity. It works by providing access to a system or a set of data while hiding the difficult details that would otherwise make access challenging. By hiding these underlying mechanics, abstraction allows a person to focus their attention on details of greater importance. This process is essential because computing mostly operates independently of the concrete, physical world. Hardware implements a model of computation that can be interchangeable with others. Without abstraction, humans could not create enormous software systems because they would be overwhelmed by too many details at once. Instead, software is structured into architectures that allow creators to concentrate on only a few issues at a time.\n\nOne primary type of abstraction is control abstraction. This allows programmers to perform high-level tasks without managing the tiny, low-level steps the computer must take. For example, a human might write a simple math statement like a := (1 + 2) * 5. To a person, this is an obvious calculation. However, the computer must perform several subtle and complex steps to finish this task. It must convert the numbers into a binary representation, which is a system of bits. It must then decompose the math into assembly instructions, such as shifting a binary register or adding a binary complement. Finally, it must look up a variable's label and find a specific location in physical or virtual memory to store the result. Control abstraction hides these repetitive tasks, preventing the programmer from having to write for specific hardware every time.\n\nAnother vital concept is data abstraction. This technique enforces a clear separation between the abstract properties of a data type and the concrete details of how it is implemented. The abstract properties are the interface, which is what the user sees and interacts with. The concrete implementation is kept private. This means a programmer can change the internal code to make it more efficient without changing how the user interacts with it. For instance, a programmer might use a lookup table to associate keys with values. This table could be implemented as a hash table, a binary search tree, or a simple linear list. As long as the interface remains the same, the user does not notice the change. The interface acts like a contract on agreed behavior between the data type and the code using it.\n\n

Data abstraction levels
Data abstraction levels

\n\nProgramming languages have evolved through several generations of abstraction. This process serves as a stepping stone from simple to complex systems. The first-generation programming language is machine language, which is the most basic level. The second-generation is assembly language. The third-generation consists of high-level programming languages. This progression continues today with scripting languages and domain-specific languages, which are designed for specific tasks. Some languages, like those in the Lisp family, use macro systems to allow for syntactic abstraction. This can help programmers omit boilerplate code, which is repetitive code that must be included with little variation. Such tools improve both the efficiency of the programmer and the clarity of the source code.\n\nObject-oriented programming (OOP) is a major way that abstraction is used in modern software. In OOP, abstraction involves defining objects that represent abstract \"actors\" in a system. These actors can perform work, change their state, and communicate with other objects. Several specific terms describe how this works. Encapsulation refers to hiding the details of an object's state. Polymorphism is a strategy that allows different data types to be substituted for one another in similar roles. When abstraction is used to structure complex relationships inside classes, it is called inheritance or delegation. These features allow different types of objects to work together in a standardized way.\n\n

Data abstraction levels
Data abstraction levels

\n\nWhile most abstraction is automated, some forms are done manually. In scientific research, specifically during a systematic review of literature, researchers use manual data abstraction. During a meta-analysis, one or more abstractors pull specific data from many studies. To ensure the data is correct, they use a process called dual data abstraction, followed by independent checking known as adjudication. This manual process helps turn large amounts of complex information into a clear, usable format for analysis.\n\nDespite its usefulness, abstraction is not perfect. Software engineer Joel Spolsky has argued that all abstractions are \"leaky.\" This means that an abstraction can never completely hide every single detail of the layer beneath it. Sometimes, the underlying complexity will "leak" through and affect how the higher level works. However, this does not make abstraction less valuable. Even with the risk of leaks, it remains the primary way that engineers design, specify, and build the massive, interconnected software systems that define the modern world.",

"media": [

"File:Data abstraction levels.png"

]

}

798 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (1)
File:Data abstraction levels.png
Data abstraction levels.png
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.