mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-26 23:04:15 +00:00
Estimated hours taken: 15 Branches: main Allow the search mode to be changed from within the declarative debugger. Make binary search independent of subterm dependency tracking. The user can now perform a binary search along the path between the current question and the root of the search space using the command `mode binary' (or `m b'). browser/declarative_analyser.m: Make reask_last_question fail instead of throwing an exception if there is no last question. If it fails we recompute the question. This happens when the user resumes with a new search mode. Do not return an analyser response when showing info, since we can just call reask_last_question. Make set_fallback_search_mode set the last_search_question field to no. This will force the question to be recomputed with the new search strategy when analysis continues. Add change_search_mode which handles the users request to change the current search mode from within a declarative debugging session. Do not perform a binary search after tracking a subterm unless instructed to do so by the user. browser/declarative_debugger.m: Allow search mode changes to be undone. Handle the new change_search oracle response. Handle the fact that reask_last_question is now semidet. browser/declarative_oracle.m: Add a change_search oracle response. Add a predicate to indicate which oracle responses are undoable. browser/declarative_user.m: Add a change_search user response. doc/user_guide.texi: Rephrase the description of the undo command to take into account that search mode changes can be undone. Add a section about the binary search mode. Rearrange some text and reword some sentences slightly. tests/debugger/mdb_command_test.inp: tests/debugger/declarative/Mmakefile: tests/debugger/declarative/binary_search.exp: tests/debugger/declarative/binary_search.exp2: tests/debugger/declarative/binary_search.inp: tests/debugger/declarative/binary_search.inp2: tests/debugger/declarative/change_search.exp: tests/debugger/declarative/change_search.inp: tests/debugger/declarative/change_search.m: tests/debugger/declarative/info.exp: tests/debugger/declarative/info.inp: Test the `mode' command and do not expect the declarative debugger to automatically go into binary search mode once it has tracked a subterm.
50 lines
272 B
Plaintext
50 lines
272 B
Plaintext
register --quiet
|
|
context none
|
|
echo on
|
|
break a
|
|
c
|
|
f
|
|
dd -d 3 -n 7
|
|
b 1
|
|
mark
|
|
mode binary
|
|
y
|
|
n
|
|
n
|
|
y
|
|
n
|
|
y
|
|
n
|
|
y
|
|
n
|
|
y
|
|
y
|
|
trust binary_search_1
|
|
break b
|
|
delete 0
|
|
c
|
|
f
|
|
dd -d 3 -n 7
|
|
b 1
|
|
mark
|
|
y
|
|
delete 1
|
|
break add1s
|
|
c
|
|
delete 0
|
|
f
|
|
dd -d 3 -n 7
|
|
b 2
|
|
ls
|
|
cdr 9 2
|
|
ls
|
|
cd 1
|
|
mark
|
|
mode binary
|
|
n
|
|
y
|
|
n
|
|
y
|
|
y
|
|
c
|