diff: Fix bug in modechecking of non-local lambda vars

Andrew Bromage bromage at cs.mu.OZ.AU
Mon Feb 9 13:49:47 AEDT 1998


G'day all.

Fergus Henderson wrote:

> > +		% XXX This test is too conservative.
> > +		%
> > +		%     We should allow non-local variables to be non-ground
> > +		%     if they are dead after this unification.  In addition,
> 
> Why only if they are dead after this unification?
> Why not always?

I suppose it depends what you consider to be a violation of variable
locking.  This requires some thought.

Is it a violation of variable locking to:

	- Bind a free variable and then backtrack, so the var was
	  never actually bound?

	- Do almost anything with an `any' variable?

	- Alias a free variable to an `aliased_many' state, which
	  requires some handle on indirections (e.g. the circular
	  list representation)?

Operationally, if a variable is locked by some goal, you shouldn't be
allowed to change that variable's low-level representation of a locked
var (or, at least, it should be put back as it was at the end of that
goal, which suggests that there might be a difference on whether or not
we're in a trailing grade).  How does this map onto the high-level insts
in a way that is reasonable for different underlying implementations?

> Otherwise, that looks good.  But can I please see
> another diff before you commit that?  Thanks.

Will do.  Just after we've sorted out the above bits.  All your other
suggestions have been implemented.

Thanks, Fergus.

Cheers,
Andrew Bromage



More information about the developers mailing list