[m-dev.] trivial diff: improve termination `generic_call' comment

Simon Taylor stayl at cs.mu.OZ.AU
Fri Jul 16 16:43:45 AEST 1999



Estimated hours taken: 0.1

compiler/term_traversal.m:
	Improve the comment for `generic_call' goals.


Index: term_traversal.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/term_traversal.m,v
retrieving revision 1.10
diff -u -u -r1.10 term_traversal.m
--- term_traversal.m	1999/07/13 08:53:34	1.10
+++ term_traversal.m	1999/07/16 06:25:08
@@ -193,13 +193,23 @@
 	goal_info_get_context(GoalInfo, Context),
 	error_if_intersect(OutVars, Context, pragma_c_code, Info0, Info).
 
-	% For now, we'll pretend that the class method call is a higher order
-	% call. In reality, we could probably analyse further than this, since
-	% we know that the method being called must come from one of the
-	% instance declarations, and we could potentially (globally) analyse
-	% these.
-traverse_goal_2(generic_call(_, _, _, _),
-		GoalInfo, Params, Info0, Info) :-
+traverse_goal_2(generic_call(_, _, _, _), GoalInfo, Params, Info0, Info) :-
+	%
+	% For class method calls, we could probably analyse further
+	% than this, since we know that the method being called must come
+	% from one of the instance declarations, and we could potentially
+	% (globally) analyse these.
+	%
+	% Aditi builtins are not guaranteed to terminate
+	% - all of them cause the transaction to abort if an error occurs
+	% (e.g. if the database server dies).
+	% - all except `aditi_insert' execute a user-specified goal
+	% which could possibly loop. Analysis of the termination of
+	% goals executed bottom-up is not yet implemented.
+	%
+	% The error message for `generic_call's other than higher-order calls
+	% could be better.
+	%
 	goal_info_get_context(GoalInfo, Context),
 	add_error(Context, horder_call, Params, Info0, Info).
 
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list