On Wed, Feb 09, 2005 at 11:57:17AM -0800, Ovid wrote:
: --- Matt Fowles <[EMAIL PROTECTED]> wrote:
: 
: >    Logic Programming in Perl 6
: >     Ovid asked what logic programming in perl 6 would look like. No
: > answer
: >     yet, but I suppose I can pick the low hanging fruit: as a
: > limiting case
: >     you could always back out the entire perl 6 grammar and insert
: > that of
: >     prolog.
: 
: I dunno about that.  The predicate calculus doesn't exactly translate
: well to the sort of programming that Perl 6 is geared for.  I don't
: think it's a matter of redefining a grammar.  Maybe unification can be
: handled with junctions, but backtracking?  I am thinking that some
: serious work down at the Parrot level would be necessary, but I would
: be quite happy to be corrected :)

Depending on what level you write your engine, the backtracking can be
handled either with exceptions or, more generally, with continuations.
I personally think that unification is the hard part, but then it's
possible I'm just not in the right brainstate yet with regard to
junctions.  I tend to see junctions as sets of scalar values rather
than sets of list values, but maybe that's just the Pooh coming out
in me.  I was, in fact, thinking about Prolog unification just a bit
when I cargo-culted in the [$head, [EMAIL PROTECTED] form of parameter parsing,
but I don't profess to understand all of the implications.

Basically, logic programming is one of those things I'm not trying to
solve directly in Perl 6--I'm just trying to get Perl 6 close enough
that the real experts can have a go at it without having too many
roadblocks thrown in their way.  That's true not only for LP, but
also for FP, MP, XP, AOP, DBC, and hopefully several other varieties
of alphabet soup yet to be invented.

Larry

Reply via email to