opencog / atomspace

The OpenCog (hyper-)graph database and graph rewriting system
https://wiki.opencog.org/w/AtomSpace
Other
795 stars 225 forks source link

Another FloatValue example #3026

Closed sikefield3 closed 1 year ago

sikefield3 commented 1 year ago

While going through the examples, I found another exception similar to #3022 in https://github.com/opencog/atomspace/blob/b2603a5a17e9c737f9ac6788c0aec791ae427b68/examples/pattern-matcher/value-of.scm#L45-L57 which gives me:

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Atomspace C++ exception:
(cog-new-link Types fail to agree, invalid Atom syntax: (DivideLink
  (ValueOfLink
    (Variable "$X") ; [5e8448863b0b6c19][1]
    (Predicate "some key") ; [2dafe92e20a67a8f][1]
  ) ; [80bf787f0b876249][1]
  (Number "12") ; [6c6aa63c55cec01][1]
) ; [d1742eb156926b78][-1] (/home/opcwdir/repodock/atomspace/opencog/atoms/   
...

It worked, when I put FloatValueOf in there: https://github.com/opencog/atomspace/blob/b2603a5a17e9c737f9ac6788c0aec791ae427b68/examples/pattern-matcher/value-of.scm#L54

sikefield3 commented 1 year ago

Same here: https://github.com/opencog/atomspace/blob/b2603a5a17e9c737f9ac6788c0aec791ae427b68/examples/atomspace/recursive-loop.scm#L26-L28

sikefield3 commented 1 year ago

Also, the definition of cog-value-is-type could not be found: https://github.com/opencog/atomspace/blob/b2603a5a17e9c737f9ac6788c0aec791ae427b68/examples/pattern-matcher/type-signature.scm#L85-L87 I had to add this manually: (use-modules ((opencog type-utils))) (don't know if this is on my side...)

linas commented 1 year ago

Care to ease my burden, and create a pull request? If you do it exactly as described here, I'll happily merge it!

sikefield3 commented 1 year ago

Sure! No problem, I'll do it.