<< Back to previous view

[LOGIC-131] Docstrings for lvaro and nonlvaro need improvement. Created: 22/Apr/13  Updated: 28/Jul/13  Resolved: 07/May/13

Status: Closed
Project: core.logic
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Austin Haas Assignee: David Nolen
Resolution: Completed Votes: 0
Labels: documentation

Attachments: File LOGIC-131-fix.diff    
Patch: Code

 Description   

Assuming the following definitions:

1. A term is ground if it does not contain unassociated logic variables.
2. Otherwise, it is non-ground.

My suggestions:

lvaro: A non-relational goal that succeeds if the supplied logic variable is fresh.

nonlvaro: A non-relational goal that succeeds if the supplied logic variable is not fresh.

In the case nonlvaro, it's important to recognize that the implementation only tests whether the supplied lvar is not fresh, and "not fresh" != grounded; the result could be partially instantiated. For example, nonlvaro succeeds here when its argument is neither fresh nor grounded:

(run* [q]
  (fresh [x]
    (== q [x])
    (nonlvaro q)))
;; => ([_0])


 Comments   
Comment by Austin Haas [ 22/Apr/13 12:26 PM ]

I added those initial definitions when I thought "groundedness" was the operative word, so they aren't directly relevant.

Comment by David Nolen [ 22/Apr/13 12:29 PM ]

Thanks, I'll happily accept docstring patches.

Comment by Austin Haas [ 07/May/13 2:11 PM ]

This patch changes the docstrings for lvaro and nonlvaro to be more accurate. This is a fix for LOGIC-131.

Comment by David Nolen [ 07/May/13 10:29 PM ]

fixed http://github.com/clojure/core.logic/commit/cc30fcb4f5690e928fa7103e5091b9de8aba0013

Generated at Tue Jul 29 12:14:39 CDT 2014 using JIRA 4.4#649-r158309.