Soar Debugger (SDB) v1.0
Released 12May00
Contact: Glenn Taylor (glenn@soartech.com)
Soar Technology, Inc.

  1. Overview
  2. Watches/Breaks
  3. How to Run
  4. Release History
  5. Known Issues
  6. Wishlist

Overview

The Soar Debugger (SDB) makes an attempt being a "true" debugger along the lines of gdb or xdb, with breakpoints and watches on variables, and the ability to easily inspect deep structures. It has been written separately from the TSI or any agent window, and using an earlier version of Tcl/Tk (7.6/4.0) so it is more portable across different applications using Soar. (So far tested under TankSoar and TacAir-Soar.) It also runs just fine under Tcl 8.x. The debugger is not meant to contain all Soar or TSI functionality; that is, not every Soar function has a comparable graphical interface in the SDB. Instead, I've tried to incorporate more complex functionality, or more convenient methods for accessing typical functionality, while leaving the "normal" stuff to the TSI. (Popup menus I've tried to make exempt from this rule--they're too convenient to leave out.) A debugger is instantiated within an agent, and so is specific to that agent; multiple agents can each have their own debugger. However, default preferences are common to all debuggers. To modify individually, preferences would have to be loaded from a file once a specific debugger has been invoked. The SDB has several things to offer, most of which appear under the Tools menu. Each item in the menu is described below.

Watches/Breaks

Breakpoints and watches are implemented as Soar productions with attribute tests derived from the information in the StateMap which was clicked on. They are inserted into the user space of productions, so you will see something like debug_watch1 or debug_break1 if you list all the productions. When a watch or break is deleted, the corresponding production is excised from production memory. In the case of "Break On Production Fire", a new production is created with the same LHS as the chosen production, but with a different name, and whose RHS consists solely of the interrupt command. Due to how Soar matches, the interrupt will happen at the same time as if the chosen production had an interrupt in its RHS.

Since they are productions, they follow all the rules of matching under Soar. Thus, the following behaviors will be observed:

Judiciously activating/deactivating (without deleting!) breakpoints will make these behaviors a little more reliable or acceptable. This method was chosen due to the ease of implementation--it's all Tcl code, no architectural changes were necessary, and since they are productions, watches and breaks will only fire when the tested values match, so the efficiency overhead is negligible. However, some may see this method of breaks/watches-as-productions as too intrusive. If this seems to be the concensus, I'm open to other methods of implementation.

How to Run

To run, type the following in the agent window:

You'll want to cd back to the original directory, since, in some environments, you might not be able to create a new agent being in a different directory than Soar expects.

Release History

New in Version 1.0 (Soar20 Debut)

New in Version 0.4b

New In Version 0.3b

This is more of a performance/beautifying release than a functionality release.

New In Version 0.2b

The following features are new to this version of the debugger.

Bugs/Issues/Complaints/Workarounds

The following is an incomplete list of bugs or issues with the debugger (and possible workarounds, if applicable). The SDB has been tested under the following environments:

Unfortunately, I have no access to a Macintosh to know how it fares under that environment. If anyone tries it, let me know how it works. If you find issues that are not on this list, please send me a note describing the details of the problem, what environment you're running under, and the symptoms seed.

Wishlist/Next Version

The following is a growing list of features people have asked for, or things that were planned, but aren't yet implemented. Hopefully, time will allow at least some of them to find their way into a future version. Let me know if you'd like to see something in the debugger.