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
scheme@(guile-user)> (test-1)
$1 = (stv 01)
scheme@(guile-user)> (test-2) ; this is where the issue is
$2 = (stv 01)
scheme@(guile-user)> (test-3)
$3 = (stv 11)
3. Expected results
scheme@(guile-user)> (test-2)
$2 = (stv 11)
The text was updated successfully, but these errors were encountered:
If you change (Put (DefinedPredicate "is_nn_equal_cn?") to (Evaluation (GroundedPredicate "scm: is_nn_equal_cn?") then it will work as expected.
The pattern matcher is literally looking for a PutLink, it is NOT trying to execute it. Its as if you had written (Present (Put Later, after running test-3. such a link does exist, so the search succeeds.
You might think that (Evaluation (DefinedPredicate "is_nn_equal_cn?") might work, but it appears to trigger some bug (that I am currently not planning to investigate). If you need (Evaluation (DefinedPredicate "is_nn_equal_cn?") to work, update this bug report.
The wiki page http://wiki.opencog.org/w/PutLink#Defined_predicates suggests that this should work, but uses weasel words "behaves much like an EvaluationLink" .. .much like??? and concludes "This is perhaps confusing, and could use some work." because, for this situation, its not clear what the right thing to do is.
amebel
changed the title
What is wrong with (DefinedPredicateNode "check")
(Put (DefinedPredicate "is_nn_equal_cn?") ...) not yet equivalent to (Evaluation (DefinedPredicate "is_nn_equal_cn?")...)
Aug 8, 2016
Do you want to pursue this, or should this be allowed to lapse?
linas
changed the title
(Put (DefinedPredicate "is_nn_equal_cn?") ...) not yet equivalent to (Evaluation (DefinedPredicate "is_nn_equal_cn?")...)
(Put (DefinedPredicate ...)) not equivalent to (Evaluation (DefinedPredicate ...))
Aug 13, 2016
Yes, as a user it seems valid feature to be able to beta-reduce a lambda function with TV return type, and this should also simplify the imperative atomese.
The dpn in question is an extension of the dpn from #852
1. Scheme and atomspace contents
2. Running the tests
3. Expected results
The text was updated successfully, but these errors were encountered: