[m-rev.] for review: change list constructor from `./2' to `[|]/2'
Simon Taylor
stayl at cs.mu.OZ.AU
Sun Sep 23 21:41:33 AEST 2001
Estimated hours taken: 3
Branches: main
Change the list constructor from `./2' to `[|]/2'. `./2' will
eventually become the module qualification operator.
library/parser.m:
library/io.m:
library/sparse_bitset.m:
library/term_io.m:
compiler/mercury_to_mercury.m:
compiler/prog_io_dcg.m:
compiler/prog_io_goal.m:
compiler/prog_io_pragma.m:
compiler/prog_io_typeclass.m:
compiler/prog_io_util.m:
browser/interactive_query.m:
extras/moose/grammar.m:
extras/moose/moose.m:
extras/morphine/source/generate_call_site_cov.m:
extras/xml/xml.encoding.m:
samples/muz/higher_order.m:
tests/debugger/declarative/app.m:
tests/dppd/transpose_impl.m:
tests/hard_coded/ground_dd.m:
tests/hard_coded/split_c_files.m:
Change all references to `./2' to use `[|]/2' instead.
compiler/llds_out.m:
util/mdemangle.c:
profiler/demangle.m:
Add name conversions for `[|]' (f_cons) and `[]' (f_nil).
NEWS:
doc/reference_manual.texi:
w3/tutorial/lists-n-things.m4:
Document the changes.
tests/debugger/{,declarative}/*.exp*:
Update test case results. For some tests the output changed
because they output lists in the non-pretty format. For others,
the output changed because the alphabetical ordering of the
constructors of type `list/1' changed, so the numbering of
the switch branches in the goal paths changed.
Index: NEWS
===================================================================
RCS file: /home/mercury1/repository/mercury/NEWS,v
retrieving revision 1.218
diff -u -u -r1.218 NEWS
--- NEWS 2001/09/22 12:10:23 1.218
+++ NEWS 2001/09/23 03:44:04
@@ -22,6 +22,11 @@
Reference Manual.
Changes to the Mercury standard library:
+* The constructor for lists is now called '[|]' rather than '.'.
+ `./2' will eventually become the module qualification operator.
+ This change only affects programs which use `./2' explicitly.
+ Programs which only use the `[H | T]' syntax will be unaffected.
+
* The predicates and functions in int.m, float, math.m and array.m now
generate exceptions rather than program aborts on domain errors and
out-of-bounds array accesses.
Index: browser/interactive_query.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/interactive_query.m,v
retrieving revision 1.10
diff -u -u -r1.10 interactive_query.m
--- browser/interactive_query.m 2001/02/13 12:27:40 1.10
+++ browser/interactive_query.m 2001/09/23 09:33:53
@@ -158,7 +158,7 @@
:- pred term_to_list(term, list(string)).
:- mode term_to_list(in, out) is semidet.
term_to_list(term__functor(term__atom("[]"), [], _), []).
-term_to_list(term__functor(term__atom("."),
+term_to_list(term__functor(term__atom("[|]"),
[term__functor(term__atom(Module), [], _C1), Rest], _C2),
[Module | Modules]) :-
term_to_list(Rest, Modules).
Index: compiler/llds_out.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/llds_out.m,v
retrieving revision 1.179
diff -u -u -r1.179 llds_out.m
--- compiler/llds_out.m 2001/08/17 05:15:21 1.179
+++ compiler/llds_out.m 2001/09/23 03:42:02
@@ -4346,6 +4346,8 @@
llds_out__name_conversion_table(";", "f_semicolon").
llds_out__name_conversion_table("!", "f_cut").
llds_out__name_conversion_table("{}", "f_tuple").
+llds_out__name_conversion_table("[|]", "f_cons").
+llds_out__name_conversion_table("[]", "f_nil").
% This is the fall-back method.
% Given a string, produce a C identifier
Index: compiler/mercury_to_mercury.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mercury_to_mercury.m,v
retrieving revision 1.192
diff -u -u -r1.192 mercury_to_mercury.m
--- compiler/mercury_to_mercury.m 2001/08/29 18:11:51 1.192
+++ compiler/mercury_to_mercury.m 2001/09/23 09:34:45
@@ -2953,7 +2953,7 @@
mercury_format_remaining_terms(Xs, VarSet, AppendVarnums),
add_string(")")
;
- { Functor = term__atom(".") },
+ { Functor = term__atom("[|]") },
{ Args = [X, Xs] }
->
add_string("["),
@@ -3036,7 +3036,7 @@
mercury_format_list_args(Term, VarSet, AppendVarnums) -->
(
- { Term = term__functor(term__atom("."), Args, _) },
+ { Term = term__functor(term__atom("[|]"), Args, _) },
{ Args = [X, Xs] }
->
add_string(", "),
Index: compiler/prog_io_dcg.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/prog_io_dcg.m,v
retrieving revision 1.17
diff -u -u -r1.17 prog_io_dcg.m
--- compiler/prog_io_dcg.m 2001/06/27 05:04:25 1.17
+++ compiler/prog_io_dcg.m 2001/09/23 09:39:13
@@ -164,10 +164,10 @@
% Non-empty list of terminals. Append the DCG output arg
% as the new tail of the list, and unify the result with
% the DCG input arg.
-parse_dcg_goal_2(".", [X, Xs], Context, VarSet0, N0, Var0,
+parse_dcg_goal_2("[|]", [X, Xs], Context, VarSet0, N0, Var0,
Goal, VarSet, N, Var) :-
new_dcg_var(VarSet0, N0, VarSet, N, Var),
- ConsTerm0 = term__functor(term__atom("."), [X, Xs], Context),
+ ConsTerm0 = term__functor(term__atom("[|]"), [X, Xs], Context),
term__coerce(ConsTerm0, ConsTerm),
term_list_append_term(ConsTerm, term__variable(Var), Term),
Goal = unify(term__variable(Var0), Term, pure) - Context.
@@ -450,8 +450,10 @@
( List0 = term__functor(term__atom("[]"), [], _Context) ->
List = Term
;
- List0 = term__functor(term__atom("."), [Head, Tail0], Context2),
- List = term__functor(term__atom("."), [Head, Tail], Context2),
+ List0 = term__functor(term__atom("[|]"),
+ [Head, Tail0], Context2),
+ List = term__functor(term__atom("[|]"),
+ [Head, Tail], Context2),
term_list_append_term(Tail0, Term, Tail)
).
Index: compiler/prog_io_goal.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/prog_io_goal.m,v
retrieving revision 1.19
diff -u -u -r1.19 prog_io_goal.m
--- compiler/prog_io_goal.m 2000/04/22 07:12:00 1.19
+++ compiler/prog_io_goal.m 2001/09/23 09:35:42
@@ -283,7 +283,7 @@
:- mode parse_lambda_args(in, out, out) is semidet.
parse_lambda_args(Term, Args, Modes) :-
- ( Term = term__functor(term__atom("."), [Head, Tail], _Context) ->
+ ( Term = term__functor(term__atom("[|]"), [Head, Tail], _Context) ->
parse_lambda_arg(Head, Arg, Mode),
Args = [Arg | Args1],
Modes = [Mode | Modes1],
Index: compiler/prog_io_pragma.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/prog_io_pragma.m,v
retrieving revision 1.33
diff -u -u -r1.33 prog_io_pragma.m
--- compiler/prog_io_pragma.m 2001/07/18 10:20:58 1.33
+++ compiler/prog_io_pragma.m 2001/09/23 09:36:36
@@ -1239,7 +1239,7 @@
Term = term__functor(term__atom("[]"), [], _),
Flags = []
;
- Term = term__functor(term__atom("."), [Hd, Tl], _),
+ Term = term__functor(term__atom("[|]"), [Hd, Tl], _),
Flags = [Flag|Flags0],
parse_single_pragma_foreign_proc_attribute(Hd, Flag),
parse_pragma_foreign_proc_attributes_term0(Tl, Flags0)
@@ -1506,24 +1506,15 @@
:- pred convert_bool_list(term::in, list(bool)::out) is semidet.
-convert_bool_list(term__functor(Functor, Args, _), Bools) :-
- (
- Functor = term__atom("."),
- Args = [term__functor(AtomTerm, [], _), RestTerm],
- (
- AtomTerm = term__atom("yes"),
- Bool = yes
- ;
- AtomTerm = term__atom("no"),
- Bool = no
+convert_bool_list(ListTerm, Bools) :-
+ convert_list(ListTerm,
+ (pred(Term::in, Bool::out) is semidet :-
+ Term = term__functor(term__atom(Name), [], _),
+ ( Name = "yes", Bool = yes
+ ; Name = "no", Bool = no
+ )
),
- convert_bool_list(RestTerm, RestList),
- Bools = [ Bool | RestList ]
- ;
- Functor = term__atom("[]"),
- Args = [],
- Bools = []
- ).
+ ok(Bools)).
:- pred convert_int_list(term::in, maybe1(list(int))::out) is det.
@@ -1546,7 +1537,7 @@
convert_list(term__variable(V),_, error("variable in list", term__variable(V))).
convert_list(term__functor(Functor, Args, Context), Pred, Result) :-
(
- Functor = term__atom("."),
+ Functor = term__atom("[|]"),
Args = [Term, RestTerm],
call(Pred, Term, Element)
->
Index: compiler/prog_io_typeclass.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/prog_io_typeclass.m,v
retrieving revision 1.20
diff -u -u -r1.20 prog_io_typeclass.m
--- compiler/prog_io_typeclass.m 2001/06/27 05:04:26 1.20
+++ compiler/prog_io_typeclass.m 2001/09/23 09:36:51
@@ -204,7 +204,7 @@
list_term_to_term_list(Methods, MethodList) :-
(
- Methods = term__functor(term__atom("."), [Head, Tail0], _),
+ Methods = term__functor(term__atom("[|]"), [Head, Tail0], _),
list_term_to_term_list(Tail0, Tail),
MethodList = [Head|Tail]
;
Index: compiler/prog_io_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/prog_io_util.m,v
retrieving revision 1.20
diff -u -u -r1.20 prog_io_util.m
--- compiler/prog_io_util.m 2001/06/27 05:04:26 1.20
+++ compiler/prog_io_util.m 2001/09/22 02:41:09
@@ -233,7 +233,8 @@
).
parse_list_of_vars(term__functor(term__atom("[]"), [], _), []).
-parse_list_of_vars(term__functor(term__atom("."), [Head, Tail], _), [V|Vs]) :-
+parse_list_of_vars(term__functor(term__atom("[|]"),
+ [Head, Tail], _), [V|Vs]) :-
Head = term__variable(V),
parse_list_of_vars(Tail, Vs).
Index: doc/reference_manual.texi
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/reference_manual.texi,v
retrieving revision 1.215
diff -u -u -r1.215 reference_manual.texi
--- doc/reference_manual.texi 2001/08/17 03:52:35 1.215
+++ doc/reference_manual.texi 2001/09/23 10:14:09
@@ -316,25 +316,49 @@
introduction of infix operators by the use of grave accents (backquotes),
as described below,
and we support an extended set of builtin operators. @xref{Builtin Operators}.
-However, the meaning of some terms in Mercury is different to that
-in Prolog. @xref{Data-terms}.
+Also, the constructor for list terms in Mercury is @code{[|]/2}, not
+ at code{./2} as in Prolog. The meaning of some terms in Mercury is
+different to that in Prolog. @xref{Data-terms}.
A term is either a variable or a functor.
A functor is an integer, a float, a string, a name, a compound term,
or a higher-order term.
-A compound term is a simple compound term, a tuple term, an operator term,
-or a parenthesized term.
+A compound term is a simple compound term, a list term, a tuple term,
+an operator term, or a parenthesized term.
A simple compound term is a name followed without any intervening
whitespace by an open parenthesis (i.e. an open_ct token),
a sequence of argument terms separated by commas, and a close
parenthesis.
+A list term is an open square bracket (i.e. an open_list token)
+followed by a sequence of argument terms separated by commas,
+optionally followed by a vertical bar (i.e. a close_list token)
+followed by a term, followed by a close square bracket (i.e. a
+close_list token). An empty list term is an open_list token
+followed by a close_list token. List terms are parsed as follows:
+ at example
+parse('[' ']') = [].
+parse('[' List) = parse_list(List).
+parse_list(Head ',' Tail) = '[|]'(parse_term(Head), parse_list(Tail)).
+parse_list(Head '|' Tail ']') = '[|]'(parse_term(Head), parse_term(Tail)).
+parse_list(Head ']') = '[|]'(parse_term(Head), []).
+ at end example
+
+The following terms are all equivalent:
+ at example
+[1, 2, 3]
+[1, 2 | [3]]
+[1 | [2, 3]]
+'[|]'(1, '[|]'(2, '[|]'(3, [])))
+ at end example
+
A tuple term is a left curly bracket (i.e. an open_curly token)
followed by a sequence of argument terms separated by commas,
-and a right curly bracket.
+and a right curly bracket. For example, @code{@{1, '2', "three"@}}
+is a valid tuple term.
An operator term is a term specified using operator notation, as in Prolog.
Operators can also be formed by enclosing a variable or name between grave
Index: extras/moose/grammar.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/moose/grammar.m,v
retrieving revision 1.3
diff -u -u -r1.3 grammar.m
--- extras/moose/grammar.m 2000/10/10 12:17:40 1.3
+++ extras/moose/grammar.m 2001/09/22 03:12:53
@@ -189,7 +189,7 @@
Goals, action(Goal), Prod)
; Atom = atom("[]"), Args = [] ->
Prod = []
- ; Atom = atom("."), Args = [Head, Tail] ->
+ ; Atom = atom("[|]"), Args = [Head, Tail] ->
terminals(Tail, terminal(Head), Prod)
;
Prod = nonterminal(functor(Atom, Args, Ctxt))
@@ -201,7 +201,7 @@
terminals(functor(Atom, Args, _), Prod0, Prod) :-
( Atom = atom("[]"), Args = [] ->
Prod = Prod0
- ; Atom = atom("."), Args = [Head, Tail] ->
+ ; Atom = atom("[|]"), Args = [Head, Tail] ->
terminals(Tail, (Prod0, terminal(Head)), Prod)
;
fail
Index: extras/moose/moose.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/moose/moose.m,v
retrieving revision 1.1
diff -u -u -r1.1 moose.m
--- extras/moose/moose.m 2000/05/22 05:22:05 1.1
+++ extras/moose/moose.m 2001/09/22 03:16:32
@@ -801,8 +801,8 @@
{ append(Actions, [Red], AllActions0) },
{ reverse(AllActions0, AllActions) },
{ ConsStack = functor(atom(","), [
- functor(atom("="), [Sy, functor(atom("."), [ResS, Sy1],
- Ctxt)], Ctxt),
+ functor(atom("="), [Sy, functor(atom("[|]"),
+ [ResS, Sy1], Ctxt)], Ctxt),
functor(atom("="), [St, St1], Ctxt)], Ctxt) },
{ mkactions(AllActions, ConsStack, Then0) },
(
@@ -851,8 +851,8 @@
E0 = nonterminal(EN),
E = functor(atom("n"), [EN], Ctxt)
),
- Sy1 = functor(atom("."), [E, Sy0], Ctxt),
- St1 = functor(atom("."), [variable(U), St0], Ctxt),
+ Sy1 = functor(atom("[|]"), [E, Sy0], Ctxt),
+ St1 = functor(atom("[|]"), [variable(U), St0], Ctxt),
mkstacks(Es, St1, St, Sy1, Sy, VS1, VS).
:- pred mkactions(list(term), term, term).
Index: extras/morphine/source/generate_call_site_cov.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/morphine/source/generate_call_site_cov.m,v
retrieving revision 1.1
diff -u -u -r1.1 generate_call_site_cov.m
--- extras/morphine/source/generate_call_site_cov.m 2001/08/29 12:17:19 1.1
+++ extras/morphine/source/generate_call_site_cov.m 2001/09/22 03:51:31
@@ -199,7 +199,7 @@
:- pred ignore_call(string::in) is semidet.
-ignore_call("."). % Corresponds to the var list of `all' and `some'
+ignore_call("[|]"). % Corresponds to the var list of `all' and `some'
% quantifiers.
ignore_call("[]"). % Null DCG goal.
Index: extras/xml/xml.encoding.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/xml/xml.encoding.m,v
retrieving revision 1.1
diff -u -u -r1.1 xml.encoding.m
--- extras/xml/xml.encoding.m 2000/09/05 22:33:59 1.1
+++ extras/xml/xml.encoding.m 2001/09/22 07:39:03
@@ -214,10 +214,10 @@
),
unicodesToUTF8(Us).
-:- func unicode.entity = entity.
-:- mode (out.out = in) is semidet.
+:- func [unicode | entity] = entity.
+:- mode [out | out] = in is semidet.
-U.E = E0 :-
+[U | E] = E0 :-
E0^curr < E0^leng,
string__unsafe_index(E0^text, E0^curr, C),
char__to_int(C, U),
Index: library/io.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/io.m,v
retrieving revision 1.231
diff -u -u -r1.231 io.m
--- library/io.m 2001/09/12 10:34:45 1.231
+++ library/io.m 2001/09/22 02:21:28
@@ -2188,7 +2188,7 @@
{ deconstruct(Term, Functor, _Arity, Args) },
io__get_op_table(OpTable),
(
- { Functor = "." },
+ { Functor = "[|]" },
{ Args = [ListHead, ListTail] }
->
io__write_char('['),
@@ -2318,7 +2318,7 @@
io__write_list_tail(Univ) -->
{ Term = univ_value(Univ) },
(
- { deconstruct(Term, ".", _Arity, [ListHead, ListTail]) }
+ { deconstruct(Term, "[|]", _Arity, [ListHead, ListTail]) }
->
io__write_string(", "),
io__write_arg(ListHead),
Index: library/parser.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/parser.m,v
retrieving revision 1.36
diff -u -u -r1.36 parser.m
--- library/parser.m 2000/09/18 11:52:18 1.36
+++ library/parser.m 2001/09/22 02:23:14
@@ -622,8 +622,8 @@
( { Token = comma } ->
parser__parse_list(Tail0),
( { Tail0 = ok(Tail) } ->
- { List = ok(term__functor(term__atom("."), [Arg, Tail],
- TermContext)) }
+ { List = ok(term__functor(term__atom("[|]"),
+ [Arg, Tail], TermContext)) }
;
% propagate error
{ List = Tail0 }
@@ -632,7 +632,7 @@
parser__parse_arg(Tail0),
( { Tail0 = ok(Tail) } ->
( parser__get_token(close_list) ->
- { List = ok(term__functor(term__atom("."),
+ { List = ok(term__functor(term__atom("[|]"),
[Arg, Tail], TermContext)) }
;
parser__unexpected("expecting ']' or operator",
@@ -644,7 +644,7 @@
)
; { Token = close_list } ->
{ Tail = term__functor(term__atom("[]"), [], TermContext) },
- { List = ok(term__functor(term__atom("."), [Arg, Tail],
+ { List = ok(term__functor(term__atom("[|]"), [Arg, Tail],
TermContext)) }
;
parser__unexpected_tok(Token, Context,
Index: library/sparse_bitset.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/sparse_bitset.m,v
retrieving revision 1.10
diff -u -u -r1.10 sparse_bitset.m
--- library/sparse_bitset.m 2001/08/14 10:18:47 1.10
+++ library/sparse_bitset.m 2001/09/22 05:28:41
@@ -625,7 +625,7 @@
%-----------------------------------------------------------------------------%
-:- func rest(bitset_impl::in(bound('.'(ground, ground)))) =
+:- func rest(bitset_impl::in(bound([ground | ground]))) =
(bitset_impl::out) is det.
rest([_ | Rest]) = Rest.
Index: library/term_io.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/term_io.m,v
retrieving revision 1.60
diff -u -u -r1.60 term_io.m
--- library/term_io.m 2001/08/10 08:29:37 1.60
+++ library/term_io.m 2001/09/22 02:23:10
@@ -230,7 +230,7 @@
VarSet0, N0, VarSet, N) -->
io__get_op_table(OpTable),
(
- { Functor = term__atom(".") },
+ { Functor = term__atom("[|]") },
{ Args = [ListHead, ListTail] }
->
io__write_char('['),
@@ -391,7 +391,8 @@
->
term_io__write_list_tail(Val, VarSet0, N0, VarSet, N)
;
- { Term = term__functor(term__atom("."), [ListHead, ListTail], _) }
+ { Term = term__functor(term__atom("[|]"),
+ [ListHead, ListTail], _) }
->
io__write_string(", "),
term_io__write_arg_term(ListHead, VarSet0, N0, VarSet1, N1),
Index: profiler/demangle.m
===================================================================
RCS file: /home/mercury1/repository/mercury/profiler/demangle.m,v
retrieving revision 1.14
diff -u -u -r1.14 demangle.m
--- profiler/demangle.m 2001/07/06 14:14:10 1.14
+++ profiler/demangle.m 2001/09/23 03:41:49
@@ -551,6 +551,10 @@
insert_prefix("!")
; remove_prefix("f_tuple") ->
insert_prefix("{}")
+ ; remove_prefix("f_cons") ->
+ insert_prefix("[|]")
+ ; remove_prefix("f_nil") ->
+ insert_prefix("[]")
; remove_prefix("f_") ->
fix_mangled_ascii_chars
;
Index: samples/muz/higher_order.m
===================================================================
RCS file: /home/mercury1/repository/mercury/samples/muz/higher_order.m,v
retrieving revision 1.2
diff -u -u -r1.2 higher_order.m
--- samples/muz/higher_order.m 1999/10/14 22:54:17 1.2
+++ samples/muz/higher_order.m 2001/09/22 03:38:10
@@ -45,7 +45,7 @@
% const(S) = term__functor(term__atom(S), [], C) :- term__context_init(C).
%
% term_from_list(_, []) = const("[]").
-% term_from_list(P, [H|L]) = univ(".", [apply(P, H), term_from_list(P, L)]).
+% term_from_list(P, [H|L]) = univ("[|]", [apply(P, H), term_from_list(P, L)]).
%
% term_from_string(S) = term__functor(term__string(S), [], C) :-
% term__context_init(C).
Index: tests/debugger/breakpoints.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/breakpoints.exp,v
retrieving revision 1.5
diff -u -u -r1.5 breakpoints.exp
--- tests/debugger/breakpoints.exp 2001/08/07 02:16:05 1.5
+++ tests/debugger/breakpoints.exp 2001/09/23 06:45:33
@@ -55,7 +55,7 @@
mdb> continue
7: 5 3 CALL pred breakpoints:qperm/2-0 (nondet) breakpoints.m:50 (breakpoints.m:47)
mdb> continue
- 8: 5 3 SWTC pred breakpoints:qperm/2-0 (nondet) s1; breakpoints.m:51
+ 8: 5 3 SWTC pred breakpoints:qperm/2-0 (nondet) s2; breakpoints.m:51
mdb> finish -N
12: 7 4 CALL pred breakpoints:qperm/2-0 (nondet) breakpoints.m:50 (breakpoints.m:54)
mdb> finish -n
Index: tests/debugger/browse_pretty.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/browse_pretty.exp,v
retrieving revision 1.5
diff -u -u -r1.5 browse_pretty.exp
--- tests/debugger/browse_pretty.exp 2001/04/28 15:13:51 1.5
+++ tests/debugger/browse_pretty.exp 2001/09/23 06:45:34
@@ -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 *
- HeadVar__1 big(big(big(small, ./2, small), .(1, ./2), small), .(1, .(2, ./2)), big(big(small, ./2, big/3), ./2, small))
+ HeadVar__1 big(big(big(small, [|]/2, small), [|](1, [|]/2), small), [|](1, [|](2, [|]/2)), big(big(small, [|]/2, big/3), [|]/2, small))
mdb> browse 1
browser> set format raw_pretty
browser> set depth 10
@@ -87,35 +87,35 @@
browser> set width 40
browser> ls
big(
- big(big/3, .(1, ./2), small),
- .(1, .(2, .(3, []))),
- big(big/3, .(1, ./2), small))
+ big(big/3, [|]/2, small),
+ [|](1, [|](2, [|](3, []))),
+ big(big/3, [|]/2, small))
browser> set width 80
browser> ls
big(
- big(big(small, .(1, []), small), .(1, .(2, [])), small),
- .(1, .(2, .(3, []))),
- big(big(small, .(1, ./2), big/3), .(1, .(2, .(3, .(4, ./2)))), small))
+ big(big(small, [|](1, []), small), [|](1, [|](2, [])), small),
+ [|](1, [|](2, [|](3, []))),
+ big(big(small, [|]/2, big/3), [|](1, [|](2, [|](3, [|]/2))), small))
browser> set lines 12
browser> set width 40
browser> ls
big(
big(
- big(small, .(1, []), small),
- .(1, .(2, [])),
+ big(small, [|](1, []), small),
+ [|](1, [|](2, [])),
small),
- .(1, .(2, .(3, []))),
+ [|](1, [|](2, [|](3, []))),
big(
- big(small, .(1, ./2), big/3),
- .(1, .(2, .(3, .(4, .(5, ./2))))),
+ big(small, [|]/2, big/3),
+ [|](1, [|](2, [|](3, [|]/2))),
small))
browser> cd 3
browser> set lines 4
browser> set width 30
browser> ls
big(
- big(small, ./2, big/3),
- .(1, .(2, .(3, ./2))),
+ big(small, [|]/2, big/3),
+ [|](1, [|](2, [|]/2)),
small)
browser> quit
mdb> continue
Index: tests/debugger/exception_value.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/exception_value.exp,v
retrieving revision 1.4
diff -u -u -r1.4 exception_value.exp
--- tests/debugger/exception_value.exp 2001/01/13 02:30:26 1.4
+++ tests/debugger/exception_value.exp 2001/09/23 06:45:39
@@ -26,11 +26,11 @@
browser> ls
-
1-"q oops"
-2-.
+2-[|]
1-1
- 2-.
+ 2-[|]
1-2
- 2-.
+ 2-[|]
1-3
2-[]
Index: tests/debugger/exception_value.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/exception_value.exp2,v
retrieving revision 1.4
diff -u -u -r1.4 exception_value.exp2
--- tests/debugger/exception_value.exp2 2001/01/15 00:41:05 1.4
+++ tests/debugger/exception_value.exp2 2001/09/23 07:25:38
@@ -23,11 +23,11 @@
browser> ls
-
1-"q oops"
-2-.
+2-[|]
1-1
- 2-.
+ 2-[|]
1-2
- 2-.
+ 2-[|]
1-3
2-[]
Index: tests/debugger/implied_instance.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/implied_instance.exp,v
retrieving revision 1.8
diff -u -u -r1.8 implied_instance.exp
--- tests/debugger/implied_instance.exp 2001/07/03 02:49:26 1.8
+++ tests/debugger/implied_instance.exp 2001/09/23 06:45:45
@@ -33,7 +33,7 @@
mdb> P
HeadVar__1 [42, 24, 1, 2, 3]
mdb> continue -a
- 11: 7 4 SWTC pred implied_instance:sum_int_list/2-0 (det) s1;
+ 11: 7 4 SWTC pred implied_instance:sum_int_list/2-0 (det) s2;
12: 8 5 CALL pred implied_instance:p/2-0 (det)
mdb> P
HeadVar__1 42
Index: tests/debugger/interpreter.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/interpreter.exp,v
retrieving revision 1.12
diff -u -u -r1.12 interpreter.exp
--- tests/debugger/interpreter.exp 1999/11/20 13:06:10 1.12
+++ tests/debugger/interpreter.exp 2001/09/23 06:45:48
@@ -14,23 +14,23 @@
2 HeadVar__2
3 HeadVar__4
mdb> print *
- HeadVar__1 term(varset(var_supply(0), empty, empty), functor(atom(":-"), .(functor/3, []), context("interpreter.m", 22)))
+ HeadVar__1 term(varset(var_supply(0), empty, empty), functor(atom(":-"), [|](functor/3, []), context("interpreter.m", 22)))
HeadVar__2 []
HeadVar__4 state('<<c_pointer>>')
mdb> goto 30
30: 16 12 CALL pred interpreter:database_assert_clause/4-0 (det)
mdb> print *
- HeadVar__1 .(clause(varset(var_supply/1, empty, empty), functor(atom/1, ./2, context/2), functor(atom/1, [], context/2)), .(clause(varset/3, functor/3, functor/3), .(clause/3, [])))
+ HeadVar__1 [|](clause(varset(var_supply/1, empty, empty), functor(atom/1, [|]/2, context/2), functor(atom/1, [], context/2)), [|](clause(varset/3, functor/3, functor/3), [|](clause/3, [])))
HeadVar__2 varset(var_supply(0), empty, empty)
- HeadVar__3 functor(atom(":-"), .(functor(atom/1, ./2, context/2), []), context("interpreter.m", 26))
+ HeadVar__3 functor(atom(":-"), [|](functor(atom/1, [|]/2, context/2), []), context("interpreter.m", 26))
mdb> finish -a
31: 16 12 ELSE pred interpreter:database_assert_clause/4-0 (det) e;
32: 16 12 EXIT pred interpreter:database_assert_clause/4-0 (det)
mdb> print *
- HeadVar__1 .(clause(varset(var_supply/1, empty, empty), functor(atom/1, ./2, context/2), functor(atom/1, [], context/2)), .(clause(varset/3, functor/3, functor/3), .(clause/3, [])))
+ HeadVar__1 [|](clause(varset(var_supply/1, empty, empty), functor(atom/1, [|]/2, context/2), functor(atom/1, [], context/2)), [|](clause(varset/3, functor/3, functor/3), [|](clause/3, [])))
HeadVar__2 varset(var_supply(0), empty, empty)
- HeadVar__3 functor(atom(":-"), .(functor(atom/1, ./2, context/2), []), context("interpreter.m", 26))
- HeadVar__4 .(clause(varset(var_supply/1, empty, empty), functor(atom/1, ./2, context/2), functor(atom/1, [], context/2)), .(clause(varset/3, functor/3, functor/3), .(clause/3, ./2)))
+ HeadVar__3 functor(atom(":-"), [|](functor(atom/1, [|]/2, context/2), []), context("interpreter.m", 26))
+ HeadVar__4 [|](clause(varset(var_supply/1, empty, empty), functor(atom/1, [|]/2, context/2), functor(atom/1, [], context/2)), [|](clause(varset/3, functor/3, functor/3), [|](clause/3, [|]/2)))
mdb>
33: 17 12 CALL pred interpreter:consult_until_eof/4-0 (det)
mdb> finish -n
Index: tests/debugger/interpreter.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/interpreter.exp2,v
retrieving revision 1.10
diff -u -u -r1.10 interpreter.exp2
--- tests/debugger/interpreter.exp2 1999/11/20 01:03:27 1.10
+++ tests/debugger/interpreter.exp2 2001/09/23 07:28:34
@@ -22,15 +22,15 @@
mdb> print *
HeadVar__1 []
HeadVar__2 varset(var_supply(0), empty, empty)
- HeadVar__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)), [])
+ HeadVar__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 *
HeadVar__1 []
HeadVar__2 varset(var_supply(0), empty, empty)
- HeadVar__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)), [])
+ HeadVar__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>
31: 16 6 CALL pred interpreter:consult_until_eof/4-0 (det)
mdb> finish -n
@@ -40,4 +40,4 @@
mdb>
1011: 11 4 EXIT pred interpreter:consult_until_eof/4-0 (det)
mdb> continue
-?-
\ No newline at end of file
+?-
Index: tests/debugger/queens.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/queens.exp,v
retrieving revision 1.19
diff -u -u -r1.19 queens.exp
--- tests/debugger/queens.exp 2000/12/18 05:16:54 1.19
+++ tests/debugger/queens.exp 2001/09/23 06:46:02
@@ -22,7 +22,7 @@
mdb> print *
HeadVar__1 [1, 2, 3, 4, 5]
mdb>
- 6: 4 3 SWTC pred queens:qperm/2-0 (nondet) s1; queens.m:46
+ 6: 4 3 SWTC pred queens:qperm/2-0 (nondet) s2; queens.m:46
mdb> print *
HeadVar__1 [1, 2, 3, 4, 5]
mdb>
@@ -85,7 +85,7 @@
HeadVar__1 [2, 3, 4, 5]
mdb>
11: 6 4 SWTC queens.m:46
- pred queens:qperm/2-0 (nondet) s1;
+ pred queens:qperm/2-0 (nondet) s2;
mdb> print *
HeadVar__1 [2, 3, 4, 5]
mdb>
@@ -110,7 +110,7 @@
pred queens:qperm/2-0 (nondet)
mdb> goto -a 20
16: 8 5 SWTC queens.m:46
- pred queens:qperm/2-0 (nondet) s1;
+ pred queens:qperm/2-0 (nondet) s2;
17: 9 6 CALL queens.m:51 (from queens.m:47)
pred queens:qdelete/3-0 (nondet)
18: 9 6 DISJ queens.m:51
@@ -125,16 +125,16 @@
5 pred queens:main/2-0 (cc_multi) (queens.m:15)
mdb> stack -d
0 20 10 6 pred queens:qperm/2-0 (nondet) (queens.m:45) (empty)
- 1 15 8 5 pred queens:qperm/2-0 (nondet) (queens.m:49) s1;c2;
- 2 10 6 4 pred queens:qperm/2-0 (nondet) (queens.m:49) s1;c2;
- 3 5 4 3 pred queens:qperm/2-0 (nondet) (queens.m:49) s1;c2;
+ 1 15 8 5 pred queens:qperm/2-0 (nondet) (queens.m:49) s2;c2;
+ 2 10 6 4 pred queens:qperm/2-0 (nondet) (queens.m:49) s2;c2;
+ 3 5 4 3 pred queens:qperm/2-0 (nondet) (queens.m:49) s2;c2;
4 4 3 2 pred queens:queen/2-0 (nondet) (queens.m:42) c2;
5 1 1 1 pred queens:main/2-0 (cc_multi) (queens.m:15) ?;c2;q!;
mdb> print *
HeadVar__1 [4, 5]
mdb>
21: 10 6 SWTC queens.m:46
- pred queens:qperm/2-0 (nondet) s1;
+ pred queens:qperm/2-0 (nondet) s2;
mdb> retry
20: 10 6 CALL queens.m:45 (from queens.m:49)
pred queens:qperm/2-0 (nondet)
@@ -142,7 +142,7 @@
HeadVar__1 [4, 5]
mdb> finish -a
21: 10 6 SWTC queens.m:46
- pred queens:qperm/2-0 (nondet) s1;
+ pred queens:qperm/2-0 (nondet) s2;
22: 11 7 CALL queens.m:51 (from queens.m:47)
pred queens:qdelete/3-0 (nondet)
23: 11 7 DISJ queens.m:51
@@ -152,7 +152,7 @@
25: 12 7 CALL queens.m:45 (from queens.m:49)
pred queens:qperm/2-0 (nondet)
26: 12 7 SWTC queens.m:46
- pred queens:qperm/2-0 (nondet) s1;
+ pred queens:qperm/2-0 (nondet) s2;
27: 13 8 CALL queens.m:51 (from queens.m:47)
pred queens:qdelete/3-0 (nondet)
28: 13 8 DISJ queens.m:51
@@ -162,7 +162,7 @@
30: 14 8 CALL queens.m:45 (from queens.m:49)
pred queens:qperm/2-0 (nondet)
31: 14 8 SWTC queens.m:45
- pred queens:qperm/2-0 (nondet) s2;
+ pred queens:qperm/2-0 (nondet) s1;
32: 14 8 EXIT queens.m:45 (from queens.m:49)
pred queens:qperm/2-0 (nondet)
33: 12 7 EXIT queens.m:45 (from queens.m:49)
@@ -184,13 +184,13 @@
38: 15 3 CALL queens.m:55 (from queens.m:43)
pred queens:safe/1-0 (semidet)
39: 15 3 SWTC queens.m:56
- pred queens:safe/1-0 (semidet) s1;
+ pred queens:safe/1-0 (semidet) s2;
40: 16 4 CALL queens.m:60 (from queens.m:57)
pred queens:nodiag/3-0 (semidet)
41: 16 4 SWTC queens.m:61
- pred queens:nodiag/3-0 (semidet) s1;
+ pred queens:nodiag/3-0 (semidet) s2;
42: 16 4 THEN queens.m:65
- pred queens:nodiag/3-0 (semidet) s1;c4;t;
+ pred queens:nodiag/3-0 (semidet) s2;c4;t;
43: 16 4 FAIL queens.m:60 (from queens.m:57)
pred queens:nodiag/3-0 (semidet)
44: 15 3 FAIL queens.m:55 (from queens.m:43)
Index: tests/debugger/queens.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/queens.exp2,v
retrieving revision 1.1
diff -u -u -r1.1 queens.exp2
--- tests/debugger/queens.exp2 2001/01/15 00:55:32 1.1
+++ tests/debugger/queens.exp2 2001/09/23 07:30:08
@@ -22,7 +22,7 @@
mdb> print *
HeadVar__1 [1, 2, 3, 4, 5]
mdb>
- 6: 4 3 SWTC pred queens:qperm/2-0 (nondet) s1; queens.m:46
+ 6: 4 3 SWTC pred queens:qperm/2-0 (nondet) s2; queens.m:46
mdb> print *
HeadVar__1 [1, 2, 3, 4, 5]
mdb>
@@ -85,7 +85,7 @@
HeadVar__1 [2, 3, 4, 5]
mdb>
11: 6 4 SWTC queens.m:46
- pred queens:qperm/2-0 (nondet) s1;
+ pred queens:qperm/2-0 (nondet) s2;
mdb> print *
HeadVar__1 [2, 3, 4, 5]
mdb>
@@ -110,7 +110,7 @@
pred queens:qperm/2-0 (nondet)
mdb> goto -a 20
16: 8 5 SWTC queens.m:46
- pred queens:qperm/2-0 (nondet) s1;
+ pred queens:qperm/2-0 (nondet) s2;
17: 9 6 CALL queens.m:51 (from queens.m:47)
pred queens:qdelete/3-0 (nondet)
18: 9 6 DISJ queens.m:51
@@ -125,16 +125,16 @@
5 pred queens:main/2-0 (cc_multi) (queens.m:15)
mdb> stack -d
0 20 10 6 pred queens:qperm/2-0 (nondet) (queens.m:45) (empty)
- 1 15 8 5 pred queens:qperm/2-0 (nondet) (queens.m:49) s1;c2;
- 2 10 6 4 pred queens:qperm/2-0 (nondet) (queens.m:49) s1;c2;
- 3 5 4 3 pred queens:qperm/2-0 (nondet) (queens.m:49) s1;c2;
+ 1 15 8 5 pred queens:qperm/2-0 (nondet) (queens.m:49) s2;c2;
+ 2 10 6 4 pred queens:qperm/2-0 (nondet) (queens.m:49) s2;c2;
+ 3 5 4 3 pred queens:qperm/2-0 (nondet) (queens.m:49) s2;c2;
4 4 3 2 pred queens:queen/2-0 (nondet) (queens.m:42) c2;
5 1 1 1 pred queens:main/2-0 (cc_multi) (queens.m:15) ?;c2;q!;
mdb> print *
HeadVar__1 [4, 5]
mdb>
21: 10 6 SWTC queens.m:46
- pred queens:qperm/2-0 (nondet) s1;
+ pred queens:qperm/2-0 (nondet) s2;
mdb> retry
20: 10 6 CALL queens.m:45 (from queens.m:49)
pred queens:qperm/2-0 (nondet)
@@ -142,7 +142,7 @@
HeadVar__1 [4, 5]
mdb> finish -a
21: 10 6 SWTC queens.m:46
- pred queens:qperm/2-0 (nondet) s1;
+ pred queens:qperm/2-0 (nondet) s2;
22: 11 7 CALL queens.m:51 (from queens.m:47)
pred queens:qdelete/3-0 (nondet)
23: 11 7 DISJ queens.m:51
@@ -152,7 +152,7 @@
25: 12 7 CALL queens.m:45 (from queens.m:49)
pred queens:qperm/2-0 (nondet)
26: 12 7 SWTC queens.m:46
- pred queens:qperm/2-0 (nondet) s1;
+ pred queens:qperm/2-0 (nondet) s2;
27: 13 8 CALL queens.m:51 (from queens.m:47)
pred queens:qdelete/3-0 (nondet)
28: 13 8 DISJ queens.m:51
@@ -162,7 +162,7 @@
30: 14 8 CALL queens.m:45 (from queens.m:49)
pred queens:qperm/2-0 (nondet)
31: 14 8 SWTC queens.m:45
- pred queens:qperm/2-0 (nondet) s2;
+ pred queens:qperm/2-0 (nondet) s1;
32: 14 8 EXIT queens.m:45 (from queens.m:49)
pred queens:qperm/2-0 (nondet)
33: 12 7 EXIT queens.m:45 (from queens.m:49)
@@ -184,13 +184,13 @@
38: 15 3 CALL queens.m:55 (from queens.m:43)
pred queens:safe/1-0 (semidet)
39: 15 3 SWTC queens.m:56
- pred queens:safe/1-0 (semidet) s1;
+ pred queens:safe/1-0 (semidet) s2;
40: 16 4 CALL queens.m:60 (from queens.m:57)
pred queens:nodiag/3-0 (semidet)
41: 16 4 SWTC queens.m:61
- pred queens:nodiag/3-0 (semidet) s1;
+ pred queens:nodiag/3-0 (semidet) s2;
42: 16 4 THEN queens.m:65
- pred queens:nodiag/3-0 (semidet) s1;c4;t;
+ pred queens:nodiag/3-0 (semidet) s2;c4;t;
43: 16 4 FAIL queens.m:60 (from queens.m:57)
pred queens:nodiag/3-0 (semidet)
44: 15 3 FAIL queens.m:55 (from queens.m:43)
Index: tests/debugger/declarative/app.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/app.exp,v
retrieving revision 1.10
diff -u -u -r1.10 app.exp
--- tests/debugger/declarative/app.exp 2000/10/01 03:13:42 1.10
+++ tests/debugger/declarative/app.exp 2001/09/23 07:34:37
@@ -15,7 +15,10 @@
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, 8], [4, 5, 6, 7, 8])
+pred app
+ [4, 5]
+ [6, 7, 8]
+ [4, 5, 6, 7, 8]
Valid? yes
No bug found.
16: 5 5 EXIT pred app:app/3-0 (det) app.m:26 (app.m:28)
@@ -29,7 +32,7 @@
pred app
[1, 2, 3, 4, 5]
[6, 7, 8]
- [1, 2, 3, 4, 5, 6, 7, 8]
+ [|](1, [|](2, [|](3, [|]/2)))
Valid? no
pred app
[2, 3, 4, 5]
@@ -59,54 +62,54 @@
67: 8 2 EXIT pred app:app/3-0 (det) app.m:26 (app.m:18)
mdb> dd
pred app
- .(1, .(2, .(3, ./2)))
+ [|](1, [|](2, [|](3, [|]/2)))
[6, 7, 8]
- .(1, .(2, .(3, ./2)))
+ [|](1, [|](2, [|](3, [|]/2)))
Valid? no
pred app
- .(2, .(3, .(4, ./2)))
+ [|](2, [|](3, [|](4, [|]/2)))
[6, 7, 8]
- .(2, .(3, .(4, ./2)))
+ [|](2, [|](3, [|](4, [|]/2)))
Valid? no
pred app
- .(3, .(4, .(5, ./2)))
+ [|](3, [|](4, [|](5, [|]/2)))
[6, 7, 8]
- .(3, .(4, .(5, ./2)))
+ [|](3, [|](4, [|](5, [|]/2)))
Valid? no
pred app
- .(4, .(5, .(6, ./2)))
+ [|](4, [|](5, [|](6, [|]/2)))
[6, 7, 8]
- .(4, .(5, .(6, ./2)))
+ [|](4, [|](5, [|](6, [|]/2)))
Valid? no
pred app
- .(5, .(6, .(7, ./2)))
+ [|](5, [|](6, [|](7, [|]/2)))
[6, 7, 8]
- .(5, .(6, .(7, ./2)))
+ [|](5, [|](6, [|](7, [|]/2)))
Valid? no
pred app
- .(6, .(7, .(8, ./2)))
+ [|](6, [|](7, [|](8, [|]/2)))
[6, 7, 8]
- .(6, .(7, .(8, ./2)))
+ [|](6, [|](7, [|](8, [|]/2)))
Valid? no
pred app
- [7, 8, 9, 0, 1, 2, 3, 4, 5]
+ [|](7, [|](8, [|](9, [|]/2)))
[6, 7, 8]
- .(7, .(8, .(9, ./2)))
+ [|](7, [|](8, [|](9, [|]/2)))
Valid? no
pred app
- [8, 9, 0, 1, 2, 3, 4, 5]
+ [|](8, [|](9, [|](0, [|]/2)))
[6, 7, 8]
- .(8, .(9, .(0, ./2)))
+ [|](8, [|](9, [|](0, [|]/2)))
Valid? no
pred app
[9, 0, 1, 2, 3, 4, 5]
[6, 7, 8]
- .(9, .(0, .(1, ./2)))
+ [|](9, [|](0, [|](1, [|]/2)))
Valid? no
pred app
[0, 1, 2, 3, 4, 5]
[6, 7, 8]
- [0, 1, 2, 3, 4, 5, 6, 7, 8]
+ [|](0, [|](1, [|](2, [|]/2)))
Valid? no
Found incorrect contour:
pred app
Index: tests/debugger/declarative/app.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/app.exp2,v
retrieving revision 1.10
diff -u -u -r1.10 app.exp2
--- tests/debugger/declarative/app.exp2 2000/10/01 03:13:42 1.10
+++ tests/debugger/declarative/app.exp2 2001/09/23 08:15:49
@@ -15,7 +15,10 @@
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, 8], [4, 5, 6, 7, 8])
+pred app
+ [4, 5]
+ [6, 7, 8]
+ [4, 5, 6, 7, 8]
Valid? yes
No bug found.
16: 5 5 EXIT pred app:app/3-0 (det) app.m:26 (app.m:28)
@@ -29,7 +32,7 @@
pred app
[1, 2, 3, 4, 5]
[6, 7, 8]
- [1, 2, 3, 4, 5, 6, 7, 8]
+ [|](1, [|](2, [|](3, [|]/2)))
Valid? no
pred app
[2, 3, 4, 5]
@@ -59,54 +62,54 @@
71: 10 2 EXIT pred app:app/3-0 (det) app.m:26 (app.m:18)
mdb> dd
pred app
- .(1, .(2, .(3, ./2)))
+ [|](1, [|](2, [|](3, [|]/2)))
[6, 7, 8]
- .(1, .(2, .(3, ./2)))
+ [|](1, [|](2, [|](3, [|]/2)))
Valid? no
pred app
- .(2, .(3, .(4, ./2)))
+ [|](2, [|](3, [|](4, [|]/2)))
[6, 7, 8]
- .(2, .(3, .(4, ./2)))
+ [|](2, [|](3, [|](4, [|]/2)))
Valid? no
pred app
- .(3, .(4, .(5, ./2)))
+ [|](3, [|](4, [|](5, [|]/2)))
[6, 7, 8]
- .(3, .(4, .(5, ./2)))
+ [|](3, [|](4, [|](5, [|]/2)))
Valid? no
pred app
- .(4, .(5, .(6, ./2)))
+ [|](4, [|](5, [|](6, [|]/2)))
[6, 7, 8]
- .(4, .(5, .(6, ./2)))
+ [|](4, [|](5, [|](6, [|]/2)))
Valid? no
pred app
- .(5, .(6, .(7, ./2)))
+ [|](5, [|](6, [|](7, [|]/2)))
[6, 7, 8]
- .(5, .(6, .(7, ./2)))
+ [|](5, [|](6, [|](7, [|]/2)))
Valid? no
pred app
- .(6, .(7, .(8, ./2)))
+ [|](6, [|](7, [|](8, [|]/2)))
[6, 7, 8]
- .(6, .(7, .(8, ./2)))
+ [|](6, [|](7, [|](8, [|]/2)))
Valid? no
pred app
- [7, 8, 9, 0, 1, 2, 3, 4, 5]
+ [|](7, [|](8, [|](9, [|]/2)))
[6, 7, 8]
- .(7, .(8, .(9, ./2)))
+ [|](7, [|](8, [|](9, [|]/2)))
Valid? no
pred app
- [8, 9, 0, 1, 2, 3, 4, 5]
+ [|](8, [|](9, [|](0, [|]/2)))
[6, 7, 8]
- .(8, .(9, .(0, ./2)))
+ [|](8, [|](9, [|](0, [|]/2)))
Valid? no
pred app
[9, 0, 1, 2, 3, 4, 5]
[6, 7, 8]
- .(9, .(0, .(1, ./2)))
+ [|](9, [|](0, [|](1, [|]/2)))
Valid? no
pred app
[0, 1, 2, 3, 4, 5]
[6, 7, 8]
- [0, 1, 2, 3, 4, 5, 6, 7, 8]
+ [|](0, [|](1, [|](2, [|]/2)))
Valid? no
Found incorrect contour:
pred app
Index: tests/debugger/declarative/app.m
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/app.m,v
retrieving revision 1.1
diff -u -u -r1.1 app.m
--- tests/debugger/declarative/app.m 1999/06/02 07:28:53 1.1
+++ tests/debugger/declarative/app.m 2001/09/23 07:33:33
@@ -24,5 +24,5 @@
:- mode app(in, in, out) is det.
app([], Bs, Bs).
-app(A.As, Bs, A.Cs) :-
+app([A|As], Bs, [A|Cs]) :-
app(As, Bs, Cs).
Index: tests/debugger/declarative/filter.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/filter.exp,v
retrieving revision 1.4
diff -u -u -r1.4 filter.exp
--- tests/debugger/declarative/filter.exp 2000/10/01 03:13:42 1.4
+++ tests/debugger/declarative/filter.exp 2001/09/23 07:34:48
@@ -30,7 +30,10 @@
Valid? no
s2([7, 8, 9])
Valid? yes
-my_append([1, 2], [7, 8, 9], [1, 2, 7, 8, 9])
+pred my_append
+ [1, 2]
+ [7, 8, 9]
+ [1, 2, 7, 8, 9]
Valid? yes
Found incorrect contour:
p([1, 2, 7, 8, 9])
@@ -45,7 +48,10 @@
Valid? no
s1([1, 2, 3])
Valid? yes
-my_append([1, 2, 3], [9], [1, 2, 3, 9])
+pred my_append
+ [1, 2, 3]
+ [9]
+ [1, 2, 3, 9]
Valid? yes
Found incorrect contour:
p([1, 2, 3, 9])
Index: tests/debugger/declarative/filter.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/filter.exp2,v
retrieving revision 1.4
diff -u -u -r1.4 filter.exp2
--- tests/debugger/declarative/filter.exp2 2000/10/01 03:13:42 1.4
+++ tests/debugger/declarative/filter.exp2 2001/09/23 08:17:47
@@ -30,7 +30,10 @@
Valid? no
s2([7, 8, 9])
Valid? yes
-my_append([1, 2], [7, 8, 9], [1, 2, 7, 8, 9])
+pred my_append
+ [1, 2]
+ [7, 8, 9]
+ [1, 2, 7, 8, 9]
Valid? yes
Found incorrect contour:
p([1, 2, 7, 8, 9])
@@ -45,7 +48,10 @@
Valid? no
s1([1, 2, 3])
Valid? yes
-my_append([1, 2, 3], [9], [1, 2, 3, 9])
+pred my_append
+ [1, 2, 3]
+ [9]
+ [1, 2, 3, 9]
Valid? yes
Found incorrect contour:
p([1, 2, 3, 9])
Index: tests/debugger/declarative/queens.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/queens.exp,v
retrieving revision 1.9
diff -u -u -r1.9 queens.exp
--- tests/debugger/declarative/queens.exp 2000/08/18 10:59:39 1.9
+++ tests/debugger/declarative/queens.exp 2001/09/23 08:19:27
@@ -17,9 +17,15 @@
Call qperm([1, 2, 3, 4, 5], _)
No solutions.
Complete? no
-qdelete(1, [1, 2, 3, 4, 5], [2, 3, 4, 5])
+pred qdelete
+ 1
+ [1, 2, 3, 4, 5]
+ [2, 3, 4, 5]
Valid? yes
-qdelete(2, [1, 2, 3, 4, 5], [1, 3, 4, 5])
+pred qdelete
+ 2
+ [1, 2, 3, 4, 5]
+ [1, 3, 4, 5]
Valid? yes
Call qperm([1, 3, 4, 5], _)
No solutions.
Index: tests/dppd/transpose_impl.m
===================================================================
RCS file: /home/mercury1/repository/tests/dppd/transpose_impl.m,v
retrieving revision 1.1
diff -u -u -r1.1 transpose_impl.m
--- tests/dppd/transpose_impl.m 1999/02/20 11:34:40 1.1
+++ tests/dppd/transpose_impl.m 2001/09/22 05:30:30
@@ -14,8 +14,8 @@
ground, ground]).
-:- inst '.'(A, B)
- ---> '.'(A, B).
+:- inst [A | B]
+ ---> [A | B].
:- inst []
---> [].
Index: tests/hard_coded/ground_dd.m
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/ground_dd.m,v
retrieving revision 1.1
diff -u -u -r1.1 ground_dd.m
--- tests/hard_coded/ground_dd.m 1998/01/22 07:12:30 1.1
+++ tests/hard_coded/ground_dd.m 2001/09/23 07:08:30
@@ -63,9 +63,9 @@
append_w([], Bs, Bs, node(Node, assumed)) :-
type_to_term(n_append([], Bs, Bs), Node).
-append_w(A.As, Bs, A.Cs, node(Node, Proof)) :-
+append_w([A|As], Bs, [A|Cs], node(Node, Proof)) :-
append_w(As, Bs, Cs, Proof),
- type_to_term(n_append(A.As, Bs, A.Cs), Node).
+ type_to_term(n_append([A|As], Bs, [A|Cs]), Node).
:- pred length_w(list(T), int, proof).
@@ -73,9 +73,9 @@
length_w([], 0, node(N, assumed)) :-
type_to_term(n_length([], 0), N).
-length_w(A.As, N+1, node(Node, Proof)) :-
+length_w([A|As], N+1, node(Node, Proof)) :-
length_w(As, N, Proof),
- type_to_term(n_length(A.As, N+1), Node).
+ type_to_term(n_length([A|As], N+1), Node).
:- pred isort_w(list(int), list(int), proof).
@@ -83,10 +83,10 @@
isort_w([], [], node(Node, assumed)) :-
type_to_term(n_isort([], []), Node).
-isort_w(A.As, Ss, node(Node, conj([Proof_1, Proof_2]))) :-
+isort_w([A|As], Ss, node(Node, conj([Proof_1, Proof_2]))) :-
isort_w(As, Ss0, Proof_1),
insert_w(A, Ss0, Ss, Proof_2),
- type_to_term(n_isort(A.As, Ss), Node).
+ type_to_term(n_isort([A|As], Ss), Node).
:- pred insert_w(int, list(int), list(int), proof).
@@ -94,16 +94,16 @@
insert_w(N, [], [N], node(Node, assumed)) :-
type_to_term(n_insert(N, [], [N]), Node).
-insert_w(N, A.As, Ss, node(Node, Proof)) :-
+insert_w(N, [A|As], Ss, node(Node, Proof)) :-
( N =< A ->
- Ss = N.A.As,
+ Ss = [N,A|As],
Proof = if_then(assumed, assumed)
;
insert_w(N, As, Ss0, Proof_1),
- Ss = A.Ss0,
+ Ss = [A|Ss0],
Proof = else(failed, Proof_1)
),
- type_to_term(n_insert(N, A.As, Ss), Node).
+ type_to_term(n_insert(N, [A|As], Ss), Node).
%------------------------------------------------------------
Index: tests/hard_coded/split_c_files.m
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/split_c_files.m,v
retrieving revision 1.1
diff -u -u -r1.1 split_c_files.m
--- tests/hard_coded/split_c_files.m 2000/03/21 04:54:39 1.1
+++ tests/hard_coded/split_c_files.m 2001/09/22 05:32:32
@@ -26,6 +26,6 @@
=(Z76,[]),
=(A77,Ys).
split_c_files:(app(Z76,A77,B77)) :-
- =(B77,'.'(X,Zs)),
+ =(B77,[X|Zs]),
split_c_files:(app(Xs,A77,Zs)),
- =(Z76,'.'(X,Xs)).
+ =(Z76,[X|Xs]).
Index: util/mdemangle.c
===================================================================
RCS file: /home/mercury1/repository/mercury/util/mdemangle.c,v
retrieving revision 1.41
diff -u -u -r1.41 mdemangle.c
--- util/mdemangle.c 2001/07/06 14:14:12 1.41
+++ util/mdemangle.c 2001/09/23 03:40:59
@@ -1026,7 +1026,9 @@
{ "f_comma", "," },
{ "f_semicolon", ";" },
{ "f_cut", "!" },
- { "f_tuple", "{}" }
+ { "f_tuple", "{}" },
+ { "f_cons", "[|]" },
+ { "f_nil", "[]" }
};
const int num_translations =
sizeof(translations) / sizeof(translations[0]);
Index: w3/tutorial/lists-n-things.m4
===================================================================
RCS file: /home/mercury1/repository/tutorial/lists-n-things.m4,v
retrieving revision 1.1
diff -u -u -r1.1 lists-n-things.m4
--- w3/tutorial/lists-n-things.m4 1999/03/05 14:46:17 1.1
+++ w3/tutorial/lists-n-things.m4 2001/09/23 11:13:46
@@ -165,5 +165,7 @@
useful for pattern matching. Nobody really uses the TT('.') notation,
although if you forget to import the LIB(list) library when you use
them then the compiler will complain about not knowing what TT('.')
-means. You have been warned.
+means. You have been warned. Note that in the lastest development
+version of the Mercury system, the constructor TT('.') has been
+renamed TT('[|]').
--------------------------------------------------------------------------
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