[m-rev.] for review: use list syntax in mdb

Mark Brown dougl at cs.mu.OZ.AU
Wed Oct 23 05:03:48 AEST 2002


Estimated hours taken: 3
Branches: main

Print list terms using list syntax when printing in "flat" format.  As
well as the usual functor/arity style abbreviation, list elements can be
replaced by an ellipsis, "...", if beyond the depth or size limit.

browser/browse.m:
	Handle the functors [|]/2 and []/0 specially.

doc/user_guide.texi:
	Be more explicit with the meaning of "depth" and "size".  In
	particular, define what they mean for lists.

tests/debugger/*.exp:
tests/debugger/*.exp2:
tests/debugger/declarative/*.exp:
tests/debugger/declarative/*.exp2:
	Update test outputs to reflect the change.

Index: browser/browse.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/browse.m,v
retrieving revision 1.30
diff -u -r1.30 browse.m
--- browser/browse.m	16 Oct 2002 03:15:19 -0000	1.30
+++ browser/browse.m	22 Oct 2002 16:56:25 -0000
@@ -653,27 +653,121 @@
 		limited_deconstruct_browser_term_cc(BrowserTerm, MaxSize,
 			Functor, _Arity, Args, MaybeReturn)
 	->
-		CurSize1 = CurSize + 1,
-		CurDepth1 = CurDepth + 1,
-		args_to_string_list(Args, MaxSize, CurSize1, NewSize1,
-			MaxDepth, CurDepth1, ArgStrs),
+		browser_term_to_string_3(Functor, Args, MaybeReturn,
+			MaxSize, CurSize, NewSize, MaxDepth, CurDepth, Str)
+	;
+		browser_term_compress(BrowserTerm, Str),
+		NewSize = CurSize
+	).
+
+:- pred browser_term_to_string_3(string::in, list(univ)::in, maybe(univ)::in,
+	int::in, int::in, int::out, int::in, int::in, string::out) is cc_multi.
+
+browser_term_to_string_3(Functor, Args, MaybeReturn, MaxSize, Size0, Size,
+	MaxDepth, Depth0, Str) :-
+
+	(
+		Functor = "[|]",
+		Args = [ListHead, ListTail],
+		MaybeReturn = no
+	->
+		% For the purposes of size and depth, we treat lists as if
+		% they consist of one functor plus an argument for each
+		% element of the list.
+		Size1 = Size0 + 1,
+		Depth1 = Depth0 + 1,
+		browser_term_to_string_2(plain_term(ListHead), MaxSize,
+			Size1, Size2, MaxDepth, Depth1, HeadStr),
+		list_tail_to_string_list(ListTail, MaxSize, Size2, Size,
+			MaxDepth, Depth1, TailStrs),
+		list__append(TailStrs, ["]"], Strs),
+		string__append_list(["[", HeadStr | Strs], Str)
+	;
+		Functor = "[]",
+		Args = [],
+		MaybeReturn = no
+	->
+		Size = Size0 + 1,
+		Str = "[]"
+	;
+		Size1 = Size0 + 1,
+		Depth1 = Depth0 + 1,
+		args_to_string_list(Args, MaxSize, Size1, Size2, MaxDepth,
+			Depth1, ArgStrs),
 		BracketedArgsStr = bracket_string_list(ArgStrs),
 		(
 			MaybeReturn = yes(Return),
 			browser_term_to_string_2(plain_term(Return), MaxSize,
-				NewSize1, NewSize, MaxDepth, CurDepth1,
-				ReturnStr),
+				Size2, Size, MaxDepth, Depth1, ReturnStr),
 			string__append_list([Functor, BracketedArgsStr,
 				" = ", ReturnStr], Str)
 		;
 			MaybeReturn = no,
-			NewSize = NewSize1,
+			Size = Size2,
 			string__append_list([Functor, BracketedArgsStr], Str)
 		)
+	).
+
+:- pred list_tail_to_string_list(univ::in, int::in, int::in, int::out, int::in,
+	int::in, list(string)::out) is cc_multi.
+
+list_tail_to_string_list(TailUniv, MaxSize, Size0, Size, MaxDepth, Depth0,
+	TailStrs) :-
+
+	% We want the limit to be at least two to ensure that the limited
+	% deconstruct won't fail for any list term.
+	Limit = max(MaxSize, 2),
+	(
+		limited_deconstruct_browser_term_cc(plain_term(TailUniv),
+			Limit, Functor, _Arity, Args, MaybeReturn)
+	->
+		(
+			Functor = "[]",
+			Args = [],
+			MaybeReturn = no
+		->
+			Size = Size0,
+			TailStrs = []
+		;
+			Functor = "[|]",
+			Args = [ListHead, ListTail],
+			MaybeReturn = no
+		->
+			(
+				Size0 < MaxSize,
+				Depth0 < MaxDepth
+			->
+				browser_term_to_string_2(plain_term(ListHead),
+					MaxSize, Size0, Size1, MaxDepth, Depth0,
+					HeadStr),
+				list_tail_to_string_list(ListTail, MaxSize,
+					Size1, Size, MaxDepth, Depth0,
+					TailStrs0),
+				TailStrs = [", ", HeadStr | TailStrs0]
+			;
+				Size = Size0,
+				TailStrs = [", ..."]
+			)
+		;
+			(
+				Size0 < MaxSize,
+				Depth0 < MaxDepth
+			->
+				browser_term_to_string_3(Functor, Args,
+					MaybeReturn, MaxSize, Size0, Size,
+					MaxDepth, Depth0, TailStr),
+				TailStrs = [" | ", TailStr]
+			;
+				Size = Size0,
+				browser_term_compress(plain_term(TailUniv),
+					TailCompressedStr),
+				TailStrs = [" | ", TailCompressedStr]
+			)
+		)
 	;
-		% Str = "...",
-		browser_term_compress(BrowserTerm, Str),
-		NewSize = CurSize
+		Size = Size0,
+		browser_term_compress(plain_term(TailUniv), TailCompressedStr),
+		TailStrs = [" | ", TailCompressedStr]
 	).
 
 :- pred args_to_string_list(list(univ)::in, int::in, int::in, int::out,
Index: doc/user_guide.texi
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/user_guide.texi,v
retrieving revision 1.332
diff -u -r1.332 user_guide.texi
--- doc/user_guide.texi	22 Oct 2002 04:36:03 -0000	1.332
+++ doc/user_guide.texi	22 Oct 2002 18:38:30 -0000
@@ -2594,10 +2594,23 @@
 @sp 1
 @item
 @samp{depth} is the maximum depth to which subterms will be displayed.
+Subterms at the depth limit may be abbreviated as functor/arity,
+or (in lists) may be replaced by an ellipsis (@samp{...}).
+The principal functor of any term has depth zero.
+For subterms which are not lists,
+the depth of any argument of the functor is one greater than the
+depth of the functor.
+For subterms which are lists,
+the depth of each element of the list
+is one greater than the depth of the list.
 @sp 1
 @item
 @samp{size} is the suggested maximum number of functors to display.
-Beyond this limit, the browser will abbreviate the output.
+Beyond this limit, subterms may be abbreviated as functor/arity,
+or (in lists) may be replaced by an ellipsis (@samp{...}).
+For the purposes of this parameter,
+the size of a list is one greater than
+the sum of the sizes of the elements in the list.
 @sp 1
 @item
 @samp{width} is the width of the screen in characters.
Index: tests/debugger/browse_pretty.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/browse_pretty.exp,v
retrieving revision 1.10
diff -u -r1.10 browse_pretty.exp
--- tests/debugger/browse_pretty.exp	5 Jun 2002 16:41:21 -0000	1.10
+++ tests/debugger/browse_pretty.exp	22 Oct 2002 07:11:35 -0000
@@ -4,7 +4,7 @@
 mdb> goto 3
        3:      2  2 EXIT pred browse_pretty:big_data/1-0 (det) browse_pretty.m:19 (browse_pretty.m:13)
 mdb> print *
-       Data (arg 1)           	big(big(big(small, [|]/2, small), [|](1, [|]/2), small), [|](1, [|](2, [|]/2)), big(big(small, [|]/2, big/3), [|]/2, small))
+       Data (arg 1)           	big(big(big(small, [|]/2, small), [1, ...], small), [1, 2, 3], big(big/3, [|]/2, small))
 mdb> browse 1
 browser> set format raw_pretty
 browser> set depth 10
@@ -105,7 +105,7 @@
   small)
 browser> quit
 mdb> print goal
-big_data(big(big(big/3, [|]/2, small), [|](1, [|]/2), big(big/3, [|]/2, small)))
+big_data(big(big(big/3, [|]/2, small), [1, ...], big(big/3, [|]/2, small)))
 mdb> browse goal
 browser> ls
 big_data(
Index: tests/debugger/higher_order.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/higher_order.exp,v
retrieving revision 1.2
diff -u -r1.2 higher_order.exp
--- tests/debugger/higher_order.exp	11 Sep 2002 07:20:30 -0000	1.2
+++ tests/debugger/higher_order.exp	22 Oct 2002 07:14:50 -0000
@@ -10,24 +10,24 @@
       E2:     C2  2 CALL pred higher_order:domap/3-0 (det)
 mdb> print *
        HeadVar__1             	float_add2(3.00000000000000)
-       HeadVar__2             	[|](1.00000000000000, [|](2.00000000000000, [|](3.00000000000000, [|](4.00000000000000, [|](5.00000000000000, [])))))
+       HeadVar__2             	[1.00000000000000, 2.00000000000000, 3.00000000000000, 4.00000000000000, 5.00000000000000]
 mdb> finish
       E3:     C2  2 EXIT pred higher_order:domap/3-0 (det)
 mdb> print *
        HeadVar__1             	float_add2(3.00000000000000)
-       HeadVar__2             	[|](1.00000000000000, [|](2.00000000000000, [|](3.00000000000000, [|](4.00000000000000, [|](5.00000000000000, [])))))
-       HeadVar__3             	[|](4.00000000000000, [|](5.00000000000000, [|](6.00000000000000, [|](7.00000000000000, [|](8.00000000000000, [])))))
+       HeadVar__2             	[1.00000000000000, 2.00000000000000, 3.00000000000000, 4.00000000000000, 5.00000000000000]
+       HeadVar__3             	[4.00000000000000, 5.00000000000000, 6.00000000000000, 7.00000000000000, 8.00000000000000]
 mdb> step
       E4:     C3  2 CALL pred higher_order:domap/3-0 (det)
 mdb> print *
        HeadVar__1             	float_op3(4.00000000000000, 5.00000000000000)
-       HeadVar__2             	[|](1.00000000000000, [|](2.00000000000000, [|](3.00000000000000, [|](4.00000000000000, [|](5.00000000000000, [])))))
+       HeadVar__2             	[1.00000000000000, 2.00000000000000, 3.00000000000000, 4.00000000000000, 5.00000000000000]
 mdb> finish
       E5:     C3  2 EXIT pred higher_order:domap/3-0 (det)
 mdb> print *
        HeadVar__1             	float_op3(4.00000000000000, 5.00000000000000)
-       HeadVar__2             	[|](1.00000000000000, [|](2.00000000000000, [|](3.00000000000000, [|](4.00000000000000, [|](5.00000000000000, [])))))
-       HeadVar__3             	[|](9.00000000000000, [|](14.0000000000000, [|](19.0000000000000, [|](24.0000000000000, [|](29.0000000000000, [])))))
+       HeadVar__2             	[1.00000000000000, 2.00000000000000, 3.00000000000000, 4.00000000000000, 5.00000000000000]
+       HeadVar__3             	[9.00000000000000, 14.0000000000000, 19.0000000000000, 24.0000000000000, 29.0000000000000]
 mdb> step
       E6:     C4  2 CALL pred higher_order:domap/3-0 (det)
 mdb> print *
@@ -49,18 +49,18 @@
 mdb> print *
        HeadVar__1             	'IntroducedFrom__pred__main__21__1'([6])
        HeadVar__2             	[[1, 2], [3, 4, 5]]
-       HeadVar__3             	[|]([|](6, [|](1, [|](2, []))), [|]([|](6, [|](3, [|](4, [|](5, [])))), []))
+       HeadVar__3             	[[6, 1, 2], [6, 3, 4, 5]]
 mdb> step
      E10:     C6  2 CALL pred higher_order:domap/3-0 (det)
 mdb> print *
        HeadVar__1             	'IntroducedFrom__pred__main__22__2'(["a"])
-       HeadVar__2             	[|]([|]("one", [|]("two", [])), [|]([|]("three", [|]("four", [|]("five", []))), []))
+       HeadVar__2             	[["one", "two"], ["three", "four", "five"]]
 mdb> finish
      E11:     C6  2 EXIT pred higher_order:domap/3-0 (det)
 mdb> print *
        HeadVar__1             	'IntroducedFrom__pred__main__22__2'(["a"])
-       HeadVar__2             	[|]([|]("one", [|]("two", [])), [|]([|]("three", [|]("four", [|]("five", []))), []))
-       HeadVar__3             	[|]([|]("a", [|]("one", [|]("two", []))), [|]([|]("a", [|]("three", [|]("four", [|]("five", [])))), []))
+       HeadVar__2             	[["one", "two"], ["three", "four", "five"]]
+       HeadVar__3             	[["a", "one", "two"], ["a", "three", "four", "five"]]
 mdb> continue -S
 [4.00000000000000, 5.00000000000000, 6.00000000000000, 7.00000000000000, 8.00000000000000]
 [9.00000000000000, 14.0000000000000, 19.0000000000000, 24.0000000000000, 29.0000000000000]
Index: tests/debugger/interpreter.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/interpreter.exp2,v
retrieving revision 1.15
diff -u -r1.15 interpreter.exp2
--- tests/debugger/interpreter.exp2	13 Sep 2002 03:37:41 -0000	1.15
+++ tests/debugger/interpreter.exp2	22 Oct 2002 07:17:37 -0000
@@ -32,15 +32,15 @@
 mdb> print *
        Database (arg 1)       	[]
        VarSet (arg 2)         	varset(var_supply(0), empty, empty)
-       Term (arg 3)           	functor(atom(":-"), [|](functor(atom/1, [|]/2, context/2), []), context("interpreter.m", 22))
-       HeadVar__4             	[|](clause(varset(var_supply/1, empty, empty), functor(atom/1, [|]/2, context/2), functor(atom/1, [], context/2)), [])
+       Term (arg 3)           	functor(atom(":-"), [functor(atom/1, [|]/2, context/2)], context("interpreter.m", 22))
+       HeadVar__4             	[clause(varset(var_supply/1, empty, empty), functor(atom/1, [|]/2, context/2), functor(atom/1, [], context/2))]
 mdb> finish -a
 This command is a no-op from this port.
 mdb> print *
        Database (arg 1)       	[]
        VarSet (arg 2)         	varset(var_supply(0), empty, empty)
-       Term (arg 3)           	functor(atom(":-"), [|](functor(atom/1, [|]/2, context/2), []), context("interpreter.m", 22))
-       HeadVar__4             	[|](clause(varset(var_supply/1, empty, empty), functor(atom/1, [|]/2, context/2), functor(atom/1, [], context/2)), [])
+       Term (arg 3)           	functor(atom(":-"), [functor(atom/1, [|]/2, context/2)], context("interpreter.m", 22))
+       HeadVar__4             	[clause(varset(var_supply/1, empty, empty), functor(atom/1, [|]/2, context/2), functor(atom/1, [], context/2))]
 mdb> 
       E5:     C4  6 CALL pred interpreter:consult_until_eof/4-0 (det)
 mdb> finish -n
Index: tests/debugger/tabled_read_decl.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/tabled_read_decl.exp,v
retrieving revision 1.5
diff -u -r1.5 tabled_read_decl.exp
--- tests/debugger/tabled_read_decl.exp	22 Oct 2002 04:36:15 -0000	1.5
+++ tests/debugger/tabled_read_decl.exp	22 Oct 2002 11:42:39 -0000
@@ -88,13 +88,13 @@
 mdb> print action 4
 read_char_code('<<c_pointer>>', 10)
 mdb> print action 5
-poly_read_char_code(list(character), <<c_pointer>>, [|]('a', [|]('b', [|]/2)), 52)
+poly_read_char_code(list(character), <<c_pointer>>, ['a', 'b', 'c'], 52)
 mdb> print action 6
-poly_read_char_code(list(character), <<c_pointer>>, [|]('a', [|]('b', [|]/2)), 53)
+poly_read_char_code(list(character), <<c_pointer>>, ['a', 'b', 'c'], 53)
 mdb> print action 7
-poly_read_char_code(list(character), <<c_pointer>>, [|]('a', [|]('b', [|]/2)), 54)
+poly_read_char_code(list(character), <<c_pointer>>, ['a', 'b', 'c'], 54)
 mdb> print action 8
-poly_read_char_code(list(character), <<c_pointer>>, [|]('a', [|]('b', [|]/2)), 10)
+poly_read_char_code(list(character), <<c_pointer>>, ['a', 'b', 'c'], 10)
 mdb> print action 9
 mdb: I/O action number not in range.
 mdb> continue -S
Index: tests/debugger/declarative/app.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/app.exp,v
retrieving revision 1.12
diff -u -r1.12 app.exp
--- tests/debugger/declarative/app.exp	16 Oct 2002 03:15:30 -0000	1.12
+++ tests/debugger/declarative/app.exp	22 Oct 2002 17:45:26 -0000
@@ -15,7 +15,7 @@
 mdb> finish -n
       16:      5  5 EXIT pred app:app/3-0 (det) app.m:26 (app.m:28)
 mdb> dd
-app([|](4, [|](5, [])), [|](6, [|](7, [|]/2)), [|](4, [|](5, [|]/2)))
+app([4, 5], [6, 7, 8], [4, ...])
 Valid? yes
 No bug found.
       16:      5  5 EXIT pred app:app/3-0 (det) app.m:26 (app.m:28)
@@ -26,14 +26,14 @@
 mdb> continue
       19:      2  2 EXIT pred app:app/3-0 (det) app.m:26 (app.m:13)
 mdb> dd
-app([|](1, [|](2, [|]/2)), [|](6, [|](7, [|]/2)), [|](1, [|](2, [|]/2)))
+app([1, 2, 3, 4, 5], [6, 7, ...], [|]/2)
 Valid? no
-app([|](2, [|](3, [|]/2)), [|](6, [|](7, [|]/2)), [|](2, [|](3, [|]/2)))
+app([2, 3, 4, 5], [6, 7, 8], [|]/2)
 Valid? no
-app([|](3, [|](4, [|]/2)), [|](6, [|](7, [|]/2)), [|](3, [|](4, [|]/2)))
+app([3, 4, 5], [6, 7, 8], [3, ...])
 Valid? no
 Found incorrect contour:
-app([|](3, [|](4, [|]/2)), [|](6, [|](7, [|]/2)), [|](3, [|](4, [|]/2)))
+app([3, 4, 5], [6, 7, 8], [3, ...])
 Is this a bug? yes
       17:      4  4 EXIT pred app:app/3-0 (det) app.m:26 (app.m:28)
 mdb> continue
@@ -46,28 +46,28 @@
 mdb> finish -n
       67:      8  2 EXIT pred app:app/3-0 (det) app.m:26 (app.m:18)
 mdb> dd
-app([|](1, [|](2, [|]/2)), [|](6, [|](7, [|]/2)), [|](1, [|](2, [|]/2)))
+app([1, 2, 3, 4, 5, 6, 7, 8, ...], [|]/2, [|]/2)
 Valid? no
-app([|](2, [|](3, [|]/2)), [|](6, [|](7, [|]/2)), [|](2, [|](3, [|]/2)))
+app([2, 3, 4, 5, 6, 7, 8, 9, ...], [|]/2, [|]/2)
 Valid? no
-app([|](3, [|](4, [|]/2)), [|](6, [|](7, [|]/2)), [|](3, [|](4, [|]/2)))
+app([3, 4, 5, 6, 7, 8, 9, 0, ...], [|]/2, [|]/2)
 Valid? no
-app([|](4, [|](5, [|]/2)), [|](6, [|](7, [|]/2)), [|](4, [|](5, [|]/2)))
+app([4, 5, 6, 7, 8, 9, 0, 1, ...], [|]/2, [|]/2)
 Valid? no
-app([|](5, [|](6, [|]/2)), [|](6, [|](7, [|]/2)), [|](5, [|](6, [|]/2)))
+app([5, 6, 7, 8, 9, 0, 1, 2, ...], [|]/2, [|]/2)
 Valid? no
-app([|](6, [|](7, [|]/2)), [|](6, [|](7, [|]/2)), [|](6, [|](7, [|]/2)))
+app([6, 7, 8, 9, 0, 1, 2, 3, ...], [|]/2, [|]/2)
 Valid? no
-app([|](7, [|](8, [|]/2)), [|](6, [|](7, [|]/2)), [|](7, [|](8, [|]/2)))
+app([7, 8, 9, 0, 1, 2, 3, 4, ...], [|]/2, [|]/2)
 Valid? no
-app([|](8, [|](9, [|]/2)), [|](6, [|](7, [|]/2)), [|](8, [|](9, [|]/2)))
+app([8, 9, 0, 1, 2, 3, 4, 5], [|]/2, [|]/2)
 Valid? no
-app([|](9, [|](0, [|]/2)), [|](6, [|](7, [|]/2)), [|](9, [|](0, [|]/2)))
+app([9, 0, 1, 2, 3, 4, 5], [6, ...], [|]/2)
 Valid? no
-app([|](0, [|](1, [|]/2)), [|](6, [|](7, [|]/2)), [|](0, [|](1, [|]/2)))
+app([0, 1, 2, 3, 4, 5], [6, ...], [|]/2)
 Valid? no
 Found incorrect contour:
-app([|](3, [|](4, [|]/2)), [|](6, [|](7, [|]/2)), [|](3, [|](4, [|]/2)))
+app([3, 4, 5], [6, 7, 8], [3, ...])
 Is this a bug? yes
       55:     20 14 EXIT pred app:app/3-0 (det) app.m:26 (app.m:28)
 mdb> continue
Index: tests/debugger/declarative/app.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/app.exp2,v
retrieving revision 1.12
diff -u -r1.12 app.exp2
--- tests/debugger/declarative/app.exp2	16 Oct 2002 03:15:31 -0000	1.12
+++ tests/debugger/declarative/app.exp2	22 Oct 2002 17:05:19 -0000
@@ -15,7 +15,7 @@
 mdb> finish -n
       16:      5  5 EXIT pred app:app/3-0 (det) app.m:26 (app.m:28)
 mdb> dd
-app([|](4, [|](5, [])), [|](6, [|](7, [|]/2)), [|](4, [|](5, [|]/2)))
+app([4, 5], [6, 7, 8], [4, ...])
 Valid? yes
 No bug found.
       16:      5  5 EXIT pred app:app/3-0 (det) app.m:26 (app.m:28)
@@ -26,14 +26,14 @@
 mdb> continue
       19:      2  2 EXIT pred app:app/3-0 (det) app.m:26 (app.m:13)
 mdb> dd
-app([|](1, [|](2, [|]/2)), [|](6, [|](7, [|]/2)), [|](1, [|](2, [|]/2)))
+app([1, 2, 3, 4, 5], [6, 7, ...], [|]/2)
 Valid? no
-app([|](2, [|](3, [|]/2)), [|](6, [|](7, [|]/2)), [|](2, [|](3, [|]/2)))
+app([2, 3, 4, 5], [6, 7, 8], [|]/2)
 Valid? no
-app([|](3, [|](4, [|]/2)), [|](6, [|](7, [|]/2)), [|](3, [|](4, [|]/2)))
+app([3, 4, 5], [6, 7, 8], [3, ...])
 Valid? no
 Found incorrect contour:
-app([|](3, [|](4, [|]/2)), [|](6, [|](7, [|]/2)), [|](3, [|](4, [|]/2)))
+app([3, 4, 5], [6, 7, 8], [3, ...])
 Is this a bug? yes
       17:      4  4 EXIT pred app:app/3-0 (det) app.m:26 (app.m:28)
 mdb> continue
@@ -46,28 +46,28 @@
 mdb> finish -n
       71:     10  2 EXIT pred app:app/3-0 (det) app.m:26 (app.m:18)
 mdb> dd
-app([|](1, [|](2, [|]/2)), [|](6, [|](7, [|]/2)), [|](1, [|](2, [|]/2)))
+app([1, 2, 3, 4, 5, 6, 7, 8, ...], [|]/2, [|]/2)
 Valid? no
-app([|](2, [|](3, [|]/2)), [|](6, [|](7, [|]/2)), [|](2, [|](3, [|]/2)))
+app([2, 3, 4, 5, 6, 7, 8, 9, ...], [|]/2, [|]/2)
 Valid? no
-app([|](3, [|](4, [|]/2)), [|](6, [|](7, [|]/2)), [|](3, [|](4, [|]/2)))
+app([3, 4, 5, 6, 7, 8, 9, 0, ...], [|]/2, [|]/2)
 Valid? no
-app([|](4, [|](5, [|]/2)), [|](6, [|](7, [|]/2)), [|](4, [|](5, [|]/2)))
+app([4, 5, 6, 7, 8, 9, 0, 1, ...], [|]/2, [|]/2)
 Valid? no
-app([|](5, [|](6, [|]/2)), [|](6, [|](7, [|]/2)), [|](5, [|](6, [|]/2)))
+app([5, 6, 7, 8, 9, 0, 1, 2, ...], [|]/2, [|]/2)
 Valid? no
-app([|](6, [|](7, [|]/2)), [|](6, [|](7, [|]/2)), [|](6, [|](7, [|]/2)))
+app([6, 7, 8, 9, 0, 1, 2, 3, ...], [|]/2, [|]/2)
 Valid? no
-app([|](7, [|](8, [|]/2)), [|](6, [|](7, [|]/2)), [|](7, [|](8, [|]/2)))
+app([7, 8, 9, 0, 1, 2, 3, 4, ...], [|]/2, [|]/2)
 Valid? no
-app([|](8, [|](9, [|]/2)), [|](6, [|](7, [|]/2)), [|](8, [|](9, [|]/2)))
+app([8, 9, 0, 1, 2, 3, 4, 5], [|]/2, [|]/2)
 Valid? no
-app([|](9, [|](0, [|]/2)), [|](6, [|](7, [|]/2)), [|](9, [|](0, [|]/2)))
+app([9, 0, 1, 2, 3, 4, 5], [6, ...], [|]/2)
 Valid? no
-app([|](0, [|](1, [|]/2)), [|](6, [|](7, [|]/2)), [|](0, [|](1, [|]/2)))
+app([0, 1, 2, 3, 4, 5], [6, ...], [|]/2)
 Valid? no
 Found incorrect contour:
-app([|](3, [|](4, [|]/2)), [|](6, [|](7, [|]/2)), [|](3, [|](4, [|]/2)))
+app([3, 4, 5], [6, 7, 8], [3, ...])
 Is this a bug? yes
       59:     22 14 EXIT pred app:app/3-0 (det) app.m:26 (app.m:28)
 mdb> continue
Index: tests/debugger/declarative/filter.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/filter.exp,v
retrieving revision 1.6
diff -u -r1.6 filter.exp
--- tests/debugger/declarative/filter.exp	16 Oct 2002 03:15:31 -0000	1.6
+++ tests/debugger/declarative/filter.exp	22 Oct 2002 17:45:57 -0000
@@ -15,7 +15,7 @@
 Valid? yes
 s2([9])
 Valid? yes
-my_append([|](1, [|](2, [])), [|](9, []), [|](1, [|](2, [|]/2)))
+my_append([1, 2], [9], [1, 2, 9])
 Valid? yes
 Found incorrect contour:
 p([1, 2, 9])
@@ -30,7 +30,7 @@
 Valid? no
 s2([7, 8, 9])
 Valid? yes
-my_append([|](1, [|](2, [])), [|](7, [|](8, [|]/2)), [|](1, [|](2, [|]/2)))
+my_append([1, 2], [7, 8, 9], [1, ...])
 Valid? yes
 Found incorrect contour:
 p([1, 2, 7, 8, 9])
@@ -45,7 +45,7 @@
 Valid? no
 s1([1, 2, 3])
 Valid? yes
-my_append([|](1, [|](2, [|]/2)), [|](9, []), [|](1, [|](2, [|]/2)))
+my_append([1, 2, 3], [9], [1, 2, ...])
 Valid? yes
 Found incorrect contour:
 p([1, 2, 3, 9])
@@ -58,7 +58,7 @@
 mdb> dd
 p([1, 2, 3, 7, 8, 9])
 Valid? no
-my_append([|](1, [|](2, [|]/2)), [|](7, [|](8, [|]/2)), [|](1, [|](2, [|]/2)))
+my_append([1, 2, 3], [7, 8, 9], [1, ...])
 Valid? yes
 Found incorrect contour:
 p([1, 2, 3, 7, 8, 9])
Index: tests/debugger/declarative/filter.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/filter.exp2,v
retrieving revision 1.6
diff -u -r1.6 filter.exp2
--- tests/debugger/declarative/filter.exp2	16 Oct 2002 03:15:31 -0000	1.6
+++ tests/debugger/declarative/filter.exp2	22 Oct 2002 17:08:07 -0000
@@ -15,7 +15,7 @@
 Valid? yes
 s2([9])
 Valid? yes
-my_append([|](1, [|](2, [])), [|](9, []), [|](1, [|](2, [|]/2)))
+my_append([1, 2], [9], [1, 2, 9])
 Valid? yes
 Found incorrect contour:
 p([1, 2, 9])
@@ -30,7 +30,7 @@
 Valid? no
 s2([7, 8, 9])
 Valid? yes
-my_append([|](1, [|](2, [])), [|](7, [|](8, [|]/2)), [|](1, [|](2, [|]/2)))
+my_append([1, 2], [7, 8, 9], [1, ...])
 Valid? yes
 Found incorrect contour:
 p([1, 2, 7, 8, 9])
@@ -45,7 +45,7 @@
 Valid? no
 s1([1, 2, 3])
 Valid? yes
-my_append([|](1, [|](2, [|]/2)), [|](9, []), [|](1, [|](2, [|]/2)))
+my_append([1, 2, 3], [9], [1, 2, ...])
 Valid? yes
 Found incorrect contour:
 p([1, 2, 3, 9])
@@ -58,7 +58,7 @@
 mdb> dd
 p([1, 2, 3, 7, 8, 9])
 Valid? no
-my_append([|](1, [|](2, [|]/2)), [|](7, [|](8, [|]/2)), [|](1, [|](2, [|]/2)))
+my_append([1, 2, 3], [7, 8, 9], [1, ...])
 Valid? yes
 Found incorrect contour:
 p([1, 2, 3, 7, 8, 9])
Index: tests/debugger/declarative/input_term_dep.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/input_term_dep.exp,v
retrieving revision 1.2
diff -u -r1.2 input_term_dep.exp
--- tests/debugger/declarative/input_term_dep.exp	16 Oct 2002 03:15:32 -0000	1.2
+++ tests/debugger/declarative/input_term_dep.exp	22 Oct 2002 17:47:00 -0000
@@ -40,7 +40,7 @@
 q([[2, 3], [], [1]])
 Valid? browse 1
 browser> mark 1/2
-qc([|]([|](2, [|]/2), [|]([], [|]/2)), [|]([|](2, [|]/2), [|]([], [|]/2)))
+qc([[2, ...], [], [1]], [[2, ...], [], [1]])
 Valid? browse 1
 browser> mark 1/2
 qa([[1], [2, 3]])
Index: tests/debugger/declarative/input_term_dep.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/input_term_dep.exp2,v
retrieving revision 1.2
diff -u -r1.2 input_term_dep.exp2
--- tests/debugger/declarative/input_term_dep.exp2	16 Oct 2002 03:15:32 -0000	1.2
+++ tests/debugger/declarative/input_term_dep.exp2	22 Oct 2002 17:07:08 -0000
@@ -40,7 +40,7 @@
 q([[2, 3], [], [1]])
 Valid? browse 1
 browser> mark 1/2
-qc([|]([|](2, [|]/2), [|]([], [|]/2)), [|]([|](2, [|]/2), [|]([], [|]/2)))
+qc([[2, ...], [], [1]], [[2, ...], [], [1]])
 Valid? browse 1
 browser> mark 1/2
 qa([[1], [2, 3]])
Index: tests/debugger/declarative/output_term_dep.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/output_term_dep.exp,v
retrieving revision 1.4
diff -u -r1.4 output_term_dep.exp
--- tests/debugger/declarative/output_term_dep.exp	16 Oct 2002 03:15:32 -0000	1.4
+++ tests/debugger/declarative/output_term_dep.exp	22 Oct 2002 17:48:03 -0000
@@ -40,7 +40,7 @@
 mdb> finish
       20:      8  3 EXIT pred output_term_dep:q/1-0 (det)
 mdb> dd
-q([|]([|](1, [|]/2), [|]([], [|]/2)))
+q([[1, ...], [], [99]])
 Valid? browse 1
 browser> mark 2/1
 qb([])
@@ -50,7 +50,7 @@
 qc([99])
 Valid? yes
 Found incorrect contour:
-q([|]([|](1, [|]/2), [|]([], [|]/2)))
+q([[1, ...], [], [99]])
 Is this a bug? yes
       20:      8  3 EXIT pred output_term_dep:q/1-0 (det)
 mdb> continue
Index: tests/debugger/declarative/output_term_dep.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/output_term_dep.exp2,v
retrieving revision 1.4
diff -u -r1.4 output_term_dep.exp2
--- tests/debugger/declarative/output_term_dep.exp2	16 Oct 2002 03:15:32 -0000	1.4
+++ tests/debugger/declarative/output_term_dep.exp2	22 Oct 2002 17:08:55 -0000
@@ -40,7 +40,7 @@
 mdb> finish
       32:     14  3 EXIT pred output_term_dep:q/1-0 (det)
 mdb> dd
-q([|]([|](1, [|]/2), [|]([], [|]/2)))
+q([[1, ...], [], [99]])
 Valid? browse 1
 browser> mark 2/1
 qb([])
@@ -50,7 +50,7 @@
 qc([99])
 Valid? yes
 Found incorrect contour:
-q([|]([|](1, [|]/2), [|]([], [|]/2)))
+q([[1, ...], [], [99]])
 Is this a bug? yes
       32:     14  3 EXIT pred output_term_dep:q/1-0 (det)
 mdb> continue
Index: tests/debugger/declarative/queens.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/queens.exp,v
retrieving revision 1.11
diff -u -r1.11 queens.exp
--- tests/debugger/declarative/queens.exp	16 Oct 2002 03:15:32 -0000	1.11
+++ tests/debugger/declarative/queens.exp	22 Oct 2002 09:08:40 -0000
@@ -17,16 +17,16 @@
 Call qperm([1, 2, 3, 4, 5], _)
 No solutions.
 Complete? no
-qdelete(1, [|](1, [|](2, [|]/2)), [|](2, [|](3, [|]/2)))
+qdelete(1, [1, 2, 3, 4, 5], [2, ...])
 Valid? yes
-qdelete(2, [|](1, [|](2, [|]/2)), [|](1, [|](3, [|]/2)))
+qdelete(2, [1, 2, 3, 4, 5], [1, ...])
 Valid? yes
 Call qperm([1, 3, 4, 5], _)
 No solutions.
 Complete? no
-qdelete(1, [|](1, [|](3, [|]/2)), [|](3, [|](4, [|]/2)))
+qdelete(1, [1, 3, 4, 5], [3, 4, ...])
 Valid? yes
-qdelete(3, [|](1, [|](3, [|]/2)), [|](1, [|](4, [|]/2)))
+qdelete(3, [1, 3, 4, 5], [1, 4, ...])
 Valid? yes
 Call qperm([1, 4, 5], _)
 No solutions.
--------------------------------------------------------------------------
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