Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Program transformation

From Wikipedia, the free encyclopedia
Automated generation of a computer program
"Language processing program" redirects here. For natural language processing programs, seenatural language processing.
This articlemay containoriginal research. Pleaseimprove it byverifying the claims made and addinginline citations. Statements consisting only of original research should be removed.(August 2016) (Learn how and when to remove this message)

Aprogram transformation is any operation that takes acomputer program and generates another program. In many cases the transformed program is required to besemantically equivalent to the original, relative to a particularformal semantics and in fewer cases the transformations result in programs that semantically differ from the original in predictable ways.[1]

While the transformations can be performed manually, it is often more practical to use aprogram transformation system that applies specifications of the required transformations. Program transformations may be specified as automated procedures that modify compiler data structures (e.g.abstract syntax trees) representing the program text, or may be specified more conveniently using patterns or templates representing parameterized source code fragments.

A practical requirement forsource code transformation systems is that they be able to effectively process programs written in aprogramming language. This usually requires integration of a full front-end for the programming language of interest, including source codeparsing, building internal program representations of code structures, the meaning of program symbols, usefulstatic analyses, and regeneration of valid source code from transformed program representations. The problem of building and integrating adequate front ends for conventional languages (Java,C++,PHP etc.) may be of equal difficulty as building the program transformation system itself because of the complexity of such languages. To be widely useful, a transformation system must be able to handle many target programming languages, and must provide some means of specifying such front ends.

A generalisation of semantic equivalence is the notion ofprogram refinement: one program is a refinement of another if it terminates on all the initial states for which the original program terminates, and for each such state it is guaranteed to terminate in a possible final state for the original program. In other words, a refinement of a program ismore defined andmore deterministic than the original program. If two programs are refinements of each other, then the programs are equivalent.[clarification needed]

See also

[edit]

References

[edit]
  1. ^Ward, Martin (1989).Proving Program Refinements and Transformations (DPhil Thesis). Oxford University.{{cite book}}: CS1 maint: location missing publisher (link)

External links

[edit]
National
Other


Stub icon

Thiscomputer science article is astub. You can help Wikipedia byadding missing information.

Stub icon

Thisprogramming-language-related article is astub. You can help Wikipedia byadding missing information.

Retrieved from "https://en.wikipedia.org/w/index.php?title=Program_transformation&oldid=1303935022"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp