Incomputer science,automatic programming[1] is a type ofcomputer programming in which some mechanism generates acomputer program, to allow humanprogrammers 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, tracing the history of "automatic programming" in published research, noted that in the 1940s it described automation of the manual process of punchingpaper tape. Later it referred to translation ofhigh-level programming languages likeFortran andALGOL. In fact, one of the earliest programs identifiable as acompiler was calledAutocode.Parnas concluded that "automatic programming has always been aeuphemism for programming in a higher-level language than was then available to the programmer."[2]
Program synthesis is one type of automatic programming where a procedure is created from scratch, based on mathematical requirements.
Mildred Koss, an earlyUNIVAC 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."[3]
Generative programming and the related termmeta-programming[4] are concepts whereby programs can be written "to manufacture software components in an automated way"[5] just as automation has improved "production of traditional commodities such as garments, automobiles, chemicals, and electronics."[6][7]
The goal is to improveprogrammer productivity.[8] It is often related to code-reuse topics such ascomponent-based software engineering.
Source-code generation is the process of generating source code based on a description of the problem[9] or anontological model such as a template and is accomplished with aprogramming tool such as atemplate processor or anintegrated development environment (IDE). These tools allow the generation ofsource code through any of various means.
Modern programming languages are well supported by tools likeJson4Swift (Swift) andJson2Kotlin (Kotlin).
Programs that could generateCOBOL code include:
These application generators supported COBOL inserts and overrides.
Amacro processor, such as theC preprocessor, 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.[11][12]
Large language models such asChatGPT are capable of generating a program's source code from a description of the program given in a natural language.[13]
Manyrelational database systems provide a function that will export the content of the database asSQLdata definition queries, which may then be executed to re-import the tables and their data, or migrate them to another RDBMS.
Alow-code development platform (LCDP) is software that provides an environmentprogrammers use to createapplication software throughgraphical user interfaces and configuration instead of traditionalcomputer programming.
Generative programming, as a subdomain of meta-programming, describes the practice of writing programs that generate other programs as part of their execution.
Generative Programming (GP) is an attempt to manufacture software components in an automated way by developing programs that synthesize other programs.
Software that generates application programs from descriptions of the problem rather than by traditional programming. It is at a higher level and easier to use than a high-level programming language such as ...