mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-24 05:43:53 +00:00
Estimated hours taken: 2.5
Alter the `dd' command in mdb so that it does not assume that the answer
to the first question asked is `no'. The question is somewhat redundant,
since the only sensible answer is `no', but I find that it gives useful
feedback about the symptom that is being diagnosed, and it makes clearer
why the following questions are asked.
browser/declarative_analyser.m:
Start analysis with a list of suspects which contains only the
topmost node of the debugging tree.
browser/declarative_debugger.m:
If the answer to the first question is something other than `no',
then end the diagnosis and report that no bugs were found.
tests/debugger/declarative/*.{inp,exp,exp2}:
Update test cases to handle the extra question.
158 lines
2.8 KiB
Plaintext
158 lines
2.8 KiB
Plaintext
1: 1 1 CALL pred big:main/2-0 (det) big.m:9
|
|
mdb> echo on
|
|
Command echo enabled.
|
|
mdb> register --quiet
|
|
mdb> break p
|
|
0: + stop interface pred big:p/1-0 (nondet)
|
|
mdb> continue
|
|
3: 2 2 CALL pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
|
mdb> finish
|
|
28: 2 2 EXIT pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
|
mdb> dd
|
|
p(-12)
|
|
Valid? no
|
|
a(0)
|
|
Valid? yes
|
|
b(0, 0)
|
|
Valid? yes
|
|
c(0, 2)
|
|
Valid? yes
|
|
Call d(2, _)
|
|
No solutions.
|
|
Complete? yes
|
|
c(2, 6)
|
|
Valid? yes
|
|
f(6, -12)
|
|
Valid? yes
|
|
Found incorrect contour:
|
|
p(-12)
|
|
Is this a bug? yes
|
|
28: 2 2 EXIT pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
|
mdb> continue
|
|
29: 2 2 REDO pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
|
mdb> finish
|
|
35: 2 2 EXIT pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
|
mdb> dd
|
|
p(-14)
|
|
Valid? no
|
|
c(2, 7)
|
|
Valid? yes
|
|
f(7, -14)
|
|
Valid? yes
|
|
Found incorrect contour:
|
|
p(-14)
|
|
Is this a bug? yes
|
|
35: 2 2 EXIT pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
|
mdb> continue
|
|
36: 2 2 REDO pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
|
mdb> finish
|
|
71: 2 2 EXIT pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
|
mdb> dd
|
|
p(-20)
|
|
Valid? no
|
|
b(0, 1)
|
|
Valid? yes
|
|
c(1, 15)
|
|
Valid? yes
|
|
d(15, 45)
|
|
Valid? yes
|
|
Call c(1, _)
|
|
Solutions:
|
|
c(1, 15)
|
|
Complete? yes
|
|
e(1, 10)
|
|
Valid? yes
|
|
f(10, -20)
|
|
Valid? yes
|
|
Found incorrect contour:
|
|
p(-20)
|
|
Is this a bug? yes
|
|
71: 2 2 EXIT pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
|
mdb> continue
|
|
72: 2 2 REDO pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
|
mdb> finish
|
|
78: 2 2 EXIT pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
|
mdb> dd
|
|
p(-22)
|
|
Valid? no
|
|
e(1, 11)
|
|
Valid? yes
|
|
f(11, -22)
|
|
Valid? yes
|
|
Found incorrect contour:
|
|
p(-22)
|
|
Is this a bug? yes
|
|
78: 2 2 EXIT pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
|
mdb> continue
|
|
79: 2 2 REDO pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
|
mdb> finish
|
|
115: 2 2 EXIT pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
|
mdb> dd
|
|
p(2)
|
|
Valid? no
|
|
f(0, 0)
|
|
Valid? yes
|
|
g(1, -1)
|
|
Valid? yes
|
|
f(-1, 2)
|
|
Valid? yes
|
|
g(6, -10)
|
|
Valid? yes
|
|
g(7, -11)
|
|
Valid? yes
|
|
Call c(2, _)
|
|
Solutions:
|
|
c(2, 6)
|
|
c(2, 7)
|
|
Complete? yes
|
|
Found incorrect contour:
|
|
p(2)
|
|
Is this a bug? yes
|
|
115: 2 2 EXIT pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
|
mdb> continue
|
|
116: 2 2 REDO pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
|
mdb> finish
|
|
143: 2 2 FAIL pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
|
mdb> dd
|
|
Call p(_)
|
|
Solutions:
|
|
p(-12)
|
|
p(-14)
|
|
p(-20)
|
|
p(-22)
|
|
p(2)
|
|
Complete? no
|
|
c(0, 3)
|
|
Valid? yes
|
|
d(3, 9)
|
|
Valid? yes
|
|
Call c(0, _)
|
|
Solutions:
|
|
c(0, 2)
|
|
c(0, 3)
|
|
Complete? yes
|
|
Call e(1, _)
|
|
Solutions:
|
|
e(1, 10)
|
|
e(1, 11)
|
|
Complete? yes
|
|
Call b(0, _)
|
|
Solutions:
|
|
b(0, 0)
|
|
b(0, 1)
|
|
Complete? yes
|
|
g(10, -2)
|
|
Valid? yes
|
|
f(-2, 4)
|
|
Valid? yes
|
|
c(4, 9)
|
|
Valid? yes
|
|
g(9, 99)
|
|
Valid? yes
|
|
Found partially uncovered atom:
|
|
p(_)
|
|
Is this a bug? yes
|
|
143: 2 2 FAIL pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
|
mdb> continue
|
|
no.
|