Conversation
|
Thank you, you are right, the problem is that all input atoms are used as key, independent of their truth value. The only problem of your solution: if only true assignments are used, in case of partial assignments there can be issues again. However, currently, only full assignments are used. To avoid unpredictable behavior from future changes, and to document this situation, I suggest that you add an assertion about having a nonpartial assignment before the
What do you think about this? Apart from that, I suggest to construct the |
|
Thank you, that's right, I hadn't thought about this case. I've pushed the update. |
|
Thank you, I have merged the PR. I will also create an issue to create a new test case for this situation. (Your PR description would make a very nice test case!) |
The storage dictionary for the eatom evaluation cache is not indexed by interpretations, but by a set containing all input atoms. Because of this, the eatoms are not evaluated again when the interpretation changes. This can be seen with the following program:
And the corresponding external atom implementation:
These are the correct answer sets:
These are the returned answer sets:
I propose only using true input atoms to index the storage dict to fix this 6814b97.