Delete problog_model.pl
Browse files- problog_model.pl +0 -21
problog_model.pl
DELETED
|
@@ -1,21 +0,0 @@
|
|
| 1 |
-
% problog_model.pl
|
| 2 |
-
% ProbLog program for infrastructure reliability.
|
| 3 |
-
|
| 4 |
-
% Dynamic facts (will be asserted from Python)
|
| 5 |
-
:- dynamic component/2, connected/2, depends/2.
|
| 6 |
-
|
| 7 |
-
% Failure rule for any component
|
| 8 |
-
failure(C) :- component(C, switch), fails(C).
|
| 9 |
-
failure(C) :- component(C, server), fails(C).
|
| 10 |
-
failure(C) :- component(C, service), fails(C).
|
| 11 |
-
|
| 12 |
-
% Propagation rules
|
| 13 |
-
failure(Serv) :- connected(Serv, Switch), failure(Switch).
|
| 14 |
-
failure(Serv) :- depends(Serv, Parent), failure(Parent).
|
| 15 |
-
|
| 16 |
-
% Prior probabilities (example)
|
| 17 |
-
0.1 :: fails(switch-1).
|
| 18 |
-
0.05 :: fails(server-1).
|
| 19 |
-
|
| 20 |
-
% Query
|
| 21 |
-
query(failure(X)).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|