mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 09:23:44 +00:00
Estimated hours taken: 8
Branches: main
Our existing mechanism for detecting when the failure out of a negated context
is due to the suspension of a consumer, and not to genuine failure was flawed
in two ways. First, it did not consider all-solutions predicates to be negated
contexts; second, in some circumstances it could rely on out-of-date data.
library/std_util.m:
Wrap predicates called in contexts where all solutions are required
with calls to the routines wrapping negated contexts. Since the
routines have empty definitions in all grades except minimal model
grades, there is extra overhead only in minimal model grades.
runtime/mercury_stacks.[ch]:
When processing suspensions of consumers in a possibly negated context
and checking that their generators are complete, disregard consumers
that have logically been deleted together with their generators
when execution reached the end of the committed-choice contexts in
which they were created. Without this change, the generator_in_commit
test case would get an unnecessary abort.
Register consumers instead of generators in pneg stack entries,
and make the generator reachable from the consumer, instead of
registering just the consumer's generator. The old arrangement
hid information that could be useful during debugging.
runtime/mercury_minimal_model.c:
Conform to the change to the mercury_stacks module.
Rename "pickling" to pruning right branches, since this expresses
the intent of the operation more directly.
Fix a bug in the printing of the addresses of the redoip slots
of pruned stack frames.
Delete unneeded code.
tests/tabling/Mmakefile:
Record the fact that we now get the expected error in the
consumer_in_solutions test case.
tests/tabling/consumer_in_solutions.{exp,exp2}:
Update the expected output in this test case. The old contents of the
.exp file is the ideal expected output, but it is not achievable with
our current approach to implementing minimal model tabling. It has
therefore been moved to the new .exp2 file.
tests/tabling/generator_in_commit.{m,exp}:
Make this test case do less computation, to make it more useful in
tracking down errors. The new version still tests everything the old
version tested, just not so many times.
2 lines
17 B
Plaintext
2 lines
17 B
Plaintext
[21, 22, 23, 42]
|