MVILAIN@G.BBN.COM (Marc Vilain) (12/13/88)
BBN Science Development Program AI Seminar Series Lecture PLAN ANALYSIS OF PROGRAMS Stanley Letovsky Department of Computer Science Yale University (LETOVSKY-STANLEY@YALE.EDU) BBN Labs 10 Moulton Street 4th floor large conference room 10:30 am, Thursday December 15 *********************************** *** *** *** Note: not the usual room! *** *** *** *********************************** Computer programs are more than just concatenations of instructions to a machine; they are also compositions of programming plans. Conventional languages make the instructions to the machine explicit, but they often obscure the plans, causing difficulties for program maintainers, who operate mostly at the level of changing the plans in the code. Plan analysis is the task of determining what plans are implemented in a given program. Automatic plan analysis may provide the basis for intelligent documentation tools which can provide maintainers with high level summaries of programs, and answer questions about the goals and plans in the code. This talk presents an approach to automated plan analysis of programs based on program transformations. Plan recognition is modelled as program transformation within a wide-spectrum language, in which the expressions in the code that make up a plan are rewritten into a new expression describing the corresponding goal. Exhaustive application of this recognition process yields a new version of the target program from which optimizations and implementation details have been removed. This version can be used to provide summary documentation of programs. The history of transformation applications provides information about what plans were found in the program. This information can be used to answer questions about the motivation for particular pieces of code. Analysis methods are presented within the transformational framework for analyzing several problematic types of programming plans. These include imperative plans with side effects, looping plans, plans involving abstract datatypes, and plans involving conditionals. A working prototype transformational analyzer, called CPU, has been constructed and will be described in the talk. -------