Computer Automatic Programming

Source: Internet
Author: User

See an article on csdn Article The original link is: Http://www.csdn.net/develop/Read_Article.asp? Id = 27403 I think it is a bit interesting. I also want to talk about computer automatic programming. First Program It makes sense to let the computer realize automatic programming. It is not just a theme of the day. As far as I know, the concept of "Automatic Programming" that can be operated has been put forward in evolutionary computing (a kind of intelligent computing) as the goal of genetic Program Design gp; and, there are already good practices in some relatively simple but practical fields. For example, Professor Kang Lishan, a teacher in our department, developed a program based on the data of the Three Gorges Dam and obtained a good model for the problem. As mentioned in the article, maybe the future can really change the programmer's identity. They are no longer "programmers", but have to become "Auxiliary programmers"; computers can be automatically programmed, so for general problems, you only need to buy some automatic programming components (called in the original article), so that the computer can complete programming by helping programmers operate certain interfaces, and it is better than people. However, the scientific concept of "automatic programming" is still in the just-proposed stage. In fact, the current work is still carried out in relatively simple problem fields. There is still a big gap between the principles and achievements we have achieved and our goals. As stated in the original article, the use of large-scale engineering is still far from a thousand miles away. Why? There is no in-depth discussion in the original article. When talking about how to implement "automatic programming", the original article only said that the development of artificial intelligence is required and the use of massive network information. However, it is quite difficult. I will talk about programming in C ++. In the simplest problem field, we calculate the addition and subtraction operations of integers. For example, the following question: Use the C ++ language to write a program module to sum two integers A and B. Programmers program it to complete the following program: // compute the sum of a and B INT sum (const int A, const int B) {return a + B ;} to solve this problem, the programmer generally takes the following steps: 1. For this problem, the data structure used is an integer, and the c ++ language provides the data type Int. The two integers are a and B. 2. Algorithm Calculates the sum of integers. The C ++ language provides the '+' operator. 3. the programmer designs the module. The module name is sum. The input parameters are const int A and const int B, and the return type is integer. Obviously, steps 1 and 2 are the core of the program and are defined in the traditional sense. 3 is the structure of the program. I think the structure of the program is also very important. Especially in recent years, the complexity of computer software is getting higher and higher. It is inevitable to pay attention to the well-designed program structure. For this problem, it is certainly possible to use the "function" design module, but the use of C ++ classes for encapsulation is not a problem. Therefore, for computer programs, I understand the following concepts: Computer program = Data Structure + algorithm + program structure. Can this simple problem be completed by automatic computer programming? In fact, the current "Automatic Programming" of evolutionary computing is inspired by" Computer program = Data Structure + Algorithm . Let's take a look at its solution to the above problems. To solve this problem, establish the foundation for automatic computer programming-two sets: Data = {a, B}, OP = {+ }. the program obtained by computer automatic programming is a relationship between data and OP, which is represented by a string. For example, S1 = AA +; // that is, S1 = a + A; now, for a string S, the computer can automatically design: S = A; // s = AA; // s = AA +; // programs that do not meet the requirements, discard programs whose S = A; // s = a +; // programs that are not successful, discard S = A; // not succeeded S = AB +; // The program is successfully exited. In other words, the program automatically programmed by the computer is defined Computer program = Data * op Of course, obtaining a computer program that meets the requirements is not an enumeration process. The evolutionary computing solution is to use random policies to obtain good programs through evolution. The data and OP sets are the basis of automatic programming and can be designed with respect to the field and complexity of the problem (for example, the complexity of computer languages required by programmers is also different ). For example, adding two integer variables X and Y to the data above can completely design a program with the same functions as the sum module. If data and OP are expanded as follows: Data = {A0, A1, A2 ,... an, n, x}, OP = {+ ,-,*}. X is a real variable, so the computer can automatically program to design a polynomial approximation program. In addition, logical operations such as if, else, and cyclic operations can be added to the OP set. Then, automatic programming can solve more problems in the field. However, automatic programming is just the beginning. It is too early to say that it should replace the programmer's work. First, computer automatic programming is based on the set data and op. These two sets are comparable to computer automatic programming languages, but they are still very imperfect. A feasible language can be designed for individual problems, but most problems cannot be found for a proper language, let alone a more common language. The computer language used by programmers has reached a very complete level. After the emergence of the OO language, programmers can design their own data types. Automatic Programming of computers cannot achieve this currently. For example, for the above problem, a programmer can design a data type to encapsulate integers (we will not talk about its actual meaning, but obviously pay attention to its abstract meaning ): // define new type: integer class INTEGER {//... public ://...}; as a result, when programmers are modeling the real world, the expression tool (computer language) is quite effective. However, the data and OP in computer automatic programming can establish a good model for Engineering Computing and simple logic judgment, but they are far behind programmers in depth and breadth. Secondly, I think that the concept of computer programs must include the "program structure" factor. The program structure factor is of great significance for large-scale engineering applications, it is also a wonderful embodiment of the programmer's wisdom. A program with a complex problem, a bad structure, is often fatal. For example, a global pointer object has too many traps that can completely paralyze poorly designed systems. However, a good structure is not. In addition, programmers make full use of the experience in the "program structure" to sum up a good design model and develop a class library and program framework with good performance, so that the program design can continue to be a virtuous circle. However, automatic programming has not yet been planned. The definition at the beginning is based on data and op, and the process of data * op is currently implemented by evolutionary computing, just like programmers who are in the stage of assembly language programming, the program structure that can be considered is very small, and the complexity of the problem can only be handled with a clever head desperately. Finally, it is of course the current computer restrictions. At present, the main problems of automatic programming are still difficult to solve. The further improvement of computer performance and the further development of good algorithms will further develop automatic programming. But the problem is not isolated. The complexity of solving the problem also needs to consider the development of automatic programming theory, such as breaking through the above limitations. The original Article also mentions the use of network information resources and computer learning capabilities. Of course, these steps are inevitable. Automatic Programming must face these subject resources. However, this involves more issues. In general, networks, distributed systems, and artificial intelligence must solve a large number of problems before they can fully enter the scope of automatic programming in Engineering. Currently, intelligent computing is the most closely related to automatic programming, and it is also the main driving discipline. All mentioned here are from the software perspective. In the original article, cross-system (such as windows and UNIX) Automatic Programming is also mentioned. I think programmers have more headaches. To put it more broadly, due to occasional or inevitable reasons, the computer architecture is currently diverse, and the programming of natural programmers is based on a computer with a certain architecture. The program of a CISC machine must be running on the server of the computer, I think this is not just a matter of programming. I think it is very interesting to say "helper programmers" in the original article. Since the programming work is delegated to the computer, the assistant programmer is to manage the computers that perform "automatic programming", which is a taste of some project managers. It is clear that programmers are constrained by some laws in software engineering during programming. The management of this process is very complicated; most project managers have experience. So what will it look like when multiple computers "collaborate with automatic programming? Which of the following rules can be discussed? I think although the computer can be automatically programmed and programmers are freed from programming, the industry's requirements for people are not lowered, right? It may be said that the times are evolving and the industry's requirements for people are always improving. Unless artificial intelligence is completely mature, machines and people have the same behavior. People may be able to relax. Are you afraid of "Auxiliary programmers? This problem is not just an internal issue in the industry, but the whole society will pay attention to it if the computer also requires a salary.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.