tests/accumulator/*.m:
tests/analysis_*/*.m:
tests/benchmarks*/*.m:
tests/debugger*/*.{m,exp,inp}:
tests/declarative_debugger*/*.{m,exp,inp}:
tests/dppd*/*.m:
tests/exceptions*/*.m:
tests/general*/*.m:
tests/grade_subdirs*/*.m:
tests/hard_coded*/*.m:
Make these tests use four-space indentation, and ensure that
each module is imported on its own line. (I intend to use the latter
to figure out which subdirectories' tests can be executed in parallel.)
These changes usually move code to different lines. For the debugger tests,
specify the new line numbers in .inp files and expect them in .exp files.
Estimated hours taken: 16
Branches: main, release
Replace the "set" command of mdb with a bunch of commands: the `format',
`format_param', `list_context_lines', `list_path', `xml_browser_cmd',
`xml_tmp_filename', `fail_trace_counts', `pass_trace_counts' and
`max_io_actions' commands. Each of these set just one parameter
or one of set of closely related parameters.
Move all these commands, and some existing commands that set parameters
that were elsewhere, to the "parameter" command category.
Extend some of these commands so that if given no arguments, they report
the current values of the parameters they would otherwise set.
Replace the "set" commands of the mdb browser and of the declarative debugger
with a bunch of commands: "format", "depth", "size", "width", "lines",
"actions" and "params" (the last prints the current value of the parameters).
For each category of mdb commands, create files mercury_trace_cmd_<cat>.[ch],
and move the functions dealing with that category of commands there from
mercury_trace_internal.c. Give each of these new files a logical structure
that was sometimes missing from the relevant parts of mercury_trace_internal.c.
NEWS:
Mention these changes.
doc/mdb_categories:
Document these changes.
doc/user_guide.texi:
Document these changes.
Fix an old documentation bug: you couldn't set listing paramaters
from a declarative debugger command.
Fix an old documentation bug: the description of the goal_path step
for scopes was obsolete.
Fix some obsolete references to : as module qualifier.
browser/parse.m:
Update the browser command set along the lines at the top.
browser/declarative_user.m:
Update the declarative debugger command set along the lines at the top.
Move the declaration for the type representing declarative debugger
commands to near the top of the file.
browser/browser_info.m:
Provide some access predicates.
Update the predicate that generates mdb commands to save the persistent
state of the debugger to generate the new forms of parameter commands.
Move types and predicates for dealing with browser parameters from
browse.m to here, so that declarative_user.m can use them too.
browser/browse.m:
Delete the code moved to browser_info.m, and conform to the other
changes in the other modules.
browser/listing.m:
Provide a predicate to return the type of listing paths.
scripts/mdbrc.in:
Update the commands that set the XML parameters.
scripts/Mmakefile:
Get mmake to rebuild mdbrc from mdbrc.in when mdbrc.in changes.
trace/mercury_trace_internal.c:
trace/mercury_trace_cmds.h:
trace/mercury_trace_cmd_*.[ch]:
Implement the changes described at the top.
Fix an old bug: the commands that update the search path for the "list"
command don't make the search path term permanent, which is needed in
non-conservative-gc grades.
trace/mercury_trace_spy.c:
Fix some obsolete references to : as module qualifier.
trace/mercury_trace_browse.[ch]:
Delete the functionality now moved to mercury_trace_cmd_parameter.c.
tests/debugger/mdb_command_test.inp:
Update the set of commands being tested.
tests/debugger/save.{inp,exp}:
Update the parameter commands in this test case.
Estimated hours taken: 6
Branches: main
Add a --module option to the mdb dice command to limit output to a specific
module or package.
Write out the trace counts even if the program aborts because of an uncaught
exception.
browser/dice.m
Handle the --module option by adding an extra argument to the
read_dice_to_string predicate which is called from mdb.
doc/user_guide.texi
Document the --module option.
mdbcomp/prim_data.m
Add a predicate to check if one module is a sub-module of another.
runtime/mercury_trace_base.c
runtime/mercury_trace_base.h
Add a function which writes the trace counts out to the file
indicated by the symbolic constant MERCURY_TRACE_COUNTS_FILE_NAME.
Move the symbolic constant MERCURY_TRACE_COUNTS_FILE_NAME from
runtime/mercury_wrapper.c to runtime/mercury_trace_base.h, so it
is accessible from the above function.
runtime/mercury_wrapper.c
Register a function to write the trace counts to a file when the
program aborts because of an uncaught exception.
Call the same function when the program terminates normally.
tests/debugger/dice.exp
tests/debugger/dice.inp
Test the new --module option.
trace/mercury_trace_internal.c
Add and handle the new --module option.
Estimated hours taken: 40
Branches: main
Add mdb `dice' command which reads in a set of passing trace counts and a
failing trace count and prints a comparison table. The table can be sorted
by various metrics and is useful for finding parts of a program executed in
a failing run, but not in passing runs.
browser/dice.m
Add a new module for generating and manipulating a dice.
browser/mdb.m
Add the dice module.
compiler/special_pred.m
mdbcomp/prim_data.m
Move special_pred_name_arity/3 from compiler/special_pred.m to
mdbcomp/prim_data.m so it can be used in dice.m.
doc/user_guide.texi
Document the `dice' mdb command. Also document the fact that the
failing and passing slice file names can be set with the `set' mdb
command.
Move the `set' command to the misc section from the browser section
since it now also sets the passing and failing slice file names, which
have nothing to do with the browser.
library/list.m
Add map4, map5 and map6 since map6 is needed in dice.m.
mdbcomp/program_representation.m
Add a predicate to convert a goal path to a string.
mdbcomp/trace_counts.m
Convert string_to_trace_port into a predicate and add a new mode so
that a port can be converted back to a string.
runtime/mercury_trace_base.h
trace/mercury_trace_util.h
Move the MR_TRACE_USE_HP and MR_TRACE_CALL_MERCURY macros to
runtime/mercury_trace_base.h, so that they can be called from
browser/dice.m.
tests/Mmake.common
Clean up trace counts (which are generated to test the `dice' command).
tests/debugger/Mmakefile
tests/debugger/dice.exp
tests/debugger/dice.exp2
tests/debugger/dice.inp
tests/debugger/dice.m
tests/debugger/dice.passes
Test the `dice' command.
trace/mercury_trace_internal.c
Add the mdb `dice' command and modify the `set' command so the
`fail_trace_count' and `pass_trace_counts' parameters can be set.
Add a function to print a dice.
Move the `set' command to the misc help section.