[m-rev.] new disabled test case tests/valid/field_detism.m

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Jan 7 01:18:28 AEDT 2004


On 06-Jan-2004, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> On 23-Dec-2003, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > In this particular case, the validity of the code depends on the details
> > of how mode inference (for the automatically generated field update
> > function) works,
> 
> Not really.

Well, it does currently.  Maybe that should change, but that's the
situation now.

> I think it should be straighforward to accompany the automatically
> generated field update function with one or two automatically generated mode
> declarations. If the type has one functor, then generate one mode, which is
> det. If the type has more than one functor, then generate two modes, one which
> has mode `in' and is semidet, and one which has mode `in(bound(functor(...)))'
> and is det. Since we have polymorphic modes, even higher order arguments
> shouldn't be a problem.

That is a reasonable proposal, I think.

It would take some time to flesh out the details, propose exact
changes to the language reference manual, implement them, and test
the change.  In the mean time, I will commit the following change.

Estimated hours taken: 1
Branches: main

tests/valid/field_detism.m:
tests/valid/Mmakefile:
	Update the documentation to make it clear that this test
	case is not currently valid.

Workspace: /home/jupiter/fjh/ws-jupiter/mercury
Index: tests/valid/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/valid/Mmakefile,v
retrieving revision 1.137
diff -u -d -r1.137 Mmakefile
--- tests/valid/Mmakefile	23 Dec 2003 03:33:27 -0000	1.137
+++ tests/valid/Mmakefile	6 Jan 2004 14:11:17 -0000
@@ -201,13 +201,16 @@
 # XXX The mode system can't handle the following test cases yet:
 #	assoc_list_bug
 #	determinism
-#	field_detism
 #	inst_perf_bug_2
 #	mode_merge_insts
 #	unify_inst_bug
 #
 # XXX We also don't pass this one (see the comments in it for details):
 #	mode_selection
+#
+# XXX The following test is not valid under the current Mercury
+# language rules:
+#	field_detism
 
 # The agc.* tests don't work in --high-level-code grades,
 # except hl*.agc*, because they require grade-specific header
Index: tests/valid/field_detism.m
===================================================================
RCS file: /home/mercury1/repository/tests/valid/field_detism.m,v
retrieving revision 1.1
diff -u -d -r1.1 field_detism.m
--- tests/valid/field_detism.m	23 Dec 2003 03:33:27 -0000	1.1
+++ tests/valid/field_detism.m	6 Jan 2004 14:09:35 -0000
@@ -1,3 +1,14 @@
+% According to the rules in the language reference manual,
+% this example is not currently valid.  But this behaviour
+% is a bit unexpected for the programmer, so it would be
+% nice if the language was changed so that it was valid.
+
+% See <http://www.cs.mu.oz.au/research/mercury/mailing-lists/mercury-reviews/
+% mercury-reviews.0312/0189.html> for more details.
+
+% XXX Perhaps this test should not go in tests/valid,
+%     since it is not yet valid under the current Mercury language rules.
+
 :- module field_detism.
 
 :- interface.
-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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