(defrule MAIN::relie (begin ?begin) (or (link ?begin ?l1) (link ?l1 ?begin)) => (assert (path ?begin ?l1))) (defrule MAIN::buildpath (router ?l1) ; le device doit etre un switch, router, firewall ... (path $?begin ?l1) (or (link ?l1 ?l2) (link ?l2 ?l1)) => (assert (path $?begin ?l1 ?l2))) (defrule MAIN::printsoluce (begin ?begin) (end ?end) ?goodpath <- (path ?begin $?interpath ?end) => (bind ?chemin (create$ ?begin $?interpath ?end)) (printout t "PATH: " (implode$ ?chemin) crlf)) (defrule MAIN::elague "Supprime les chemin qui bouclent" (declare (salience 100)) ?boucle <- (path $? ?x $? ?x $?) => (retract ?boucle))