develooper Front page | perl.perl6.language | Postings from March 2005

Re: Logic Programming with Rules

From:
Rod Adams
Date:
March 9, 2005 14:50
Subject:
Re: Logic Programming with Rules
Message ID:
422F7DC0.3050801@rodadams.net
Ovid wrote:

>--- Rod Adams <rod@rodadams.net> wrote:
>  
>
>>I was just relaying the observation that the P6RE was fairly close to
>>being able to implement Logical Programming, which several people
>>seem to be trying to get into Perl in some fashion or another.
>>    
>>
>
>When I get a chance to talk to someone about logic programming, there's
>frequently an "aha!" moment where they start to see some of the
>potential, but then I inevitably get the question "if it's so powerful,
>why ain't it rich?" (or something like that.)
>
>The answer, I think, is that it's generally not available in the tools
>that most people use. 
>
And I think there's a decent reason for that. They are two fundamentally 
different ways of processing. One way is the strict following of 
commands, the other is kind a "quest for truth", with only a limited 
notion of order. I know SWI-Prolog has the ability to merge into C++, 
but I can't imagine the C++ side being what one would consider a "smooth 
integration".

What made me post the thread was the observation that Rules share a 
great deal of the mentality of LP.

> 
>Unfortunately, while Prolog is a piece of cake to learn, this thread
>made my head hurt.
>  
>
I was starting off with getting the basic functionality present. After 
that, one could write a library of macros to clean it up a great deal.

But come to think of it, it almost definitely makes more sense to port 
Prolog or some other LP engine to Parrot, and then intermingle the 
languages at that level. I don't think very many of us have fully 
grasped what Parrot can do for Perl yet.

-- Rod Adams



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About