browser/declarative_oracle.m:
The code that checks whether the declarative debugger should trust
a module because it is a standard library module was apparently written
before any of module in the standard library had submodules, because
it checked the unqualified name of the module in question against
the *qualified* module names returned by the mercury_std_library_module
predicate.
For a long time after we had submodules such as thread.mvar.m in the
standard library, this caused no test failures, because our tests
did not execute code in those submodules. This changed with the breakup
of io.m. The move of the output_stream_2 predicate from io.m, which
this code recognized as trusted, to io.stream_ops.m, which it did not,
caused the declarative debugger to ask questions about the validity
of calls to it, which the caused the failure of the declarative_debugger/
all_trusted test case, due to its .inp file containing something other
than the corresponding answers.
Fix this for the case of module names of the forms a.b and a.b.c.
library/library.m:
Add a note to the mercury_std_library_module predicate to update
the code in declarative_oracle.m if we ever add a library module
whose fully qualified name has the form a.b.c.d.
tests/debugger/user_event_shallow.exp:
Update the expected output of this test for some ancient change.
tests/debugger/Mercury.options:
Specify the optimization level for the user_event_shallow test,
which eliminates one source of variability in the output.
Another source is intermodule optimization, which this diff does *not*
eliminate.
tests/debugger/all_solutions.exp:
tests/debugger/all_solutions.exp2:
tests/debugger/all_solutions.exp3:
tests/debugger/all_solutions.exp4:
tests/debugger/all_solutions.m:
The output of this test case in debug grades with intermodule optimization
did not match any of the .exp* files, though it differed from .exp2 only
in the text of an error message. (The difference was not a bug.)
Instead of adding this expected output as .exp5, use it to replace
the .exp3 file. This expected output file could not have been matched
in the last seven years, because it expects main/2 to be on line 16,
and that predicate's context has been line 20 since 2015.
Document the fact that .exp3 is the expected output for debug grade
bootchecks with intermodule optimization. This documentation changes
line numbers yet again, so update the line numbers in all the *other*
.exp* files as well.
tests/declarative_debugger/Mmakefile:
Fix indentation.
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: 14
Branches: main
Change the compiler and tools so that `.' and not `:' is now used as the
module separator in all output.
Infix `.' now has associativity yfx and priority 10.
NEWS:
Report the change.
configure.in:
Amend the test for an up-to-date Mercury compiler to check whether
it recognises `.' as a module qualifier.
compiler/code_gen.m:
compiler/error_util.m:
compiler/hlds_out.m:
compiler/prog_out.m:
compiler/prog_util.m:
compiler/rl_exprn.m:
compiler/rl_gen.m:
compiler/source_file_map.m:
compiler/unused_args.m:
library/io.m:
library/rtti_implementation.m:
library/type_desc.m:
runtime/mercury_debug.c:
runtime/mercury_deconstruct.c:
runtime/mercury_stack_trace.c:
Change `:' to `.' as module separator for output.
compiler/mercury_to_mercury.m:
compiler/prog_io_typeclass.m:
As above.
Fixed a bug where `.' was not being recognised as a module separator.
doc/reference_manual.texi:
Report the change.
library/term_io.m:
Ensure that infix `.' is written without surrounding spaces.
tests/hard_coded/dot_separator.m:
tests/hard_coded/dot_separator.exp:
tests/hard_coded/Mmakefile:
Test case added.
Estimated hours taken: 0.2
tests/debugger/all_solutions.{inp,exp,exp2}:
Register debuggable modules quietly, to avoid test failures from
spurious differences in the count of debuggable procedures.
Estimated hours taken: 8
Fix several bugs in retry.
trace/mercury_trace.c:
Fix three bugs reported by Fergus in the behavior of the mdb retry
command.
Catch the case where the retry command tries to retry a call that
would be an ancestor of main.
Catch the case where the retry command tries to retry a call that
is in shallow traced region of the computation tree.
Don't abort if the retried call is missing an I/O state argument
and relevant procedure was compiled without --trace-table-io; just
ask the user whether they want to proceed with the retry.
Add some conditionally compiled debugging code.
trace/mercury_trace.c:
trace/mercury_trace_spy.c:
Fix a bug unrelated to retry that was detected by new additions
to the test cases: spy points were being printed after being deleted.
Deletion was releasing some strings (filenames) in some spy points,
leading to those filename being printed as garbage. We now print the
spy points before deleting them. This required moving the code
for marking spy points as deleted from mercury_trace_spy.c to
mercury_trace.c.
compiler/trace.m:
Fix a bug that caused the debugger to core dump when given a retry
command that went across a shallow traced region of the program.
(This bug was exposed when I fixed the second bug reported by Fergus.)
A procedure that lives on the det stack that nevertheless pushes
temporary frames onto the nondet stack should save the original value
of maxfr on procedure entry even if it is shallow traced and from_full
is false, since the debugger will need to restore the value of maxfr
during retry.
tests/debugger/queens.{inp,exp,exp2}:
Test how mdb handles trying to retry an ancestor of main.
Test how mdb handles a retry with a missing I/O state argument.
tests/debugger/all_solutions.{m,inp,exp,exp2}:
New test case. The code is a copy of samples/solutions/all_solutions.m.
Its input script tests retry into and across a shallow traced region
(inside std_util:solutions).