Automatic programming: Difference between revisions

Content deleted Content added
 
(295 intermediate revisions by more than 100 users not shown)
Line 1:
{{short description|Type of computer programming}}
In [[computer science]], the term '''automatic programming'''<ref>Ricardo Aler Mur, "[http://et.evannai.inf.uc3m.es/icml06/aiptutorial.htm Automatic Inductive Programming]", ''ICML 2006 Tutorial''. June 2006.</ref> identifies a type of [[computer programming]] in which some mechanism generates a [[computer program]] rather than have human [[programmer]]s write the code.
 
In [[computer science]], '''automatic programming'''<ref>Ricardo Aler Mur, "[http://www.evannai.inf.uc3m.es/et/icml06/aiptutorial.htm Automatic Inductive Programming] {{Webarchive|url=https://web.archive.org/web/20160304073124/http://www.evannai.inf.uc3m.es/et/icml06/aiptutorial.htm |date=2016-03-04 }}", ''ICML 2006 Tutorial''. June 2006.</ref> is a type of [[computer programming]] in which some mechanism generates a [[computer program]], to allow human [[programmer]]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]], 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 language|high-level]] [[programming language]]s like [[Fortran]] and [[ALGOL]]. In fact, one of the earliest programs identifiable as a [[compiler]] was called [[Autocoder]]. Parnas concluded that "automatic programming has always been a [[euphemism]] for programming in a higher-level language than was then available to the programmer."<ref>D. L. Parnas. "[http://klabs.org/richcontent/software_content/papers/parnas_acm_85.pdf Software Aspects of Strategic Defense Systems]." ''American Scientist''. November 1985.</ref>
 
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 language]]s like [[Fortran]] and [[ALGOL]]. In fact, one of the earliest programs identifiable as a [[compiler]] was called [[Autocode]]. [[David Parnas|Parnas]] concluded that "automatic programming has always been a [[euphemism]] for programming in a higher-level language than was then available to the programmer."<ref>D. L. Parnas. "[https://web.stanford.edu/class/cs99r/readings/parnas1.pdf Software Aspects of Strategic Defense Systems]." ''American Scientist''. November 1985.</ref>
''Generative programming'' is a style of [[computer programming]] that uses automated [[source code]] creation through [[generic programming|generic]] [[class (computer science)|classes]], [[Prototype-based programming|prototypes]], [[template (programming)|template]]s, [[aspect (computer science)|aspect]]s, and [[Code generation (compiler)|code generator]]s to improve [[programmer]] productivity. It is often related to code-reuse topics such as [[software componentry|component-oriented programming]].
 
