You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for this tool and for the interesting and diverse examples that show its potential and work out of the box.
I found that in some cases, the variable name in the resulting map isn't one of the variables I requested. Demo:
importpythologasplbd=pl.KnowledgeBase("bd")
bd([
"tenmore(A, X) :- X is A+10",
])
print(bd.query(pl.Expr("tenmore(200, V)")))
# It returns: [{'200': 210}]# I expected: [{'V': 210}]# By the way, this also fails, instead of returning W=990:# bd.clear_cache()# print(bd.query(pl.Expr("tenmore(W, 1000)")))# It produces: NameError: name 'A' is not defined
The text was updated successfully, but these errors were encountered:
Hi Daniel,
Thanks a lot for your feedback and for highlighting the unexpected behavior
and for opening an issue for it. I will look into it and get back to you
with the update.
All the best,
On Sat, Jan 21, 2023, 16:19 Daniel Clemente ***@***.***> wrote:
Hi, thanks for this tool and for the interesting and diverse examples that
show its potential and work out of the box.
I found that in some cases, the variable name in the resulting map isn't
one of the variables I requested. Demo:
import pytholog as plbd = pl.KnowledgeBase("bd")bd([
"tenmore(A, X) :- X is A+10",
])
print(bd.query(pl.Expr("tenmore(200, V)")))# It returns: [{'200': 210}]# I expected: [{'V': 210}]
# By the way, this also fails, instead of returning W=990:# bd.clear_cache()# print(bd.query(pl.Expr("tenmore(W, 1000)")))# It produces: NameError: name 'A' is not defined
—
Reply to this email directly, view it on GitHub
<#5>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHT2Y7J5OT3NZ7WWAAHE3S3WTPV57ANCNFSM6AAAAAAUCNQJDY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
Hi, thanks for this tool and for the interesting and diverse examples that show its potential and work out of the box.
I found that in some cases, the variable name in the resulting map isn't one of the variables I requested. Demo:
The text was updated successfully, but these errors were encountered: