TL;DR: The main problems associated with debugging concurrent programs are increased complexity, the "probe effect", nonrepeatability, and the lack of a synchronized global clock as discussed by the authors, and a survey of debugging techniques can be found in this paper.
Abstract: The main problems associated with debugging concurrent programs are increased complexity, the "probe effect," nonrepeatability, and the lack of a synchronized global clock. The probe effect refers to the fact that any attempt to observe the behavior of a distributed system may change the behavior of that system. For some parallel programs, different executions with the same data will result in different results even without any attempt to observe the behavior. Even when the behavior can be observed, in many systems the lack of a synchronized global clock makes the results of the observation difficult to interpret. This paper discusses these and other problems related to debugging concurrent programs and presents a survey of current techniques used in debugging concurrent programs. Systems using three general techniques are described: traditional or breakpoint style debuggers, event monitoring systems, and static analysis systems. In addition, techniques for limiting, organizing, and displaying a large amount of data produced by the debugging systems are discussed.
TL;DR: SELF as discussed by the authors uses implementation-level maps to transparently group objects cloned from the same prototype, providing data type information and eliminating the apparent space overhead for prototype-based systems.
Abstract: We have developed and implemented techniques that double the performance of dynamically-typed object-oriented languages. Our SELF implementation runs twice as fast as the fastest Smalltalk implementation, despite SELF's lack of classes and explicit variables.To compensate for the absence of classes, our system uses implementation-level maps to transparently group objects cloned from the same prototype, providing data type information and eliminating the apparent space overhead for prototype-based systems. To compensate for dynamic typing, user-defined control structures, and the lack of explicit variables, our system dynamically compiles multiple versions of a source method, each customized according to its receiver's map. Within each version the type of the receiver is fixed, and thus the compiler can statically bind and inline all messages sent to self. Message splitting and type prediction extract and preserve even more static type information, allowing the compiler to inline many other messages. Inlining dramatically improves performance and eliminates the need to hard-wire low-level methods such as +,==, and ifTrue:.Despite inlining and other optimizations, our system still supports interactive programming environments. The system traverses internal dependency lists to invalidate all compiled methods affected by a programming change. The debugger reconstructs inlined stack frames from compiler-generated debugging information, making inlining invisible to the SELF programmer.
TL;DR: A process for detecting software errors in a computer program and automatically gathering diagnostic data limited to the error to be resolved is described in this article, where an error detection code is placed within the software program during program development.
Abstract: A process for detecting software errors in a computer program and automatically gathering diagnostic data limited to the error to be resolved. Error detection code is placed within the software program during program development. When an error or failure is detected, this process is called and captures only the data required to debug the software error. The error detection code notifies the process of which data to capture by selecting entries from a table within the process. This table, known as an Application Data Table (ADT), contains the layout and format of all data areas used by the calling problem program and information required to build a generic alert and send the generic alert to a computer network monitor program. This process is only called conditionally when an error is detected. It is completely idle until such a condition occurs.
TL;DR: It is shown that an instruction counter can be reasonably implemented in software, often with less than 10% execution overhead, and will make program instrumentation much easier for the system developer.
Abstract: Although several recent papers have proposed architectural support for program debugging and profiling, most processors do not yet provide even basic facilities, such as an instruction counter. As a result, system developers have been forced to invent software solutions. This paper describes our implementation of a software instruction counter for program debugging. We show that an instruction counter can be reasonably implemented in software, often with less than 10% execution overhead. Our experience suggests that a hardware instruction counter is not necessary for a practical implementation of watch-points and reverse execution, however it will make program instrumentation much easier for the system developer.
TL;DR: PIE's visualization tools are used to isolate and repair the parallelism problem of an eight-process computation, and the issues involved in correctly presenting visual information, such as the features users ask for and what can be done about a performance monitor's perturbation of computations, are addressed.
Abstract: The authors examine a special software development environment called the Parallel Programming and Instrumentation Environment (PIE). PIE is designed to develop performance-efficient parallel and sequential computations. Following an explanation of PIE's general theory and features, PIE's visualization tools are used to isolate and repair the parallelism problem of an eight-process computation. Two more difficult examples using PIE are discussed. Some of the issues involved in correctly presenting visual information, such as the features users ask for and what can be done about a performance monitor's perturbation of computations, are addressed. >
TL;DR: An algorithm is presented for automatically detecting non-determinacy in parallel programs that utilize event style synchronization instructions, using the Post, Wait, and Clear primitives.
Abstract: One of the major difficulties of explicit parallel programming for a shared memory machine model is detecting the potential for nondeterminacy and identifying its causes. There will often be shared variables in a parallel program, and the tasks comprising the program may need to be synchronized when accessing these variables. This paper discusses this problem and presents a method for automatically detecting non-determinacy in parallel programs that utilize event style synchronization instructions, using the Post, Wait, and Clear primitives. With event style synchronization, especially when there are many references to the same event, the difficulty lies in computing the execution order that is guaranteed given the synchronization instructions and the sequential components of the program. The main result in this paper is an algorithm that computes such an execution order and yields a Task Graph upon which a nondeterminacy detection algorithm can be applied. We have focused on events because they are a frequently used synchronization mechanism in parallel versions of Fortran, including Cray [Cray87], IBM [IBM88], Cedar [GPHL88], and PCF Fortran [PCF88].
TL;DR: The imperfect debugging assumption affects software reliability growth models, but exponential-type models can still be used.
Abstract: This paper discusses the improvement of conventional software reliability growth models by elimination of the unreasonable assumption that errors or faults in a program can be perfectly removed when they are detected. The results show that exponential-type soft- ware reliability growth models that deal with error- counting data could be used even if the perfect debugging assumption were not held, in which case the interpretation of the model parameters should be changed. An analysis of real project data is presented.
TL;DR: The authors explore the graphical representation of objects and processes as a means for understanding programs consisting of large numbers of concurrent processes and discusses visual abstraction and their visualization methodology, which they illustrate by applying it to region labeling.
Abstract: The authors explore the graphical representation of objects and processes as a means for understanding programs consisting of large numbers of concurrent processes. Their goal is to establish a technical foundation for research into the monitoring and debugging of large-scale concurrent programs. They explain declarative visualization and introduce some shared-data-space concepts and notation by means of a simple, nondeterministic, parallel algorithm. They discuss visual abstraction and their visualization methodology, which they illustrate by applying it to region labeling. Thy examine the relaxation of nonintervention that visualization makes possible. >
TL;DR: It is shown that it is possible to do asymptotic likelihood inference for software reliability models based on order statistics or nonhomogeneous Poisson processes, with asymPTotic confidence levels for interval estimates of parameters, for the conditional failure rate of the software.
Abstract: There are many software reliability models that are based on the times of occurrences of errors in the debugging of software. It is shown that it is possible to do asymptotic likelihood inference for software reliability models based on order statistics or nonhomogeneous Poisson processes, with asymptotic confidence levels for interval estimates of parameters. In particular, interval estimates from these models are obtained for the conditional failure rate of the software, given the data from the debugging process. The data can be grouped or ungrouped. For someone making a decision about when to market software, the conditional failure rate is an important parameter. The use of interval estimates is demonstrated for two data sets that have appeared in the literature. >
TL;DR: It is found that the rule-based control technique enhances existing redundancy management systems, providing smooth integration of symbolic and numeric computation, a search-based decision-making mechanism, straightforward system organization and debugging, an incremental growth capability, and inherent parallelism for computational speed.
Abstract: A technique for rule-based fault-tolerant flight control is presented. The objective is to define methods for designing control systems capable of accommodating a wide range of aircraft failures, including sensor, control, and structural failures. A software architecture that integrates quantitative analytical redundancy techniques and heuristic expert system concepts for the purpose of in-flight, real-time fault tolerance is described. The resultant controller uses a rule-based expert system approach to transform the problem of failure accommodation task scheduling and selection into a problem of search. Control system performance under sensor and control failures using linear discrete-time deterministic simulations of a tandem-rotor helicopter's dynamics is demonstrated. It is found that the rule-based control technique enhances existing redundancy management systems, providing smooth integration of symbolic and numeric computation, a search-based decision-making mechanism, straightforward system organization and debugging, an incremental growth capability, and inherent parallelism for computational speed.
TL;DR: This paper suggests a generalization of the language used to communicate with the debugger, in addition to the usual “yes” and “no” answers, formal specifications of some properties of the intended model are allowed.
Abstract: Algorithmic debugging, as presented by Shapiro, is an interactive process where the debugging system acquires knowledge about the expected meaning of a program being debugged and uses it to localize errors. This paper suggests a generalization of the language used to communicate with the debugger. In addition to the usual “yes” and “no” answers, formal specifications of some properties of the intended model are allowed. The specifications are logic programs. They employ library procedures and are developed interactively in the debugging process. An experimental debugging system incorporating this idea has been implemented. In contrast to some other systems, its diagnosis algorithms do not require instantiation of unsolved goals by the oracle. This is achieved by generalization of the oracle in the incorrectness algorithm, and by adopting a new approach in the insufficiency algorithm. A formal proof of correctness and completeness of the new insufficiency algorithm is presented. Extensions for some Prolog features are discussed.
TL;DR: The results are interpreted in light of the need to formulate a mental model of correct program functioning and to determine the location of the program bug in terms of the functioning of that model.
Abstract: To develop a theory of computer program bugs and of debugging, we need to classify on an abstract basis the nature of the bug and to relate the nature of the bug to the difficulty of debugging. Atwood and Ramsey (1978 ) report the only attempt of this nature in a study based on the theory of propositional hierarchies (see Kintsch, 1974 ) from the text comprehension literature. Propositional hierarchies are a conceptualization of the way in which sentences are stored in memory for the purpose of recall, etc. Atwood and Ramsey's studies did not distinguish between the difficulty of debugging as a function of the location of the bug in the propositional hierarchy or the location of the bug in the program structure. The objective of the series of three studies reported here is to differentiate between bug difficulty based on location in the propositional hierarchy of the sentence structure of the programming language and its location in the serial structure of the program. Little support was found for the effect of the location of the bug in the program structure on debugging difficulty. The effect of the location of the bug in the propositional hierarchy warrants further investigation. The results are interpreted in light of the need to formulate a mental model of correct program functioning and to determine the location of the program bug in terms of the functioning of that model.
TL;DR: A knowledge-based approach for automating the analysis of program source code, called PAT, is proposed, which represents the program information as events and the program analysis knowledge as plans.
Abstract: Software maintenance is the most expensive part of the software life-cycle. This is partially due to the fact that quite often the only reliable and available documentation about a program is its source code and all the relevant information must be extracted from it.
This thesis research proposes a knowledge-based approach for automating the analysis of program source code. A prototype program analysis tool, called PAT, has been constructed to demonstrate the feasibility of the proposed approach.
In PAT, we represent the program information as events and the program analysis knowledge as plans. Both events and plans are organized into a classification hierarchy based on the programming concepts that they express. The understanding of a program is implemented as an inference process in which new events (representing high-level programming concepts) are derived from the existing ones using plans. Plans also contain information for the documentation and debugging of the derived events. A justification-based truth maintenance system is used to record and maintain the facts derived from the programs and their justifications.
TL;DR: The goal is to aid the debugging process by helping the programmer visualize the dynamic aspects of a program's behavior, resulting in an animation of the program's execution.
Abstract: Modern graphical workstations make possible interactive real-time manipulation of 3-D objects. Although 3-D graphics is usually used to model real-world objects, an abstract three-dimensional pictorial representation of computer programs is explored. Since programs are descriptions of dynamic processes, the focus is on the dynamic behavior of the graphical representation, resulting in an animation of the program's execution. The goal is to aid the debugging process by helping the programmer visualize the dynamic aspects of a program's behavior. 3-D representations help make use of the enormous innate power of the human visual system. >
TL;DR: Parasight has been used to implement conditional breakpoints, an important primitive for both high-level and parallel debugging, and preliminary measurements indicate that Parasight breakpoints are 1000 times faster than the breakpoints in parallel “cdb”, a conventional UNIX debugger.
Abstract: Existing kernel-level debugging primitives are inappropriate for instrumenting complex sequential or parallel programs. These functions incur a heavy overhead in their use of system calls and process switches. Context switches are used to alternately invoke the debugger and the target programs. System calls are used to communicate data between the target and debugger.None of this is necessary in shared-memory multiprocessors. Multiple processors concurrently run both the debugger and the target. Shared-memory is used to implement efficient communication. The target's state is accessed by running both the target and the debugger in the same address space. Finally, instrumentation points, which have largely been implemented as traps to the system, are reimplemented as simple branches to routines of arbitrary complexity maintained by the debugger. Not only are primitives such as conditional breakpoints thus generalized, but their efficiency is improved by several orders of magnitude. In the process, much of the traditional system's kernel support for debugging is reimplemented at user-level.This paper describes the implementation of debugging primitives in Parasight, a parallel programming environment. Parasight has been used to implement conditional breakpoints, an important primitive for both high-level and parallel debugging. Preliminary measurements indicate that Parasight breakpoints are 1000 times faster than the breakpoints in parallel “cdb”, a conventional UNIX debugger. Light-weight conditional breakpoints open up new opportunities for debugging and profiling both parallel and sequential programs.
TL;DR: A bibliography of over three hundred technical reports, journal and conference papers, and Ph.D. dissertations dealing with parallel and distributed debuggers covering treatments of programming environments, debugging methodology, and techniques for program analysis.
Abstract: A bibliography of over three hundred technical reports, journal and conference papers, and Ph.D. dissertations dealing with parallel and distributed debuggers. Treatments of programming environments, debugging methodology, and techniques for program analysis are included when a significant portion of the publication is devoted to factors influencing the design or implementation of debugging tools.
TL;DR: The Debugging Assistant (DEBUSSI) localizes bugs by reasoning about logical dependencies, which manipulates the assumptions that underlie a bug manifestation, eventually localizing the bug to one particular assumption.
Abstract: Software bugs are violated specifications. Debugging is the process that culminates in repairing a program so that it satisfies its specification. An important part of debugging is localization, whereby the smallest region of the program that manifests the bug is found. The Debugging Assistant (DEBUSSI) localizes bugs by reasoning about logical dependencies. DEBUSSI manipulates the assumptions that underlie a bug manifestation, eventually localizing the bug to one particular assumption. At the same time, DEBUSSI acquires specification information, thereby extending its understanding of the buggy program. The techniques used for debugging fully implemented code are also appropriate for validating partial designs.
TL;DR: Marionette as mentioned in this paper is a software package for distributed parallel programming in an environment of networked heterogeneous computer systems, which uses a master/slave model in which sequential application programs can invoke worker operations and context operations (updates to slaves' process states).
Abstract: Marionette, a software package for distributed parallel programming in an environment of networked heterogeneous computer systems is described. It uses a master/slave model in which otherwise sequential application programmes can invoke worker operations (asynchronous remote procedure calls executed by slave processes) and context operations (updates to slaves' process states). The master and slaves also interact through shared data structures that can be modified only by the master. The Marionette runtime system is a heterogeneous remote procedure call package. It maintains the consistency of shared data structures, recovers transparently from slave processor failure, and assigns operations to slaves. The Marionette system includes tools for debugging, automated compilation of program binaries for multiple architectures, and distributing binaries to remote file systems. Measurements of a UNIX-based implementation to Marionette and a parallel ray-tracing renderer are presented. >
TL;DR: This paper presents a formal, general model of program dependencies, and it is shown that weak syntactic dependence is a necessary condition for semantic dependence, but that neither weak nor strong Syntactic dependence are sufficient conditions.
Abstract: This paper presents a formal, general model of program dependencies. Two generalizations of control and data dependence, called weak and strong syntactic dependence, are presented. Some of the practical implications of program dependencies are determined by relating weak and strong syntactic dependence to a relation called semantic dependence. Informally, one program statement is semantically dependent on another if the latter statement can affect the execution behavior of the former. It is shown that weak syntactic dependence is a necessary condition for semantic dependence, but that neither weak nor strong syntactic dependence are sufficient conditions. The implications of these results for software testing, debugging, and maintenance are then explored.
TL;DR: This paper discusses extention of the authors' algorithms for dealing with some Prolog constructs, in particular, negation of composed goals, unsafe uses of negation, the built-in setof predicate, and the if-then-else construct are elaborated upon.
Abstract: Traditional declarative debuggers, despite their theoretical attractions are not considered to be practical tools for debugging of many Prolog programs. This is partly due to the fact that the basic declarative debugging system (Shapiro 83) only dealt with pure Prolog programs, and partly due to practical limitations of the suggested methods and algorithms. Our aim has been to study the applicability of declarative debugging methods to a wider range of Prolog programs. Earlier we have reported on improvements to methods and algorithms for declarative debugging of logic programs. In this paper we discuss extention of our algorithms for dealing with some Prolog constructs. In particular , negation of composed goals, unsafe uses of negation, the built-in setof predicate, and the if-then-else construct are elaborated upon. We also report on experiments with a sample of non-trivial Prolog programs, using our prototype system. Practical problems such as multiplicity of \irrelevant" user interactions are addressed. Finally, the types of Prolog programs to which the extended declarative debugging techniques are applicable are discussed.
TL;DR: The serializatin debugging facility as mentioned in this paper allows the programmer to select parallel sections of the program for single processor execution in order to locate errors in the program and to locate parallel constructs.
Abstract: A serializatin debugging facility operates by assisting the computer programmer in the selection of parallel sections of the parallel program for single processor execution in order to locate errors in the program. Information is collected regarding parallel constructs in the source program. This information is used to establish program structure and to locate sections of the program in which parallel constructs are contained. Program structure and the locations of parallel constructs within a program are then displayed as a tree graph. Viewing this display, a programmer selects parallel sections for serialization. Object code for the program is then generated in accordance with the serialization instructions entered by the programmer. Once executed, the programmer can compare the results of execution of parallel sections of the program in a single processor and a multiprocessor environment. Differing execution results in each environment is indicative of a parallel programming error which can then be corrected by the programmer. The programmer can repeat these steps, each time selecting different sections of the program for serialization. In this way, erroneous sections of the program can be localized and identified.
TL;DR: A formal model is presented to analyze two aspects of conversion problems: translation and synchronization, and an algorithm is given to construct a valid converter.
Abstract: A formal model is presented to analyze two aspects of conversion problems: translation and synchronization. The purpose of the translation is to map messages in one protocol to those in another protocol, whereas the synchronization is to hold matched messages for carrying out the translation. An algorithm is given to construct a valid converter. The algorithm is low in space complexity, and yields a converter with several merits: concurrent processing, easy debugging, minimum work on development, and easy implementation for half-gateways. >
TL;DR: This survey of recent research focuses on debugger visualization systems, focusing on the fact that debuggers are tied to specific models and that this association may restrict their usefulness and acceptability.
Abstract: The complexity of parallel programming has stimulated the development of a variety of debugging tools. This survey of recent research focuses on debugger visualization systems. The effectiveness of such systems is bounded by the degree to which their representations of run-time behavior correlate with the language structures used to incorporate parallelism, as well as the logical framework adopted by the programmer. Current visualization systems are compared with the conceptual models supported by parallel languages. Attention is drawn to the fact that debuggers are tied to specific models and that this association may restrict their usefulness and acceptability.
TL;DR: The authors describe the implementation of existing power system applications in a concurrent programming environment that includes a multiprocessor computing system with concurrent processing software facilities and a concurrent processing simulator for assisting in problem partition and debugging.
Abstract: The authors describe the implementation of existing power system applications in a concurrent programming environment. The tools used comprise a multiprocessor computing system with concurrent processing software facilities and a concurrent processing simulator for assisting in problem partition and debugging. The goal is to obtain shorter execution times taking into account the solution structure. Three case studies are used to illustrate the application of the above tools and the development methodology: multiarea reliability, system analysis model, and security-constrained dispatch with postcontingency corrective rescheduling. Results obtained show a very high efficiency in the use of the concurrent processors. >
TL;DR: The paper presents an efficient methodology for the detection, diagnosis and elimination of inconsistent data gathered during real-time power systems monitoring, using a dynamic stateestimation algorithm.
Abstract: The paper presents an efficient methodology for the detection, diagnosis and elimination of inconsistent data gathered during real-time power systems monitoring, using a dynamic stateestimation algorithm. The capability of forecasting the system state and, consequently, the measurement set is the basic characteristic of the dynamic state estimators. Based on this characteristic a scheme for the detection of suspicious information is built. The suspicions are caused by: gross measurement errors, topological errors or gross forecasting errors due to sudden changes in the system operating point. The diagnosis about which type of error is actually present in the data set is carried out while taking into account the results of the forecasting and filtering steps of the state estimator. Numerical results of simulation studies with the proposed debugging algorithm are presented and discussed.
TL;DR: A system architecture has been developed to implement real-time large-vocabulary continuous-speech recognition using HMM (hidden Markov model) algorithms and bigram language models and it is shown that the largest bottleneck in such a system is located in the memory access.
Abstract: A system architecture has been developed to implement real-time large-vocabulary continuous-speech recognition using HMM (hidden Markov model) algorithms and bigram language models. It is shown that the largest bottleneck in such a system is located in the memory access. The architecture exploits a variety of techniques, such as partitioning and replication, to cope with this memory bottleneck. The required throughput is achieved with the aid of extensive pipelining (up to thirteen levels deep) and concurrency. The architecture allows extension to larger vocabularies by the addition of more parallel units. Pin count considerations have resulted in the definition of five custom integrated circuits which are currently being tested. Using the proposed approach, the authors are currently designing and debugging a real-time 3000-word continuous-speech recognition system that uses bigram language models. >
TL;DR: A library of routines that enables the development of portable parallel programs that provides portable routines to perform certain widely-used, high-level communication operations, such as global broadcast and global sum.
Abstract: In this report we describe a library of routines that enables the development of portable parallel programs. The library is designed primarily to provide portable communication primitives and related system calls for distributed-memory architectures. The package need not be limited to such machines, however, and we expect that the message-passing paradigm on which the library is based will also be useful on other parallel architectures for which data locality is an important performance consideration. The library also provides portable routines to perform certain widely-used, high-level communication operations, such as global broadcast and global sum. Their inclusion frees users from having to develop these commonly needed capabilities or to modify them to run on different machines. Finally, the library provides an execution tracing facility that can be used to monitor performance or to aid in debugging. 1 ref.
TL;DR: In this article, the authors propose a methodology for top-down analysis of parallel program executions on shared-memory multiprocessors, based on a formal model for shared memory communication among processes in a parallel program.
Abstract: One of the most serious problems in the development
cycle of large-scale parallel programs is the lack of tools for
debugging and performance analysis. Parallel programs are more
difficult to analyze than their sequential counterparts for several
reasons. First, race conditions in parallel programs can cause
non-deterministic behavior, which reduces the effectiveness of
traditional cyclic debugging techniques. Second, invasive,
interactive analysis can distort a parallel program's execution
beyond recognition. Finally, comprehensive analysis of a parallel
program's execution requires collection, management, and
presentation of an enormous amount of information. This
dissertation addresses the problem of debugging and analysis of
large-scale parallel programs executing on shared-memory
multiprocessors. It proposes a methodology for top-down analysis of
parallel program executions that replaces previous ad-hoc
approaches. To support this methodology, a formal model for
shared-memory communication among processes in a parallel program
is developed. It is shown how synchronization traces based on this
abstract model can be used to create indistinguishable executions
that form the basis for debugging. This result is used to develop a
practical technique for tracing parallel program executions on
shared-memory parallel processors so that their executions can be
repeated deterministically on demand. Next, it is shown how these
traces can be augmented with additional information that increases
their utility for debugging and performance analysis. The design of
an integrated, extensible toolkit based on these traces is
proposed. This toolkit uses execution traces to support
interactive, graphics-based, top-down analysis of parallel program
executions. A prototype implementation of the toolkit is described
explaining how it exploits our execution tracing model to
facilitate debugging and analysis. Case studies of the behavior of
several versions of two parallel programs are presented to
demonstrate both the utility of our execution tracing model and the
leverage it provides for debugging and performance
analysis.
TL;DR: The following approaches to testing concurrent programs are discussed: single execution testing, multiple executionTesting, and deterministic execution testing.
Abstract: Although a lot of research has been done in software testing, how to test concurrent programs effectively has not received much attention. Two early papers on testing concurrent programs were written by P. Brinch Hansen (see Software-Practice and Experience, vol.8, p.145-50 and p.721-9 (1989)) K.C. Tai's paper (1985) addressed several issues on testing concurrent programs and started the work on deterministic execution testing and debugging of concurrent programs. These and other research results on testing concurrent programs are briefly examined. The following approaches to testing concurrent programs are discussed: single execution testing, multiple execution testing, and deterministic execution testing. Problems in deterministic execution testing and debugging of concurrent programs are examined. >
TL;DR: An approach to automate the process of deciding whether a program is performing correctly, and if not, to discover the probable cause of the problem, is studied, which has led to the development of a methodology of debugging programs based on formal specifications.
Abstract: This thesis studies an approach to automate the process of deciding whether a program is performing correctly, and if not, to discover the probable cause of the problem. It assumes that the intended behavior of the program is specified in some formal, high-level specification language. It studies how one can check automatically at runtime whether the program is running consistently with its specification, and if not, how inconsistencies can be automatically detected and diagnosed. A methodology of using this checking methodology for debugging formally specified programs is then presented.
The consistency checking methodology depends on the particular specification language constructs used. In this thesis, two categories of constructs are studied: (1) generalized assertions and (2) algebraic specifications.
Generalized assertions contain boolean expressions that must be satisfied within a specified region in the underlying program. Checking functions are generated which test for the truth of these boolean expressions. Diagnostic messages are given and a debugger is invoked if there is a violation. Checking functions are called from locations in the program where the specification may have changed value.
For the purpose of this thesis, algebraic specifications are considered to be equations whose terms comprise abstract data type operations. Algebraic specification checking involves monitoring the execution of the abstract data type operations. Based on this monitoring and the algebraic specifications, a theorem prover generates invariants that the program must satisfy. If the program does not satisfy these invariants, diagnostic messages are given and a debugger is invoked. The theorem prover has to be specialized so that it operates efficiently in the context of algebraic specification checking. Methodologies to achieve this using incremental techniques are presented in this thesis.
Based on these ideas, a working system has been built for automatic runtime consistency checking of Ada programs with specifications written in Anna. Experiments with this system has led to the development of a methodology of debugging programs based on formal specifications.