[m-rev.] for review: term size profiling

Zoltan Somogyi zs at cs.mu.OZ.AU
Mon Oct 20 14:24:23 AEST 2003


On 09-Oct-2003, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
>>>> tests/valid/Mmakefile:
>>>> 	Disable Aditi tests in term profiling grades, since Aditi will never
>>>> 	support term size profiling.
>>> 
>>> This shouldn't be necessary.
>> 
>> What shouldn't be necessary?
> 
> Disabling the tests.
> 
>> Without those changes in the Makefile, those tests failed.
> 
> With what error?

I disabled the Aditi tests as one of my first actions when I went through all
the failing test cases. It turns out that fixing the compiler to pass some
of the other test cases also made it work on the Aditi test cases, so I
reenabled them in term size profiling grades.

> > > > +		make_type_info(Context, void_type, TypeInfoVar,
> > > > +			TypeInfoGoals, !Info),
> > > > +		TermSizeProfBuiltin = mercury_term_size_prof_builtin_module,
> > > > +		goal_util__generate_simple_call(TermSizeProfBuiltin,
> > > > +			"increment_size", predicate,
> > > > +			[TypeInfoVar, Var, SizeVar], only_mode, det,
> > > > +			yes(impure), [], !.Info ^ module_info,
> > > > +			Context, UpdateGoal),
> > > 
> > > You should cast TypeInfoVar to the correct type before passing it
> > > to increment_size.
> > 
> > I'll think about it.
> > 
> > > Alternatively, you could make increment_size a 
> > > no_type_info_builtin.
> > 
> > It isn't a builtin, and our mechanisms for handling builtins are currently
> > not flexible enough to make it a builtin.
> 
> no_type_info_builtin is poorly named.  For example,
> type_info_from_typeclass_info is a no_type_info_builtin, even
> though it is implemented in foreign code in private_builtin.m.

OK. I have made increment_size a no_type_info_builtin, and I have independently
committed a change that clarifies the documentation of no_type_info_builtin.

Do you have any more comments on the change as whole, Simon? Or can I commit
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