:- dynamic fw_rule/2. :- use_module(bgp, [ create_firewall/0]). print_warnings([]). print_warnings([W|Ws]) :- format("Warning: ~w~n", [W]), print_warnings(Ws). print_warnings :- findall(W, bgp:warning(W), BgpWs), findall(W, firewall:warning(W), FwWs), concat(BgpWs, FwWs, Ws), length(Ws, L), ( L > 0 ->format("Found ~w warning(s):~n", [L]), print_warnings(Ws) ; format("No warnings!~n") ). main :- bgp:create_firewall(), bgp:bird_config(BirdDict), yaml_write(current_output, BirdDict).