[m-dev.] For review: declarative debugging back end (3/3)

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Jul 19 16:26:59 AEST 1998


On 19-Jul-1998, Mark Anthony BROWN <dougl at cs.mu.OZ.AU> wrote:
> > 
> > On 16-Jul-1998, Mark Anthony BROWN <dougl at cs.mu.OZ.AU> wrote:
> >
> > > > > :- type miss_tree(A)
> > > > > 	--->	local_call(evaluation_tree(A))
> > > > > %	;	some [E] external_call(evaluation_tree(E))
> > > > > %			<= evaluation_atom(E)
> > > > > 	;	conj(list(miss_tree(A)))
> > > > 
> > > > Shouldn't that be `conj(int)'?
> > > 
> > > I don't think so.  In Lee's declarative debugging scheme, the children
> > > of an `mp' node include `mp' nodes for each conjunct.  A miss_tree
> > > holds the children of (the Mercury equivalent of) an `mp' node.
> > 
> > If a conjunction has a missing answer, it is not necessarily
> > the case that all conjuncts will have a missing answer;
> > only one conjunct need have a missing answer.
> 
> Yes, but which one?
[...]
> > I thought miss_trees represented missing answers.
> > Is that not always the case? 
> 
> My comments were probably misleading.  I should have said that miss_trees
> represent a justification for a missing answer.

I think this description is still not quite right, because evidently you can
have a miss_tree for a conjunct which doesn't have any missing answers.

> More generally, an EDT represents some behaviour along with its
> justification.  When analysing for missing answers, the behaviour that
> is most useful is the success set for each given call.  The
> justification is always just the behaviour of the children.
> 
> > (What does a `trivial' miss_tree mean?)
> 
> It means the _justification_ is trivial.  Eg, facts have trivial
> justifications.

That example makes sense for wrong answer EDTs, but I still don't
quite understand what trivial means for missing answer EDTs,
i.e. in what cases the justification for a missing answer is trivial.

> I think the best way to document this is in compiler/notes somewhere,
> which will give an overview of the scheme and point to Lee's paper(s).
> Any module that uses this scheme should give its own specific details
> in comment, but refer to this central location for an overview.

That seems like a good idea.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list