next up previous contents
Next: Debugger Ports and Steps Up: Source-Level Debugger Previous: Running with XEmacs   Contents

Debugger Commands

There are seven basic commands in the ALE debugger, four of which are variants of normal ALE commands. These four, dcompile_gram/1, drec/1, dquery/1 and dgen/1, are the debugger variants of compile_gram/1, rec/1, query/1 and gen/1, respectively. The other three, dleash/1, dskip/1, and dclear_bps/0, will be explained below.

Currently, the ALE source-level debugger can only debug grammars down to the level of feature structure unification, i.e., feature structure unification is treated as an atomic operation. Constraints and procedural attachments on types using cons and goal cannot be debugged either, nor can inequation enforcement or extensionalization (which is still delayed). These will be possible in a future version. For now, dcompile_gram/1 compiles a grammar in exactly the same way that ALE normally does up to the point where it can be debugged. It then intercepts the token-stream from SICStus Prolog and indexes the grammar source code that it can debug by line number. dcompile_gram/1 also requires that all of the ALE source code for a grammar be in a single file, i.e., unlike ALE without the debugger, you cannot load other auxiliary files from within a grammar file. This restriction will also be lifted in a future version.

dcompile_gram/1 also allows tracing through the EFD closure algorithm, again down to the level of feature structure unification.

After a grammar has been compiled for debugging with dcompile_gram/1, drec/1, dquery/1 and dgen/1 can be used for parsing, definite clause resolution or generation, respectively, with the debugger. dquery/1 works exactly as query/1 does: it first finds most general satisfiers of the arguments and then searches for a solution with Prolog-style SLD-resolution using the clauses provided by the user. drec/1 and dgen/1 work exactly as rec/1 and gen/1 do, except that lexical rules are not compiled out, so that they can be debugged. Also remember that ALE parses right-to-left with EFD-closed rules and empty categories, and that it uses a semantic-head-driven generator. With parsing, the debugger can also be used in conjunction with the chart mini-interpreter described above for extra control of the chart. With generation, the debugger successively shows the construction of the pivot template, pivot matching, pivot checking and the linking of the pivot with the root. Generation of non-semantic-head daughters is performed recursively.


next up previous contents
Next: Debugger Ports and Steps Up: Source-Level Debugger Previous: Running with XEmacs   Contents
Detmar Meurers
2001-03-03