[m-dev.] diff: bug fix

Simon TAYLOR stayl at students.cs.mu.oz.au
Thu Jul 24 17:03:31 AEST 1997


Hi Fergus,

> How about
> 			goal_to_conj_list(SingleGoal0, SingleGoalConj),
> 			GoalList = [UnifyGoal | SingleGoalConj],
> instead?

Thanks, that's much better.

> > @@ -1091,7 +1105,7 @@
> >  	),
> >  	InstToUniMode =
> >  		lambda([ArgInst::in, ArgUniMode::out] is det, (
> > -			ArgUniMode = ((ArgInst - ArgInst) -> (free - ArgInst))
> > +			ArgUniMode = ((ArgInst - free) -> (ArgInst - ArgInst))
> >  		)),
> >  	list__map(InstToUniMode, ArgInsts, UniModes),
> 
> I think that change is a bug.

The original code was buggy. 
The format of a uni_mode is (LHSInitial - RHSInitial) -> (LHSFinal - RHSFinal)

If an argument of left hand variable is ground, the mode of the argument 
according to the original code is ground->free. The change means that the 
left hand variable keeps its initial inst, and the arguments of the RHS get 
insts corresponding to the insts of the arguments of the LHS. 

Simon.



More information about the developers mailing list