[mercury-users] Mercury, NLP, SLP, and ILP
Ralph Becket
rbeck at microsoft.com
Tue Sep 19 22:17:20 AEDT 2000
> From: James Cussens [mailto:jc at cs.york.ac.uk]
>
> I am pretty sure that Ralph's experiences using Prolog and Mercury
> will prove to be typical. One issue, which I think is still not
> resolved, is whether implementing partially instantiated terms is a
> good idea for Mercury. Some people have said that they are prone to
> produce confusion and errors. On the other hand they are often very
> handy in Prolog - not least for NLP purposes as soon as you go beyond
> context-free.
Personally, I find Mercury's mode system cumbersome when it comes to
higher order programming and I suspect that matters would be even
worse with partially instantiated structures.
For instance, if I have a type foo with several constructors, some or all
of which carry functions or predicates, I have to write one large
inst declaration foo and pass instances around in modes in(foo) and
out(foo). Of course, since the library predicates are not geared up
for such structures (they mainly use in/out modes which cause you
to lose the higher order mode info.*), I can't pass foos to library
routines or even make collections of them.
Things would be trickier for partially instantiated structures,
particularly if your structures can have several possible instantiation
states. The difficulty is that you have to have to declare one inst
for every possible state and then declare all possible/sensible modes
for funcs/preds manipulting such structures and...**
Personally, I don't think it's worth it. Mercury isn't Prolog; it's
much closer to, say, pure ML with predicates and it's better to program
in a style that suits that paradigm.
Cheers,
Ralph
* Polymorphic modes are work-in-progress, but no ETA as yet.
** There is a mysterious, undocumented inst `any' intended for people
writing constraint solvers, but I have no idea if this would help here.
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list