DUEL - A Very High-Level Debugging Language.

Michael Golan, David R. Hanson

1993 · 39 citations · 9 references

Concepts

TL;DR

Source‑level debuggers typically evaluate expressions in the program’s own language, but this approach is ill‑suited for complex state queries such as identifying which elements of an array are positive. This paper introduces Duel, a high‑level debugging language for C that defines new semantics and syntax to enable such queries. Duel extends C with generator expressions inspired by Icon, APL, and LISP, and is implemented on top of gdb by adding a command that evaluates these expressions and displays their results. Using Duel, a query like x[..100] >?

Abstract

Most source-level debuggers accept expressions in the source language, e.g., C, and can print sourcelanguage values. This approach is usually justied on grounds that programmers need to know only one language. But the evaluation of source-language expressions or even statemetns is poorly suited for making non-trivial queries about the program state, e.g., \which elements of array x[100] are positive? Duel departs from the conventional wisdom: It is a very high-level language designed specically for sourcelevel debugging of C programs. Duel expressions are a superset of C’s and include \generators, which are expressions that can produce zero or more values and are inspired by Icon, APL, and LISP. For example, x[..100] >? 0 displays the positive elements of x and their indices. Duel is implemented on top of gdb and adds one new command to evaluate Duel expressions and display their results. This paper describes Duel’s semantics and syntax, gives examples of its use, and outlines its implementation. Duel is freely available, and it could be interfaced to other debuggers.

References

9