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

Julien Fischer juliensf at csse.unimelb.edu.au
Fri Nov 30 16:31:02 AEDT 2007


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 ;-)

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

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

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