Automatic Control Understanding for Natural Programs, John Hartman
@PhDThesis{ hartman:automatic,
author = {John Hartman},
title = {Automatic Control Understanding for Natural Programs},
school = {University of Texas at Austin},
year = {1991},
month = may,
abstract = {Program understanding involves recognizing abstract
concepts like ``read-process-loops'' in existing programs.
Programmers spend much of their time understanding
programs, so studying and automating the process has many
benefits.
Programming plans are units of programming knowledge
connecting abstract concepts and their implemenations.
Existing research assumes that plan instances can be
recognized to recover the programmer's abstract concepts
and intentions, but this approach has not been confirmed
empirically.
We present a practical method for bottom-up control concept
recognition in large, unstructured imperative programs.
Control concepts are abstract notions about interactions
between control flow, data flow and computation, such as
``do loop'', ``read-process-loop'', and ``bounded linear
search''. They are recognized by comparing an abstract
program representation against a library of standard
implementation plans. The program representation is a
hierarchical control flow/data flow graph decomposed into a
tree of sub-models using propers (single entry/exit conrol
flow sub-graphs). Plans are represented by similar graphs
with added qualifications. Recognition is based on simple
matching between sub-models and plans. The method was
implemented in the UNPROG program understander and tested
with Cobol and Lisp source programs.
This method is robust, efficient and scalable. The program
represenation can be formed for all language construct
which permit static determination of control and data flow.
Comparing sub-models and plans is efficient because
sub-models are small; have restricted, canonical control
flow; and focus recognition on criterial program features.
The number of sub-models and comparisions increases
linearly with program size.
UNPROG has been applied to automatic Cobol restructuring.
Knowledge associated with plans and concepts permits more
specific and insightful transformation, code generation,
and documentation than is possible with syntactic methods.
Control understanding can similarly raise the level of
other reverse engineering and re-engineering tools for
applications like analysis, documentation, and translation.
We also showed how our method and UNPROG can be used for
empirical study of programs at the conceptual level.
Results can be used to improve recognizer performance,
acquire plans, catalog natural plans and concepts, test the
hypothesis that programs are planful, and characterize
program populations. },
class = {Software_Reverse_Engineering, Reverse_Design,
Knowledge-Based_Concept_Assignment,
Program_Plan_Assignment_by_Parsing, UNPROG}
}
Understanding Natural Programs Using Proper Decomposition, John Hartman
@InProceedings{ hartman:understanding,
author = {John Hartman},
title = {Understanding Natural Programs Using Proper
Decomposition},
booktitle = {Proceedings of the 13th International Conference on
Software Engineering },
pages = {62--73},
month = may,
year = {1991},
abstract = {The author presents a practical method for automatic
control concept recognition in large, unstructured
imperative programs. Control concepts are abstract notions
about interactions between control flow, data flow, and
computation, e.g., read-process loops. They are recognized
by comparing a language-independent abstract program
representation against standard implementation plans.
Recognition is efficient and scalable because the program
representation is hierarchically decomposed by propers
(single entry/exit control flow subgraphs). A recognition
experiment using the UNPROG program understander shows the
method's performance, the role of proper decomposition, and
the ability to use standard implementations in a sample of
programs. How recognized control concepts are used to
perform Cobol restructuring with quality not possible with
existing syntactic methods is described.},
class = {Software_Reverse_Engineering, Reverse_Design,
Knowledge-Based_Concept_Assignment,
Program_Plan_Assignment_by_Parsing, UNPROG}
}