-
Notifications
You must be signed in to change notification settings - Fork 247
Closed
Labels
Description
Problem description
I have a query, containing only present clauses, that correctly succeeds. However the presence of an another atom in the atomspace makes it fails.
How to reproduce
Run the following scheme code:
(use-modules (opencog))
(use-modules (opencog exec))
;; Query
(define query
(let* (
;; Constants
(R (Predicate "R"))
(A (Execution (Schema "A")))
;; Variables
(P (Variable "$P"))
(Q (Variable "$Q"))
;; Clauses
(P↝Q (Quote
(Implication
(Unquote P)
(Unquote Q))))
(Q∧A (And Q A))
(Q∧A↝R (Implication
Q∧A
R)))
;; Query
(Get
(VariableSet P Q)
(Present P↝Q Q∧A↝R))))
;; KB
;; Culprit
(Implication
(And
(Predicate "Qbis") ; Culprit
(Execution (Schema "A"))
)
(Predicate "R"))
;; Premises
(Implication
(Predicate "P")
(Predicate "Q"))
(Implication
(And
(Predicate "Q")
(Execution (Schema "A"))
)
(Predicate "R"))
;; PM
(define results (cog-execute! query))
It, incorrectly, returns nothing.
Remove the culprit atom and then it works.