[m-dev.] for discussion: feature set pragma proposal

Paul Bone pbone at csse.unimelb.edu.au
Mon Nov 26 12:20:17 AEDT 2007


On 26/11/2007, at 11:56 AM, Julien Fischer wrote:

>
> On Sun, 25 Nov 2007, Paul Bone wrote:
>
>> On Fri, Nov 23, 2007 at 06:44:56PM +1100, Julien Fischer wrote:
>>>
>>> Hi,
>>>
>>> The following proposal (see diff below) is intended to catch  
>>> things like
>>> an absence of trailing in modules that require trailing earlier  
>>> than link
>>> time (where that particular problem is detected now.)
>>>
>>> I haven't bothered document what the features below mean yet,  
>>> although
>>> they should be fairly self explanatory.
>>>
>>> Comments?
>>>
>>> +Features that can be included in the list of features are:
>>> +
>>> + at table @asis
>>> +
>>> + at item @samp{concurrency}
>>> + at item @samp{single_prec_float}
>>> + at item @samp{double_prec_float},
>>> + at item @samp{memo}
>>> + at item @samp{parallelism}
>>> + at item @samp{trailing}
>>> + at end table
>>> +
>>
>> Sounds like a good idea.  How do you define the difference between
>> concurrency and parallelism?
>
> concurrency == supporting multiple execution streams at once, butnot
> necessarily executing them in parallel.
>
> parallelism == simultaneously executing parts of the program, be they
> threads or conjuncts.
>
> Actually, what I meant by parallelism in this context is that parallel
> conjunction is supported in a meaningful fashion (i.e. parallel  
> conjuncts are
> actually run in parallel, they don't just decompose into sequential
> conjunction.).  `parallel_conj' would be a better feature name.

That makes sense.

>> Can a program (easily) test an implementation to see if it  
>> supports some
>> features at say ./configure time?  One could write a mini program  
>> with
>> one of these pragmas in it and test that from their autoconf  
>> script.  Or
>> should we distribute a small binary or shell script so that  
>> somebody can
>> run "mercury_config --features" and examine the output?
>
> The more natural alternative to all those would be to write an  
> autoconf
> macro that does the same, something like:
>
> 	MMC_HAS_FEATURES([trailing, memo]).
>

Agreed.




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



More information about the developers mailing list