Automatic programming

Last updated

In computer science, automatic programming [1] is 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.

Contents

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.

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 and the related term meta-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 improve programmer productivity. [8] It is often related to code-reuse topics such as component-based software engineering.

Source-code generation

Source-code generation is the process of generating source code based on a description of the problem [9] or 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.

Modern programming languages are well supported by tools like Json4Swift (Swift) and Json2Kotlin (Kotlin).

Programs that could generate COBOL code include:

These application generators supported COBOL inserts and overrides.

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. Source-to-source code generation tools also exist. [11] [12]

Large language models such as ChatGPT are capable of generating a program's source code from a description of the program given in a natural language. [13]

Low-code applications

A low-code development platform (LCDP) is software that provides an environment programmers use to create application software through graphical user interfaces and configuration instead of traditional computer programming.

See also

Notes

  1. Ricardo Aler Mur, "Automatic Inductive Programming Archived 2016-03-04 at the Wayback Machine ", 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. "About Generative Programming". Generative programming, as a subdomain of meta-programming, describes the practice of writing programs that generate other programs as part of their execution.
  5. P. Cointe (2005). "Towards Generative Programming". Unconventional Programming Paradigms. Lecture Notes in Computer Science. Vol. 3566. pp. 315–325. doi:10.1007/11527800_24. ISBN   978-3-540-27884-9. Generative Programming (GP) is an attempt to manufacture software components in an automated way by developing programs that synthesize other programs.
  6. "Generative Programming: Concepts and Experiences (GPCE)".
  7. 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.
  8. James Wilcox, "Paying Too Much for Custom Application Development", March 2011.
  9. "Application generator". PCmag.com. 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 ...
  10. "DYL-280 Command Syntax" (PDF). Archived from the original (PDF) on 2018-07-30. Retrieved 2018-09-03.
  11. Noaje, Gabriel, Christophe Jaillet, and Michaël Krajecki. "Source-to-source code translator: OpenMP C to CUDA". High Performance Computing and Communications (HPCC), 2011 IEEE 13th International Conference on. IEEE, 2011.
  12. Quinlan, Dan, and Chunhua Liao. "The ROSE source-to-source compiler infrastructure". Cetus users and compiler infrastructure workshop, in conjunction with PACT. Vol. 2011. 2011.
  13. Tung, Liam (January 26, 2023). "ChatGPT can write code. Now researchers say it's good at fixing bugs, too". ZDNET. Archived from the original on February 3, 2023. Retrieved June 22, 2023.

Related Research Articles

<span class="mw-page-title-main">Assembly language</span> Low-level programming language

In computer programming, assembly language, often referred to simply as assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence between the instructions in the language and the architecture's machine code instructions. Assembly language usually has one statement per machine instruction (1:1), but constants, comments, assembler directives, symbolic labels of, e.g., memory locations, registers, and macros are generally also supported.

Computer programming or coding is the composition of sequences of instructions, called programs, that computers can follow to perform tasks. It involves designing and implementing algorithms, step-by-step specifications of procedures, by writing code in one or more programming languages. Programmers typically use high-level programming languages that are more easily intelligible to humans than machine code, which is directly executed by the central processing unit. Proficient programming usually requires expertise in several different subjects, including knowledge of the application domain, details of programming languages and generic code libraries, specialized algorithms, and formal logic.

In computing, a compiler is a computer program that translates computer code written in one programming language into another language. The name "compiler" is primarily used for programs that translate source code from a high-level programming language to a low-level programming language to create an executable program.

A fourth-generation programming language (4GL) is a high-level computer programming language that belongs to a class of languages envisioned as an advancement upon third-generation programming languages (3GL). Each of the programming language generations aims to provide a higher level of abstraction of the internal computer hardware details, making the language more programmer-friendly, powerful, and versatile. While the definition of 4GL has changed over time, it can be typified by operating more with large collections of information at once rather than focusing on just bits and bytes. Languages claimed to be 4GL may include support for database management, report generation, mathematical optimization, GUI development, or web development. Some researchers state that 4GLs are a subset of domain-specific languages.

In computer science, a compiler-compiler or compiler generator is a programming tool that creates a parser, interpreter, or compiler from some form of formal description of a programming language and machine.

<span class="mw-page-title-main">Douglas McIlroy</span> American mathematician and computer scientist

