Estimated hours taken: 7
Branches: main
Improve the declarative debugger interface.
The two main changes are to use the mdb help system and not re-display
the question after the user issues a command which does not answer the
question. For example if the user issues an `info' command, then previously
the question would be redisplayed after the requested information and if the
question is big then the information would be scrolled off the screen.
browser/declarative_analyser.m:
Remove extra new line characters when printing info. These are
no longer necessary since the question is not redisplayed.
browser/declarative_debugger.m:
Pass the help system from mdb to the oracle state when
initialising the diagnoser.
browser/declarative_oracle.m:
Pass the help system to the user state when initialising the
oracle state.
browser/declarative_user.m:
Add two new fields to the user state: one to keep a reference to
the help system and one to indicate whether the current question
should be displayed when getting a user input.
Allow the user to redisplay the question by issuing a `print' command
with no arguments. If the question is not to be displayed the show
a "dd>" prompt.
Change the `abort' command to `quit'. This is more consistent
with the rest of mdb.
doc/commands:
Add a script to print all the commands in a section in the
user guide.
doc/generate_mdb_doc:
Generate help for the declarative debugger.
doc/mdb_categories:
Add a category, `decl', for commands that can be executed inside
the declarative debugger. Change the `dd' category to mdb_dd,
because 1) `help dd' used to show help about the `dd' category AND
the `dd' command and 2) `dd' is too general a category name now that we
have a `decl' category.
Add an item, `decl_debug' to the concepts category.
doc/user_guide.texi:
Document some dd commands which previously weren't documented here.
Add a short overview of the declarative debugger. This is
displayed when the user issues a `help' command from within the
dd.
Move the bit about the behaviour when no command is given to
before the list of commands. This is necessary so util/info_to_mdb.c
doesn't include this in the help of the last command in the list.
tests/debugger/declarative/app.exp:
tests/debugger/declarative/app.inp:
tests/debugger/declarative/browse_arg.exp:
tests/debugger/declarative/browse_arg.inp:
tests/debugger/declarative/browser_mode.exp:
tests/debugger/declarative/browser_mode.inp:
tests/debugger/declarative/confirm_abort.exp:
tests/debugger/declarative/confirm_abort.inp:
tests/debugger/declarative/dependency.exp:
tests/debugger/declarative/dependency.inp:
tests/debugger/declarative/find_origin.exp:
tests/debugger/declarative/find_origin.exp2:
tests/debugger/declarative/info.exp:
tests/debugger/declarative/info.inp:
tests/debugger/declarative/io_stream_test.exp:
tests/debugger/declarative/io_stream_test.exp2:
tests/debugger/declarative/mapinit.exp:
tests/debugger/declarative/mapinit.inp:
tests/debugger/declarative/output_term_dep.exp:
tests/debugger/declarative/output_term_dep.inp:
tests/debugger/declarative/resume.exp:
tests/debugger/declarative/resume.inp:
tests/debugger/declarative/skip.exp:
tests/debugger/declarative/skip.inp:
tests/debugger/declarative/solutions.exp3:
tests/debugger/declarative/tabled_read_decl.exp:
Update tests.
trace/mercury_trace_declarative.c:
trace/mercury_trace_help.c:
trace/mercury_trace_help.h:
Pass the help system to the frontend.