Micro-Computer World reporter-Li Mingxia
---- Q: As an old compilation expert in China, can you talk about the development of the compilation system over the years?
---- Answer: the software we generally talk about includes three main categories: system software (such as operating system and compiling system), supporting software and application software. System software is generally used to solve problems in any field. Compiling systems are second only to operating systems.
---- The compilation system translates programs written in advanced languages into equivalent machine language programs or assembly language programs. Logically, it consists of two parts: analysis and synthesis. The analysis part mainly includes lexical analysis, syntax analysis, and semantic analysis. The comprehensive part mainly includes storage allocation, code optimization, and code generation, and sometimes includes generating intermediate code. The categories of compiled programs mainly include diagnostic, optimized, target, cross, and incremental.
---- As advanced Languages develop in the form, structure, intelligence, and visualization aspects, as a compilation system that implements the corresponding language functions, it also develops in the direction of automatic program design and visual program design. I think we should mainly understand the following aspects:
---- First, new compilation systems for various advanced languages are emerging. For example, the Fortran language has evolved from 66, 77, and 90 to fortran95. It is said that fortran2000 will be launched soon. Most of these new versions of compilation systems are modified and completed on the basis of the original old version of the compilation system.
---- Second, with the emergence of Parallel Computers, parallel C, parallel C ++, parallel Fortran, or high-performance FORTRAN (high‑mencefortran, HPF) and other languages have also been introduced, compilation systems of these languages generally add parallel parts based on the corresponding serial language compilation system, convert the parallel language into a serial language, and then compile the system using the serial language compilation system.
---- Third, the study of parallel compilation technology is not only for parallel languages, but also for how to compile on parallel machines.
---- Fourth, the continuous development of object-oriented technology, on the one hand, has produced a compilation system for object-oriented languages such as C ++, on the other hand, the research is different from the previous ideas-how to use the object-oriented method to develop the compilation system ,.
---- Fifth, Java, as a cross-platform language for network applications, has put the concept of virtual machines into practice and is now available in the third generation Java language virtual machines.
---- Sixth, some tools that automatically generate the compilation system have been put into use. Tools for generating other parts of the compilation system, such as semantic analysis and code generation.
---- Q: What is the significance of compiling a system as part of system software for general users? What are the technical standards for a good compilation system?
---- Answer: in the research and study of compilation systems, a very representative book is the compilation principle, technology and tools written by experts such as Aho. Some of the technical content mentioned in this book is not only useful for the development and compilation of technical systems, but also has guiding functions in many aspects. Such as five generation machine language, object-oriented programming language, neural network model, disassembly technology, automatic software generation, pattern recognition, etc. Therefore, undergraduates and even graduate students majoring in computer software at home and abroad must take or take this course.
---- I think the criteria for judging a good compilation system are related to the specific usage of this compilation system. If the compilation speed is very important, for example, in the educational compiler and the compiler of the experimental algorithm, it is required that the compilation program be simple. If the execution result of the program is at the top of the list, it is necessary to carefully process, refine, optimize, and generate high-quality target code as much as possible, especially the compilation system of large programs is more important.
---- In addition to compiling the program itself, there are also several requirements:
---- (1) Facilitate debugging of user programs.
---- (2) the operating system is also very important. A sound operating system and running environment are required. For object-oriented languages, a wide range of class libraries are required. Compiling programs in practical applications can include: programming supporting environments, including editing, compilation, debugging, running and maintenance, preprocessing, and non-standard version of programming languages.
---- (3) in terms of optimization, there is also a set of standards for the optimization effect, including global optimization and local optimization.
---- (4) for the Java language, there are two major parts: the compilation system and Virtual Machine implementation. Each part has many technologies, and the virtual machine has useless Unit collection, the quality of these technologies or algorithms can also constitute a part of the standard.
---- (5) Perform troubleshooting as well as possible. It mainly refers to how to compile a program to help users find errors in the program and modify and restore the function after the error is found.
---- (6) maintenance of the compilation system. Can a compilation system trace and maintain the system after it is handed over to the user, and can the user solve problems and other services, more and more important in the compilation system quality standards.
---- Q: In the past, the compiling system was intended for a certain type of machine or language. What is the current situation?
---- Answer: In 1960s, the computer industry had the idea of using a virtual machine to achieve unified compilation in the universal computer language (uncol, then uncol is implemented on the local machine, but it is not popular later. Currently, compilation systems of specific languages are generally developed for specific machines and operating systems.
---- Academician Tang zhusong of the Software Institute of the Chinese Emy of Sciences designed the XYZ language family in 1970s. It is a series of time series logic language families, each sub-language represents a different programming method or language, which can be seen as a future development model. Academician Dong luomei of the Software Institute has proposed the mlirf method in recent years, which combines machine learning with recursive functions, and integrates human-computer interaction (interaction ), specification is a concept represented by a context-independent language (CFL). CFL is used to describe the problem and its solution, and a recursive function (cfrf) of the context-independent language is used) describes the relationship between problems and solutions, that is, the problem-solving algorithm, which is software automation.
---- Sun proposed the Java language in 1995 in two steps. The first step is to compile a unified bytecode program and then implement the Java Virtual Machine on different machines and operating systems, describe or compile bytecode programs on local machines and operating systems.
---- Software development has gone through the advanced language period, the structured programming period, and the software engineering tools period, and now develops towards the knowledge-based software engineering period.
---- But in general, with the changes in computer hardware (32-bit machines to 64-bit machines) and operating systems, the corresponding compilation systems must be modified. If you have a forward-looking consideration when designing a compilation system and leave room for the font length and some variable parameters, it will be easier to modify them.
---- Q: What are the major gaps between the research on compilation systems in China and those on foreign compilation systems?
---- Answer: the compilation system research in China started in 1960s and started not too late. China has developed bcy Language and Its Compilation System for algol60 language and algol60 language, later, we developed the Fortran language, the COBOL language, the Ada Language, the vector Fortran language on the 757 vector machine, the parallel Fortran on the Galaxy giant computer, and its compilation system. Some systems are still making great contributions to our country's major projects.
---- In terms of technology, there is not a big gap between us, but after we develop a system, some of them only have two to three machines, or even one, because the number of machines produced is small, there is a lack of productization, commercialization, and poor maintenance and improvement work. Therefore, for users, the quality of the compilation system is not as good as that of foreign countries. Although it is possible that the optimization work is also good, however, it is not enough to fully measure the debugging methods and running environment.
---- Q: Can you talk about the Java language from the perspective of compiling the system?
---- Answer: the Java language is compiled into a bytecode program by the compilation system, and then interpreted or compiled on different operating systems and computers, that is, the virtual machine we call. The VM provides more than 200 commands. the bytecode program is composed of these commands and has now evolved to the third generation Java virtual machine.
---- The computer world newspaper once introduced the concept of pseudo-code compiler used by Java, that is, converting the source program into a non-existing machine's inherent target code, that is, virtual machine commands. In this way, we can: (1) cover up the differences between machines; (2) speed up the development cycle and simplify cross-platform development without programming for each machine or operating system; (3) Good portability; (4) easy to maintain, manage, and modify.
---- In the past, uncol and Pascal had such ideas. The current Java language can be recognized by so many people. In a sense, it should be attributed to the development of internet, this is an excellent time. People's cross-platform needs are extremely important and technically feasible. Therefore, they are widely used.
---- Although the user's biggest complaint is that the speed is too slow, sun and other companies have developed third-generation Virtual Machine hotspot through several years of hard work, which greatly improves the speed. Recently, Java2 has greatly enhanced its functionality and is especially suitable for enterprises. It is not only applicable to IT applications, business and banking transactions, in addition, Java is becoming increasingly mature to meet the needs of industry, manufacturing and many other industries.