Malcolm Douglas McIlroy is an American mathematician, engineer, and programmer. As of 2019 he is an Adjunct Professor of Computer Science at Dartmouth College. McIlroy is best known for having originally proposed Unix pipelines and developed several Unix tools, such as spell, diff, sort, join, graph, speak, and tr. He was also one of the pioneering researchers of macro processors and programming language extensibility. He participated in the design of multiple influential programming languages, particularly PL/I, SNOBOL, ALTRAN, TMG and C++.

In computer science, a high-level programming language is a programming language with strong abstraction from the details of the computer. In contrast to low-level programming languages, it may use natural language elements, be easier to use, or may automate significant areas of computing systems, making the process of developing a program simpler and more understandable than when using a lower-level language. The amount of abstraction provided defines how "high-level" a programming language is.

Software development is the process used to conceive, specify, design, program, document, test, and bug fix in order to create and maintain applications, frameworks, or other software components. Software development involves writing and maintaining the source code, but in a broader sense, it includes all processes from the conception of the desired software through the final manifestation, typically in a planned and structured process often overlapping with software engineering. Software development also includes research, new development, prototyping, modification, reuse, re-engineering, maintenance, or any other activities that result in software products.

A programming tool or software development tool is a computer program that software developers use to create, debug, maintain, or otherwise support other programs and applications. The term usually refers to relatively simple programs, that can be combined to accomplish a task, much as one might use multiple hands to fix a physical object. The most basic tools are a source code editor and a compiler or interpreter, which are used ubiquitously and continuously. Other tools are used more or less depending on the language, development methodology, and individual engineer, often used for a discrete task, like a debugger or profiler. Tools may be discrete programs, executed separately – often from the command line – or may be parts of a single large program, called an integrated development environment (IDE). In many cases, particularly for simpler use, simple ad hoc techniques are used instead of a tool, such as print debugging instead of using a debugger, manual timing instead of a profiler, or tracking bugs in a text file or spreadsheet instead of a bug tracking system.

Metaprogramming is a programming technique in which computer programs have the ability to treat other programs as their data. It means that a program can be designed to read, generate, analyse or transform other programs, and even modify itself while running. In some cases, this allows programmers to minimize the number of lines of code to express a solution, in turn reducing development time. It also allows programs a greater flexibility to efficiently handle new situations without recompilation.

Domain-specific modeling (DSM) is a software engineering methodology for designing and developing systems, such as computer software. It involves systematic use of a domain-specific language to represent the various facets of a system.

In computer programming, Intentional Programming is a programming paradigm developed by Charles Simonyi that encodes in software source code the precise intention which programmers have in mind when conceiving their work. By using the appropriate level of abstraction at which the programmer is thinking, creating and maintaining computer programs become easier. By separating the concerns for intentions and how they are being operated upon, the software becomes more modular and allows for more reusable software code.

LINC is a fourth-generation programming language, used mostly on Unisys computer systems.

PowerHouse is a byte-compiled fourth-generation programming language originally produced by Quasar Corporation for the Hewlett-Packard HP3000 mini-computer, as well as Data General and DEC VAX/VMS systems. It was initially composed of five components:

Sandcastle is a documentation generator from Microsoft. It automatically produces MSDN-style code documentation out of reflection information of .NET assemblies and XML documentation comments found in the source code of these assemblies. It can also be used to produce user documentation from Microsoft Assistance Markup Language (MAML) with the same look and feel as reference documentation.

<span class="mw-page-title-main">History of compiler construction</span>

In computing, a compiler is a computer program that transforms source code written in a programming language or computer language, into another computer language. The most common reason for transforming source code is to create an executable program.

In computer programming and software development, debugging is the process of finding and resolving bugs within computer programs, software, or systems.

For several years parallel hardware was only available for distributed computing but recently it is becoming available for the low end computers as well. Hence it has become inevitable for software programmers to start writing parallel applications. It is quite natural for programmers to think sequentially and hence they are less acquainted with writing multi-threaded or parallel processing applications. Parallel programming requires handling various issues such as synchronization and deadlock avoidance. Programmers require added expertise for writing such applications apart from their expertise in the application domain. Hence programmers prefer to write sequential code and most of the popular programming languages support it. This allows them to concentrate more on the application. Therefore, there is a need to convert such sequential applications to parallel applications with the help of automated tools. The need is also non-trivial because large amount of legacy code written over the past few decades needs to be reused and parallelized.

<span class="mw-page-title-main">PWCT</span> Visual programming language

PWCT is an free open source visual programming language for software development. The project was founded in December 2005 as a free-open source project that supports designing applications through visual programming then generating the source code. The software supports code generation in many textual programming languages.

References