search
HomeCommon ProblemWhat is called translating a source program written in a high-level programming language into a target program?
What is called translating a source program written in a high-level programming language into a target program?Dec 08, 2020 am 09:20 AM
Source programtarget programhigh level programming language

Translating a source program written in a high-level programming language into a target program is called a compiler. The compiler takes a source program written in a high-level programming language as input and a target program expressed in assembly language or machine language as output.

What is called translating a source program written in a high-level programming language into a target program?

#The operating environment of this article: Windows 7 system, Dell G3 computer.

A program that translates a source program written in a high-level programming language into an object program (.OBJ) is called a compiler.

Compiler, compiling program, also called a compiler, refers to a translation program that translates a source program written in a high-level programming language into an equivalent target program in machine language format. Compilers are translation programs implemented using a generative implementation approach. It takes a source program written in a high-level programming language as input, and a target program expressed in assembly language or machine language as output. The compiled target program usually also goes through a running stage in order to run with the support of the running program, process the initial data, and calculate the required calculation results.

The compiler must analyze the source program and then synthesize it into the target program. First, check the correctness of the source program and decompose it into several basic components; secondly, establish corresponding equivalent target program parts based on these basic components. In order to complete these tasks, the compiler must create some tables during the analysis phase and transform the source program into an intermediate language form so that it can be easily referenced and processed during analysis and synthesis.

Related expansion introduction:

The basic function of the compiler is to translate the source program (high-level language) into the target program. However, as a compilation system with practical application value, in addition to basic functions, it should also have important functions such as syntax checking, debugging measures, modification methods, coverage processing, target program optimization, use of different languages, and human-computer contact.

① Grammar check: Check whether the source program is grammatical. If it is not grammatical, the compiler should point out the location, nature and relevant information of the grammatical error. The compiled program should enable the user to detect as many errors as possible in one go.

②Debugging measures: Check whether the source program meets the designer's intention. To this end, the compiler is required to place some output instructions in the compiled target program so that information about the dynamic execution of the program can be output when the target program is running, such as changes in variable values, circuits experienced during program execution, etc. This information helps users verify and verify whether the source program expresses the algorithm requirements.

③Modification means: Provide users with a simple means to modify the source program. Compilers usually provide batch modification means (used to modify a large number of errors that are temporarily difficult to modify) and on-site modification means (used to modify a small number of errors that are temporarily easy to modify during runtime).

④Cover processing: It is mainly set up to handle large-scale problem programs with long programs and large amounts of data. The basic idea is to let some program segments and data share certain storage areas, in which only the programs or data that are currently used are stored; the remaining programs and data that are not used temporarily are first stored in auxiliary storage such as disks, and can be dynamically transferred when needed. .

⑤ Target program optimization: Improve the quality of the target program, that is, it takes up less storage space and the program’s running time is short. Depending on the optimization goals, the compiler can choose to implement expression optimization, loop optimization, or global program optimization. Some target program optimization is performed at the source program level, and some is performed at the target program level.

⑥Using different languages: Its function helps users write applications using multiple programming languages ​​or apply existing program modules written in different languages. The most common is the combination of high-level language and assembly language. This can not only make up for the difficulty of high-level languages ​​in expressing certain non-numeric processing operations or direct control and access to peripheral devices and hardware registers, but also facilitates writing core programs in assembly language to improve operating efficiency.

⑦Human-machine connection: Achieve well-designed functions when determining the compiler implementation plan. The purpose is to facilitate users to understand the internal working conditions in a timely manner during the compilation and running stages, and to effectively supervise and control the operation of the system. The implementation plan of early compilers was to completely incorporate the above functions into the compiler. However, the common practice is to configure debuggers, editors, and connection assemblers with the support of the operating system to assist in debugging, modifying, overwriting, and combining functions in different languages. However, when designing a compiler, careful consideration must be given to issues such as how to interface with these subsystems.

(Related recommendations: Programming Video)

The above is the detailed content of What is called translating a source program written in a high-level programming language into a target program?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
deepseek web version official entrancedeepseek web version official entranceMar 12, 2025 pm 01:42 PM

The domestic AI dark horse DeepSeek has risen strongly, shocking the global AI industry! This Chinese artificial intelligence company, which has only been established for a year and a half, has won wide praise from global users for its free and open source mockups, DeepSeek-V3 and DeepSeek-R1. DeepSeek-R1 is now fully launched, with performance comparable to the official version of OpenAIo1! You can experience its powerful functions on the web page, APP and API interface. Download method: Supports iOS and Android systems, users can download it through the app store; the web version has also been officially opened! DeepSeek web version official entrance: ht

In-depth search deepseek official website entranceIn-depth search deepseek official website entranceMar 12, 2025 pm 01:33 PM

At the beginning of 2025, domestic AI "deepseek" made a stunning debut! This free and open source AI model has a performance comparable to the official version of OpenAI's o1, and has been fully launched on the web side, APP and API, supporting multi-terminal use of iOS, Android and web versions. In-depth search of deepseek official website and usage guide: official website address: https://www.deepseek.com/Using steps for web version: Click the link above to enter deepseek official website. Click the "Start Conversation" button on the homepage. For the first use, you need to log in with your mobile phone verification code. After logging in, you can enter the dialogue interface. deepseek is powerful, can write code, read file, and create code

How to solve the problem of busy servers for deepseekHow to solve the problem of busy servers for deepseekMar 12, 2025 pm 01:39 PM

DeepSeek: How to deal with the popular AI that is congested with servers? As a hot AI in 2025, DeepSeek is free and open source and has a performance comparable to the official version of OpenAIo1, which shows its popularity. However, high concurrency also brings the problem of server busyness. This article will analyze the reasons and provide coping strategies. DeepSeek web version entrance: https://www.deepseek.com/DeepSeek server busy reason: High concurrent access: DeepSeek's free and powerful features attract a large number of users to use at the same time, resulting in excessive server load. Cyber ​​Attack: It is reported that DeepSeek has an impact on the US financial industry.

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),