[m-rev.] for review: fix singleton variable warning problem
Peter Ross
pro at missioncriticalit.com
Sat Jun 1 18:57:16 AEST 2002
On Sat, Jun 01, 2002 at 01:35:31AM +1000, Simon Taylor wrote:
> On 31-May-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > On 31-May-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> > >
> > > This is still treating the symptom, not the cause. Why do variables
> > > in foreign_proc clauses need to be handled differently? Why doesn't
> > > this problem occur with Mercury clauses?
> >
> > The problem doesn't occur with Mercury clauses because after flattening
> > (conversion to SHF), the head variables in Mercury clauses are never
> > singletons; the head variables are always "HeadVar__N", which might
> > get unified with singleton variables in the body, but which are not
> > themselves singletons.
> >
> > For foreign_proc clauses, we don't use "HeadVar__N" as the head variables;
> > instead, we use the variables that the user specified directly.
> >
> > One possible solution, then, might be to change the way we handle
> > foreign_proc clauses, so that we do introduce "HeadVar__N" variables
> > and the corresponding unifications for those. I don't know if that
> > would be a good idea, or if it might result in other problems...
>
> Adding unifications could cause spurious unique mode errors due to
> the addition of aliasing that the current mode checker is incapable
> of tracking. Howver, it should be possible to specify the HeadVar__N
> variables as the arguments of the foreign code goal directly.
>
> The diff below has the same effect as Pete's change, but it also
> simplifies the code. This isn't well tested.
>
Do you want me to test it, or are you?
This change looks fine.
--------------------------------------------------------------------------
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