mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 01:43:35 +00:00
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.
120 lines
8.4 KiB
Plaintext
120 lines
8.4 KiB
Plaintext
E1: C1 CALL pred dice.main/2-0 (det) dice.m:17
|
|
mdb> mdb> Contexts will not be printed.
|
|
mdb> echo on
|
|
Command echo enabled.
|
|
mdb> dice -f dice.fail -p dice.passes -m dice
|
|
Procedure Path/Port File:Line Pass (3) Fail Suspicion
|
|
pred dice.main/2-0 CALL dice.m:17 3 (3) 1 0.25
|
|
pred dice.main/2-0 EXIT dice.m:17 3 (3) 1 0.25
|
|
pred dice.main/2-0 <c2;?;> dice.m:20 3 (3) 1 0.25
|
|
pred dice.main/2-0 <c2;t;> dice.m:22 3 (3) 1 0.25
|
|
pred dice.merge/3-0 CALL dice.m:64 18 (3) 7 0.28
|
|
pred dice.merge/3-0 EXIT dice.m:64 18 (3) 7 0.28
|
|
pred dice.merge/3-0 <s1-2;> dice.m:64 8 (3) 3 0.27
|
|
pred dice.merge/3-0 <s2-2;> dice.m:64 10 (3) 4 0.29
|
|
pred dice.merge/3-0 <s2-2;c2;s2-2;> dice.m:67 10 (3) 4 0.29
|
|
pred dice.merge/3-0 <s1-2;s2-2;> dice.m:66 8 (3) 3 0.27
|
|
pred dice.merge/3-0 <s2-2;c2;s2-2;c4;?;> dice.m:69 10 (3) 4 0.29
|
|
pred dice.merge/3-0 <s2-2;c2;s2-2;c4;t;> dice.m:72 10 (3) 3 0.23
|
|
pred dice.merge/3-0 <s2-2;c2;s2-2;c4;e;> dice.m:74 0 (0) 1 1.00
|
|
pred dice.merge_sort/2-0 CALL dice.m:31 3 (3) 1 0.25
|
|
pred dice.merge_sort/2-0 EXIT dice.m:31 3 (3) 1 0.25
|
|
pred dice.msort_n/4-0 CALL dice.m:37 19 (3) 7 0.27
|
|
pred dice.msort_n/4-0 EXIT dice.m:37 19 (3) 7 0.27
|
|
pred dice.msort_n/4-0 <e;t;s2-2;> dice.m:47 11 (3) 4 0.27
|
|
pred dice.msort_n/4-0 <?;> dice.m:39 19 (3) 7 0.27
|
|
pred dice.msort_n/4-0 <e;?;> dice.m:44 19 (3) 7 0.27
|
|
pred dice.msort_n/4-0 <e;t;> dice.m:50 11 (3) 4 0.27
|
|
pred dice.msort_n/4-0 <e;> dice.m:54 19 (3) 7 0.27
|
|
pred dice.msort_n/4-0 <e;e;> dice.m:55 8 (3) 3 0.27
|
|
mdb> fail_trace_counts dice.fail
|
|
mdb> pass_trace_counts dice.passes
|
|
mdb> dice -sS -m dice
|
|
Procedure Path/Port File:Line Pass (3) Fail Suspicion
|
|
pred dice.merge/3-0 <s2-2;c2;s2-2;c4;e;> dice.m:74 0 (0) 1 1.00
|
|
pred dice.merge/3-0 <s2-2;> dice.m:64 10 (3) 4 0.29
|
|
pred dice.merge/3-0 <s2-2;c2;s2-2;> dice.m:67 10 (3) 4 0.29
|
|
pred dice.merge/3-0 <s2-2;c2;s2-2;c4;?;> dice.m:69 10 (3) 4 0.29
|
|
pred dice.merge/3-0 CALL dice.m:64 18 (3) 7 0.28
|
|
pred dice.merge/3-0 EXIT dice.m:64 18 (3) 7 0.28
|
|
pred dice.merge/3-0 <s1-2;> dice.m:64 8 (3) 3 0.27
|
|
pred dice.merge/3-0 <s1-2;s2-2;> dice.m:66 8 (3) 3 0.27
|
|
pred dice.msort_n/4-0 <e;e;> dice.m:55 8 (3) 3 0.27
|
|
pred dice.msort_n/4-0 CALL dice.m:37 19 (3) 7 0.27
|
|
pred dice.msort_n/4-0 EXIT dice.m:37 19 (3) 7 0.27
|
|
pred dice.msort_n/4-0 <?;> dice.m:39 19 (3) 7 0.27
|
|
pred dice.msort_n/4-0 <e;?;> dice.m:44 19 (3) 7 0.27
|
|
pred dice.msort_n/4-0 <e;> dice.m:54 19 (3) 7 0.27
|
|
pred dice.msort_n/4-0 <e;t;s2-2;> dice.m:47 11 (3) 4 0.27
|
|
pred dice.msort_n/4-0 <e;t;> dice.m:50 11 (3) 4 0.27
|
|
pred dice.main/2-0 CALL dice.m:17 3 (3) 1 0.25
|
|
pred dice.main/2-0 EXIT dice.m:17 3 (3) 1 0.25
|
|
pred dice.main/2-0 <c2;?;> dice.m:20 3 (3) 1 0.25
|
|
pred dice.main/2-0 <c2;t;> dice.m:22 3 (3) 1 0.25
|
|
pred dice.merge_sort/2-0 CALL dice.m:31 3 (3) 1 0.25
|
|
pred dice.merge_sort/2-0 EXIT dice.m:31 3 (3) 1 0.25
|
|
pred dice.merge/3-0 <s2-2;c2;s2-2;c4;t;> dice.m:72 10 (3) 3 0.23
|
|
mdb> dice -sSF -m dice
|
|
Procedure Path/Port File:Line Pass (3) Fail Suspicion
|
|
pred dice.merge/3-0 <s2-2;c2;s2-2;c4;e;> dice.m:74 0 (0) 1 1.00
|
|
pred dice.merge/3-0 <s2-2;> dice.m:64 10 (3) 4 0.29
|
|
pred dice.merge/3-0 <s2-2;c2;s2-2;> dice.m:67 10 (3) 4 0.29
|
|
pred dice.merge/3-0 <s2-2;c2;s2-2;c4;?;> dice.m:69 10 (3) 4 0.29
|
|
pred dice.merge/3-0 CALL dice.m:64 18 (3) 7 0.28
|
|
pred dice.merge/3-0 EXIT dice.m:64 18 (3) 7 0.28
|
|
pred dice.merge/3-0 <s1-2;> dice.m:64 8 (3) 3 0.27
|
|
pred dice.merge/3-0 <s1-2;s2-2;> dice.m:66 8 (3) 3 0.27
|
|
pred dice.msort_n/4-0 <e;e;> dice.m:55 8 (3) 3 0.27
|
|
pred dice.msort_n/4-0 CALL dice.m:37 19 (3) 7 0.27
|
|
pred dice.msort_n/4-0 EXIT dice.m:37 19 (3) 7 0.27
|
|
pred dice.msort_n/4-0 <?;> dice.m:39 19 (3) 7 0.27
|
|
pred dice.msort_n/4-0 <e;?;> dice.m:44 19 (3) 7 0.27
|
|
pred dice.msort_n/4-0 <e;> dice.m:54 19 (3) 7 0.27
|
|
pred dice.msort_n/4-0 <e;t;s2-2;> dice.m:47 11 (3) 4 0.27
|
|
pred dice.msort_n/4-0 <e;t;> dice.m:50 11 (3) 4 0.27
|
|
pred dice.main/2-0 CALL dice.m:17 3 (3) 1 0.25
|
|
pred dice.main/2-0 EXIT dice.m:17 3 (3) 1 0.25
|
|
pred dice.main/2-0 <c2;?;> dice.m:20 3 (3) 1 0.25
|
|
pred dice.main/2-0 <c2;t;> dice.m:22 3 (3) 1 0.25
|
|
pred dice.merge_sort/2-0 CALL dice.m:31 3 (3) 1 0.25
|
|
pred dice.merge_sort/2-0 EXIT dice.m:31 3 (3) 1 0.25
|
|
pred dice.merge/3-0 <s2-2;c2;s2-2;c4;t;> dice.m:72 10 (3) 3 0.23
|
|
mdb> dice -n 3 -s P -m dice
|
|
Procedure Path/Port File:Line Pass (3) Fail Suspicion
|
|
pred dice.msort_n/4-0 CALL dice.m:37 19 (3) 7 0.27
|
|
pred dice.msort_n/4-0 EXIT dice.m:37 19 (3) 7 0.27
|
|
pred dice.msort_n/4-0 <?;> dice.m:39 19 (3) 7 0.27
|
|
mdb> dice -s Fp -m dice
|
|
Procedure Path/Port File:Line Pass (3) Fail Suspicion
|
|
pred dice.merge/3-0 CALL dice.m:64 18 (3) 7 0.28
|
|
pred dice.merge/3-0 EXIT dice.m:64 18 (3) 7 0.28
|
|
pred dice.msort_n/4-0 CALL dice.m:37 19 (3) 7 0.27
|
|
pred dice.msort_n/4-0 EXIT dice.m:37 19 (3) 7 0.27
|
|
pred dice.msort_n/4-0 <?;> dice.m:39 19 (3) 7 0.27
|
|
pred dice.msort_n/4-0 <e;?;> dice.m:44 19 (3) 7 0.27
|
|
pred dice.msort_n/4-0 <e;> dice.m:54 19 (3) 7 0.27
|
|
pred dice.merge/3-0 <s2-2;> dice.m:64 10 (3) 4 0.29
|
|
pred dice.merge/3-0 <s2-2;c2;s2-2;> dice.m:67 10 (3) 4 0.29
|
|
pred dice.merge/3-0 <s2-2;c2;s2-2;c4;?;> dice.m:69 10 (3) 4 0.29
|
|
pred dice.msort_n/4-0 <e;t;s2-2;> dice.m:47 11 (3) 4 0.27
|
|
pred dice.msort_n/4-0 <e;t;> dice.m:50 11 (3) 4 0.27
|
|
pred dice.merge/3-0 <s1-2;> dice.m:64 8 (3) 3 0.27
|
|
pred dice.merge/3-0 <s1-2;s2-2;> dice.m:66 8 (3) 3 0.27
|
|
pred dice.msort_n/4-0 <e;e;> dice.m:55 8 (3) 3 0.27
|
|
pred dice.merge/3-0 <s2-2;c2;s2-2;c4;t;> dice.m:72 10 (3) 3 0.23
|
|
pred dice.merge/3-0 <s2-2;c2;s2-2;c4;e;> dice.m:74 0 (0) 1 1.00
|
|
pred dice.main/2-0 CALL dice.m:17 3 (3) 1 0.25
|
|
pred dice.main/2-0 EXIT dice.m:17 3 (3) 1 0.25
|
|
pred dice.main/2-0 <c2;?;> dice.m:20 3 (3) 1 0.25
|
|
pred dice.main/2-0 <c2;t;> dice.m:22 3 (3) 1 0.25
|
|
pred dice.merge_sort/2-0 CALL dice.m:31 3 (3) 1 0.25
|
|
pred dice.merge_sort/2-0 EXIT dice.m:31 3 (3) 1 0.25
|
|
mdb> dice -sS -n 1 --module dice
|
|
Procedure Path/Port File:Line Pass (3) Fail Suspicion
|
|
pred dice.merge/3-0 <s2-2;c2;s2-2;c4;e;> dice.m:74 0 (0) 1 1.00
|
|
mdb> break dice.m:74
|
|
0: + stop linenumber dice.m:74
|
|
mdb> c
|
|
E2: C2 ELSE pred dice.merge/3-0 (det) s2-2;c2;s2-2;c4;e;
|
|
mdb> quit -y
|