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: 8
Branches: main
Fix some bugs in my previous diff that optimized away stack slots storing
dummy values that manifested themselves as warnings from the C compiler
about integers too big to fit into 8 or 16 bits being implicitly truncated.
They did not lead to the failure of any test case, since it doesn't matter
whether the debugger gets the values it ignores (I/O states or stores)
from valid stack slots or not.
When generating RTTI for gc and the debugger, the compiler had three places
that generated references to stack slots: the return sites of calls, resume
points, and trace events. The previous diff updated only the first of these.
This diff updates the other two, and ensures there are no more.
Since the debugger needs to know whether a procedure has a pair of I/O state
arguments (e.g. when performing a retry), we add a field to proc layouts
to hold this information.
runtime/mercury_grade.h:
Increment the debug grade runtime compatibility version number
to reflect the change in layout structures.
runtime/mercury_stack_layout.h:
Add an extra field to proc layouts to specify flags. At the moment,
the only flag says whether the procedure has a pair of I/O state
arguments.
Add an extra field to proc layouts to specify the trace level of a
procedure. This used to be the same as the module's trace level,
but one of my bug fixes a couple of months ago broke that link.
We don't yet use this field, but it makes sense to do it at the same
time as the increment of the compatibility version number.
compiler/continuation_info.m:
Attach to every description of a live value a description of where
in the compiler that description was created.
Rename the type involved to avoid an ambiguity.
Ignore dummy types when generating resume layouts.
Add some sanity checks.
Add new fields to the continuation_info data structure to allow
stack_layout.m to fill in the new fields in proc layout structures.
compiler/trace.m:
Do not generate references to dummy values at trace events,
except at call ports. At those ports, all live variables should
be in registers.
compiler/stack_layout.m:
Make the check for whether a value fits into an unsigned 8 bit value
a direct rather than an indirect one. The indirect one assumed that
stack slot numbers are all positive, which is now a bad assumption.
Check for negative stack slot numbers in all RTTI stack slot
descriptions.
Fill in the two new slots in proc layout structures.
compiler/layout.m:
Reserve space for the two new slots in proc layout structures.
compiler/layout_out.m:
Output the two new slots in proc layout structures.
compiler/code_gen.m:
Preserve the information needed by stack_layout.m for the two new
fields.
compiler/llds_out.m:
Add some code that ensures that we never output an integer constant
that doesn't fit into the range of its type. Since this code is
executed many millions of times, it is designed to be enabled only
when the checking is manually enabled. It is normally off, but I got
a clean bootcheck in the debug grade (which is the best stress test)
with it enabled.
compiler/trace_params.m:
Update a comment.
compiler/code_info.m:
Export a function for use by trace.m.
compiler/hlds_pred.m:
Export a predicate for use by stack_layout.m.
compiler/Mercury.options:
Enable inlining for llds_out.m, to get rid of the sanity checking
overhead if it is not enabled.
tests/debugger/completion.exp*:
tests/debugger/interpreter.exp*:
tests/debugger/multi_parameter.exp*:
tests/debugger/queens.exp*:
tests/debugger/print_goal.exp*:
tests/debugger/tabled_read.exp*:
tests/debugger/tabled_read_decl.exp*:
tests/debugger/declarative/io_stream_test.exp*:
tests/debugger/declarative/tabled_read_decl.exp*:
Update these expected output files to not expect dummy values that
aren't kept anymore.
Estimated hours taken: 2
Branches: main
Remove call depth numbers from standardized event printing. This will make
maintaining the debugger test cases easier since a lot of the expected outputs
differ only in the call depth of their events, because of deep tracing of the
standard library in the decldebug grade.
Not all the debugger tests are run with standardized event printing, so
printing of call depths will still be exercised.
tests/debugger/breakpoints.exp
tests/debugger/breakpoints.exp2
tests/debugger/browser_test.exp
tests/debugger/exception_cmd.exp
tests/debugger/exception_cmd.exp2
tests/debugger/exception_cmd.exp3
tests/debugger/exception_value.exp
tests/debugger/exception_value.exp2
tests/debugger/exception_vars.exp
tests/debugger/existential_type_classes.exp
tests/debugger/existential_type_classes.exp2
tests/debugger/exported_eqv_type.exp
tests/debugger/higher_order.exp
tests/debugger/interpreter.exp2
tests/debugger/lambda_expr.exp
tests/debugger/loopcheck.exp3
tests/debugger/loopcheck.inp2
tests/debugger/nondet_stack.exp
tests/debugger/nondet_stack.exp2
tests/debugger/polymorphic_output.exp
tests/debugger/polymorphic_output.exp2
tests/debugger/polymorphic_output.exp3
tests/debugger/print_goal.exp
tests/debugger/print_table.exp
tests/debugger/queens.exp
tests/debugger/queens.exp2
tests/debugger/resume_typeinfos.exp
tests/debugger/retry.exp
tests/debugger/retry.exp2
tests/debugger/tabled_read.exp
tests/debugger/tabled_read_decl.exp
tests/debugger/tabled_read_unitize.exp
tests/debugger/type_desc_test.exp
tests/debugger/declarative/aadebug.exp
tests/debugger/declarative/app.exp
tests/debugger/declarative/args.exp
tests/debugger/declarative/big.exp
tests/debugger/declarative/filter.exp
tests/debugger/declarative/if_then_else.exp
tests/debugger/declarative/input_term_dep.exp
tests/debugger/declarative/io_stream_test.exp
tests/debugger/declarative/io_stream_test.exp2
tests/debugger/declarative/output_term_dep.exp
tests/debugger/declarative/propositional.exp
tests/debugger/declarative/remember_modes.exp
tests/debugger/declarative/special_term_dep.exp
tests/debugger/declarative/tabled_read_decl.exp
tests/debugger/declarative/trust.exp
Remove call depth numbers from output run with standardized event
printing.
trace/mercury_trace_internal.c
Remove call depth from standardized event printing.
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: 1.5
Branches: main
Change the declarative debugger so it always prints syntactically
correct goals.
browser/declarative_user.m:
Print atoms using browse__print_synthetic. This means that goals
will always be syntactically correct, even if they are printed
in the multi-line form.
Make the predicates write_decl{_init,_final,}_atom take an argument
of type browse_caller_type. When printing a single goal use the
caller type "print", and when printing a sequence of goals use
"print_all".
browser/browse.m:
When writing out a synthetic term using io__write_univ, check for
arguments with type util__unbound. Print such values as a single
unquoted underscore (io__write_univ would print an underscore in
single quotes, which means something different).
browser/util.m:
Export functions is_predicate and is_function to convert values of
type pred_or_func to values of type bool.
tests/debugger/print_goal.exp:
tests/debugger/queens_rep.exp:
Update the output of these tests after the change to browse.m.
tests/debugger/declarative/app.exp:
tests/debugger/declarative/app.exp2:
tests/debugger/declarative/filter.exp:
tests/debugger/declarative/filter.exp2:
tests/debugger/declarative/input_term_dep.exp:
tests/debugger/declarative/input_term_dep.exp2:
tests/debugger/declarative/output_term_dep.exp:
tests/debugger/declarative/output_term_dep.exp2:
tests/debugger/declarative/queens.exp:
tests/debugger/declarative/tabled_read_decl.exp:
tests/debugger/declarative/tabled_read_decl.exp2:
Update the output of these test cases.
Estimated hours taken: 4
Branches: main
Add a mechanism for standardizing the event and call sequence numbers in
debugger output. The mechanism is a global flag whose value is set from
MERCURY_OPTIONS. It is intended to be used only in our own internal testing.
runtime/mercury_trace_base.[ch]:
Define the global, MR_standardize_event_details.
Move the documentation of several globals from the .c to the .h file,
since that is where their users will look. Put those globals in a
consistent order.
Add functions for standardizing event and call sequence numbers,
and use them when printing event details.
runtime/mercury_wrapper.c:
Set MR_standardize_event_details when given the option -de.
runtime/mercury_stack_trace.c:
library/exception.m:
trace/mercury_trace_internal.m:
Respect MR_standardize_event_details.
tests/Mmake.common:
Define the make variable MDB_STD, which is like MDB except it also
puts -de in MERCURY_OPTIONS.
tests/debugger/Mmakefile:
Use MDB_STD instead of MDB for test cases that can benefit from
standardizing event and call sequence numbers.
Put the rules for the test cases in alphabetical order.
tests/debugger/*.exp*:
Update expected outputs after this change.
Estimated hours taken: 2
Branches: main
compiler/typecheck.m:
Use more meaningful variable names when an argument
has the same name in all clauses.
Rename variables so that both arguments of
a clause like `p(X, X).' are both called `X'
in the debugger.
tests/debugger/print_goal.{m,inp,exp}:
Add a test case.
tests/debugger/field_names.exp:
tests/debugger/interpreter.exp:
tests/invalid/aditi_update_mode_errors.err_exp:
tests/invalid/merge_ground_any.err_exp:
tests/invalid/polymorphic_unification.err_exp:
Update expected output.
Estimated hours taken: 0.1
Branches: main
tests/debugger/print_goal.{inp,exp}:
Add `echo on', `register --quiet' and `context none' to
reduce the variability of the output.
Estimated hours taken: 0.5
Branches: main
trace/mercury_trace_vars.c:
Fix a reversed test in my last change which caused a seg-fault
in `print goal' where the goal had multiple arguments.
tests/debugger/Mmakefile:
tests/debugger/print_goal.{m,inp,exp}:
Test case.