Metalinguistic abstraction

Last updated

In computer science, metalinguistic abstraction is the process of solving complex problems by creating a new language or vocabulary to better understand the problem space. More generally, it also encompasses the ability or skill of a programmer to think outside of the pre-conceived notions of a specific language in order to exploratorily investigate a problem space in search of the kind of solutions which are most natural or cognitively ergonomic to it. It is a recurring theme in the seminal MIT textbook Structure and Interpretation of Computer Programs , which uses Scheme, a dialect of Lisp, as a framework for constructing new languages.

Contents

Explanation

For example, consider modelling an airport inside a computer. The airport has elements like passengers, bookings, employees, budgets, planes, luggage, arrivals and departures, and transit services.

A procedural (e.g. C) programmer might create data structures to represent these elements of an airport and procedures or routines to operate on those data structures and update them, modelling the airport as a series of processes undergone by its various elements. E.g., bookings is a database used to keep passengers and planes synchronised via updates logged as arrivals and departures, budgets are similar but for money: airports are a lot of things that need to get done in the right order to see that passengers get where they're going.

An object-oriented (e.g. Java) programmer might create objects to represent the elements of the airport with methods which represent their behaviors, modelling the airport as a collection of possibly related things which characteristically interact with each other. E.g., passengers, employees, and planes possess location attributes which can be modified via applicable transit methods: transit services have methods to bring employees and passengers to and from airports, planes have methods to bring passengers along with themselves between different airports: airports are a grouping of things working together as intended.

A functional (e.g. Scheme) programmer might create higher-order functions representing both the elements and behaviors or processes of the airport, modelling the airport as a map of relations between elements in its various domains and those in their assorted codomains. E.g., airports map budgets to bookings schedules, each of which is itself a map of elements to elements: balances of income and expenditure, and balances of arrivals and departures, each of which is, recursively, its own mapping of elements and their own mappings in kind, collectively comprising a set of morphisms: airports are, transitively, the evaluative transformation of a certain spacetime economy.

Finally, a metalinguistic programmer might abstract the problem by creating new domain-specific languages for modelling airports, with peculiar primitives and types for doing so. The new language could encompass any or all of the above approaches where most suitable, [1] potentially enabling the programmer to retain both the abstract generality of the functional model, the intuitive sensibility of the object model, and the detail-driven pragmatism of the procedural model.

Because the creation of functional metalinguistic abstractions in non-functional languages can be cumbersome while the reverse is usually trivial (e.g. it is generally much easier to take a side-effect-free programming abstraction and simply add effects to it than it is to take a stateful abstraction and work around or encapsulate its propagation of state), and because of the syntactic flexibility and referential safety of functional macros, metalinguistic programming is mostly idiomatic of functional programming languages.

See also

Related Research Articles

<span class="mw-page-title-main">Programming language</span> Language for communicating instructions to a machine

A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language.

In software engineering and computer science, abstraction is:

<i>Structure and Interpretation of Computer Programs</i> Computer science textbook

Structure and Interpretation of Computer Programs (SICP) is a computer science textbook by Massachusetts Institute of Technology professors Harold Abelson and Gerald Jay Sussman with Julie Sussman. It is known as the "Wizard Book" in hacker culture. It teaches fundamental principles of computer programming, including recursion, abstraction, modularity, and programming language design and implementation.

<span class="mw-page-title-main">Data model</span> Model that organizes elements of data and how they relate to one another and to real-world entities.

A data model is an abstract model that organizes elements of data and standardizes how they relate to one another and to the properties of real-world entities. For instance, a data model may specify that the data element representing a car be composed of a number of other elements which, in turn, represent the color and size of the car and define its owner.

Programming paradigms are a way to classify programming languages based on their features. Languages can be classified into multiple paradigms.

In computer science, declarative programming is a programming paradigm—a style of building the structure and elements of computer programs—that expresses the logic of a computation without describing its control flow.

