-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PutLink can give different results in case GetLink or result of it executin is used #2307
Comments
I run the code where the result of GetLink is empty:
The result contains SetLink:
It looks like if ListLink contains SetLink the LambdaLink needs to be applied to each value inside link (version b). Anyway, it should be explicitly described in the specification. See #2308 |
Part of what you are describing are bugs in the code, The reason there are bugs in the code is issue #1502 -- It turns out that |
This is a partial fix to issue opencog#2307
I'm going to close this, because it is fixed in #2310 I'll say it again: I really don't like all the fiddling around with SetLink that is done inside of the PutLink. But in order for it to work "naturally" and "easily" with a mixture of Get and Put, there seems to be no other choice, other than to somehow solve #1502 Hopefully, your examples also show why there has been o forward progress on #1502 -- there are just enough special cases that a good, easy, elegant solution for #1502 is not entirely obvious. Again -- the goal is to have things work "naturally", and be "easy" to use. |
Run the example below where ListLink uses GetLinks inside:
The result is:
Here is the updated example where GetLinks are executed and the result is used inside of ListLink:
The result is:
Now SetLink is used inside the result.
There should be explicit documentation that needs to properly clarify what is a result of LambdaLink execution when its arguments are SetLink.
a) LambdaLink is executed only once and X is substituted by (SetLink Y1 Y2 Y3)
b) LambdaLink is executed 3 times where X is substituted by Y1, Y2, Y3
c) LambdaLink is executed only once with the first argument of the SetLink where X is substituted by Y1
d) LambdaLink is executed only once with the random value from the SetLink
The text was updated successfully, but these errors were encountered: