Katana VentraIP

Abstraction (computer science)

In software engineering and computer science, abstraction is the process of generalizing concrete details,[1] such as attributes, away from the study of objects and systems to focus attention on details of greater importance.[2] Abstraction is a fundamental concept in computer science and software engineering, especially within the object-oriented programming paradigm.[3] Examples of this include:

In such as C++, Object Pascal, or Java, the concept of abstraction has itself become a declarative statement – using the syntax function(parameters) = 0; (in C++) or the keywords abstract[8] and interface[9] (in Java). After such a declaration, it is the responsibility of the programmer to implement a class to instantiate the object of the declaration.

object-oriented programming languages

commonly exhibit abstractions related to functions, such as lambda abstractions (making a term into a function of some variable) and higher-order functions (parameters are functions).

Functional programming languages

Modern members of the Lisp programming language family such as , Scheme and Common Lisp support macro systems to allow syntactic abstraction. Other programming languages such as Scala also have macros, or very similar metaprogramming features (for example, Haskell has Template Haskell, and OCaml has MetaOCaml). These can allow a programmer to eliminate boilerplate code, abstract away tedious function call sequences, implement new control flow structures, and implement Domain Specific Languages (DSLs), which allow domain-specific concepts to be expressed in concise and elegant ways. All of these, when used correctly, improve both the programmer's efficiency and the clarity of the code by making the intended purpose more explicit. A consequence of syntactic abstraction is also that any Lisp dialect and in fact almost any programming language can, in principle, be implemented in any modern Lisp with significantly reduced (but still non-trivial in most cases) effort when compared to "more traditional" programming languages such as Python, C or Java.

Clojure

The uppermost level may feature a menu of typical end-user operations.

Within that could be standalone executables or libraries for tasks such as signing on and off employees or printing checks.

Within each of those standalone components there could be many different source files, each containing the program code to handle a part of the problem, with only selected interfaces available to other parts of the program. A sign on program could have source files for each data entry screen and the database interface (which may itself be a standalone third party library or a statically linked set of library routines).

Either the database or the payroll application also has to initiate the process of exchanging data with between ship and shore, and that data transfer task will often contain many other components.

Manual data abstraction[edit]

While much of data abstraction occurs through computer science and automation, there are times when this process is done manually and without programming intervention. One way this can be understood is through data abstraction within the process of conducting a systematic review of the literature. In this methodology, data is abstracted by one or several abstractors when conducting a meta-analysis, with errors reduced through dual data abstraction followed by independent checking, known as adjudication.[10]

Considerations[edit]

When discussing formal semantics of programming languages, formal methods or abstract interpretation, abstraction refers to the act of considering a less detailed, but safe, definition of the observed program behaviors. For instance, one may observe only the final result of program executions instead of considering all the intermediate steps of executions. Abstraction is defined to a concrete (more precise) model of execution.


Abstraction may be exact or faithful with respect to a property if one can answer a question about the property equally well on the concrete or abstract model. For instance, if one wishes to know what the result of the evaluation of a mathematical expression involving only integers +, -, ×, is worth modulo n, then one needs only perform all operations modulo n (a familiar form of this abstraction is casting out nines).


Abstractions, however, though not necessarily exact, should be sound. That is, it should be possible to get sound answers from them—even though the abstraction may simply yield a result of undecidability. For instance, students in a class may be abstracted by their minimal and maximal ages; if one asks whether a certain person belongs to that class, one may simply compare that person's age with the minimal and maximal ages; if his age lies outside the range, one may safely answer that the person does not belong to the class; if it does not, one may only answer "I don't know".


The level of abstraction included in a programming language can influence its overall usability. The Cognitive dimensions framework includes the concept of abstraction gradient in a formalism. This framework allows the designer of a programming language to study the trade-offs between abstraction and other characteristics of the design, and how changes in abstraction influence the language usability.


Abstractions can prove useful when dealing with computer programs, because non-trivial properties of computer programs are essentially undecidable (see Rice's theorem). As a consequence, automatic methods for deriving information on the behavior of computer programs either have to drop termination (on some occasions, they may fail, crash or never yield out a result), soundness (they may provide false information), or precision (they may answer "I don't know" to some questions).


Abstraction is the core concept of abstract interpretation. Model checking generally takes place on abstract versions of the studied systems.

simplify the design considerably

enable different role players to effectively work at various levels of abstraction

support the portability of (model-based ideally)

software artifacts

Abstraction principle (computer programming)

for an anti-pattern of one danger in abstraction

Abstraction inversion

for an abstract description of a set of data

Abstract data type

for an abstract description of a computational procedure

Algorithm

for making a term into a function of a variable

Bracket abstraction

for structuring data independent of the processes that use it

Data modeling

for abstractions that hide implementation details

Encapsulation

for an aphorism about an (the?) optimum point in the space of abstractions

Greenspun's Tenth Rule

for abstraction where functions produce or consume other functions

Higher-order function

for making a term into a function of some variable

Lambda abstraction

List of abstractions (computer science)

for the opposite of abstraction in computing

Refinement

Integer (computer science)

Heuristic (computer science)

example of layered architecture for distributed simulation systems.

SimArch