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

Re: Logic Programming with Rules (and Argument Patterns)

Luke Palmer
March 9, 2005 07:54
Re: Logic Programming with Rules (and Argument Patterns)
Message ID:
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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About