[m-rev.] diff: major improvements to tabling (part 1 of 2)

Zoltan Somogyi zs at cs.mu.OZ.AU
Tue Jul 20 15:33:42 AEST 2004


On 20-Jul-2004, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> > +%				impure table_loop_mark_as_inactive(T)
> > +%			;
> > +%				impure table_loop_mark_as_active_and_fail(T),
> >  %			fail
> >  %		)
> 
> This looks to me like that `fail' should be a close-parenthesis instead.

The actual indentation is fine. Diff -b doesn't show the fact that the fail,
which is redundant as you note, is indented one more level.

> > +%
> > +% p(A, B) :-
> > +%	table_mmos_save_inputs(1, A),		% into global variable
> > +%	CT0 = <table pointer for p/2>,
> > +%	impure table_lookup_insert_int(CT0, A, CT1),
> > +%	impure table_mmos_setup_consumer(CT1, 1, p2_gen, "p/2", Consumer),
> > +%	impure table_mmos_consume_next_answer_nondet(Consumer, AnswerBlock),
> > +%	impure table_restore_int_ans(AnswerBlock, 0, B).
> 
> I'd reverse the order here so that p/2 is shown before p2_gen/2.

I will when the code is done.

> > +		GeneratorPredVarName ++ ", " ++
> > +		"""" ++ PredName ++ """, " ++
> 
> It's a small thing, but I think `\"' is preferable to `""' for literal
> double-quotes (I've always found the latter hard to read.)

I feel the same way. However, it is better to conform to our existing standard.

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