Re: core.logic, goals and facts

2012-05-19 Thread Brent Millare
Basic follow up question. I assumed that all facts must be grounded, but I 
never really found the answer to this. Is it true?

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: core.logic, goals and facts

2012-05-19 Thread David Nolen
They probably should though I don't think that's a hard requirement. In
Prolog you can write a fact that looks like this:

likes(X,X).

To say that everyone likes themselves. This is probably better expressed as
a regular relation in core.logic and not as a fact.

(defn likes [x y]
  (== x y))

David

On Sat, May 19, 2012 at 1:01 PM, Brent Millare brent.mill...@gmail.comwrote:

 Basic follow up question. I assumed that all facts must be grounded, but I
 never really found the answer to this. Is it true?


  --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with
 your first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: core.logic, goals and facts

2012-05-17 Thread Ambrose Bonnaire-Sergeant
On Thu, May 17, 2012 at 7:19 PM, Brent Millare brent.mill...@gmail.comwrote:

 I'm taking a more serious dive into logic programming and I have a
 question about facts.

 *Is it true that that goals and facts are the same in that you can use
 unification and conde to get the same effect? So querying a conde of
 multiple unifications is like stating a bunch of facts of a relation, and
 then querying that relation?*


That's how I conceptualise it. I think the similarities between the two are
pretty cool :)


 *
 *
 *Also then if this is true, is it also true that the reason we have facts
 is that they can be indexed and thus be more efficient?*


Facts are also a convenient way of incrementally adding to a relation, but
certainly IMO their primary purpose in core.logic is efficiency.

Thanks,
Ambrose

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en