[m-dev.] for review: constraint propagation
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Feb 29 20:40:14 AEDT 2000
On 29-Feb-2000, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
>
> Fergus wrote:
> > A few general comments:
> >
> > - Constraint propagation might not preserve unique-mode-correctness.
> > Do you check to ensure that unique-mode-correctness is preserved?
>
> Could you give an example of a case where constraint propagation
> might not preserve unique-mode-correctness?
:- mode p(mdi, out) is semidet.
p(X, Y) :-
q(X, Y),
test(X).
:- mode q(mui, out) is det.
:- mode test(mdi) is semidet.
Here if you treat `test' as a constraint, and move it before
the call to q/2, then it will violate unique-mode-correctness.
I think the same example will also apply if you replace the mostly unique
modes with unique modes (s/mdi/di/g, s/mui/ui/g).
(But perhaps I should be asking you for a proof, rather than you asking me
for a counter-example ;-)
--
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.
--------------------------------------------------------------------------
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