Robert M- Ba)Zer USC Information Sciences Institute 4676 Admiralty Way Marina Del Rey, California 9C291
Total Page:16
File Type:pdf, Size:1020Kb
Session 18 Automatic Programming A GLOBAL VIEW OF AUTOMATIC PROGRAMMING Robert M- Ba)zer USC Information Sciences Institute 4676 Admiralty Way Marina del Rey, California 9C291 Abstract into this domain and, In fact, the term "automatic programming itself was applied to This paper presents a framework for early compiler systems during the 1950s. characterizing automatic programming systems In terms of how a task Is communicated to the What is needed, therefore Is to either system, the method and time at which the appropriately restrict the definition of system acquires the knowledge to perform the automatic programming, or to provide a set of task, and the characteristics of the resulting criteria used for measuring the acceptability program to perform that task. Jt describes or performance of an automatic programming one approach In which both tasks and knowledge system. Such a measure of system merit is about the task domain are stated in natural extremely hard to arrive at but would contain language In the terms of that domain. All the following man, machine, and system knowledge of computer science necessary to applicability components: Implement the task Is Internalized Inside the system. The efficiency of the resulting program; Preface and Acknowledgement The amount of computer This paper represents the author's resources expended In arriving at persona I vIew of a globaI description of that program; Automatic Programming. This view resulted from the author's dlscussions wlth and The elapsed time used in suggestions from numerous colleagues on this arriving at the resulting program; area for which he Is deeply indebted. The amount of effort expended This paper Is a condensation of this by the user in specifying the task; view, taken from a larger work [1] which attempts to structure the field on the The reliability and ruggedness conceptualization expressed here. The of the resulting program; interested reader should consult this work, which describes the issues In greater detail The ease with which future and contains supporting evidence for the views modifications can be incorporated; summarized here. and finally. Introduction The range and complexity of tasks which can be handled by the The goals of automatic programming are system. deceptIve1y simple; namely, t he effective utilization of computers. This Implies both The Basic Model simplicity of use and efficient application of the computing resources. One goal of any automatic programming system Is to allow its users to state their Thus, automatic programming is the problems and any advice about Its solution In application of a computing system to the terms natural to the problem. Although most problem of effectively utilizing that or problems and their solutions can be most another computing system in the performance of naturally described in the terrnms native to a task specified by the user. Although this their fields, some can best be stated and/or is certainly what is meant by automatic solved In terms of a different field, such as programming, this definition does little to mathematics. Occasionally, this other field restrict the set of applicable computer is computer science, and the problem or Its systems included in the automatic programming solutlon is expressed in terms of data domain. All compilers, operating systems, structures and their manipulations. Such debugging systems, text editors, etc., fall descriptions, in terms other than those of the problem domain, are entirely satisfactory as This research Is supported by the Advanced long as they are part of the conceptual Research Projects Agency under Contract No. repertoire of the user and are not DAHC15 72 C 0308, ARPA Order No. 2223/1, artificially Introduced to enable the system Program Code No. 3D30 and 3P10. to comprehend the problem or process Its solution. 494 We therefore treat both the native terms problem in terms of a model of the domain, of a Held and the terms of other fields which which obtains a solution for the problem in users have found useful to describe and terms of this model, and produces an efficient conceptualize problems and solutions in that computer implementation of this solution in field as the problem domain terms of that the form of a program. field. With this definition, we conjecture that the solution of every computable problem System Reguirements can be represented entirely In problem domain terms as a sequence, which may involve loops There are seven facilities to be provided and conditionals, of actions in that domain by, or criteria to be satisfied by future which affect a data base of relationships Automatic Programming Systems. The first is between the entities of the domain. Included an interactive system Interaction between either as part of the data base or as a the system and the user Is required so that separate part of the model. Is the history of the specification can be given incrementally the model (I.e., the sequence of actions and any errors or discrepancies that arise in applied to the model). This logically or from such specification can be handled as completes the model and enables questions or they occur. actions involving historical Information to be handled. In a strong sense, such a solution Along with this Interactiveness the Is a direct simulation of the domain. The system should be very forgiving. It should system models at each step what would occur In allow great flexibility in the way and time at the domain. which information is specified. It should also be forgiving by allowing the user to The important part of the above change or retract previous communications with conjecture Is that any computable problem can the system. be solved, and hence described, In problem domain terms. This enables us to divide the The second criteria is the amount of solution into two parts, an external and an non-proceduralness used In the specification Internal part. The external part Is the of the task to be performed. As far as problem specification given by the user In possible the system should be told what to do completely domaln specific terms. The rather than how to do it. There i s a requirements for such users is no longer a continuum between the statement of a problem comprehensive knowledge of computers, but as the transformation from an Initial state to rather the ability to completely characterize a goal state, and the specification of how to the relevant relationships between entities of perform such a transformation. Most of the problem domain and the actions in that computer languge development can be viewed as domain. In addition, such users should have a a movement from specifying HOW to do something rough awar eness of the problem solving towards a statement of WHAT is desired. The capability of the system so that they can level of non-proceduralness achi evable wlthin provide additional help where needed In the an Automatic Programming Sytem is directly form of more appropriate macro-actions, related to the system's capability of turning recommendations about the use of certain goals Into actions and this Is dependent upon act Ions, and/or Imperative sequences which fts knowledge of how to acleve certain results will solve part or all of the problem In in the problem domain. The ability of the problem related terms. system to achieve results in the problem domain Is used as the main distinction between The Internal part Is first concerned with non-procedural and procedural languages. finding a solution In problem related terms. Thus, problems must be stated in a language if this has not already been provided by the appropriate for that domain, I.e., one that user. Second, this part Is concerned with can express the structure and finding efficient solutions given the interrelationships of the entitles within that available computing resources. Such domain, and one that users are familiar with optimizations occur at two levels beyond what for discussing and describing tasks and is normally considered optimizatlon. First, problems within that domain. Only with such a at the problem level, recognition that certain language can the system know how to achieve entities and/or relation ships are irrelevant the desired results rather than being directly enables their removal from the model. Second, told how to produce the desired result. Some since only part of the state of the modelled actions can, however, best be described In domain Is required, and only at certain points terms of bow to accomplish them rather than by in the solutIon process, rather than the resulting state. Such procedural simulating the model completely at each step, descriptions are quite acceptable as long as the system can employ alternative they are specified entirely in problem domain representations which require less maintenance terms rather than implementatlon computer and which either directly mirror the required terms. part of the domain state or allow such parts to be computationally inferred. Such In addition to problem oriented representations may also enable more direct specifications, the amount of Information that solution of the problem. It Is these must be specified for the system to correctly optimizations which form the main distinction process the problem must be reduced. This can between t he code generation par t of an best be done by removing details from the Automatic Programming system and current state specification and allowing the system to fill of the art compilers. them in. As with non-proceduralness there Is a continuum here, but the level that is Thus, our definition of an Automatic desi red is one which omits from the Programming system Is one which accepts a specification all references to entities not 495 contained within the problem domain (and which handle and their method of obtaining this are not necessary for transferring knowledge knowledge.