atomspace icon indicating copy to clipboard operation
atomspace copied to clipboard

traverse-roots fails on optional atomspace

Open ngeiswei opened this issue 5 years ago • 0 comments

It looks like traverse-roots fails on given optional atomspace, as the following code demonstrates

(use-modules (opencog))
(define new-as (cog-new-atomspace))
(define old-as (cog-set-atomspace! new-as))
(Inheritance (Concept "A") (Concept "B"))
(cog-set-atomspace! old-as)
(cog-prt-atomspace new-as)

which outputs

(ConceptNode "B")
(ConceptNode "A")
(InheritanceLink
  (ConceptNode "A")
  (ConceptNode "B"))

ngeiswei avatar Nov 03 '20 09:11 ngeiswei