[m-rev.] For review: Fixed some tests for decldebug grade

Ian MacLarty maclarty at cs.mu.OZ.AU
Wed Nov 10 12:26:51 AEDT 2004


For review by anyone.

Estimated hours taken: 1
Branches: main

Fix some debugger test cases failing in grade decldebug because the library is
deep traced in that grade.

tests/debugger/Mmakefile
	Set INP variable to inp2 for decldebug grade, so loopcheck can have
	different input in this grade.

tests/debugger/all_solutions.exp4
tests/debugger/exception_cmd.exp3
tests/debugger/print_table.exp3
tests/debugger/retry.exp3
	New expected outputs with the only differences the event and depth 
	number of some events.

tests/debugger/exception_value.exp3
	This expected output had its print format set to verbose for some
	reason, so overwrote this expected output with new output with flat 
	format (the default) and new depth/event numbers for decldebug grade.

tests/debugger/polymorphic_output.exp3
	This expected output still used the non-standardized event printing,
	even though the test is run with standardized event printing.  So
	replaced this expected outout file with the decldebug expected output.

tests/debugger/loopcheck.exp3
tests/debugger/loopcheck.inp2
	Add new input that only prints events in loopcheck module, otherwise
	there are just way too many events printed.

Index: tests/debugger/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/Mmakefile,v
retrieving revision 1.105
diff -u -r1.105 Mmakefile
--- tests/debugger/Mmakefile	19 Jul 2004 03:37:51 -0000	1.105
+++ tests/debugger/Mmakefile	10 Nov 2004 01:08:10 -0000
@@ -196,6 +196,16 @@
 endif
 MLFLAGS += --trace
 
+# Some of the test cases require a different input in decldebug grades,
+# so we set INP to the appropriate extension to use for those tests.
+# All other tests ignore this variable.
+#
+ifneq "$(findstring .decldebug,$(GRADE))" ""
+    INP=inp2
+else
+    INP=inp
+endif
+
 # Module-specific options should go in Mercury.options so they
 # can be found by `mmc --make'.
 include Mercury.options
@@ -316,8 +326,8 @@
 label_layout.out: label_layout label_layout.inp
 	$(MDB) ./label_layout < label_layout.inp > label_layout.out 2>&1
 
-loopcheck.out: loopcheck loopcheck.inp
-	if $(MDB) ./loopcheck < loopcheck.inp			\
+loopcheck.out: loopcheck loopcheck.$(INP)
+	if $(MDB) ./loopcheck < loopcheck.$(INP)		\
 		> loopcheck.tmp 2>&1;				\
 	then							\
 		sed -e '/EXCP/s/).*/)/'				\
Index: tests/debugger/all_solutions.exp4
===================================================================
RCS file: tests/debugger/all_solutions.exp4
diff -N tests/debugger/all_solutions.exp4
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tests/debugger/all_solutions.exp4	10 Nov 2004 01:08:10 -0000
@@ -0,0 +1,25 @@
+       1:      1  1 CALL pred all_solutions.main/2-0 (det) all_solutions.m:16
+mdb> echo on
+Command echo enabled.
+mdb> context none
+Contexts will not be printed.
+mdb> register --quiet
+mdb> break hello
+ 0: + stop  interface pred all_solutions.hello/1-0 (multi)
+mdb> continue
+      12:      8  5 CALL pred all_solutions.hello/1-0 (multi)
+mdb> stack
+   0       pred all_solutions.hello/1-0 (multi)
+   1       pred std_util.builtin_aggregate/4-0 (det)
+   2       pred std_util.builtin_solutions/2-0 (det)
+   3       pred std_util.solutions/2-0 (det)
+   4       pred all_solutions.main/2-0 (det)
+mdb> retry 1
+       4:      4  4 CALL pred std_util.builtin_aggregate/4-0 (det)
+mdb> retry 2
+       2:      2  2 CALL pred std_util.solutions/2-0 (det)
+mdb> retry 3
+not that many ancestors
+mdb> continue -n -S
+Hello again, world
+Hello, world
Index: tests/debugger/exception_cmd.exp3
===================================================================
RCS file: tests/debugger/exception_cmd.exp3
diff -N tests/debugger/exception_cmd.exp3
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tests/debugger/exception_cmd.exp3	10 Nov 2004 01:08:10 -0000
@@ -0,0 +1,12 @@
+      E1:     C1  1 CALL pred exception_cmd.main/2-0 (det) exception_cmd.m:12
+mdb> echo on
+Command echo enabled.
+mdb> exception
+      E2:     C2  5 EXCP pred exception.throw_impl/1-0 (erroneous)
+mdb> print *
+       Univ (arg 1)           	univ_cons(software_error("oops"))
+mdb> continue
+Uncaught Mercury exception:
+Software Error: oops
+Last trace event was event #E3.
+Last trace event before the unhandled exception was event #E4.
Index: tests/debugger/exception_value.exp3
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/exception_value.exp3,v
retrieving revision 1.1
diff -u -r1.1 exception_value.exp3
--- tests/debugger/exception_value.exp3	18 Mar 2003 16:38:31 -0000	1.1
+++ tests/debugger/exception_value.exp3	10 Nov 2004 01:08:10 -0000
@@ -7,36 +7,21 @@
 mdb> break q
  1: + stop  interface pred exception_value.q/1-0 (det)
 mdb> continue
