Hi, I'm having some problems with a simple matter. I've written the
following rule, but i need to do the assert only in case the variable
?distance is equals to 1 (one) and i don't know how to express that. I'll
appreciate if anyone can help me with this!!
(defrule generate_outside_execution_relations
"comment"
(call (call_id ?call_1) (caller_id ?method_X) (callee_id ?method_Y)
(precedence ?precedence_1))
(call (call_id ?call_2) (caller_id ?method_X) (callee_id ?method_Z)
(precedence ?precedence_2))
=>
(bind ?distance (- ?precedence_2 ?precedence_1))
(assert (outside_execution_relation (call_id ?call_1) (call_id2 ?call_2)
(distance ?distance)))
)