Files
mercury/tests/debugger/dice.exp
Zoltan Somogyi 2bada9761f Eliminate some code duplication by unifying the two goal_path types have had
Estimated hours taken: 2
Branches: main

Eliminate some code duplication by unifying the two goal_path types have had
until now: one in mdbcomp/program_representation.m and compiler/hlds_goal.m,
which differed in only one detail (whether we record the total number of arms
in a switch). The new type is in program_representation.m, but with the
definition from goal_path.m.

Add a "step_" prefix to the function symbols of the goal_path_step type,
to avoid ambiguity with the hlds goals the steps describe.

Turn the predicates operating on goal_paths into functions for greater
convenience of use.

mdbcomp/program_representation.m:
compiler/hlds_goal.m:
	Make the change described above.

browser/*.m:
compiler/*.m:
mdbcomp/*.m:
slice/*.m:
	Conform to the change above.

tests/debugger/*.exp:
	Expect the extra information now available for goal path steps
	describing switches.
2007-01-06 10:56:27 +00:00

116 lines
8.1 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 <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:71 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 <?;> dice.m:39 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;?;> 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;t;s2-2;> dice.m:47 11 (3) 4 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.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:54 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;t;s2-2;> dice.m:47 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:71 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.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:54 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;t;s2-2;> dice.m:47 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:71 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:54 19 (3) 7 0.27
pred dice.msort_n/4-0 <e;?;> dice.m:44 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;> dice.m:50 11 (3) 4 0.27
pred dice.msort_n/4-0 <e;t;s2-2;> dice.m:47 11 (3) 4 0.27
pred dice.merge/3-0 <s1-2;> dice.m:64 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:71 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