[m-rev.] New library module: table.m

Ralph Becket rafe at cs.mu.OZ.AU
Tue Jan 21 17:31:03 AEDT 2003


Peter Moulder, Tuesday, 21 January 2003:
> On Tue, Jan 21, 2003 at 03:03:26PM +1100, Ralph Becket wrote:
> 
> > +    % table([[X11, ..., X1N], ..., [XM1, ..., XMN]]) constructs a table
> > +    % of size M * N.
> 
> I suggest documenting what guarantee you make for bounds(table([]));

I've added the caveat

    % of size M * N, with the special case that bounds(table([]), 0, 0).

> > +    ( size(A) \= M * N =>
> > +        error("table.table/1: non-rectangular list of lists") ).
> 
> I believe this needs to be an if-then-else to be guaranteed safe for
> implementations of commutative operational semantics.  I'm not aware of
> any requirement that the `size(A) = M * N' disjunct be executed before
> the erroneous disjunct.

Rats, you're right.

Ta,
	Ralph
--------------------------------------------------------------------------
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