opencog / ure

Unified Rule Engine. Graph rewriting system for the AtomSpace. Used as reasoning engine for OpenCog.
Other
54 stars 30 forks source link

Add BackwardChainerGetLink #56

Open ngeiswei opened 4 years ago

ngeiswei commented 4 years ago

Proposal

To slightly ease the usage of the URE and make it appear more as an extension of the pattern matcher, it would be nice to introduce

BackwardChainerGetLink

which would be a scope link that can be executed by the atomese interpreter and yield a similar output to GetLink.

Example

For example, executing the following

(cog-execute!
  (BackwardChainerGet
    (TypedVariable
      (Variable "$X")
      (Type "ConceptNode"))
    (Inheritance
      (Concept "A"))
      (Variable "$X")
    <rule-base-with-deduction-rule>))

on the KB described in issue https://github.com/opencog/atomspace/issues/2472 would yield the following

(Set
  (Concept "B")
  (Concept "C")
  (Concept "D")
  (Concept "F"))