Software design is the process by which an agent creates a specification of a software artifact intended to accomplish goals, using a set of primitive components and subject to constraints. The term is sometimes used broadly to refer to "all the activity involved in conceptualizing, framing, implementing, commissioning, and ultimately modifying" the software, or more specifically "the activity following requirements specification and before programming, as ... [in] a stylized software engineering process."

Software development is the process of conceiving, specifying, designing, programming, documenting, testing, and bug fixing involved in creating and maintaining applications, frameworks, or other software components. Software development involves writing and maintaining the source code, but in a broader sense, it includes all processes from the conception of the desired software through the final manifestation, typically in a planned and structured process often overlapping with software engineering. Software development also includes research, new development, prototyping, modification, reuse, re-engineering, maintenance, or any other activities that result in software products.

ABAP is a high-level programming language created by the German software company SAP SE. It is currently positioned, alongside Java, as the language for programming the SAP NetWeaver Application Server, which is part of the SAP NetWeaver platform for building business applications.

A modeling language is any artificial language that can be used to express information or knowledge or systems in a structure that is defined by a consistent set of rules. The rules are used for interpretation of the meaning of components in the structure Programing language.

A domain-specific language (DSL) is a computer language specialized to a particular application domain. This is in contrast to a general-purpose language (GPL), which is broadly applicable across domains. There are a wide variety of DSLs, ranging from widely used languages for common domains, such as HTML for web pages, down to languages used by only one or a few pieces of software, such as MUSH soft code. DSLs can be further subdivided by the kind of language, and include domain-specific markup languages, domain-specific modeling languages, and domain-specific programming languages. Special-purpose computer languages have always existed in the computer age, but the term "domain-specific language" has become more popular due to the rise of domain-specific modeling. Simpler DSLs, particularly ones used by a single application, are sometimes informally called mini-languages.

In computing, an abstraction layer or abstraction level is a way of hiding the working details of a subsystem. Examples of software models that use layers of abstraction include the OSI model for network protocols, OpenGL, and other graphics libraries, which allow the separation of concerns to facilitate interoperability and platform independence. Another example is Media Transfer Protocol. An abstraction layer has three components: protocol abstraction layer, extensions abstraction layer, and driver abstraction layer.

In computer programming, a software framework is an abstraction in which software, providing generic functionality, can be selectively changed by additional user-written code, thus providing application-specific software. It provides a standard way to build and deploy applications and is a universal, reusable software environment that provides particular functionality as part of a larger software platform to facilitate the development of software applications, products and solutions.

In computing, a parallel programming model is an abstraction of parallel computer architecture, with which it is convenient to express algorithms and their composition in programs. The value of a programming model can be judged on its generality: how well a range of different problems can be expressed for a variety of different architectures, and its performance: how efficiently the compiled programs can execute. The implementation of a parallel programming model can take the form of a library invoked from a sequential language, as an extension to an existing language, or as an entirely new language.

In computer programming, Intentional Programming is a programming paradigm developed by Charles Simonyi that encodes in software source code the precise intention which programmers have in mind when conceiving their work. By using the appropriate level of abstraction at which the programmer is thinking, creating and maintaining computer programs become easier. By separating the concerns for intentions and how they are being operated upon, the software becomes more modular and allows for more reusable software code.

Object-oriented analysis and design (OOAD) is a technical approach for analyzing and designing an application, system, or business by applying object-oriented programming, as well as using visual modeling throughout the software development process to guide stakeholder communication and product quality.

Executable UML is both a software development method and a highly abstract software language. It was described for the first time in 2002 in the book "Executable UML: A Foundation for Model-Driven Architecture". The language "combines a subset of the UML graphical notation with executable semantics and timing rules." The Executable UML method is the successor to the Shlaer–Mellor method.

Domain-driven design (DDD) is a major software design approach, focusing on modeling software to match a domain according to input from that domain's experts.

Object-Oriented Programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields, and the code is in the form of procedures.

This glossary of computer science is a list of definitions of terms and concepts used in computer science, its sub-disciplines, and related fields, including terms relevant to software, data science, and computer programming.

References

  1. Structure and Interpretation of Computer Programs, Part 4 — Metalinguistic Abstraction