On Tuesday 08 March 2005 12:46 pm, Ovid wrote:
> --- Mark Kvale <[EMAIL PROTECTED]> wrote:
> > I would opt for a couple of small examples that are almost
> > self-explanaotry
> > and then describe in a high level way a seriously useful Prolog
> > application.
>
> Sounds workable.
>
> > However, I am happy to be a devil's advocate as well :-) Here are
> > some
> > aggressive questions you might have to field from folks who have
> > heard of
> > Prolog:
>
> Wonderful idea!  Thanks.  Let me know if you think I'm goofing any of
> these.
>
> Preface:  I'd like to show programmers how to use Prolog from their
> Perl programs, not just how to use Prolog.
>
> > 1) Prolog was hot in the 80's but is hardly ever used these days. If
> > it hasn't stood the test of time, why should I care?
>
> Prolog has traditionally been viewed as rather slow and, due to the
> nature of its design, debugging is sometimes a painful experience.
> Further, because so many programmes are weaned on imperative or OO
> languages, Prolog just seems "foreign".  Building large applications
> can be cumbersome, as a result of these factors.
>
> I argue that programmers should use Perl for the bulk of the work and
> use Prolog for those portions of the application where a rule-based
> approach is clearly merited, or where data is heavily relational in
> nature.  Thus, they can leverage the strengths of logic programming
> only when it's cleary a good choice.
>
> > 2) There are about 20 Prolog compilers out there, all incompatible
> > due to a
> > weak language spec. This a recipe for vendor lock-in; how could I
> > make my
> > prolog programs last?
>
> Hopefully, my long-term goal is to port the bulk of AI::Prolog to C and
> write a "sugar" wrapper that allows someone to write logic programs in
> Perl.  Eventually, I might consider a WAM (Warren Abstract Machine) in
> Parrot.  I'd like to avoid the external dependencies.  However, for the
> time being, if you can figure out Language::Prolog::Yaswi, it's a good
> choice, though it does require SWI-Prolog.
>
> > 3) Why is Prolog a good match with Perl?
>
> Perl can already handle functional, OO, and imperative progamming.
> However, if a declarative approach is merited, it's rather tough to
> pull that off in Perl.  I'd like to solve that.
>
> > 4) Pretty CS langauages are all well and good, but how do I get real
> > work
> > done? Are there Prolog bindings for databases, network  and systems
> > libraries, graphical toolkits? Is there a decent Prolog IDE?
>
> I would argue that most of that should be done in Perl and let the
> Prolog layer handle only those bits that Perl is not well suited for.
>
> Cheers,
> Ovid
>

Those all sound like reasonble replies. Even people who are wary of Prolog for 
general use might be amenable to using it as a special purpose logic engine.

Good luck with the talk,
Mark

Reply via email to