-      E2:     C2  3 CALL pred exception_value.p/1-0 (det) exception_value.m:30
+      E2:     C2  8 CALL pred exception_value.p/1-0 (det) exception_value.m:30 (exception.m:NNNN)
 mdb> finish
-      E3:     C2  3 EXCP pred exception_value.p/1-0 (det)
+      E3:     C2  8 EXCP pred exception_value.p/1-0 (det)
 mdb> print exception
 	"p exception"
 mdb> continue
-mdb: warning: reached label with no stack layout info
-This may result in some exception events
-being omitted from the trace.
 exception(univ_cons("p exception"))
-      E4:     C3  3 CALL pred exception_value.q/1-0 (det) exception_value.m:35
+      E4:     C3  8 CALL pred exception_value.q/1-0 (det) exception_value.m:35 (exception.m:NNNN)
 mdb> finish
-      E5:     C3  3 EXCP pred exception_value.q/1-0 (det)
+      E5:     C3  8 EXCP pred exception_value.q/1-0 (det)
 mdb> browse exception
 browser> set depth 9
 browser> set size 99
 browser> ls
--
-1-"q oops"
-2-[|]
-  1-1
-  2-[|]
-    1-2
-    2-[|]
-      1-3
-      2-[]
-
+"q oops" - [1, 2, 3]
 browser> quit
 mdb> continue
-mdb: warning: reached label with no stack layout info
-This may result in some exception events
-being omitted from the trace.
 exception(univ_cons("q oops" - [1, 2, 3]))
Index: tests/debugger/loopcheck.exp3
===================================================================
RCS file: tests/debugger/loopcheck.exp3
diff -N tests/debugger/loopcheck.exp3
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tests/debugger/loopcheck.exp3	10 Nov 2004 01:08:10 -0000
@@ -0,0 +1,27 @@
+       1:      1  1 CALL pred loopcheck.main/2-0 (det) loopcheck.m:13
+mdb> echo on
+Command echo enabled.
+mdb> context nextline
+Contexts will be printed on the next line.
+mdb> break loopcheck.main
+Registering debuggable procedures... done.
+There are 97 debuggable modules, with a total of 5317 procedures.
+ 0: + stop  interface pred loopcheck.main/2-0 (det)
+mdb> break loopcheck.loop
+ 1: + stop  interface pred loopcheck.loop/1-0 (det)
+mdb> finish
+       2:      2  2 CALL pred loopcheck.loop/1-0 (det)
+                         loopcheck.m:21 (from loopcheck.m:14)
+       3:      3  3 CALL pred loopcheck.loop/1-0 (det)
+                         loopcheck.m:21 (from loopcheck.m:21)
+      12:      3  3 EXCP pred loopcheck.loop/1-0 (det)
+                         loopcheck.m:21 (from loopcheck.m:21)
+      13:      2  2 EXCP pred loopcheck.loop/1-0 (det)
+                         loopcheck.m:21 (from loopcheck.m:14)
+      14:      1  1 EXCP pred loopcheck.main/2-0 (det)
+                         loopcheck.m:14
+mdb> continue
+Uncaught Mercury exception:
+Software Error: detected infinite recursion in pred loopcheck.loop/1
+Last trace event was event #316.
+Last trace event before the unhandled exception was event #8.
Index: tests/debugger/loopcheck.inp2
===================================================================
RCS file: tests/debugger/loopcheck.inp2
diff -N tests/debugger/loopcheck.inp2
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tests/debugger/loopcheck.inp2	10 Nov 2004 01:08:10 -0000
@@ -0,0 +1,6 @@
+echo on
+context nextline
+break loopcheck.main
+break loopcheck.loop
+finish
+continue
Index: tests/debugger/polymorphic_output.exp3
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/polymorphic_output.exp3,v
retrieving revision 1.8
diff -u -r1.8 polymorphic_output.exp3
--- tests/debugger/polymorphic_output.exp3	17 Jan 2003 05:56:55 -0000	1.8
+++ tests/debugger/polymorphic_output.exp3	10 Nov 2004 01:08:10 -0000
@@ -1,4 +1,4 @@
-       1:      1  1 CALL pred polymorphic_output.main/2-0 (det) polymorphic_output.m:20
+      E1:     C1  1 CALL pred polymorphic_output.main/2-0 (det) polymorphic_output.m:20
 mdb> echo on
 Command echo enabled.
 mdb> register --quiet
