mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-21 12:23:44 +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.
76 lines
1.9 KiB
Plaintext
76 lines
1.9 KiB
Plaintext
1: 1 1 CALL pred aadebug:main/2-0 (det) aadebug.m:11
|
|
mdb> echo on
|
|
Command echo enabled.
|
|
mdb> register --quiet
|
|
mdb> break p
|
|
0: + stop interface pred aadebug:p/2-0 (nondet)
|
|
mdb> continue
|
|
3: 2 2 CALL pred aadebug:p/2-0 (nondet) aadebug.m:24 (aadebug.m:9)
|
|
mdb> finish
|
|
15: 2 2 EXIT pred aadebug:p/2-0 (nondet) aadebug.m:24 (aadebug.m:9)
|
|
mdb> dd
|
|
p('a', 30)
|
|
Valid? no
|
|
q('a', 'a')
|
|
Valid? yes
|
|
r('a', 10)
|
|
Valid? yes
|
|
s(10, 30)
|
|
Valid? yes
|
|
Found incorrect contour:
|
|
p('a', 30)
|
|
Is this a bug? yes
|
|
15: 2 2 EXIT pred aadebug:p/2-0 (nondet) aadebug.m:24 (aadebug.m:9)
|
|
mdb> continue
|
|
18: 2 2 REDO pred aadebug:p/2-0 (nondet) aadebug.m:24 (aadebug.m:9)
|
|
mdb> finish
|
|
20: 2 2 EXIT pred aadebug:p/2-0 (nondet) aadebug.m:24 (aadebug.m:9)
|
|
mdb> dd
|
|
p('a', 31)
|
|
Valid? no
|
|
Found incorrect contour:
|
|
p('a', 31)
|
|
Is this a bug? yes
|
|
20: 2 2 EXIT pred aadebug:p/2-0 (nondet) aadebug.m:24 (aadebug.m:9)
|
|
mdb> continue
|
|
23: 2 2 REDO pred aadebug:p/2-0 (nondet) aadebug.m:24 (aadebug.m:9)
|
|
mdb> finish
|
|
35: 2 2 EXIT pred aadebug:p/2-0 (nondet) aadebug.m:24 (aadebug.m:9)
|
|
mdb> dd
|
|
p('a', 32)
|
|
Valid? no
|
|
q('a', 'b')
|
|
Valid? yes
|
|
Call r('b', _)
|
|
No solutions.
|
|
Complete? yes
|
|
Call q('b', _)
|
|
No solutions.
|
|
Complete? yes
|
|
Found incorrect contour:
|
|
p('a', 32)
|
|
Is this a bug? yes
|
|
35: 2 2 EXIT pred aadebug:p/2-0 (nondet) aadebug.m:24 (aadebug.m:9)
|
|
mdb> continue
|
|
38: 2 2 REDO pred aadebug:p/2-0 (nondet) aadebug.m:24 (aadebug.m:9)
|
|
mdb> finish
|
|
41: 2 2 FAIL pred aadebug:p/2-0 (nondet) aadebug.m:24 (aadebug.m:9)
|
|
mdb> dd
|
|
Call p('a', _)
|
|
Solutions:
|
|
p('a', 30)
|
|
p('a', 31)
|
|
p('a', 32)
|
|
Complete? no
|
|
Call q('a', _)
|
|
Solutions:
|
|
q('a', 'a')
|
|
q('a', 'b')
|
|
Complete? yes
|
|
Found partially uncovered atom:
|
|
p('a', _)
|
|
Is this a bug? yes
|
|
41: 2 2 FAIL pred aadebug:p/2-0 (nondet) aadebug.m:24 (aadebug.m:9)
|
|
mdb> continue
|
|
no
|