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

cog-bind-first-n is archaic #686

Closed
linas opened this issue Mar 3, 2016 · 10 comments
Closed

cog-bind-first-n is archaic #686

linas opened this issue Mar 3, 2016 · 10 comments

Comments

@linas
Copy link
Member

linas commented Mar 3, 2016

... and should probably be removed. That is, unless I am having a brain-fart ... but if I'm not wrong, these functions don't do anything that cog-execute! does not already do. It would simplify code and simplify examples, if we reduce the number of functions.

I don't think there's any performance impact from this, either ...

@linas
Copy link
Member Author

linas commented Mar 3, 2016

Note that bug #646 does seem to show a difference between cog-execute! and cog-satisfying-set but I'm not sure why there would be one.

@linas
Copy link
Member Author

linas commented Mar 3, 2016

This is low priority, though, and is perhaps a matter of taste. We still need the "get-first-n" versions, since there is no way to have a generic "get-first-n" function in in cog-execute ...

Maybe even such low priority that this should be closed, without changing anything. Hmmm...

@linas
Copy link
Member Author

linas commented Jun 28, 2016

See also #822 for related issues

@linas
Copy link
Member Author

linas commented Dec 22, 2017

Partly done in #1457

linas added a commit to linas/opencog that referenced this issue Dec 22, 2017
@linas
Copy link
Member Author

linas commented Dec 22, 2017

Partly done in opencog/opencog#2957

@linas linas changed the title cog-bind and cog-satsifying set are archaic cog-bind and cog-satsifying-set are archaic Dec 22, 2017
linas added a commit to linas/opencog that referenced this issue Dec 22, 2017
@linas
Copy link
Member Author

linas commented Dec 22, 2017

Also handled in opencog/opencog#2958

linas added a commit to linas/atomspace that referenced this issue Dec 22, 2017
@linas
Copy link
Member Author

linas commented Dec 22, 2017

More removals in #1501

@linas
Copy link
Member Author

linas commented Dec 22, 2017

To remove the cog-bind-first-n, we should invent a CutLink that would abort the pattern search, when some condition is met. For example, when the desired number of solutions has been found.

Similarly, cog-bind-af should be made deprecated, and any queries that need this should just use a predicate (GroundedPredicateNode) to test for the desired values of attention-focus.

@linas
Copy link
Member Author

linas commented Feb 8, 2018

Suggestion #1502 seems to be a better solution for fixing cog-bind-first-n and cog-bind-af

@linas linas changed the title cog-bind and cog-satsifying-set are archaic cog-bind is archaic Feb 8, 2018
@linas linas changed the title cog-bind is archaic cog-bind-first-n is archaic May 22, 2019
@linas
Copy link
Member Author

linas commented May 30, 2020

Closing. This can be done in pure Atomese, although it is currently verbose:

(Bind
    (And
         ...
      (SequentialAnd
         (True
            (SetTV
               (Concept "cnt")
               (PredicateFormula
                  (Number 1)
                  (Number 1)
                  (Plus (Number 1) (CountOf (Concept "cnt"))))))
         (GreaterThan (Number 2.5) (CountOf (Concept "cnt")))))
))

@linas linas closed this as completed May 30, 2020
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