[m-dev.] for review: Aditi update round 2 [1]

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Jul 3 18:57:38 AEST 1999


On 02-Jul-1999, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
>  compiler/mercury_to_mercury.m:
>  	Add unary prefix operators `aditi_bottom_up' and `aditi_top_down',
>  	used as qualifiers on lambda expressions.
> +	Add infix operator `==>' to separate the tuples in an
> +	`aditi_modify' call.

There are a couple of other places that need to be modified
if you add a new operator.

In particular:

	library/ops.m
	doc/transition_guide.texi

Oh, I see you did actually modify ops.m, but I don't think you mentioned
it in the log message.

> --- hlds_goal.m	1999/06/27 01:01:42	1.8
> +++ hlds_goal.m	1999/07/02 02:28:46
> @@ -498,14 +511,12 @@
>  				% and does not need to be filled in.
>  	).
>  
> -	% Shared constant cells can be allocated in static data.
> -	% Others must be created on the heap.
> +	% Cells marked `cell_is_shared' can be allocated in read-only memory.
> +	% Cells marked `cell_is_unique' must be writeable.

I suggest

	% Cells marked `cell_is_shared' can be allocated in read-only memory,
	% and can be shared.
	% Cells marked `cell_is_unique' must be writeable, and therefore
	% cannot be shared.

> +check_base_relation(Context, PredInfo, Builtin, CallId) -->
> +	( { hlds_pred__pred_info_is_base_relation(PredInfo) } ->
> +		[]
> +	;
> +		io__set_exit_status(1),
> +		prog_out__write_context(Context),
> +		io__write_string("In call to "),
> +		hlds_out__write_call_id(
> +			generic_call(aditi_builtin(Builtin, CallId))
> +		),
> +		io__write_string(":\n"),

Since the aditi builtins are builtin goals, not predicates,
is "In call to" the right thing to say here?

> +		prog_out__write_context(Context),
> +		io__write_string("  the modified "),
> +		{ pred_info_get_is_pred_or_func(PredInfo, PredOrFunc) },
> +		hlds_out__write_pred_or_func(PredOrFunc),
> +		io__write_string(" is not a base relation.\n")
> +	).

The error message here should start with something that identifies
what kind of message it is, e.g. an error or a warning.

So I suggest

	s/the modified/error: the modified/

or perhaps 

	s/the modified/<something> error: the modified/

if you can think of a good name for the category of errors that this
belongs in.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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