Two techniques offer interesting promise in addressing these problems. The first technique, plan-based program recognition, involves the creation of a catalog of plans, patterns of commonly used program constructs that are used in a given programming language to implement a particular design goal. A recognizer uses these plans to construct a characterization of the program based upon the semantics of the plans, rather than the syntax of the programming language. However, plan recognition is quite expensive. The second technique, program slicing, involves the creation of a derivative program containing only those statements relevant to the portion of the program state currently under study by the maintainer.
Fewer statements implies improved comprehension.
We are creating a hybrid plan recognition technique based upon program slicing to support program maintenance and adaptation. This technique enjoys both the syntactic analytic approach of slicing and the semantics base approach of plan recognition, employing each where appropriate to support the other. This is of key value to NASA, given the scale, distribution and complexity of the legacy systems present within the agency. This work promises similar results.