[m-dev.] EDCG inferrence

Peter Nicholas MALKIN pnmalk at students.cs.mu.oz.au
Fri Feb 11 19:24:43 AEDT 2000


Fergus,

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).

The distinction between these methods is that for (i) it is easy for me to warn
the user when their declarations are too strict. I can also do this for (ii) but
only locally for one predicate, the user will not be warned about too strict
declarations in a predicate resulting from too strict declarations in a
predicate called from it.

The benefit of (i) is that it warns about all cases of too strict declarations,
which means potentially the user may not have to recompile the system more than
once to get all the appropriate declarations. The benefit of (ii) is that
it is more efficient and once all declarations have been written by the user the
compiler will not have to check them more than once thereafter.

N.B: The best of both worlds is impossible because then the fixed point method
is not guaranteed to terminate.

I am planning to implement (ii). Which do you prefer?

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