Session No. 5 Software Support 167
PROCEDURAL EMBEDDING OF theoretically In terms of the notion of KNOWLEDGE IN PLANNER satisfiability. The problem of completeness is that, for a foundation Carl Hewitt of mathematics to be Intuitively satisfactory all the true formulas Artificial Intelligence Laboratory, should be proveable since a foundation M.I.T., Cambridge, Massachusetts, mathematics alms to be a theory of U.S.A. mathematical truth. Similar fundamental questions 0. Abstract must be faced by a foundation for Since the last IJCAI, the problem solving. However there are PLANNER problem solving formalism has some important differences since a continued to develop. Our eplstemolgy foundation of problem solving alms more for the foundations for problem solving to be a theory of actions and purposes has been extended. An overview of the than a theory of mathematical truth. A formalism Is given from an Information foundation for problem solving must processing viewpoint. A simple example specify a goal-orlented formalism In Is explained using snapshots of the which problems can be stated. state of the problem solving as the Furthermore there must be a formalism example Is worked, finally, current for specifying the allowable methods of applications for the formalism are solution of problems. As part of the Iisted. definition of the formalisms, the following elements must be defined: 1. The Structural Foundations of the data structure, the control Problem Solving structure, and the primitive We would like to develop a procedures. The problem of what are foundation for problem solving allowable data structures for facts analogous In some ways to the currently about the world Immediately arises. existing foundations for mathematics. Being a theory of actions, a foundation Thus we need to analyze the structure for problem solving must confront the of foundations for mathematics. A problem of change: How can account be foundation for mathematics must provide taken of the changing situation In the a definitional formalism In which world? In order for there to be mathematical objects can be defined and problem solving, there must be a their existence proved. For example problem solver. A foundation for set theory as a foundation provides problem solving must consider how much that objects must be built out of sets. knowledge and what kind of knowledge Then there must be a deductive problem solvers can have about formalism In which fundamental truths themselves. In contrast to the can be stated and the means provided to foundation of mathematics, the deduce additional truths from those semantics for a foundation for problem already established. Current solving should be defined In terms of mathematical foundations such as set properties of procedures. We would theory seem quite natural and adequate like to see mathematical Investigations for the vast body of classical on the adequacy of the foundations for mathematics. The objects and problem solving provided by PLANNER. reasoning of most mathematical domains In chapter C of the dissertation, we such as analysis and algebra can be have made the beginnings of one kind of easily founded on set theory. The such an Investigation. existence of certain astronomically To be more specific a large cardinals poses some problems for foundation for problem solving must set theoretic foundations. However, concern Itself with the following the problems posed seem to be of complex of topics. practical Importance only to certain category theorists. Foundations of PROCEDURAL EMBEDDING: How can mathematics have devoted a great deal "real world" knowledge be effectively of attention to the problems of embedded In procedures. What are good consistency and completeness. The ways to express problem solution problem of consistency Is Important methods and how can plans for the since If the foundations are solution of problems be formulated? inconsistent then any formula whatsoever may be deduced thus GENERALIZED COMPILATION: What trivializing the foundations. are good methods for transforming high Semantics for foundations of level goal-orlented language into mathematics are defined model specific efficient algorithms. 168 Session No. 5 Software Support
DESCRIPTIONS are procedures VERIFICATION: Hovv can it be which recognize how well some candidate verified that a procedure does what Is fits the description. Intended. PATTERNS are PROCEDURAL ABSTRACTION: What descriptions which match configurations are Rood methods for abstracting of data. For example
PROGRESSIVE REFINEMENT 170 Session No. 5 Software Support
Rather sophisticated display processors and the FIND statement of PLANNER. The have been constructed for making primitive FIND will construct a list of drawings on cathode ray tubes, all the objects with certain properties. For example we can find RECOMMENDATIONS: five things which are on something PLANNER has primitives which allow which Is green by evaluating recommendations as to how disparate sections of goal oriented language
2. Information Processing Overview total ordering is imposed on the Some readers will prefer to assertions so that the buckets can be read section 3 which has concrete sorted. Imperatives as well as examples before the abstract discussion declaratives can be stored In the data in this sect Ion. base. We might assert that whenever There are many ways in which an expression of the form (At objectl one can approach a description of placel) is removed from the data base, PLANNER. In this section we will then any expression in the data base of describe PLANNER from an Information of the form (ON objectl obJect2) should Processing Viewpoint. To do this we also be removed from the data base. will describe the data structure and The data base can be tree structured so the control structure of the formalism. that It is possible to simultaneously have several local data bases which are Incompatible. Furthermore assertions DATA STRUCTURE: In the data base can have varying scopes so that some will last the ASSOCIATIVE MEMORY forms the duration of a process while others are basis for PLANNER'S data space which temporary to a subroutine. consists of directed graphs with labeled arcs. The operation of PUTTING and GETTING the components of data CONTROL STRUCTURE: PLANNER uses a objects have been generalized to apply pattern directed multiprocess backtrack to any data type whatsoever. For control structure to tie the operation example to PUT the value CANONICAL on of Its primitives together, the expression (+ X Y (* X Z)) under the Indicator SIMPLIFIED Is one way to BACKTRACK ING: PLANNER record that (+ X Y (* X Z)) has been processes have the capability of canonlcally simplified. Then the backtracking to previous states. A degree to which an expression is process can backtrack into a procedure simplified can be determined by GETTING activation (I.e. a specific instance of the value under the Indicator an invocation of the procedure) which SIMPLIFIED of the expression. The has already returned with a result. operation of PUT and GET can be Using the theory of comparative Implemented efficiently using hash schematology, we have proved in the coding. Lists and vectors have been dissertation that the use of backtrack introduced to gain more efficiency for control enables us to achieve effects common special case structures. The that a language (such as LISP) which Is associative memory Is useful to PLANNER limited to recursive control structure In many ways. Monitoring gives PLANNER cannot achieve. Backtracking cuts the capability of trapping all read, across the subroutine structure of wrlte, and execute references to a PLANNER. Backtrack control allows the particular data object. The monitor consequences of elaborate tentative (which Is found under the indicator hypotheses to be explored without MONITOR) of the data object can then losing the capability of rejecting the take any action that it sees fit in hypotheses and all of their order to handle the situation. The consequences. A choice can be made on associative memory can be used to the basis of the available knowledge retrieve the value of an identifier I and If it doesn't work, a better choice of a process p by GETTING the I can be made using the new Information component of p. Code can be commented discovered while investigating the by simply PUTTING the actual comment first choice. Also backtrack control under the indicator COMMENT. makes PLANNER procedures easier to debug since they can be run backwards DATA BASE: What is most as well as forwards enabling a problem distinctive about the way in which solver to "zero In" on bugs. PLANNER uses data is that It has a data base In which data can be Inserted and removed. For example Inserting (AT Bl MULTIPROCESSING gives PLANNER P2) into the data base might signify the capability of having more than one that block Bl Is at the place P2. A locus of control in problem solving. coordinate of an expression is defined By using multiple processes, arbitrary to be an atom In some position. An patterns of search through a conceptual expression Is determined by Its problem space can be carried out. coordinates. Assertions are stored in Processes can have the power to create, buckets by their coordinates using the read, write, interrupt, resume, single associative memory in order to provide step, and fork other processes. efficient retrieval. In addition a 172 Session No. 5 Software Support
PATTERN DIRECTION combines aspects of control and data structure. The fundamental principle of pattern directed computation Is that a procedure should be a pattern of what the procedure Is Intended to accomplish. In other words a procedure should not only do the right thing but It should appear to do the right thing as well! PLANNER uses pattern direction for the following operations:
CONSTRUCTION of structured data objects is accomplished by templates. We can construct a list whose first element is the value of x and whose second element Is the value of y by the procedure (x y). If x has the value 3 and y has the value (A B) then (x y) will evaluate to (3 (A B)).
DECOMPOSITION Is accomplished by matching the data object against a structured pattern. If the pattern (x1 x2) is matched against the data object ((3 4) A) then xl will be given the value (3 4) and x2 will be given the value A.
RETRIEVAL: An assertion Is retrieved from the data base by specifying a pattern which the assertion must match and thus bind the identifiers in the pattern. For example we can determine if there is anything in the data base of the form (ON x A). if (ON B A) Is the only iter in the data base, then x is bound to B, if there Is more than one item In the data base which matches a retrieval pattern, then an arbitrary choice is made. The fact that a choice was made Is remembered so that if a simple failure backtracks to the decision, another choice can be made.
INVOCATION: Procedures can be Invoked by patterns of what they are supposed to accomplish. For example a procedure might be defined which attempts to satisfy patterns of the form (ON x y) by causing x to be ON y. Such a procedure could be Invoked by making (ON A B) a goal. The procedure might or might not succeed In achieving its goal depending on the environment in which t was called. Since many theorems might match a goal, a recommendaition is allowed as to which of the candidate theorems might be useful. The recommendation is a pattern which a candidate theorem must match In order to be invoked.
L Session No. 5 Software Support 173
3. An Extended example containing quantifiers or logical This section contains an connectives we have a choice whether to extended description of a simple express the sentence by declaratives or example in PLANNER. It Is partially by Imperatives. based on a draft written by T. Wlnograd Second, one of the most Important for the course 6.545. If the reader points about PLANNER is that it Is an would like to see a more logically evaluator for statements. It accepts systematic presentation, he can consult input in the form of expressions the the athor's dissertation. written in the PLANNER language and The easiest way to understand evaluates them, producing a value and PLANNER Is to watch how It works, so In side effects. ASSERT is a function this section we will present a few which, when evaluated, stores Its simple examples and explain the use of argument In the data base of some of Its most elementary features. assertions. In this example we have These examples are not ,ntended to defined a theorem of the CONSEQUENT represent TOY PROBLEMS to serve as test type (we will see other types later). cases for "general problem solvers". This states that if we ever want to The toy problem paradigm Is misleading establish a goal of the form (FALLIBLE because toy problems can be solved ?Y), we can do this by accomplishing without any real knowledge of the the goal (HUMAN ?Y), where Y is a domain In which the toy problem Is Identifier. The strange prefix posed. Indeed, It seems gauche to use character "?" Is part of PLANNER'S any thing as powerful as real knowledge pattern matching capabilities (which on such simple problems. In contrast are extensive and make use of the we believe that real world problems pattern-matching language MATCHLESS require vast amounts of procedural which Is explained In chapter 4 of the knowldege for their solution. We see dissertation). If we ask PLANNER to It as part of our task to provide the prove a goal of the form (A Y), there Intellectual capabilities needed for Is no obvious way of knowing whether A effective problem solving. We would and Y are constants (like TURING and like to see the toy problem paradigm HUMAN In the example) or identifiers. replaced with an INTELLECTUAL LISP solves this problem by using the CAPABILITY paradigm where the object is function QUOTE to Indicate constants. to Illustrate the Intellectual in pattern matching this Is capabilities needed so that knowledge Inconvenient and makes most patterns can be effectively embededed in much bulkier and more difficult to procedures. read. Instead, PLANNER uses the First we will take the most opposite convention -- a constant is venerable of traditional deductions: represented by the atom Itself, while a Turing Is a human Identifier must be Indicated by adding All humans are fallible an appropriate prefix. This prefix so differs according to the exact use of Turing is falible. the identifier in the pattern, but for the time being let us just accept "?" It Is easy enough to see how as a prefix ndicating a iIdentifier. this could be expressed In the usual The definition of the theorem indicates logical notation and handled by a that It has one identifier, Y by the uniform proof procedure. instead, let (Y) following CONSEQUENT. us express it In one possible way to The third statement Illustrates PLANNER by saying: the function GOAL, which tries to prove an assertion. This can function in
a theorem with a consequent (?Z TURING) GOAL uses the data-base searching would be tried, but one of the form mechanism to look for any assertion (HAPPY ?Z) or (FALLIBLE ?Y ?Z) would which matches that pattern (I.e. an not). Assertions can have an arbitrary instantiation), and finds the assertion list structure for their format -- they (HUMAN TURING). This causes Y (and are not limited to two-member lists or therefore X) to be bound to the three-member lists as in these constant TURING, and the theorem examples.) The theorem we have Just succeeds, completing the proof and defined would be found, and In trying returning the value (FALLIBLE TURING). It, the match of the consequence to the There seems to be something goal would cause the Identifier Y to be missing. So far,the data base has bound to the constant TURING. contained only the relevant objects, Therefore, the theorem sets up a new and therefore PLANNER has found the goal (HUMAN TURING) and this succeeds right assertions immediately. Consider Immediately since It Is In the data the problem we would get if we added base. In general, the success of a new Information by evaluating the theorem will depend on evaluating a statements: PLANNER program of arbitrary
The way In which Identifiers are
to go back to the beginning and start X Is rebound but not Initialized over, It will again find TURING and so 3: on, ad Infinitum.
differs In several critical ways from semantic basis for natural language anything which is normally considered a formulating and executing plans of programming language. First, It is act Ion goal-directed. Theorems can be finding high level descriptions of thought of as subroutines, but they can visual scenes be called by specifying the goal which Other applications are its use as a is to be satisfied. This is like procedural model for: having the abllltly to say "Call a architecture design subroutine which will achieve the children stories desired result at this point." Second, models of programs the evaluator has the mechanism of elementary Euclidean geometry success and failure to handle the exploration of the conceptual goal 5. BIBLIOGRAPHY tree. In PLANNER there Is no explicit Balzer, R. EXDAMS - Extendable goal tree. The conceptual goal tree is Debugging and Monitoring System. Proc represented by a SNAPSHOT of a SJCC 1969, 34. May, 1969. CONFIGURATION of PROCESSES. Thus Balzer, R. M., On the Future of PLANNER has powerful control structure Computer Program Specification and primitives to allow the conceptlonal Organization. December 1070. goal structure to be easily and Dennis, Jack B. Programming naturally reflected In the execution of Generality, Parallelism and Computer PLANNER processes, Other evaluators, Archltectue. Computation Structures such as LISP, with a basic recursive Group Memo No. 32. August 1968. evaluator have no way to do this. Earley Jay, Toward an Third, PLANNER contains a large set of Understanding of Data Structures. primitive commands for matching Computer Science Departement, patterns and manipulating a data base, University of California, Berkeley. and for handling that data base Flkes, R., Ref-Arf: A System effIclently. for Solving Problems Stated as On the other side, we con ask how Procedures Artificial Intelligence It differs from other theorem provers. (1970). What Is gained by writing theorems In Fisher, D. A., Control the form of programs, and giving them Sturctures for Programming Languages. power to call other programs which 1970. manipulate data? The key is In the Hewitt, C, PLANNER: a Language form of the data the theorem-prover can for Proving Theorems, Artificial accept. Most systems take declarative Intelligence Memo 137, Massachusetts Information, as in predicate calculus. Institute of Technology (project MAC), This Is In the form of expressions July 1967. which represent "facts" about the Hewitt, C. PLANNER: A Language world. These are manipulated by the for Manipulating Models and Proving theorem-prover according to some fixed Theorems in a Robot, Proceedings of the uniform process set by the system. International Joint Conference on PLANNER can make use of Imperative Artificial Intelligence. Washington D. Information, telling it how to go about C. May 1969. proving a subgoal, or to make use of an Hewitt, C. Teaching Procedures assertion. This produces what is In Humans and Robots. Conference on called HIERARCHICAL control structure. Structural Learning. April 5, 1970. That Is, any theorem can indicate what Philadelphia, Pa. the theorem prover is supposed to do as Hewitt, C. Description and It continues the proof. It has the Theoretical Analysis (using Schemas) of full power to evaluate expressions PLANNER: A Language for Proving which can depend on both the data base Theorems and Manipulating Models In a and the subgoal tree, and to use its Robot. Phd. Feb. 1971. results to control the further proof by Hewitt, C. and Patterson M. making assertions, deciding what Comparative Schematology. Record of theorems are to be used, and specifying Project MAC Conference on Concurrent a sequence of steps to be followed. Systems and Parallel Compuatlon. June 2-5, 1970. Available from ACM. 4. Current Applications for PLANNER Kay, Alan C, Reactive Engine, The PLANNER formal Ism Is Ph. D. thesis University of Utah, 1970. currently being used in a variety of McCarthy, J.; Abrahams, Paul applications. it is being used as W.; Edwards, Daniel J.; Hart, Timothy part of the conceptual machinery of a P.; and Levin, Michael I, 1962. Lisp robot at M.I.T. and Stanford. The 1.5 Programmer's Manual, M. I. T. formalism is used for the following Press. purposes in a robot: McCarthy, J. and Hayes, P., 182 Session No. 5 Software Support
Some Philosophical Problems form the Standpoint of Artificial Intelligence. Stanford A. I, Memo 73. Newell, A., Shaw, J. C, and Simon, H. A., 1059. Report on a General Problem-solving Program, Proceedings of the International Conference on Information Processing, Paris: UNESCO House, pp. 256-26'*. Perils, A. J. The Synthesis of Algorithmic Systems. JACM. Jan. 19C7. Winograd, T. Procedures as a Representation for Data In a Computer Program for Understanding Natural Language. MAC TR-84. February 1971.