Skip to content
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

Pattern matcher: NotLink ChoiceLink not working #217

Open
linas opened this issue Aug 21, 2015 · 1 comment
Open

Pattern matcher: NotLink ChoiceLink not working #217

linas opened this issue Aug 21, 2015 · 1 comment

Comments

@linas
Copy link
Member

linas commented Aug 21, 2015

The expression (NotLink (ChoiceLink single-atom)) should be equivalent to (AbsentLink ingle-atom) but will almost surely fail in the current implementation. Note this is closely related to issue #215

Just like issue #215, this will probably be hard (?) to implement, because absent links really behave differently than other things: they are a kind of virtual clause, which can only be evaluated after a grounding is found.

This is marked "enhancement" becausse its low-priority; it is not blocking any work, and has reasonable work-arounds .. i.e. just use AbsentLink!

@linas
Copy link
Member Author

linas commented May 20, 2019

Currently, (NotLink (ChoiceLink xxx)) throws an exception n the classserver, because ChoiceLink is not a boolean type, and thus, taking it's negation is undefined.

I guess the intended semantics here is that ChoiceLink should evaluate to whichever choice was taken, else empty-set if none were taken. Then Not would mean is-empty/is-not-empty. Perhaps we should have a boolean EmptyLink that evaluates to true, when it is empty, else evaluates to false? Thus, EmptyLink behaves a lot like PresentLink, except that it does not quote the Choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant