source code generation
   HOME

TheInfoList



OR:

In
computer science Computer science is the study of computation, information, and automation. Computer science spans Theoretical computer science, theoretical disciplines (such as algorithms, theory of computation, and information theory) to Applied science, ...
, automatic programming is a type of
computer programming Computer programming or coding is the composition of sequences of instructions, called computer program, programs, that computers can follow to perform tasks. It involves designing and implementing algorithms, step-by-step specifications of proc ...
in which some mechanism generates a
computer program A computer program is a sequence or set of instructions in a programming language for a computer to Execution (computing), execute. It is one component of software, which also includes software documentation, documentation and other intangibl ...
, to allow human
programmer A programmer, computer programmer or coder is an author of computer source code someone with skill in computer programming. The professional titles Software development, ''software developer'' and Software engineering, ''software engineer' ...
s to write the code at a higher abstraction level. There has been little agreement on the precise definition of automatic programming, mostly because its meaning has changed over time.
David Parnas David Lorge Parnas (born February 10, 1941) is a Canadian early pioneer of software engineering, who developed the concept of information hiding in modular programming, which is an important element of object-oriented programming today. He is al ...
, tracing the history of "automatic programming" in published research, noted that in the 1940s it described automation of the manual process of punching
paper tape Five- and eight-hole wide punched paper tape Paper tape reader on the Harwell computer with a small piece of five-hole tape connected in a circle – creating a physical program loop Punched tape or perforated paper tape is a form of data st ...
. Later it referred to translation of
high-level programming language A high-level programming language is a programming language with strong Abstraction (computer science), abstraction from the details of the computer. In contrast to low-level programming languages, it may use natural language ''elements'', be ea ...
s like Fortran and
ALGOL ALGOL (; short for "Algorithmic Language") is a family of imperative computer programming languages originally developed in 1958. ALGOL heavily influenced many other languages and was the standard method for algorithm description used by the ...
. In fact, one of the earliest programs identifiable as a
compiler In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
was called Autocode. Parnas concluded that "automatic programming has always been a
euphemism A euphemism ( ) is when an expression that could offend or imply something unpleasant is replaced with one that is agreeable or inoffensive. Some euphemisms are intended to amuse, while others use bland, inoffensive terms for concepts that the u ...
for programming in a higher-level language than was then available to the programmer."
Program synthesis In computer science, program synthesis is the task to construct a computer program, program that provably correct, provably satisfies a given high-level formal specification. In contrast to program verification, the program is to be constructed rat ...
is one type of automatic programming where a procedure is created from scratch, based on mathematical requirements.


Origin

Mildred Koss, an early
UNIVAC UNIVAC (Universal Automatic Computer) was a line of electronic digital stored-program computers starting with the products of the Eckert–Mauchly Computer Corporation. Later the name was applied to a division of the Remington Rand company and ...
programmer, explains: "Writing machine code involved several tedious steps—breaking down a process into discrete instructions, assigning specific memory locations to all the commands, and managing the I/O buffers. After following these steps to implement mathematical routines, a sub-routine library, and sorting programs, our task was to look at the larger programming process. We needed to understand how we might reuse tested code and have the machine help in programming. As we programmed, we examined the process and tried to think of ways to abstract these steps to incorporate them into higher-level language. This led to the development of interpreters, assemblers, compilers, and generators—programs designed to operate on or produce other programs, that is, ''automatic programming''."


Generative programming

Generative programming and the related term meta-programming are concepts whereby programs can be written "to manufacture software components in an automated way" just as automation has improved "production of traditional commodities such as garments, automobiles, chemicals, and electronics." The goal is to improve
programmer A programmer, computer programmer or coder is an author of computer source code someone with skill in computer programming. The professional titles Software development, ''software developer'' and Software engineering, ''software engineer' ...
productivity. It is often related to code-reuse topics such as
component-based software engineering Component-based software engineering (CBSE), also called component-based development (CBD), is a style of software engineering that aims to construct a software system from software component, components that are loosely-Coupling (computer program ...
.


Source-code generation

''Source-code generation'' is the process of generating source code based on a description of the problem or an
ontological Ontology is the philosophical study of being. It is traditionally understood as the subdiscipline of metaphysics focused on the most general features of reality. As one of the most fundamental concepts, being encompasses all of reality and every ...
model such as a template and is accomplished with a
programming tool A programming tool or software development tool is a computer program that is used to develop another computer program, usually by helping the developer manage computer files. For example, a programmer may use a tool called a source code editor ...
such as a
template processor A template processor (also known as a template engine or template parser) is software designed to combine ''template''s with data (defined by a data model) to produce resulting documents or programs. The language that the templates are writte ...
or an
integrated development environment An integrated development environment (IDE) is a Application software, software application that provides comprehensive facilities for software development. An IDE normally consists of at least a source-code editor, build automation tools, an ...
(IDE). These tools allow the generation of
source code In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer. Since a computer, at base, only ...
through any of various means. Modern programming languages are well supported by tools lik
Json4Swift
(
Swift Swift or SWIFT most commonly refers to: * SWIFT, an international organization facilitating transactions between banks ** SWIFT code * Swift (programming language) * Swift (bird), a family of birds It may also refer to: Organizations * SWIF ...
) an
Json2Kotlin
( Kotlin). Programs that could generate
COBOL COBOL (; an acronym for "common business-oriented language") is a compiled English-like computer programming language designed for business use. It is an imperative, procedural, and, since 2002, object-oriented language. COBOL is primarily ...
code include: * the DYL250/DYL260/DYL270/DYL280 series * Business Controls Corporation's SB-5 * Peat Marwick Mitchell's PMM2170 application-program-generator package These application generators supported COBOL inserts and overrides. A macro processor, such as the
C preprocessor The C preprocessor (CPP) is a text file processor that is used with C, C++ and other programming tools. The preprocessor provides for file inclusion (often header files), macro expansion, conditional compilation, and line control. Although ...
, which replaces patterns in source code according to relatively simple rules, is a simple form of source-code generator. Source-to-source code generation tools also exist.Quinlan, Dan, and Chunhua Liao.
The ROSE source-to-source compiler infrastructure
. Cetus users and compiler infrastructure workshop, in conjunction with PACT. Vol. 2011. 2011.
Large language model A large language model (LLM) is a language model trained with self-supervised machine learning on a vast amount of text, designed for natural language processing tasks, especially language generation. The largest and most capable LLMs are g ...
s such as
ChatGPT ChatGPT is a generative artificial intelligence chatbot developed by OpenAI and released on November 30, 2022. It uses large language models (LLMs) such as GPT-4o as well as other Multimodal learning, multimodal models to create human-like re ...
are capable of generating a program's source code from a description of the program given in a natural language. Many relational database systems provide a function that will export the content of the database as
SQL Structured Query Language (SQL) (pronounced ''S-Q-L''; or alternatively as "sequel") is a domain-specific language used to manage data, especially in a relational database management system (RDBMS). It is particularly useful in handling s ...
data definition queries, which may then be executed to re-import the tables and their data, or migrate them to another RDBMS.


Low-code applications

A
low-code development platform A low-code development platform (LCDP) provides a development environment used to create application software, generally through a graphical user interface (as opposed to only writing code, though some coding is possible and may be required). A l ...
(LCDP) is software that provides an environment
programmer A programmer, computer programmer or coder is an author of computer source code someone with skill in computer programming. The professional titles Software development, ''software developer'' and Software engineering, ''software engineer' ...
s use to create
application software Application software is any computer program that is intended for end-user use not operating, administering or programming the computer. An application (app, application program, software application) is any program that can be categorized as ...
through
graphical user interface A graphical user interface, or GUI, is a form of user interface that allows user (computing), users to human–computer interaction, interact with electronic devices through Graphics, graphical icon (computing), icons and visual indicators such ...
s and configuration instead of traditional
computer programming Computer programming or coding is the composition of sequences of instructions, called computer program, programs, that computers can follow to perform tasks. It involves designing and implementing algorithms, step-by-step specifications of proc ...
.


See also

* Automatic bug fixing * Automated machine learning * Comparison of code generation tools *
Feature-oriented programming In computer programming, feature-oriented programming (FOP) or feature-oriented software development (FOSD) is a programming paradigm for program generation in software product lines (SPLs) and for incremental development of programs. History F ...
*
GitHub Copilot GitHub Copilot is a code completion and automatic programming tool developed by GitHub and OpenAI that assists users of Visual Studio Code, Visual Studio, Neovim, and JetBrains integrated development environments (IDEs) by autocomplete, autocom ...
*
Language-oriented programming Language-oriented programming (LOP) is a software-development paradigm where "language" is a software building block with the same status as objects, modules and components, and rather than solving problems in general-purpose programming languages, ...
*
Modeling language A modeling language is any artificial language that can be used to express data, 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 ...
*
Program transformation A program transformation is any operation that takes a computer program and generates another program. In many cases the transformed program is required to be semantically equivalent to the original, relative to a particular Formal semantics of p ...
*
Semantic translation Semantic translation is the process of using semantic information to aid in the translation of data in one representation or data model to another representation or data model. Semantic translation takes advantage of semantics that associate mean ...
*
Vocabulary-based transformation In metadata, a vocabulary-based transformation (VBT) is a transformation aided by the use of a semantic equivalence statements within a controlled vocabulary. Many organizations today require communication between two or more computers. Althoug ...
*
Fourth-generation programming language A fourth-generation programming language (4GL) is a high-level programming language, high-level computer programming language that belongs to a class of languages envisioned as an advancement upon third-generation programming languages (3GL). Each ...
*
Low-code development platform A low-code development platform (LCDP) provides a development environment used to create application software, generally through a graphical user interface (as opposed to only writing code, though some coding is possible and may be required). A l ...
s * Emergent Coding


Notes


References

*''Generative Programming: Methods, Tools, and Applications'' by Krzysztof Czarnecki and Ulrich W. Eisenecker, Addison Wesley, 2000.


External links


Code Generation for Dummies
{{DEFAULTSORT:Automatic Programming Programming paradigms Source code generation