mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-23 13:23:47 +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.
47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
1: 1 1 CALL pred args:main/2-0 (cc_multi) args.m:17
|
|
mdb> echo on
|
|
Command echo enabled.
|
|
mdb> register --quiet
|
|
mdb> break p
|
|
0: + stop interface pred args:p/5-0 (nondet)
|
|
mdb> continue
|
|
3: 2 2 CALL pred args:p/5-0 (nondet) args.m:24 (args.m:10)
|
|
mdb> finish
|
|
7: 2 2 EXIT pred args:p/5-0 (nondet) args.m:24 (args.m:10)
|
|
mdb> dd
|
|
p(1, 16, 3, 20, 5)
|
|
Valid? no
|
|
my_succeed
|
|
Valid? yes
|
|
Found incorrect contour:
|
|
p(1, 16, 3, 20, 5)
|
|
Is this a bug? yes
|
|
7: 2 2 EXIT pred args:p/5-0 (nondet) args.m:24 (args.m:10)
|
|
mdb> continue
|
|
10: 2 2 REDO pred args:p/5-0 (nondet) args.m:24 (args.m:10)
|
|
mdb> finish
|
|
14: 2 2 EXIT pred args:p/5-0 (nondet) args.m:24 (args.m:10)
|
|
mdb> dd
|
|
p(1, -2, 3, 2, 5)
|
|
Valid? no
|
|
Found incorrect contour:
|
|
p(1, -2, 3, 2, 5)
|
|
Is this a bug? yes
|
|
14: 2 2 EXIT pred args:p/5-0 (nondet) args.m:24 (args.m:10)
|
|
mdb> continue
|
|
17: 2 2 REDO pred args:p/5-0 (nondet) args.m:24 (args.m:10)
|
|
mdb> finish
|
|
18: 2 2 FAIL pred args:p/5-0 (nondet) args.m:24 (args.m:10)
|
|
mdb> dd
|
|
Call p(1, _, 3, _, 5)
|
|
Solutions:
|
|
p(1, 16, 3, 20, 5)
|
|
p(1, -2, 3, 2, 5)
|
|
Complete? no
|
|
Found partially uncovered atom:
|
|
p(1, _, 3, _, 5)
|
|
Is this a bug? yes
|
|
18: 2 2 FAIL pred args:p/5-0 (nondet) args.m:24 (args.m:10)
|
|
mdb> continue
|
|
no.
|