V2EX  ›  英汉词典

Source-Transformation

Definition / 定义

source-transformation(也常写作 source transformation)指对源代码(source code)进行变换/改写的过程:在尽量保持程序语义不变的前提下,改变代码结构、表达方式或抽象层级,以达到优化、移植、自动生成代码、重构或为后续编译步骤做准备等目的。常见相关说法是 source-to-source transformation(源到源变换)

Pronunciation / 发音

/ˈsɔːrs ˌtrænsfərˈmeɪʃən/

Examples / 例句

The compiler performs source-transformation before generating machine code.
编译器在生成机器码之前会先进行源代码变换。

Through source-transformation, the tool rewrites the program to a safer style while preserving its original behavior.
通过源代码变换,该工具在保持原有行为不变的情况下,把程序改写成更安全的风格。

Etymology / 词源

该词由 source(来源;此处指“源代码”) + transformation(变换、转换)构成。transformation 源自拉丁语 transformare(“改变形状/形式”),在计算机领域引申为对程序表示(尤其是源代码文本或抽象语法树)进行系统性的“改写”。

Related Words / 相关词

Literary Works / 文学作品

  • Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman — Compilers: Principles, Techniques, and Tools(《编译原理》):讨论编译器中的程序变换与中间表示相关技术(常以“program transformation”等术语出现,与 source transformation 同类)。
  • Andrew W. Appel — Modern Compiler Implementation(《现代编译器实现》):涉及对程序/源级表示进行变换以支持优化与代码生成的内容。
  • Martin Fowler — Refactoring: Improving the Design of Existing Code(《重构:改善既有代码的设计》):虽更偏软件工程,但大量“保持行为不变的代码改写”属于广义的源代码变换思想。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   782 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 18:53 · PVG 02:53 · LAX 10:53 · JFK 13:53
♥ Do have faith in what you're doing.