opencog/atomspace

InhTypeNode throws exception in pattern matcher

ngeiswei opened this issue · 1 comments

The following

(use-modules (opencog) (opencog exec))
(Concept "A")
(define q (Get (TypedVariable (Variable "$X") (TypeInh 'Concept)) (Variable "$X")))
(cog-execute! q)

throws

Throw to key `C++-EXCEPTION' with args `("cog-execute!" "vector::_M_range_check: __n (which is 65535) >= this->size() (which is 225)\nFunction args:\n((GetLink\n  (TypedVariableLink\n    (VariableNode \"$X\")\n    (TypeInhNode \"Concept\"))\n  (VariableNode \"$X\"))\n)")'.

It should be noted that according to https://wiki.opencog.org/w/TypeInhNode Concept should be included in the considered types, thus the excepted result should be

(Set (Concept "A"))

@kasimebrahim, I wonder if you haven't already fixed that when you worked on adding type support to the pattern miner. If so, could you merge it now, before completing you miner benchmark?