mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-25 14:24:11 +00:00
Estimated hours taken: 3
Branches: main
Replace names of the form "HeadVar__n" with meaningful names in a larger class
of cases than we do currently.
compiler/typecheck.m:
Implement the change above.
compiler/clause_to_proc.m:
compiler/hlds_clauses.m:
compiler/simplify.m:
Fix some minor issues I found while looking for the right piece of code
to change.
tests/debugger/queens.{inp,exp,exp2}:
Extend the input to the test case to print the names of the arguments
of the nodiag predicate (whose head variables are now named "B" and
"D", not HeadVar__1 and HeadVar__2).
Expect fewer conjuncts in the top-level conjunction, since the
unifications HeadVar__1 = B and HeadVar__2 = D can now be
optimized away.
tests/debugger/higher_order.exp:
tests/debugger/synth_attr.exp:
tests/debugger/user_event.exp:
tests/debugger/user_event_shallow.exp:
Update variable names and/or goal paths as for queens.
tests/debugger/higher_order.exp2:
Document that this file is not currently used.
66 lines
2.0 KiB
Plaintext
66 lines
2.0 KiB
Plaintext
E1: C1 CALL pred user_event.main/2-0 (cc_multi) user_event.m:16
|
|
mdb> echo on
|
|
Command echo enabled.
|
|
mdb> register --quiet
|
|
mdb> break user_event nonexistent_event_name
|
|
There is no user event named `nonexistent_event_name'.
|
|
mdb> break user_event nonexistent_set_name nodiag_fail
|
|
There is no user event set named `nonexistent_set_name'.
|
|
mdb> break user_event nodiag_fail
|
|
0: + stop user_event nodiag_fail
|
|
mdb> break_print -b0 !arg_b
|
|
0: + stop user_event nodiag_fail
|
|
!arg_b (flat)
|
|
mdb> user
|
|
E2: C2 USER <safe_test> pred user_event.queen/2-0 (nondet) c3; user_event.m:32
|
|
mdb> print *
|
|
test_list (attr 0, Out) [1, 2, 3, 4, 5]
|
|
Data (arg 1) [1, 2, 3, 4, 5]
|
|
mdb> browse !test_list
|
|
browser> p
|
|
[1, 2, 3, 4, 5]
|
|
browser> ^2^1
|
|
browser> p
|
|
2
|
|
browser> quit
|
|
mdb> user
|
|
E3: C3 USER <nodiag_fail> pred user_event.nodiag/3-0 (semidet) s2-2;c4;t;c2; user_event.m:64
|
|
arg_b (attr 1, B) 1
|
|
mdb> vars
|
|
1 test_failed (attr 0)
|
|
2 arg_b (attr 1, B)
|
|
3 arg_d (attr 2, N)
|
|
4 arg_list (attr 3, HeadVar__3)
|
|
5 B (arg 1)
|
|
6 D (arg 2)
|
|
7 HeadVar__3
|
|
8 BmN
|
|
9 L
|
|
10 N
|
|
11 NmB
|
|
mdb> print *
|
|
test_failed (attr 0) "N - B"
|
|
arg_b (attr 1, B) 1
|
|
arg_d (attr 2, N) 2
|
|
arg_list (attr 3, HeadVar__3) [2, 3, 4, 5]
|
|
D (arg 2) 1
|
|
BmN -1
|
|
L [3, 4, 5]
|
|
NmB 1
|
|
mdb> print !arg_b
|
|
arg_b (attr 1, B) 1
|
|
mdb> user
|
|
E4: C2 USER <safe_test> pred user_event.queen/2-0 (nondet) c3; user_event.m:32
|
|
mdb> print *
|
|
test_list (attr 0, Out) [1, 2, 3, 5, 4]
|
|
Data (arg 1) [1, 2, 3, 4, 5]
|
|
mdb> condition -b0 !arg_b = 1
|
|
0: + stop user_event nodiag_fail
|
|
!arg_b = 1
|
|
!arg_b (flat)
|
|
mdb> continue
|
|
E5: C4 USER <nodiag_fail> pred user_event.nodiag/3-0 (semidet) s2-2;c4;t;c2; user_event.m:64
|
|
arg_b (attr 1, B) 1
|
|
mdb> continue -S
|
|
[1, 3, 5, 2, 4]
|