[LOGIC-114] stack overflow with conda/u Created: 14/Feb/13 Updated: 17/Mar/13 |
|
| Status: | Open |
| Project: | core.logic |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Major |
| Reporter: | Austin Haas | Assignee: | David Nolen |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
(ns test
(:refer-clojure :exclude [==])
(:require
[clojure.core.logic :refer :all]))
(defn foo [in out]
(matcha
[in out]
([('and a b . ()) ('and x y . ())] (foo a x) (foo b y))
([a ('bar ('baz a . ()) . ())])))
;; I get a stack overflow with the following, but if I remove one conjunct, then it will run.
(run 1 [q] (foo
'(and p
(and p
(and p
(and p
(and p
(and p
(and p
(and p
(and p
(and p
(and p p)))))))))))
q))
|
| Comments |
| Comment by David Nolen [ 14/Feb/13 1:22 PM ] |
|
It looks this issue still exists even if you swap the matcha with matche |
| Comment by Austin Haas [ 14/Feb/13 8:06 PM ] |
|
I think the overflow is occurring during reification. I was getting this error when returning a result from run, but now that I'm using the same value as the input to another goal there is no overflow. If you replace q in the foo call with a fresh variable, it will not overflow. |
| Comment by David Nolen [ 17/Mar/13 7:30 PM ] |
|
This works for me on master. Can you give me more specifics about your setup so I can try to recreate? I'm on OS X 10.8 running JDK 7 64bit. |
| Comment by Austin Haas [ 17/Mar/13 8:50 PM ] |
|
I don't see the issue anymore, but I believe I was using Java 1.6 when I reported it and now I am using: $ java -version |
| Comment by David Nolen [ 17/Mar/13 9:02 PM ] |
|
OK, thanks for the quick response, I'll double check how things look under 1.6. |