[m-rev.] for review: I/O actions in the declarative debugger

Zoltan Somogyi zs at cs.mu.OZ.AU
Sun May 12 18:15:10 AEST 2002


On 12-May-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> The type `map(int, io_action)' occurs in a number of places.
> IMHO it would be nicer to abstract this out as an equivalence type:
> 
> 	:- type io_action_map == map(io_seq_num, io_action).
> 	:- type io_seq_num == int.

OK.

> BTW, shouldn't this be `map_cc' rather than `map'?

No. There are no terms with nonstandard equality theories inside an int :-)

> Also it might perhaps be nicer to use `counter' rather than `int'.

No. The I/O action numbers are allocated in C code, not in Mercury code; the
declarative debugger just needs to know which numbers denote which actions.

> The wording here "if ..., or if ..., and if ..." is confusing.
> Better to change it to "if ..., or if ... and ...", i.e.
> s/non-NULL, and if/non-NULL and/

OK.

> > +static MR_Word		MR_io_action_map_cache_map;
> 
> Storing Mercury values in C global variables is tricky to get right,
> especially in the presence of accurate GC, and so should be avoided
> where possible.

I'll look into it.

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