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

Re: Logic Programming with Rules (and Argument Patterns)

From:
Luke Palmer
Date:
March 9, 2005 07:54
Subject:
Re: Logic Programming with Rules (and Argument Patterns)
Message ID:
20050309155622.GB23412@navi.cx
Rod Adams writes:
> >
> >You could do all of this with a library of rules.
> >
> >   / $<x>:=<generate(@values)>  <test($<x>)> /
> > 
> >
> I don't think this does what I want. In this, &generate returns a rule 
> or string of some kind, matches the string being tested, captures what 
> matches, and then binds the capture to $<x>.

You're right.  We probably need something like:

    / <generate($<x>, @values)>  <test($<x>)> /

I don't know when $<x> is hypotheticalized there, if at all.  It needs
to be.

> >Maybe we could unify the pattern proposal and your generation ideas for 
> >logic programming.
>
> There might be unification with logical programming to be had, but I'm
> not sure it's with the generation part of things.

I was decently insane last night.  This generator stuff probably isn't
going anywhere.  It's too abstract, and not precise enough, to be a
truly powerful part of the language.

Luke



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