[m-rev.] accumulator.m doesn't respect --no-reorder-conj

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Dec 1 17:58:24 AEDT 2003


Estimated hours taken: 0.5.
Branches: main

compiler/accumulator.m:
	Add an XXX comment about this module not handling exceptions
	and non-termination correctly.

Workspace: /home/jupiter/fjh/ws-jupiter/mercury
Index: compiler/accumulator.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/accumulator.m,v
retrieving revision 1.24
diff -u -d -r1.24 accumulator.m
--- compiler/accumulator.m	31 Oct 2003 03:27:20 -0000	1.24
+++ compiler/accumulator.m	18 Nov 2003 16:53:42 -0000
@@ -28,7 +28,22 @@
 % 		(some[BC] (assoc(B, C, BC), assoc(A, BC, ABC)))
 % 	).	
 %
-% The algorithm implemented is a combintation of the algorithms from
+% XXX What about exceptions and non-termination?
+%     The promise declarations above only provide promises
+%     about the declarative semantics, but in order to
+%     apply this optimization, we ought to check that
+%     it will preserve the operational semantics
+%     (modulo whatever changes are allowed by the
+%     language semantics options).
+%     Currently we check and respect the --fully-strict option,
+%     but not the --no-reorder-conj option.
+%     XXX we should check --no-reorder-conj!
+%     If --no-reorder-conj was set, it would still be OK to
+%     apply this transformation, but ONLY in cases where
+%     the goals which get reordered are guaranteed not to
+%     throw any exceptions.
+%
+% The algorithm implemented is a combination of the algorithms from
 % "Making Mercury Programs Tail Recursive" and
 % "State Update Transformation", which can be found at
 % <http://www.cs.mu.oz.au/research/mercury/information/papers.html>.

-- 
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