How can one test if a var is bound or not bound (rather than testing if
it's bound or not /to a specific value/)?

For example, I would like to write something like this:

(defrule causation-1
   "When a causal trigger is present, the outcome occurs"
   (and (cause (trigger ?Trigger) (outcome ?Outcome))
        (test (not (bound ?Outcome.time)))                    ;test of
whether ?Outcome.time is bound
        (currentTimeStep ?T)
        (< ?Trigger.time ?T) )
   =>
   ((assert ?Outcome)
    (bind ?Outcome.time ?T) ))

Reply via email to