[m-dev.] EDCG inferrence

Peter Nicholas MALKIN pnmalk at students.cs.mu.oz.au
Mon Feb 14 20:46:56 AEDT 2000


Hi,

On Sat, 12 Feb 2000, Fergus Henderson wrote:

> On 11-Feb-2000, Peter Nicholas MALKIN <pnmalk at students.cs.mu.oz.au> wrote:
> > I am currently implementing EDCG inference and there is one thing I would like
> > to clarify. It concerns the method of inference using fixed points.
> > 
> > There are two main ways in which I could do it:
> > 
> > (i) Not use any user declarations and infer everything and then compare it
> > against what was declared.
> > 
> > (ii) Begin from the user declarations and give an error if the declarations are
> > not strict enough (i.e. declared passed when changed).
> 
> I suggest using approach (ii), for consistency with what we currently
> do for type, mode and determinism inference.

ok.

However I have a slight problem with integrating hidden argument inferrence,
with the type inferrence system. The problems stems from the same reason that I
cannot implement the translation at the same time as purity for efficiency. 
The problem is that the way in which the type checking mechanism traverses the
hlds data is not compatable with the way required for EDCGs.

i.e. Disjunctions and if-then-elses are traversed in the same way as
conjunctions. For EDCGs each disjunct must be traversed separately and the
results combined and similarly for if-then-elses.

I cannot see a feasable way around this except for writing it separately.

Comments?

Peter

--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list