mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-23 13:23:47 +00:00
Estimated hours taken: 4 Make declarative debugging enabled by default, and add test cases. The declarative debugger, while not complete, is fairly stable so users will be able to experiment with it after this change without having to re-configure the whole system. However, the main motivation for this change is so that developers who make changes to the system will have access to these test cases. configure.in: Turn the decl-debug feature on by default. tests/debugger/declarative: New directory containing tests for the declarative debugger. tests/debugger/declarative/*.m: tests/debugger/declarative/*.inp: tests/debugger/declarative/*.exp: Declarative debugger test cases. tests/debugger/declarative/Mmakefile: Mmakefile to do the declarative debugger tests. tests/debugger/Mmakefile: For each target, make the corresponding target in the 'declarative' subdirectory. WORK_IN_PROGRESS: Document the new (incomplete) feature.
46 lines
730 B
Plaintext
46 lines
730 B
Plaintext
1: 1 1 CALL pred if_then_else:main/2-0 (det)
|
|
mdb> echo on
|
|
Command echo enabled.
|
|
mdb> goto 8
|
|
8: 2 2 EXIT pred if_then_else:ite/2-0 (det)
|
|
mdb> dd_wrong
|
|
ite(0, 1)
|
|
Valid? n
|
|
b(1)
|
|
Valid? y
|
|
a(0)
|
|
Valid? y
|
|
Incorrect instance found:
|
|
|
|
ite(0, 1) :-
|
|
a(0),
|
|
b(1).
|
|
|
|
8: 2 2 EXIT pred if_then_else:ite/2-0 (det)
|
|
mdb> dd_wrong
|
|
ite(0, 1)
|
|
Valid? n
|
|
b(1)
|
|
Valid? n
|
|
Incorrect instance found:
|
|
|
|
b(1).
|
|
|
|
8: 2 2 EXIT pred if_then_else:ite/2-0 (det)
|
|
mdb> goto 15
|
|
ite(0, 1).
|
|
15: 5 2 EXIT pred if_then_else:ite/2-0 (det)
|
|
mdb> dd_wrong
|
|
ite(1, 0)
|
|
Valid? n
|
|
a(0)
|
|
Valid? y
|
|
Incorrect instance found:
|
|
|
|
ite(1, 0) :-
|
|
a(0).
|
|
|
|
15: 5 2 EXIT pred if_then_else:ite/2-0 (det)
|
|
mdb> c
|
|
ite(1, 0).
|