[m-rev.] for review: add termination foreign proc attributes

Julien Fischer juliensf at students.cs.mu.OZ.AU
Thu Oct 9 16:23:47 AEST 2003


On Wed, 8 Oct 2003, Fergus Henderson wrote:

> On 08-Oct-2003, Julien Fischer <juliensf at students.cs.mu.OZ.AU> wrote:
> >
> > Change the how the termination analyser treats foreign procs in the
> > absence of any user-supplied information.  The old behaviour was to
> > treat all foreign procs as terminating; we now consider only those that
> > do not make any calls back to Mercury as terminating.  Foreign procs
> > that do make calls back to Mercury now considered to be non-terminating.
>
> What's the rationale for these changes?
>
> (I'm sure they are probably a good idea, but the log message
> should say something about the rationale.)
>

The rationale for the first change is that foreign code attributes
are less indiscriminate than pragma terminates/does_not_terminate.
If we have a predicate that has implementations in both Mercury
and one or more foreign languages then we should only be
telling the termination analyser about the termination property
of the implementations in foreign languages.  Hopefully, the termination
analyser can prove the termination of the Mercury implementation
automatically.

The rationale for the second change is to make the termination analyser
consistent with the behaviour described in the termination analysis paper.
Currently it reports all foreign_procs as terminating, regardless of
whether they call Mercury or not.  For foreign_procs that do call Mercury
this may not be true since the analyser doesn't know which Mercury
predicates are being called.
--------------------------------------------------------------------------
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