Programming Plans and Functional Representation
John Hartman and B.Chandrasekaran
Laboratory for Artificial Intelligence Research,
Dept. of Computer and Information Science
The Ohio State University, 2015 Neil Ave., Columbus, OH
43210-1277
http://www.cis.ohio-state.edu/hypertext/LAIR/lair-page.html
jhartman@cis.ohio-state.edu
This work was supported by ARPA,
Order No. A714, monitored by
USAF Materiel Command Rome Laboratories--Contract
F30602-93-C-0243.
ABSTRACT
Design and engineering domains use abstract
device descriptions and
standard designs. Much software engineering knowledge is thought
be
in the form of standard generic designs called programming
plans. Programming plans are essential in automatic programming
and
program understanding systems, yet there is no consistent
description
or formalization of them. This paper gives a description and
representation of programming plans, using Chandrasekaran's
Functional
Representation theory of device functionality (FR). We first give
a
framework for classifying and characterizing certain software
engineering representations used by humans and automatic systems.
Programming plans are characterized and surveyed in this
framework. FR
enhances, subsumes, and explicates plan notions and
representations
conforming to the working definition. We show how FR represents
programming plans, understanding of software, and program-plan
relationships. Examples are taken from FR-UNPROG, the FR
representation of plans, understanding, and applications in the
UNPROG
automatic program understander. Additional issues discussed
include
representation of multiple implementations and reengineering,
design
rationale capture, plan libraries, and FR's generality for
software
engineering representations.
INTRODUCTION
Design and engineering domains use abstract device descriptions
and
standard methods and designs. A {\em plan\/} is an abstract
description of how to accomplish a task. Plans are an important
class
of abstract standard designs. We focus on plans for causal or
temporal
processes. There is a large AI literature about plans and
planning in
sequential task domains such as robot control, problem solving,
and
design.\cite{allen-planning,allen-reasoning-plans,
steel-planning-bib,hoc-psych-plan, new-chandra-ai-plans}
In software engineering, various kinds of plans and planning are
important in various tasks. We distinguish between plans for
programmer tasks and plans for program tasks. {\em Plans for
programmer
tasks\/} describe how programmers can perform software design and
understanding. For example, programmers use plans describing
general
design methods, e.g.\ design and conquer, and transformation of
specific representations, e.g.\ flow chart to Fortran.
In contrast, {\em plans for program tasks\/} describe
computations. Ordinary programs are plans for accomplishing
requirements of a specific problem in its execution environment.
This
paper is about another kind of plan for program tasks, standard
designs or programming plans. {\em Programming plans\/} such as
``counting loop'' describe abstract, generic computation.
Programming
plans are abstract because they are not written in ordinary
programming languages to operate on programming language
entities. Rather, they describe computations on non-program
objects,
e.g.\ domain objects like ``employee'', using non-program
descriptions, e.g.\ pseudocode. Program plans are generic because
they
they can and must be specialized to be used for a specific
problem
Programming plans are important units of knowledge for designing
and
understanding programs. They have been extensively investigated
in the
software psychology literature. Practically, programming plans
are
necessary for effective interactive and automatic programming and
program understanding tools. However, there is no accepted
description or formalization of programming plans and their
representation. We will consider programming plans for causal,
temporal computational processes.\footnote{Non-causal programming
plans describe design aspects like data structures, modules,
objects,
and architectural features.\cite{dats-struc-plans,
modularity-plans,
harris-arch}}
This paper gives a description and representation of programming
plans using Chandrasekaran's Functional Representation theory of
device functionality (FR). We first give a framework for
classifying
and characterizing certain software engineering representations
used
by humans and automatic systems. Using this framework,
programming
plans are surveyed, characterized and given a working definition.
FR
enhances, subsumes, and explicates plan notions and
representations
conforming to the working definition. We show how FR represents
programming plans, understanding of software, and program-plan
relationships. Examples are taken from FR-UNPROG, the FR
representation of plans, understanding, and applications in the
UNPROG
automatic program understander. Additional issues discussed
include
representation of multiple implementations and reengineering,
design
rationale capture, plan libraries, and FR's generality for
software
engineering representations.