World Library  
Flag as Inappropriate
Email this Article

Automatic programming

Article Id: WHEBN0001118035
Reproduction Date:

Title: Automatic programming  
Author: World Heritage Encyclopedia
Language: English
Subject: RISE Editor, Inductive programming, Programming paradigms, Software 2.0, Data transformation
Collection: Programming Paradigms, Source Code Generation
Publisher: World Heritage Encyclopedia

Automatic programming

In computer science, the term automatic programming[1] identifies a type of computer programming in which some mechanism generates a computer program to allow human programmers 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 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]


  • Origin 1
  • Generative programming 2
  • Source code generation 3
    • Implementations 3.1
  • See also 4
  • References 5
  • External links 6


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]

Generative programming

Generative programming is a style of computer programming that uses automated source code creation through generic frames, classes, prototypes, templates, aspects, and code generators to improve programmer productivity.[4] It is often related to code-reuse topics such as component-based software engineering and product family engineering.

Source code generation

Source code generation is the process of generating source code based on an ontological model such as a template and is accomplished with a programming tool such as a template processor or an integrated development environment (IDE). These tools allow the generation of source code through any of various means. A macro processor, such as the C preprocessor, which replaces patterns in source code according to relatively simple rules, is a simple form of source code generator.


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 requires a complexity of O(n^2) or O(n^3) operations whereas the very design of a computer algebra system requires only 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.


  • 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.
  • Altova MapForce is a graphical data mapping, conversion, and integration tool capable of generating application code in Java, C#, or C++ for executing recurrent transformations.
  • CodeFluent Entities from SoftFluent is a graphical tool integrated into Microsoft Visual Studio that generates .NET source code, in C# or Visual Basic.
  • 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.
  • The Maple computer algebra system offers code generators optimizers with Fortran, MATLAB, C and Java. Mathematica and MuPAD have comparable interfaces.
  • 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.

See also


  1. ^ Ricardo Aler Mur, "Automatic Inductive Programming", ICML 2006 Tutorial. June 2006.
  2. ^ D. L. Parnas. "Software Aspects of Strategic Defense Systems." American Scientist. November 1985.
  3. ^ Chun, Wendy. "On Software, or the Persistence of Visual Knowledge." Grey Room 18. Boston: 2004, pg. 30.
  4. ^ James Wilcox, "Paying Too Much for Custom Application Development", March 2011.
  5. ^ Martin Fowler, "Crossing Refactoring's Rubicon"
  6. ^ C. Gomez and T.C. Scott, Maple Programs for Generating Efficient FORTRAN Code for Serial and Vectorized Machines, Comput. Phys. Commun. 115, pp. 548-562, 1998 [1].
  7. ^ T.C. Scott and Wenxing Zhang, Efficient hybrid-symbolic methods for quantum mechanical calculations, Comput. Phys. Commun. 191, pp. 221-234, 2015 [2].
  8. ^ T.C. Scott, I.P. Grant, M.B. Monagan and V.R. Saunders, Numerical Computation of Molecular Integrals via optimized (vectorized) FORTRAN code, Proceedings of the Fifth International Workshop on New computing Techniques in Physics Research (Software Engineering, Neural Nets, Genetic Algorithms, Expert Systems, Symbolic Algebra, Automatic Calculations), held in Lausanne (Switzerland), Nucl. Instr. Meth. Phys. Res. 389, A, pp. 117-120, 1997 [3].
  9. ^ Screen Sculptor
  10. ^ Announcing Softcode Version 2.5
  11. ^ Wallsoft/Template Garden Software
  12. ^
  • Generative Programming: Methods, Tools, and Applications by Krzysztof Czarnecki and Ulrich W. Eisenecker, Addison Wesley, 2000.

External links

  • book site: www.generative-programming.orgGenerative Programming
  • Code Generation for Dummies
  • Code Generation with Macrofort
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.