@@ -7,7 +7,7 @@
 mdb> b functor_names
  0: + stop  interface func polymorphic_output.functor_names/1-0 (det)
 mdb> c
-       2:      2  2 CALL func polymorphic_output.functor_names/1-0 (det)
+      E2:     C2  2 CALL func polymorphic_output.functor_names/1-0 (det)
 mdb> delete 0
  0: E stop  interface func polymorphic_output.functor_names/1-0 (det)
 mdb> p goal
@@ -38,23 +38,34 @@
 mdb> browse goal
 browser> ^1
 browser> p
-two("three", 3, three("four", 4, "one", 1, empty, empty, empty), two/4)
+two("three", 3, three("four", 4, "one", 1, empty, empty, empty), two("two", 2, empty, empty))
 browser> ^..^2
-error: cannot change to subterm
+error: there is no subterm 2
 browser> p
-two("three", 3, three("four", 4, "one", 1, empty, empty, empty), two/4)
+two("three", 3, three("four", 4, "one", 1, empty, empty, empty), two("two", 2, empty, empty))
 browser> ^..^3
-error: cannot change to subterm
+error: there is no subterm 3
 browser> p
-two("three", 3, three("four", 4, "one", 1, empty, empty, empty), two/4)
+two("three", 3, three("four", 4, "one", 1, empty, empty, empty), two("two", 2, empty, empty))
 browser> ^..^r
 browser> p
 '_'
 browser> quit
 mdb> b std_util__det_arg
-mdb: there is no such procedure.
+ 0: + stop  interface func std_util.det_arg/2-0 (det)
+mdb> c
+      E3:     C3  4 CALL func std_util.det_arg/2-0 (det)
+mdb> P
+       Type (arg 1)           	two("three", 3, three("four", 4, "one", 1, empty, empty, empty), two/4)
+       Index (arg 2)          	3
+mdb> f
+      E4:     C3  4 EXCP func std_util.det_arg/2-0 (det)
+mdb> P
+       Type (arg 1)           	two("three", 3, three("four", 4, "one", 1, empty, empty, empty), two/4)
+       Index (arg 2)          	3
+       Argument0              	two("two", 2, empty, empty)
 mdb> c
 Uncaught Mercury exception:
 Software Error: det_arg: argument has wrong type
