Replace __ with . as the module qualifier symbol.
Replace references to io.state with just io.
Replace DCGs with state variables.
Replace (C->T;E) syntax for if-then-elses with (if C then T else E) syntax.
Replace if-then-elses with switches when possible and where this does not
affect what is being tested.
Replace separate pred and mode declarations with predmode declarations.
Put predicate and function declarations just before the definition
of the predicate or function.
Delete unneeded module qualifications on predicate and function declarations
and definitions.
Update .exp files (and if needed, .inp files) for the line number changes
that result from the above.
For tests that have more than one .exp file and where one of those files
is affected by the above, add a section to the source file header that says
which .exp file is for what grade, with XXXs for the (as yet) unknown parts.
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: 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.