[[Program synthesis]] is one type of automatic programming where a procedure is created from scratch, based on mathematical requirements.
''Source code generation'' is the act of generating source code basing on an [[Ontology (computer science)|ontological]] model such as a [[Template (software engineering)|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. The simplest form of source code generator is a [[Macro (computer science)|macro]] processor, such as the [[C preprocessor]], which replaces patterns in source code according to relatively simple rules.
 
==Origin==
IDEs such as [[Microsoft Visual Studio]] have more advanced forms of source code generation, with which the programmer can interactively select and customize "[[snippet management|snippet]]s" of source code. Program "[[wizard (software)|wizard]]s", which allow the programmer to design [[graphical user interface]]s interactively while the compiler invisibly generates the corresponding source code, are another common form of source code generation.
[[Milly Koss|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''."<ref>Chun, Wendy. "On Software, or the Persistence of Visual Knowledge." Grey Room 18. Boston: 2004, pg. 30.</ref>
 
==Generative programming==
==Implementations==
'''Generative programming''' and the related term [[Metaprogramming|meta-programming]]<ref>{{cite web
* [[NConstruct]] is Windows and Web rapid enterprise application development tool and environment for [[.NET Framework]] environment. It generates .NET C# source code for all tiers of the application through simple wizard procedures.
|quote=Generative programming, as a subdomain of meta-programming, describes the practice of writing programs that generate other programs as part of their execution.
** [http://www.nconstruct.com NConstruct - Intelligent Software Factory]
|url=https://scala-lms.github.io/tutorials/01_overview.html
|title=About Generative Programming}}</ref> are concepts whereby programs can be written "to manufacture software components in an automated way"<ref>{{cite book
|quote=Generative Programming (GP) is an attempt to manufacture software components in an automated way by developing programs that synthesize other programs.
|author=P. Cointe |title=Unconventional Programming Paradigms
|volume=3566 |pages=315–325 |date=2005|doi=10.1007/11527800_24
|series=Lecture Notes in Computer Science |isbn=978-3-540-27884-9 |chapter=Towards Generative Programming }}</ref> just as automation has improved "production of traditional commodities such as garments, automobiles, chemicals, and electronics."<ref>{{cite web
|title=Generative Programming: Concepts and Experiences (GPCE)
|url=http://www.sigplan.org/Conferences/GPCE}}</ref><ref>A conference of [[SIGPLAN]] on
this topic is planned for November 2018. Earlier/1970s attempts in this area included [[Yacc]]
and the related Lex programs.</ref>
 
The goal is to improve [[programmer]] productivity.<ref>James Wilcox, "[http://edgewatertech.wordpress.com/2011/03/11/paying-too-much-for-custom-application-implementation-code-generation/ Paying Too Much for Custom Application Development]", March 2011.</ref> It is often related to code-reuse topics such as [[component-based software engineering]].
* [[MyGeneration]] is an extremely flexible template based code generator written in Microsoft [[.NET Framework]]. MyGeneration is great at generating code for ORM architectures. The meta-data from your database is made available to the templates through the MyMeta API.
** [http://sourceforge.net/projects/mygeneration MyGeneration Code Generator]
 
==Source-code generation==
* [[Bad!RAD]] Simple component generation for spring/ibatis/hibernate/yui using bottom up database driven approach. In development URL, supports Oracle and HSQLDB ** [http://badrad.com Bad!RAD Code Generator]
''Source-code generation'' is the process of generating source code based on a description of the problem<ref>{{cite web
|quote=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 ...
|url=https://www.pcmag.com/encyclopedia/term/37909/application-generator
|title=Application generator |publisher=PCmag.com}}</ref> or an [[ontology (information science)|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.
 
Modern programming languages are well supported by tools like [https://www.json4swift.com/ Json4Swift] ([[Swift (programming language)|Swift]]) and [https://www.json2kotlin.com/ Json2Kotlin] ([[Kotlin (programming language)|Kotlin]]).
* [[AjGenesis]] Open source text artifact generator, based on free user-defined models, and programmable tasks and templates. It can generate Java, .NET, PHP, ASP.NET, JSP source code and page, complete solutions consuming databases, Hibernate, NHibernate, and other frameworks. It uses patterns as Entities, DAOs, Repository, DDD concepts, but you can add your own. In constant development URL, [http://www.ajlopez.com/ajgenesis AjGenesis]
 
Programs that could generate [[COBOL]] code include:
* the DYL250/DYL260/DYL270/DYL280 series<ref>{{cite web
|url=http://www.sysed.com/DnLoads/RefCards/DYL280.pdf
|title=DYL-280 Command Syntax
|access-date=2018-09-03
|archive-url=https://web.archive.org/web/20180730111004/http://www.sysed.com/DnLoads/RefCards/DYL280.pdf
|archive-date=2018-07-30
|url-status=dead
}}</ref>
* [[Business Controls Corporation]]'s SB-5
* [[KPMG|Peat Marwick Mitchell]]'s PMM2170 application-program-generator package
These application generators supported COBOL inserts and overrides.
 
A [[Macro (computer science)|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. [[Source-to-source compiler|Source-to-source]] code generation tools also exist.<ref>Noaje, Gabriel, Christophe Jaillet, and Michaël Krajecki. "[https://www.researchgate.net/profile/Ponnuswamy_Sadayappan/publication/221302775_Automatic_C-to-CUDA_Code_Generation_for_Affine_Programs/links/09e4150e7f97085734000000/Automatic-C-to-CUDA-Code-Generation-for-Affine-Programs.pdf Source-to-source code translator: OpenMP C to CUDA]". High Performance Computing and Communications (HPCC), 2011 IEEE 13th International Conference on. IEEE, 2011.</ref><ref>Quinlan, Dan, and Chunhua Liao. "[https://www.researchgate.net/profile/Chunhua_Liao/publication/267861836_The_ROSE_Source-to-Source_Compiler_Infrastructure/links/5465a8120cf2f5eb17ff4238.pdf The ROSE source-to-source compiler infrastructure]". Cetus users and compiler infrastructure workshop, in conjunction with PACT. Vol. 2011. 2011.</ref>
 
[[Large language model]]s such as [[ChatGPT]] are capable of generating a program's source code from a description of the program given in a natural language.<ref name="ChatGPT can write code">{{Cite web |url=https://www.zdnet.com/article/chatgpt-can-write-code-now-researchers-say-its-good-at-fixing-bugs-too/ |title=ChatGPT can write code. Now researchers say it's good at fixing bugs, too |website=ZDNET |date=January 26, 2023 |first=Liam |last=Tung |access-date=June 22, 2023 |archive-date=February 3, 2023 |archive-url=https://web.archive.org/web/20230203051252/https://www.zdnet.com/article/chatgpt-can-write-code-now-researchers-say-its-good-at-fixing-bugs-too/ |url-status=live}}</ref>
 
Many [[Relational database system|relational database systems]] provide a function that will export the content of the database as [[SQL]] [[Data definition language|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==
{{Main article|Low-code development platforms}}
 
A [[Low-code development platforms|low-code development platform]] (LCDP) is software that provides an environment [[programmer]]s use to create [[application software]] through [[graphical user interface]]s and configuration instead of traditional [[computer programming]].
 
==See also==
* [[Automatic bug fixing]]
{{col-begin}}{{col-2}}
* [[CodeAutomated generationmachine (compiler)learning]]
* [[Comparison of code generation tools]]
* [[Template processor]]
* [[SourceFeature-to-sourceoriented compilerprogramming]]
* [[Aspect-orientedGitHub programmingCopilot]]
* [[AI-assisted software development]]
* [[Model Driven Engineering]] (MDE)
* [[Language-oriented programming]]
* [[Model-driven architecture]] (MDA)
* [[Domain-Specific Modeling]] (DSM)
* [[Modeling language]]
* [[DataProgram transformation]]
* [[Semantic translation]]
* [[Transformation language]] (TL)
* [[XML transformation language]] (XTL)
* [[Model Transformation Language]] (MTL)
* [[Semantic translation]]
* [[Vocabulary-based transformation]]
* [[Fourth-generation programming language]]
* [[Data mapping]]
* [[Low-code development platform]]s
* [[Metadata]]
* [[MetaprogrammingEmergent Coding]]
{{col-2}}
* [[Modeling perspectives]]
* [[QVT|MOF Queries/Views/Transformations]] (QVT)
* [[Meta-Object Facility]] (MOF)
* [[Language-oriented programming]] (LOP)
** [[Domain Specific Language]] (DSL)
* Generative programming (GP)
* [[Generative Modelling Language]] (GML)
* [[Intentional Programming]] (IP)
* [[Software factory]]
* [[Meta-model|Metamodel]]
* [[Meta-modeling|Metamodeling]]
* [[Meta-modeling technique|Metamodeling technique]]
* [[XML Metadata Interchange]] (XMI)
* [[Object-oriented analysis and design]] (OOAD)
* [[Modeling language]]
* [[Unified Modeling Language]] (UML)
{{col-end}}
 
==ReferencesNotes==
{{reflist}}
 
==References==
*''Generative Programming: Methods, Tools, and Applications'' by Krzysztof Czarnecki and Ulrich W. Eisenecker, Addison Wesley, 2000.
 
==External links==
* [http://www.codegenerationmethodsandtools.netcom/archive/archive.php?id=86 Code Generation Networkfor Dummies]
*[http://www.generative-programming.org/ ''Generative Programming'' official site: www.generative-programming.org]
*[http://gpce.org/ GPCE (Generative Programming and Component Engineering) conference]
*[http://www.program-transformation.org/Transform/GenerativeProgrammingWiki Generative Programming Wiki]
 
{{Programming paradigms navbox}}
{{compu-prog-stub}}
{{Authority control}}
 
{{DEFAULTSORT:Automatic Programming}}
[[Category:Programming paradigms]]
[[Category:Source code generation]]
 
[[de:Generative Programmierung]]
[[fr:Atelier de génie logiciel]]