[m-rev.] diff: new test case (disabled)
Mark Brown
dougl at cs.mu.OZ.AU
Wed Oct 9 18:48:12 AEST 2002
Hi,
I found another occurrence in the declarative debugger of builtin
comparison of terms from the debuggee. Comparing debuggee terms has to
be avoided because if the terms happen to be higher order the current
implementation of the runtime will abort, which will kill the whole
debugging session. I have in mind a couple of solutions to this problem,
but I haven't yet decided which approach to take, so for the moment I'll
just commit the test case but leave it disabled.
Cheers,
Mark.
Estimated hours taken: 0.5
Branches: main
tests/debugger/declarative/Mmakefile:
tests/debugger/declarative/ho3.exp:
tests/debugger/declarative/ho3.inp:
tests/debugger/declarative/ho3.m:
A new test case which we don't pass, plus an XXX comment
detailing the problem.
Index: tests/debugger/declarative/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/Mmakefile,v
retrieving revision 1.43
diff -u -r1.43 Mmakefile
--- tests/debugger/declarative/Mmakefile 3 Oct 2002 07:34:37 -0000 1.43
+++ tests/debugger/declarative/Mmakefile 9 Oct 2002 08:17:48 -0000
@@ -51,7 +51,12 @@
catch \
untraced_subgoal
+# XXX 'ho3' test case fails, due to an attempt to compare higher order
+# terms. This happens because for missing answer questions the oracle
+# stores the outputs in a set, which relies on builtin comparison.
+#
NONWORKING_DECLARATIVE_PROGS= \
+ ho3
ifneq "$(findstring .debug,$(GRADE))" ""
PROGS_2=$(DECLARATIVE_PROGS)
@@ -159,6 +164,9 @@
ho2.out: ho2 ho2.inp
$(MDB) ./ho2 < ho2.inp > ho2.out 2>&1
+
+ho3.out: ho3 ho3.inp
+ $(MDB) ./ho3 < ho3.inp > ho3.out 2>&1
if_then_else.out: if_then_else if_then_else.inp
$(MDB) ./if_then_else < if_then_else.inp > if_then_else.out 2>&1
Index: tests/debugger/declarative/ho3.exp
===================================================================
RCS file: tests/debugger/declarative/ho3.exp
diff -N tests/debugger/declarative/ho3.exp
Index: tests/debugger/declarative/ho3.inp
===================================================================
RCS file: tests/debugger/declarative/ho3.inp
diff -N tests/debugger/declarative/ho3.inp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ tests/debugger/declarative/ho3.inp 9 Oct 2002 07:58:47 -0000
@@ -0,0 +1,7 @@
+echo on
+register --quiet
+break p
+continue
+finish
+dd
+no
Index: tests/debugger/declarative/ho3.m
===================================================================
RCS file: tests/debugger/declarative/ho3.m
diff -N tests/debugger/declarative/ho3.m
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ tests/debugger/declarative/ho3.m 9 Oct 2002 07:50:29 -0000
@@ -0,0 +1,47 @@
+:- module ho3.
+:- interface.
+:- import_module io.
+:- pred main(io__state::di, io__state::uo) is det.
+:- implementation.
+:- import_module list.
+
+main -->
+ {
+ p(1)
+ ->
+ S1 = ""
+ ;
+ S1 = "\\+ "
+ },
+ {
+ p(2)
+ ->
+ S2 = ""
+ ;
+ S2 = "\\+ "
+ },
+ io__write_strings([S1, "p(1).\n", S2, "p(2).\n"]).
+
+:- pred p(int).
+:- mode p(in) is semidet.
+
+p(N) :-
+ q(N, Q),
+ Q(0).
+
+:- pred q(int, pred(int)).
+:- mode q(in, out(pred(in) is semidet)) is multi.
+
+q(N, x(N)).
+q(N, y(N)).
+
+:- pred x(int, int).
+:- mode x(in, in) is semidet.
+
+x(A, A).
+
+:- pred y(int, int).
+:- mode y(in, in) is semidet.
+
+y(_, -1).
+
--------------------------------------------------------------------------
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