Hi, this might be a dumb question, but is there any way to reuse
a matching pattern, for example, the following piece of pattern tests
if the class of instance ?x is compatible (subclass, either direction)
with that of instance ?y.

  (instance-of ?x ?class1)
  (instance-of ?y ?class2)
  (or
    (sub-class-of ?class1 ?class2)
    (sub-class-of ?class2 ?class1)
    (same-class-as ?class1 ?class2)
  )

This kind of test is needed in different rules and even needed more
than once within one rule. Therefore, it's desirable to have some
way to reuse this piece of code. Writing a function that uses a
run-query is the best way I could think of. Any better ideas?

Thanks!

Xiaocheng Luan

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to