Estimated hours taken: 4
Branches: main
Move the all-solutions predicates from the library module std_util into their
own module, solutions.
Move semidet_fail, semidet_succeed, cc_multi_equal and dynamic cast from
std_util.m into builtin.m.
Add some more utility functions for performing determinism or purity casts.
(The later are primarily intended for use by solver implementors.)
library/std_util.m:
Move the all-solutions predicates into their own module, solutions.m.
For now there are (obsolete) forwarding predicates from this module to
the new one. The forwarding predicates will be included in the
upcoming 0.13 release and then removed in later versions.
Move semidet_succeed, semidet_fail, cc_multi_equal and dynamic_cast
to builtin.m
library/solutions.m:
New file. This is the new home for the all-solutions predicates.
This is pretty much cut and pasted from std_util (with module
qualifiers updated accordingly). I've rearranged the code in a more
top-down fashion as per our current coding standard.
library/builtin.m:
Move semidet_fail/0, semidet_succeed/0, cc_multi_equal/2 and
dynamic_cast/2 to this module.
Add semidet_true/0 and semidet_false/0 as synonyms for semidet_fail/0
and semidet_succeed/0.
Add impure_true/0 and semipure_true/0. These are useful for performing
purity casts, e.g. in solver implementations.
library/library.m:
Add the new module.
NEWS:
Announce the changes.
library/*.m:
Update to conform to the above.
compiler/const_prop.m:
Update evaluate_semidet_call/5 with the new module name for
dynamic_cast.
compiler/*.m:
Module qualify calls to solutions to either disambiguate them from the
versions in std_util (where they weren't module qualified) or change
the module qualifier where they were (to avoid warnings about calls to
the now deprecated versions).
tests/debugger/declarative/solutions.*:
Rename this module as the name conflicts with the new library module.
tests/debugger/declarative/solns.*:
Renamed version of above (with updated expected output).
tests/debugger/declarative/Mmakefile:
Handle the renamed version of the solutions test.
tests/debugger/all_solutions.m:
tests/debugger/declarative/args.m:
tests/debugger/declarative/library_forwarding.m:
tests/hard_coded/constant_prop_2.m:
tests/invalid/multisoln_func.m:
tests/invalid/one_member.m:
tests/invalid/promise_equivalent_claueses.m:
tests/valid/simplify_bug2.m:
tests/valid/solv.m:
Update to conform to the above changes.
sample/solutions/*.m:
Update to conform to the above changes.
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.25
tests/debugger/all_solutions.exp2:
The old expected output for this test case was wrong.
I've updated the expected output for this test case to match
what is (correctly) output after Zoltan's recent bug fix:
> Fix a bug where a retried of a shallow traced procedure assumed that
> it was called from a shallow traced region (sourceforge #130038).
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).