Thank you Eithon, this will do nicely!
On Apr 24, 2007, at 5:08 PM, Eithon Cadag wrote:
Hey Art,
I'm not entirely sure you can do that, but I do know you can use
the Jess template extends functionality to have subtypes. So, to
make all templates with timestamps a child of a supertemplate
called TimeStampFact, you can do:
(deftemplate TimeStampFact
(slot timestamp)
.... )
(deftemplate SomeTimeOrientedFact extends TimeStampFact
....)
(deftemplate AnotherTimeOrientedFact extends TimeStampFact
...)
And the rule:
(defrule checktime
(TimeStampFact (timestamp ?x))
=>
...)
will be checked for all three templates above.
- Eithon
Art Griesser wrote:
Is it possible to declare a LHS pattern that matches any fact with
a given value for a slot with a given name, independent of the
template?
For example, suppose I wanted to find all the facts (regardless of
template) that have a timestamp slot containing a date older than
July 14, 2006?
--------------------------------------------------------------------
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 owner-jess-
[EMAIL PROTECTED]
--------------------------------------------------------------------
--------------------------------------------------------------------
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 owner-jess-
[EMAIL PROTECTED]
--------------------------------------------------------------------
--------------------------------------------------------------------
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]
--------------------------------------------------------------------