[m-rev.] for review: feature set pragmas

Peter Wang novalazy at gmail.com
Fri Nov 30 16:44:42 AEDT 2007


On 2007-11-30, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
> 
>  On Fri, 30 Nov 2007, Peter Wang wrote:
> 
> > On 2007-11-30, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
> >>  For example,
> >>
> >>  	:- pragma require_feature_set([trailing, double_prec_float, memo]).
> >>
> >>  asserts that the module requires trailing, double precision floats and
> >>  memoisation.  The compiler will emit an error message if these features
> >>  are not available in the current compilation grade.  This is particularly
> >>  helpful in cases like memoisation and parallel conjunction that are 
> >> ignored
> >>  by default in grades that do not support them.
> >
> > It would be useful for parallel conjunction benchmarks, but otherwise I
> > can't think of a case where a program should *require* parallel 
> > conjunctions.
> 
>  It could just be a lack of imagination on your part ;-)

I can't imagine that being very likely.

>  BTW, is there a reason that parallel conjunction is not documented in
>  the reference manual?

It's still experimental?  For one thing, in some patterns of usage you
won't see any apparent parallel execution until you fiddle with
--max-contexts-per-thread in MERCURY_OPTIONS.  I'm very slowly getting a
work stealing implementation stable, which would fix that.  But I guess
it wouldn't hurt to document it a bit.

> > On a related note, maybe we need a pragma to document when a Mercury
> > program depends on a particular operational semantics, e.g. strict
> > sequential.
> 
>  That's probably too coarse grained given that it's usually only very
>  small fragments of code that have such dependencies on the operational
>  semantics.  We have discussed the addition of sequential
>  conjunction/disjunction operators to Mercury for use in G12.
>  I think they are probably a better solution for this.

Agreed.

Peter

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list