[m-rev.] for review: improve documentation of --fully-strict
Julien Fischer
juliensf at csse.unimelb.edu.au
Mon Sep 24 20:27:29 AEST 2007
On Mon, 24 Sep 2007, Ian MacLarty wrote:
> On Mon, Sep 24, 2007 at 04:52:27PM +1000, Julien Fischer wrote:
>>
>> On Mon, 24 Sep 2007, Ian MacLarty wrote:
>>
>>> On Mon, Sep 24, 2007 at 03:44:40PM +1000, Julien Fischer wrote:
>>>>
>>>> On Mon, 24 Sep 2007, Ian MacLarty wrote:
>>>>
>>>>> On Mon, Sep 24, 2007 at 03:02:06PM +1000, Julien Fischer wrote:
>>>>>>
>>>>>> On Fri, 21 Sep 2007, Ian MacLarty wrote:
>>>>>>
>>>>>>> Estimated hours taken: 0.1
>>>>>>> Branches: main
>>>>>>>
>>>>>>> compiler/options.m:
>>>>>>> doc/user_guide.texi:
>>>>>>> Document that --no-fully-strict also replaces det goals that produce
>>>>>>> no outputs with `true' and goals that always fail with `fail'.
>>>>>>
>>>>>> simplify.m only does such replacements when when the goal is not impure
>>>>>> however.
>>>>>>
>>>>>
>>>>> Okay, I'll mention that the goal should not be impure.
>>>>>
>>>>>>> Also change the documented option to --no-fully-strict instead
>>>>>>> of --fully-strict, because --fully-strict is the default.
>>>>>>> XXX Should it be the default?
>>>>>>
>>>>>> I think yes; it's the least surprising choice.
>>>>>>
>>>>>
>>>>> The reference manual says the following:
>>>>>
>>>>> The University of Melbourne Mercury implementation offers eight
>>>>> different semantics, which can be selected with different
>>>>> combinations of the @samp{--no-reorder-conj}, @samp{--no-reorder-disj},
>>>>> and @samp{--fully-strict} options. (The @samp{--fully-strict} option
>>>>> prevents the compiler from improving completeness by optimizing away
>>>>> infinite
>>>>> loops or calls to @code{require.error/1} or @code{exception.throw/1}.)
>>>>> The default semantics are the commutative semantics. Enabling all of
>>>>> these
>>>>> options gives you the strict sequential semantics. Enabling just some
>>>>> of them gives you a semantics somewhere in between.
>>>>>
>>>>> This seems to suggest that the default is supposed to be
>>>>> --no-fully-strict.
>>>>>
>>>>> Shall I change the reference manual too then?
>>>>
>>>> Yes; I think all you need to do is change the sense of the parenthesised
>>>> setence that begins "The @samp{--fully-string} option ..." to "... allows
>>>> the
>>>> compiler to improve completeness ...".
>>>>
>>>
>>> Wouldn't the default semantics now be the *strict* commutative semantics?
>>
>> Isn't that what they are anyway?
>>
>
> Well the reference manual currently says that the default semantics
> are the "commutative semantics", not the "strict commutative semantics".
I took that to mean the strict commutative semantics are the default semantics
since they were they ones being discussed a paragraph or so back. (Note
that the manual only gives names to two semantics, the strict sequential
and the strict commutative.)
In any case, the strict commutative semantics are what the implementation
gives you by default, e.g. the default is --reorder-conj,
--reorder-disj, and --fully-strict.
> As I understand it goals can't be deleted in the strict commutative
> semantics, but in other commutative semantics (such as the one given by
> --no-fully-strict) they can, as long as they are at least as complete as
> the strict commutative semantics.
>
> Have I got that right?
I'm not quite sure where you are going with this; do you now what to
leave that section of the reference manual alone?
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