add Prolog meta-logical predicates bagof, setof, findall

Description

This can be done by annotating logic variables and embedding a run within a run by passing in the current substitution, running on it, and extracting out the reified values and unifying it back into the current substitution.

Environment

None

Attachments

2
  • 29 Jul 2018, 12:09 AM
  • 17 Nov 2012, 04:02 AM

Activity

Show:

Gordon Gustafson July 29, 2018 at 12:09 AM

It's been quite a while, but here's a short patch to implement `findall` if anyone wants to review. slightly smiling face

David Nolen June 13, 2013 at 7:36 AM

No worries! Glad Datomic is working out for you slightly smiling face

Aaron Brooks June 13, 2013 at 3:03 AM

Having switched to Datomic which has bagof/setof type aggregation and subqueries (though the switch wasn't for those specifically) I don't know if or when I'll get back to this. Sorry!

David Nolen February 13, 2013 at 7:50 PM

Glad to hear you're OK! No worries, will take a patch whenever you get around to one.

Aaron Brooks February 4, 2013 at 11:50 PM

After a car accident, travel to London and Morocco, getting caught up at work and getting caught up on the apparently very busy stream of core.logic activity (great work!), I'm back on this.

I found some bugs in my implementation after porting the patch forwards and realized these issues highlighted my sloppy understanding of some of the semantics I had created.

I'm fairly convinced now that we don't want to name this after run or run*. It's too much of a strain to try to make it mean the same thing in a nested context.

The current mechanism is still not quite a match for findall/bagof/setof, however, so I'm seeing what a good fit would be. I'll post meaningful thoughts for review as I have them.

Details

Assignee

Reporter

Priority

Created November 16, 2012 at 7:20 PM
Updated July 29, 2018 at 12:09 AM

Flag notifications