Dirichlet distribution: Difference between revisions
major formatting improvements |
|||
Line 1: | Line 1: | ||
{{Programming paradigms}} | |||
In [[computer science]], the term '''automatic programming'''<ref>Ricardo Aler Mur, "[http://www.evannai.inf.uc3m.es/et/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]] 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 [[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."<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> | |||
==Origin== | |||
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 == | |||
''Generative programming'' is a style of [[computer programming]] that uses automated [[source code]] creation through [[generic programming|generic]] [[Frame Technology (software engineering)|frames]], [[class (computer science)|classes]], [[Prototype-based programming|prototypes]], [[template processor|template]]s, [[aspect (computer science)|aspect]]s, and [[Code generation (compiler)|code generator]]s 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]] and [[Product Family Engineering|product family engineering]]. | |||
==Source code generation== | |||
''Source code generation'' is the act of generating source code based on an [[Ontology (computer 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. 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. | |||
===Implementations=== | |||
{{Cleanup-spam|section|date=October 2010}} | |||
[[Integrated development environment|IDE]]s such as [[Eclipse (software)|Eclipse]], [[Interface Builder]] and [[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. This may be contrasted with, for example, [[user interface markup language]]s, which define user interfaces [[declarative programming|declaratively]]. | |||
Besides the generation of code from a wizard or template, IDEs can also generate and manipulate code to automate code [[refactor]]ings that would require multiple (error prone) manual steps, thereby improving developer productivity.<ref name="refactoring">[http://martinfowler.com/articles/refactoringRubicon.html Martin Fowler, "Crossing Refactoring's Rubicon"]</ref> Examples of such features in IDEs are the refactoring class browsers for [[Smalltalk]] and those found in Java IDEs like [[IntelliJ]] and [[Eclipse (software)|Eclipse]]. | |||
A specialized alternative involves the generation of ''[[compiler optimization|optimized]]'' code for quantities defined mathematically within a [[Computer algebra system]] (CAS). Compiler optimization consisting of finding common intermediates of a vector of size <math> n </math> requires a complexity of <math>O(n^2)</math> or <math>O(n^3)</math> operations whereas the very design of a computer algebra system requires only <math>O(n)</math> operations.<ref>C. Gomez and T.C. Scott, ''Maple Programs for Generating Efficient FORTRAN Code for Serial and Vectorized Machines'', [[Computer Physics Communications|Comput. Phys. Commun.]] '''115''', pp. 548-562, 1998 [http://www.sciencedirect.com/science/article/pii/S0010465598001143].</ref><ref>T.C. Scott, [[Ian Grant|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), [[Nuclear Instruments and Methods in Physics Research|Nucl. Instr. Meth. Phys. Res.]] '''389''', A, pp. 117-120, 1997 [http://www.sciencedirect.com/science/article/pii/S0168900297000594].</ref> 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 chemistry|computational (quantum) chemistry]]. | |||
Examples: | |||
* [[Acceleo]] is an open source code generator for [[Eclipse (software)|Eclipse]] used to generate any textual language (Java, PHP, Python, etc.) from [[Eclipse Modeling Framework|EMF]] models defined from any metamodel ([[Unified Modeling Language|UML]], [[SysML]], etc.). | |||
* [[Actifsource]] is a plugin for [[Eclipse (software)|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. | |||
* [[DMS Software Reengineering Toolkit]] is a system for defining arbitrary [[domain specific language]]s and translating them to other languages. | |||
* [[General-purpose declarative language]] uses the natural and built-in generative programming capabilities provided by macroexpansion in Common Lisp in order to achieve seamless automatic programming. | |||
* hprcARCHITECT (from [http://www.mnbtech.com MNB Technologies, Inc]) is an artificial intelligence-based software development tool with a Virtual Whiteboard human interface. Language and technology agnostic, the tools development was funded by the US Air Force to solve the problem of code generation for systems targeting mixed processor technologies. | |||
* [[Spring Roo]] is an [[open source]] active code generator for [[Spring Framework]] based [[Java (programming language)|Java]] applications. It uses [[AspectJ]] [[mixins]] to provide [[separation of concerns]] during round-trip maintenance. | |||
* [[RISE Editor|RISE]] is a free information modeling suit for system development using [[Entity-relationship model|ERD]] or [[Unified Modeling Language|UML]]. Database code generation for [[MySQL]], [[PostgreSQL]] and [[Microsoft SQL Server]]. Persistence code generation for [[C Sharp (programming language)|C#]] (.NET) and [[PHP]] including both [[SOAP]] and [[JSON]] style [[web service]]s and [[Ajax (programming)|AJAX]] proxy code. | |||
* The [[Maple (software)|Maple]] computer algebra system offers code generators optimizers with Fortran, C and Java. [[Mathematica]] and [[MuPAD]] have comparable interfaces. | |||
* Screen Sculptor,<ref>[http://books.google.com/books?id=a91QXlvTPHAC&pg=PA281&lpg=PA281&dq=%22screen+sculptor%22&source=bl&ots=EeT_58qiJI&sig=JCV7rTVDtAI_QpekYNVNX8KYMYw&hl=en&sa=X&ei=XWmbT6vYDYn30gHx3ZX0Dg&ved=0CEkQ6AEwBQ#v=onepage&q=%22screen%20sculptor%22&f=false Screen Sculptor]</ref> SoftCode,<ref>[http://www.drdobbs.com/184402499 Announcing Softcode Version 2.5]</ref> UI Programmer,<ref>[http://www.ousob.com/ng/isvd/ng6d817.php Wallsoft/Template Garden Software]</ref> and Genifer<ref>[http://books.google.com/books?id=s9Cn9nqq6dYC&pg=PA74&lpg=PA74&dq=genifer+program+generator&source=bl&ots=5QwLQp2hg_&sig=jHVzYh3-_1i3tyBrS1n9BnOS6qc&hl=en&sa=X&ei=ZWubT-eOOKLV0QGfn-nkDg&ved=0CCoQ6AEwAQ#v=onepage&q=genifer%20program%20generator&f=false Application Generators]</ref> 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. | |||
* Click2Code from onlinewebtech.com is also best for template driven code generation for any language. | |||
* [[GeneXus]] is a Cross-Platform, knowledge representation-based, development tool,[1] 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== | |||
{{too many see alsos|date=June 2013}} | |||
{{col-begin}}{{col-2}} | |||
* [[Code generation (compiler)]] | |||
* [[Compiler optimization|Code optimization (compiler)]] | |||
* [[Comparison of code generation tools]] | |||
* [[Template processor]] | |||
* [[Source-to-source compiler]] | |||
* [[Model Driven Engineering]] (MDE) | |||
* [[Model-driven architecture|Model Driven Architecture]] (MDA) | |||
* [[Domain-Specific Modeling]] (DSM) | |||
* [[Feature Oriented Programming]] | |||
* [[Program transformation]] | |||
{{col-2}} | |||
* [[Modeling language]] | |||
* [[Data transformation]] | |||
* [[Semantic translation]] | |||
* [[Vocabulary-based transformation]] | |||
* [[Metaprogramming]] | |||
* [[Language-oriented programming]] (LOP) | |||
* [[Object-oriented analysis and design]] (OOAD) | |||
* [[Unified Modeling Language]] (UML) | |||
{{col-end}} | |||
* [[artificial intelligence]] | |||
* [[Multi-agent system]] | |||
* [[Inductive programming]] | |||
==References== | |||
{{reflist}} | |||
*''Generative Programming: Methods, Tools, and Applications'' by Krzysztof Czarnecki and Ulrich W. Eisenecker, Addison Wesley, 2000. | |||
==External links== | |||
*[http://www.generative-programming.org/ ''Generative Programming'' book site: www.generative-programming.org] | |||
*[http://www.methodsandtools.com/archive/archive.php?id=86 Code Generation for Dummies] | |||
*[http://claude-gomez.fr/macrofort/macrofort.html Code Generation with Macrofort] | |||
{{DEFAULTSORT:Automatic Programming}} | |||
[[Category:Programming paradigms]] | |||
[[Category:Source code generation]] |
Revision as of 04:30, 4 February 2014
Template:Programming paradigms
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
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 act 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 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.
Implementations
Template:Cleanup-spam IDEs such as Eclipse, Interface Builder and Microsoft Visual Studio 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 IntelliJ and 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 requires a complexity of or operations whereas the very design of a computer algebra system requires only operations.[6][7] 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.
- 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.
- DMS Software Reengineering Toolkit is a system for defining arbitrary domain specific languages and translating them to other languages.
- General-purpose declarative language uses the natural and built-in generative programming capabilities provided by macroexpansion in Common Lisp in order to achieve seamless automatic programming.
- hprcARCHITECT (from MNB Technologies, Inc) is an artificial intelligence-based software development tool with a Virtual Whiteboard human interface. Language and technology agnostic, the tools development was funded by the US Air Force to solve the problem of code generation for systems targeting mixed processor technologies.
- Spring Roo is an open source active code generator for Spring Framework based Java applications. It uses AspectJ mixins to provide separation of concerns during round-trip maintenance.
- RISE is a free information modeling suit for system development using ERD or UML. Database code generation for MySQL, PostgreSQL and Microsoft SQL Server. Persistence code generation for C# (.NET) and PHP including both SOAP and JSON style web services and AJAX proxy code.
- The Maple computer algebra system offers code generators optimizers with Fortran, C and Java. Mathematica and MuPAD have comparable interfaces.
- Screen Sculptor,[8] SoftCode,[9] UI Programmer,[10] and Genifer[11] 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.
- Click2Code from onlinewebtech.com is also best for template driven code generation for any language.
- GeneXus is a Cross-Platform, knowledge representation-based, development tool,[1] 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
Template:Too many see alsos Template:Col-beginTemplate:Col-2
- Code generation (compiler)
- Code optimization (compiler)
- Comparison of code generation tools
- Template processor
- Source-to-source compiler
- Model Driven Engineering (MDE)
- Model Driven Architecture (MDA)
- Domain-Specific Modeling (DSM)
- Feature Oriented Programming
- Program transformation
- Modeling language
- Data transformation
- Semantic translation
- Vocabulary-based transformation
- Metaprogramming
- Language-oriented programming (LOP)
- Object-oriented analysis and design (OOAD)
- Unified Modeling Language (UML)
References
43 year old Petroleum Engineer Harry from Deep River, usually spends time with hobbies and interests like renting movies, property developers in singapore new condominium and vehicle racing. Constantly enjoys going to destinations like Camino Real de Tierra Adentro.
- Generative Programming: Methods, Tools, and Applications by Krzysztof Czarnecki and Ulrich W. Eisenecker, Addison Wesley, 2000.
External links
- Generative Programming book site: www.generative-programming.org
- Code Generation for Dummies
- Code Generation with Macrofort
- ↑ Ricardo Aler Mur, "Automatic Inductive Programming", ICML 2006 Tutorial. June 2006.
- ↑ D. L. Parnas. "Software Aspects of Strategic Defense Systems." American Scientist. November 1985.
- ↑ Chun, Wendy. "On Software, or the Persistence of Visual Knowledge." Grey Room 18. Boston: 2004, pg. 30.
- ↑ James Wilcox, "Paying Too Much for Custom Application Development", March 2011.
- ↑ Martin Fowler, "Crossing Refactoring's Rubicon"
- ↑ 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].
- ↑ 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 [2].
- ↑ Screen Sculptor
- ↑ Announcing Softcode Version 2.5
- ↑ Wallsoft/Template Garden Software
- ↑ Application Generators