-Last trace event was event #7.
-Last trace event before the unhandled exception was event #4.
+Last trace event was event #E5.
+Last trace event before the unhandled exception was event #E6.
Index: tests/debugger/print_table.exp3
===================================================================
RCS file: tests/debugger/print_table.exp3
diff -N tests/debugger/print_table.exp3
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tests/debugger/print_table.exp3	10 Nov 2004 01:08:10 -0000
@@ -0,0 +1,398 @@
+      E1:     C1  1 CALL pred print_table.main/2-0 (det) print_table.m:13
+mdb> echo on
+Command echo enabled.
+mdb> context none
+Contexts will not be printed.
+mdb> goal_paths off
+Goal path printing is now off.
+mdb> register --quiet
+mdb> b p
+ 0: + stop  interface pred print_table.p/3-0 (det)
+mdb> c
+      E2:     C2  2 CALL pred print_table.p/3-0 (det)
+mdb> f -n
+      E3:     C2  2 EXIT pred print_table.p/3-0 (det)
+mdb> table p
+memo table for pred print_table.p/3-0 (det):
+<5, 0>: succeeded <0>
+<5, 1>: succeeded <5>
+<5, 2>: succeeded <15>
+<5, 3>: succeeded <30>
+<5, 4>: succeeded <50>
+<5, 5>: succeeded <75>
+end of table (6 entries)
+mdb> table p 5
+memo table for pred print_table.p/3-0 (det):
+<5, 0>: succeeded <0>
+<5, 1>: succeeded <5>
+<5, 2>: succeeded <15>
+<5, 3>: succeeded <30>
+<5, 4>: succeeded <50>
+<5, 5>: succeeded <75>
+end of table (6 entries)
+mdb> table p 5 2
+<5, 2>: succeeded <15>
+mdb> c
+      E4:     C3  2 CALL pred print_table.p/3-0 (det)
+mdb> f -n
+      E5:     C3  2 EXIT pred print_table.p/3-0 (det)
+mdb> table p
+memo table for pred print_table.p/3-0 (det):
+<4, 0>: succeeded <0>
+<4, 1>: succeeded <4>
+<4, 2>: succeeded <12>
+<4, 3>: succeeded <24>
+<5, 0>: succeeded <0>
+<5, 1>: succeeded <5>
+<5, 2>: succeeded <15>
+<5, 3>: succeeded <30>
+<5, 4>: succeeded <50>
+<5, 5>: succeeded <75>
+end of table (10 entries)
+mdb> table p 5
+memo table for pred print_table.p/3-0 (det):
+<5, 0>: succeeded <0>
+<5, 1>: succeeded <5>
+<5, 2>: succeeded <15>
+<5, 3>: succeeded <30>
+<5, 4>: succeeded <50>
+<5, 5>: succeeded <75>
+end of table (6 entries)
+mdb> table p 5 2
+<5, 2>: succeeded <15>
+mdb> table p 4
+memo table for pred print_table.p/3-0 (det):
+<4, 0>: succeeded <0>
+<4, 1>: succeeded <4>
+<4, 2>: succeeded <12>
+<4, 3>: succeeded <24>
+end of table (4 entries)
+mdb> table p 4 2
+<4, 2>: succeeded <12>
+mdb> c
+      E6:     C4  2 CALL pred print_table.p/3-0 (det)
+mdb> f -n
+      E7:     C4  2 EXIT pred print_table.p/3-0 (det)
+mdb> table p
+memo table for pred print_table.p/3-0 (det):
+<2, 0>: succeeded <0>
+<2, 1>: succeeded <2>
+<2, 2>: succeeded <6>
+<4, 0>: succeeded <0>
+<4, 1>: succeeded <4>
+<4, 2>: succeeded <12>
+<4, 3>: succeeded <24>
+<5, 0>: succeeded <0>
+<5, 1>: succeeded <5>
+<5, 2>: succeeded <15>
+<5, 3>: succeeded <30>
+<5, 4>: succeeded <50>
+<5, 5>: succeeded <75>
+end of table (13 entries)
+mdb> table p 5
+memo table for pred print_table.p/3-0 (det):
+<5, 0>: succeeded <0>
+<5, 1>: succeeded <5>
+<5, 2>: succeeded <15>
+<5, 3>: succeeded <30>
+<5, 4>: succeeded <50>
+<5, 5>: succeeded <75>
+end of table (6 entries)
+mdb> table p 5 2
+<5, 2>: succeeded <15>
+mdb> table p 4
+memo table for pred print_table.p/3-0 (det):
+<4, 0>: succeeded <0>
+<4, 1>: succeeded <4>
+<4, 2>: succeeded <12>
+<4, 3>: succeeded <24>
+end of table (4 entries)
+mdb> table p 2 1
+<2, 1>: succeeded <2>
+mdb> c
+      E8:     C5  2 CALL pred print_table.p/3-0 (det)
+mdb> f -n
+      E9:     C5  2 EXIT pred print_table.p/3-0 (det)
+mdb> table p
+memo table for pred print_table.p/3-0 (det):
+<1, 0>: succeeded <0>
+<2, 0>: succeeded <0>
+<2, 1>: succeeded <2>
+<2, 2>: succeeded <6>
+<4, 0>: succeeded <0>
+<4, 1>: succeeded <4>
+<4, 2>: succeeded <12>
+<4, 3>: succeeded <24>
+<5, 0>: succeeded <0>
+<5, 1>: succeeded <5>
+<5, 2>: succeeded <15>
+<5, 3>: succeeded <30>
+<5, 4>: succeeded <50>
+<5, 5>: succeeded <75>
+end of table (14 entries)
+mdb> table p 5
+memo table for pred print_table.p/3-0 (det):
+<5, 0>: succeeded <0>
+<5, 1>: succeeded <5>
+<5, 2>: succeeded <15>
+<5, 3>: succeeded <30>
+<5, 4>: succeeded <50>
+<5, 5>: succeeded <75>
+end of table (6 entries)
+mdb> table p 5 2
+<5, 2>: succeeded <15>
+mdb> table p 4
+memo table for pred print_table.p/3-0 (det):
+<4, 0>: succeeded <0>
+<4, 1>: succeeded <4>
+<4, 2>: succeeded <12>
+<4, 3>: succeeded <24>
+end of table (4 entries)
+mdb> table p 2 1
+<2, 1>: succeeded <2>
+mdb> table p 1 0
+<1, 0>: succeeded <0>
+mdb> delete 1
+mdb: break point #1 does not exist.
+mdb> b q
+ 1: + stop  interface pred print_table.q/3-0 (semidet)
+mdb> c
+     E10:     C6  2 CALL pred print_table.q/3-0 (semidet)
+mdb> f -n
+     E11:     C6  2 EXIT pred print_table.q/3-0 (semidet)
+mdb> table q
+memo table for pred print_table.q/3-0 (semidet):
+<3, 0>: succeeded <0>
+<3, 1>: succeeded <3>
+<3, 2>: succeeded <9>
+end of table (3 entries)
+mdb> table q 3
+memo table for pred print_table.q/3-0 (semidet):
+<3, 0>: succeeded <0>
+<3, 1>: succeeded <3>
+<3, 2>: succeeded <9>
+end of table (3 entries)
+mdb> table q 3 2
+<3, 2>: succeeded <9>
+mdb> table q 4
+call table does not contain 4 in argument position 1.
+mdb> c
+     E12:     C7  2 CALL pred print_table.q/3-0 (semidet)
+mdb> f -n
+     E13:     C7  2 FAIL pred print_table.q/3-0 (semidet)
+mdb> table q
+memo table for pred print_table.q/3-0 (semidet):
+<3, 0>: succeeded <0>
+<3, 1>: succeeded <3>
+<3, 2>: succeeded <9>
+<4, 1>: failed
+<4, 2>: failed
+end of table (5 entries)
+mdb> table q 3
+memo table for pred print_table.q/3-0 (semidet):
+<3, 0>: succeeded <0>
+<3, 1>: succeeded <3>
+<3, 2>: succeeded <9>
+end of table (3 entries)
+mdb> table q 3 2
+<3, 2>: succeeded <9>
+mdb> table q 3 0
+<3, 0>: succeeded <0>
+mdb> table q 4 2
+<4, 2>: failed
+mdb> table q 4 1
+<4, 1>: failed
+mdb> table q 4 0
+call table does not contain 0 in argument position 2.
+mdb> delete 1
+ 1: E stop  interface pred print_table.q/3-0 (semidet)
+mdb> b r
+ 1: + stop  interface pred print_table.r/2-0 (det)
+mdb> c
+     E14:     C8  2 CALL pred print_table.r/2-0 (det)
+mdb> table r
+memo table for pred print_table.r/2-0 (det):
+end of table (0 entries)
+mdb> s
+     E15:     C8  2 COND pred print_table.r/2-0 (det)
+mdb> table r
+memo table for pred print_table.r/2-0 (det):
+<3>: working
+end of table (1 entry)
+mdb> table r 3
+<3>: working
+mdb> c
+     E16:     C9  3 CALL pred print_table.r/2-0 (det)
+mdb> table r
+memo table for pred print_table.r/2-0 (det):
+<3>: working
+end of table (1 entry)
+mdb> f -n
+     E17:     C9  3 EXIT pred print_table.r/2-0 (det)
+mdb> table r
+memo table for pred print_table.r/2-0 (det):
+<0>: succeeded <0>
+<1>: succeeded <1>
+<2>: succeeded <3>
+<3>: working
+end of table (4 entries)
+mdb> f -n 1
+     E18:     C8  2 EXIT pred print_table.r/2-0 (det)
+mdb> table r
+memo table for pred print_table.r/2-0 (det):
+<0>: succeeded <0>
+<1>: succeeded <1>
+<2>: succeeded <3>
+<3>: succeeded <6>
+end of table (4 entries)
+mdb> delete 1
+ 1: E stop  interface pred print_table.r/2-0 (det)
+mdb> b s
+ 1: + stop  interface pred print_table.s/6-0 (det)
+mdb> c
+     E19:    C10  2 CALL pred print_table.s/6-0 (det)
+mdb> table s
+memo table for pred print_table.s/6-0 (det):
+end of table (0 entries)
+mdb> f -n
+     E20:    C10  2 EXIT pred print_table.s/6-0 (det)
+mdb> table s
+memo table for pred print_table.s/6-0 (det):
+<3.500000, 1, "abc", 1>: succeeded <"[3.5abc1]", 4.500000>
+end of table (1 entry)
+mdb> c
+     E21:    C11  2 CALL pred print_table.s/6-0 (det)
+mdb> f -n
+     E22:    C11  2 EXIT pred print_table.s/6-0 (det)
+mdb> table s
+memo table for pred print_table.s/6-0 (det):
+<3.500000, 1, "abc", 1>: succeeded <"[3.5abc1]", 4.500000>
+<3.500000, 2, "abc", 2>: succeeded <"[3.5abc2][3.5abc2]", 5.500000>
+end of table (2 entries)
+mdb> table s 3.5
+memo table for pred print_table.s/6-0 (det):
+<3.500000, 1, "abc", 1>: succeeded <"[3.5abc1]", 4.500000>
+<3.500000, 2, "abc", 2>: succeeded <"[3.5abc2][3.5abc2]", 5.500000>
+end of table (2 entries)
+mdb> table s 3.51
+call table does not contain 3.510000 in argument position 1.
+mdb> table s 3.5 1
+memo table for pred print_table.s/6-0 (det):
+<3.500000, 1, "abc", 1>: succeeded <"[3.5abc1]", 4.500000>
+end of table (1 entry)
+mdb> table s 3.5 1 abc
+memo table for pred print_table.s/6-0 (det):
+<3.500000, 1, "abc", 1>: succeeded <"[3.5abc1]", 4.500000>
+end of table (1 entry)
+mdb> c
+     E23:    C12  2 CALL pred print_table.s/6-0 (det)
+mdb> f -n
+     E24:    C12  2 EXIT pred print_table.s/6-0 (det)
+mdb> c
+     E25:    C13  2 CALL pred print_table.s/6-0 (det)
+mdb> f -n
+     E26:    C13  2 EXIT pred print_table.s/6-0 (det)
+mdb> c
+     E27:    C14  2 CALL pred print_table.s/6-0 (det)
+mdb> f -n
+     E28:    C14  2 EXIT pred print_table.s/6-0 (det)
+mdb> table s
+memo table for pred print_table.s/6-0 (det):
+<3.500000, 1, "abc", 1>: succeeded <"[3.5abc1]", 4.500000>
+<3.500000, 2, "abc", 2>: succeeded <"[3.5abc2][3.5abc2]", 5.500000>
+<3.500000, 2, "xyz", 3>: succeeded <"[3.5xyz2][3.5xyz2][3.5xyz2]", 6.500000>
+<3.500000, 2, "xyz", 4>: succeeded <"[3.5xyz2][3.5xyz2][3.5xyz2][3.5xyz2]", 7.500000>
+<9.200000, 2, "def", 5>: succeeded <"[9.2def2][9.2def2][9.2def2][9.2def2][9.2def2]", 14.200000>
+end of table (5 entries)
+mdb> table s 3.5
+memo table for pred print_table.s/6-0 (det):
+<3.500000, 1, "abc", 1>: succeeded <"[3.5abc1]", 4.500000>
+<3.500000, 2, "abc", 2>: succeeded <"[3.5abc2][3.5abc2]", 5.500000>
+<3.500000, 2, "xyz", 3>: succeeded <"[3.5xyz2][3.5xyz2][3.5xyz2]", 6.500000>
+<3.500000, 2, "xyz", 4>: succeeded <"[3.5xyz2][3.5xyz2][3.5xyz2][3.5xyz2]", 7.500000>
+end of table (4 entries)
+mdb> table s 3.51
+call table does not contain 3.510000 in argument position 1.
+mdb> table s 3.5 1
+memo table for pred print_table.s/6-0 (det):
+<3.500000, 1, "abc", 1>: succeeded <"[3.5abc1]", 4.500000>
+end of table (1 entry)
+mdb> table s 3.5 1 abc
+memo table for pred print_table.s/6-0 (det):
+<3.500000, 1, "abc", 1>: succeeded <"[3.5abc1]", 4.500000>
+end of table (1 entry)
+mdb> table s 3.5 2
+memo table for pred print_table.s/6-0 (det):
+<3.500000, 2, "abc", 2>: succeeded <"[3.5abc2][3.5abc2]", 5.500000>
+<3.500000, 2, "xyz", 3>: succeeded <"[3.5xyz2][3.5xyz2][3.5xyz2]", 6.500000>
+<3.500000, 2, "xyz", 4>: succeeded <"[3.5xyz2][3.5xyz2][3.5xyz2][3.5xyz2]", 7.500000>
+end of table (3 entries)
+mdb> table s 3.5 2 abc
+memo table for pred print_table.s/6-0 (det):
+<3.500000, 2, "abc", 2>: succeeded <"[3.5abc2][3.5abc2]", 5.500000>
+end of table (1 entry)
+mdb> table s 3.5 2 xyz
+memo table for pred print_table.s/6-0 (det):
+<3.500000, 2, "xyz", 3>: succeeded <"[3.5xyz2][3.5xyz2][3.5xyz2]", 6.500000>
+<3.500000, 2, "xyz", 4>: succeeded <"[3.5xyz2][3.5xyz2][3.5xyz2][3.5xyz2]", 7.500000>
+end of table (2 entries)
+mdb> table s 9.1 2 abc
+call table does not contain 9.100000 in argument position 1.
+mdb> table s 9.2 2 abc
+call table does not contain abc in argument position 3.
+mdb> table s 9.2 2 def
+memo table for pred print_table.s/6-0 (det):
+<9.200000, 2, "def", 5>: succeeded <"[9.2def2][9.2def2][9.2def2][9.2def2][9.2def2]", 14.200000>
+end of table (1 entry)
+mdb> table s 9.2 2 xyz
+call table does not contain xyz in argument position 3.
+mdb> delete 1
+ 1: E stop  interface pred print_table.s/6-0 (det)
+mdb> b t
+ 1: + stop  interface pred print_table.t/3-0 (nondet)
+mdb> c
+     E29:    C15  5 CALL pred print_table.t/3-0 (nondet)
+mdb> table t
+memo table for pred print_table.t/3-0 (nondet):
+end of table (0 entries)
+mdb> s
+     E30:    C15  5 DISJ pred print_table.t/3-0 (nondet)
+mdb> table t
+memo table for pred print_table.t/3-0 (nondet):
+<1, 2>: active
+end of table (1 entry)
+mdb> finish
+     E31:    C15  5 EXIT pred print_table.t/3-0 (nondet)
+mdb> table t
+memo table for pred print_table.t/3-0 (nondet):
+<1, 2>: incomplete
+answer #1: <120>
+end of table (1 entry)
+mdb> delete 1
+ 1: E stop  interface pred print_table.t/3-0 (nondet)
+mdb> b tdone
+ 1: + stop  interface pred print_table.tdone/0-0 (det)
+mdb> c
+     E32:    C16  2 CALL pred print_table.tdone/0-0 (det)
+mdb> table t
+memo table for pred print_table.t/3-0 (nondet):
+<1, 2>: complete
+answer #1: <120>
+answer #2: <210>
+<2, 2>: complete
+end of table (2 entries)
+mdb> c -S -n
+75
+24
+6
+0
+yes(9)
+no
+6
+[3.5abc1] 4.50000000000000
+[3.5abc2][3.5abc2] 5.50000000000000
+[3.5xyz2][3.5xyz2][3.5xyz2] 6.50000000000000
+[3.5xyz2][3.5xyz2][3.5xyz2][3.5xyz2] 7.50000000000000
+[9.2def2][9.2def2][9.2def2][9.2def2][9.2def2] 14.2000000000000
+[120, 210]
+[]
Index: tests/debugger/retry.exp3
===================================================================
RCS file: tests/debugger/retry.exp3
diff -N tests/debugger/retry.exp3
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tests/debugger/retry.exp3	10 Nov 2004 01:08:10 -0000
@@ -0,0 +1,165 @@
+      E1:     C1  1 CALL pred retry.main/2-0 (det) retry.m:25
+mdb> echo on
+Command echo enabled.
+mdb> register --quiet
+mdb> scroll off
+Scroll control disabled.
+mdb> context none
+Contexts will not be printed.
+mdb> goal_paths off
+Goal path printing is now off.
+mdb> break det_without_cut_1
+ 0: + stop  interface pred retry.det_without_cut_1/2-0 (det)
+mdb> continue -a
+      E2:     C2  2 CALL pred retry.det_without_cut/2-0 (det)
+      E3:     C3  3 CALL func int.+/2-0 (det)
+      E4:     C3  3 EXIT func int.+/2-0 (det)
+      E5:     C4  3 CALL pred retry.det_without_cut_1/2-0 (det)
+mdb> disable 0
+ 0: - stop  interface pred retry.det_without_cut_1/2-0 (det)
+mdb> retry
+This command is a no-op from this port.
+mdb> stack
+   0       pred retry.det_without_cut_1/2-0 (det)
+   1       pred retry.det_without_cut/2-0 (det)
+   2       pred retry.main/2-0 (det)
+mdb> finish
+      E6:     C4  3 EXIT pred retry.det_without_cut_1/2-0 (det)
+mdb> retry 1
+      E2:     C2  2 CALL pred retry.det_without_cut/2-0 (det)
+mdb> stack
+   0       pred retry.det_without_cut/2-0 (det)
+   1       pred retry.main/2-0 (det)
+mdb> break det_without_cut_2
+ 1: + stop  interface pred retry.det_without_cut_2/2-0 (det)
+mdb> continue -a
+      E3:     C3  3 CALL func int.+/2-0 (det)
+      E4:     C3  3 EXIT func int.+/2-0 (det)
+      E5:     C4  3 CALL pred retry.det_without_cut_1/2-0 (det)
+      E7:     C5  4 CALL pred retry.det_without_cut_2/2-0 (det)
+mdb> delete *
+ 0: D stop  interface pred retry.det_without_cut_1/2-0 (det)
+ 1: E stop  interface pred retry.det_without_cut_2/2-0 (det)
+mdb> retry 2
+      E2:     C2  2 CALL pred retry.det_without_cut/2-0 (det)
+mdb> finish
+      E8:     C2  2 EXIT pred retry.det_without_cut/2-0 (det)
+mdb> stack
+   0       pred retry.det_without_cut/2-0 (det)
+   1       pred retry.main/2-0 (det)
+mdb> break det_with_cut_1
+ 0: + stop  interface pred retry.det_with_cut_1/2-0 (nondet)
+mdb> continue -a
+      E9:     C6  2 CALL pred retry.det_with_cut/2-0 (det)
+     E10:     C6  2 COND pred retry.det_with_cut/2-0 (det)
+     E11:     C7  3 CALL pred retry.det_with_cut_1/2-0 (nondet)
+mdb> delete *
+ 0: E stop  interface pred retry.det_with_cut_1/2-0 (nondet)
+mdb> finish
+     E12:     C7  3 EXIT pred retry.det_with_cut_1/2-0 (nondet)
+mdb> retry 1
+      E9:     C6  2 CALL pred retry.det_with_cut/2-0 (det)
+mdb> finish
+     E13:     C6  2 EXIT pred retry.det_with_cut/2-0 (det)
+mdb> stack
+   0       pred retry.det_with_cut/2-0 (det)
+   1       pred retry.main/2-0 (det)
+mdb> retry -f 1
+      E1:     C1  1 CALL pred retry.main/2-0 (det)
+mdb> break det_with_cut_2
+ 0: + stop  interface pred retry.det_with_cut_2/2-0 (det)
+mdb> continue -a
+      E2:     C2  2 CALL pred retry.det_without_cut/2-0 (det)
+      E3:     C3  3 CALL func int.+/2-0 (det)
+      E4:     C3  3 EXIT func int.+/2-0 (det)
+      E5:     C4  3 CALL pred retry.det_without_cut_1/2-0 (det)
+      E7:     C5  4 CALL pred retry.det_without_cut_2/2-0 (det)
+     E14:     C5  4 EXIT pred retry.det_without_cut_2/2-0 (det)
+     E15:     C8  4 CALL func int.*/2-0 (det)
+     E16:     C8  4 EXIT func int.*/2-0 (det)
+      E6:     C4  3 EXIT pred retry.det_without_cut_1/2-0 (det)
+      E8:     C2  2 EXIT pred retry.det_without_cut/2-0 (det)
+      E9:     C6  2 CALL pred retry.det_with_cut/2-0 (det)
+     E10:     C6  2 COND pred retry.det_with_cut/2-0 (det)
+     E11:     C7  3 CALL pred retry.det_with_cut_1/2-0 (nondet)
+     E17:     C7  3 DISJ pred retry.det_with_cut_1/2-0 (nondet)
+     E18:     C9  4 CALL pred retry.det_with_cut_2/2-0 (det)
+mdb> delete *
+ 0: E stop  interface pred retry.det_with_cut_2/2-0 (det)
+mdb> break nondet
+ 0: + stop  interface pred retry.nondet/2-0 (multi)
+mdb> continue
+     E19:    C10  5 CALL pred retry.nondet/2-0 (multi)
+mdb> print *
+       X0 (arg 1)             	4
+mdb> break nondet_2
+ 1: + stop  interface pred retry.nondet_2/2-0 (det)
+mdb> continue
+     E20:    C11  6 CALL pred retry.nondet_2/2-0 (det)
+mdb> retry 1
+     E19:    C10  5 CALL pred retry.nondet/2-0 (multi)
+mdb> print *
+       X0 (arg 1)             	4
+mdb> delete *
+ 0: E stop  interface pred retry.nondet/2-0 (multi)
+ 1: E stop  interface pred retry.nondet_2/2-0 (det)
+mdb> break fib
+ 0: + stop  interface pred retry.fib/2-0 (det)
+mdb> continue
+6
+4
+9
+40 41 
+50 51 
+     E21:    C12  2 CALL pred retry.fib/2-0 (det)
+mdb> print *
+       N (arg 1)              	15
+mdb> continue
+     E22:    C13  3 CALL pred retry.fib/2-0 (det)
+mdb> print *
+       N (arg 1)              	14
+mdb> continue
+     E23:    C14  4 CALL pred retry.fib/2-0 (det)
+mdb> continue
+     E24:    C15  5 CALL pred retry.fib/2-0 (det)
+mdb> step
+     E25:    C15  5 COND pred retry.fib/2-0 (det)
+mdb> retry 2
+     E22:    C13  3 CALL pred retry.fib/2-0 (det)
+mdb> print *
+       N (arg 1)              	14
+mdb> next
+     E26:    C13  3 COND pred retry.fib/2-0 (det)
+mdb> retry 1
+     E21:    C12  2 CALL pred retry.fib/2-0 (det)
+mdb> finish -n
+     E27:    C12  2 EXIT pred retry.fib/2-0 (det)
+mdb> delete *
+ 0: E stop  interface pred retry.fib/2-0 (det)
+mdb> break t
+ 0: + stop  interface pred retry.t/3-0 (nondet)
+mdb> continue
+987
+     E28:    C16  5 CALL pred retry.t/3-0 (nondet)
+mdb> table t 1 2
+call table does not contain 1 in argument position 1.
+mdb> finish
+marker executed: t 1 2
+     E29:    C16  5 EXIT pred retry.t/3-0 (nondet)
+mdb> table t 1 2
+<1, 2>: incomplete
+answer #1: <120>
+mdb> retry
+     E28:    C16  5 CALL pred retry.t/3-0 (nondet)
+mdb> table t 1 2
+<1, 2>: inactive
+mdb> finish
+marker executed: t 1 2
+     E29:    C16  5 EXIT pred retry.t/3-0 (nondet)
+mdb> table t 1 2
+<1, 2>: incomplete
+answer #1: <120>
+mdb> delete *
+ 0: E stop  interface pred retry.t/3-0 (nondet)
+mdb> continue -n -S
+120 210 
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list