|
|
{ "jani-version": 1, "name": "modelName", "type": "mdp", "actions": [ { "name": "put" }, { "name": "get" }, { "name": "put_k" }, { "name": "get_k" }, { "name": "put_l" }, { "name": "get_l" }, { "name": "new_file" }, { "name": "s_ok" }, { "name": "s_dk" }, { "name": "s_nok" }, { "name": "s_restart" }, { "name": "r_ok" }, { "name": "r_inc" }, { "name": "r_fst" }, { "name": "r_nok" }, { "name": "r_timeout" }, { "name": "error" }, { "name": "tick" } ], "variables": [ { "name": "ff", "type": "bool", "initial-value": false }, { "name": "lf", "type": "bool", "initial-value": false }, { "name": "ab", "type": "bool", "initial-value": false }, { "name": "i", "type": { "kind": "bounded", "base": "int", "lower-bound": 0, "upper-bound": 16 }, "initial-value": 0 }, { "name": "inTransitK", "type": "bool", "initial-value": false }, { "name": "inTransitL", "type": "bool", "initial-value": false }, { "name": "first_file_done", "type": "bool", "initial-value": false }, { "name": "get_k_seen", "type": "bool", "initial-value": false }, { "name": "s_ok_seen", "type": "bool", "initial-value": false }, { "name": "s_nok_seen", "type": "bool", "initial-value": false }, { "name": "s_dk_seen", "type": "bool", "initial-value": false }, { "name": "s_restart_seen", "type": "bool", "initial-value": false }, { "name": "r_ok_seen", "type": "bool", "initial-value": false }, { "name": "r_timeout_seen", "type": "bool", "initial-value": false }, { "name": "premature_timeout", "type": "bool", "initial-value": false }, { "name": "channel_k_overflow", "type": "bool", "initial-value": false }, { "name": "channel_l_overflow", "type": "bool", "initial-value": false }, { "name": "Sender_location", "type": "int", "initial-value": 0 }, { "name": "Receiver_location", "type": "int", "initial-value": 0 }, { "name": "ChannelK_location", "type": "int", "initial-value": 0 }, { "name": "ChannelL_location", "type": "int", "initial-value": 0 }, { "name": "Observer_location", "type": "int", "initial-value": 0 } ], "properties": [ { "name": "P_A", "reach": { "op": "∧", "args": [ "s_nok_seen", "r_ok_seen" ] }, "type": "probability-max-query" }, { "name": "P_B", "reach": { "op": "∧", "args": [ "s_ok_seen", { "op": "!", "args": [ "r_ok_seen" ] } ] }, "type": "probability-max-query" }, { "name": "P_1", "reach": { "op": "∨", "args": [ "s_nok_seen", "s_dk_seen" ] }, "type": "probability-max-query" }, { "name": "P_2", "reach": "s_dk_seen", "type": "probability-max-query" }, { "name": "P_3", "reach": { "op": "∧", "args": [ "s_nok_seen", { "op": ">", "args": [ "i", 8 ] } ] }, "type": "probability-max-query" }, { "name": "P_4", "reach": { "op": "∧", "args": [ { "op": "∨", "args": [ { "op": "∨", "args": [ "s_ok_seen", "s_nok_seen" ] }, "s_dk_seen" ] }, { "op": "!", "args": [ "get_k_seen" ] } ] }, "type": "probability-max-query" } ], "automata": [ { "name": "Sender", "variables": [ { "name": "bit", "type": "bool", "initial-value": false }, { "name": "rc", "type": { "kind": "bounded", "base": "int", "lower-bound": 0, "upper-bound": 2 }, "initial-value": 0 }, { "name": "c", "type": { "kind": "bounded", "base": "int", "lower-bound": 0, "upper-bound": 16 }, "initial-value": 0 } ], "locations": [ { "name": "l_0" }, { "name": "l_1" }, { "name": "l_2" }, { "name": "l_3" }, { "name": "l_4" }, { "name": "l_5" }, { "name": "l_6" }, { "name": "l_7" } ], "initial-location": "l_0", "edges": [ { "location": "l_0", "guard": { "op": "<", "args": [ "i", 16 ] }, "destinations": [ { "probability": 1, "location": "l_1", "assignments": [ { "ref": "i", "value": { "op": "+", "args": [ "i", 1 ] } }, { "ref": "Sender_location", "value": 1 } ] } ] }, { "location": "l_0", "action": "s_ok", "guard": { "op": "=", "args": [ "i", 16 ] }, "destinations": [ { "probability": 1, "location": "l_2", "assignments": [ { "ref": "first_file_done", "value": true }, { "ref": "Sender_location", "value": 2 }, { "ref": "c", "value": 0 } ] } ] }, { "location": "l_0", "action": "tick", "guard": { "op": "∧", "args": [ { "op": "≥", "args": [ "i", 16 ] }, { "op": "<", "args": [ "c", 0 ] } ] }, "destinations": [ { "probability": 1, "location": "l_0", "assignments": [ { "ref": "c", "value": { "op": "min", "args": [ { "op": "+", "args": [ "c", 1 ] }, 16 ] } } ] } ] }, { "location": "l_1", "action": "put_k", "guard": true, "destinations": [ { "probability": 1, "location": "l_3", "assignments": [ { "ref": "ff", "value": { "op": "=", "args": [ "i", 1 ] } }, { "ref": "lf", "value": { "op": "=", "args": [ "i", 16 ] } }, { "ref": "ab", "value": "bit" }, { "ref": "c", "value": 0 }, { "ref": "Sender_location", "value": 3 } ] } ] }, { "location": "l_1", "action": "tick", "guard": { "op": "<", "args": [ "c", 0 ] }, "destinations": [ { "probability": 1, "location": "l_1", "assignments": [ { "ref": "c", "value": { "op": "min", "args": [ { "op": "+", "args": [ "c", 1 ] }, 16 ] } } ] } ] }, { "location": "l_2", "guard": true, "destinations": [ { "probability": 1, "location": "l_4", "assignments": [ { "ref": "Sender_location", "value": 4 } ] } ] }, { "location": "l_3", "action": "get_l", "guard": true, "destinations": [ { "probability": 1, "location": "l_5", "assignments": [ { "ref": "bit", "value": { "op": "!", "args": [ "bit" ] } }, { "ref": "rc", "value": 0 }, { "ref": "c", "value": 0 }, { "ref": "Sender_location", "value": 5 } ] } ] }, { "location": "l_3", "guard": { "op": "∧", "args": [ { "op": "<", "args": [ "rc", 2 ] }, { "op": "≥", "args": [ "c", 3 ] } ] }, "destinations": [ { "probability": 1, "location": "l_1", "assignments": [ { "ref": "rc", "value": { "op": "+", "args": [ "rc", 1 ] } }, { "ref": "c", "value": 0 }, { "ref": "Sender_location", "value": 1 } ] } ] }, { "location": "l_3", "action": "s_nok", "guard": { "op": "∧", "args": [ { "op": "∧", "args": [ { "op": "<", "args": [ "i", 16 ] }, { "op": "≥", "args": [ "rc", 2 ] } ] }, { "op": "≥", "args": [ "c", 3 ] } ] }, "destinations": [ { "probability": 1, "location": "l_6", "assignments": [ { "ref": "rc", "value": 0 }, { "ref": "c", "value": 0 }, { "ref": "Sender_location", "value": 6 } ] } ] }, { "location": "l_3", "action": "s_dk", "guard": { "op": "∧", "args": [ { "op": "∧", "args": [ { "op": "≥", "args": [ "i", 16 ] }, { "op": "≥", "args": [ "rc", 2 ] } ] }, { "op": "≥", "args": [ "c", 3 ] } ] }, "destinations": [ { "probability": 1, "location": "l_6", "assignments": [ { "ref": "rc", "value": 0 }, { "ref": "c", "value": 0 }, { "ref": "Sender_location", "value": 6 } ] } ] }, { "location": "l_3", "action": "tick", "guard": { "op": "<", "args": [ "c", 3 ] }, "destinations": [ { "probability": 1, "location": "l_3", "assignments": [ { "ref": "c", "value": { "op": "min", "args": [ { "op": "+", "args": [ "c", 1 ] }, 16 ] } } ] } ] }, { "location": "l_4", "action": "tick", "guard": true, "destinations": [ { "probability": 1, "location": "l_4" } ] }, { "location": "l_5", "guard": true, "destinations": [ { "probability": 1, "location": "l_0", "assignments": [ { "ref": "Sender_location", "value": 7 } ] } ] }, { "location": "l_6", "guard": true, "destinations": [ { "probability": 1, "location": "l_7", "assignments": [ { "ref": "Sender_location", "value": 8 } ] } ] }, { "location": "l_7", "action": "s_restart", "guard": { "op": "≥", "args": [ "c", 15 ] }, "destinations": [ { "probability": 1, "location": "l_4", "assignments": [ { "ref": "bit", "value": false }, { "ref": "first_file_done", "value": true }, { "ref": "Sender_location", "value": 4 }, { "ref": "c", "value": 0 } ] } ] }, { "location": "l_7", "action": "tick", "guard": { "op": "<", "args": [ "c", 15 ] }, "destinations": [ { "probability": 1, "location": "l_7", "assignments": [ { "ref": "c", "value": { "op": "min", "args": [ { "op": "+", "args": [ "c", 1 ] }, 16 ] } } ] } ] } ] }, { "name": "Receiver", "variables": [ { "name": "r_ff", "type": "bool", "initial-value": false }, { "name": "r_lf", "type": "bool", "initial-value": false }, { "name": "r_ab", "type": "bool", "initial-value": false }, { "name": "bit", "type": "bool", "initial-value": false }, { "name": "c", "type": { "kind": "bounded", "base": "int", "lower-bound": 0, "upper-bound": 16 }, "initial-value": 0 } ], "locations": [ { "name": "l_0" }, { "name": "l_1" }, { "name": "l_2" }, { "name": "l_3" }, { "name": "l_4" }, { "name": "l_5" }, { "name": "l_6" } ], "initial-location": "l_0", "edges": [ { "location": "l_0", "action": "get_k", "guard": "ff", "destinations": [ { "probability": 1, "location": "l_1", "assignments": [ { "ref": "c", "value": 0 }, { "ref": "bit", "value": "ab" }, { "ref": "r_ff", "value": "ff" }, { "ref": "r_lf", "value": "lf" }, { "ref": "r_ab", "value": "ab" }, { "ref": "Receiver_location", "value": 1 } ] } ] }, { "location": "l_0", "action": "get_k", "guard": { "op": "!", "args": [ "ff" ] }, "destinations": [ { "probability": 1, "location": "l_2", "assignments": [ { "ref": "premature_timeout", "value": true }, { "ref": "Receiver_location", "value": 2 } ] } ] }, { "location": "l_0", "action": "tick", "guard": true, "destinations": [ { "probability": 1, "location": "l_0" } ] }, { "location": "l_1", "action": "put_l", "guard": { "op": "≠", "args": [ "r_ab", "bit" ] }, "destinations": [ { "probability": 1, "location": "l_3", "assignments": [ { "ref": "Receiver_location", "value": 3 } ] } ] }, { "location": "l_1", "action": "r_ok", "guard": { "op": "∧", "args": [ "r_lf", { "op": "=", "args": [ "r_ab", "bit" ] } ] }, "destinations": [ { "probability": 1, "location": "l_4", "assignments": [ { "ref": "Receiver_location", "value": 4 } ] } ] }, { "location": "l_1", "action": "r_fst", "guard": { "op": "∧", "args": [ { "op": "∧", "args": [ "r_ff", { "op": "!", "args": [ "r_lf" ] } ] }, { "op": "=", "args": [ "r_ab", "bit" ] } ] }, "destinations": [ { "probability": 1, "location": "l_4", "assignments": [ { "ref": "Receiver_location", "value": 4 } ] } ] }, { "location": "l_1", "action": "r_inc", "guard": { "op": "∧", "args": [ { "op": "∧", "args": [ { "op": "!", "args": [ "r_ff" ] }, { "op": "!", "args": [ "r_lf" ] } ] }, { "op": "=", "args": [ "r_ab", "bit" ] } ] }, "destinations": [ { "probability": 1, "location": "l_4", "assignments": [ { "ref": "Receiver_location", "value": 4 } ] } ] }, { "location": "l_1", "action": "tick", "guard": { "op": "<", "args": [ "c", 0 ] }, "destinations": [ { "probability": 1, "location": "l_1", "assignments": [ { "ref": "c", "value": { "op": "min", "args": [ { "op": "+", "args": [ "c", 1 ] }, 16 ] } } ] } ] }, { "location": "l_2", "action": "tick", "guard": true, "destinations": [ { "probability": 1, "location": "l_2" } ] }, { "location": "l_3", "action": "get_k", "guard": true, "destinations": [ { "probability": 1, "location": "l_1", "assignments": [ { "ref": "c", "value": 0 }, { "ref": "r_ff", "value": "ff" }, { "ref": "r_lf", "value": "lf" }, { "ref": "r_ab", "value": "ab" }, { "ref": "Receiver_location", "value": 1 } ] } ] }, { "location": "l_3", "action": "r_timeout", "guard": { "op": "∧", "args": [ "r_lf", { "op": "=", "args": [ "c", 15 ] } ] }, "destinations": [ { "probability": 1, "location": "l_5", "assignments": [ { "ref": "Receiver_location", "value": 5 } ] } ] }, { "location": "l_3", "action": "r_nok", "guard": { "op": "∧", "args": [ { "op": "!", "args": [ "r_lf" ] }, { "op": "=", "args": [ "c", 15 ] } ] }, "destinations": [ { "probability": 1, "location": "l_6", "assignments": [ { "ref": "Receiver_location", "value": 6 } ] } ] }, { "location": "l_3", "action": "tick", "guard": { "op": "<", "args": [ "c", 15 ] }, "destinations": [ { "probability": 1, "location": "l_3", "assignments": [ { "ref": "c", "value": { "op": "min", "args": [ { "op": "+", "args": [ "c", 1 ] }, 16 ] } } ] } ] }, { "location": "l_4", "action": "put_l", "guard": true, "destinations": [ { "probability": 1, "location": "l_3", "assignments": [ { "ref": "bit", "value": { "op": "!", "args": [ "bit" ] } }, { "ref": "Receiver_location", "value": 3 } ] } ] }, { "location": "l_4", "action": "tick", "guard": { "op": "<", "args": [ "c", 0 ] }, "destinations": [ { "probability": 1, "location": "l_4", "assignments": [ { "ref": "c", "value": { "op": "min", "args": [ { "op": "+", "args": [ "c", 1 ] }, 16 ] } } ] } ] }, { "location": "l_5", "guard": true, "destinations": [ { "probability": 1, "location": "l_0", "assignments": [ { "ref": "r_ff", "value": false }, { "ref": "r_lf", "value": false }, { "ref": "r_ab", "value": false }, { "ref": "bit", "value": false }, { "ref": "c", "value": 0 }, { "ref": "Receiver_location", "value": 0 } ] } ] }, { "location": "l_5", "action": "tick", "guard": { "op": "<", "args": [ "c", 15 ] }, "destinations": [ { "probability": 1, "location": "l_5", "assignments": [ { "ref": "c", "value": { "op": "min", "args": [ { "op": "+", "args": [ "c", 1 ] }, 16 ] } } ] } ] }, { "location": "l_6", "action": "r_timeout", "guard": true, "destinations": [ { "probability": 1, "location": "l_5", "assignments": [ { "ref": "Receiver_location", "value": 5 } ] } ] }, { "location": "l_6", "action": "tick", "guard": { "op": "<", "args": [ "c", 15 ] }, "destinations": [ { "probability": 1, "location": "l_6", "assignments": [ { "ref": "c", "value": { "op": "min", "args": [ { "op": "+", "args": [ "c", 1 ] }, 16 ] } } ] } ] } ] }, { "name": "ChannelK", "variables": [ { "name": "c", "type": { "kind": "bounded", "base": "int", "lower-bound": 0, "upper-bound": 2 }, "initial-value": 0 } ], "locations": [ { "name": "l_0" }, { "name": "l_1" }, { "name": "l_2" } ], "initial-location": "l_0", "edges": [ { "location": "l_0", "action": "put_k", "guard": true, "destinations": [ { "probability": { "op": "/", "args": [ 49, 50 ] }, "location": "l_1", "assignments": [ { "ref": "c", "value": 0 }, { "ref": "inTransitK", "value": true }, { "ref": "ChannelK_location", "value": 1 } ] }, { "probability": { "op": "/", "args": [ 1, 50 ] }, "location": "l_0", "assignments": [ { "ref": "ChannelK_location", "value": 0 } ] } ] }, { "location": "l_0", "action": "tick", "guard": true, "destinations": [ { "probability": 1, "location": "l_0" } ] }, { "location": "l_1", "action": "get_k", "guard": true, "destinations": [ { "probability": 1, "location": "l_0", "assignments": [ { "ref": "inTransitK", "value": false }, { "ref": "c", "value": 0 }, { "ref": "ChannelK_location", "value": 0 } ] } ] }, { "location": "l_1", "action": "put_k", "guard": true, "destinations": [ { "probability": 1, "location": "l_2", "assignments": [ { "ref": "channel_k_overflow", "value": true }, { "ref": "ChannelK_location", "value": 2 }, { "ref": "c", "value": 0 } ] } ] }, { "location": "l_1", "action": "tick", "guard": { "op": "<", "args": [ "c", 1 ] }, "destinations": [ { "probability": 1, "location": "l_1", "assignments": [ { "ref": "c", "value": { "op": "min", "args": [ { "op": "+", "args": [ "c", 1 ] }, 2 ] } } ] } ] }, { "location": "l_2", "action": "tick", "guard": true, "destinations": [ { "probability": 1, "location": "l_2" } ] } ] }, { "name": "ChannelL", "variables": [ { "name": "c", "type": { "kind": "bounded", "base": "int", "lower-bound": 0, "upper-bound": 2 }, "initial-value": 0 } ], "locations": [ { "name": "l_0" }, { "name": "l_1" }, { "name": "l_2" } ], "initial-location": "l_0", "edges": [ { "location": "l_0", "action": "put_l", "guard": true, "destinations": [ { "probability": { "op": "/", "args": [ 99, 100 ] }, "location": "l_1", "assignments": [ { "ref": "c", "value": 0 }, { "ref": "inTransitL", "value": true }, { "ref": "ChannelL_location", "value": 1 } ] }, { "probability": { "op": "/", "args": [ 1, 100 ] }, "location": "l_0", "assignments": [ { "ref": "ChannelL_location", "value": 0 } ] } ] }, { "location": "l_0", "action": "tick", "guard": true, "destinations": [ { "probability": 1, "location": "l_0" } ] }, { "location": "l_1", "action": "get_l", "guard": true, "destinations": [ { "probability": 1, "location": "l_0", "assignments": [ { "ref": "inTransitL", "value": false }, { "ref": "c", "value": 0 }, { "ref": "ChannelL_location", "value": 0 } ] } ] }, { "location": "l_1", "action": "put_l", "guard": true, "destinations": [ { "probability": 1, "location": "l_2", "assignments": [ { "ref": "channel_l_overflow", "value": true }, { "ref": "ChannelL_location", "value": 2 }, { "ref": "c", "value": 0 } ] } ] }, { "location": "l_1", "action": "tick", "guard": { "op": "<", "args": [ "c", 1 ] }, "destinations": [ { "probability": 1, "location": "l_1", "assignments": [ { "ref": "c", "value": { "op": "min", "args": [ { "op": "+", "args": [ "c", 1 ] }, 2 ] } } ] } ] }, { "location": "l_2", "action": "tick", "guard": true, "destinations": [ { "probability": 1, "location": "l_2" } ] } ] }, { "name": "Observer", "variables": [], "locations": [ { "name": "l_0" } ], "initial-location": "l_0", "edges": [ { "location": "l_0", "action": "get_k", "guard": true, "destinations": [ { "probability": 1, "location": "l_0", "assignments": [ { "ref": "get_k_seen", "value": true }, { "ref": "Observer_location", "value": 0 } ] } ] }, { "location": "l_0", "action": "s_ok", "guard": true, "destinations": [ { "probability": 1, "location": "l_0", "assignments": [ { "ref": "s_ok_seen", "value": true }, { "ref": "Observer_location", "value": 0 } ] } ] }, { "location": "l_0", "action": "s_nok", "guard": true, "destinations": [ { "probability": 1, "location": "l_0", "assignments": [ { "ref": "s_nok_seen", "value": true }, { "ref": "Observer_location", "value": 0 } ] } ] }, { "location": "l_0", "action": "s_dk", "guard": true, "destinations": [ { "probability": 1, "location": "l_0", "assignments": [ { "ref": "s_dk_seen", "value": true }, { "ref": "Observer_location", "value": 0 } ] } ] }, { "location": "l_0", "action": "s_restart", "guard": true, "destinations": [ { "probability": 1, "location": "l_0", "assignments": [ { "ref": "s_restart_seen", "value": true }, { "ref": "Observer_location", "value": 0 } ] } ] }, { "location": "l_0", "action": "r_ok", "guard": true, "destinations": [ { "probability": 1, "location": "l_0", "assignments": [ { "ref": "r_ok_seen", "value": true }, { "ref": "Observer_location", "value": 0 } ] } ] }, { "location": "l_0", "action": "r_timeout", "guard": true, "destinations": [ { "probability": 1, "location": "l_0", "assignments": [ { "ref": "r_timeout_seen", "value": true }, { "ref": "Observer_location", "value": 0 } ] } ] }, { "location": "l_0", "action": "tick", "guard": true, "destinations": [ { "probability": 1, "location": "l_0" } ] } ] } ], "system": { "composition": "parallel", "elements": [ { "composition": "parallel", "elements": [ { "composition": "parallel", "elements": [ { "composition": "parallel", "elements": [ "Sender", "Receiver" ], "alphabet": [ "tick" ] }, "ChannelK" ], "alphabet": [ "put_k", "get_k", "tick" ] }, "ChannelL" ], "alphabet": [ "get_l", "put_l", "tick" ] }, "Observer" ], "alphabet": [ "s_nok", "s_dk", "s_ok", "s_restart", "get_k", "r_ok", "r_timeout", "tick" ] } }
|