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 punching paper tape. Later it referred to translation of high-level programming languages like Fortran and ALGOL. In fact, one of the earliest programs identifiable as a compiler was called Autocode. Parnas concluded that "automatic programming has always been a euphemism 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.

Contents

Mildred Koss, an early UNIVAC 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]

Some IDEs for Java and other languages have more advanced forms of source code generation, with which the programmer can interactively select and customize "snippets" of source code. Program "wizards", which allow the programmer to design graphical user interfaces interactively while the compiler invisibly generates the corresponding source code, are another common form of source code generation. This may be contrasted with, for example, user interface markup languages, which define user interfaces declaratively.

Besides the generation of code from a wizard or template, IDEs can also generate and manipulate code to automate code refactorings that would require multiple (error prone) manual steps, thereby improving developer productivity.[5] Examples of such features in IDEs are the refactoring class browsers for Smalltalk and those found in Java IDEs like Eclipse.

A specialized alternative involves the generation of optimized code for quantities defined mathematically within a Computer algebra system (CAS). Compiler optimization consisting of finding common intermediates of a vector of size n{\displaystyle n} requires a complexity of O(n2){\displaystyle O(n^{2})} or O(n3){\displaystyle O(n^{3})} operations whereas the very design of a computer algebra system requires only O(n){\displaystyle O(n)} operations.[6][7][8] These facilities can be used as pre-optimizer before processing by the compiler. This option has been used for handling mathematically large expressions in e.g. computational (quantum) chemistry.

Examples:

Acceleo is an open source code generator for Eclipse used to generate any textual language (Java, PHP, Python, etc.) from EMF models defined from any metamodel (UML, SysML, etc.).

Actifsource is a plugin for Eclipse that allows graphical modelling and model-based code generation using custom templates.

HPRCARCHITECT (from MNB Technologies, Inc) is an artificial intelligence-based software development tool with a Virtual Whiteboard human interface. Language and technology agnostic, the tool's development was funded by the US Air Force to solve the problem of code generation for systems targeting mixed processor technologies.

Screen Sculptor,[9] SoftCode,[10] UI Programmer,[11] and Genifer[12] are examples of pioneering program generators that arose during the mid-1980s through the early 1990s. They developed and advanced the technology of extendable, template based source code generators on a mass market scale.

GeneXus is a Cross-Platform, knowledge representation-based, development tool, mainly oriented to enterprise-class applications for Web applications, smart devices and the Microsoft Windows platform. A developer describes an application in a high-level, mostly declarative language, from which native code is generated for multiple environments.

Bidji is an Apache Ant project for code generation and data transformation.