Commit Graph

2 Commits

Author SHA1 Message Date
Zoltan Somogyi
590b34cfac Fix some minor problems in reporting determinism errors.
compiler/det_report.m:
    When a goal has too many solutions, but it occurs in a context in which
    the identity of those solutions does not matter, the compiler inserts
    a commit scope to prune away the redundant (because they are externally
    indistinguishable) solutions.

    When this goal is a switch inside a require_switch_arms_<detism> scope,
    this commit scope added by determinism analysis screwed up the expectation
    of the require_switch_arms_<detism> scope that the switch is its IMMEDIATE
    subgoal. Relax this sometimes-wrong assumption by allowing for a commit
    scope wrapped around the switch.

    When generating error messages for cons_ids missing from switches,
    don't print the module qualifiers for the cons_ids, since users
    will already know it (it is part of the identity of the type of switch-on
    variable).

    Print the missing cons_ids one per line, to make the list easier to read.

    Fix capitalization in some error messages.

compiler/switch_detection.m:
    When creating switch arms, give each arm a more meaningful context
    that the context of the original disjunction, which is usually the context
    of the first ";" operator in it.

tests/invalid/switch_arm_multi_not_det.{m,err_exp}:
    New test case for the fix listed first for det_report.m.

tests/invalid/Mmakefile:
    Enable the new test case.

tests/debugger/dice.exp*:
tests/invalid/det_errors.err_exp:
tests/invalid/require_scopes.err_exp:
    Update these expected outputs for the changes above.
2016-05-13 05:48:47 +10:00
Zoltan Somogyi
a20fa310b1 Fix some test case failures that were causes by the test setups, not by any
Estimated hours taken: 0.2
Branches: main

Fix some test case failures that were causes by the test setups, not by any
bugs.

tests/debugger/dice.exp3:
	Add a new expected output for this test. I believe this is the correct
	expected output for the current HLDS form of the code from which the
	goal paths are computed. (The new .exp3 differs from the .exp2 file
	in goal paths and the resulting orderings.)

tests/tabling/fib_stats.exp2:
	Add a new expected output for this test with the expected output on 64
	bit systems. This is the same as fib_stats.exp, but with twice the
	expected memory usage.

tests/tabling/Mmakefile:
tests/tabling/specified_stats.exp:
	We used to replace up to five-digit numbers with NNNs to avoid
	depending on platform specific details. Since this is not enough,
	with differences showing up on 64 bit platforms, do this for up
	to seven-digit numbers.
2009-07-20 03:49:14 +00:00